Loading services/core/java/com/android/server/am/PendingIntentController.java +14 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NA import android.annotation.Nullable; import android.app.Activity; import android.app.ActivityManagerInternal; import android.app.ActivityOptions; import android.app.AppGlobals; import android.app.PendingIntent; import android.app.PendingIntentStats; Loading Loading @@ -126,6 +127,18 @@ public class PendingIntentController { } } Bundle.setDefusable(bOptions, true); ActivityOptions opts = ActivityOptions.fromBundle(bOptions); if (opts != null && opts.getPendingIntentBackgroundActivityStartMode() != ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { Slog.wtf(TAG, "Resetting option setPendingIntentBackgroundActivityStartMode(" + opts.getPendingIntentBackgroundActivityStartMode() + ") to SYSTEM_DEFINED from the options provided by the pending " + "intent creator (" + packageName + ") because this option is meant for the pending intent sender"); opts.setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED); } final boolean noCreate = (flags & PendingIntent.FLAG_NO_CREATE) != 0; final boolean cancelCurrent = (flags & PendingIntent.FLAG_CANCEL_CURRENT) != 0; Loading @@ -135,7 +148,7 @@ public class PendingIntentController { PendingIntentRecord.Key key = new PendingIntentRecord.Key(type, packageName, featureId, token, resultWho, requestCode, intents, resolvedTypes, flags, SafeActivityOptions.fromBundle(bOptions), userId); new SafeActivityOptions(opts), userId); WeakReference<PendingIntentRecord> ref; ref = mIntentSenderRecords.get(key); PendingIntentRecord rec = ref != null ? ref.get() : null; Loading services/core/java/com/android/server/am/PendingIntentRecord.java +14 −0 Original line number Diff line number Diff line Loading @@ -457,6 +457,20 @@ public final class PendingIntentRecord extends IIntentSender.Stub { // can specify a consistent launch mode even if the PendingIntent is immutable final ActivityOptions opts = ActivityOptions.fromBundle(options); if (opts != null) { if (opts.getPendingIntentCreatorBackgroundActivityStartMode() != ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { Slog.wtf(TAG, "Resetting option " + "setPendingIntentCreatorBackgroundActivityStartMode(" + opts.getPendingIntentCreatorBackgroundActivityStartMode() + ") to SYSTEM_DEFINED from the options provided by the " + "pending intent sender (" + key.packageName + ") because this option is meant for the pending intent " + "creator"); opts.setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED); } finalIntent.addFlags(opts.getPendingIntentLaunchFlags()); } Loading Loading
services/core/java/com/android/server/am/PendingIntentController.java +14 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NA import android.annotation.Nullable; import android.app.Activity; import android.app.ActivityManagerInternal; import android.app.ActivityOptions; import android.app.AppGlobals; import android.app.PendingIntent; import android.app.PendingIntentStats; Loading Loading @@ -126,6 +127,18 @@ public class PendingIntentController { } } Bundle.setDefusable(bOptions, true); ActivityOptions opts = ActivityOptions.fromBundle(bOptions); if (opts != null && opts.getPendingIntentBackgroundActivityStartMode() != ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { Slog.wtf(TAG, "Resetting option setPendingIntentBackgroundActivityStartMode(" + opts.getPendingIntentBackgroundActivityStartMode() + ") to SYSTEM_DEFINED from the options provided by the pending " + "intent creator (" + packageName + ") because this option is meant for the pending intent sender"); opts.setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED); } final boolean noCreate = (flags & PendingIntent.FLAG_NO_CREATE) != 0; final boolean cancelCurrent = (flags & PendingIntent.FLAG_CANCEL_CURRENT) != 0; Loading @@ -135,7 +148,7 @@ public class PendingIntentController { PendingIntentRecord.Key key = new PendingIntentRecord.Key(type, packageName, featureId, token, resultWho, requestCode, intents, resolvedTypes, flags, SafeActivityOptions.fromBundle(bOptions), userId); new SafeActivityOptions(opts), userId); WeakReference<PendingIntentRecord> ref; ref = mIntentSenderRecords.get(key); PendingIntentRecord rec = ref != null ? ref.get() : null; Loading
services/core/java/com/android/server/am/PendingIntentRecord.java +14 −0 Original line number Diff line number Diff line Loading @@ -457,6 +457,20 @@ public final class PendingIntentRecord extends IIntentSender.Stub { // can specify a consistent launch mode even if the PendingIntent is immutable final ActivityOptions opts = ActivityOptions.fromBundle(options); if (opts != null) { if (opts.getPendingIntentCreatorBackgroundActivityStartMode() != ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { Slog.wtf(TAG, "Resetting option " + "setPendingIntentCreatorBackgroundActivityStartMode(" + opts.getPendingIntentCreatorBackgroundActivityStartMode() + ") to SYSTEM_DEFINED from the options provided by the " + "pending intent sender (" + key.packageName + ") because this option is meant for the pending intent " + "creator"); opts.setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED); } finalIntent.addFlags(opts.getPendingIntentLaunchFlags()); } Loading