Searched refs:when (Results 1 - 25 of 100) sorted by relevance

1234

/frameworks/base/include/androidfw/
H A DZipUtils.h67 static inline void zipTimeToTimespec(uint32_t when, struct tm* timespec) { argument
68 const uint32_t date = when >> 16;
73 timespec->tm_hour = (when >> 11) & 0x1F;
74 timespec->tm_min = (when >> 5) & 0x3F;
75 timespec->tm_sec = (when & 0x1F) << 1;
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/ext/
H A Dlist_ext.kt22 public fun List<String>.joinToCamelCase(): String = when(size()) {
28 public fun List<String>.joinToCamelCaseAsVar(): String = when(size()) {
34 public fun Array<String>.joinToCamelCase(): String = when(size()) {
40 public fun Array<String>.joinToCamelCaseAsVar(): String = when(size()) {
/frameworks/volley/src/test/java/com/android/volley/toolbox/
H A DAndroidAuthenticatorTest.java55 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
56 when(mFuture.getResult()).thenThrow(new AuthenticatorException("sadness!"));
65 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
66 when(mFuture.getResult()).thenReturn(bundle);
67 when(mFuture.isDone()).thenReturn(true);
68 when(mFuture.isCancelled()).thenReturn(false);
75 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
76 when(mFuture.getResult()).thenReturn(bundle);
77 when(mFuture.isDone()).thenReturn(true);
78 when(mFutur
[all...]
H A DImageLoaderTest.java47 when(mImageCache.getBitmap(anyString())).thenReturn(null);
55 when(mImageCache.getBitmap(anyString())).thenReturn(bitmap);
63 when(mImageCache.getBitmap(anyString())).thenReturn(null);
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
H A DCameraUtilsBinderDecoratorTest.java74 when(mock.doNothing()).thenReturn(SOME_ARBITRARY_DOUBLE);
75 when(mock.doSomethingPositive()).thenReturn(SOME_ARBITRARY_POSITIVE_INT);
76 when(mock.doSomethingNoError()).thenReturn(NO_ERROR);
77 when(mock.doSomethingPermissionDenied()).thenReturn(PERMISSION_DENIED);
78 when(mock.doSomethingAlreadyExists()).thenReturn(ALREADY_EXISTS);
79 when(mock.doSomethingBadValue()).thenReturn(BAD_VALUE);
80 when(mock.doSomethingDeadObject()).thenReturn(DEAD_OBJECT);
81 when(mock.doSomethingBadPolicy()).thenReturn(EACCES);
82 when(mock.doSomethingDeviceBusy()).thenReturn(EBUSY);
83 when(moc
[all...]
H A DImageReaderTest.java81 * Return null when there is nothing in the image queue.
85 when(mReader.acquireNextImage()).thenReturn(null);
86 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null);
95 when(mReader.acquireNextImage()).thenReturn(mImage1);
96 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null);
106 when(mReader.acquireNextImage()).thenReturn(mImage1);
107 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2).thenReturn(null);
118 when(mReader.acquireNextImage()).thenReturn(mImage1);
119 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2).
133 when(mReade
[all...]
/frameworks/base/libs/androidfw/tests/
H A DZipUtils_test.cpp41 long when = 0x3EDD7514; local
43 ZipUtils::zipTimeToTimespec(when, &t);
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/
H A DTextToSpeechTests.java47 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(passThrough)
50 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(passThrough)
77 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE).when(delegate).onIsLanguageAvailable(
79 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE).when(delegate).onLoadLanguage(
96 // Test 2 : Tests that when the language is successfully set
99 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onIsLanguageAvailable(
101 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onIsLanguageAvailable(
103 LittleMock.doReturn(TextToSpeech.LANG_COUNTRY_AVAILABLE).when(delegate).onLoadLanguage(
122 // TEST 3 : Tests that the language that is set does not change when the
124 LittleMock.doReturn(TextToSpeech.LANG_NOT_SUPPORTED).when(
[all...]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
H A DDateUtils.java38 public static String getKMLTimestamp(long when) { argument
41 c.setTimeInMillis(when);
/frameworks/volley/src/test/java/com/android/volley/
H A DRequestQueueTest.java53 when(req1.getTag()).thenReturn(tagA);
55 when(req2.getTag()).thenReturn(tagB);
57 when(req3.getTag()).thenReturn(tagA);
59 when(req4.getTag()).thenReturn(tagA);
H A DRequestQueueIntegrationTest.java81 when(mMockNetwork.performRequest(higherPriorityReq)).thenAnswer(delayAnswer);
82 when(mMockNetwork.performRequest(lowerPriorityReq)).thenReturn(mock(NetworkResponse.class));
119 when(mMockNetwork.performRequest(req1)).thenAnswer(delayAnswer);
120 when(mMockNetwork.performRequest(req2)).thenReturn(mock(NetworkResponse.class));
137 * Verify RequestFinishedListeners are informed when requests are canceled
153 when(mMockNetwork.performRequest(request)).thenAnswer(delayAnswer);
165 * Verify RequestFinishedListeners are informed when requests are successfully delivered
188 * Verify RequestFinishedListeners are informed when request errors
197 when(mMockNetwork.performRequest(request)).thenThrow(new VolleyError());
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DCarrierAppUtilsTest.java56 Mockito.when(mPackageManager.getApplicationInfo("com.example.missing.app",
72 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP,
95 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP,
97 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP))
114 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP,
116 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP))
133 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP,
135 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP))
152 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP,
154 Mockito.when(mTelephonyManage
[all...]
/frameworks/base/packages/SettingsLib/tests/src/com/android/settingslib/wifi/
H A DWifiTrackerTest.java80 Mockito.when(mWifiManager.isWifiEnabled()).thenReturn(true);
124 Mockito.when(mWifiManager.startScan()).thenReturn(true);
139 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
140 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
163 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
164 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
187 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
188 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
211 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
212 Mockito.when(mWifiManage
[all...]
/frameworks/native/services/inputflinger/
H A DInputReader.h201 // The transition from PRESS to SWIPE or FREEFORM gesture mode is made when
205 // The transition from PRESS to SWIPE gesture mode can only occur when the
212 // The transition from PRESS to SWIPE gesture mode can only occur when the
219 // Movement speed applies when the fingers are moving in the same direction.
225 // Zoom speed applies when the fingers are mostly moving relative to each other
379 nsecs_t when; member in struct:android::StylusState
388 when = other.when;
395 when = LLONG_MAX;
420 virtual void requestTimeoutAtTime(nsecs_t when)
1398 nsecs_t when; member in struct:android::TouchInputMapper::RawState
[all...]
H A DInputReader.cpp69 // Maximum number of slots supported when using the slot-based Multitouch Protocol B.
191 nsecs_t when, int32_t deviceId, uint32_t source,
201 NotifyKeyArgs args(when, deviceId, source, policyFlags,
202 action, 0, keyCode, 0, context->getGlobalMetaState(), when);
208 nsecs_t when, int32_t deviceId, uint32_t source,
210 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
213 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
356 addDeviceLocked(rawEvent->when, rawEvent->deviceId);
359 removeDeviceLocked(rawEvent->when, rawEvent->deviceId);
362 handleConfigurationChangedLocked(rawEvent->when);
190 synthesizeButtonKey(InputReaderContext* context, int32_t action, nsecs_t when, int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t lastButtonState, int32_t currentButtonState, int32_t buttonState, int32_t keyCode) argument
207 synthesizeButtonKeys(InputReaderContext* context, int32_t action, nsecs_t when, int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t lastButtonState, int32_t currentButtonState) argument
374 addDeviceLocked(nsecs_t when, int32_t deviceId) argument
405 removeDeviceLocked(nsecs_t when, int32_t deviceId) argument
520 timeoutExpiredLocked(nsecs_t when) argument
529 handleConfigurationChangedLocked(nsecs_t when) argument
616 requestTimeoutAtTimeLocked(nsecs_t when) argument
871 requestTimeoutAtTime(nsecs_t when) argument
978 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
1015 reset(nsecs_t when) argument
1065 timeoutExpired(nsecs_t when) argument
1152 cancelTouch(nsecs_t when) argument
1182 notifyReset(nsecs_t when) argument
1837 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
1841 reset(nsecs_t when) argument
1844 timeoutExpired(nsecs_t when) argument
1871 cancelTouch(nsecs_t when) argument
1947 sync(nsecs_t when) argument
2023 timeoutExpired(nsecs_t when) argument
2113 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
2161 reset(nsecs_t when) argument
2211 processKey(nsecs_t when, bool down, int32_t keyCode, int32_t scanCode, uint32_t policyFlags) argument
2412 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
2507 reset(nsecs_t when) argument
2532 sync(nsecs_t when) argument
2621 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource, local
2700 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource, local
2889 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
3090 configureSurface(nsecs_t when, bool* outResetNeeded) argument
3846 reset(nsecs_t when) argument
3902 sync(nsecs_t when) argument
3980 nsecs_t when = mExternalStylusFusionTimeout - STYLUS_DATA_LATENCY; local
3994 cookAndDispatch(nsecs_t when) argument
4033 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource, local
4105 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource, local
4117 applyExternalStylusButtonState(nsecs_t when) argument
4123 applyExternalStylusTouchState(nsecs_t when) argument
4187 timeoutExpired(nsecs_t when) argument
4212 consumeRawTouches(nsecs_t when, uint32_t policyFlags) argument
4313 dispatchVirtualKey(nsecs_t when, uint32_t policyFlags, int32_t keyEventAction, int32_t keyEventFlags) argument
4326 abortTouches(nsecs_t when, uint32_t policyFlags) argument
4342 dispatchTouches(nsecs_t when, uint32_t policyFlags) argument
4429 dispatchHoverExit(nsecs_t when, uint32_t policyFlags) argument
4445 dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags) argument
4471 dispatchButtonRelease(nsecs_t when, uint32_t policyFlags) argument
4489 dispatchButtonPress(nsecs_t when, uint32_t policyFlags) argument
4775 dispatchPointerUsage(nsecs_t when, uint32_t policyFlags, PointerUsage pointerUsage) argument
4797 abortPointerUsage(nsecs_t when, uint32_t policyFlags) argument
4815 dispatchPointerGestures(nsecs_t when, uint32_t policyFlags, bool isTimeout) argument
5024 abortPointerGestures(nsecs_t when, uint32_t policyFlags) argument
5049 preparePointerGestures(nsecs_t when, bool* outCancelPreviousGesture, bool* outFinishPreviousGesture, bool isTimeout) argument
5815 dispatchPointerStylus(nsecs_t when, uint32_t policyFlags) argument
5846 abortPointerStylus(nsecs_t when, uint32_t policyFlags) argument
5850 dispatchPointerMouse(nsecs_t when, uint32_t policyFlags) argument
5899 abortPointerMouse(nsecs_t when, uint32_t policyFlags) argument
5905 dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, bool down, bool hovering) argument
6027 abortPointerSimple(nsecs_t when, uint32_t policyFlags) argument
6034 dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags, const PointerProperties* properties, const PointerCoords* coords, const uint32_t* idToIndex, BitSet32 idBits, int32_t changedId, float xPrecision, float yPrecision, nsecs_t downTime) argument
6113 cancelTouch(nsecs_t when) argument
6391 reset(nsecs_t when) argument
6403 syncTouch(nsecs_t when, RawState* outState) argument
6461 reset(nsecs_t when) argument
6475 syncTouch(nsecs_t when, RawState* outState) argument
6622 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
6628 reset(nsecs_t when) argument
6644 sync(nsecs_t when) argument
6760 configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) argument
6899 reset(nsecs_t when) argument
6958 sync(nsecs_t when, bool force) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DGestureRecorder.java47 public MotionEventRecord(long when, MotionEvent event) { argument
48 this.time = when;
80 public TagRecord(long when, String tag, String info) { argument
81 this.time = when;
114 public void tag(long when, String tag, String info) { argument
115 mRecords.add(new TagRecord(when, tag, info));
171 public void tag(long when, String tag, String info) { argument
177 mCurrentGesture.tag(when, tag, info);
182 public void tag(long when, String tag) { argument
183 tag(when, ta
[all...]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
H A DNetworkControllerBaseTest.java20 import static org.mockito.Mockito.when;
86 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(true);
87 when(mMockCm.getDefaultNetworkCapabilitiesForUser(0)).thenReturn(
118 when(mMockSubDefaults.getDefaultDataSubId()).thenReturn(subId);
119 when(mMockSubDefaults.getDefaultVoiceSubId()).thenReturn(subId);
126 when(subscription.getSubscriptionId()).thenReturn(subId);
129 when(mMockSm.getActiveSubscriptionInfoList()).thenReturn(subs);
134 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
186 when(mServiceState.getRoaming()).thenReturn(isRoaming);
191 when(mServiceStat
[all...]
/frameworks/base/core/java/android/os/
H A DMessageQueue.java101 return mMessages == null || now < mMessages.when;
108 * {@link IdleHandler#queueIdle IdleHandler.queueIdle()} when it is
158 // We can assume mPtr != 0 when mQuitting is false.
163 * Adds a file descriptor listener to receive notification when file descriptor
170 * It is important to always unregister the listener when the file descriptor
180 * @param listener The listener to invoke when file descriptor events occur.
338 if (now < msg.when) {
339 // Next message is not ready. Set a timeout to wake up when it is ready.
340 nextPollTimeoutMillis = (int) Math.min(msg.when - now, Integer.MAX_VALUE);
369 && (mMessages == null || now < mMessages.when)) {
462 postSyncBarrier(long when) argument
533 enqueueMessage(Message msg, long when) argument
[all...]
H A DMessage.java82 * This flag is set when the message is enqueued and remains set while it
83 * is delivered and afterwards when it is recycled. The flag is only cleared
84 * when a new message is created or obtained since that is the only time that
99 /*package*/ long when; field in class:Message
175 * @param callback Runnable that will execute when the message is handled.
289 * Used internally by the MessageQueue and Looper when disposing of queued Messages.
301 when = 0;
340 return when;
360 * Retrieve callback object that will execute when this message is handled.
374 * {@link #setData(Bundle)}. Note that when transferrin
[all...]
/frameworks/support/v7/appcompat/src/android/support/v7/internal/app/
H A DNotificationCompatImplBase.java50 boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact,
53 number, largeIcon, subText, useChronometer, when, actions, actionsToShowInCompact,
64 boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact,
67 number, largeIcon, subText, useChronometer, when,
104 boolean useChronometer, long when, List<T> actions, boolean showCancelButton,
107 number, largeIcon, subText, useChronometer, when, actions, showCancelButton,
117 boolean useChronometer, long when, List<T> actions, boolean showCancelButton,
121 number, largeIcon, subText, useChronometer, when,
167 int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when,
232 if (when !
46 overrideContentView( NotificationBuilderWithBuilderAccessor builder, Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact, boolean showCancelButton, PendingIntent cancelButtonIntent) argument
61 generateContentView( Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact, boolean showCancelButton, PendingIntent cancelButtonIntent) argument
101 overrideBigContentView( Notification n, Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, boolean showCancelButton, PendingIntent cancelButtonIntent) argument
114 generateBigContentView( Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, boolean showCancelButton, PendingIntent cancelButtonIntent) argument
165 applyStandardTemplate(Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, int resId, boolean fitIn1U) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/net/
H A DNetworkScorerAppManagerTest.java55 Mockito.when(mMockContext.getPackageManager()).thenReturn(mMockPm);
105 Mockito.when(mMockPm.queryIntentActivities(
119 Mockito.when(mMockPm.queryBroadcastReceivers(
133 Mockito.when(mMockPm.checkPermission(permission.SCORE_NETWORKS, packageName))
/frameworks/base/core/java/android/ddm/
H A DDdmHandleHeap.java65 * Called when the DDM server connects. The handler is allowed to
71 * Called when the DDM server disconnects. Can be used to disable
114 int when = in.get();
116 Log.v("ddm-heap", "Heap segment enable: when=" + when);
118 boolean ok = DdmVmInternal.heapInfoNotify(when);
132 int when = in.get();
135 Log.v("ddm-heap", "Heap segment enable: when=" + when
138 boolean ok = DdmVmInternal.heapSegmentNotify(when, wha
[all...]
/frameworks/base/tests/Camera2Tests/CameraToo/tests/src/com/example/android/camera2/cameratoo/
H A DCameraTooTest.java22 import static org.mockito.Mockito.when;
155 when(plane.getBuffer()).thenReturn(buf);
156 when(plane.getPixelStride()).thenReturn(1);
157 when(plane.getRowStride()).thenReturn(5);
161 when(image.getPlanes()).thenReturn(onlyPlaneThatMatters);
162 when(image.getWidth()).thenReturn(5);
163 when(image.getHeight()).thenReturn(5);
/frameworks/base/services/core/java/com/android/server/job/controllers/
H A DIdleController.java99 * Idle state tracking, and messaging with the task manager when
167 // when the screen goes off or dreaming starts, we schedule the
168 // alarm that will tell us when we have decided the device is
171 final long when = nowElapsed + INACTIVITY_IDLE_THRESHOLD;
173 Slog.v(TAG, "Scheduling idle : " + action + " now:" + nowElapsed + " when="
174 + when);
178 when, IDLE_WINDOW_SLOP, mIdleTriggerIntent);
/frameworks/base/core/tests/coretests/src/android/os/
H A DMessageQueueTest.java210 if (newMsg.when != 0) {
212 "newMsg.when is %d should be 0 after copyFrom", newMsg.when)));
227 "msg.isInUse is false should be true after when processing %d",
232 "msg.arg1 is %d should be %d when processing # %d",
237 "msg.arg2 is %d should be %d when processing # %d",
242 "msg.obj should be 'this' when processing # %d", msg.what)));
246 "msg.replyTo should be null when processing # %d", msg.what)));
251 " mBundle.getString(\"key\") which is %s when processing # %d",
254 if (msg.when !
[all...]

Completed in 9207 milliseconds

1234