Loading core/java/android/content/res/Configuration.java +9 −2 Original line number Diff line number Diff line Loading @@ -786,10 +786,14 @@ public final class Configuration implements Parcelable, Comparable<Configuration // 2 most significant bits in screenLayout). setLayoutDirection(locale); } if (delta.screenLayout != 0 && screenLayout != delta.screenLayout) { changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; setLayoutDirection(locale); } if (delta.userSetLocale && (!userSetLocale || ((changed & ActivityInfo.CONFIG_LOCALE) != 0))) { userSetLocale = true; changed |= ActivityInfo.CONFIG_LOCALE; userSetLocale = true; } if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) { Loading Loading @@ -933,6 +937,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration changed |= ActivityInfo.CONFIG_LOCALE; changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; } if (delta.screenLayout != 0 && screenLayout != delta.screenLayout) { changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; } if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) { changed |= ActivityInfo.CONFIG_TOUCHSCREEN; Loading core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -5661,6 +5661,12 @@ public final class Settings { */ public static final String SELINUX_STATUS = "selinux_status"; /** * Developer setting to force RTL layout. * @hide */ public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading core/java/android/text/TextUtils.java +6 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.text; import android.content.res.Resources; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.provider.Settings; import android.text.style.AbsoluteSizeSpan; import android.text.style.AlignmentSpan; import android.text.style.BackgroundColorSpan; Loading Loading @@ -1743,8 +1745,10 @@ public class TextUtils { return View.LAYOUT_DIRECTION_RTL; } } return View.LAYOUT_DIRECTION_LTR; // If forcing into RTL layout mode, return RTL as default, else LTR return SystemProperties.getBoolean(Settings.Global.DEVELOPMENT_FORCE_RTL, false) ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR; } /** Loading services/java/com/android/server/am/ActivityManagerService.java +8 −0 Original line number Diff line number Diff line Loading @@ -8453,9 +8453,17 @@ public final class ActivityManagerService extends ActivityManagerNative resolver, Settings.Global.WAIT_FOR_DEBUGGER, 0) != 0; boolean alwaysFinishActivities = Settings.Global.getInt( resolver, Settings.Global.ALWAYS_FINISH_ACTIVITIES, 0) != 0; boolean forceRtl = Settings.Global.getInt( resolver, Settings.Global.DEVELOPMENT_FORCE_RTL, 0) != 0; // Transfer any global setting for forcing RTL layout, into a System Property SystemProperties.set(Settings.Global.DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); Configuration configuration = new Configuration(); Settings.System.getConfiguration(resolver, configuration); if (forceRtl) { // This will take care of setting the correct layout direction flags configuration.setLayoutDirection(configuration.locale); } synchronized (this) { mDebugApp = mOrigDebugApp = debugApp; Loading Loading
core/java/android/content/res/Configuration.java +9 −2 Original line number Diff line number Diff line Loading @@ -786,10 +786,14 @@ public final class Configuration implements Parcelable, Comparable<Configuration // 2 most significant bits in screenLayout). setLayoutDirection(locale); } if (delta.screenLayout != 0 && screenLayout != delta.screenLayout) { changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; setLayoutDirection(locale); } if (delta.userSetLocale && (!userSetLocale || ((changed & ActivityInfo.CONFIG_LOCALE) != 0))) { userSetLocale = true; changed |= ActivityInfo.CONFIG_LOCALE; userSetLocale = true; } if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) { Loading Loading @@ -933,6 +937,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration changed |= ActivityInfo.CONFIG_LOCALE; changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; } if (delta.screenLayout != 0 && screenLayout != delta.screenLayout) { changed |= ActivityInfo.CONFIG_LAYOUT_DIRECTION; } if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) { changed |= ActivityInfo.CONFIG_TOUCHSCREEN; Loading
core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -5661,6 +5661,12 @@ public final class Settings { */ public static final String SELINUX_STATUS = "selinux_status"; /** * Developer setting to force RTL layout. * @hide */ public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading
core/java/android/text/TextUtils.java +6 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.text; import android.content.res.Resources; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.provider.Settings; import android.text.style.AbsoluteSizeSpan; import android.text.style.AlignmentSpan; import android.text.style.BackgroundColorSpan; Loading Loading @@ -1743,8 +1745,10 @@ public class TextUtils { return View.LAYOUT_DIRECTION_RTL; } } return View.LAYOUT_DIRECTION_LTR; // If forcing into RTL layout mode, return RTL as default, else LTR return SystemProperties.getBoolean(Settings.Global.DEVELOPMENT_FORCE_RTL, false) ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR; } /** Loading
services/java/com/android/server/am/ActivityManagerService.java +8 −0 Original line number Diff line number Diff line Loading @@ -8453,9 +8453,17 @@ public final class ActivityManagerService extends ActivityManagerNative resolver, Settings.Global.WAIT_FOR_DEBUGGER, 0) != 0; boolean alwaysFinishActivities = Settings.Global.getInt( resolver, Settings.Global.ALWAYS_FINISH_ACTIVITIES, 0) != 0; boolean forceRtl = Settings.Global.getInt( resolver, Settings.Global.DEVELOPMENT_FORCE_RTL, 0) != 0; // Transfer any global setting for forcing RTL layout, into a System Property SystemProperties.set(Settings.Global.DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); Configuration configuration = new Configuration(); Settings.System.getConfiguration(resolver, configuration); if (forceRtl) { // This will take care of setting the correct layout direction flags configuration.setLayoutDirection(configuration.locale); } synchronized (this) { mDebugApp = mOrigDebugApp = debugApp; Loading