Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 290d241b authored by Candice Lo's avatar Candice Lo Committed by Android (Google) Code Review
Browse files

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
parents 87d6681e 48999d38
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -130,10 +130,17 @@ public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceControlle
            return;
            return;
        }
        }


        // 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 = new AccessibilityQuickSettingsTooltipWindow(mContext);
            mTooltipWindow.setup(getTileTooltipContent(),
            mTooltipWindow.setup(getTileTooltipContent(),
                    R.drawable.accessibility_auto_added_qs_tooltip_illustration);
                    R.drawable.accessibility_auto_added_qs_tooltip_illustration);
            mTooltipWindow.showAtTopCenter(mPreference.getSwitch());
            mTooltipWindow.showAtTopCenter(mPreference.getSwitch());
        }
        AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
        AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
        mNeedsQSTooltipReshow = false;
        mNeedsQSTooltipReshow = false;
    }
    }
+13 −5
Original line number Original line Diff line number Diff line
@@ -213,11 +213,19 @@ abstract class PreviewSizeSeekBarController extends BasePreferenceController imp
            return;
            return;
        }
        }


        // 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 = new AccessibilityQuickSettingsTooltipWindow(mContext);
            mTooltipWindow.setup(getTileTooltipContent(),
            mTooltipWindow.setup(getTileTooltipContent(),
                    R.drawable.accessibility_auto_added_qs_tooltip_illustration);
                    R.drawable.accessibility_auto_added_qs_tooltip_illustration);
            mTooltipWindow.showAtTopCenter(mSeekBarPreference.getSeekbar());
            mTooltipWindow.showAtTopCenter(mSeekBarPreference.getSeekbar());
        AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
        }
        AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext,
                tileComponentName);
        mNeedsQSTooltipReshow = false;
        mNeedsQSTooltipReshow = false;
    }
    }