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

Commit c9e94ea6 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #7213113: Remove old intent resolver" into jb-mr1-dev

parents 8562cb59 52c62344
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ public class AppSecurityPermissions {
        try {
            pkgInfo = mPm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS);
        } catch (NameNotFoundException e) {
            Log.w(TAG, "Could'nt retrieve permissions for package:"+packageName);
            Log.w(TAG, "Couldn't retrieve permissions for package:"+packageName);
            return;
        }
        // Extract all user permissions
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
    <protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_VERIFIED" />
    <protected-broadcast android:name="android.intent.action.UID_REMOVED" />
    <protected-broadcast android:name="android.intent.action.QUERY_PACKAGE_RESTART" />
    <protected-broadcast android:name="android.intent.action.CONFIGURATION_CHANGED" />
    <protected-broadcast android:name="android.intent.action.LOCALE_CHANGED" />
    <protected-broadcast android:name="android.intent.action.BATTERY_CHANGED" />
+17 −10
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public abstract class IntentResolver<F extends IntentFilter, R extends Object> {
    final private static String TAG = "IntentResolver";
    final private static boolean DEBUG = false;
    final private static boolean localLOGV = DEBUG || false;
    final private static boolean VALIDATE = false;

    public void addFilter(F f) {
        if (localLOGV) {
@@ -67,17 +68,21 @@ public abstract class IntentResolver<F extends IntentFilter, R extends Object> {
                    mTypedActionToFilter, "      TypedAction: ");
        }

        if (VALIDATE) {
            mOldResolver.addFilter(f);
            verifyDataStructures(f);
        }
    }

    public void removeFilter(F f) {
        removeFilterInternal(f);
        mFilters.remove(f);

        if (VALIDATE) {
            mOldResolver.removeFilter(f);
            verifyDataStructures(f);
        }
    }

    void removeFilterInternal(F f) {
        if (localLOGV) {
@@ -314,6 +319,7 @@ public abstract class IntentResolver<F extends IntentFilter, R extends Object> {
        }
        sortResults(finalList);

        if (VALIDATE) {
            List<R> oldList = mOldResolver.queryIntent(intent, resolvedType, defaultOnly, userId);
            if (oldList.size() != finalList.size()) {
                ValidationFailure here = new ValidationFailure();
@@ -321,6 +327,7 @@ public abstract class IntentResolver<F extends IntentFilter, R extends Object> {
                Log.wtf(TAG, "Query result " + intent + " size is " + finalList.size()
                        + "; old implementation is " + oldList.size(), here);
            }
        }

        if (debug) {
            Slog.v(TAG, "Final result list:");