Merge "Schematize Display system properties"
am: db5c59214f
Change-Id: I363f989b8259adccc86c85708e64fcb05222e6fc
This commit is contained in:
@@ -30,8 +30,7 @@ import android.icu.text.Edits;
|
||||
import android.icu.util.ULocale;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemProperties;
|
||||
import android.provider.Settings;
|
||||
import android.sysprop.DisplayProperties;
|
||||
import android.text.style.AbsoluteSizeSpan;
|
||||
import android.text.style.AccessibilityClickableSpan;
|
||||
import android.text.style.AccessibilityURLSpan;
|
||||
@@ -2001,7 +2000,7 @@ public class TextUtils {
|
||||
return ((locale != null && !locale.equals(Locale.ROOT)
|
||||
&& ULocale.forLocale(locale).isRightToLeft())
|
||||
// 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_LTR;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.sysprop.DisplayProperties;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
@@ -789,14 +789,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*/
|
||||
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.
|
||||
*
|
||||
@@ -26855,7 +26847,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
/**
|
||||
* 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.
|
||||
|
||||
@@ -70,6 +70,7 @@ import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.sysprop.DisplayProperties;
|
||||
import android.util.AndroidRuntimeException;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
@@ -6829,7 +6830,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
}
|
||||
|
||||
// Layout debugging
|
||||
boolean layout = SystemProperties.getBoolean(View.DEBUG_LAYOUT_PROPERTY, false);
|
||||
boolean layout = DisplayProperties.debug_layout().orElse(false);
|
||||
if (layout != mAttachInfo.mDebugLayout) {
|
||||
mAttachInfo.mDebugLayout = layout;
|
||||
if (!mHandler.hasMessages(MSG_INVALIDATE_WORLD)) {
|
||||
|
||||
@@ -365,6 +365,7 @@ import android.provider.Downloads;
|
||||
import android.provider.Settings;
|
||||
import android.service.voice.IVoiceInteractionSession;
|
||||
import android.service.voice.VoiceInteractionManagerInternal;
|
||||
import android.sysprop.DisplayProperties;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.telecom.TelecomManager;
|
||||
import android.text.TextUtils;
|
||||
@@ -14937,8 +14938,8 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY);
|
||||
mHiddenApiBlacklist.registerObserver();
|
||||
|
||||
// Transfer any global setting for forcing RTL layout, into a System Property
|
||||
SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0");
|
||||
// Transfer any global setting for forcing RTL layout, into a Display Property
|
||||
DisplayProperties.debug_force_rtl(forceRtl);
|
||||
|
||||
final Configuration configuration = new Configuration();
|
||||
Settings.System.getConfiguration(resolver, configuration);
|
||||
|
||||
Reference in New Issue
Block a user