Split dump and annotate users of mPackages lock

Split the dump() command between PMS and Settings.

Try to annotate all users of the mPackages lock in preparation for
switch to reader/writer lock.

Also mark some locals final as I was reading through the usage of the
synchronization on mPackages.

Change-Id: Ia7add63e835e67156edf886f98acebe50cc41f70
This commit is contained in:
Kenny Root
2011-03-23 11:00:15 -07:00
parent cf0b38ca6e
commit 447106fc83
3 changed files with 1362 additions and 1128 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -177,25 +177,25 @@ class PackageSettingBase extends GrantedPermissions {
installStatus = base.installStatus;
}
boolean enableComponentLP(String componentClassName) {
boolean enableComponentLPw(String componentClassName) {
boolean changed = disabledComponents.remove(componentClassName);
changed |= enabledComponents.add(componentClassName);
return changed;
}
boolean disableComponentLP(String componentClassName) {
boolean disableComponentLPw(String componentClassName) {
boolean changed = enabledComponents.remove(componentClassName);
changed |= disabledComponents.add(componentClassName);
return changed;
}
boolean restoreComponentLP(String componentClassName) {
boolean restoreComponentLPw(String componentClassName) {
boolean changed = enabledComponents.remove(componentClassName);
changed |= disabledComponents.remove(componentClassName);
return changed;
}
int currentEnabledStateLP(String componentName) {
int getCurrentEnabledStateLPr(String componentName) {
if (enabledComponents.contains(componentName)) {
return COMPONENT_ENABLED_STATE_ENABLED;
} else if (disabledComponents.contains(componentName)) {

File diff suppressed because it is too large Load Diff