Package manager optimizations.

Addresses:
Issue #2550648: PackageManagerService setComponentEnabledSetting unconditionally
writes Settings xml
Issue #2549084: Make PackageManager.addPermission have async version

Also make the writing of settings when changing the preferred activities to use
the same async mechanism, and fiddle with thread priorities in the background
thread to go up to foreground priority when holding the lock to write settings
and a few other places.  (At some point we should really clean this up to never
acquire the main lock while in the background.)

Change-Id: Ib2b7632543f6fb3f92a225518579f3b2d15e1413
This commit is contained in:
Dianne Hackborn
2010-03-30 10:42:20 -07:00
parent 22375e4a73
commit d7c096845d
6 changed files with 189 additions and 38 deletions

View File

@ -141,6 +141,11 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
@Override
public boolean addPermissionAsync(PermissionInfo info) {
throw new UnsupportedOperationException();
}
@Override
public void removePermission(String name) {
throw new UnsupportedOperationException();