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

Commit 883ddab0 authored by Jayachandran C's avatar Jayachandran C
Browse files

Protect shell overriding the carrier config

Bug: 441823943
Flag: EXEMPT Bugfix
Test: Manually verified the scenario and all telephony and telecom CTS are verified

Change-Id: I7662a98ad19fe37fd77ca3a3325d09a666be0ff9
parent 3bd6739d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -923,4 +923,13 @@ public final class TelephonyPermissions {
        return UserHandle.isSameApp(uid, Process.ROOT_UID) || UserHandle.isSameApp(uid,
                Process.SHELL_UID);
    }


    /**
     * @return true if the specified {@code uid} is for a SHELL process, no matter if runs
     * as system user or not.
     */
    public static boolean isShell(int uid) {
        return UserHandle.isSameApp(uid, Process.SHELL_UID);
    }
}