Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 262) sorted by relevance

1234567891011

/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DUriGrantsServiceTest.java52 for (int mode : GRANTABLE_MODES) { in testGrantableToService()
53 Log.d(TAG, "Testing " + uri + " " + mode); in testGrantableToService()
54 assertGrantableToService(uri, mode, UriGrantsTest::makeSingleClipData); in testGrantableToService()
55 assertGrantableToService(uri, mode, UriGrantsTest::makeMultiClipData); in testGrantableToService()
60 private void assertGrantableToService(Uri uri, int mode, Function<Uri, ClipData> clipper) { in assertGrantableToService() argument
82 grantClipUriPermissionViaService(subClip, mode); in assertGrantableToService()
88 assertAccess(subClip, mode); in assertGrantableToService()
89 assertAccess(subUri, mode); in assertGrantableToService()
99 grantClipUriPermissionViaService(sub2Clip, mode); in assertGrantableToService()
103 assertAccess(subClip, mode); in assertGrantableToService()
[all …]
DUriGrantsActivityTest.java61 for (int mode : GRANTABLE_MODES) { in testGrantableToActivity()
62 Log.d(TAG, "Testing " + uri + " " + mode); in testGrantableToActivity()
63 assertGrantableToActivity(uri, mode, UriGrantsTest::makeSingleClipData); in testGrantableToActivity()
64 assertGrantableToActivity(uri, mode, UriGrantsTest::makeMultiClipData); in testGrantableToActivity()
69 private void assertGrantableToActivity(Uri uri, int mode, Function<Uri, ClipData> clipper) { in assertGrantableToActivity() argument
89 grantClipUriPermissionViaActivities(subClip, mode); in assertGrantableToActivity()
93 assertAccess(subClip, mode); in assertGrantableToActivity()
94 assertAccess(subUri, mode); in assertGrantableToActivity()
103 grantClipUriPermissionViaActivity(sub2Clip, mode); in assertGrantableToActivity()
107 assertAccess(subClip, mode); in assertGrantableToActivity()
[all …]
DUriGrantsResultTest.java68 for (int mode : GRANTABLE_MODES) { in testGrantableToResult()
69 Log.d(TAG, "Testing " + uri + " " + mode); in testGrantableToResult()
70 assertGrantableToResult(uri, mode, UriGrantsTest::makeSingleClipData); in testGrantableToResult()
71 assertGrantableToResult(uri, mode, UriGrantsTest::makeMultiClipData); in testGrantableToResult()
76 private void assertGrantableToResult(Uri uri, int mode, in assertGrantableToResult() argument
80 assertGrantableToResultInternal(uri, mode, clipper); in assertGrantableToResult()
86 private void assertGrantableToResultInternal(Uri uri, int mode, in assertGrantableToResultInternal() argument
99 final Intent intent = buildIntent(subClip, mode); in assertGrantableToResultInternal()
104 assertAccess(subClip, mode); in assertGrantableToResultInternal()
105 assertAccess(subUri, mode); in assertGrantableToResultInternal()
[all …]
DUtils.java55 static void grantClipUriPermissionViaActivity(ClipData clip, int mode) { in grantClipUriPermissionViaActivity() argument
56 grantClipUriPermission(clip, mode, ACTION_START_ACTIVITY); in grantClipUriPermissionViaActivity()
59 static void grantClipUriPermissionViaActivities(ClipData clip, int mode) { in grantClipUriPermissionViaActivities() argument
60 grantClipUriPermission(clip, mode, ACTION_START_ACTIVITIES); in grantClipUriPermissionViaActivities()
63 static void grantClipUriPermissionViaService(ClipData clip, int mode) { in grantClipUriPermissionViaService() argument
64 grantClipUriPermission(clip, mode, ACTION_START_SERVICE); in grantClipUriPermissionViaService()
67 private static void grantClipUriPermission(ClipData clip, int mode, String action) { in grantClipUriPermission() argument
81 grantIntent.addFlags(mode); in grantClipUriPermission()
91 static void grantClipUriPermissionViaContext(Uri uri, int mode) { in grantClipUriPermissionViaContext() argument
96 intent.putExtra(EXTRA_MODE, mode); in grantClipUriPermissionViaContext()
[all …]
/cts/apps/CameraITS/tests/scene1_2/
Dtest_param_shading_mode.py40 for mode in range(_NUM_SHADING_MODES):
45 plt.plot(range(num_map_gains), shading_maps[mode][i], '-r.',
47 plt.plot(range(num_map_gains), reference_maps[mode], '-g.',
59 shading_maps[mode][i], reference_maps[mode])
128 reference_maps = [[] for mode in range(_NUM_SHADING_MODES)]
130 for mode in range(1, _NUM_SHADING_MODES):
133 req['android.shading.mode'] = mode
139 if mode == 1:
142 reference_maps[mode] = lsc_map['map']
147 for mode in range(_NUM_SHADING_MODES):
[all …]
/cts/hostsidetests/graphics/displaymode/app/src/com/android/cts/graphics/displaymode/
DBootDisplayModeTest.java112 for (Display.Mode mode : supportedModes) { in testGetBootDisplayMode()
113 if (mode.getModeId() != initialDefaultMode.getModeId()) { in testGetBootDisplayMode()
114 mDisplayManager.setGlobalUserPreferredDisplayMode(mode); in testGetBootDisplayMode()
116 display1 -> display.getDefaultMode().getModeId() == mode.getModeId(), in testGetBootDisplayMode()
118 userPreferredMode = mode; in testGetBootDisplayMode()
126 for (Display.Mode mode : supportedModes) { in testGetBootDisplayMode()
127 if (mode.getModeId() != initialDefaultMode.getModeId() in testGetBootDisplayMode()
128 && mode.getModeId() != userPreferredMode.getModeId()) { in testGetBootDisplayMode()
129 setMode(mode); in testGetBootDisplayMode()
130 activeMode = mode; in testGetBootDisplayMode()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/display/
DModeSwitchingTestActivity.java78 for (Display.Mode mode : modeList) { in onCreate()
79 boolean isSeamlessSwitch = DisplayUtil.isModeSwitchSeamless(lastMode, mode); in onCreate()
80 mSteps.addAll(createTestStepsForTransition(lastMode, mode, isSeamlessSwitch)); in onCreate()
81 lastMode = mode; in onCreate()
132 .filter(mode -> !mode.equals(activeMode)) in findTestModes()
133 .filter(mode -> isResolutionEqual(mode, activeMode)) in findTestModes()
141 .filter(mode -> !mode.equals(activeMode)) in findTestModes()
142 .filter(mode -> DisplayUtil.isModeSwitchSeamless(activeMode, mode)) in findTestModes()
150 .filter(mode -> !mode.equals(activeMode)) in findTestModes()
151 .filter(mode -> !isResolutionEqual(mode, activeMode)) in findTestModes()
[all …]
/cts/tests/app/src/android/app/cts/
DActivityActionModeTest.java59 final ActionMode mode = mActivityRule.getActivity().startActionMode( in testStartPrimaryActionMode() local
62 assertNotNull(mode); in testStartPrimaryActionMode()
63 assertEquals(ActionMode.TYPE_PRIMARY, mode.getType()); in testStartPrimaryActionMode()
73 final ActionMode mode = mActivityRule.getActivity().startActionMode( in testStartFloatingActionMode() local
76 assertNotNull(mode); in testStartFloatingActionMode()
77 assertEquals(ActionMode.TYPE_FLOATING, mode.getType()); in testStartFloatingActionMode()
87 final ActionMode mode = mActivityRule.getActivity().startActionMode(mCallback); in testStartTypelessActionMode() local
89 assertNotNull(mode); in testStartTypelessActionMode()
90 assertEquals(ActionMode.TYPE_PRIMARY, mode.getType()); in testStartTypelessActionMode()
DActivityOptionsTest.java90 ActivityOptions options, boolean allowed, int mode) { in checkPendingIntentBackgroundActivityStartModeBeforeAndAfterBundle() argument
92 assertThat(options.getPendingIntentBackgroundActivityStartMode()).isEqualTo(mode); in checkPendingIntentBackgroundActivityStartModeBeforeAndAfterBundle()
97 if (mode == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { in checkPendingIntentBackgroundActivityStartModeBeforeAndAfterBundle()
101 assertThat(bundle.getInt(key)).isEqualTo(mode); in checkPendingIntentBackgroundActivityStartModeBeforeAndAfterBundle()
135 ActivityOptions options, int mode) { in checkPendingIntentCreatorBackgroundActivityStartModeBeforeAndAfterBundle() argument
136 assertThat(options.getPendingIntentCreatorBackgroundActivityStartMode()).isEqualTo(mode); in checkPendingIntentCreatorBackgroundActivityStartModeBeforeAndAfterBundle()
141 if (mode == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { in checkPendingIntentCreatorBackgroundActivityStartModeBeforeAndAfterBundle()
145 assertThat(bundle.getInt(key)).isEqualTo(mode); in checkPendingIntentCreatorBackgroundActivityStartModeBeforeAndAfterBundle()
/cts/tests/tests/graphics/src/android/graphics/cts/
DFrameRateOverrideTest.java132 private void setMode(Display.Mode mode) { in setMode() argument
133 Log.i(TAG, "Setting display refresh rate to " + mode.getRefreshRate()); in setMode()
137 params.preferredDisplayModeId = mode.getModeId(); in setMode()
165 for (Display.Mode mode : modes) { in getModesToTest()
170 if (mode.isSynthetic()) { in getModesToTest()
174 if (mode.getPhysicalHeight() == currentDisplayHeight in getModesToTest()
175 && mode.getPhysicalWidth() == currentDisplayWidth) { in getModesToTest()
178 if (mode.getRefreshRate() / 2 in getModesToTest()
182 modesWithSameResolution.add(mode); in getModesToTest()
183 Log.i(TAG, "Mode added: " + mode.toString()); in getModesToTest()
[all …]
/cts/tests/tests/media/audio/jni/
Dsl-utils.h69 void envReleaseArrayElements(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode) { in envReleaseArrayElements() argument
70 env->ReleaseByteArrayElements(array, elems, mode); in envReleaseArrayElements()
79 void envReleaseArrayElements(JNIEnv *env, jshortArray array, jshort *elems, jint mode) { in envReleaseArrayElements() argument
80 env->ReleaseShortArrayElements(array, elems, mode); in envReleaseArrayElements()
89 void envReleaseArrayElements(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode) { in envReleaseArrayElements() argument
90 env->ReleaseFloatArrayElements(array, elems, mode); in envReleaseArrayElements()
/cts/tests/tests/media/common/src/android/media/cts/
DTestUtils.java204 int mode; in currentTestMode() local
207 mode = TESTMODE_CTS; in currentTestMode()
209 mode = TESTMODE_MCTS; in currentTestMode()
211 mode = TESTMODE_MTS; in currentTestMode()
213 mode = TESTMODE_CTS; in currentTestMode()
215 return mode; in currentTestMode()
257 int mode = currentTestMode(); in isTestingModules() local
258 switch (mode) { in isTestingModules()
275 int mode = currentTestMode(); in isMtsMode() local
276 return mode == TESTMODE_MTS; in isMtsMode()
[all …]
/cts/tests/tests/voicesettings/src/android/voicesettings/cts/
DAirplaneModeTest.java76 int mode; in testAll() local
78 mode = getMode(); in testAll()
79 Log.i(TAG, "Before testing, AIRPLANE_MODE is set to: " + mode); in testAll()
86 if (mode == AIRPLANE_MODE_IS_OFF) { in testAll()
117 int mode = getMode(); in runTest() local
118 Log.i(TAG, "After testing, AIRPLANE_MODE is set to: " + mode); in runTest()
119 assertThat(mode).isEqualTo(expectedMode); in runTest()
DZenModeTest.java62 int mode; in testAll() local
64 mode = getMode(); in testAll()
65 Log.i(TAG, "Before testing, zen-mode is set to: " + mode); in testAll()
72 if (mode == ZEN_MODE_IS_OFF) { in testAll()
101 int mode = getMode(); in runTest() local
102 Log.i(TAG, "After testing, zen-mode is set to: " + mode); in runTest()
103 assertThat(mode).isEqualTo(expectedMode); in runTest()
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DCallAudioInterceptionTest.java197 for (int mode : TEST_MODES) { in testGetCallUplinkInjectionAudioTrackSuccess()
198 if (setAudioMode(mode)) { in testGetCallUplinkInjectionAudioTrackSuccess()
199 if ((mode != AudioManager.MODE_IN_CALL && mode != AudioManager.MODE_CALL_REDIRECT) in testGetCallUplinkInjectionAudioTrackSuccess()
202 Log.i(TAG, "testing mode: " + mode); in testGetCallUplinkInjectionAudioTrackSuccess()
209 Log.i(TAG, "Cannot set mode to: " + mode); in testGetCallUplinkInjectionAudioTrackSuccess()
298 for (int mode : TEST_MODES) { in testGetCallDownlinkExtractionAudioRecordSuccess()
299 if (setAudioMode(mode)) { in testGetCallDownlinkExtractionAudioRecordSuccess()
300 if ((mode != AudioManager.MODE_IN_CALL && mode != AudioManager.MODE_CALL_REDIRECT) in testGetCallDownlinkExtractionAudioRecordSuccess()
310 Log.i(TAG, "Cannot set mode to: " + mode); in testGetCallDownlinkExtractionAudioRecordSuccess()
315 private boolean setAudioMode(int mode) { in setAudioMode() argument
[all …]
/cts/tests/tests/gameframerate/src/
DGameFrameRateTest.java153 private void setMode(Display.Mode mode) { in setMode() argument
154 Log.i(TAG, "Setting display refresh rate to " + mode.getRefreshRate()); in setMode()
158 params.preferredDisplayModeId = mode.getModeId(); in setMode()
186 for (Display.Mode mode : modes) { in getModesToTest()
191 if (mode.isSynthetic()) { in getModesToTest()
195 if (mode.getPhysicalHeight() == currentDisplayHeight in getModesToTest()
196 && mode.getPhysicalWidth() == currentDisplayWidth) { in getModesToTest()
199 if (mode.getRefreshRate() / 2 in getModesToTest()
203 modesWithSameResolution.add(mode); in getModesToTest()
204 Log.i(TAG, "Mode added: " + mode.toString()); in getModesToTest()
[all …]
/cts/libs/vogar-expect/src/vogar/expect/
DExpectationStore.java118 … public static ExpectationStore parse(Set<File> expectationFiles, ModeId mode) throws IOException { in parse() argument
122 result.parse(f, mode); in parse()
138 Class<?> owningClass, Set<String> expectationResources, ModeId mode) in parseResources() argument
147 result.parse(url, mode); in parseResources()
153 private void parse(URL url, ModeId mode) throws IOException { in parse() argument
158 parse(reader, url.toString(), mode); in parse()
162 public void parse(File expectationsFile, ModeId mode) throws IOException { in parse() argument
167 parse(fileReader, source, mode); in parse()
171 private void parse(Reader reader, String source, ModeId mode) throws IOException { in parse() argument
177 readExpectation(jsonReader, mode); in parse()
[all …]
/cts/tests/tests/appop/src/android/app/appops/cts/
DAppOpsMultiUserTest.kt115 val mode = appOpsManager.unsafeCheckOpNoThrow( in <lambda>() constant
120 Assert.assertEquals(AppOpsManager.MODE_IGNORED, mode) in <lambda>()
134 val mode = appOpsManager.unsafeCheckOpNoThrow( in <lambda>() constant
139 Assert.assertEquals(AppOpsManager.MODE_IGNORED, mode) in <lambda>()
164 val mode = appOpsManager.noteOpNoThrow( in <lambda>() constant
169 Assert.assertEquals(AppOpsManager.MODE_ALLOWED, mode) in <lambda>()
178 val mode = appOpsManager.noteOpNoThrow( in <lambda>() constant
184 Assert.assertEquals(AppOpsManager.MODE_ALLOWED, mode) in <lambda>()
/cts/tests/location/location_none/src/android/location/cts/none/
DLocationDisabledAppOpsTest.java84 final int[] mode = {MODE_ALLOWED}; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() local
87 mode[0] = mAom.noteOpNoThrow( in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
91 if (mode[0] == MODE_ALLOWED && !ignoreList.containsAll(pi.packageName) in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
97 mode[0] = MODE_ALLOWED; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
99 mode[0] = mAom in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
102 if (mode[0] == MODE_ALLOWED && !ignoreList.includes(pi.packageName) in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCrossProfileTest.java236 private void explicitlySetInteractAcrossProfilesAppOps(int mode) throws Exception { in explicitlySetInteractAcrossProfilesAppOps() argument
238 explicitlySetInteractAcrossProfilesAppOp(packageName, mode); in explicitlySetInteractAcrossProfilesAppOps()
242 private void explicitlySetInteractAcrossProfilesAppOp(String packageName, int mode) in explicitlySetInteractAcrossProfilesAppOp() argument
246 explicitlySetInteractAcrossProfilesAppOp(packageName, mode, profile); in explicitlySetInteractAcrossProfilesAppOp()
265 String packageName, int mode, UserHandle userHandle) throws Exception { in explicitlySetInteractAcrossProfilesAppOp() argument
273 mode); in explicitlySetInteractAcrossProfilesAppOp() local
284 Set<String> packageNames, int mode, UserHandle userHandle) in assertThatPackagesHaveAppOpMode() argument
287 assertThat(getCrossProfileAppOp(unsetCrossProfilePackage, userHandle)).isEqualTo(mode); in assertThatPackagesHaveAppOpMode()
291 private void assertThatPackagesHaveAppOpMode(Set<String> packageNames, int mode) in assertThatPackagesHaveAppOpMode() argument
293 assertThatPackagesHaveAppOpMode(packageNames, mode, Process.myUserHandle()); in assertThatPackagesHaveAppOpMode()
/cts/tests/tests/security/src/android/security/cts/
DLocationDisabledAppOpsTest.java91 final int[] mode = {MODE_ALLOWED}; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() local
93 mode[0] = mAom.noteOpNoThrow( in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
96 if (mode[0] == MODE_ALLOWED && !ignoreList.containsAll(pi.packageName)) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
101 mode[0] = MODE_ALLOWED; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
103 mode[0] = mAom in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
106 if (mode[0] == MODE_ALLOWED && !ignoreList.includes(pi.packageName)) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
/cts/apps/CtsVerifier/src/org/hyphonate/megaaudio/common/
DBuilderBase.java180 public BuilderBase setSharingMode(int mode) { in setSharingMode() argument
181 mSharingMode = mode; in setSharingMode()
197 public BuilderBase setPerformanceMode(int mode) { in setPerformanceMode() argument
198 mPerformanceMode = mode; in setPerformanceMode()
/cts/tests/JobScheduler/src/android/jobscheduler/
DTriggerContentJobService.java77 int mode = TestEnvironment.getTestEnvironment().getMode(); in onStartJob() local
82 if (mode == TestEnvironment.MODE_ONE_REPEAT_RESCHEDULE) { in onStartJob()
86 } else if (mode == TestEnvironment.MODE_ONE_REPEAT_FINISH_TRUE) { in onStartJob()
139 public void setMode(int mode, JobInfo jobInfo) { in setMode() argument
141 mMode = mode; in setMode()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/
DTriggerContentJobService.java77 int mode = TestEnvironment.getTestEnvironment().getMode(); in onStartJob() local
82 if (mode == TestEnvironment.MODE_ONE_REPEAT_RESCHEDULE) { in onStartJob()
86 } else if (mode == TestEnvironment.MODE_ONE_REPEAT_FINISH_TRUE) { in onStartJob()
139 public void setMode(int mode, JobInfo jobInfo) { in setMode() argument
141 mMode = mode; in setMode()
/cts/tests/tests/display/src/android/display/cts/
DDisplayTest.java198 DisplayModeState(Display.Mode mode) { in DisplayModeState() argument
199 mHeight = mode.getPhysicalHeight(); in DisplayModeState()
200 mWidth = mode.getPhysicalWidth(); in DisplayModeState()
201 mSupportedHdrTypes = mode.getSupportedHdrTypes(); in DisplayModeState()
202 mRefreshRate = mode.getRefreshRate(); in DisplayModeState()
716 .filter(mode -> !mode.isSynthetic()) // filter out synthetic modes
720 mode -> mode,
740 for (Map.Entry<DisplayModeState, Display.Mode> mode : modes.entrySet()) {
741 if (!activeModeState.equals(mode.getKey())) {
742 modesList.add(mode.getValue());
[all …]

1234567891011