Cleaning up tooltip for AccessibilityQuickSettingsPrimarySwitchPreferenceController
Cleaning up QS tile tooltip in the Settings page in onDestroy to avoid leaking the window. Bug: 279547549 Test: manually check only one tooltip exists Change-Id: I13e94ce549e19fd54c9034f3b3372ecf40388e39
This commit is contained in:
@@ -66,6 +66,10 @@ public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceControlle
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
mHandler.removeCallbacksAndMessages(null);
|
mHandler.removeCallbacksAndMessages(null);
|
||||||
|
final boolean isTooltipWindowShowing = mTooltipWindow != null && mTooltipWindow.isShowing();
|
||||||
|
if (isTooltipWindowShowing) {
|
||||||
|
mTooltipWindow.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user