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

Commit 31a7d438 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [7424319, 7424320, 7423808, 7423309, 7424300, 7424301,...

Merge cherrypicks of [7424319, 7424320, 7423808, 7423309, 7424300, 7424301, 7423809, 7423810, 7424574, 7423811, 7423812, 7423813, 7424594, 7424595, 7424596, 7424597, 7424598, 7423471, 7423472, 7423473, 7424614, 7424615, 7424616, 7423311, 7423507, 7424575] into qt-release

Change-Id: Ia21ffb96c92e4f73a63d927a244f1eb19f743c8d
parents 02351afb 2ecc7bb3
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -1226,6 +1226,10 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
     * are set.
     */
    private void updateBackgroundDrawable() {
        // Background insets can be null if super constructor calls setBackgroundDrawable.
        if (mBackgroundInsets == null) {
            mBackgroundInsets = Insets.NONE;
        }
        if (mBackgroundInsets.equals(mLastBackgroundInsets)
                && mLastOriginalBackgroundDrawable == mOriginalBackgroundDrawable) {
            return;
@@ -1549,10 +1553,14 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
            return;
        }

        setPadding(mFramePadding.left + mBackgroundPadding.left,
                mFramePadding.top + mBackgroundPadding.top,
                mFramePadding.right + mBackgroundPadding.right,
                mFramePadding.bottom + mBackgroundPadding.bottom);
        // Fields can be null if super constructor calls setBackgroundDrawable.
        Rect framePadding = mFramePadding != null ? mFramePadding : new Rect();
        Rect backgroundPadding = mBackgroundPadding != null ? mBackgroundPadding : new Rect();

        setPadding(framePadding.left + backgroundPadding.left,
                framePadding.top + backgroundPadding.top,
                framePadding.right + backgroundPadding.right,
                framePadding.bottom + backgroundPadding.bottom);
        requestLayout();
        invalidate();

@@ -1572,8 +1580,8 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
            if (bg != null) {
                if (fg == null) {
                    opacity = bg.getOpacity();
                } else if (mFramePadding.left <= 0 && mFramePadding.top <= 0
                        && mFramePadding.right <= 0 && mFramePadding.bottom <= 0) {
                } else if (framePadding.left <= 0 && framePadding.top <= 0
                        && framePadding.right <= 0 && framePadding.bottom <= 0) {
                    // If the frame padding is zero, then we can be opaque
                    // if either the frame -or- the background is opaque.
                    int fop = fg.getOpacity();
+6 −0
Original line number Diff line number Diff line
@@ -229,4 +229,10 @@

    <!-- Default for Settings.Secure.AWARE_ENABLED -->
    <bool name="def_aware_enabled">false</bool>

    <!-- Default for Settings.Secure.SKIP_GESTURE -->
    <bool name="def_skip_gesture">false</bool>

    <!-- Default for Settings.Secure.SILENCE_GESTURE -->
    <bool name="def_silence_gesture">false</bool>
</resources>
+32 −1
Original line number Diff line number Diff line
@@ -3237,7 +3237,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 178;
            private static final int SETTINGS_VERSION = 179;

            private final int mUserId;

@@ -4356,6 +4356,37 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 178;
                }

                if (currentVersion == 178) {
                    // Version 178: Set the default value for Secure Settings:
                    // SKIP_GESTURE & SILENCE_GESTURE

                    final SettingsState secureSettings = getSecureSettingsLocked(userId);

                    final Setting skipGesture = secureSettings.getSettingLocked(
                            Secure.SKIP_GESTURE);

                    if (skipGesture.isNull()) {
                        final boolean defSkipGesture = getContext().getResources().getBoolean(
                                R.bool.def_skip_gesture);
                        secureSettings.insertSettingLocked(
                                Secure.SKIP_GESTURE, defSkipGesture ? "1" : "0",
                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
                    }

                    final Setting silenceGesture = secureSettings.getSettingLocked(
                            Secure.SILENCE_GESTURE);

                    if (silenceGesture.isNull()) {
                        final boolean defSilenceGesture = getContext().getResources().getBoolean(
                                R.bool.def_silence_gesture);
                        secureSettings.insertSettingLocked(
                                Secure.SILENCE_GESTURE, defSilenceGesture ? "1" : "0",
                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
                    }

                    currentVersion = 179;
                }


                // vXXX: Add new settings above this point.