Create tooltip for notifying auto-adding the font scaling tile

1. Add string for the content of tooltip.
2. Show the tooltip if needed: the tooltip will only be shown once when users change the font size from the Settings page for the first time.
3. Since the layout shown on the screen will be recreated after font size changes, we need to save the state of the tooltip popup window to check if we need to reshow it in displayPreference.

Bug: 269679768
Test: Manually - attach videos to the bug
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PreviewSizeSeekBarControllerTest
Change-Id: I1b6c5fdbd74c7a868cf42bd21d2cdb1052c0bbe6
diff --git a/src/com/android/settings/widget/LabeledSeekBarPreference.java b/src/com/android/settings/widget/LabeledSeekBarPreference.java
index 5d10116..6300bd3 100644
--- a/src/com/android/settings/widget/LabeledSeekBarPreference.java
+++ b/src/com/android/settings/widget/LabeledSeekBarPreference.java
@@ -63,6 +63,8 @@
     private OnPreferenceChangeListener mStopListener;
     private SeekBar.OnSeekBarChangeListener mSeekBarChangeListener;
 
+    private SeekBar mSeekBar;
+
     public LabeledSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr,
             int defStyleRes) {
 
@@ -104,6 +106,10 @@
                 com.android.internal.R.attr.seekBarPreferenceStyle), 0);
     }
 
+    public SeekBar getSeekbar() {
+        return mSeekBar;
+    }
+
     @Override
     public void onBindViewHolder(PreferenceViewHolder holder) {
         super.onBindViewHolder(holder);
@@ -133,19 +139,19 @@
         final boolean isValidTextResIdExist = mTextStartId > 0 || mTextEndId > 0;
         labelFrame.setVisibility(isValidTextResIdExist ? View.VISIBLE : View.GONE);
 
-        final SeekBar seekBar = (SeekBar) holder.findViewById(com.android.internal.R.id.seekbar);
+        mSeekBar = (SeekBar) holder.findViewById(com.android.internal.R.id.seekbar);
         if (mTickMarkId != 0) {
             final Drawable tickMark = getContext().getDrawable(mTickMarkId);
-            seekBar.setTickMark(tickMark);
+            mSeekBar.setTickMark(tickMark);
         }
 
         final ViewGroup iconStartFrame = (ViewGroup) holder.findViewById(R.id.icon_start_frame);
         final ImageView iconStartView = (ImageView) holder.findViewById(R.id.icon_start);
-        updateIconStartIfNeeded(iconStartFrame, iconStartView, seekBar);
+        updateIconStartIfNeeded(iconStartFrame, iconStartView, mSeekBar);
 
         final ViewGroup iconEndFrame = (ViewGroup) holder.findViewById(R.id.icon_end_frame);
         final ImageView iconEndView = (ImageView) holder.findViewById(R.id.icon_end);
-        updateIconEndIfNeeded(iconEndFrame, iconEndView, seekBar);
+        updateIconEndIfNeeded(iconEndFrame, iconEndView, mSeekBar);
     }
 
     public void setOnPreferenceChangeStopListener(OnPreferenceChangeListener listener) {