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

Commit 660c46db authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

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

am: f0e1e01c

Change-Id: Icc33d7efbce4663784f9541fb9cee7689ef254be
parents d648bfc9 f0e1e01c
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) {