History log of /frameworks/base/services/core/java/com/android/server/AppOpsService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
64e0dcb989f27fc9246f3b2f40accd261f574d7e 25-May-2016 Suprabh Shukla <suprabh@google.com> Updating user restrictions when they are removed

Local user restrictions were not being updated in
AppOpsService#setUserRestrictions when a restriction was removed.

Bug: 28908581
Change-Id: If22f5834fadca33ec8b80bc4fb3993c1e1c29824
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
ffddadb04a8df12f05f42721cc59e242e78c2a64 21-May-2016 Suprabh Shukla <suprabh@google.com> Fixing isOpRestricted in AppOpsService

AppOpsService was returning false for a restricted operation if the
operation did not allow the system to bypass the restrictions on it.

Bug: 28860721
Change-Id: I487e23f1d3bf6ea602caee439fb500c058e7c8ff
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
a8bbd76d9b5249c64ef31aa162e9a84abaad39ba 14-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Ensure app op restrictions reset when the app that set them dies.

We were not keeping track when an app that set an app op restriction
dies to clean up after that. As a result we may end up with stale
restrictions that will be there until the device reoots - not cool.
This change adds remote binder death tracking and simplifies the
code as adding the formed would have made more complex.

bug:28770536

Change-Id: I7dcaafba2354843a0cdf0206ab1f96625edc5120
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
3397c88f7900d8db677204cdbe9e7a5dc26e453a 06-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Notify app op watchers when audio restrictions change." into nyc-dev
1984bba8c80d9b9abb73836f7824428807d34a50 05-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> UID appop state should always override package appop

bug:27831867

Change-Id: I32829137f84a2f1d70363b6d1481ccbb87c15d1c
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
bb21c25b3f927eeb1a1e56fa3023093f0d74204c 05-Apr-2016 Julia Reynolds <juliacr@google.com> Notify app op watchers when audio restrictions change.

Bug: 27702159
Change-Id: I09c70708b8a32c0bf9a21a3c256100796167780e
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
f73adb6c7249a1655bcd2ec17760ec754502f59d 29-Mar-2016 Svetoslav Ganov <svetoslavganov@google.com> Sanitize app op service inputs

bug:26587386

This reverts commit 9888e00b7a36cd03821001a58e4ff86224e3d858.

Change-Id: I37069b6eb50ee1a1b29d6f116e96ad9f226883c9
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
efc4a344a173ae20ec72b8c05c45b794687fda87 22-Mar-2016 Andrei Stingaceanu <stg@google.com> AfW - suspend apps - API polish

* renamed getPackageSuspended => isPackageSuspended
* does not return false for an error, instead throws
NameNotFoundException if the package could not be
found, or if there is an unknown RemoteException,
wraps it in a RuntimeException and rethrows.

Bug: 27532430
Bug: 22776761
Change-Id: Iee00600089b1c0556a3312b10456826464fa8f9f
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
e91f3e7e8d8aec8b880e6ed284a3889f849dfd91 26-Mar-2016 Dianne Hackborn <hackbod@google.com> Fix issue #27776639: Background Check: Conn_Change...

...shouldnt be received when app is awake

(Really any implicit broadcast.)

Fix up a few things so we are more strict when not in lenient
mode.

Change-Id: I3c711525787e07ea7c604d0f9bc123e02448fa68
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
ef43188489d287f317af6d48c3145dd2170aaf84 22-Mar-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Sanitize app op service inputs"" into nyc-dev
9888e00b7a36cd03821001a58e4ff86224e3d858 22-Mar-2016 Ian Pedowitz <ijpedowitz@google.com> Revert "Sanitize app op service inputs"

This reverts commit fcf01503c5f04841bc0b2c51a2f30cffaf60a2f6.

Bug: 26587386
Bug: 27759382
Change-Id: Iedfe3657b51c3965bcbddb6b2dc6dfbc1d7b9c37
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
98a41e32cf5f5de037e92e68fb82d881792ee0a9 17-Mar-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Sanitize app op service inputs" into nyc-dev
32f0fa4a50d8452c224ac936048b553bf70bd48e 12-Mar-2016 Ruben Brunk <rubenbrunk@google.com> Chaser patch for AppOps restriction changes.

Bug: 26775563
Change-Id: Id7980cec242995d5e83e54b81e3f6990496a59bb
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
29931bc684bde6b430923122777684178ee2681c 11-Mar-2016 Ruben Brunk <rubenbrunk@google.com> Allow per-package exemptions for restricted AppOps

- When setting blanket user restrictions, per-package
exemptions may be granted.
- Exempt the current active VrListenerService from the
blanket restriction on drawing overlays while in VR mode.

Bug: 26775563
Change-Id: I14b17a126502c7905a970ad42d25d6dd600b86b1
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
fcf01503c5f04841bc0b2c51a2f30cffaf60a2f6 02-Mar-2016 Svetoslav Ganov <svetoslavganov@google.com> Sanitize app op service inputs

bug:26587386

Change-Id: I3dd72ebb5ecdb7caaf75282aa6588db2f59295c1
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
9cea80cdddbecadb304eb7c8373cf1ed397f433a 16-Feb-2016 Svet Ganov <svetoslavganov@google.com> No overlay when permissions shown - framework

bug:26973205

Change-Id: I88395e47649191bb7db6dd8723c49e741ef4f1e4
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
355b232d7998cfc9b29d42a0356390e25191bcbd 12-Feb-2016 Andrei Stingaceanu <stg@google.com> Suspend packages - new API for retrieving the suspended status

Instead of always rebuilding the full ApplicationInfo for a
package when callers are only interested in the suspended status
add a new fast API in Packagemanager (which only checks the
suspended user setting for the requested package and returns
a boolean) and change the appropriate caller code too.

Bug: 26794775
Bug: 22776761
Change-Id: Ide8428ef734479360d5a8a75fd8e0ed8ddf2da7a
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
2bc2febd56b12131e7a5e5b1ad49d62b3092ec17 11-Feb-2016 Andrei Stingaceanu <stg@google.com> Suspend apps - disable audio/vibrations

Do not allow audio or vibrations for suspended apps.

Bug: 22776761
Bug: 26949521
Bug: 26954754
Bug: 26953560
Change-Id: I181288823e38efdb1631bc26ee23278697eeb0f5
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
bd098d4ed3240b5beb5c0d1c1c8d87d2aa708dd7 28-Jan-2016 Chien-Yu Chen <cychen@google.com> Merge changes from topic 'camera-hardening'

* changes:
Add cameraserver process
Camera: update connect call
75cade0a5fd5ec432870de9977f81091ab389423 11-Jan-2016 Chien-Yu Chen <cychen@google.com> Add cameraserver process

Add UID and permissions for cameraserver process.

Bug: 24511454
Change-Id: Iccbda4b42e5584a1f56f9afe5e15a16f40dd2922
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
cd65448ccd13c4c2d0fe9e9623fec3a898ab9372 09-Jan-2016 Jeff Sharkey <jsharkey@android.com> Even more PackageManager caller triage.

Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
1aba5230c531152aaffffc68bbb9e6c6fb3a5a2d 11-Dec-2015 Andy Hung <hunga@google.com> Merge "Add Android permissions for audioserver"
8de5971ac68fdae1a418ed6cd95d276b98b21996 10-Dec-2015 Svetoslav Ganov <svetoslavganov@google.com> Avoid caller NPE if callback null in AppOpsService

bug:25863432

Change-Id: Ib0386ed4c1637ff8b084f32592ba316b65498005
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
ed0ea40a41aae8e65bc189efe6b631ca78259383 30-Oct-2015 Andy Hung <hunga@google.com> Add Android permissions for audioserver

audioserver has the same permissions as mediaserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: Id7abddd79a730ad95b554a94207df3aa4b676f2a
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
8fbf16f6c662d5ff6b5106d16f4a930646eb5b6d 03-Dec-2015 Jeff Sharkey <jsharkey@android.com> Merge "Fix race condition when collecting op callback." am: 98844a97d2 am: 678011854b
am: 28d8b8c988

* commit '28d8b8c9882e501f95ec3076a4f1fffc759ea999':
Fix race condition when collecting op callback.
28d8b8c9882e501f95ec3076a4f1fffc759ea999 03-Dec-2015 Jeff Sharkey <jsharkey@android.com> Merge "Fix race condition when collecting op callback." am: 98844a97d2
am: 678011854b

* commit '678011854b0969f5fe69d597911beabcadcb03e8':
Fix race condition when collecting op callback.
40b300fd80708fd100d22f22ff6100db20ee467f 23-Nov-2015 riddle_hsu <riddle_hsu@htc.com> Fix race condition when collecting op callback.

Other threads may change mOpModeWatchers, mPackageModeWatchers
by startWatchingMode, stopWatchingMode.

Change-Id: Id260172979ddfc2df9331880805d16ee13e183eb
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
268e4e3d00df6ea0eae6fca321e474a3d512fb7e 19-Nov-2015 Dianne Hackborn <hackbod@google.com> Move appops command to the service.

The "appops" shell command is now just a wrapper around doing
"cmd appops", no more need to launch a Java VM!

Change-Id: I06fc68762d0ab95a016fb24db0affb0d91197588
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
bef28feba57be7fd6a4d14a85a8229154338b2ed 30-Oct-2015 Dianne Hackborn <hackbod@google.com> Initial stab at background check.

Actually, this implementation is more what we want for ephemeral
apps. I am realizing the two are not really the same thing. :(

For this implementation, we now keep track of how long a uid has
been in the background, and after a certain amount of time
(currently 1 minute) we mark it as "idle". Any packages associated
with that uid are then no longer allowed to run in the background.
This means, until the app next goes in the foreground:

- No manifest broadcast receivers in the app will execute.
- No services can be started (binding services is still okay,
as this is outside dependencies on the app that should still
be represented).
- All alarms for the app are cancelled and no more can be set.
- All jobs for the app are cancelled and no more can be scheduled.
- All syncs for the app are cancelled and no more can be requested.

Change-Id: If53714ca4beed35faf2e89f916ce9eaaabd9290d
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
e2ed23e6b221185ce2587fb19a6e904dbf7ec77b 30-Oct-2015 Jeff Sharkey <jsharkey@android.com> Handle "uninstalled" apps when pruning app-ops.

During system boot, we prune app-ops belonging to apps that have
been uninstalled. However, apps installed on adopted storage devices
haven't been scanned at this point, so they appear to be uninstalled.

To avoid pruning app-ops for these apps, we need a getPackageUid()
variant that also considers "uninstalled" apps for which we still
have PackageSetting values.

Bug: 25206071
Change-Id: I1820f674d45c5ddc1c5f10ed7d859e7025005e28
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
8f1ea834f9af5ccf6cea1f529f63e727cd13b6a8 27-Aug-2015 Tim Kilbourn <tkilbourn@google.com> Handle the -a flag for dumpsys appops.

Bug: 23017449
Change-Id: I6ce9ac368e2739153867c246893eb544d052834f
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
4d34bb8304ae2e85c2b12628c9a6346c6835de5d 08-Aug-2015 Dianne Hackborn <hackbod@google.com> Fix issue #23037093: "Write system settings" permission value fails...

...to persist after reboot

We were writing a corrupt settings file, so would always reset back
to the default app ops state after boot...!

Also add new appops service commands to manually write and read
its settings, since that is very useful for testing.

Change-Id: Ia510507764738fd82e45ec0be6db840c6ea30c28
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
215b44a1c2c883e628e1ab5b945a1a4aa04ee392 05-Aug-2015 Svetoslav <svetoslavganov@google.com> Fix app ops regressions introduced by the per UID policy change

1. Add a missing statement in the parsing code

2. Notify for all packages on UID ap op policy change

bug:22957162

Change-Id: Ic2bd5d07ef52be207e66b63ffe45fd8a456eb5a8
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
f3807aa57267117eba83cc2a3b13add59d4a251a 02-Aug-2015 Svet Ganov <svetoslavganov@google.com> Fix NPE in AppOpsService

bug:22802981

Change-Id: I73eee5ff9cf1603d8f30355554ef075aa14afd30
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
2af5708ab0e55fe68f1810cefdc6e3889233c186 30-Jul-2015 Svet Ganov <svetoslavganov@google.com> Add per UID control to app ops.

The app ops mananger service maintains a mapping from UID to
a list of packages where each package is mapped to a list of
non-default app op states (default states are inferred and
not stored). Hence, specifying the app op state for a UID
requires setting the app op for each package in the shared
UID.

This is problematic when installing new packages if there
is a non-default app op policy set for another already
installed package in the same UID as the app op for the new
package has to be updated to be in sync. The package installer
cannot do this as it is in another process and the app op
update will not be atomic. Therefore, the app ops manager
service has to support specifying app op policy on a per
UID basis.

We now have a UID state object that contains the per package
non-default app op states as well as the per uid non-default
app op states. If there is a UID policy specified then it
takes precedence over the per package one. Even further,
changing the uid policy updates the package policies in this
UID if the state is non-default. Changing a package app op
state also updates the app op state for the whole UID if
the per UID policy for this op is non-default. Clearing the
app op state for a package, clears the policy for the UID
as well.

bug:22802981

Change-Id: I78044906d9fcc6066abf07e706c2c88f3397d293
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
6ee871e59812fea4525c50231f677c4bd10c74b8 10-Jul-2015 Svet Ganov <svetoslavganov@google.com> Teach storage appops.

For modern apps targeting M SDK and up the external storage state
is deterined by granted permissions. For apps targeting older SDK
the storage access is determined by app ops correspning to the
storage permissions as the latter are always granted.

When app ops change we do not remount as we kill the app process
in both cases enabling and disabling an app op since legacy code
is not prepared for dynamic behavior where an operation that failed
may next succeed. Hence, we remount when we start the app.

For modern apps we don't kill the app process on a permission
grant, therefore we synchronously remount the app storage.

bug:22104923

Change-Id: I601c19c764a74c2d15bea6630d0f5fdc52bf6a5a
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
99b6043dad9d215cf15810b885b6b8c215dd5b5a 27-Jun-2015 Svet Ganov <svetoslavganov@google.com> Teach receivers, activities, providers, and services app ops.

Perform app op check in addition to the permisison check for all four
paltform components - activities, content providers, broadcast receivers,
services - if they are guarded by a permssion that has an associated app
op. This ensures that legacy apps will behave correctly if the permission
of the caller has been revoked, i.e. the app op for that permission was
disabled.

bug:22199666

Change-Id: Ia22d1c38d58b3cd6aabdc655cb7c7bddd85da7a2
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
3853611f77997fd7670163afdc8d9f546dfba566 19-May-2015 Svet Ganov <svetoslavganov@google.com> Clear binder identity before dispatching ap op mode changes.

bug:21078841

Change-Id: I409b739bbda10542142c8aac1522ad49882f5ec5
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
9e9e2e73c6ec7bece20268196dc89ad0c8bafad4 08-May-2015 Wojciech Staszkiewicz <staszkiewicz@google.com> Pass charset to XmlPullParser.setInput instead of null

Passing null to XmlPullParser.setInput forces it to do additional
work, which can be easily avoided if we know the charset beforehand.

bug: b/20849543

Change-Id: Iaff97be9df2d0f99d7af8f19f65934439c9658e2
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
b9d71a6f89b1183f6389b1774652445a420c6cbf 30-Apr-2015 Svet Ganov <svetoslavganov@google.com> Add body sensors app op - framework base

Change-Id: Idd5cd573fab3405e5b2a6e51d2d9d115650826e9
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
33d3c53da021f0d044028860ace0f4ad817273f5 11-Feb-2015 Alex Klyubin <klyubin@google.com> resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp

Change-Id: Ic20b6c8851458483dd73a144bd5ae6e8d141e62a
b9f8a5204a1b0b3919fa921e858d04124c582828 03-Feb-2015 Alex Klyubin <klyubin@google.com> Move hidden ApplicationInfo flags into a separate field.

The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).

The new privateFlags field is not public API and should not be used
for flags that are public API.

The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.

NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.

Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
7b7c58b3842d47c4c8df4876e2e2248c58477d97 03-Dec-2014 Dianne Hackborn <hackbod@google.com> Work on issue #18572506: AppOps in-memory state is invalid after...

...uninstalling updates to a system app

Things seem to be working fine, however we were not as aggressive at
writing out the current state in this case as we probably should be.

Also introduce more features to the appops command, which are useful
for testing this.

Change-Id: I177a9cc0e16e98b76fee0d052d742e06842bb3f9
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
0fcef84cca23724c13ecfe775b90dec3614cc3e3 13-Sep-2014 Dianne Hackborn <hackbod@google.com> Fix issue #17479850: AppOpsManager.checkPackage() allows...

...root or shell to claim any package name

Re-arrange so checkPackage() doesn't go through the path where
the package name will be forced for root and shell uids.

Change-Id: I450cd6ac8148afd75b526724afdf46ab63de4c43
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
d6a98979b5d45fff1fa842932274517e999a59c2 04-Aug-2014 Alexandra Gherghina <alexgherghina@google.com> Fix resetAllModes call to act only on the calling user

This makes it consistent with other methods in different services.
Also fixes the Settigns bug referenced below.

Bug: 16727586
Change-Id: I0b8bcb248f621fcfa2cb12163caeec9eb8ff5b1c
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
401de1785eccc946ed6c35e9b7fccab92b2022af 25-Jul-2014 Julia Reynolds <juliacr@google.com> Remove the profile/device owner user restriction bypass.

Bug: 16566096

Change-Id: I4a56046df44d36d82edc64fc727e8cad5dc75382
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
b64afe17064f126eb782c42a238db65f080fc8f0 23-Jul-2014 Dianne Hackborn <hackbod@google.com> Further fix on issue #16013164

Dumb dumb dumb copy/paste error when moving the
uid checking up out of the function.

Change-Id: I01513ccd80750b724dbfa8d9d7d171819c6b959b
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
7b41467704f941b11af6aace3e40993afc7f6c6f 18-Jul-2014 John Spurlock <jspurlock@google.com> Zen mode filtering should use new usage constants.

Refactor stream-based calls to usage-based calls.

Bug:15279516
Change-Id: I3f7757d8123c14670e2ad5f8e6aa4e9803efe7ec
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
1c7c319bb89b9988bfd12afc3e8d89449fd163fc 26-Jun-2014 Jason Monk <jmonk@google.com> User restriction for disallowing window creation

Block any types of windows that could by used by apps to create
views on top of a locked app. This can be used by device admins
in conjunction with lock task mode.

Added a way for system (and priv apps) to bypass user restrictions
for specified op codes.

Bug: 15279535
Change-Id: I2381530ef6226a5bb32a99bb4030baafb39bf564
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
133b9df951c633a1f72b7e12f8aa9ee9d7da9db6 01-Jul-2014 Dianne Hackborn <hackbod@google.com> Fix issue #16013164: Externally Reported Moderate:

AppOpsService.setMode() allows setting mode for own uid without permission

Change-Id: Ic60a10f0e95f19658c61567826dff28b657efe73
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
f584f014dbb281727fccfea10bc9c2539a752f17 20-May-2014 Amith Yamasani <yamasani@google.com> Allow adding a user while still removing other users

When at the user limit, removing and adding a user causes a race
condition where the deleted user is still being removed and adding
another one fails.

This change excludes deleted users from the counting to compare
against the limit.

Also fix an ArrayIndexOutOfBounds recently introduced in AppOpsService.

Bug: 13282768
Change-Id: Ib79659e7604396583a280dbbc560b288a6d9051c
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
62062996dd256df8b575b2ba1f0bf97109c4e0ba 06-May-2014 Jason Monk <jmonk@google.com> Notify AppOpsService of UserRestrictions and Owners

This makes the DevicePolicyManagerService and UserManagerService
push the DeviceOwner/ProfileOwners and user restrictions on boot
as well as on any change.

This also adds a list of restrictions that allow any op to connected with
a user restriction such that it will return MODE_IGNORED when the user
restriction is present (except for the device/profile owner).

Change-Id: Id8a9591d8f04fe5ecebd95750d9010afc0cd786c
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
1af30c7ac480e5d335f267a3ac3b2e6c748ce240 10-Mar-2014 John Spurlock <jspurlock@google.com> Add stream-level suppression to vibrate/audio services.

- Add new audio restriction layer to app-ops. Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled. Restrictions
also support a whitelisted set of exempt package names.

- Add new audio stream-level checks to app-ops.

- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.

- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.

- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.

- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.

Change-Id: Ifae8952647202f728cf1c73e881452660c704678
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
6f357d3284a833cc50a990e14b39f389b8972254 16-Jan-2014 Jeff Brown <jeffbrown@google.com> Start untangling system server early bootstrapping.

Refactored SystemServer to get rid of a bunch of legacy cruft related
to how the ServerThread used to be started up.

Create system context first when system server starts. This removes
the tangled initialization order dependency that forced us to start
the activity manager service before most anything else.

Moved factory test related constants into the FactoryTest class.

Partially migrated Installer, ActivityManagerService, and
PowerManagerService to the new SystemService pattern. There's more
work to be done here, particularly around the lifecycle of the
power manager.

Bug: 12172368
Change-Id: Ia527dd56e3b3fd90f9eeb41289dbe044921230d4
/frameworks/base/services/core/java/com/android/server/AppOpsService.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/AppOpsService.java