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
|
||||
public void onDestroy() {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
final boolean isTooltipWindowShowing = mTooltipWindow != null && mTooltipWindow.isShowing();
|
||||
if (isTooltipWindowShowing) {
|
||||
mTooltipWindow.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user