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

Commit 291a7c6c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Whitelist NFC_UID to open activities from background"

parents fcaf4a24 b416f47e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -916,7 +916,8 @@ class ActivityStarter {
            PendingIntentRecord originatingPendingIntent, boolean allowBackgroundActivityStart,
            Intent intent) {
        // don't abort for the most important UIDs
        if (callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
        if (callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID
                || callingUid == Process.NFC_UID) {
            return false;
        }
        // don't abort if the callerApp has any visible activity
+4 −0
Original line number Diff line number Diff line
@@ -598,6 +598,10 @@ public class ActivityStarterTests extends ActivityTestsBase {
                Process.SYSTEM_UID, false, PROCESS_STATE_TOP + 1,
                UNIMPORTANT_UID2, false, PROCESS_STATE_TOP + 1,
                false, false, false);
        runAndVerifyBackgroundActivityStartsSubtest("disallowed_nfcUid_notAborted", false,
                Process.NFC_UID, false, PROCESS_STATE_TOP + 1,
                UNIMPORTANT_UID2, false, PROCESS_STATE_TOP + 1,
                false, false, false);
        runAndVerifyBackgroundActivityStartsSubtest(
                "disallowed_callingUidHasVisibleWindow_notAborted", false,
                UNIMPORTANT_UID, true, PROCESS_STATE_TOP + 1,