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

Commit f7e1e16b authored by Gabriele M's avatar Gabriele M Committed by Dan Pasanen
Browse files

PackageManager: Always let UID 0 start FallbackHome

com.android.settings/.FallbackHome is started at the end of the boot
process, before the UI is setup. If com.android.settings is protected
FallbackHome can't start and it's not possible to manually give it the
permission to start. Fix this allowing UID 0 start FallbackHome even
if com.android.settings is protected.

BUGBASH-103

Change-Id: I92bab937c387f9360de833be6779198a508914fe
parent d17b69e2
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -771,6 +771,9 @@ public class PackageManagerService extends IPackageManager.Stub {
    private UserManagerInternal mUserManagerInternal;
    private static final ComponentName FALLBACK_HOME_COMPONENT = new ComponentName(
            "com.android.settings", "com.android.settings.FallbackHome");
    private static class IFVerificationParams {
        PackageParser.Package pkg;
        boolean replacing;
@@ -20946,6 +20949,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
            return false;
        }
        // FallbackHome is started on boot. If we block it, we will never finish booting
        if (callingUid == Process.ROOT_UID && FALLBACK_HOME_COMPONENT.equals(componentName)) {
            if (DEBUG_PROTECTED) Log.d(TAG, "Letting callinguid " + Process.ROOT_UID +
                    " start " + componentName.flattenToShortString());
            return false;
        }
        String packageName = componentName.getPackageName();
        String className = componentName.getClassName();