[1/2] Settings AppOps: show/hide app type and allow/deny counters

Squash of:

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Thu Oct 3 13:51:31 2013 -0700
AppOps: menu options to show/hide user and system apps
Change-Id: Ia55364c361db949a891e4b53a757ee4dff519eb6

Author: Sam Mortimer <sam@mortimer.me.uk>
Author: Danny Baumann <dannybaumann@web.de>
Date:   Wed Oct 2 22:24:14 2013 -0700
[1/2] AppOps: Show allowed/ignored counts
Change-Id: Ia27737155c33e934df9a2a1fcff88379240fd096

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Sun Dec 1 21:39:07 2013 -0800
AppOps: only apply app type filters to summary screen
    *) If buildState() is called for a single package, do
       not apply hide user/system app filters.
    *) Fixes show detail display when called via
       long press in privacyguard and an AppOp hide
       filter is ticked.
Change-Id: If31d094fb989836ab6829daeefe820695032c0ed

Change-Id: I4d6f37b3923eb9bc98d67101d6f0ef481a427682

Patchset: 2
http://review.cyanogenmod.org/#/c/79397/

(cherry picked from commit 1a057eaabebee78f4821a01a6232aeea73920c03)

(cherry picked from commit c9be5993368f80e9780e35142c2905b053b343c8)
[1/2] Settings: Add support for OP_ALARM_WAKEUP

Port from cm-10.2 and cm-11.0

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Mon Sep 30 23:10:35 2013 -0700
[1/2] AppOps: Add alarm wakeup op
Change-Id: Ic739519cb9df9d2c67d65e3572a119b4d55145f0

Change-Id: I417742d00f60b487942ee2adf9b75d2b04a0f766

Patchset: 1
http://review.cyanogenmod.org/#/c/80212/

(cherry picked from commit 7bfa8878d5a0570de0483c070217483ae812cc4a)

(cherry picked from commit d1e025967dd53ba0f101d542436a043b0f7dd39b)
Development Settings: fix Advanced reboot not being updated on resume

Change-Id: I5475bec978c9cf50c02769091dbb43c6eff6c020

(cherry picked from commit 035be0c83a688443887275a75cd30ab53775bbef)

(cherry picked from commit c0826d23a7d3d8bf82bb667d4472d7f3cf6226fe)
privacy: Actually set the blacklist preference

The preference was not being set, which caused this code to throw an NPE on
devices without telephony when opening the privacy preferences.

This bug also affects devices with telephony in that the preference doesn't
update its text. I also got rid of the null check because the preference
always exists, the null check is pointless and ended up hiding this bug.

Change-Id: I95555d44349700a8f29a71a2f2ee9aedf419b49b

(cherry picked from commit 4e8caef1785ea1fd8118637272c86109e09489c5)

(cherry picked from commit 885c55d0962e8ec0d088f282835c1dc0d8e863c5)
bluetooth: Don't crash when the local adapter is not set

In devices where bluetooth is not working (like the emulator or devices
in development), the bluetooth Settings crashes when closing the activity.

Most of the code checks for the nullability of the local adapter except
for this particular piece. This is usually not a worry for production
devices and I wouldn't usually worry about this but since the rest of the
code performs the nullability check it seems silly to crash onPause.

Change-Id: I7c1d3b43969b516336be770957008ef2054d312f

(cherry picked from commit 7eead5cc6bf75f4c20a7eab658bcb6ef05951487)

(cherry picked from commit 686835cfb9d83be8c99541c94d88b51bca20ae7e)
Settings: squash of new profile UI for cm-12.0

Additions for cm-12.0:
- removed expanded desktop
- added add profile FAB
- updated tabs for meterial style
- added enabler switch bar

Squashed commits:
-------------------------------

Settings: refactor Profiles to be more user friendly

* Remove the notion of Profile app groups
* Rearrange profile setup flow, now we first present the user with ways
which will trigger the profile, then allow them to set what happens when
the profile is triggered.

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

Settings: cleanup new profiles UI

* cleanup old code
* for configuring profiles, add options to modify triggers and remove
the profile
* remove separate activity
* don't hardcode padding pixel sizes

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

Profiles: fix expanded desktop settings not applying

Change-Id: Ia523145bf47bfc189c29b035ad5ec6e053cf9296

Settings: Fix profiles volume override summary.

Change-Id: I499cfb3006a7fc7b5e931ac854a7437f5d141523

Settings: fix Profiles expanded desktop choice mapping

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

Settings: add "Untouched" ring mode option in profiles

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

Settings: profiles: fix volume streams override behavior

Before we would always assume to override the stream, but that is not
always the case. Add a checkbox to turn the override on and off.

Change-Id: Ic1a58d59a9e514d4c2ccf376191ac7989bbead26
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit da0affbdc020e856d2cae9eeffb91d9a3bc7ee78)

Conflicts:
	res/drawable-hdpi/ic_settings_profiles.png
	res/drawable-mdpi/ic_settings_profiles.png
	res/drawable-xhdpi/ic_settings_profiles.png
	res/drawable-xxhdpi/ic_settings_profiles.png
	res/values/cm_strings.xml

(cherry picked from commit 1341dd20f5d51079631c125e8fce27e53cdced96)
Settings: fix a couple of multiuser bugs

- show interface settings
- hide media scan on boot behaviour

for other users

Change-Id: I2b488f69b820f289d7ddb04e5171637b355dc5cf
(cherry picked from commit 133c18722395999e4c36735d3d631ea49899e90f)

Conflicts:
	src/com/android/settings/SecuritySettings.java
	src/com/android/settings/SettingsActivity.java

(cherry picked from commit d6aa7bb03568ff710099a92e8ac08cbb5c0ed4c5)
Return: Smart Pulldown [2/2]

Change-Id: Iba759e421b8cbb02fadaa6540aae7b7a74764293
(cherry picked from commit a524d38e7831d53b8fa697bc63e51ea4f96abcd8)

Conflicts:
	res/values/cm_arrays.xml
	res/values/slim_strings.xml

(cherry picked from commit c655ce6be269ba1422dea7ed66274084242b418b)
fixed cmremix version

(cherry picked from commit 09c73c949b94397760a3c0854dd9c685ac84914f)