Home
last modified time | relevance | path

Searched refs:unit (Results 1 – 25 of 70) sorted by relevance

123

/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
DTestScheduledExecutorService.java71 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 …]
DLatchedConsumer.java32 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()
DTestPredicate.java66 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/
DContactsExecutors.java111 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 …]
DFuturesUtil.java26 TimeUnit unit, Handler handler) { in withTimeout() argument
27 return withTimeout(future, time, unit, ContactsExecutors.newHandlerExecutor(handler)); in withTimeout()
39 TimeUnit unit, ScheduledExecutorService executor) { in withTimeout() argument
47 }, time, unit); in withTimeout()
/packages/apps/Car/Settings/src/com/android/car/settings/units/
DUnitsFuelConsumptionPreferenceController.java48 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()
DUnitsEnergyConsumptionPreferenceController.java51 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()
DUnitsBasePreferenceController.java144 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()
DCarUnitsManager.java121 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/UniversalMediaPlayer/java/com/android/pump/concurrent/
DUniqueExecutor.java37 @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/
DAutoResizeTextView.java94 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/
DFakeClock.java72 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/
DNavStateController.java302 String unit = ""; in formatDistance() local
306 unit = "m"; in formatDistance()
309 unit = "km"; in formatDistance()
312 unit = "mi"; in formatDistance()
315 unit = "yd"; in formatDistance()
318 unit = "ft"; in formatDistance()
321 return String.format("In %s %s", distance.getDisplayValue(), unit); in formatDistance()
/packages/services/Car/service/src/com/android/car/garagemode/
DWakeupPolicy.java121 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/apps/StorageManager/tests/unit/
DREADME8 $ 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/
DREADME8 $ 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/
DUiUtils.java49 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/
DForwardingBufferQueue.java43 public T getNext(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, in getNext() argument
45 return mDelegate.getNext(timeout, unit); in getNext()
DCountableBufferQueue.java89 public T getNext(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, in getNext() argument
91 T result = mBufferQueue.getNext(timeout, unit); in getNext()
DConcurrentBufferQueue.java174 public T getNext(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, in getNext() argument
176 Entry<T> nextEntry = mQueue.poll(timeout, unit); in getNext()
/packages/apps/DocumentsUI/tests/
DREADME3 unit tests are under the 'unit/' dir, function under 'functional/'.
DAndroid.bp28 "unit/**/*.java",
60 "unit/**/*.java",
/packages/apps/CarrierConfig/
DREADME16 If you make changes to the XML files, run the unit tests to ensure they can still be parsed:
17 runtest carrierconfig-unit
/packages/apps/Messaging/src/com/android/messaging/sms/
DSmsReleaseStorage.java49 public Duration(final int count, final int unit) { in Duration() argument
51 mUnit = unit; in Duration()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DDictionaryFacilitator.java144 void waitForLoadingMainDictionaries(final long timeout, final TimeUnit unit) in waitForLoadingMainDictionaries() argument
148 void waitForLoadingDictionariesForTesting(final long timeout, final TimeUnit unit) in waitForLoadingDictionariesForTesting() argument

123