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

Commit 6149b0fa 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.
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
parent 0f06d061
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -781,6 +781,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 STATS_MANAGER = "stats";
    field public static final java.lang.String SYSTEM_UPDATE_SERVICE = "system_update";
    field public static final java.lang.String VR_SERVICE = "vrmanager";
+10 −0
Original line number Diff line number Diff line
@@ -4169,6 +4169,16 @@ public abstract class Context {
     */
    public static final String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";

    /**
     * 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
@@ -157,6 +157,12 @@ public class Process {
     */
    public static final int INCIDENTD_UID = 1067;

    /**
     * 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
@@ -87,6 +87,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;
@@ -20725,6 +20726,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
@@ -441,6 +441,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;
    // Suffix used during package installation when copying/moving
    // package apks to install directory.
@@ -2408,6 +2409,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) {