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

Commit 7c090cd8 authored by Songchun Fan's avatar Songchun Fan Committed by Automerger Merge Worker
Browse files

Merge "[pm] fix acquireAndRegisterNewAppId after app removal" into tm-dev am: 663a7ae5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16992064

Change-Id: I4a7243d151939560cdbd0a01eb7f8daa61b84421
parents 858e5c12 663a7ae5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ public final class Settings implements Watchable, Snappable {
        int[] excludedUserIds;
    }

    private static int mFirstAvailableUid = 0;
    private static int mFirstAvailableUid = Process.FIRST_APPLICATION_UID;

    /** Map from volume UUID to {@link VersionInfo} */
    @Watched
@@ -4275,7 +4275,7 @@ public final class Settings implements Watchable, Snappable {
    private int acquireAndRegisterNewAppIdLPw(SettingBase obj) {
        // Let's be stupidly inefficient for now...
        final int size = mAppIds.size();
        for (int i = mFirstAvailableUid; i < size; i++) {
        for (int i = mFirstAvailableUid - Process.FIRST_APPLICATION_UID; i < size; i++) {
            if (mAppIds.get(i) == null) {
                mAppIds.set(i, obj);
                return Process.FIRST_APPLICATION_UID + i;