Loading services/core/java/com/android/server/compat/PlatformCompat.java +13 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.Manifest.permission.LOG_COMPAT_CHANGE; import static android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG; import static android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.Process.SYSTEM_UID; import android.annotation.UserIdInt; import android.app.ActivityManager; Loading Loading @@ -329,6 +330,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeLogPermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(LOG_COMPAT_CHANGE) != PERMISSION_GRANTED) { throw new SecurityException("Cannot log compat change usage"); Loading @@ -336,6 +341,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeReadPermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(READ_COMPAT_CHANGE_CONFIG) != PERMISSION_GRANTED) { throw new SecurityException("Cannot read compat change"); Loading @@ -343,6 +352,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeOverridePermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(OVERRIDE_COMPAT_CHANGE_CONFIG) != PERMISSION_GRANTED) { throw new SecurityException("Cannot override compat change"); Loading Loading
services/core/java/com/android/server/compat/PlatformCompat.java +13 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.Manifest.permission.LOG_COMPAT_CHANGE; import static android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG; import static android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.Process.SYSTEM_UID; import android.annotation.UserIdInt; import android.app.ActivityManager; Loading Loading @@ -329,6 +330,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeLogPermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(LOG_COMPAT_CHANGE) != PERMISSION_GRANTED) { throw new SecurityException("Cannot log compat change usage"); Loading @@ -336,6 +341,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeReadPermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(READ_COMPAT_CHANGE_CONFIG) != PERMISSION_GRANTED) { throw new SecurityException("Cannot read compat change"); Loading @@ -343,6 +352,10 @@ public class PlatformCompat extends IPlatformCompat.Stub { } private void checkCompatChangeOverridePermission() throws SecurityException { // Don't check for permissions within the system process if (Binder.getCallingUid() == SYSTEM_UID) { return; } if (mContext.checkCallingOrSelfPermission(OVERRIDE_COMPAT_CHANGE_CONFIG) != PERMISSION_GRANTED) { throw new SecurityException("Cannot override compat change"); Loading