/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/ |
A2dpServiceTest.java | 66 private BluetoothDevice mTestDevice; 112 mTestDevice = mAdapter.getRemoteDevice("00:01:02:03:04:05"); 113 mA2dpService.setPriority(mTestDevice, BluetoothProfile.PRIORITY_UNDEFINED); 236 connectDevice(mTestDevice); 237 Assert.assertTrue(mA2dpService.setActiveDevice(mTestDevice)); 238 verify(mA2dpNativeInterface).setActiveDevice(mTestDevice); 262 mA2dpService.getPriority(mTestDevice)); 264 Assert.assertTrue(mA2dpService.setPriority(mTestDevice, BluetoothProfile.PRIORITY_OFF)); 267 mA2dpService.getPriority(mTestDevice)); 269 Assert.assertTrue(mA2dpService.setPriority(mTestDevice, BluetoothProfile.PRIORITY_ON)) [all...] |
/tools/tradefederation/core/src/com/android/tradefed/device/ |
BackgroundDeviceAction.java | 46 private ITestDevice mTestDevice; 66 mTestDevice = device; 86 mTestDevice.getSerialNumber()); 94 CLog.d("Starting %s for %s.", mDescriptor, mTestDevice.getSerialNumber()); 97 mTestDevice.getIDevice().executeShellCommand(mCommand, mReceiver, 113 mDescriptor, mTestDevice.getSerialNumber()); 142 CLog.d("Waiting for device %s online before starting.", mTestDevice.getSerialNumber()); 145 if ((mTestDevice.getIDevice() instanceof StubDevice) 146 || !TestDeviceState.ONLINE.equals(mTestDevice.getDeviceState())) { 149 CLog.d("Device %s now online.", mTestDevice.getSerialNumber()) [all...] |
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
TestDeviceStressTest.java | 48 private TestDevice mTestDevice; 54 mTestDevice = (TestDevice)getDevice(); 55 mMonitor = mTestDevice.getDeviceStateMonitor(); 76 mTestDevice.reboot(); 84 mTestDevice.rebootIntoBootloader(); 86 mTestDevice.reboot(); 96 mTestDevice.reboot(); 113 String externalStorePath = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 123 mTestDevice.executeShellCommand(String.format("rm -r %s", deviceFilePath)); 125 mTestDevice.doesFileExist(deviceFilePath)) [all...] |
TestDeviceTest.java | 86 private TestDevice mTestDevice; 140 mTestDevice = 152 mTestDevice.setRecovery(mMockRecovery); 153 mTestDevice.setCommandTimeout(100); 154 mTestDevice.setLogStartDelay(-1); 176 assertTrue(mTestDevice.enableAdbRoot()); 185 assertTrue(mTestDevice.enableAdbRoot()); 192 boolean enableRoot = mTestDevice.getOptions().isEnableAdbRoot(); 193 OptionSetter setter = new OptionSetter(mTestDevice.getOptions()); 196 assertFalse(mTestDevice.enableAdbRoot()) [all...] |
NativeDeviceTest.java | 77 private TestableAndroidNativeDevice mTestDevice; 123 mTestDevice = new TestableAndroidNativeDevice() { 139 mTestDevice.setRecovery(mMockRecovery); 140 mTestDevice.setCommandTimeout(100); 141 mTestDevice.setLogStartDelay(-1); 150 mTestDevice.installPackage(new File(""), false); 165 mTestDevice.uninstallPackage(""); 180 mTestDevice.installPackage(new File(""), false, false); 195 mTestDevice.installPackageForUser(new File(""), false, 0); 210 mTestDevice.installPackageForUser(new File(""), false, false, 0) [all...] |
TestDeviceFuncTest.java | 65 private TestDevice mTestDevice; 72 mTestDevice = (TestDevice) device; 77 return mTestDevice; 82 mMonitor = mTestDevice.getDeviceStateMonitor(); 84 mTestDevice.waitForDeviceAvailable(); 90 InputStreamSource bugreport = mTestDevice.getBugreport(); 106 if (mTestDevice.getApiLevel() < 24) { 112 f = (FileInputStreamSource) mTestDevice.getBugreportz(); 143 final String output = mTestDevice.executeShellCommand("ls"); 166 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG) [all...] |
RemoteAndroidDeviceTest.java | 38 private RemoteAndroidDevice mTestDevice; 68 mTestDevice = new TestableRemoteAndroidDevice(); 69 mTestDevice.setRecovery(mMockRecovery); 89 assertTrue(mTestDevice.adbTcpConnect("localhost", "1234")); 105 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); 123 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); 136 assertTrue(mTestDevice.adbTcpDisconnect("localhost", "1234")); 149 assertFalse(mTestDevice.adbTcpDisconnect("localhost", "1234")); 154 assertEquals("localhost", mTestDevice.getHostName()); 155 assertEquals("1234", mTestDevice.getPortNum()) [all...] |
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
DeviceBatteryLevelChecker.java | 45 private ITestDevice mTestDevice = null; 109 Assert.assertNotNull(mTestDevice); 111 Integer batteryLevel = checkBatteryLevel(mTestDevice); 115 mTestDevice.getSerialNumber()); 120 "to level %d", batteryLevel, mMaxBattery, mTestDevice.getSerialNumber(), 125 mMaxBattery, mTestDevice.getSerialNumber()); 131 CLog.d("Rebooting device %s prior to holding", mTestDevice.getSerialNumber()); 132 mTestDevice.reboot(); 136 turnScreenOff(mTestDevice); 148 Integer newLevel = checkBatteryLevel(mTestDevice); [all...] |
/tools/tradefederation/contrib/src/com/android/media/tests/ |
PanoramaBenchMarkTest.java | 42 private ITestDevice mTestDevice = null; 55 Assert.assertNotNull(mTestDevice); 57 String dataStore = mTestDevice.getMountPoint(IDevice.MNT_DATA); 58 String externalStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 60 mTestDevice.executeShellCommand(String.format("chmod 777 %s/local/tmp/panorama_bench", 63 String shellOutput = mTestDevice.executeShellCommand( 91 mTestDevice = device; 99 return mTestDevice; 109 String externalStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 110 mTestDevice.executeShellCommand(String.format("rm -r %s/panorama_input", externalStore)) [all...] |
MediaMemoryTest.java | 67 ITestDevice mTestDevice = null; 108 Assert.assertNotNull(mTestDevice); 111 TEST_RUNNER_NAME, mTestDevice.getIDevice()); 122 mTestDevice); 129 mTestDevice.runInstrumentationTests(runner, bugListener); 132 mTestDevice.runInstrumentationTests(runner, bugListener); 142 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 144 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, outputPath)); 147 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, "*.dump")); 157 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE) [all...] |
VideoEditingMemoryTest.java | 67 ITestDevice mTestDevice = null; 104 Assert.assertNotNull(mTestDevice); 107 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); 115 mTestDevice); 119 mTestDevice.runInstrumentationTests(runner, bugListener); 130 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 132 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, 136 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, 148 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 150 String out = mTestDevice.executeShellCommand(String.format("ls %s/%s" [all...] |
CameraShotToShotLatencyTest.java | 60 ITestDevice mTestDevice = null; 67 Assert.assertNotNull(mTestDevice); 70 TEST_RUNNER_NAME, mTestDevice.getIDevice()); 73 BugreportCollector bugListener = new BugreportCollector(listener, mTestDevice); 76 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, bugListener)); 88 mTestDevice = device; 96 return mTestDevice; 106 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 107 mTestDevice.executeShellCommand(String.format("rm -r %s/DCIM", extStore)); 108 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)) [all...] |
CameraSettingsTest.java | 75 ITestDevice mTestDevice = null; 82 Assert.assertNotNull(mTestDevice); 85 TEST_RUNNER_NAME, mTestDevice.getIDevice()); 93 BugreportCollector bugListener = new BugreportCollector(listener, mTestDevice); 96 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, bugListener)); 108 mTestDevice = device; 116 return mTestDevice; 126 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 127 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); 151 outputFile = mTestDevice.pullFileFromExternal(mOutputPath) [all...] |
MediaPlayerStressTest.java | 67 ITestDevice mTestDevice = null; 96 Assert.assertNotNull(mTestDevice); 98 TEST_RUNNER_NAME, mTestDevice.getIDevice()); 103 mTestDevice); 109 mTestDevice.runInstrumentationTests(runner, bugListener); 119 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 120 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); 132 outputFile = mTestDevice.pullFileFromExternal(mOutputPath); 206 mTestDevice = device; 211 return mTestDevice; [all...] |
MediaStressTest.java | 58 ITestDevice mTestDevice = null; 79 Assert.assertNotNull(mTestDevice); 82 TEST_RUNNER_NAME, mTestDevice.getIDevice()); 87 mTestDevice.runInstrumentationTests(runner, listener); 96 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 97 mTestDevice.executeShellCommand(String.format("rm %s/temp*.3gp", extStore)); 98 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, OUTPUT_PATH)); 110 outputFile = mTestDevice.pullFileFromExternal(OUTPUT_PATH); 219 mTestDevice = device; 224 return mTestDevice; [all...] |
VideoEditingPerformanceTest.java | 64 ITestDevice mTestDevice = null; 137 Assert.assertNotNull(mTestDevice); 140 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); 145 mTestDevice); 149 mTestDevice.runInstrumentationTests(runner, bugListener); 160 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 161 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, OUTPUT_PATH)); 173 outputFile = mTestDevice.pullFileFromExternal(OUTPUT_PATH); 251 mTestDevice = device; 256 return mTestDevice; [all...] |
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/ |
HeadsetStateMachineTest.java | 70 private BluetoothDevice mTestDevice; 95 mTestDevice = mAdapter.getRemoteDevice("00:01:02:03:04:05"); 99 doReturn(true).when(mNativeInterface).connectHfp(mTestDevice); 100 doReturn(true).when(mNativeInterface).disconnectHfp(mTestDevice); 101 doReturn(true).when(mNativeInterface).connectAudio(mTestDevice); 102 doReturn(true).when(mNativeInterface).disconnectAudio(mTestDevice); 125 .makeStateMachine(mTestDevice, mHandlerThread.getLooper(), mHeadsetService, 167 mHeadsetStateMachine.sendMessage(HeadsetStateMachine.CONNECT, mTestDevice); 170 HeadsetTestUtils.verifyConnectionStateBroadcast(mTestDevice, 184 HeadsetHalConstants.CONNECTION_STATE_CONNECTED, mTestDevice)); [all...] |
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
BugreportzMetricCollectorTest.java | 42 @Mock ITestDevice mTestDevice; 52 doReturn(Arrays.asList(mTestDevice)).when(mContext).getDevices(); 54 when(mTestDevice.logBugreport(anyString(), any(ITestInvocationListener.class))) 65 when(mTestDevice.logBugreport("bugreportz-1", mForwarder)).thenReturn(true); 69 mBugreportzMetricCollector.collect(mTestDevice, runData); 71 verify(mTestDevice).logBugreport(eq("bugreport-1"), eq(mForwarder));
|
/tools/tradefederation/core/prod-tests/src/com/android/graphics/tests/ |
UiPerformanceTest.java | 53 private ITestDevice mTestDevice = null; 80 mTestDevice = testDevice; 85 return mTestDevice; 90 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); 93 if (!mTestDevice.doesFileExist(rawFileDir)) { 95 mTestDevice.executeShellCommand(String.format("mkdir \"%s\"", rawFileDir)); 98 mTestDevice.executeShellCommand(String.format("rm %s/*", rawFileDir)); 109 Assert.assertNotNull(mTestDevice); 114 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); 118 BugreportCollector(standardListener, mTestDevice); [all...] |
ImageProcessingTest.java | 48 private ITestDevice mTestDevice = null; 70 Assert.assertNotNull(mTestDevice); 76 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); 81 BugreportCollector(standardListener, mTestDevice); 87 mTestDevice.runInstrumentationTests(runner, collectListener, bugListener, standardListener); 90 try (InputStreamSource bugreport = mTestDevice.getBugreport()) { 142 mTestDevice = testDevice; 147 return mTestDevice;
|
/tools/tradefederation/core/prod-tests/src/com/android/performance/tests/ |
StartupMetricsTest.java | 63 ITestDevice mTestDevice = null; 67 Assert.assertNotNull(mTestDevice); 87 mTestDevice.rebootIntoBootloader(); 88 mTestDevice.setUseFastbootErase(false); 89 mTestDevice.fastbootWipePartition("userdata"); 90 mTestDevice.executeFastbootCommand("reboot"); 91 mTestDevice.waitForDeviceOnline(10 * 60 * 1000); 93 Assert.assertTrue(waitForBootComplete(mTestDevice, mBootTimeMs, mBootPoolTimeMs)); 98 mTestDevice.setRecoveryMode(RecoveryMode.NONE); 100 mTestDevice.nonBlockingReboot() [all...] |
HermeticMemoryTest.java | 86 private ITestDevice mTestDevice = null; 96 String preMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); 109 mTestDevice.executeShellCommand(DROP_CACHE); 113 mTestDevice.executeShellCommand(String.format(AM_START, mComponentName)); 116 String postMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); 118 String dumpsysMemInfo = mTestDevice.executeShellCommand( 120 String mapsInfo = mTestDevice.executeShellCommand( 122 String sMapsInfo = mTestDevice.executeShellCommand( 124 String statusInfo = mTestDevice.executeShellCommand( 173 ProcessInfo processData = mTestDevice.getProcessByName(pkgActivitySplit[0]) [all...] |
/tools/tradefederation/core/prod-tests/src/com/android/framework/tests/ |
DataIdleTest.java | 47 ITestDevice mTestDevice = null; 75 Assert.assertNotNull(mTestDevice); 76 mTestHelper = new DataIdleTestHelper(mTestDevice); 79 mMobileDataOnly, !mTestDevice.isWifiEnabled()); 89 mTestDevice.getIDevice()); 99 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, collectingListener)); 123 try (InputStreamSource bugreport = mTestDevice.getBugreport()) { 134 String output = mTestDevice.executeShellCommand("dumpsys netstats detail full"); 156 mTestDevice = device; 161 return mTestDevice; [all...] |
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hid/ |
HidDeviceTest.java | 79 private BluetoothDevice mTestDevice; 114 mTestDevice = mAdapter.getRemoteDevice("10:11:12:13:14:15"); 290 mHidDeviceService.onApplicationStateChangedFromNative(mTestDevice, true); 299 mHidDeviceService.onApplicationStateChangedFromNative(mTestDevice, false); 312 mHidDeviceService.sendReport(mTestDevice, SAMPLE_REPORT_ID, SAMPLE_HID_REPORT)); 322 mHidDeviceService.onApplicationStateChangedFromNative(mTestDevice, true); 329 mHidDeviceService.sendReport(mTestDevice, SAMPLE_REPORT_ID, SAMPLE_HID_REPORT)); 348 mHidDeviceService.replyReport(mTestDevice, SAMPLE_REPORT_TYPE, SAMPLE_REPORT_ID, 359 mHidDeviceService.onApplicationStateChangedFromNative(mTestDevice, true); 366 mHidDeviceService.replyReport(mTestDevice, SAMPLE_REPORT_TYPE, SAMPLE_REPORT_ID [all...] |
/tools/tradefederation/core/prod-tests/src/com/android/wireless/tests/ |
WifiStressTest.java | 57 private ITestDevice mTestDevice = null; 182 mTestDevice.executeShellCommand(command); 185 mTestDevice.reboot(); 195 mTestDevice.executeShellCommand("svc power stayon " + on); 200 mTestDevice = testDevice; 205 return mTestDevice; 215 Assert.assertNotNull(mTestDevice); 223 final RadioHelper radioHelper = new RadioHelper(mTestDevice); 229 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); 242 BugreportCollector(standardListener, mTestDevice); [all...] |