summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Xiaowen Lei <xilei@google.com> 2023-04-14 18:09:14 -0700
committer Xiaowen Lei <xilei@google.com> 2023-04-14 18:22:29 -0700
commitfa365ee4be111dfa88c6899a837dd5c4f5a3a9fe (patch)
tree982f24e97fa6375e78188f0104fc8d1d4cd1b2f6
parent1be684590b24d84222a2674c167ce1147d7ac68e (diff)
Update startPendingIntent to have a `View v` function parameter.
The `View v` parameter can be used to construct a custom ActivityOptions for launching animations. No behavior change. Bug: 274104981 Test: N/A; passing existing tests. Change-Id: I26f1f4c967a153697d4a6e38ea3a14b441c47bb5
-rw-r--r--packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt6
3 files changed, 13 insertions, 5 deletions
diff --git a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
index e0d01845562f..1811c02d549d 100644
--- a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
+++ b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
@@ -187,7 +187,7 @@ public interface BcSmartspaceDataPlugin extends Plugin {
if (action.getIntent() != null) {
startIntent(v, action.getIntent(), showOnLockscreen);
} else if (action.getPendingIntent() != null) {
- startPendingIntent(action.getPendingIntent(), showOnLockscreen);
+ startPendingIntent(v, action.getPendingIntent(), showOnLockscreen);
}
} catch (ActivityNotFoundException e) {
Log.w(TAG, "Could not launch intent for action: " + action, e);
@@ -199,7 +199,7 @@ public interface BcSmartspaceDataPlugin extends Plugin {
if (action.getIntent() != null) {
startIntent(v, action.getIntent(), showOnLockscreen);
} else if (action.getPendingIntent() != null) {
- startPendingIntent(action.getPendingIntent(), showOnLockscreen);
+ startPendingIntent(v, action.getPendingIntent(), showOnLockscreen);
}
} catch (ActivityNotFoundException e) {
Log.w(TAG, "Could not launch intent for action: " + action, e);
@@ -210,6 +210,6 @@ public interface BcSmartspaceDataPlugin extends Plugin {
void startIntent(View v, Intent i, boolean showOnLockscreen);
/** Start the PendingIntent */
- void startPendingIntent(PendingIntent pi, boolean showOnLockscreen);
+ void startPendingIntent(View v, PendingIntent pi, boolean showOnLockscreen);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt b/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt
index 26149321946d..ba9d13d57a74 100644
--- a/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt
+++ b/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt
@@ -75,7 +75,11 @@ interface SmartspaceViewComponent {
)
}
- override fun startPendingIntent(pi: PendingIntent, showOnLockscreen: Boolean) {
+ override fun startPendingIntent(
+ view: View,
+ pi: PendingIntent,
+ showOnLockscreen: Boolean
+ ) {
if (showOnLockscreen) {
pi.send()
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
index 826e28955afc..950dbd9300b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
@@ -353,7 +353,11 @@ constructor(
}
}
- override fun startPendingIntent(pi: PendingIntent, showOnLockscreen: Boolean) {
+ override fun startPendingIntent(
+ view: View,
+ pi: PendingIntent,
+ showOnLockscreen: Boolean
+ ) {
if (showOnLockscreen) {
pi.send()
} else {