Loading services/core/java/com/android/server/am/PendingIntentRecord.java +4 −11 Original line number Diff line number Diff line Loading @@ -19,9 +19,11 @@ package com.android.server.am; import static android.app.ActivityManager.PROCESS_STATE_TOP; import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_COMPAT; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE; import static android.os.Process.ROOT_UID; import static android.os.Process.SYSTEM_UID; Loading Loading @@ -366,17 +368,6 @@ public final class PendingIntentRecord extends IIntentSender.Stub { requiredPermission, null, null, 0, 0, 0, options); } /** * Return true if the activity options allows PendingIntent to use caller's BAL permission. */ public static boolean isPendingIntentBalAllowedByPermission( @Nullable ActivityOptions activityOptions) { if (activityOptions == null) { return false; } return activityOptions.isPendingIntentBackgroundActivityLaunchAllowedByPermission(); } /** * Return the {@link BackgroundStartPrivileges} the activity options grant the PendingIntent to * use caller's BAL permission. Loading Loading @@ -404,6 +395,8 @@ public final class PendingIntentRecord extends IIntentSender.Stub { return BackgroundStartPrivileges.NONE; case MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED: return getDefaultBackgroundStartPrivileges(callingUid, callingPackage); case MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS: case MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE: case MODE_BACKGROUND_ACTIVITY_START_ALLOWED: case MODE_BACKGROUND_ACTIVITY_START_COMPAT: default: Loading Loading
services/core/java/com/android/server/am/PendingIntentRecord.java +4 −11 Original line number Diff line number Diff line Loading @@ -19,9 +19,11 @@ package com.android.server.am; import static android.app.ActivityManager.PROCESS_STATE_TOP; import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_COMPAT; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED; import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE; import static android.os.Process.ROOT_UID; import static android.os.Process.SYSTEM_UID; Loading Loading @@ -366,17 +368,6 @@ public final class PendingIntentRecord extends IIntentSender.Stub { requiredPermission, null, null, 0, 0, 0, options); } /** * Return true if the activity options allows PendingIntent to use caller's BAL permission. */ public static boolean isPendingIntentBalAllowedByPermission( @Nullable ActivityOptions activityOptions) { if (activityOptions == null) { return false; } return activityOptions.isPendingIntentBackgroundActivityLaunchAllowedByPermission(); } /** * Return the {@link BackgroundStartPrivileges} the activity options grant the PendingIntent to * use caller's BAL permission. Loading Loading @@ -404,6 +395,8 @@ public final class PendingIntentRecord extends IIntentSender.Stub { return BackgroundStartPrivileges.NONE; case MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED: return getDefaultBackgroundStartPrivileges(callingUid, callingPackage); case MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS: case MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE: case MODE_BACKGROUND_ACTIVITY_START_ALLOWED: case MODE_BACKGROUND_ACTIVITY_START_COMPAT: default: Loading