Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 447106fc authored by Kenny Root's avatar Kenny Root
Browse files

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
parent cf0b38ca
Loading
Loading
Loading
Loading
+925 −1002

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -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)) {
+427 −116

File changed.

Preview size limit exceeded, changes collapsed.