ShutdownThread: set soft reboot trigger accordingly

Change-Id: I72bd52aa1492d356e368e8c60897002c1f110172
frameworks:base: SystemUI: cleanup a duplicate permission

these permissions are duplicated which i found using a script to check for
duplicate permissions.

submitted to AOSP here: https://android-review.googlesource.com/#/c/104810/

Change-Id: I598ed68836303e3ebc5313342f3ddaee6ccea9b2
[1/2] Frameworks Base: Fix build errors

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
[2/2] More fixes
Revert "Launch Heads Up in floating window [1/2]"

This reverts commit 3a34612276c4ed89f4bef9509faf6d3accaa3516.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHelper.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
Revert "frameworks: set default expanded desktop style"

There's currently some funky behavior related to this. The power menu
option gets automatically added to the power menu when entering
"Display" settings, no matter what.

This reverts commit a0c3610e16bb31c0ac4f909f522cb8d4cc718cd1.

Change-Id: I958e0e6f92cb8b90485af96ad55c221214007336
More fixes

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/PeekLayout.java
Fix
Themes: Fix blurry composed icons

In a composed icon the original icon could be scaled incorrectly
due to a density mismatch resulting in blurry icons.

For example, Grouper has a screen density of 213 dpi but Trebuchet will want to show a larger icon and therefore
requests to the framework to load app icons with a slightly higher density of 320dpi (XHDPI bucket).

When Resources.loadDrawable(TypedValue value, ...) is called, it will use observe value.density. Since the image
is from the XHDPI bucket it will have a TypedValue.density of 320dpi, much higher than the screen's 213dpi, and therefore
loadDrawablei() will configure BitmapFactory to scale down the image to match the screen density. This is not what we want,
so this patch modifies the density value to prevent scaling, much the same way getDrawableForDensity() does.

Change-Id: Ie638c8576872f9115dc029bb4823b50bb31ecebf
Themes: Load missing style attributes from original style

If a theme overrides a style in an app and does not include all
the attributes found in the original, it is possible for the app
to crash because it cannot locate an attribute it is expecting.

To overcome this we need to check the attributes in the original
style's bag and add any missing attributes to the current bag being
populated.  Currently we have only seen one theme that causes this
behavior, but there could be others out there or we may eventually
see this happen in the wild as apps update and the themes have not
had a chance to incorporate the new additions from the app.

Change-Id: Id44aa83a6c58a0b042d2b32171bed5e794352670
Vectone/Delight (MNC07) considered non-roaming on NOS (MNC03)

Change-Id: I743935b94bb531d78b784550e3028378cdc01959
Lycamobile (MNC04) considered non-roaming on Vodafone (MNC01)

Change-Id: Icff916672e5ed666adf2cdfeb26d24bf43b64683
Move idmap to frameworks/base [2/2]

idmap depends on libandroidfw, so it should go in frameworks/base.
This follows AOSP which moved idmap to frameworks/base back in
February of 2014.

Change-Id: Ice308a5299a69fd1fbc084a7c76a317c7dec3689
frameworks: add ongoing notification while collecting bug report

Change-Id: I644da7046b3cbbd0ec601f0e35dfbad6adf4dcf5
Signed-off-by: Roman Birg <roman@cyngn.com>
frameworks: allow LockPatternView to be rotated

When displaying this view and rotating the screen, mLockPatternUtils has
the potential to be null, but the save and restore instance state
methods depend on it to be initialized. Work around this by checking if
it's null.

Change-Id: I351bd63fefbcb92fffe20dca6a0381a20ac796ea
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: NavbarEditor: Fix saveKeys logic

In landscape, the keys are saved backwards in the for-loop, but it would crash out due from
an IndexOutOfBounds error since it's subtracting i from the array length while i = 0.

Change-Id: I405c5d962d8c575cfee57b09a7e55a8a6efc2d24
Final fixes

Conflicts:
	core/java/android/provider/Settings.java
Revert "SystemUI: don't show eq tile while casting"

Does not work as intended.

This reverts commit 72dc45fb1b219aafa1d4b2fe62d144739ae4a552.

Change-Id: Ifd40c70c45b038983145369287a6dae177ac0a4c

Conflicts:
	packages/SystemUI/src/com/android/systemui/quicksettings/EqualizerTile.java
Keyguard: Can't enter PIN code when setting the SIM and PIN lock issue

By original design, after unlock SIM PIN, SIM card's state is READY and it
will invoke resetStateLocked() to inflate KeyguardHostView. So there is
only one view be created in mSecurityViewContainer.

Roll back previous solution.
Don't set mSimState before handleSimStateChange() and don't judge
isSecure() to be consistent with the original design.

CRs-Fixed: 661955

Change-Id: Ide872c50e6823bed92720c0c40aa7987207980ed
frameworks: add persistent notification when USB OTG is connected

Tapping the notification will take the user into Storage settings, and
highlight the 'Unmount' option.

Change-Id: I650f3874a8295b2b8ffdaef78aff4b68e9cd574e
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	core/res/res/values/cm_strings.xml
	core/res/res/values/symbols.xml