Merge changes I75d810e4,I50111f0c into udc-qpr-dev
* changes: Doing null check before generating Extra Dim tooltip Doing null check before generating Font Size tooltip
This commit is contained in:
@@ -130,10 +130,17 @@ public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceControlle
|
||||
return;
|
||||
}
|
||||
|
||||
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(mContext);
|
||||
mTooltipWindow.setup(getTileTooltipContent(),
|
||||
R.drawable.accessibility_auto_added_qs_tooltip_illustration);
|
||||
mTooltipWindow.showAtTopCenter(mPreference.getSwitch());
|
||||
// TODO (287728819): Move tooltip showing to SystemUI
|
||||
// Since the lifecycle of controller is independent of that of the preference, doing
|
||||
// null check on switch is a temporary solution for the case that switch view
|
||||
// is not ready when we would like to show the tooltip. If the switch is not ready,
|
||||
// we give up showing the tooltip and also do not reshow it in the future.
|
||||
if (mPreference.getSwitch() != null) {
|
||||
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(mContext);
|
||||
mTooltipWindow.setup(getTileTooltipContent(),
|
||||
R.drawable.accessibility_auto_added_qs_tooltip_illustration);
|
||||
mTooltipWindow.showAtTopCenter(mPreference.getSwitch());
|
||||
}
|
||||
AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
|
||||
mNeedsQSTooltipReshow = false;
|
||||
}
|
||||
|
@@ -213,11 +213,19 @@ abstract class PreviewSizeSeekBarController extends BasePreferenceController imp
|
||||
return;
|
||||
}
|
||||
|
||||
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(mContext);
|
||||
mTooltipWindow.setup(getTileTooltipContent(),
|
||||
R.drawable.accessibility_auto_added_qs_tooltip_illustration);
|
||||
mTooltipWindow.showAtTopCenter(mSeekBarPreference.getSeekbar());
|
||||
AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
|
||||
// TODO (287728819): Move tooltip showing to SystemUI
|
||||
// Since the lifecycle of controller is independent of that of the preference, doing
|
||||
// null check on seekbar is a temporary solution for the case that seekbar view
|
||||
// is not ready when we would like to show the tooltip. If the seekbar is not ready,
|
||||
// we give up showing the tooltip and also do not reshow it in the future.
|
||||
if (mSeekBarPreference.getSeekbar() != null) {
|
||||
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(mContext);
|
||||
mTooltipWindow.setup(getTileTooltipContent(),
|
||||
R.drawable.accessibility_auto_added_qs_tooltip_illustration);
|
||||
mTooltipWindow.showAtTopCenter(mSeekBarPreference.getSeekbar());
|
||||
}
|
||||
AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext,
|
||||
tileComponentName);
|
||||
mNeedsQSTooltipReshow = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user