Cleaning up tooltip for ToggleFeaturePreferenceFragment
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: I781cdba1be7be0315de12cd57620521b40969aee
This commit is contained in:
@@ -296,6 +296,10 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
removeActionBarToggleSwitch();
|
||||
final boolean isTooltipWindowShowing = mTooltipWindow != null && mTooltipWindow.isShowing();
|
||||
if (isTooltipWindowShowing) {
|
||||
mTooltipWindow.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user