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

Commit 66e539d5 authored by Jayachandran C's avatar Jayachandran C Committed by Android (Google) Code Review
Browse files

Merge "Protect shell overriding the carrier config" into main

parents daea3713 883ddab0
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);
    }
}