AppOps improvements

f51639beb86c9b6c3ecb77512ad6256d481bcc66 [2/2] AppOps: Add per Op allowed and ignored counters
2ba02cf19c4a2b23e1ae8879ebe4e7b348b27093 [2/2] AppOps: Add alarm wakeup op
23b07248cd7b1aa3be1ea9a9b7158fa46221e0c6 AppOps: Update Cherry-Picks
66d8936c93439dacb986314e1d880b78c360d627 AppOps: Add support for whitelist of packages.
2898e4ba88786cba785e65cb670ddb259c206af4 AppOps: Add Bluetooth enable control into AppOps
3447900866e5ef8bec34883ccc4268acde402c43 AppOps: Add data connect control into AppOps
baf099de3173e14b5829a3cd3edbea4088b22616 wifi: Confirm user permission before toggling wifi.
d559105a4a176c28e6d820f61d5867318e680558 AppOpsService: Add MODE_ASK support to AppOps.

Change-Id: I191e1ca3837f3dfb6b0932204a92b8aacb5013ef
(cherry picked from commit 8083e7beaf38a9c770db5922c07fcebe53d442d0)
privacy guard: changes part 1

the new cm implementation from our privacy guard is not the best.
Some changes we needd to do next week. For first give back the ability
to filter critical apps + do not show apps without any permissions

to do
- enable only the critical permissions the app is using
- add another active icon to notify the user if he modiefied another permission then the default ones
- add ability to disable notifications

Change-Id: I35507796cc14ce5c39177c6c47538db135f16ed7
(cherry picked from commit f9c457824c927172bf809b44af8ce417bf4254aa)
Frameworks: Privacy Guard part 2 (1/2)

Current implementation does not really merge both awesome features
appops and privacy guard. As well it is from UX perspective too complicated

So this commits changes:

- Move int array to logical correct place AppOpsManager
- Switch only the privacy guard permissions which the app
  really requests and not all...this irritates the user
- give support for custom permission set and reflect this state
  with an icon in notification and pgm
- add pack filterpermission feature due that user mainly are interested
  in the apps which use critical personal data
- permit by default as well writing off personal data
- do not show apps where either permissions are not changeable due
  off appops or apps which do not have permissions at all
- ability to hide pg notification
- remove pg checkbox in InstalledAppdetails and add a button to
  modify appops. Button is disabled if either the app does not have
  permissions or appops does not support it. As well for platform
  certificate apps
- add on appops detail screen reset and privacy guard button to quick
  change all states
- rework of the complete dialog handling in pgm and add several dialogs
- move all notify icon for pgm and notification to frameworks base
- and a lot more minor fixes and fc fixes

cheers

PatchSet:
- correct privacy guard filter logic
- add pgm map
- add status icons.....PGM shows either off/partly enabled/enabled
  in addition to it other set permissions shows a red plus sign on
  the top right corner of the PGM icon on all states
- tapping on PGM and menu pgm button on detail appops screen turns on/off
  only PGM permissions to be more consistent
- some minor fixes

Change-Id: I060cfefd847a6c8824cde913b6b3ea30440965d9
(cherry picked from commit 1bde8ac824afbc185948d76eb549a505f816b117)
Frameworks: Policy: implement a pin keypad shuffler [1/2]

this is to further prevent people using the tablet guessing your pin based on fingerprints left on the screen
example of the expected outcome - https://www.dropbox.com/sh/r3xb2q53ksaqni9/Oz1Eu8Dm7O

- correct coding style
- added reload button

PatchSet:
- simplify shuffle code
- fix over shifting in some cases
- add reload button functionallity
- add lockscreenutils method to detect only PIN lock
  for settings
- exclude sim and simpuk PIN lock
- add drawables for reload button

PatchSet
- cleanup

PatchSet:
- fix shuffle NumKeyPad even if a theme replaces the xml
  and reload button is not present.

PatchSet:
- add mode disabled/always/on request

cheers

kufi

Change-Id: If4b387f43b06ecc91e06ae420a21697d39cda75b
(cherry picked from commit 8f0eaf0e5d8693758171617a96a7f042f9fe9515)

Conflicts:
	core/res/res/values/symbols.xml
suspend actions (1/2) && wakelock blocker (1/2)

Change-Id: If4be7f212155f65f9d240c827203f5a68c673bf7
(cherry picked from commit 532de596eb976e37ddbae95fb3389f019463fee6)
Pie: Add master switch to disable Pie (1/2)

Change-Id: Iff8624a7b8317246992742c9953f41a9d3f9b205
(cherry picked from commit c2c822cf010ed9464eb4300c687153913565cd2e)