Fix app ops details not displaying permissions under certain conditions.

If there's a permission that is not granted, the loop is aborted instead
of just skipping said permission.

Change-Id: Icca567ebdd818f40ad6619f258c77590074d1deb
Settings: Fix color picker ComposeShader view

The shader was not showing the proper combined gradients.  This is a
limitation of the ComposeShader in Android 3+ and has to do with the
hardware acceleration as described here:

'ComposeShader can only contain shaders of differenttypes (a BitmapShader
and a LinearGradient for instance, but not two instances of BitmapShader)'.
But, 'If your application is affected by any of these missing features or
limitations, you can turn off hardware acceleration for just the affected
portion of your application by calling:
    setLayerType(View.LAYER_TYPE_SOFTWARE, null).'

Change-Id: I8d945e37ed97c409a0cc7e9ec5570019545f0f68
privacy guard: Fix crash when uninstalling an app

 * Don't try to update the privacy guard flag while refreshing after an
   uninstall since the PM will throw an exception at us.

Change-Id: Idadb99fefc2861e871f6206b08c844dda742fa68
Handle cancellation of the 'enabling PrivacyGuard' alert box.

I noticed that the option could remain ticked but not actually enabled
if the alert box is cancelled.

Change-Id: If9a4e88641a5e4283d6ea16c17ca4461841580e3
Fix derp.

Change-Id: I2766f4c89460c967e32349be008e38b3600b7e76
Fix IllegalArgumentException in Privacy Guard Manager

On tablets such as manta a this occurs.  To reproduce go into PGM, press
the back button one time, then go back into PGM.

http://pastebin.com/N7XAybUB

Remove privacy guard fragment in onDestroyView

Change-Id: I61cebe273fa6fd514f18c86894acd176701148f6

Check if fragment transaction is empty before attempting to remove it

Change-Id: I08591c89559d33fee30ac2934fdbcc30637147da

PrivacyGuard fragment fix - change from empty check to isDestroyed check

Change-Id: I52fe44b7446cd16793df6ac9cdbe31e2ddd70210
Signed-off-by: Paul Beeler <sparksco@gmail.com>

PrivacyGuardManager: Reduce calls to getFragmentManager

Change-Id: I74f07a58b09cf0e9114d0c1c56e9a97d55ab0900
Sort disabled apps to the end of the list in privacy guard manager.

JIRA: CYAN-1703
Change-Id: Ie3c1cf0339d66405d27c06dba07cc80e4001d669
Settings: RTL layout fixes

Replaced Left with Start, and Right with End to fit Google's new RTL API.
Replaced setPadding with setPaddingRelative (which uses Start and End instead of Left and Right) around switches to make them look right in RTL UIs
Added RTL Support to LinearColorBar in order to make App Management's storageBar compatible with the RTL UI.
Reversed App Management's ViewPager in RTL langs
Fastscroll aligned to the left

Change-Id: I495f4794a9861fa01692d766ef86f4fdd8e4b38d

Conflicts:
	res/layout/lockscreen_shortcut_dialog.xml
	res/layout/lockscreen_targets.xml
	res/layout/pick_item.xml
	res/layout/qs_tile.xml
	src/com/android/settings/DevelopmentSettings.java
	src/com/android/settings/nfc/AndroidBeam.java
	src/com/android/settings/wfd/WifiDisplaySettings.java

REVERT ME IF LAYOUTS LOOK WEIRD!
Led Settings : Hex input for colorpicker

Allow users to specify hex color codes

Change-Id: I644b624d569e5c2fbb0fc48683c73041b4193d27
Fix dialog state handling.

Convert ApplicationLightPreference into a DialogPreference to correctly
manage the dialog lifecycle, e.g. when rotating the device. Also save
the user-defined color in case the dialog was open.

Change-Id: Ife00e1c4737fbf6710ccdaa1252def00f2831af3
JIRA:CYAN-914
Fix light settings dialog being unusable in landscape.

Change-Id: I38eeeafd1d8260ab4a7c8de9099a7e270c1462f2
Colour picker text input field: wrong content due to alpha channel.

The field was, effectively, showing AARRGG instead of RRGGBB due to
the alpha component being non-zero. This change fixes that in a
generic way which allows for alpha channel handling even though I see
no use for the alpha channel for the notification light.

Change-Id: I5b71340f3b644c6f6b305dc66d1285cc77427bf5