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

Commit 82792ad8 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Revert "Use snapshot API to avoid locks."

This reverts commit 534ffa76.

Reason for revert: b/297142546

Change-Id: I3f004f102f58640e27202b9d0a9733c5ccefacfb
parent f353aecc
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() {