Loading packages/SystemUI/multivalentTests/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepositoryTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ class AmbientCueRepositoryTest : SysuiTestCase() { val action: ActionModel = actions!!.first() action.onPerformAction() runCurrent() verify(pendingIntent).send() verify(pendingIntent).send(any<Bundle>()) } @Test Loading packages/SystemUI/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepository.kt +16 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ package com.android.systemui.ambientcue.data.repository import android.app.ActivityOptions import android.app.ActivityTaskManager import android.app.BroadcastOptions import android.app.PendingIntent import android.app.assist.ActivityId import android.app.smartspace.SmartspaceConfig import android.app.smartspace.SmartspaceManager Loading Loading @@ -148,7 +151,19 @@ constructor( activityId.taskId, ) } else if (pendingIntent != null) { pendingIntent.send() val options = BroadcastOptions.makeBasic() options.isInteractive = true options.pendingIntentBackgroundActivityStartMode = ActivityOptions .MODE_BACKGROUND_ACTIVITY_START_ALLOWED try { pendingIntent.send(options.toBundle()) } catch (e: PendingIntent.CanceledException) { Log.e( TAG, "pending intent of $pendingIntent was canceled", ) } } else if (intent != null) { activityStarter.startActivity(intent, false) } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepositoryTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ class AmbientCueRepositoryTest : SysuiTestCase() { val action: ActionModel = actions!!.first() action.onPerformAction() runCurrent() verify(pendingIntent).send() verify(pendingIntent).send(any<Bundle>()) } @Test Loading
packages/SystemUI/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepository.kt +16 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ package com.android.systemui.ambientcue.data.repository import android.app.ActivityOptions import android.app.ActivityTaskManager import android.app.BroadcastOptions import android.app.PendingIntent import android.app.assist.ActivityId import android.app.smartspace.SmartspaceConfig import android.app.smartspace.SmartspaceManager Loading Loading @@ -148,7 +151,19 @@ constructor( activityId.taskId, ) } else if (pendingIntent != null) { pendingIntent.send() val options = BroadcastOptions.makeBasic() options.isInteractive = true options.pendingIntentBackgroundActivityStartMode = ActivityOptions .MODE_BACKGROUND_ACTIVITY_START_ALLOWED try { pendingIntent.send(options.toBundle()) } catch (e: PendingIntent.CanceledException) { Log.e( TAG, "pending intent of $pendingIntent was canceled", ) } } else if (intent != null) { activityStarter.startActivity(intent, false) } Loading