diff options
| author | Kiyoung Kim <kiyoungkim@google.com> | 2018-12-20 18:26:10 +0900 |
|---|---|---|
| committer | Kiyoung Kim <kiyoungkim@google.com> | 2019-01-21 14:57:25 +0900 |
| commit | 89052d92b3616e28d09e5a114643bf33818115e2 (patch) | |
| tree | 575baa0804290dc7a2fa1a6974b6baa215330d42 /core/java/android/view | |
| parent | db4ce8705911e36a36f0a2f36b8bf9e04d78a2d3 (diff) | |
Schematize Display system properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.
Bug: 117924132
Test: m -j
Change-Id: I4b49ed7e9b93c20855928ca61f9f128a0aa1d6d1
Merged-In: Id9bbb997669b05b6edb5307d561e766ead19abf1
Diffstat (limited to 'core/java/android/view')
| -rw-r--r-- | core/java/android/view/View.java | 12 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 3 |
2 files changed, 4 insertions, 11 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index f228773aebf2..efff6d617376 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -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; @@ -790,14 +790,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. * * @hide @@ -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. diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index fd11ef13f9ac..798401d87b5a 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -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)) { |
