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

Commit 16e56f78 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Frameworks: Make MockUtils more robust" into pi-dev

parents 2112d11e 51de567d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import com.android.server.pm.UserRestrictionsUtils;

import android.content.ComponentName;
import android.content.Intent;
import android.os.BaseBundle;
import android.os.Bundle;
import android.os.UserHandle;
import android.util.ArraySet;
@@ -92,7 +93,10 @@ public class MockUtils {
            public boolean matches(Object item) {
                if (item == null) return false;
                if (!intent.filterEquals((Intent) item)) return false;
                return intent.getExtras().kindofEquals(((Intent) item).getExtras());
                BaseBundle extras = intent.getExtras();
                BaseBundle itemExtras = ((Intent) item).getExtras();
                return (extras == itemExtras) || (extras != null &&
                        extras.kindofEquals(itemExtras));
            }
            @Override
            public void describeTo(Description description) {