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

Commit dcf4c6dc authored by Ruchi Kandoi's avatar Ruchi Kandoi
Browse files

Add UID and Service for Secure Element Application

Bug: 64994044
Test: Boot; Check Service loaded.
Merged-In: I2f48ff204acd29b1a9f6819910aba5f8f3762977
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
(cherry picked from commit dfaf4bdd1e7e12caf9bb69c8facc38e879861baf)
parent 65609651
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -697,6 +697,7 @@ package android.content {
    field public static final java.lang.String NETWORK_SCORE_SERVICE = "network_score";
    field public static final java.lang.String OEM_LOCK_SERVICE = "oem_lock";
    field public static final java.lang.String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
    field public static final java.lang.String SECURE_ELEMENT_SERVICE = "secure_element";
    field public static final java.lang.String VR_SERVICE = "vrmanager";
    field public static final java.lang.String WIFI_RTT_SERVICE = "rttmanager";
    field public static final java.lang.String WIFI_SCANNING_SERVICE = "wifiscanner";
+10 −0
Original line number Diff line number Diff line
@@ -4061,6 +4061,16 @@ public abstract class Context {
     */
    public static final String TIME_ZONE_RULES_MANAGER_SERVICE = "timezone";

    /**
     * Use with {@link #getSystemService} to retrieve a
     * {@link android.se.omapi.ISecureElementService}
     * for accessing the SecureElementService.
     *
     * @hide
     */
    @SystemApi
    public static final String SECURE_ELEMENT_SERVICE = "secure_element";

    /**
     * Determine whether the given permission is allowed for a particular
     * process and user ID running in the system.
+6 −0
Original line number Diff line number Diff line
@@ -151,6 +151,12 @@ public class Process {
     */
    public static final int OTA_UPDATE_UID = 1061;

    /**
     * Defines the UID/GID for the Secure Element service process.
     * @hide
     */
    public static final int SE_UID = 1068;

    /** {@hide} */
    public static final int NOBODY_UID = 9999;

+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ import static android.os.Process.ROOT_UID;
import static android.os.Process.SCHED_FIFO;
import static android.os.Process.SCHED_OTHER;
import static android.os.Process.SCHED_RESET_ON_FORK;
import static android.os.Process.SE_UID;
import static android.os.Process.SHELL_UID;
import static android.os.Process.SIGNAL_QUIT;
import static android.os.Process.SIGNAL_USR1;
@@ -19258,6 +19259,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            case PHONE_UID:
            case BLUETOOTH_UID:
            case NFC_UID:
            case SE_UID:
                isCallerSystem = true;
                break;
            default:
+3 −0
Original line number Diff line number Diff line
@@ -426,6 +426,7 @@ public class PackageManagerService extends IPackageManager.Stub
    private static final int NFC_UID = Process.NFC_UID;
    private static final int BLUETOOTH_UID = Process.BLUETOOTH_UID;
    private static final int SHELL_UID = Process.SHELL_UID;
    private static final int SE_UID = Process.SE_UID;
    // Cap the size of permission trees that 3rd party apps can define
    private static final int MAX_PERMISSION_TREE_FOOTPRINT = 32768;     // characters of text
@@ -2436,6 +2437,8 @@ public class PackageManagerService extends IPackageManager.Stub
                ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
        mSettings.addSharedUserLPw("android.uid.shell", SHELL_UID,
                ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
        mSettings.addSharedUserLPw("android.uid.se", SE_UID,
                ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
        String separateProcesses = SystemProperties.get("debug.separate_processes");
        if (separateProcesses != null && separateProcesses.length() > 0) {