Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.Optional; Loading Loading @@ -247,6 +248,9 @@ public class BubbleController implements ConfigurationChangeListener, /** Saved font scale, used to detect font size changes in {@link #onConfigurationChanged}. */ private float mFontScale = 0; /** Saved locale, used to detect local changes in {@link #onConfigurationChanged}. */ private Locale mLocale = null; /** Saved direction, used to detect layout direction changes @link #onConfigChanged}. */ private int mLayoutDirection = View.LAYOUT_DIRECTION_UNDEFINED; Loading Loading @@ -1068,6 +1072,11 @@ public class BubbleController implements ConfigurationChangeListener, mLayoutDirection = newConfig.getLayoutDirection(); mStackView.onLayoutDirectionChanged(mLayoutDirection); } Locale newLocale = newConfig.locale; if (newLocale != null && !newLocale.equals(mLocale)) { mLocale = newLocale; mStackView.updateLocale(); } } } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +9 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,15 @@ public class BubbleExpandedView extends LinearLayout { } } void updateLocale() { if (mManageButton != null) { mManageButton.setText(mContext.getString(R.string.manage_bubbles_text)); } if (mOverflowView != null) { mOverflowView.updateLocale(); } } void applyThemeAttrs() { final TypedArray ta = mContext.obtainStyledAttributes(new int[]{ android.R.attr.dialogCornerRadius, Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflowContainerView.java +5 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,11 @@ public class BubbleOverflowContainerView extends LinearLayout { mEmptyStateSubtitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } public void updateLocale() { mEmptyStateTitle.setText(mContext.getString(R.string.bubble_overflow_empty_title)); mEmptyStateSubtitle.setText(mContext.getString(R.string.bubble_overflow_empty_subtitle)); } private final BubbleData.Listener mDataListener = new BubbleData.Listener() { @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +6 −0 Original line number Diff line number Diff line Loading @@ -1452,6 +1452,12 @@ public class BubbleStackView extends FrameLayout } } void updateLocale() { if (mBubbleOverflow != null && mBubbleOverflow.getExpandedView() != null) { mBubbleOverflow.getExpandedView().updateLocale(); } } private void updateOverflow() { mBubbleOverflow.update(); mBubbleContainer.reorderView(mBubbleOverflow.getIconView(), Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.Optional; Loading Loading @@ -247,6 +248,9 @@ public class BubbleController implements ConfigurationChangeListener, /** Saved font scale, used to detect font size changes in {@link #onConfigurationChanged}. */ private float mFontScale = 0; /** Saved locale, used to detect local changes in {@link #onConfigurationChanged}. */ private Locale mLocale = null; /** Saved direction, used to detect layout direction changes @link #onConfigChanged}. */ private int mLayoutDirection = View.LAYOUT_DIRECTION_UNDEFINED; Loading Loading @@ -1068,6 +1072,11 @@ public class BubbleController implements ConfigurationChangeListener, mLayoutDirection = newConfig.getLayoutDirection(); mStackView.onLayoutDirectionChanged(mLayoutDirection); } Locale newLocale = newConfig.locale; if (newLocale != null && !newLocale.equals(mLocale)) { mLocale = newLocale; mStackView.updateLocale(); } } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +9 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,15 @@ public class BubbleExpandedView extends LinearLayout { } } void updateLocale() { if (mManageButton != null) { mManageButton.setText(mContext.getString(R.string.manage_bubbles_text)); } if (mOverflowView != null) { mOverflowView.updateLocale(); } } void applyThemeAttrs() { final TypedArray ta = mContext.obtainStyledAttributes(new int[]{ android.R.attr.dialogCornerRadius, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflowContainerView.java +5 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,11 @@ public class BubbleOverflowContainerView extends LinearLayout { mEmptyStateSubtitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } public void updateLocale() { mEmptyStateTitle.setText(mContext.getString(R.string.bubble_overflow_empty_title)); mEmptyStateSubtitle.setText(mContext.getString(R.string.bubble_overflow_empty_subtitle)); } private final BubbleData.Listener mDataListener = new BubbleData.Listener() { @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +6 −0 Original line number Diff line number Diff line Loading @@ -1452,6 +1452,12 @@ public class BubbleStackView extends FrameLayout } } void updateLocale() { if (mBubbleOverflow != null && mBubbleOverflow.getExpandedView() != null) { mBubbleOverflow.getExpandedView().updateLocale(); } } private void updateOverflow() { mBubbleOverflow.update(); mBubbleContainer.reorderView(mBubbleOverflow.getIconView(), Loading