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

Commit 8b1b4b68 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6683212 from 4c497324 to rvc-qpr1-release

Change-Id: Iaeecfcdd3b287276a4113cb8827757dbcce3f90e
parents aac26615 4c497324
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -98,6 +98,13 @@ public class CallLog {
         */
         */
        public static final String LIMIT_PARAM_KEY = "limit";
        public static final String LIMIT_PARAM_KEY = "limit";


        /**
         * Form of {@link #CONTENT_URI} which limits the query results to a single result.
         */
        private static final Uri CONTENT_URI_LIMIT_1 = CONTENT_URI.buildUpon()
                .appendQueryParameter(LIMIT_PARAM_KEY, "1")
                .build();

        /**
        /**
         * Query parameter used to specify the starting record to return.
         * Query parameter used to specify the starting record to return.
         * <p>
         * <p>
@@ -932,11 +939,11 @@ public class CallLog {
            Cursor c = null;
            Cursor c = null;
            try {
            try {
                c = resolver.query(
                c = resolver.query(
                    CONTENT_URI,
                    CONTENT_URI_LIMIT_1,
                    new String[] {NUMBER},
                    new String[] {NUMBER},
                    TYPE + " = " + OUTGOING_TYPE,
                    TYPE + " = " + OUTGOING_TYPE,
                    null,
                    null,
                    DEFAULT_SORT_ORDER + " LIMIT 1");
                    DEFAULT_SORT_ORDER);
                if (c == null || !c.moveToFirst()) {
                if (c == null || !c.moveToFirst()) {
                    return "";
                    return "";
                }
                }
+1 −1
Original line number Original line Diff line number Diff line
@@ -308,7 +308,7 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll
                false /* isScreenRound */,
                false /* isScreenRound */,
                false /* alwaysConsumeSystemBars */, null /* displayCutout */,
                false /* alwaysConsumeSystemBars */, null /* displayCutout */,
                LayoutParams.SOFT_INPUT_ADJUST_RESIZE /* legacySoftInputMode*/,
                LayoutParams.SOFT_INPUT_ADJUST_RESIZE /* legacySoftInputMode*/,
                0 /* legacySystemUiFlags */, typeSideMap)
                0 /* legacyWindowFlags */, 0 /* legacySystemUiFlags */, typeSideMap)
               .getInsets(mTypes);
               .getInsets(mTypes);
    }
    }


+6 −4
Original line number Original line Diff line number Diff line
@@ -501,6 +501,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    private PendingControlRequest mPendingImeControlRequest;
    private PendingControlRequest mPendingImeControlRequest;


    private int mLastLegacySoftInputMode;
    private int mLastLegacySoftInputMode;
    private int mLastLegacyWindowFlags;
    private int mLastLegacySystemUiFlags;
    private int mLastLegacySystemUiFlags;
    private DisplayCutout mLastDisplayCutout;
    private DisplayCutout mLastDisplayCutout;
    private boolean mStartingAnimation;
    private boolean mStartingAnimation;
@@ -569,8 +570,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation


            WindowInsets insets = state.calculateInsets(mFrame, mState /* ignoringVisibilityState*/,
            WindowInsets insets = state.calculateInsets(mFrame, mState /* ignoringVisibilityState*/,
                    mLastInsets.isRound(), mLastInsets.shouldAlwaysConsumeSystemBars(),
                    mLastInsets.isRound(), mLastInsets.shouldAlwaysConsumeSystemBars(),
                    mLastDisplayCutout, mLastLegacySoftInputMode, mLastLegacySystemUiFlags,
                    mLastDisplayCutout, mLastLegacySoftInputMode, mLastLegacyWindowFlags,
                    null /* typeSideMap */);
                    mLastLegacySystemUiFlags, null /* typeSideMap */);
            mHost.dispatchWindowInsetsAnimationProgress(insets, mUnmodifiableTmpRunningAnims);
            mHost.dispatchWindowInsetsAnimationProgress(insets, mUnmodifiableTmpRunningAnims);
            if (DEBUG) {
            if (DEBUG) {
                for (WindowInsetsAnimation anim : mUnmodifiableTmpRunningAnims) {
                for (WindowInsetsAnimation anim : mUnmodifiableTmpRunningAnims) {
@@ -706,13 +707,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    @VisibleForTesting
    @VisibleForTesting
    public WindowInsets calculateInsets(boolean isScreenRound,
    public WindowInsets calculateInsets(boolean isScreenRound,
            boolean alwaysConsumeSystemBars, DisplayCutout cutout,
            boolean alwaysConsumeSystemBars, DisplayCutout cutout,
            int legacySoftInputMode, int legacySystemUiFlags) {
            int legacySoftInputMode, int legacyWindowFlags, int legacySystemUiFlags) {
        mLastLegacySoftInputMode = legacySoftInputMode;
        mLastLegacySoftInputMode = legacySoftInputMode;
        mLastLegacyWindowFlags = legacyWindowFlags;
        mLastLegacySystemUiFlags = legacySystemUiFlags;
        mLastLegacySystemUiFlags = legacySystemUiFlags;
        mLastDisplayCutout = cutout;
        mLastDisplayCutout = cutout;
        mLastInsets = mState.calculateInsets(mFrame, null /* ignoringVisibilityState*/,
        mLastInsets = mState.calculateInsets(mFrame, null /* ignoringVisibilityState*/,
                isScreenRound, alwaysConsumeSystemBars, cutout,
                isScreenRound, alwaysConsumeSystemBars, cutout,
                legacySoftInputMode, legacySystemUiFlags,
                legacySoftInputMode, legacyWindowFlags, legacySystemUiFlags,
                null /* typeSideMap */);
                null /* typeSideMap */);
        return mLastInsets;
        return mLastInsets;
    }
    }
+13 −6
Original line number Original line Diff line number Diff line
@@ -22,13 +22,14 @@ import static android.view.ViewRootImpl.NEW_INSETS_MODE_IME;
import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE;
import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE;
import static android.view.ViewRootImpl.sNewInsetsMode;
import static android.view.ViewRootImpl.sNewInsetsMode;
import static android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES;
import static android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES;
import static android.view.WindowInsets.Type.SIZE;
import static android.view.WindowInsets.Type.SYSTEM_GESTURES;
import static android.view.WindowInsets.Type.SYSTEM_GESTURES;
import static android.view.WindowInsets.Type.displayCutout;
import static android.view.WindowInsets.Type.displayCutout;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowInsets.Type.indexOf;
import static android.view.WindowInsets.Type.indexOf;
import static android.view.WindowInsets.Type.isVisibleInsetsType;
import static android.view.WindowInsets.Type.isVisibleInsetsType;
import static android.view.WindowInsets.Type.statusBars;
import static android.view.WindowInsets.Type.systemBars;
import static android.view.WindowInsets.Type.systemBars;
import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;


@@ -38,7 +39,6 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.ArraySet;
import android.util.SparseIntArray;
import android.util.SparseIntArray;
import android.view.WindowInsets.Type;
import android.view.WindowInsets.Type;
@@ -171,7 +171,7 @@ public class InsetsState implements Parcelable {
     */
     */
    public WindowInsets calculateInsets(Rect frame, @Nullable InsetsState ignoringVisibilityState,
    public WindowInsets calculateInsets(Rect frame, @Nullable InsetsState ignoringVisibilityState,
            boolean isScreenRound, boolean alwaysConsumeSystemBars, DisplayCutout cutout,
            boolean isScreenRound, boolean alwaysConsumeSystemBars, DisplayCutout cutout,
            int legacySoftInputMode, int legacySystemUiFlags,
            int legacySoftInputMode, int legacyWindowFlags, int legacySystemUiFlags,
            @Nullable @InternalInsetsSide SparseIntArray typeSideMap) {
            @Nullable @InternalInsetsSide SparseIntArray typeSideMap) {
        Insets[] typeInsetsMap = new Insets[Type.SIZE];
        Insets[] typeInsetsMap = new Insets[Type.SIZE];
        Insets[] typeMaxInsetsMap = new Insets[Type.SIZE];
        Insets[] typeMaxInsetsMap = new Insets[Type.SIZE];
@@ -218,10 +218,17 @@ public class InsetsState implements Parcelable {
            }
            }
        }
        }
        final int softInputAdjustMode = legacySoftInputMode & SOFT_INPUT_MASK_ADJUST;
        final int softInputAdjustMode = legacySoftInputMode & SOFT_INPUT_MASK_ADJUST;

        @InsetsType int compatInsetsTypes = systemBars() | displayCutout();
        if (softInputAdjustMode == SOFT_INPUT_ADJUST_RESIZE) {
            compatInsetsTypes |= ime();
        }
        if ((legacyWindowFlags & FLAG_FULLSCREEN) != 0) {
            compatInsetsTypes &= ~statusBars();
        }

        return new WindowInsets(typeInsetsMap, typeMaxInsetsMap, typeVisibilityMap, isScreenRound,
        return new WindowInsets(typeInsetsMap, typeMaxInsetsMap, typeVisibilityMap, isScreenRound,
                alwaysConsumeSystemBars, cutout, softInputAdjustMode == SOFT_INPUT_ADJUST_RESIZE
                alwaysConsumeSystemBars, cutout, compatInsetsTypes,
                        ? systemBars() | displayCutout() | ime()
                        : systemBars() | displayCutout(),
                sNewInsetsMode == NEW_INSETS_MODE_FULL
                sNewInsetsMode == NEW_INSETS_MODE_FULL
                        && (legacySystemUiFlags & SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0);
                        && (legacySystemUiFlags & SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0);
    }
    }
+2 −1
Original line number Original line Diff line number Diff line
@@ -2265,7 +2265,8 @@ public final class ViewRootImpl implements ViewParent,
            mLastWindowInsets = mInsetsController.calculateInsets(
            mLastWindowInsets = mInsetsController.calculateInsets(
                    mContext.getResources().getConfiguration().isScreenRound(),
                    mContext.getResources().getConfiguration().isScreenRound(),
                    mAttachInfo.mAlwaysConsumeSystemBars, mPendingDisplayCutout.get(),
                    mAttachInfo.mAlwaysConsumeSystemBars, mPendingDisplayCutout.get(),
                    mWindowAttributes.softInputMode, (mWindowAttributes.systemUiVisibility
                    mWindowAttributes.softInputMode, mWindowAttributes.flags,
                    (mWindowAttributes.systemUiVisibility
                            | mWindowAttributes.subtreeSystemUiVisibility));
                            | mWindowAttributes.subtreeSystemUiVisibility));


            Rect visibleInsets = mInsetsController.calculateVisibleInsets(
            Rect visibleInsets = mInsetsController.calculateVisibleInsets(
Loading