Merge "Fix 6485058: remove OnTriggerListeners from Wave*Methods in cleanup" into jb-dev
This commit is contained in:
@@ -129,6 +129,9 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
||||
|
||||
// Get the target position for the given resource. Returns -1 if not found.
|
||||
public int getTargetPosition(int resourceId);
|
||||
|
||||
// Clean up when this widget is going away
|
||||
public void cleanUp();
|
||||
}
|
||||
|
||||
class SlidingTabMethods implements SlidingTab.OnTriggerListener, UnlockWidgetCommonMethods {
|
||||
@@ -197,6 +200,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
||||
public int getTargetPosition(int resourceId) {
|
||||
return -1; // Not supported
|
||||
}
|
||||
|
||||
public void cleanUp() {
|
||||
mSlidingTab.setOnTriggerListener(null);
|
||||
}
|
||||
}
|
||||
|
||||
class WaveViewMethods implements WaveView.OnTriggerListener, UnlockWidgetCommonMethods {
|
||||
@@ -240,6 +247,9 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
||||
public int getTargetPosition(int resourceId) {
|
||||
return -1; // Not supported
|
||||
}
|
||||
public void cleanUp() {
|
||||
mWaveView.setOnTriggerListener(null);
|
||||
}
|
||||
}
|
||||
|
||||
private Intent getAssistIntent() {
|
||||
@@ -374,6 +384,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
||||
public int getTargetPosition(int resourceId) {
|
||||
return mMultiWaveView.getTargetPosition(resourceId);
|
||||
}
|
||||
|
||||
public void cleanUp() {
|
||||
mMultiWaveView.setOnTriggerListener(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void requestUnlockScreen() {
|
||||
@@ -592,6 +606,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
||||
public void cleanUp() {
|
||||
mUpdateMonitor.removeCallback(mInfoCallback); // this must be first
|
||||
mUpdateMonitor.removeCallback(mSimStateCallback);
|
||||
mUnlockWidgetMethods.cleanUp();
|
||||
mLockPatternUtils = null;
|
||||
mUpdateMonitor = null;
|
||||
mCallback = null;
|
||||
|
||||
Reference in New Issue
Block a user