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

Unverified Commit 4ff273eb authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-13.0.0_r10' of...

Merge tag 'android-security-13.0.0_r10' of https://android.googlesource.com/platform/frameworks/base into staging/lineage-20.0_merge_android-security-13.0.0_r10

Android Security 13.0.0 Release 10 (10763433)

* tag 'android-security-13.0.0_r10' of https://android.googlesource.com/platform/frameworks/base:
  Revert "Dismiss keyguard when simpin auth'd and..."
  Import translations. DO NOT MERGE ANYWHERE
  RESTRICT AUTOMERGE: SettingsProvider: exclude secure_frp_mode from resets
  Add userId check before loading icon in Device Controls
  Fixing DatabaseUtils to detect malformed UTF-16 strings
  Disallow loading icon from content URI to PipMenu
  [DO NOT MERGE] Verify URI Permissions in Autofill RemoteViews
  Do not share key mappings with JNI object
  Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.
  Add placeholder when media control title is blank
  RingtoneManager: verify default ringtone is audio

Change-Id: I09bccfa810ed09a615b49eb2fa9084f75ac95d3e
parents 76a563b9 08f9c383
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2857,6 +2857,18 @@ public class Notification implements Parcelable
            if (person != null) {
                visitor.accept(person.getIconUri());
            }
            final RemoteInputHistoryItem[] history = extras.getParcelableArray(
                    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;
    }
+14 −7
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -513,6 +514,11 @@ public class PipMenuView extends FrameLayout {
                    final boolean isCloseAction = mCloseAction != null && Objects.equals(
                            mCloseAction.getActionIntent(), action.getActionIntent());

                    final int iconType = action.getIcon().getType();
                    if (iconType == Icon.TYPE_URI || iconType == Icon.TYPE_URI_ADAPTIVE_BITMAP) {
                        // Disallow loading icon from content URI
                        actionView.setImageDrawable(null);
                    } else {
                        // TODO: Check if the action drawable has changed before we reload it
                        action.getIcon().loadDrawableAsync(mContext, d -> {
                            if (d != null) {
@@ -520,6 +526,7 @@ public class PipMenuView extends FrameLayout {
                                actionView.setImageDrawable(d);
                            }
                        }, mMainHandler);
                    }
                    actionView.setCustomCloseBackgroundVisibility(
                            isCloseAction ? View.VISIBLE : View.GONE);
                    actionView.setContentDescription(action.getContentDescription());
+17 −2
Original line number Diff line number Diff line
@@ -833,6 +833,21 @@ public class RingtoneManager {
        if(!isInternalRingtoneUri(ringtoneUri)) {
            ringtoneUri = ContentProvider.maybeAddUserId(ringtoneUri, context.getUserId());
        }

        if (ringtoneUri != null) {
            final String mimeType = resolver.getType(ringtoneUri);
            if (mimeType == null) {
                Log.e(TAG, "setActualDefaultRingtoneUri for URI:" + ringtoneUri
                        + " ignored: failure to find mimeType (no access from this context?)");
                return;
            }
            if (!(mimeType.startsWith("audio/") || mimeType.equals("application/ogg"))) {
                Log.e(TAG, "setActualDefaultRingtoneUri for URI:" + ringtoneUri
                        + " ignored: associated mimeType:" + mimeType + " is not an audio type");
                return;
            }
        }

        Settings.System.putStringForUser(resolver, setting,
                ringtoneUri != null ? ringtoneUri.toString() : null, context.getUserId());

Loading