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

Commit f0e1e01c 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

Change-Id: I9b4d9a9ef82cf373eed15cea47dd0a73aacbe56c
parents ea9665cb 16e56f78
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) {