648 @Override
649 protected void onConfigurationChanged(Configuration newConfig) {
650 final Locale locale = mContext.getResources().getConfiguration().locale;
651 final int ld = TextUtils.getLayoutDirectionFromLocale(locale);
652 final float fontScale = newConfig.fontScale;
653
654 if (! locale.equals(mLocale)
|| ld != mLayoutDirection
|| fontScale != mFontScale) {
655 if (DEBUG) {
656 Log.v(TAG, String.format(
657 "config changed locale/LD: %s (%d) -> %s (%d)", mLocale, mLayoutDirection,
658 locale, ld));
659 }
660 mLocale = locale;
661 mLayoutDirection = ld;
662 refreshLayout(ld);
663 }
664 }