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

Commit 18026642 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Sigh, safe mode.

There are still system internals making assumptions about component
details always being available when requested directly, so relax this
even further to only filter resolve results.

Bug: 27165374
Change-Id: I216fd362516064741e9b80636b99e2d0477d4a58
parent 7549a9a8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -3340,11 +3340,6 @@ public class PackageManagerService extends IPackageManager.Stub {
                    + " with flags 0x" + Integer.toHexString(flags), new Throwable());
        }
        // Safe mode means we shouldn't match any third-party components
        if (mSafeMode) {
            flags |= PackageManager.MATCH_SYSTEM_ONLY;
        }
        return updateFlags(flags, userId);
    }
@@ -3352,6 +3347,11 @@ public class PackageManagerService extends IPackageManager.Stub {
     * Update given flags when being used to request {@link ResolveInfo}.
     */
    int updateFlagsForResolve(int flags, int userId, Object cookie) {
        // Safe mode means we shouldn't match any third-party components
        if (mSafeMode) {
            flags |= PackageManager.MATCH_SYSTEM_ONLY;
        }
        return updateFlagsForComponent(flags, userId, cookie);
    }