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

Commit a420f387 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "[res] Allow changing RRO state that target android"" into main

parents e7c0dc32 40abed43
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.server.om;
import android.annotation.NonNull;
import android.content.om.OverlayInfo;
import android.content.om.OverlayableInfo;
import android.content.res.Flags;
import android.net.Uri;
import android.os.Process;
import android.text.TextUtils;
@@ -163,15 +162,11 @@ public class OverlayActorEnforcer {
            return ActorState.UNABLE_TO_GET_TARGET_OVERLAYABLE;
        }

        // Framework doesn't have <overlayable> declaration by design, and we still want to be able
        // to enable its overlays from the packages with the permission.
        if (targetOverlayable == null
                && !(Flags.rroControlForAndroidNoOverlayable() && targetPackageName.equals(
                "android"))) {
        if (targetOverlayable == null) {
            return ActorState.MISSING_OVERLAYABLE;
        }

        final String actor = targetOverlayable == null ? null : targetOverlayable.actor;
        String actor = targetOverlayable.actor;
        if (TextUtils.isEmpty(actor)) {
            // If there's no actor defined, fallback to the legacy permission check
            try {