Loading core/java/android/app/Notification.java +11 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading core/java/android/database/DatabaseUtils.java +23 −9 Original line number Diff line number Diff line Loading @@ -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('\''); } Loading core/jni/android_view_InputDevice.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -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()) { Loading @@ -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; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipBoundsAlgorithm.java +15 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +3 −3 Original line number Diff line number Diff line Loading @@ -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 */); Loading @@ -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 Loading
core/java/android/app/Notification.java +11 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading
core/java/android/database/DatabaseUtils.java +23 −9 Original line number Diff line number Diff line Loading @@ -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('\''); } Loading
core/jni/android_view_InputDevice.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -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()) { Loading @@ -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; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipBoundsAlgorithm.java +15 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +3 −3 Original line number Diff line number Diff line Loading @@ -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 */); Loading @@ -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