Searched refs:deviceContext (Results 1 – 9 of 9) sorted by relevance
/cts/tests/tests/virtualdevice/audio/src/android/virtualdevice/cts/audio/ |
D | VirtualAudioPermissionTest.java | 257 Context deviceContext = mContext.createDeviceContext(mVirtualDeviceId); in setupAudioPolicy() local 258 AudioManager audioManager = deviceContext.getSystemService(AudioManager.class); in setupAudioPolicy() 268 mAudioPolicy = new AudioPolicy.Builder(deviceContext).addMix(audioMix).build(); in setupAudioPolicy() 276 Context deviceContext = mContext.createDeviceContext(deviceId); in grantPermission() local 277 deviceContext.getPackageManager().grantRuntimePermission("android.virtualdevice.cts.audio", in grantPermission() 278 RECORD_AUDIO, UserHandle.of(deviceContext.getUserId())); in grantPermission()
|
D | VirtualAudioTest.java | 214 Context deviceContext = getInstrumentation().getTargetContext() in virtualDevice_hasAudioInput_withDefaultAudioPolicy_manualAudioPolicy() local 217 AudioManager audioManager = deviceContext.getSystemService(AudioManager.class); in virtualDevice_hasAudioInput_withDefaultAudioPolicy_manualAudioPolicy() 227 AudioPolicy audioPolicy = new AudioPolicy.Builder(deviceContext).addMix( in virtualDevice_hasAudioInput_withDefaultAudioPolicy_manualAudioPolicy() 364 Context deviceContext = getInstrumentation().getTargetContext() in grantRecordAudioPermission() local 366 deviceContext.getPackageManager().grantRuntimePermission("android.virtualdevice.cts.audio", in grantRecordAudioPermission() 367 RECORD_AUDIO, UserHandle.of(deviceContext.getUserId())); in grantRecordAudioPermission()
|
/cts/tests/tests/virtualdevice/sensor/src/android/virtualdevice/cts/sensor/ |
D | VirtualSensorNativeTest.java | 87 Context deviceContext = mContext.createDeviceContext(Context.DEVICE_ID_DEFAULT); in activityOnDefaultDisplayGetsDefaultDeviceSensor() local 88 SensorManager sensorManager = deviceContext.getSystemService(SensorManager.class); in activityOnDefaultDisplayGetsDefaultDeviceSensor()
|
D | VirtualSensorTest.java | 151 Context deviceContext = mContext.createDeviceContext(mVirtualDevice.getDeviceId()); in setUpVirtualSensor() local 152 mVirtualDeviceSensorManager = deviceContext.getSystemService(SensorManager.class); in setUpVirtualSensor() 266 Context deviceContext = mContext.createDeviceContext(mVirtualDevice.getDeviceId()); in createVirtualSensor_multipleSensorsSameType() local 267 mVirtualDeviceSensorManager = deviceContext.getSystemService(SensorManager.class); in createVirtualSensor_multipleSensorsSameType()
|
/cts/tests/tests/virtualdevice/core/src/android/virtualdevice/cts/core/ |
D | VirtualDeviceKeyguardTest.java | 67 Context deviceContext = mContext.createDeviceContext(virtualDevice.getDeviceId()); in setUp() local 68 mVirtualDeviceKeyguardManager = deviceContext.getSystemService(KeyguardManager.class); in setUp()
|
D | VirtualDeviceManagerBasicTest.java | 486 Context deviceContext = mVirtualDevice.createContext(); in createContext_returnsCorrectContext() local 487 assertThat(deviceContext.getDeviceId()).isEqualTo(mVirtualDevice.getDeviceId()); in createContext_returnsCorrectContext()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContextTest.java | 387 final Context deviceContext = mContext.createDeviceProtectedStorageContext(); in testCreateDeviceProtectedStorageContext() local 390 assertTrue(deviceContext.isDeviceProtectedStorage()); in testCreateDeviceProtectedStorageContext() 393 final File deviceFile = new File(deviceContext.getFilesDir(), "test"); in testCreateDeviceProtectedStorageContext() 406 final Context deviceContext = mContext.createDeviceProtectedStorageContext(); in testMoveSharedPreferencesFrom() local 412 assertTrue(deviceContext.moveSharedPreferencesFrom(mContext, "test")); in testMoveSharedPreferencesFrom() 415 assertEquals(42, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom() 419 assertTrue(deviceContext.moveSharedPreferencesFrom(mContext, "test")); in testMoveSharedPreferencesFrom() 422 assertEquals(42, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom() 426 deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE).edit() in testMoveSharedPreferencesFrom() 429 assertTrue(mContext.moveSharedPreferencesFrom(deviceContext, "test")); in testMoveSharedPreferencesFrom() [all …]
|
/cts/tests/tests/virtualdevice/applaunch/src/android/virtualdevice/cts/applaunch/ |
D | DeviceAssociationTest.java | 186 Context deviceContext = mContext.createDeviceContext(mVirtualDevice.getDeviceId()); in updateDeviceId_onDeviceContext_throwsException() local 187 deviceContext.registerDeviceIdChangeListener(mTestExecutor, mDeviceChangeListener); in updateDeviceId_onDeviceContext_throwsException() 191 () -> deviceContext.updateDeviceId(DEVICE_ID_DEFAULT)); in updateDeviceId_onDeviceContext_throwsException()
|
/cts/tests/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/ |
D | VirtualCameraUtils.java | 329 Context deviceContext = getInstrumentation().getTargetContext() in grantCameraPermission() local 331 deviceContext.getPackageManager().grantRuntimePermission("android.virtualdevice.cts.camera", in grantCameraPermission() 332 CAMERA, UserHandle.of(deviceContext.getUserId())); in grantCameraPermission()
|