summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
diff options
context:
space:
mode:
authorShashwat Razdan <srazdan@google.com>2021-04-14 23:39:10 +0000
committerShashwat Razdan <srazdan@google.com>2021-04-20 08:06:25 +0000
commit8c63ca65814af72f660dcf84075aba68148c883e (patch)
tree4761e5f23d1dc4e561403f550c8f1ff0bb07f172 /packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
parentad6ad2644135478bf3de7f3335ac44e290d88b48 (diff)
Addressing the feedback received in the API review.
API Review bugs list is here: https://b.corp.google.com/issues?q=blockingid:176851064 Test: CTS tests: Fixes:185226923 Fixes:185226755 Fixes:185226674 Fixes:185226597 Fixes:185226790 Fixes:184585058 Fixes:184585080 Fixes:184585117 Fixes:184585343 Fixes:184585079 Change-Id: Idacee5f95ce104d1fb6de40a04ac2b74691f977e
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index e7418e6a1619..96421f3a4981 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -86,7 +86,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private FrameLayout mLargeClockFrame;
private SmartspaceSession mSmartspaceSession;
- private SmartspaceSession.Callback mSmartspaceCallback;
+ private SmartspaceSession.OnTargetsAvailableListener mSmartspaceCallback;
private float mDozeAmount;
private int mWallpaperTextColor;
private int mDozeColor = Color.WHITE;
@@ -234,7 +234,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
.createSmartspaceSession(
new SmartspaceConfig.Builder(getContext(), "lockscreen").build());
mSmartspaceCallback = targets -> smartspaceDataPlugin.onTargetsAvailable(targets);
- mSmartspaceSession.registerSmartspaceUpdates(mUiExecutor, mSmartspaceCallback);
+ mSmartspaceSession.addOnTargetsAvailableListener(mUiExecutor, mSmartspaceCallback);
mSmartspaceSession.requestSmartspaceUpdate();
}
}
@@ -261,8 +261,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
mView.setClockPlugin(null, mStatusBarStateController.getState());
if (mSmartspaceSession != null) {
- mSmartspaceSession.unregisterSmartspaceUpdates(mSmartspaceCallback);
- mSmartspaceSession.destroy();
+ mSmartspaceSession.removeOnTargetsAvailableListener(mSmartspaceCallback);
+ mSmartspaceSession.close();
mSmartspaceSession = null;
}
mStatusBarStateController.removeCallback(mStatusBarStateListener);