/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestScheduledExecutorService.java | 71 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { in awaitTermination() argument 98 TimeUnit unit) throws InterruptedException { in invokeAll() argument 109 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) in invokeAny() argument 120 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { in schedule() argument 121 TestFuture future = new TestFuture(command, delay, unit); in schedule() 127 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { in schedule() argument 133 TimeUnit unit) { in scheduleAtFixedRate() argument 139 long delay, TimeUnit unit) { in scheduleWithFixedDelay() argument 186 final TimeUnit unit; field in TestScheduledExecutorService.TestFuture 188 public TestFuture(Runnable runnable, long delay, TimeUnit unit) { in TestFuture() argument [all …]
|
D | LatchedConsumer.java | 32 public void assertNotCalled(long timeout, TimeUnit unit) in assertNotCalled() argument 34 assertFalse(latch.await(timeout, unit)); in assertNotCalled() 37 public void assertCalled(long timeout, TimeUnit unit) in assertCalled() argument 39 assertTrue(latch.await(timeout, unit)); in assertCalled()
|
D | TestPredicate.java | 66 public @Nullable T waitForCall(int timeout, TimeUnit unit) in waitForCall() argument 68 return mFuture.get(timeout, unit); in waitForCall()
|
/packages/apps/Contacts/src/com/android/contacts/util/concurrent/ |
D | ContactsExecutors.java | 111 public ScheduledFuture<?> schedule(final Runnable command, long delay, TimeUnit unit) { in schedule() argument 113 .fromRunnable(mHandler, delay, unit, command); in schedule() 114 mHandler.postDelayed(future, unit.toMillis(delay)); in schedule() 120 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { in schedule() argument 121 final HandlerFuture<V> future = new HandlerFuture<>(mHandler, delay, unit, callable); in schedule() 122 mHandler.postDelayed(future, unit.toMillis(delay)); in schedule() 129 long period, TimeUnit unit) { in scheduleAtFixedRate() argument 136 long delay, TimeUnit unit) { in scheduleWithFixedDelay() argument 160 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { in awaitTermination() argument 192 public long getDelay(TimeUnit unit) { in getDelay() argument [all …]
|
D | FuturesUtil.java | 27 TimeUnit unit, Handler handler) { in withTimeout() argument 28 return withTimeout(future, time, unit, ContactsExecutors.newHandlerExecutor(handler)); in withTimeout() 40 TimeUnit unit, ScheduledExecutorService executor) { in withTimeout() argument 48 }, time, unit); in withTimeout()
|
/packages/apps/Car/Settings/src/com/android/car/settings/units/ |
D | UnitsFuelConsumptionPreferenceController.java | 48 protected String generateSummaryFromUnit(Unit unit) { in generateSummaryFromUnit() argument 49 return getAbbreviationByVolumeUnit(unit); in generateSummaryFromUnit() 53 protected String generateEntryStringFromUnit(Unit unit) { in generateEntryStringFromUnit() argument 54 return getContext().getString(R.string.units_list_entry, getAbbreviationByVolumeUnit(unit), in generateEntryStringFromUnit() 55 getPronouncedNameByVolumeUnit(unit)); in generateEntryStringFromUnit() 58 private String getAbbreviationByVolumeUnit(Unit unit) { in getAbbreviationByVolumeUnit() argument 60 switch (unit.getId()) { in getAbbreviationByVolumeUnit() 81 private String getPronouncedNameByVolumeUnit(Unit unit) { in getPronouncedNameByVolumeUnit() argument 83 switch (unit.getId()) { in getPronouncedNameByVolumeUnit()
|
D | UnitsEnergyConsumptionPreferenceController.java | 51 protected String generateSummaryFromUnit(Unit unit) { in generateSummaryFromUnit() argument 52 return getAbbreviationByUnit(unit); in generateSummaryFromUnit() 56 protected String generateEntryStringFromUnit(Unit unit) { in generateEntryStringFromUnit() argument 58 switch (unit.getId()) { in generateEntryStringFromUnit() 66 return getContext().getString(R.string.units_list_entry, getAbbreviationByUnit(unit), in generateEntryStringFromUnit() 71 private String getAbbreviationByUnit(Unit unit) { in getAbbreviationByUnit() argument 74 getContext().getString(unit.getAbbreviationResId())); in getAbbreviationByUnit()
|
D | UnitsBasePreferenceController.java | 144 Unit unit = mSupportedUnits[i]; in getEntriesOfSupportedUnits() local 145 names[i] = generateEntryStringFromUnit(unit); in getEntriesOfSupportedUnits() 150 protected String generateSummaryFromUnit(Unit unit) { in generateSummaryFromUnit() argument 151 return getContext().getString(unit.getAbbreviationResId()); in generateSummaryFromUnit() 154 protected String generateEntryStringFromUnit(Unit unit) { in generateEntryStringFromUnit() argument 156 getContext().getString(unit.getAbbreviationResId()), in generateEntryStringFromUnit() 157 getContext().getString(unit.getNameResId())); in generateEntryStringFromUnit()
|
D | CarUnitsManager.java | 121 Unit unit = UnitsMap.MAP.get(unitId); in getUnitsSupportedByProperty() local 122 units.add(unit); in getUnitsSupportedByProperty() 128 Unit unit = UnitsMap.MAP.get(unitId); in getUnitsSupportedByProperty() local 129 result[i] = unit; in getUnitsSupportedByProperty()
|
/packages/apps/Car/CompanionDeviceSupport/tests/unit/ |
D | README.md | 1 # Instructions for running unit tests 3 ### Build unit test module 5 `m CompanionDeviceSupport-unit-tests` 9 …b install -r -t $OUT/testcases/CompanionDeviceSupport-unit-tests/arm64/CompanionDeviceSupport-unit… 13 `adb shell am instrument -w com.android.car.companiondevicesupport.tests.unit` 17 …m.android.car.companiondevicesupport.<classPath> com.android.car.companiondevicesupport.tests.unit` 21 ….companiondevicesupport.<classPath>#<testMethod> com.android.car.companiondevicesupport.tests.unit`
|
/packages/apps/Car/libs/connected-device-lib/tests/unit/ |
D | README.md | 1 # Instructions for running unit tests 3 ### Build unit test module 5 `m connected-device-lib-unit-tests` 9 `adb install -r -t $OUT/testcases/connected-device-lib-unit-tests/arm64/connected-device-lib-unit-t… 13 `adb shell am instrument -w com.android.car.connecteddevice.tests.unit` 17 …-w -e class com.android.car.connecteddevice.<classPath> com.android.car.connecteddevice.tests.unit` 21 …om.android.car.connecteddevice.<classPath>#<testMethod> com.android.car.connecteddevice.tests.unit`
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/concurrent/ |
D | UniqueExecutor.java | 37 @NonNull TimeUnit unit, @NonNull BlockingQueue<Runnable> workQueue) { in UniqueExecutor() argument 38 super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue); in UniqueExecutor() 42 @NonNull TimeUnit unit, @NonNull BlockingQueue<Runnable> workQueue, in UniqueExecutor() argument 44 super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory); in UniqueExecutor() 48 @NonNull TimeUnit unit, @NonNull BlockingQueue<Runnable> workQueue, in UniqueExecutor() argument 50 super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler); in UniqueExecutor() 54 @NonNull TimeUnit unit, @NonNull BlockingQueue<Runnable> workQueue, in UniqueExecutor() argument 56 super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, in UniqueExecutor()
|
/packages/apps/Dialer/java/com/android/incallui/autoresizetext/ |
D | AutoResizeTextView.java | 94 public final void setTextSize(int unit, float size) { in setTextSize() argument 95 float maxTextSize = TypedValue.applyDimension(unit, size, displayMetrics); in setTextSize() 115 public final void setMinTextSize(int unit, float size) { in setMinTextSize() argument 116 float minTextSize = TypedValue.applyDimension(unit, size, displayMetrics); in setMinTextSize() 134 public final void setResizeStepUnit(int unit) { in setResizeStepUnit() argument 135 if (resizeStepUnit != unit) { in setResizeStepUnit() 136 resizeStepUnit = unit; in setResizeStepUnit()
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/fakes/ |
D | FakeClock.java | 72 public void increment(TimeUnit unit) { in increment() argument 73 increment(unit, 1); in increment() 82 public void increment(TimeUnit unit, long amount) { in increment() argument 83 mCurrentTimeMillis += unit.toMillis(amount); in increment()
|
/packages/apps/Car/Cluster/src/android/car/cluster/ |
D | NavStateController.java | 329 String unit = ""; in formatDistance() local 333 unit = "m"; in formatDistance() 336 unit = "km"; in formatDistance() 339 unit = "mi"; in formatDistance() 342 unit = "yd"; in formatDistance() 345 unit = "ft"; in formatDistance() 348 return String.format("In %s %s", distance.getDisplayValue(), unit); in formatDistance()
|
/packages/services/Car/service/src/com/android/car/garagemode/ |
D | WakeupPolicy.java | 121 char unit = intervalStr.charAt(intervalStr.length() - 1); in parseRule() local 135 if (!TIME_UNITS_LOOKUP_SEC.containsKey(unit)) { in parseRule() 136 LOG.e("Time units map does not contain extension " + unit); in parseRule() 150 interval *= TIME_UNITS_LOOKUP_SEC.get(unit); in parseRule()
|
/packages/modules/DnsResolver/ |
D | README-DoT.md | 42 annotations) to minimize the likelihood of a latent threading bug. The unit tests are 114 For unit testing, we would like to be able to mock out `DnsTlsSocket`. This is 115 particularly required for unit testing of `DnsTlsDispatcher` and `DnsTlsTransport`. 116 To make these unit tests possible, this code uses a dependency injection pattern: 121 which in production is a `DnsTlsSocketFactory`. However, in unit tests, we can 122 substitute a test factory that returns a fake socket, so that the unit tests can
|
/packages/apps/StorageManager/tests/unit/ |
D | README | 8 $ adb shell am instrument -w com.android.storagemanager.tests.unit/androidx.test.runner.AndroidJUni… 11 …class com.android.storagemanager.<class> com.android.storagemanager.tests.unit/androidx.test.runne… 14 …om.android.storagemanager.<class>#<test> com.android.storagemanager.tests.unit/androidx.test.runne…
|
/packages/apps/Settings/tests/unit/ |
D | README | 8 $ adb shell am instrument -w com.android.settings.tests.unit/androidx.test.runner.AndroidJUnitRunner 11 $ adb shell am instrument -w -e class com.android.settings.<class> com.android.settings.tests.unit/… 14 …w -e class com.android.settings.<class>#<test> com.android.settings.tests.unit/androidx.test.runne…
|
/packages/apps/PermissionController/src/com/android/packageinstaller/role/utils/ |
D | UiUtils.java | 49 public static float dpToPx(@Dimension(unit = Dimension.DP) float dp, @NonNull Context context) { in dpToPx() 64 public static int dpToPxOffset(@Dimension(unit = Dimension.DP) float dp, in dpToPxOffset() 79 public static int dpToPxSize(@Dimension(unit = Dimension.DP) float dp, in dpToPxSize()
|
/packages/apps/Camera2/src/com/android/camera/async/ |
D | ForwardingBufferQueue.java | 43 public T getNext(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, in getNext() argument 45 return mDelegate.getNext(timeout, unit); in getNext()
|
D | CountableBufferQueue.java | 89 public T getNext(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, in getNext() argument 91 T result = mBufferQueue.getNext(timeout, unit); in getNext()
|
/packages/apps/DocumentsUI/tests/ |
D | README | 3 unit tests are under the 'unit/' dir, function under 'functional/'.
|
D | Android.bp | 28 "unit/**/*.java", 60 "unit/**/*.java",
|
/packages/apps/CarrierConfig/ |
D | README | 16 If you make changes to the XML files, run the unit tests to ensure they can still be parsed: 17 runtest carrierconfig-unit
|