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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user