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

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

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

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


        if (targetOverlayable == null) {
        // 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"))) {
            return ActorState.MISSING_OVERLAYABLE;
            return ActorState.MISSING_OVERLAYABLE;
        }
        }


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