Home
last modified time | relevance | path

Searched refs:mDevice (Results 1 – 25 of 50) sorted by relevance

12

/aosp14/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/batterysaver/
H A DBatterySaverStateMachineTest.java62 private Device mDevice; field in BatterySaverStateMachineTest
208 mDevice = new Device(); in initDevice()
272 mDevice.setPowered(true); in testNoAutoBatterySaver()
285 mDevice.setPowered(false); in testNoAutoBatterySaver()
378 mDevice.setPowered(true); in testAutoBatterySaver()
403 mDevice.setPowered(true); in testAutoBatterySaver()
410 mDevice.setPowered(true); in testAutoBatterySaver()
505 mDevice.setPowered(true); in testAutoBatterySaver_withSticky_withAutoOffDisabled()
523 mDevice.setPowered(true); in testAutoBatterySaver_withSticky_withAutoOffDisabled()
587 mDevice.setPowered(true); in testAutoBatterySaver_withSticky_withAutoOffEnabled()
[all …]
/aosp14/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/
H A DDeviceFilterPair.java37 private final T mDevice; field in DeviceFilterPair
41 this.mDevice = device; in DeviceFilterPair()
46 return mDevice; in getDevice()
52 if (mDevice instanceof BluetoothDevice) { 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()
76 return Objects.equals(getDeviceMacAddress(mDevice), getDeviceMacAddress(that.mDevice)); in equals()
81 return Objects.hash(getDeviceMacAddress(mDevice)); in hashCode()
87 + "device=" + mDevice + " " + getDisplayName() in toString()
[all …]
/aosp14/frameworks/base/core/java/android/companion/
H A DAssociatedDevice.java41 @NonNull private final Parcelable mDevice; field in AssociatedDevice
45 mDevice = device; in AssociatedDevice()
50 mDevice = creator.createFromParcel(in); in AssociatedDevice()
59 if (mDevice instanceof BluetoothDevice) { in getBluetoothDevice()
60 return (BluetoothDevice) mDevice; in getBluetoothDevice()
84 return (android.net.wifi.ScanResult) mDevice; in getWifiDevice()
93 mDevice.writeToParcel(dest, flags); in writeToParcel()
134 + "device = " + mDevice in toString()
148 return mDevice.toString().equals(that.mDevice.toString()); in equals()
151 return java.util.Objects.equals(mDevice, that.mDevice); in equals()
[all …]
/aosp14/frameworks/base/packages/Shell/tests/src/com/android/shell/
H A DUiBot.java50 private final UiDevice mDevice; field in UiBot
55 mDevice = UiDevice.getInstance(instrumentation); in UiBot()
66 boolean opened = mDevice.openNotification(); in getNotification()
81 boolean opened = mDevice.openNotification(); in getNotification2()
108 mDevice.waitForIdle(); in expandNotification()
178 boolean hasIt = mDevice.hasObject(By.res(id)); in assertNotVisibleById()
222 mDevice.pressBack(); in pressBack()
227 mDevice.executeShellCommand("wm dismiss-keyguard"); in turnScreenOn()
228 mDevice.waitForIdle(); in turnScreenOn()
232 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() * 3 / 4, in swipeUp()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
H A DA2dpProfileTest.java61 private BluetoothDevice mDevice; field in A2dpProfileTest
79 .thenReturn(Arrays.asList(mDevice)); in setUp()
101 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isTrue(); in supportsHighQualityAudio()
105 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isFalse(); in supportsHighQualityAudio()
109 assertThat(mProfile.supportsHighQualityAudio(mDevice)).isFalse(); in supportsHighQualityAudio()
114 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled()
116 assertThat(mProfile.isHighQualityAudioEnabled(mDevice)).isTrue(); in isHighQualityAudioEnabled()
118 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled()
126 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled()
142 when(mBluetoothA2dp.getCodecStatus(mDevice)).thenReturn(status); in isHighQualityAudioEnabled()
[all …]
H A DCachedBluetoothDeviceTest.java82 private BluetoothDevice mDevice; field in CachedBluetoothDeviceTest
920 }).when(mDevice).setAlias(anyString()); in deviceName_testRenameDevice()
928 verify(mDevice, never()).setAlias(any()); in deviceName_testRenameDevice()
931 verify(mDevice).setAlias(DEVICE_ALIAS_NEW); in deviceName_testRenameDevice()
977 when(mHfpProfile.getConnectionStatus(mDevice)). in isHfpDevice_isHfpDevice()
1040 when(mDevice.getAlias()).thenReturn(null); in getName_aliasNameIsNull_returnAddress()
1052 verify(mDevice).setAlias(name); in setName_setDeviceNameIsNotNull()
1059 verify(mDevice, never()).setAlias(any()); in setName_setDeviceNameIsNull()
1066 verify(mDevice, never()).setAlias(any()); in setName_setDeviceNameIsEmpty()
1122 assertThat(mSubCachedDevice.mDevice).isEqualTo(mDevice); in switchSubDeviceContent()
[all …]
H A DLocalBluetoothProfileManagerTest.java65 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()
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
H A DCachedBluetoothDevice.java80 BluetoothDevice mDevice; field in CachedBluetoothDevice
161 mDevice = device; in CachedBluetoothDevice()
316 mDevice.disconnect(); in disconnect()
444 mDevice.connect(); in connectDevice()
494 if (!mDevice.createBond()) { in startPairing()
543 return mDevice; in getDevice()
552 return mDevice.getAddress(); in getAddress()
586 mDevice.setAlias(name); in setName()
989 return mDevice.equals(((CachedBluetoothDevice) o).mDevice); in equals()
1499 mDevice = mSubDevice.mDevice; in switchSubDeviceContent()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/
H A DBluetoothMediaDeviceTest.java43 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()
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()
92 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isNotUntetheredHeadset_returnFalse()
[all …]
H A DMediaManagerTest.java43 private MediaDevice mDevice; field in MediaManagerTest
53 when(mDevice.getId()).thenReturn(TEST_ID); in setUp()
97 mMediaManager.mMediaDevices.add(mDevice); in findMediaDevice_idExist_shouldReturnMediaDevice()
101 assertThat(device.getId()).isEqualTo(mDevice.getId()); in findMediaDevice_idExist_shouldReturnMediaDevice()
106 mMediaManager.mMediaDevices.add(mDevice); in findMediaDevice_idNotExist_shouldReturnNull()
/aosp14/frameworks/base/core/tests/coretests/src/android/widget/
H A DFloatingToolbarUtils.java34 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 …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
H A DUsbDialogHelper.java47 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()
133 return mDevice != null && mDevice.getHasAudioCapture(); in deviceHasAudioCapture()
140 return mDevice != null && mDevice.getHasAudioPlayback(); in deviceHasAudioPlayback()
172 mUsbService.grantDevicePermission(mDevice, mUid); in grantUidAccessPermission()
222 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in confirmDialogStartActivity()
248 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in sendPermissionDialogResponse()
268 desc = mDevice.getProductName(); in getDeviceDescription()
[all …]
H A DUsbResolverActivity.java52 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 …]
/aosp14/frameworks/base/tests/RollbackTest/lib/src/com/android/tests/rollback/host/
H A DWatchdogEventLogger.java32 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()
/aosp14/frameworks/base/tests/SystemMemoryTest/host/src/com/android/tests/sysmem/host/
H A DCujs.java24 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()
H A DDevice.java27 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()
H A DMetrics.java35 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()
/aosp14/frameworks/base/tests/ApkVerityTest/src/com/android/apkverity/
H A DApkVerityTest.java92 private ITestDevice mDevice; field in ApkVerityTest
97 mDevice = getDevice(); in setUp()
99 mDevice.getProperty("pm.dexopt.dm.require_fsverity")); in setUp()
403 assertTrue(BlockDeviceWriter.canReadByte(mDevice, apkPath, in testFsverityFailToReadModifiedBlockAtFront()
411 BlockDeviceWriter.dropCaches(mDevice); in testFsverityFailToReadModifiedBlockAtFront()
432 assertTrue(BlockDeviceWriter.canReadByte(mDevice, apkPath, in testFsverityFailToReadModifiedBlockAtBack()
440 BlockDeviceWriter.dropCaches(mDevice); in testFsverityFailToReadModifiedBlockAtBack()
464 BlockDeviceWriter.dropCaches(mDevice); in verifyInstalledFilesHaveFsverity()
507 mDevice.executeShellV2Command("kill -10 " + openFilePID); in forceGCOnOpenFilesProcess()
549 CommandResult result = mDevice.executeShellV2Command(cmd); in expectRemoteCommandToSucceed()
[all …]
/aosp14/frameworks/base/libs/hwui/renderthread/
H A DVulkanManager.cpp117 if (mDevice != VK_NULL_HANDLE) { in ~VulkanManager()
118 mDeviceWaitIdle(mDevice); in ~VulkanManager()
119 mDestroyDevice(mDevice, nullptr); in ~VulkanManager()
128 mDevice = VK_NULL_HANDLE; in ~VulkanManager()
391 if (mDevice != VK_NULL_HANDLE) { in initialize()
427 backendContext.fDevice = mDevice; in createContext()
448 .device = mDevice, in getVkFunctorInitParams()
534 VkDevice mDevice; member
630 mDeviceWaitIdle(mDevice); in swapBuffers()
712 err = mImportSemaphoreFdKHR(mDevice, &importInfo); in fenceWait()
[all …]
/aosp14/frameworks/base/services/core/java/com/android/server/hdmi/
H A DDelayedMessageBuffer.java30 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()
/aosp14/frameworks/base/services/tests/apexsystemservices/src/com/android/server/
H A DApexSystemServicesTestCases.java58 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()
/aosp14/frameworks/base/services/usb/java/com/android/server/usb/
H A DUsbSerialReader.java44 private Object mDevice; field in UsbSerialReader
67 mDevice = device; in setDevice()
96 if (mDevice instanceof UsbDevice) { in getSerial()
98 .checkPermission((UsbDevice) mDevice, packageName, pid, uid); in getSerial()
101 .checkPermission((UsbAccessory) mDevice, pid, uid); in getSerial()
/aosp14/frameworks/base/services/core/jni/tvinput/
H A DBufferProducerThread.cpp24 mDevice(device), in BufferProducerThread()
62 mDevice->cancel_capture(mDevice, mDeviceId, mStream.stream_id, mSeq); in setSurfaceLocked()
141 mDevice->request_capture(mDevice, mDeviceId, mStream.stream_id, buffer->handle, ++mSeq); in threadLoop()
/aosp14/frameworks/base/media/java/android/mtp/
H A DMtpDevice.java44 private final UsbDevice mDevice; field in MtpDevice
67 mDevice = device; in MtpDevice()
90 result = native_open(mDevice.getDeviceName(), connection.getFileDescriptor()); in open()
144 return mDevice.getDeviceName(); in getDeviceName()
155 return mDevice.getDeviceId(); in getDeviceId()
160 return mDevice.getDeviceName(); in toString()
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/
H A DAccessibilityShortcutChooserActivityTest.java87 private UiDevice mDevice; field in AccessibilityShortcutChooserActivityTest
106 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp()
107 mDevice.wakeUp(); in setUp()
138 if (mDevice.wait(Until.hasObject(By.text(DENY_LABEL)), UI_TIMEOUT_MS)) { in doubleClickTestServiceAndClickDenyButton_permissionDialogDoesNotExist()
169 mDevice.wait(Until.hasObject(By.text(ONE_HANDED_MODE)), UI_TIMEOUT_MS); in popEditShortcutMenuList_oneHandedModeEnabled_shouldBeInListView()
186 UiObject2 editButton = mDevice.findObject(By.text(EDIT_LABEL)); in openShortcutsList()
190 mDevice.wait(Until.hasObject(By.textStartsWith(LIST_TITLE_LABEL)), UI_TIMEOUT_MS); in openShortcutsList()

12