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

Unverified Commit 63126edf authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-9.0.0_r73' into staging/lineage-16.0_merge_android-security-9.0.0_r73

Android Security 9.0.0 Release 73 (7678331)

* tag 'android-security-9.0.0_r73':
  Send targeted broadcasts to prevent other apps from receiving them.
  Guard DISABLE_PLUGIN with PLUGIN permission.
  DO NOT MERGE Apply a maximum char count to the load label api
  Change ownership of the account request notification.
  Fix a potential thread safety issue in VectorDrawable

Change-Id: Ic686d5035a5995e34f2373177a34fab6e6114020
parents c124bc9f 477d208d
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ public class PackageItemInfo {


    private static final float MAX_LABEL_SIZE_PX = 500f;
    private static final float MAX_LABEL_SIZE_PX = 500f;
    /** The maximum length of a safe label, in characters */
    /** The maximum length of a safe label, in characters */
    private static final int MAX_SAFE_LABEL_LENGTH = 50000;
    private static final int MAX_SAFE_LABEL_LENGTH = 1000;


    private static volatile boolean sForceSafeLabels = false;
    private static volatile boolean sForceSafeLabels = false;


@@ -191,7 +191,9 @@ public class PackageItemInfo {
        if (sForceSafeLabels) {
        if (sForceSafeLabels) {
            return loadSafeLabel(pm);
            return loadSafeLabel(pm);
        } else {
        } else {
            return loadUnsafeLabel(pm);
            // Trims the label string to the MAX_SAFE_LABEL_LENGTH. This is to prevent that the
            // system is overwhelmed by an enormous string returned by the application.
            return TextUtils.trimToSize(loadUnsafeLabel(pm), MAX_SAFE_LABEL_LENGTH);
        }
        }
    }
    }


+2 −0
Original line number Original line Diff line number Diff line
@@ -3586,6 +3586,8 @@
    <string name="deny">Deny</string>
    <string name="deny">Deny</string>
    <string name="permission_request_notification_title">Permission requested</string>
    <string name="permission_request_notification_title">Permission requested</string>
    <string name="permission_request_notification_with_subtitle">Permission requested\nfor account <xliff:g id="account" example="foo@gmail.com">%s</xliff:g>.</string>
    <string name="permission_request_notification_with_subtitle">Permission requested\nfor account <xliff:g id="account" example="foo@gmail.com">%s</xliff:g>.</string>
     <!-- Title and subtitle for notification shown when app request account access (two lines) [CHAR LIMIT=NONE] -->
    <string name="permission_request_notification_for_app_with_subtitle">Permission requested by <xliff:g id="app" example="Gmail">%1$s</xliff:g>\nfor account <xliff:g id="account" example="foo@gmail.com">%2$s</xliff:g>.</string>


    <!-- Message to show when an intent automatically switches users into the personal profile. -->
    <!-- Message to show when an intent automatically switches users into the personal profile. -->
    <string name="forward_intent_to_owner">You\'re using this app outside of your work profile</string>
    <string name="forward_intent_to_owner">You\'re using this app outside of your work profile</string>
+1 −0
Original line number Original line Diff line number Diff line
@@ -551,6 +551,7 @@
  <java-symbol type="string" name="menu_sym_shortcut_label" />
  <java-symbol type="string" name="menu_sym_shortcut_label" />
  <java-symbol type="string" name="notification_title" />
  <java-symbol type="string" name="notification_title" />
  <java-symbol type="string" name="permission_request_notification_with_subtitle" />
  <java-symbol type="string" name="permission_request_notification_with_subtitle" />
  <java-symbol type="string" name="permission_request_notification_for_app_with_subtitle" />
  <java-symbol type="string" name="prepend_shortcut_label" />
  <java-symbol type="string" name="prepend_shortcut_label" />
  <java-symbol type="string" name="paste_as_plain_text" />
  <java-symbol type="string" name="paste_as_plain_text" />
  <java-symbol type="string" name="replace" />
  <java-symbol type="string" name="replace" />
+7 −3
Original line number Original line Diff line number Diff line
@@ -342,15 +342,19 @@ public class VectorDrawable extends Drawable {
    private final Rect mTmpBounds = new Rect();
    private final Rect mTmpBounds = new Rect();


    public VectorDrawable() {
    public VectorDrawable() {
        this(new VectorDrawableState(null), null);
        this(null, null);
    }
    }


    /**
    /**
     * The one constructor to rule them all. This is called by all public
     * The one constructor to rule them all. This is called by all public
     * constructors to set the state and initialize local properties.
     * constructors to set the state and initialize local properties.
     */
     */
    private VectorDrawable(@NonNull VectorDrawableState state, @Nullable Resources res) {
    private VectorDrawable(@Nullable VectorDrawableState state, @Nullable Resources res) {
        mVectorState = state;
        // As the mutable, not-thread-safe native instance is stored in VectorDrawableState, we
        // need to always do a defensive copy even if mutate() isn't called. Otherwise
        // draw() being called on 2 different VectorDrawable instances could still hit the same
        // underlying native object.
        mVectorState = new VectorDrawableState(state);
        updateLocalState(res);
        updateLocalState(res);
    }
    }


+3 −1
Original line number Original line Diff line number Diff line
@@ -183,10 +183,12 @@ public class PluginManagerImpl extends BroadcastReceiver implements PluginManage
        IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
        IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
        filter.addDataScheme("package");
        mContext.registerReceiver(this, filter);
        filter.addAction(PLUGIN_CHANGED);
        filter.addAction(PLUGIN_CHANGED);
        filter.addAction(DISABLE_PLUGIN);
        filter.addAction(DISABLE_PLUGIN);
        filter.addDataScheme("package");
        filter.addDataScheme("package");
        mContext.registerReceiver(this, filter);
        mContext.registerReceiver(this, filter, PluginInstanceManager.PLUGIN_PERMISSION, null);
        filter = new IntentFilter(Intent.ACTION_USER_UNLOCKED);
        filter = new IntentFilter(Intent.ACTION_USER_UNLOCKED);
        mContext.registerReceiver(this, filter);
        mContext.registerReceiver(this, filter);
    }
    }
Loading