Merge "Schematize Display system properties"
This commit is contained in:
@@ -30,8 +30,7 @@ import android.icu.text.Edits;
|
|||||||
import android.icu.util.ULocale;
|
import android.icu.util.ULocale;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.SystemProperties;
|
import android.sysprop.DisplayProperties;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.style.AbsoluteSizeSpan;
|
import android.text.style.AbsoluteSizeSpan;
|
||||||
import android.text.style.AccessibilityClickableSpan;
|
import android.text.style.AccessibilityClickableSpan;
|
||||||
import android.text.style.AccessibilityURLSpan;
|
import android.text.style.AccessibilityURLSpan;
|
||||||
@@ -2001,7 +2000,7 @@ public class TextUtils {
|
|||||||
return ((locale != null && !locale.equals(Locale.ROOT)
|
return ((locale != null && !locale.equals(Locale.ROOT)
|
||||||
&& ULocale.forLocale(locale).isRightToLeft())
|
&& ULocale.forLocale(locale).isRightToLeft())
|
||||||
// If forcing into RTL layout mode, return RTL as default
|
// If forcing into RTL layout mode, return RTL as default
|
||||||
|| SystemProperties.getBoolean(Settings.Global.DEVELOPMENT_FORCE_RTL, false))
|
|| DisplayProperties.debug_force_rtl().orElse(false))
|
||||||
? View.LAYOUT_DIRECTION_RTL
|
? View.LAYOUT_DIRECTION_RTL
|
||||||
: View.LAYOUT_DIRECTION_LTR;
|
: View.LAYOUT_DIRECTION_LTR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ import android.os.Parcel;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.os.SystemProperties;
|
|
||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
|
import android.sysprop.DisplayProperties;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
@@ -789,14 +789,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
*/
|
*/
|
||||||
protected static final String VIEW_LOG_TAG = "View";
|
protected static final String VIEW_LOG_TAG = "View";
|
||||||
|
|
||||||
/**
|
|
||||||
* When set to true, apps will draw debugging information about their layouts.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final String DEBUG_LAYOUT_PROPERTY = "debug.layout";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When set to true, this view will save its attribute data.
|
* When set to true, this view will save its attribute data.
|
||||||
*
|
*
|
||||||
@@ -26855,7 +26847,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
/**
|
/**
|
||||||
* Show where the margins, bounds and layout bounds are for each view.
|
* Show where the margins, bounds and layout bounds are for each view.
|
||||||
*/
|
*/
|
||||||
boolean mDebugLayout = SystemProperties.getBoolean(DEBUG_LAYOUT_PROPERTY, false);
|
boolean mDebugLayout = DisplayProperties.debug_layout().orElse(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Point used to compute visible regions.
|
* Point used to compute visible regions.
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ import android.os.RemoteException;
|
|||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.os.SystemProperties;
|
import android.os.SystemProperties;
|
||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
|
import android.sysprop.DisplayProperties;
|
||||||
import android.util.AndroidRuntimeException;
|
import android.util.AndroidRuntimeException;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -6829,7 +6830,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Layout debugging
|
// Layout debugging
|
||||||
boolean layout = SystemProperties.getBoolean(View.DEBUG_LAYOUT_PROPERTY, false);
|
boolean layout = DisplayProperties.debug_layout().orElse(false);
|
||||||
if (layout != mAttachInfo.mDebugLayout) {
|
if (layout != mAttachInfo.mDebugLayout) {
|
||||||
mAttachInfo.mDebugLayout = layout;
|
mAttachInfo.mDebugLayout = layout;
|
||||||
if (!mHandler.hasMessages(MSG_INVALIDATE_WORLD)) {
|
if (!mHandler.hasMessages(MSG_INVALIDATE_WORLD)) {
|
||||||
|
|||||||
@@ -365,6 +365,7 @@ import android.provider.Downloads;
|
|||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.service.voice.IVoiceInteractionSession;
|
import android.service.voice.IVoiceInteractionSession;
|
||||||
import android.service.voice.VoiceInteractionManagerInternal;
|
import android.service.voice.VoiceInteractionManagerInternal;
|
||||||
|
import android.sysprop.DisplayProperties;
|
||||||
import android.sysprop.VoldProperties;
|
import android.sysprop.VoldProperties;
|
||||||
import android.telecom.TelecomManager;
|
import android.telecom.TelecomManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -14937,8 +14938,8 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY);
|
mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY);
|
||||||
mHiddenApiBlacklist.registerObserver();
|
mHiddenApiBlacklist.registerObserver();
|
||||||
|
|
||||||
// Transfer any global setting for forcing RTL layout, into a System Property
|
// Transfer any global setting for forcing RTL layout, into a Display Property
|
||||||
SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0");
|
DisplayProperties.debug_force_rtl(forceRtl);
|
||||||
|
|
||||||
final Configuration configuration = new Configuration();
|
final Configuration configuration = new Configuration();
|
||||||
Settings.System.getConfiguration(resolver, configuration);
|
Settings.System.getConfiguration(resolver, configuration);
|
||||||
|
|||||||
Reference in New Issue
Block a user