Fix ModuleLicensePreferenceTest. The intent may contain multiple flags, so just checking whether the needed one is included

Fix: 215072120

Test: atest
Change-Id: I71707a6e8dc0e728e3c20d2c626c204c63064dae
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/legal/ModuleLicensePreferenceTest.java b/tests/robotests/src/com/android/settings/deviceinfo/legal/ModuleLicensePreferenceTest.java
index 08eec9e..1352402 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/legal/ModuleLicensePreferenceTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/legal/ModuleLicensePreferenceTest.java
@@ -24,7 +24,6 @@
 import android.content.pm.ModuleInfo;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.MockitoAnnotations;
@@ -57,7 +56,6 @@
     }
 
     @Test
-    @Ignore
     public void onClick_sendsCorrectIntent() {
         ModuleLicensePreference pref = new ModuleLicensePreference(mContext, mModuleInfo);
 
@@ -69,7 +67,7 @@
                 .isEqualTo(ModuleLicenseProvider.getUriForPackage(PACKAGE_NAME));
         assertThat(intent.getType()).isEqualTo(ModuleLicenseProvider.LICENSE_FILE_MIME_TYPE);
         assertThat(intent.getCharSequenceExtra(Intent.EXTRA_TITLE)).isEqualTo(NAME);
-        assertThat(intent.getFlags()).isEqualTo(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+        assertThat((intent.getFlags() & Intent.FLAG_GRANT_READ_URI_PERMISSION)).isNotEqualTo(0);
         assertThat(intent.getCategories()).contains(Intent.CATEGORY_DEFAULT);
         assertThat(intent.getPackage()).isEqualTo("com.android.htmlviewer");
     }