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

Commit b416f47e authored by Michal Karpinski's avatar Michal Karpinski
Browse files

Whitelist NFC_UID to open activities from background

Bug: 123331369
Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Test: manual
Change-Id: I517a3b33bcc1dfdc8e8769385a76d2f7912fda9a
parent bf459562
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -907,7 +907,8 @@ class ActivityStarter {
            return false;
        }
        // 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
@@ -599,6 +599,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,