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

Commit 36f8b83e authored by Hall Liu's avatar Hall Liu Committed by Android (Google) Code Review
Browse files

Merge "Expose OPSTR_READ_DEVICE_IDENTIFIERS"

parents 412d30ef 6b06a38e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -389,6 +389,7 @@ package android.app {
    field public static final String OPSTR_POST_NOTIFICATION = "android:post_notification";
    field public static final String OPSTR_PROJECT_MEDIA = "android:project_media";
    field public static final String OPSTR_READ_CLIPBOARD = "android:read_clipboard";
    field public static final String OPSTR_READ_DEVICE_IDENTIFIERS = "android:read_device_identifiers";
    field public static final String OPSTR_READ_ICC_SMS = "android:read_icc_sms";
    field public static final String OPSTR_READ_MEDIA_AUDIO = "android:read_media_audio";
    field public static final String OPSTR_READ_MEDIA_IMAGES = "android:read_media_images";
+1 −0
Original line number Diff line number Diff line
@@ -1159,6 +1159,7 @@ public class AppOpsManager {
    @SystemApi
    public static final String OPSTR_ACCESS_ACCESSIBILITY = "android:access_accessibility";
    /** @hide Read device identifiers */
    @SystemApi
    public static final String OPSTR_READ_DEVICE_IDENTIFIERS = "android:read_device_identifiers";
    /** @hide Query all packages on device */
    public static final String OPSTR_QUERY_ALL_PACKAGES = "android:query_all_packages";
+3 −3
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ public final class SmsApplication {
                < android.os.Process.FIRST_APPLICATION_UID) {
            return contextUserId;
        } else {
            return UserHandle.getUserId(callingUid);
            return UserHandle.getUserHandleForUid(callingUid).getIdentifier();
        }
    }

@@ -811,10 +811,10 @@ public final class SmsApplication {
                // This should never happen in prod -- unit tests will put the receiver into a
                // unusual state where the pending result is null, which produces a NPE when calling
                // getSendingUserId. Just pretend like it's the system user for testing.
                userId = UserHandle.USER_SYSTEM;
                userId = UserHandle.SYSTEM.getIdentifier();
            }
            Context userContext = mContext;
            if (userId != UserHandle.USER_SYSTEM) {
            if (userId != UserHandle.SYSTEM.getIdentifier()) {
                try {
                    userContext = mContext.createPackageContextAsUser(mContext.getPackageName(), 0,
                        UserHandle.of(userId));