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

Commit 970e8cc3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker Committed by Justin Dunlap
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/21027271',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/21027271', 'googleplex-android-review.googlesource.com/23497629', 'googleplex-android-review.googlesource.com/23769813', 'googleplex-android-review.googlesource.com/23877020', 'googleplex-android-review.googlesource.com/23785419', 'googleplex-android-review.googlesource.com/23847203', 'googleplex-android-review.googlesource.com/23835332', 'googleplex-android-review.googlesource.com/23423703', 'googleplex-android-review.googlesource.com/24057913', 'googleplex-android-review.googlesource.com/23981526', 'googleplex-android-review.googlesource.com/24300600', 'googleplex-android-review.googlesource.com/24273139'] into security-aosp-sc-v2-release.

Change-Id: I42f279472568f5f0588b2fbb55e26c516fe7ec7a
parents ae9dc187 18c3b194
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2811,6 +2811,17 @@ public class Notification implements Parcelable
            if (person != null) {
                visitor.accept(person.getIconUri());
            }

            final RemoteInputHistoryItem[] history = getParcelableArrayFromBundle(extras,
                Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS, RemoteInputHistoryItem.class);
            if (history != null) {
                for (int i = 0; i < history.length; i++) {
                    RemoteInputHistoryItem item = history[i];
                    if (item.getUri() != null) {
                        visitor.accept(item.getUri());
                    }
                }
            }
        }

        if (isStyle(MessagingStyle.class) && extras != null) {
+23 −9
Original line number Diff line number Diff line
@@ -511,17 +511,31 @@ public class DatabaseUtils {
     */
    public static void appendEscapedSQLString(StringBuilder sb, String sqlString) {
        sb.append('\'');
        if (sqlString.indexOf('\'') != -1) {
        int length = sqlString.length();
        for (int i = 0; i < length; i++) {
            char c = sqlString.charAt(i);
            if (Character.isHighSurrogate(c)) {
                if (i == length - 1) {
                    continue;
                }
                if (Character.isLowSurrogate(sqlString.charAt(i + 1))) {
                    // add them both
                    sb.append(c);
                    sb.append(sqlString.charAt(i + 1));
                    continue;
                } else {
                    // this is a lone surrogate, skip it
                    continue;
                }
            }
            if (Character.isLowSurrogate(c)) {
                continue;
            }
            if (c == '\'') {
                sb.append('\'');
            }
            sb.append(c);
        }
        } else
            sb.append(sqlString);
        sb.append('\'');
    }

+9 −2
Original line number Diff line number Diff line
@@ -42,6 +42,13 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi
        return NULL;
    }

    // b/274058082: Pass a copy of the key character map to avoid concurrent
    // access
    std::shared_ptr<KeyCharacterMap> map = deviceInfo.getKeyCharacterMap();
    if (map != nullptr) {
        map = std::make_shared<KeyCharacterMap>(*map);
    }

    ScopedLocalRef<jstring> descriptorObj(env,
            env->NewStringUTF(deviceInfo.getIdentifier().descriptor.c_str()));
    if (!descriptorObj.get()) {
@@ -50,7 +57,7 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi

    ScopedLocalRef<jobject> kcmObj(env,
                                   android_view_KeyCharacterMap_create(env, deviceInfo.getId(),
            deviceInfo.getKeyCharacterMap()));
                                                                       map));
    if (!kcmObj.get()) {
        return NULL;
    }
+15 −0
Original line number Diff line number Diff line
@@ -182,6 +182,21 @@ public class PipBoundsAlgorithm {
        return null;
    }

    /**
     * Returns the source hint rect if it is valid (if provided and is contained by the current
     * task bounds and not too small).
     */
    public static Rect getValidSourceHintRect(PictureInPictureParams params, Rect sourceBounds,
                @NonNull Rect destinationBounds) {
        final Rect sourceHintRect = getValidSourceHintRect(params, sourceBounds);
        if (sourceHintRect != null
                && sourceHintRect.width() > destinationBounds.width()
                && sourceHintRect.height() > destinationBounds.height()) {
            return sourceHintRect;
        }
        return null;
    }

    public float getDefaultAspectRatio() {
        return mDefaultAspectRatio;
    }
+3 −3
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        if (mOneShotAnimationType == ANIM_TYPE_BOUNDS) {
            mPipMenuController.attach(mLeash);
            final Rect sourceHintRect = PipBoundsAlgorithm.getValidSourceHintRect(
                    info.pictureInPictureParams, currentBounds);
                    info.pictureInPictureParams, currentBounds, destinationBounds);
            scheduleAnimateResizePip(currentBounds, destinationBounds, 0 /* startingAngle */,
                    sourceHintRect, TRANSITION_DIRECTION_TO_PIP, mEnterAnimationDuration,
                    null /* updateBoundsCallback */);
@@ -579,9 +579,9 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
            return;
        }
        final Rect currentBounds = mTaskInfo.configuration.windowConfiguration.getBounds();
        final Rect sourceHintRect = PipBoundsAlgorithm.getValidSourceHintRect(
                mPictureInPictureParams, currentBounds);
        final Rect destinationBounds = mPipBoundsAlgorithm.getEntryDestinationBounds();
        final Rect sourceHintRect = PipBoundsAlgorithm.getValidSourceHintRect(
                mPictureInPictureParams, currentBounds, destinationBounds);
        animateResizePip(currentBounds, destinationBounds, sourceHintRect,
                TRANSITION_DIRECTION_TO_PIP, mEnterAnimationDuration, 0 /* startingAngle */);
        mPipTransitionState.setTransitionState(PipTransitionState.ENTERING_PIP);
Loading