Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Change-Id: If73d225e38d0a2f7c616c4aeb33f67bdaed390f1
Avoid layout passes when updating data activity indicators.

ImageView can optimize out layout passes if old and new drawable have
equal sizes. Take advantage of that by displaying a transparent drawable
with the same size as the in/out drawables when there's no activity
instead of clearing out the drawable in that case.

Change-Id: Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01
SystemUI: fix wrong statusbar background.

If we turned off screen while some panel was visible than
background of PhoneStatusBarView will not be updated because we receiving single
panelExpansionChanged call and after super.panelExpansionChanged mFadingPanel
will be null (onAllPanelsCollapsed cause this).

Allow updating background when mFadingPanel is null.

Change-Id: Ib123f27500790c1b7ec787b7e433372629daa08d
Development shortcut in StatusBar and Recent Panel

It enables the wipe data and application force close option in the
recent tasks list and in the notification area. These options will
be available only if the Development shortcut option is enabled.

Change-Id: Ia4e1d040e8eade5afe118dd62bc28c86381c03e6

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/cm_strings.xml
SystemUI: unbreak RecentsPanel with translucent decors.

Change-Id: Ibcc4f5fc11109c0f2c149e66b7531e8c9ea79ae1
keyguard: fix layout for sw320dp devices

800x480px dpi devices have less screen space than the xhdpi devices
Google designed the layout for and the layout needs adjustment.

- Reduce the lockscreen security container size such that the clock
  widget has enough space to display its content.
- In the SIM PIN/PUK view, Google put an empty widget on top, but
  we don't have space for that, increase its size such that the
  widget practically disappears.

This should not have any effect on devices with larger screens.

Ported from cm-10.2.
* Removed invalid mdpi layout leftover from framework-res
* Fix keyguard for mdpi devices too

Change-Id: I9e811cfd312abae24a9cad189d19e73848f6c4c1
Add support for allow-permission extension.
This will grant a sharedUserId arbitrary permissions as defined by XML files
in /system/etc/permissions.

Change-Id: I4c0be56173b89621c4cc7ae589715a030931e8d5
[1/2] Base: Fix pimp up ActiveDisplay

This is a fix for the new features added with change: https://gerrit.omnirom.org/#/c/2819/

1. Fix the bug when Pocket mode is set to Notifications only and you
unlock your device with power key and if you put your hands over
proximity sensor the device will turn off (very annoying). The problem
was that mWakedByPocketMode it was put in wrong place.

2. Added an option in active display settings for "turn off display if
device gets pocketed again" (it's annoying for me, because i cover
the proximity very often).

3. Added an option in active display settings for proximity threshold.
I use this active display feature as an replacement for "sweep2wake",
and when my phone it's on the table, i just want to pass my hand over
it to show me the clock or notification (this was ok before the pimp up
commit), and now, you can choose how many seconds for proximity
threshold.

Practicaly, this commit fix one bug, and add settings for the
features added in 'pimp up' commit.

[2/2] part: https://gerrit.omnirom.org/#/c/3381/

Change-Id: I9e49ddb89002699714dcc3b3d2b1df87dc4bab4b

Conflicts:

	core/java/android/provider/Settings.java
[1/2] base: added config for menu unlock

Allow to define if menu unlock is enabled or not

Change-Id: Ibe498f5b6fc956678f426c9fdc9db28a0c483429
DocumentsUI: Add a standalone File Manager

This commit adds a standalone mode to the DocumentsUI, to let
it act as a file manager/explorer.
You can browse your storage contents, open files, and delete them,
as well as do everything that the DocumentsUI can do (ie. sort
by name/size/type, list and grid view, recents, search, ...).

This gives us a consistent file browsing UX accross all apps
that uses the new documents API.

Change-Id: If73a3c100f010bdb766c843976d4fd3573ea805c
base: fix enable/disable of notification light

http://jira.omnirom.org/browse/OMNI-86

Change-Id: I1a252c2553462302e416517288bb944de1558956

Conflicts:

	services/java/com/android/server/NotificationManagerService.java
Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty.
This often occurs after an incomplete reboot/shutdown or battery pull.

Change-Id: I4f01151f4051df4ae1b85fa460ec7a9e70122878
Parse UUID string with Long.parseLong

Integer.parseInt throws an NPE for values greater than 0x7fffffff.

Change-Id: I4a67c96e1fcdb68b22447f98bc898638c8c317a0
Halo: Add master switch to disable Halo (1/2)
-Port master switch from @Der-Schubi.
-Fixed Halo not showed at first notifiction pulldown.

Signed-off-by: scott <scott@ubuntu>

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

Change-Id: I93b59da79c63c3154bec1dba4490e4f4447a1564
Default navbar icons thnx Lo
Call to equals() comparing different types (FindBugs)

Call to HashSet<PrintServiceInfo>.equals(ArrayList<PrintServiceInfo>).
The result of this comparison will always be false.

Change-Id: Ic8cc6eab99cea4c7b3841faf6bc84c246273e8d0
base: correct default enablement of battery light

Use default value from config

Change-Id: I50a0e78bf4528ee8991da41aa1fdcfaaa30b107d
fb: fix possible NPE on back button transition

Change-Id: Ia6e30a9d94f292e7616b846f159b61fed9f502cc
Quiet Hours: Clean up and consolidate code (1/2)

Thanks to @invisiblek from CM and @kufikugel from Slim
Quiet Hours Ringer (2/3)

Change-Id: Id58ffb24f0d0d57d8446265c899ec4124fe00c70

Conflicts:

	core/java/android/provider/Settings.java