Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db5c5921 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Schematize Display system properties"

parents 190ff745 89052d92
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
    }
+2 −10
Original line number Diff line number Diff line
@@ -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.
+2 −1
Original line number Diff line number Diff line
@@ -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)) {
+3 −2
Original line number Diff line number Diff line
@@ -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);