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

Commit c3961e5c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9420665 from 5ff4c03f to tm-qpr2-release

Change-Id: I1f7d5134fe0152dee9a82def0be0e93dcd9b4eb8
parents b2a12a70 5ff4c03f
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -2405,6 +2405,29 @@ public class IntentFilter implements Parcelable {
        */
    }

    /**
     * Perform a check on data paths and scheme specific parts of the intent filter.
     * Return true if it passed.
     * @hide
     */
    public boolean checkDataPathAndSchemeSpecificParts() {
        final int numDataPath = mDataPaths == null
                ? 0 : mDataPaths.size();
        final int numDataSchemeSpecificParts = mDataSchemeSpecificParts == null
                ? 0 : mDataSchemeSpecificParts.size();
        for (int i = 0; i < numDataPath; i++) {
            if (!mDataPaths.get(i).check()) {
                return false;
            }
        }
        for (int i = 0; i < numDataSchemeSpecificParts; i++) {
            if (!mDataSchemeSpecificParts.get(i).check()) {
                return false;
            }
        }
        return true;
    }

    /** @hide */
    public IntentFilter(Parcel source) {
        mActions = new ArrayList<String>();
+18 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.os;

import android.util.Log;
import android.util.proto.ProtoOutputStream;

import java.util.Arrays;
@@ -151,6 +152,23 @@ public class PatternMatcher implements Parcelable {
        proto.end(token);
    }

    /**
     * Perform a check on the matcher for the pattern type of {@link #PATTERN_ADVANCED_GLOB}.
     * Return true if it passed.
     * @hide
     */
    public boolean check() {
        try {
            if (mType == PATTERN_ADVANCED_GLOB) {
                return Arrays.equals(mParsedPattern, parseAndVerifyAdvancedPattern(mPattern));
            }
        } catch (IllegalArgumentException e) {
            Log.w(TAG, "Failed to verify advanced pattern: " + e.getMessage());
            return false;
        }
        return true;
    }

    public int describeContents() {
        return 0;
    }
+1 −1
Original line number Diff line number Diff line
@@ -6100,7 +6100,7 @@
    <!-- @SystemApi Allows to access all app shortcuts.
         @hide -->
    <permission android:name="android.permission.ACCESS_SHORTCUTS"
        android:protectionLevel="signature|role" />
        android:protectionLevel="signature|role|recents" />

    <!-- @SystemApi Allows unlimited calls to shortcut mutation APIs.
         @hide -->
+1 −0
Original line number Diff line number Diff line
@@ -25,5 +25,6 @@
        <permission name="android.permission.START_TASKS_FROM_RECENTS"/>
        <permission name="android.permission.STATUS_BAR"/>
        <permission name="android.permission.STOP_APP_SWITCHES"/>
        <permission name="android.permission.ACCESS_SHORTCUTS"/>
    </privapp-permissions>
</permissions>
+9 −1
Original line number Diff line number Diff line
@@ -308,8 +308,16 @@ public class Utils {

    @ColorInt
    public static int getColorAttrDefaultColor(Context context, int attr) {
        return getColorAttrDefaultColor(context, attr, 0);
    }

    /**
     * Get color styled attribute {@code attr}, default to {@code defValue} if not found.
     */
    @ColorInt
    public static int getColorAttrDefaultColor(Context context, int attr, @ColorInt int defValue) {
        TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
        @ColorInt int colorAccent = ta.getColor(0, 0);
        @ColorInt int colorAccent = ta.getColor(0, defValue);
        ta.recycle();
        return colorAccent;
    }
Loading