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

Commit eef8c06c authored by Hai Zhang's avatar Hai Zhang
Browse files

Don't update default home before system is ready.

Finding preferred activity depends on settings provider, which might
not be available before this.

Fixes: 132645624
Test: presubmit
Change-Id: Idc72804b0216416fd1f362c74067a60558245379
parent d20761b1
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -20906,6 +20906,12 @@ public class PackageManagerService extends IPackageManager.Stub
            Slog.wtf(TAG, "Calling thread " + Thread.currentThread().getName()
            Slog.wtf(TAG, "Calling thread " + Thread.currentThread().getName()
                    + " is holding mPackages", new Throwable());
                    + " is holding mPackages", new Throwable());
        }
        }
        if (!mSystemReady) {
            // We might get called before system is ready because of package changes etc, but
            // finding preferred activity depends on settings provider, so we ignore the update
            // before that.
            return false;
        }
        final Intent intent = getHomeIntent();
        final Intent intent = getHomeIntent();
        final List<ResolveInfo> resolveInfos = queryIntentActivitiesInternal(intent, null,
        final List<ResolveInfo> resolveInfos = queryIntentActivitiesInternal(intent, null,
                PackageManager.GET_META_DATA, userId);
                PackageManager.GET_META_DATA, userId);