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

Commit d2cd2b64 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Revert "Use snapshot API to avoid locks."" into main

parents 6d37135e 82792ad8
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -2892,10 +2892,13 @@ public class PackageManagerService implements PackageSender, TestUtilityService

    private void notifyPackageUseInternal(String packageName, int reason) {
        long time = System.currentTimeMillis();
        this.commitPackageStateMutation(null, mutator -> {
            final PackageStateWrite state = mutator.forPackage(packageName);
            state.setLastPackageUsageTime(reason, time);
        });
        synchronized (mLock) {
            final PackageSetting pkgSetting = mSettings.getPackageLPr(packageName);
            if (pkgSetting == null) {
                return;
            }
            pkgSetting.getPkgState().setLastPackageUsageTimeInMills(reason, time);
        }
    }

    /*package*/ DexManager getDexManager() {