Loading core/java/android/app/PendingIntent.java +14 −0 Original line number Diff line number Diff line Loading @@ -832,6 +832,20 @@ public final class PendingIntent implements Parcelable { send(context, code, intent, null, null, null, null); } /** * Perform the operation associated with this PendingIntent, supplying additional * options for the operation. * * @param options Additional options the caller would like to provide to modify the * sending behavior. May be built from an {@link ActivityOptions} to apply to an * activity start. * * @hide */ public void send(Bundle options) throws CanceledException { send(null, 0, null, null, null, null, options); } /** * Perform the operation associated with this PendingIntent, allowing the * caller to be notified when the send has completed. Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActionsPanelPlugin.java +4 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.plugins; import android.annotation.Nullable; import android.app.BroadcastOptions; import android.app.PendingIntent; import android.graphics.drawable.Drawable; import android.view.View; Loading Loading @@ -70,7 +71,9 @@ public interface GlobalActionsPanelPlugin extends Plugin { /** Starts a PendingIntent, dismissing the keyguard if necessary. */ default void startPendingIntentDismissingKeyguard(PendingIntent pendingIntent) { try { pendingIntent.send(); BroadcastOptions options = BroadcastOptions.makeBasic(); options.setInteractive(true); pendingIntent.send(options.toBundle()); } catch (PendingIntent.CanceledException e) { // no-op } Loading packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,8 @@ class DetailDialog( // Remove the task explicitly, since onRelease() callback will be executed after // startActivity() below is called. broadcastSender.closeSystemDialogs() // not sent as interactive, lest the higher-importance activity launch // be impacted pendingIntent.send() false } Loading packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt +4 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.media.controls.pipeline import android.app.BroadcastOptions import android.app.Notification import android.app.Notification.EXTRA_SUBSTITUTE_APP_NAME import android.app.PendingIntent Loading Loading @@ -1149,7 +1150,9 @@ class MediaDataManager( private fun sendPendingIntent(intent: PendingIntent): Boolean { return try { intent.send() val options = BroadcastOptions.makeBasic() options.setInteractive(true) intent.send(options.toBundle()) true } catch (e: PendingIntent.CanceledException) { Log.d(TAG, "Intent canceled", e) Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java +6 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.systemui.media.controls.models.recommendation.Smartspa import android.animation.Animator; import android.animation.AnimatorInflater; import android.animation.AnimatorSet; import android.app.BroadcastOptions; import android.app.PendingIntent; import android.app.WallpaperColors; import android.app.smartspace.SmartspaceAction; Loading Loading @@ -113,6 +114,8 @@ import com.android.systemui.util.ColorUtilKt; import com.android.systemui.util.animation.TransitionLayout; import com.android.systemui.util.time.SystemClock; import dagger.Lazy; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; Loading @@ -120,7 +123,6 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import dagger.Lazy; import kotlin.Unit; /** Loading Loading @@ -621,7 +623,9 @@ public class MediaControlPanel { device.getIntent().getIntent(), true); } else { try { device.getIntent().send(); BroadcastOptions options = BroadcastOptions.makeBasic(); options.setInteractive(true); device.getIntent().send(options.toBundle()); } catch (PendingIntent.CanceledException e) { Log.e(TAG, "Device pending intent was canceled"); } Loading Loading
core/java/android/app/PendingIntent.java +14 −0 Original line number Diff line number Diff line Loading @@ -832,6 +832,20 @@ public final class PendingIntent implements Parcelable { send(context, code, intent, null, null, null, null); } /** * Perform the operation associated with this PendingIntent, supplying additional * options for the operation. * * @param options Additional options the caller would like to provide to modify the * sending behavior. May be built from an {@link ActivityOptions} to apply to an * activity start. * * @hide */ public void send(Bundle options) throws CanceledException { send(null, 0, null, null, null, null, options); } /** * Perform the operation associated with this PendingIntent, allowing the * caller to be notified when the send has completed. Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActionsPanelPlugin.java +4 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.plugins; import android.annotation.Nullable; import android.app.BroadcastOptions; import android.app.PendingIntent; import android.graphics.drawable.Drawable; import android.view.View; Loading Loading @@ -70,7 +71,9 @@ public interface GlobalActionsPanelPlugin extends Plugin { /** Starts a PendingIntent, dismissing the keyguard if necessary. */ default void startPendingIntentDismissingKeyguard(PendingIntent pendingIntent) { try { pendingIntent.send(); BroadcastOptions options = BroadcastOptions.makeBasic(); options.setInteractive(true); pendingIntent.send(options.toBundle()); } catch (PendingIntent.CanceledException e) { // no-op } Loading
packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,8 @@ class DetailDialog( // Remove the task explicitly, since onRelease() callback will be executed after // startActivity() below is called. broadcastSender.closeSystemDialogs() // not sent as interactive, lest the higher-importance activity launch // be impacted pendingIntent.send() false } Loading
packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt +4 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.media.controls.pipeline import android.app.BroadcastOptions import android.app.Notification import android.app.Notification.EXTRA_SUBSTITUTE_APP_NAME import android.app.PendingIntent Loading Loading @@ -1149,7 +1150,9 @@ class MediaDataManager( private fun sendPendingIntent(intent: PendingIntent): Boolean { return try { intent.send() val options = BroadcastOptions.makeBasic() options.setInteractive(true) intent.send(options.toBundle()) true } catch (e: PendingIntent.CanceledException) { Log.d(TAG, "Intent canceled", e) Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java +6 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.systemui.media.controls.models.recommendation.Smartspa import android.animation.Animator; import android.animation.AnimatorInflater; import android.animation.AnimatorSet; import android.app.BroadcastOptions; import android.app.PendingIntent; import android.app.WallpaperColors; import android.app.smartspace.SmartspaceAction; Loading Loading @@ -113,6 +114,8 @@ import com.android.systemui.util.ColorUtilKt; import com.android.systemui.util.animation.TransitionLayout; import com.android.systemui.util.time.SystemClock; import dagger.Lazy; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; Loading @@ -120,7 +123,6 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import dagger.Lazy; import kotlin.Unit; /** Loading Loading @@ -621,7 +623,9 @@ public class MediaControlPanel { device.getIntent().getIntent(), true); } else { try { device.getIntent().send(); BroadcastOptions options = BroadcastOptions.makeBasic(); options.setInteractive(true); device.getIntent().send(options.toBundle()); } catch (PendingIntent.CanceledException e) { Log.e(TAG, "Device pending intent was canceled"); } Loading