/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/batterysaver/ |
D | BatterySaverStateMachineTest.java | 62 private Device mDevice; field in BatterySaverStateMachineTest 117 mDevice.getLowPowerModeTriggerLevel(), in pushGlobalSettings() 152 mDevice.putGlobalSetting(key, value); in putGlobalSetting() 157 return mDevice.getGlobalSetting(key, defValue); in getGlobalSetting() 188 doAnswer((inv) -> mDevice.batterySaverEnabled = inv.getArgument(0)) in setUp() 193 .thenAnswer((inv) -> mDevice.batterySaverEnabled); in setUp() 195 .thenAnswer((inv) -> mDevice.batterySaverEnabled); in setUp() 208 mDevice = new Device(); in initDevice() 214 mDevice.pushBatteryStatus(); in initDevice() 220 assertEquals(0, mDevice.getLowPowerModeTriggerLevel()); in testNoAutoBatterySaver() [all …]
|
/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/ |
D | DeviceFilterPair.java | 37 private final T mDevice; field in DeviceFilterPair 41 this.mDevice = device; in DeviceFilterPair() 46 return mDevice; in getDevice() 50 if (mFilter != null) return mFilter.getDeviceDisplayName(mDevice); in getDisplayName() 52 if (mDevice instanceof BluetoothDevice) { in getDisplayName() 53 return getDeviceDisplayNameInternal((BluetoothDevice) mDevice); in getDisplayName() 54 } else if (mDevice instanceof android.bluetooth.le.ScanResult) { in getDisplayName() 56 (android.bluetooth.le.ScanResult) mDevice; in getDisplayName() 58 } else if (mDevice instanceof android.net.wifi.ScanResult) { in getDisplayName() 60 (android.net.wifi.ScanResult) mDevice; in getDisplayName() [all …]
|
/frameworks/av/media/libaudiohal/impl/ |
D | DeviceHalHidl.cpp | 53 : CoreConversionHelperHidl("DeviceHalHidl"), mDevice(device) { in DeviceHalHidl() 60 mDevice(device), in DeviceHalHidl() 66 mDevice = getDeviceRet; in DeviceHalHidl() 75 if (mDevice != 0) { in ~DeviceHalHidl() 77 mDevice.clear(); in ~DeviceHalHidl() 80 mDevice->close(); in ~DeviceHalHidl() 92 if (mDevice == 0) return NO_INIT; in initCheck() 93 return processReturn("initCheck", mDevice->initCheck()); in initCheck() 98 if (mDevice == 0) return NO_INIT; in setVoiceVolume() 105 if (mDevice == 0) return NO_INIT; in setMasterVolume() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | A2dpProfileTest.java | 60 private BluetoothDevice mDevice; field in A2dpProfileTest 78 .thenReturn(Arrays.asList(mDevice)); in setUp() 83 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 85 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isTrue(); in supportsHighQualityAudio() 87 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 89 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isFalse(); in supportsHighQualityAudio() 91 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 93 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isFalse(); in supportsHighQualityAudio() 98 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled() 100 assertThat(mProfile.isHighQualityAudioEnabled(mDevice)).isTrue(); in isHighQualityAudioEnabled() [all …]
|
D | CachedBluetoothDeviceTest.java | 77 private BluetoothDevice mDevice; field in CachedBluetoothDeviceTest 93 when(mDevice.getAddress()).thenReturn(DEVICE_ADDRESS); in setUp() 98 mCachedDevice = spy(new CachedBluetoothDevice(mContext, mProfileManager, mDevice)); in setUp() 108 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDING); in getConnectionSummary_testProfilesInactive_returnPairing() 502 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDING); in getConnectionSummary_testMultipleProfilesInactive_returnPairing() 514 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in getConnectionSummary_trueWirelessActiveDeviceWithBattery_returnActiveWithBattery() 516 when(mDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)).thenReturn( in getConnectionSummary_trueWirelessActiveDeviceWithBattery_returnActiveWithBattery() 518 when(mDevice.getMetadata(BluetoothDevice.METADATA_UNTETHERED_LEFT_BATTERY)).thenReturn( in getConnectionSummary_trueWirelessActiveDeviceWithBattery_returnActiveWithBattery() 520 when(mDevice.getMetadata(BluetoothDevice.METADATA_UNTETHERED_RIGHT_BATTERY)).thenReturn( in getConnectionSummary_trueWirelessActiveDeviceWithBattery_returnActiveWithBattery() 532 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in getConnectionSummary_trueWirelessDeviceWithBattery_returnActiveWithBattery() [all …]
|
D | LocalBluetoothProfileManagerTest.java | 65 private BluetoothDevice mDevice; field in LocalBluetoothProfileManagerTest 83 when(mDeviceManager.findDevice(mDevice)).thenReturn(mCachedBluetoothDevice); in setUp() 84 when(mCachedBluetoothDevice.getDevice()).thenReturn(mDevice); in setUp() 141 mDevice); in updateProfiles_addHidProfileForRemoteDevice() 159 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receiveA2dpConnectionStateChanged_shouldDispatchCallback() 180 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receiveHeadsetConnectionStateChanged_shouldDispatchCallback() 202 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receiveHAPConnectionStateChanged_shouldDispatchDeviceManager() 223 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receivePanConnectionStateChanged_shouldNotDispatchCallback() 244 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receivePanConnectionStateChangedWithoutProfile_shouldNotRefresh() 264 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); in stateChangedHandler_receivePanConnectionStateChangedWithProfile_shouldRefresh()
|
/frameworks/base/packages/Shell/tests/src/com/android/shell/ |
D | UiBot.java | 50 private final UiDevice mDevice; field in UiBot 55 mDevice = UiDevice.getInstance(instrumentation); in UiBot() 66 boolean opened = mDevice.openNotification(); in getNotification() 68 boolean gotIt = mDevice.wait(Until.hasObject(By.pkg(SYSTEMUI_PACKAGE)), mTimeout); in getNotification() 81 boolean opened = mDevice.openNotification(); in getNotification2() 83 final UiObject2 notificationScroller = mDevice.wait(Until.findObject( in getNotification2() 108 mDevice.waitForIdle(); in expandNotification() 134 boolean gotIt = mDevice.wait(Until.hasObject(By.text(text)), mTimeout); in getObject() 145 boolean gotIt = mDevice.wait(Until.hasObject(By.res(id)), mTimeout); in getObjectById() 156 UiObject uiObject = mDevice.findObject(new UiSelector().text(text)); in getVisibleObject() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | CachedBluetoothDevice.java | 79 BluetoothDevice mDevice; field in CachedBluetoothDevice 161 mDevice = device; in CachedBluetoothDevice() 189 sb.append("Address:").append(mDevice); in describe() 200 + mDevice.getAnonymizedAddress() + ", newProfileState " + newProfileState); in onProfileStateChanged() 242 profile.setEnabled(mDevice, true); in onProfileStateChanged() 248 && ((PanProfile) profile).isLocalRoleNap(mDevice)) { in onProfileStateChanged() 255 profile.setEnabled(mDevice, false); in onProfileStateChanged() 257 && ((PanProfile) profile).isLocalRoleNap(mDevice) in onProfileStateChanged() 298 mDevice.disconnect(); in disconnect() 306 PbapProfile.setEnabled(mDevice, false); in disconnect() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | FloatingToolbarUtils.java | 34 private final UiDevice mDevice; field in FloatingToolbarUtils 39 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in FloatingToolbarUtils() 43 mDevice.wait(Until.findObject(TOOLBAR_CONTAINER_SELECTOR), 500); in waitForFloatingToolbarPopup() 48 assertThat(mDevice.hasObject(TOOLBAR_CONTAINER_SELECTOR)).isTrue(); in assertFloatingToolbarIsDisplayed() 54 .that(mDevice.hasObject( in assertFloatingToolbarContainsItem() 62 .that(mDevice.hasObject( in assertFloatingToolbarDoesNotContainItem() 70 .that(mDevice.findObject(TOOLBAR_CONTAINER_SELECTOR) in assertFloatingToolbarContainsItemAtIndex() 81 mDevice.findObject(TOOLBAR_CONTAINER_SELECTOR) in clickFloatingToolbarItem() 89 mDevice.findObject(TOOLBAR_CONTAINER_SELECTOR) in clickFloatingToolbarOverflowItem() 92 mDevice.wait( in clickFloatingToolbarOverflowItem() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | BluetoothMediaDeviceTest.java | 43 private CachedBluetoothDevice mDevice; field in BluetoothMediaDeviceTest 53 when(mDevice.isActiveDevice(BluetoothProfile.A2DP)).thenReturn(true); in setUp() 54 when(mDevice.isActiveDevice(BluetoothProfile.HEARING_AID)).thenReturn(true); in setUp() 55 when(mDevice.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true); in setUp() 57 mBluetoothMediaDevice = new BluetoothMediaDevice(mContext, mDevice, null, null, null); in setUp() 62 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in isCachedBluetoothDeviceConnected_deviceConnected_returnTrue() 63 when(mDevice.isConnected()).thenReturn(true); in isCachedBluetoothDeviceConnected_deviceConnected_returnTrue() 70 when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in isCachedBluetoothDeviceConnected_deviceNotConnected_returnFalse() 71 when(mDevice.isConnected()).thenReturn(false); in isCachedBluetoothDeviceConnected_deviceNotConnected_returnFalse() 79 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isUntetheredHeadset_returnTrue() [all …]
|
D | MediaManagerTest.java | 43 private MediaDevice mDevice; field in MediaManagerTest 53 when(mDevice.getId()).thenReturn(TEST_ID); in setUp() 72 mMediaManager.dispatchDeviceAdded(mDevice); in dispatchDeviceAdded_registerCallback_shouldDispatchCallback() 74 verify(mCallback).onDeviceAdded(mDevice); in dispatchDeviceAdded_registerCallback_shouldDispatchCallback() 81 mMediaManager.dispatchDeviceRemoved(mDevice); in dispatchDeviceRemoved_registerCallback_shouldDispatchCallback() 83 verify(mCallback).onDeviceRemoved(mDevice); in dispatchDeviceRemoved_registerCallback_shouldDispatchCallback() 124 mMediaManager.mMediaDevices.add(mDevice); in findMediaDevice_idExist_shouldReturnMediaDevice() 128 assertThat(device.getId()).isEqualTo(mDevice.getId()); in findMediaDevice_idExist_shouldReturnMediaDevice() 133 mMediaManager.mMediaDevices.add(mDevice); in findMediaDevice_idNotExist_shouldReturnNull()
|
/frameworks/base/tests/RollbackTest/lib/src/com/android/tests/rollback/host/ |
D | WatchdogEventLogger.java | 32 private ITestDevice mDevice; field in WatchdogEventLogger 36 mDevice.enableAdbRoot(); in resetProperties() 37 assertThat(mDevice.setProperty( in resetProperties() 41 assertThat(mDevice.setProperty(key, "")).isTrue(); in resetProperties() 43 assertThat(mDevice.setProperty(key + "." + attr, "")).isTrue(); in resetProperties() 47 mDevice.disableAdbRoot(); in resetProperties() 52 mDevice = device; in start() 57 if (mDevice != null) { in stop() 64 String val = mDevice.getProperty(key); in matchProperty() 76 return mDevice.getBooleanProperty(PROP_PREFIX + type, false) in watchdogEventOccurred()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/ |
D | UsbDialogHelper.java | 47 private final UsbDevice mDevice; field in UsbDialogHelper 70 mDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in UsbDialogHelper() 73 if (mDevice == null && mAccessory == null) { in UsbDialogHelper() 76 if (mDevice != null) { in UsbDialogHelper() 108 mDisconnectedReceiver = new UsbDisconnectedReceiver(activity, mDevice); in registerUsbDisconnectedReceiver() 133 return mDevice != null && mDevice.getHasAudioCapture(); in deviceHasAudioCapture() 140 return mDevice != null && mDevice.getHasAudioPlayback(); in deviceHasAudioPlayback() 172 mUsbService.grantDevicePermission(mDevice, mUid); in grantUidAccessPermission() 188 mUsbService.setDevicePackage(mDevice, mPackageName, userId); in setDefaultPackage() 204 mUsbService.setDevicePackage(mDevice, null, userId); in clearDefaultPackage() [all …]
|
D | UsbResolverActivity.java | 52 private UsbDevice mDevice; field in UsbResolverActivity 94 mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate() 96 if (mDevice != null) { in onCreate() 97 mDisconnectedReceiver = new UsbDisconnectedReceiver(this, mDevice); in onCreate() 98 hasAudioCapture = mDevice.getHasAudioCapture(); in onCreate() 124 if (mDevice != null) { in onCreate() 125 mOtherProfileIntent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onCreate() 141 if (mDevice == null) { in onCreate() 172 if (mDevice != null) { in onTargetSelected() 174 service.grantDevicePermission(mDevice, uid); in onTargetSelected() [all …]
|
/frameworks/base/tests/SystemMemoryTest/host/src/com/android/tests/sysmem/host/ |
D | Cujs.java | 24 private Device mDevice; field in Cujs 27 this.mDevice = device; in Cujs() 37 int pid = mDevice.getProcessPid("system_server"); in run() 38 mDevice.executeShellCommand("kill -10 " + pid); in run() 44 mDevice.executeShellCommand(command); in run()
|
D | Device.java | 27 private ITestDevice mDevice; field in Device 30 mDevice = device; in Device() 38 return mDevice.executeShellCommand(command); in executeShellCommand() 49 mDevice.enableAdbRoot(); in enableAdbRoot() 60 String pid = mDevice.getProcessPid(name); in getProcessPid()
|
D | Metrics.java | 35 private Device mDevice; field in Metrics 49 this.mDevice = device; in Metrics() 80 mDevice.enableAdbRoot(); in sample() 82 int pid = mDevice.getProcessPid("system_server"); in sample() 85 String showmap = mDevice.executeShellCommand("showmap " + pid); in sample() 113 String debuggerd = mDevice.executeShellCommand("debuggerd -j " + pid); in sample()
|
/frameworks/base/tests/ApkVerityTest/src/com/android/apkverity/ |
D | ApkVerityTest.java | 97 private ITestDevice mDevice; field in ApkVerityTest 102 mDevice = getDevice(); in setUp() 104 mDevice.getProperty("pm.dexopt.dm.require_fsverity")); in setUp() 116 ITestDevice.MountPointInfo mountPoint = mDevice.getMountPointInfo("/data"); in testFsverityKernelSupports() 404 assertTrue(BlockDeviceWriter.canReadByte(mDevice, apkPath, offsetFirstByte)); in testFsverityFailToReadModifiedBlockAtFront() 406 assertTrue(BlockDeviceWriter.canReadByte(mDevice, apkPath, in testFsverityFailToReadModifiedBlockAtFront() 414 BlockDeviceWriter.dropCaches(mDevice); in testFsverityFailToReadModifiedBlockAtFront() 415 assertFalse(BlockDeviceWriter.canReadByte(mDevice, apkPath, offsetFirstByte)); in testFsverityFailToReadModifiedBlockAtFront() 419 assertFalse(BlockDeviceWriter.canReadByte(mDevice, apkPath, lastByteOfTheSamePage)); in testFsverityFailToReadModifiedBlockAtFront() 420 assertTrue(BlockDeviceWriter.canReadByte(mDevice, apkPath, lastByteOfTheSamePage + 1)); in testFsverityFailToReadModifiedBlockAtFront() [all …]
|
/frameworks/base/libs/hwui/renderthread/ |
D | VulkanManager.cpp | 77 #define GET_DEV_PROC(F) m##F = (PFN_vk##F)vkGetDeviceProcAddr(mDevice, "vk" #F) 95 if (mDevice != VK_NULL_HANDLE) { in ~VulkanManager() 96 mDeviceWaitIdle(mDevice); in ~VulkanManager() 97 mDestroyDevice(mDevice, nullptr); in ~VulkanManager() 105 mDevice = VK_NULL_HANDLE; in ~VulkanManager() 319 LOG_ALWAYS_FATAL_IF(mCreateDevice(mPhysicalDevice, &deviceInfo, nullptr, &mDevice)); in setupDevice() 348 if (mDevice != VK_NULL_HANDLE) { in initialize() 359 mGetDeviceQueue(mDevice, mGraphicsQueueIndex, 0, &mGraphicsQueue); in initialize() 372 backendContext.fDevice = mDevice; in createContext() 387 .device = mDevice, in getVkFunctorInitParams() [all …]
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | DelayedMessageBuffer.java | 30 private final HdmiCecLocalDevice mDevice; field in DelayedMessageBuffer 33 mDevice = device; in DelayedMessageBuffer() 91 mDevice.onMessage(message); in processAllMessages() 116 && !mDevice.isInputReady(HdmiDeviceInfo.idForCecDevice(address))) { in processMessagesForDevice() 120 mDevice.onMessage(message); in processMessagesForDevice() 142 mDevice.onMessage(message); in processActiveSource()
|
/frameworks/base/services/tests/apexsystemservices/src/com/android/server/ |
D | ApexSystemServicesTestCases.java | 58 private ITestDevice mDevice; field in ApexSystemServicesTestCases 62 mDevice = getDevice(); in setup() 67 assertThat(mDevice.enableAdbRoot()).isTrue(); in setup() 73 mDevice.disableAdbRoot(); in tearDown() 93 mDevice.waitForBootComplete(REBOOT_TIMEOUT); in testApexSystemServiceStarts() 108 mDevice.waitForBootComplete(REBOOT_TIMEOUT); in testInitOrder() 123 return mDevice.executeAdbCommand("logcat", "-v", "brief", "-d", "FakeApexSystemService:D", in getFakeApexSystemServiceLogcat()
|
/frameworks/ex/camera2/public/src/com/android/ex/camera2/blocking/ |
D | BlockingCameraManager.java | 181 private CameraDevice mDevice = null; field in BlockingCameraManager.OpenListener 200 assertEquals(null, mDevice); in assertInitialState() 216 mDevice = camera; in onOpened() 241 mDevice = camera; in onDisconnected() 267 mDevice = camera; in onError() 307 if (!mSuccess && mDevice != null) { in blockUntilOpen() 308 mDevice.close(); in blockUntilOpen() 312 return mDevice; in blockUntilOpen()
|
/frameworks/av/services/camera/libcameraservice/common/ |
D | Camera2ClientBase.cpp | 119 mDevice = in initializeImpl() 124 mDevice = in initializeImpl() 133 if (mDevice == NULL) { in initializeImpl() 139 res = mDevice->initialize(providerPtr, monitorTags); in initializeImpl() 147 res = mDevice->setNotifyCallback(weakThis); in initializeImpl() 194 sp<CameraDeviceBase> device = mDevice; in startWatchingTags() 205 sp<CameraDeviceBase> device = mDevice; in stopWatchingTags() 216 sp<CameraDeviceBase> device = mDevice; in dumpWatchedEventsToVector() 233 sp<CameraDeviceBase> device = mDevice; in dumpDevice() 254 if (mCameraServiceWatchdog != nullptr && mDevice != nullptr) { in disconnect() [all …]
|
/frameworks/av/services/camera/libcameraservice/api2/ |
D | CameraDeviceClient.cpp | 131 mFrameProcessor = new FrameProcessorBase(mDevice); in initializeImpl() 140 const CameraMetadata &deviceInfo = mDevice->info(); in initializeImpl() 274 if (!mDevice.get()) { in submitRequestList() 320 if (mDevice->getId() != logicalId) { in submitRequestList() 467 if (physicalId != mDevice->getId()) { in submitRequestList() 482 set_camera_metadata_vendor_id(meta, mDevice->getVendorTagId()); in submitRequestList() 538 err = mDevice->setStreamingRequestList(metadataRequestList, surfaceMapList, in submitRequestList() 552 err = mDevice->captureList(metadataRequestList, surfaceMapList, in submitRequestList() 583 if (!mDevice.get()) { in cancelRequest() 595 err = mDevice->clearStreamingRequest(lastFrameNumber); in cancelRequest() [all …]
|
/frameworks/base/core/tests/notificationtests/src/android/app/ |
D | NotificationStressTest.java | 63 private UiDevice mDevice = null; field in NotificationStressTest 69 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 73 mDevice.setOrientationNatural(); in setUp() 79 mDevice.unfreezeRotation(); in tearDown() 81 mDevice.waitForIdle(); in tearDown() 96 mDevice.openNotification(); in testNotificationsWithShadeStress()
|