Merge "Opt in SysUI code to allow BAL" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
863329a87c
@@ -162,7 +162,11 @@ class DetailDialog(
|
|||||||
broadcastSender.closeSystemDialogs()
|
broadcastSender.closeSystemDialogs()
|
||||||
// not sent as interactive, lest the higher-importance activity launch
|
// not sent as interactive, lest the higher-importance activity launch
|
||||||
// be impacted
|
// be impacted
|
||||||
pendingIntent.send()
|
val options = ActivityOptions.makeBasic()
|
||||||
|
.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
.toBundle()
|
||||||
|
pendingIntent.send(options)
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
if (keyguardStateController.isUnlocked()) {
|
if (keyguardStateController.isUnlocked()) {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.systemui.controls.ui
|
package com.android.systemui.controls.ui
|
||||||
|
|
||||||
|
import android.app.ActivityOptions
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
@@ -74,7 +75,11 @@ class StatusBehavior : Behavior {
|
|||||||
R.string.controls_open_app,
|
R.string.controls_open_app,
|
||||||
DialogInterface.OnClickListener { dialog, _ ->
|
DialogInterface.OnClickListener { dialog, _ ->
|
||||||
try {
|
try {
|
||||||
cws.control?.getAppIntent()?.send()
|
val options = ActivityOptions.makeBasic()
|
||||||
|
.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
.toBundle()
|
||||||
|
cws.control?.getAppIntent()?.send(options)
|
||||||
context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS))
|
context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS))
|
||||||
} catch (e: PendingIntent.CanceledException) {
|
} catch (e: PendingIntent.CanceledException) {
|
||||||
cvh.setErrorStatus()
|
cvh.setErrorStatus()
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.android.systemui.smartspace.dagger
|
package com.android.systemui.smartspace.dagger
|
||||||
|
|
||||||
|
import android.app.ActivityOptions
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@@ -81,7 +82,11 @@ interface SmartspaceViewComponent {
|
|||||||
showOnLockscreen: Boolean
|
showOnLockscreen: Boolean
|
||||||
) {
|
) {
|
||||||
if (showOnLockscreen) {
|
if (showOnLockscreen) {
|
||||||
pi.send()
|
val options = ActivityOptions.makeBasic()
|
||||||
|
.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
.toBundle()
|
||||||
|
pi.send(options)
|
||||||
} else {
|
} else {
|
||||||
activityStarter.startPendingIntentDismissingKeyguard(pi)
|
activityStarter.startPendingIntentDismissingKeyguard(pi)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.systemui.statusbar.lockscreen
|
package com.android.systemui.statusbar.lockscreen
|
||||||
|
|
||||||
|
import android.app.ActivityOptions
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.app.smartspace.SmartspaceConfig
|
import android.app.smartspace.SmartspaceConfig
|
||||||
import android.app.smartspace.SmartspaceManager
|
import android.app.smartspace.SmartspaceManager
|
||||||
@@ -358,7 +359,11 @@ constructor(
|
|||||||
showOnLockscreen: Boolean
|
showOnLockscreen: Boolean
|
||||||
) {
|
) {
|
||||||
if (showOnLockscreen) {
|
if (showOnLockscreen) {
|
||||||
pi.send()
|
val options = ActivityOptions.makeBasic()
|
||||||
|
.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
.toBundle()
|
||||||
|
pi.send(options)
|
||||||
} else {
|
} else {
|
||||||
activityStarter.postStartActivityDismissingKeyguard(pi)
|
activityStarter.postStartActivityDismissingKeyguard(pi)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -572,6 +572,9 @@ constructor(
|
|||||||
// TODO b/221255671: restrict this to only be set for
|
// TODO b/221255671: restrict this to only be set for
|
||||||
// notifications
|
// notifications
|
||||||
options.isEligibleForLegacyPermissionPrompt = true
|
options.isEligibleForLegacyPermissionPrompt = true
|
||||||
|
options.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
|
||||||
|
)
|
||||||
return intent.sendAndReturnResult(
|
return intent.sendAndReturnResult(
|
||||||
null,
|
null,
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -307,6 +307,8 @@ public class WalletView extends FrameLayout implements WalletCardCarousel.OnCard
|
|||||||
|
|
||||||
BroadcastOptions options = BroadcastOptions.makeBasic();
|
BroadcastOptions options = BroadcastOptions.makeBasic();
|
||||||
options.setInteractive(true);
|
options.setInteractive(true);
|
||||||
|
options.setPendingIntentBackgroundActivityStartMode(
|
||||||
|
BroadcastOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
|
||||||
walletCard.getPendingIntent().send(options.toBundle());
|
walletCard.getPendingIntent().send(options.toBundle());
|
||||||
} catch (PendingIntent.CanceledException e) {
|
} catch (PendingIntent.CanceledException e) {
|
||||||
Log.w(TAG, "Error sending pending intent for wallet card.");
|
Log.w(TAG, "Error sending pending intent for wallet card.");
|
||||||
|
|||||||
Reference in New Issue
Block a user