Home
last modified time | relevance | path

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

12345678

/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.py39 for mode in range(_NUM_SHADING_MODES):
44 pylab.plot(range(num_map_gains), shading_maps[mode][i], '-r.',
46 pylab.plot(range(num_map_gains), reference_maps[mode], '-g.',
50 name_suffix = 'ls_maps_mode_%d_loop_%d' % (mode, i)
58 shading_maps[mode][i], reference_maps[mode])
130 reference_maps = [[] for mode in range(_NUM_SHADING_MODES)]
132 for mode in range(1, _NUM_SHADING_MODES):
135 req['android.shading.mode'] = mode
141 if mode == 1:
144 reference_maps[mode] = lsc_map['map']
[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()
/cts/hostsidetests/graphics/framerateoverride/app/src/com/android/cts/graphics/framerateoverride/
DFrameRateOverrideTest.java113 private void setMode(Display.Mode mode) { in setMode() argument
118 params.preferredDisplayModeId = mode.getModeId(); in setMode()
136 for (Display.Mode mode : modes) { in getModesToTest()
138 if (mode.getModeId() == otherMode.getModeId()) { in getModesToTest()
142 if (mode.getPhysicalHeight() != otherMode.getPhysicalHeight() in getModesToTest()
143 || mode.getPhysicalWidth() != otherMode.getPhysicalWidth()) { in getModesToTest()
147 if (areEqual(mode.getRefreshRate(), 2 * otherMode.getRefreshRate())) { in getModesToTest()
148 modesToTest.add(mode); in getModesToTest()
159 for (Display.Mode mode : getModesToTest()) { in testFrameRateOverride()
160 setMode(mode); in testFrameRateOverride()
[all …]
/cts/tests/tests/voicesettings/src/android/voicesettings/cts/
DAirplaneModeTest.java56 int mode; in testAll() local
58 mode = getMode(); in testAll()
59 Log.i(TAG, "Before testing, AIRPLANE_MODE is set to: " + mode); in testAll()
66 if (mode == AIRPLANE_MODE_IS_OFF) { in testAll()
97 int mode = getMode(); in runTest() local
98 Log.i(TAG, "After testing, AIRPLANE_MODE is set to: " + mode); in runTest()
99 assertThat(mode).isEqualTo(expectedMode); in runTest()
DZenModeTest.java60 int mode; in testAll() local
62 mode = getMode(); in testAll()
63 Log.i(TAG, "Before testing, zen-mode is set to: " + mode); in testAll()
70 if (mode == ZEN_MODE_IS_OFF) { in testAll()
99 int mode = getMode(); in runTest() local
100 Log.i(TAG, "After testing, zen-mode is set to: " + mode); in runTest()
101 assertThat(mode).isEqualTo(expectedMode); in runTest()
/cts/tests/tests/media/libaudiojni/
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/suite/audio_quality/test/
DRemoteAudioFakeTcpTest.cpp164 int mode = AudioHardware::EModeVoice | (stereo ? 0x80000000 : 0); in TEST_F() local
173 U32_ENDIAN_SWAP(mode), in TEST_F()
187 ASSERT_TRUE(mRemoteAudio->startPlayback(stereo, samplingF, mode, volume, id, repeat)); in TEST_F()
197 int mode = AudioHardware::EModeVoice | (stereo ? 0x80000000 : 0); in TEST_F() local
206 U32_ENDIAN_SWAP(mode), in TEST_F()
231 ASSERT_TRUE(mRemoteAudio->startPlayback(stereo, samplingF, mode, volume, id, repeat)); in TEST_F()
241 ASSERT_TRUE(mRemoteAudio->startPlayback(stereo, samplingF, mode, volume, id, repeat)); in TEST_F()
251 ASSERT_TRUE(mRemoteAudio->startPlayback(stereo, samplingF, mode, volume, id, repeat)); in TEST_F()
259 int mode = AudioHardware::EModeVoice | (stereo ? 0x80000000 : 0); in TEST_F() local
269 U32_ENDIAN_SWAP(mode), in TEST_F()
[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/media/src/android/mediav2/cts/
DCodecDecoderSurfaceTest.java69 private void decodeAndSavePts(String file, String decoder, long pts, int mode, int frameLimit) in decodeAndSavePts() argument
78 mExtractor.seekTo(pts, mode); in decodeAndSavePts()
147 final int mode = MediaExtractor.SEEK_TO_CLOSEST_SYNC; in testSimpleDecodeToSurface() local
151 decodeAndSavePts(mTestFile, mCodecName, pts, mode, Integer.MAX_VALUE); in testSimpleDecodeToSurface()
167 mExtractor.seekTo(pts, mode); in testSimpleDecodeToSurface()
211 final int mode = MediaExtractor.SEEK_TO_CLOSEST_SYNC; in testFlush() local
217 decodeAndSavePts(mTestFile, mCodecName, pts, mode, Integer.MAX_VALUE); in testFlush()
232 mExtractor.seekTo(0, mode); in testFlush()
246 mExtractor.seekTo(0, mode); in testFlush()
256 mExtractor.seekTo(pts, mode); in testFlush()
[all …]
/cts/tests/tests/nfc/src/android/nfc/cts/
DNfcPreferredPaymentTest.java125 int mode = mCardEmulation.getSelectionModeForCategory(CardEmulation.CATEGORY_PAYMENT); in testGetSelectionModeForCategoryPayment() local
126 Log.i(mTag, "getSelectionModeForCategory for Payment: " + mode); in testGetSelectionModeForCategoryPayment()
129 CardEmulation.SELECTION_MODE_PREFER_DEFAULT == mode); in testGetSelectionModeForCategoryPayment()
140 int mode = mCardEmulation.getSelectionModeForCategory(CardEmulation.CATEGORY_OTHER); in testGetSelectionModeForCategoryOther() local
141 Log.i(mTag, "getSelectionModeForCategory for Other: " + mode); in testGetSelectionModeForCategoryOther()
144 CardEmulation.SELECTION_MODE_ASK_IF_CONFLICT == mode); in testGetSelectionModeForCategoryOther()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCrossProfileTest.java250 private void explicitlySetInteractAcrossProfilesAppOps(int mode) throws Exception { in explicitlySetInteractAcrossProfilesAppOps() argument
252 explicitlySetInteractAcrossProfilesAppOp(packageName, mode); in explicitlySetInteractAcrossProfilesAppOps()
256 private void explicitlySetInteractAcrossProfilesAppOp(String packageName, int mode) in explicitlySetInteractAcrossProfilesAppOp() argument
260 explicitlySetInteractAcrossProfilesAppOp(packageName, mode, profile); in explicitlySetInteractAcrossProfilesAppOp()
279 String packageName, int mode, UserHandle userHandle) throws Exception { in explicitlySetInteractAcrossProfilesAppOp() argument
287 mode); in explicitlySetInteractAcrossProfilesAppOp() local
298 Set<String> packageNames, int mode, UserHandle userHandle) in assertThatPackagesHaveAppOpMode() argument
301 assertThat(getCrossProfileAppOp(unsetCrossProfilePackage, userHandle)).isEqualTo(mode); in assertThatPackagesHaveAppOpMode()
305 private void assertThatPackagesHaveAppOpMode(Set<String> packageNames, int mode) in assertThatPackagesHaveAppOpMode() argument
307 assertThatPackagesHaveAppOpMode(packageNames, mode, Process.myUserHandle()); in assertThatPackagesHaveAppOpMode()
/cts/suite/audio_quality/lib/src/audio/
DAudioProtocol.cpp115 uint32_t mode = param.mStereo ? 0x80000000 : 0; in sendCommand() local
116 mode |= param.mMode; in sendCommand()
117 mBuffer[4] = htonl(mode); in sendCommand()
136 uint32_t mode = param.mStereo ? 0x80000000 : 0; in sendCommand() local
137 mode |= param.mMode; in sendCommand()
138 mBuffer[3] = htonl(mode); in sendCommand()
/cts/tests/tests/display/src/android/display/cts/
DDisplayTest.java585 for (Display.Mode mode : modes) {
586 if (mode.getModeId() != activeMode.getModeId()) {
587 modesList.add(mode);
598 for (Display.Mode mode : modesList) {
599 testSwitchToModeId(activity, mode);
628 private static Point getPhysicalSize(Display.Mode mode) {
629 return new Point(mode.getPhysicalWidth(), mode.getPhysicalHeight());
632 private void testSwitchToModeId(DisplayTestActivity activity, Display.Mode mode)
634 Log.i(TAG, "Switching to mode " + mode);
673 activity.setPreferredDisplayMode(mode);
[all …]
/cts/tests/tests/view/src/android/view/cts/
DChoreographerNativeTest.java114 .mapToLong(mode -> (long) (Duration.ofSeconds(1).toNanos() / mode.getRefreshRate())) in setup()
226 Mode mode = maybeNextMode.get(); in checkRefreshRateIsCurrentAndSwitch() local
232 params.preferredDisplayModeId = mode.getModeId(); in checkRefreshRateIsCurrentAndSwitch()
241 .filter(mode -> DisplayUtil.isModeSwitchSeamless(activeMode, mode)) in findModeForSeamlessSwitch()
242 .filter(mode -> Math.round(mode.getRefreshRate()) != refreshRate) in findModeForSeamlessSwitch()
DActionModeCallback2Test.java81 public boolean onCreateActionMode(ActionMode mode, Menu menu) { in onCreateActionMode() argument
86 public boolean onPrepareActionMode(ActionMode mode, Menu menu) { in onPrepareActionMode() argument
91 public boolean onActionItemClicked(ActionMode mode, MenuItem item) { in onActionItemClicked() argument
96 public void onDestroyActionMode(ActionMode mode) {} in onDestroyActionMode() argument
/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/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/app/NotificationProvider/src/com/android/test/notificationprovider/
DAssetFileProvider.kt29 override fun openAssetFile(uri: Uri, mode: String): AssetFileDescriptor? { in openAssetFile()
32 if (mode == "r" && assets != null && filename != null) { in openAssetFile()
35 return super.openAssetFile(uri, mode) in openAssetFile()
/cts/tests/app/app/src/android/app/stubs/
DAssetFileProvider.kt27 override fun openAssetFile(uri: Uri, mode: String): AssetFileDescriptor? { in onCreate()
30 if (mode == "r" && assets != null && filename != null) { in onCreate()
33 return super.openAssetFile(uri, mode) in onCreate()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DSetSystemSettingTest.java40 final int mode = Settings.System.getInt(mContext.getContentResolver(), in testSetBrightness() local
42 if(mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC) { in testSetBrightness()
51 mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC? "1" : "0"); in testSetBrightness()

12345678