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

Commit 27c311d4 authored by Songchun Fan's avatar Songchun Fan Committed by Android (Google) Code Review
Browse files

Merge "[pm] revert lock changes for AppsFilter"

parents 3af224bb 04319f01
Loading
Loading
Loading
Loading
+4 −10
Original line number Original line Diff line number Diff line
@@ -500,17 +500,11 @@ public class AppsFilter implements Watchable, Snappable {
                forcedQueryablePackageNames[i] = forcedQueryablePackageNames[i].intern();
                forcedQueryablePackageNames[i] = forcedQueryablePackageNames[i].intern();
            }
            }
        }
        }
        final StateProvider stateProvider = new StateProvider() {
        final StateProvider stateProvider = command -> {
            // TODO: This lock and its handling should be owned by AppsFilter
            synchronized (injector.getLock()) {
            private final Object mLock = new Object();
                command.currentState(injector.getSettings().getPackagesLocked().untrackedStorage(),

            @Override
            public void runWithState(CurrentStateCallback command) {
                synchronized (mLock) {
                    command.currentState(pms.getPackageStates(),
                        injector.getUserManagerInternal().getUserInfos());
                        injector.getUserManagerInternal().getUserInfos());
            }
            }
            }
        };
        };
        AppsFilter appsFilter = new AppsFilter(stateProvider, featureConfig,
        AppsFilter appsFilter = new AppsFilter(stateProvider, featureConfig,
                forcedQueryablePackageNames, forceSystemAppsQueryable, null,
                forcedQueryablePackageNames, forceSystemAppsQueryable, null,