Merge "Use postStartActivityDismissingKeyguard when showOnLockscreen is false." into tm-qpr-dev

This commit is contained in:
Xiaowen Lei
2022-11-15 17:21:46 +00:00
committed by Android (Google) Code Review

View File

@@ -234,19 +234,24 @@ class LockscreenSmartspaceController @Inject constructor(
ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter { ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter {
override fun startIntent(view: View, intent: Intent, showOnLockscreen: Boolean) { override fun startIntent(view: View, intent: Intent, showOnLockscreen: Boolean) {
activityStarter.startActivity( if (showOnLockscreen) {
intent, activityStarter.startActivity(
true, /* dismissShade */ intent,
null, /* launch animator - looks bad with the transparent smartspace bg */ true, /* dismissShade */
showOnLockscreen // launch animator - looks bad with the transparent smartspace bg
) null,
true
)
} else {
activityStarter.postStartActivityDismissingKeyguard(intent, 0)
}
} }
override fun startPendingIntent(pi: PendingIntent, showOnLockscreen: Boolean) { override fun startPendingIntent(pi: PendingIntent, showOnLockscreen: Boolean) {
if (showOnLockscreen) { if (showOnLockscreen) {
pi.send() pi.send()
} else { } else {
activityStarter.startPendingIntentDismissingKeyguard(pi) activityStarter.postStartActivityDismissingKeyguard(pi)
} }
} }
}) })