/packages/apps/UnifiedEmail/src/com/android/mail/ |
D | FormattedDateBuilder.java | 52 public CharSequence formatShortDateTime(long when) { in formatShortDateTime() argument 53 if (DateUtils.isToday(when)) { in formatShortDateTime() 54 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME); in formatShortDateTime() 55 } else if (isCurrentYear(when)) { in formatShortDateTime() 56 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH); in formatShortDateTime() 58 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE); in formatShortDateTime() 74 public CharSequence formatLongDateTime(long when) { in formatLongDateTime() argument 75 if (DateUtils.isToday(when)) { in formatLongDateTime() 76 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME); in formatLongDateTime() 77 } else if (isCurrentYear(when)) { in formatLongDateTime() [all …]
|
/packages/experimental/procstatlog/ |
D | procstatreport.py | 141 for when, datum in data.iteritems(): 143 merged_rows.setdefault(when, {})[set_num] = datum 146 for when, values in sorted(merged_rows.iteritems()): 147 msec = "%d" % (when * 1000) 177 for when, state in sorted_history: 188 sys_jiffies[when] = (stime, all) 189 sys_user_jiffies[when] = (stime + utime, all) 190 all_jiffies[when] = all 222 for when, state in sorted_history: 234 if total_time > 0: cpu_speed[when] = total_cycles / total_time [all …]
|
/packages/apps/Messaging/tests/src/com/android/messaging/ui/conversation/ |
D | ConversationInputManagerTest.java | 68 Mockito.when(mockConversationInputHost.getSimSelectorView()) in initNewInputManager() 70 Mockito.when(mockConversationInputHost.createMediaPicker()).thenReturn(mockMediaPicker); in initNewInputManager() 71 Mockito.when(mockConversationInputSink.getComposeEditText()) in initNewInputManager() 73 Mockito.doReturn(mockFragmentTransaction).when(mockFragmentTransaction).replace( in initNewInputManager() 76 Mockito.when(mockFragmentManager.findFragmentByTag(MediaPicker.FRAGMENT_TAG)) in initNewInputManager() 78 Mockito.when(mockFragmentManager.beginTransaction()).thenReturn(mockFragmentTransaction); in initNewInputManager() 79 Mockito.when(mockSubscriptionListData.hasData()).thenReturn(true); in initNewInputManager() 80 Mockito.when(mockConversationData.getSubscriptionListData()) in initNewInputManager() 82 Mockito.doReturn(true).when(mockConversationData).isBound(Mockito.anyString()); in initNewInputManager() 83 Mockito.doReturn(true).when(mockDraftMessageData).isBound(Mockito.anyString()); in initNewInputManager() [all …]
|
D | ComposeMessageViewTest.java | 76 Mockito.doReturn(true).when(mockConversationData).isBound(Mockito.anyString()); in setUp() 95 Mockito.when(mockDraftMessageData.getReadOnlyAttachments()) in testSend() 97 Mockito.when(mockDraftMessageData.getIsDefaultSmsApp()).thenReturn(true); in testSend() 98 Mockito.when(mockIComposeMessageViewHost.isReadyForAction()).thenReturn(true); in testSend() 104 Mockito.when(mockDraftMessageData.isBound(Matchers.anyString())) in testSend() 106 Mockito.when(mockDraftMessageData.getMessageText()).thenReturn(message.getMessageText()); in testSend() 107 Mockito.when(mockDraftMessageData.prepareMessageForSending( in testSend() 110 Mockito.when(mockDraftMessageData.hasPendingAttachments()).thenReturn(false); in testSend() 119 }).when(mockDraftMessageData).checkDraftForAction(Mockito.anyBoolean(), Mockito.anyInt(), in testSend() 149 Mockito.when(mockDraftMessageData.getReadOnlyAttachments()) in testNotDefaultSms() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | ContactsContentObserverTest.java | 23 import static org.mockito.Mockito.when; 73 when(mMockManager.getContactCount()).thenReturn(STALE_CONTACT_COUNT); in testHaveContentsChanged_NoChange() 74 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT); in testHaveContentsChanged_NoChange() 75 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(STALE_NAMES_LIST); in testHaveContentsChanged_NoChange() 76 when(mMockManager.getHashCodeAtLastRebuild()).thenReturn(STALE_NAMES_LIST.hashCode()); in testHaveContentsChanged_NoChange() 81 when(mMockManager.getContactCount()).thenReturn(UPDATED_CONTACT_COUNT); in testHaveContentsChanged_UpdatedCount() 82 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT); in testHaveContentsChanged_UpdatedCount() 88 when(mMockManager.getContactCount()).thenReturn(STALE_CONTACT_COUNT); in testHaveContentsChanged_HashUpdate() 89 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT); in testHaveContentsChanged_HashUpdate() 90 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(UPDATED_NAMES_LIST); in testHaveContentsChanged_HashUpdate() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/network/ |
D | BlockingHttpClientTests.java | 22 import static org.mockito.Mockito.when; 57 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_BAD_GATEWAY); in testError_badGateway() 71 when(mMockHttpConnection.getResponseCode()).thenReturn( in testError_clientTimeout() 87 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_FORBIDDEN); in testError_forbiddenWithRequest() 88 when(mMockHttpConnection.getOutputStream()).thenReturn(mockOutputStream); in testError_forbiddenWithRequest() 105 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK); in testSuccess_emptyRequest() 106 when(mMockHttpConnection.getInputStream()).thenReturn(new ByteArrayInputStream(response)); in testSuccess_emptyRequest() 120 when(mMockHttpConnection.getOutputStream()).thenReturn(mockOutputStream); in testSuccess() 121 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK); in testSuccess() 122 when(mMockHttpConnection.getInputStream()).thenReturn(new ByteArrayInputStream(response)); in testSuccess()
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | InCallWakeLockControllerTest.java | 20 import static org.mockito.Mockito.when; 72 when(mCallsManager.getRingingCall()).thenReturn(mCall); in DONT_test_RingingCallAdded() 78 when(mCallsManager.getRingingCall()).thenReturn(null); in DONT_test_NonRingingCallAdded() 79 when(mWakeLock.isHeld()).thenReturn(false); in DONT_test_NonRingingCallAdded() 86 when(mCallsManager.getRingingCall()).thenReturn(mCall); in DONT_test_RingingCallTransition() 92 when(mCallsManager.getRingingCall()).thenReturn(null); in DONT_test_RingingCallRemoved() 93 when(mWakeLock.isHeld()).thenReturn(false); in DONT_test_RingingCallRemoved() 100 when(mCallsManager.getRingingCall()).thenReturn(null); in DONT_test_WakeLockReleased() 101 when(mWakeLock.isHeld()).thenReturn(true); in DONT_test_WakeLockReleased()
|
D | ComponentContextFixture.java | 75 import static org.mockito.Mockito.when; 324 when(mResources.getConfiguration()).thenReturn(mResourceConfiguration); 328 when(mAudioManager.isWiredHeadsetOn()).thenReturn(false); 337 }).when(mPackageManager).queryIntentServices((Intent) any(), anyInt()); 346 }).when(mPackageManager).queryIntentServicesAsUser((Intent) any(), anyInt(), anyInt()); 348 when(mTelephonyManager.getSubIdForPhoneAccount((PhoneAccount) any())).thenReturn(1); 355 }).when(mAppOpsManager).checkPackage(anyInt(), anyString()); 357 when(mNotificationManager.matchesCallFilter(any(Bundle.class))).thenReturn(true); 359 when(mUserManager.getSerialNumberForUser(any(UserHandle.class))).thenReturn(-1L); 392 when(mResources.getString(eq(id))).thenReturn(value);
|
/packages/apps/Messaging/tests/src/com/android/messaging/ui/mediapicker/ |
D | GalleryGridItemViewTest.java | 74 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(false); in testBind() 75 Mockito.when(mockHost.isItemSelected(Matchers.<GalleryGridItemData>any())) in testBind() 87 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true); in testBindMultiSelectUnSelected() 88 Mockito.when(mockHost.isItemSelected(Matchers.<GalleryGridItemData>any())) in testBindMultiSelectUnSelected() 100 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true); in testBindMultiSelectSelected() 101 Mockito.when(mockHost.isItemSelected(Matchers.<GalleryGridItemData>any())) in testBindMultiSelectSelected() 113 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(false); in testClick() 114 Mockito.when(mockHost.isItemSelected(Matchers.<GalleryGridItemData>any())) in testClick() 125 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true); in testBindTwice() 126 Mockito.when(mockHost.isItemSelected(Matchers.<GalleryGridItemData>any())) in testBindTwice()
|
D | AudioRecordViewTest.java | 58 Mockito.when(mockRecorder.isRecording()).thenReturn(false); in testRecording() 59 Mockito.when(mockRecorder.startRecording(Matchers.<OnErrorListener>any(), in testRecording() 61 Mockito.when(mockRecorder.stopRecording()).thenReturn(Uri.parse("content://someaudio/2")); in testRecording() 66 Mockito.when(mockRecorder.isRecording()).thenReturn(true); in testRecording()
|
/packages/apps/Calendar/src/com/android/calendar/agenda/ |
D | AgendaAdapter.java | 71 TextView when; field in AgendaAdapter.ViewHolder 122 holder.when = (TextView) view.findViewById(R.id.when); in bindView() 137 holder.when.setTextColor(mWhereDeclinedColor); in bindView() 142 holder.when.setTextColor(mWhereColor); in bindView() 169 holder.when.setTextColor(mStandardColor); in bindView() 175 TextView when = holder.when; in bindView() local 225 when.setText(whenString); in bindView()
|
/packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/task/ |
D | InstallPackageTaskTest.java | 26 import static org.mockito.Mockito.when; 78 when(mPackageManager.getPackageArchiveInfo(eq(TEST_PACKAGE_LOCATION), anyInt())). in setUp() 83 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 84 when(mContext.getPackageName()).thenReturn(PACKAGE_NAME); in setUp() 85 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 113 doAnswer(installerAnswer).when(mPackageManager).installPackage( in testInstall_OnePackage() 136 doAnswer(installerAnswer).when(mPackageManager).installPackage( in testInstall_InstallFailedVersionDowngrade()
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetModel.java | 77 String when; field in CalendarAppWidgetModel.EventInfo 108 builder.append(when); in toString() 133 result = prime * result + ((when == null) ? 0 : when.hashCode()); in hashCode() 168 if (when == null) { in equals() 169 if (other.when != null) in equals() 171 } else if (!when.equals(other.when)) { in equals() 384 eventInfo.when = whenString.toString(); in populateEventInfo()
|
/packages/experimental/NotificationShowcase/src/com/android/example/notificationshowcase/ |
D | ProgressService.java | 49 UpdateRunnable(int id, long when, int progress) { in UpdateRunnable() argument 51 mWhen = when; in UpdateRunnable() 79 final long when = intent.getLongExtra("when", 0L); in onHandleIntent() local 81 handler.postDelayed(new UpdateRunnable(id, when, progress), 1000); in onHandleIntent() 84 public static void startProgressUpdater(Context context, int id, long when, int progress) { in startProgressUpdater() argument 89 progressIntent.putExtra("when", when); in startProgressUpdater()
|
D | UpdateService.java | 54 final long when = intent.getLongExtra("when", 0L); in onHandleIntent() local 55 Log.v(TAG, "id: " + id + " when: " + when + " update: " + update); in onHandleIntent() 57 NotificationService.makeBigTextNotification(this, update, id, when)); in onHandleIntent() 64 public static PendingIntent getPendingIntent(Context context, int update, int id, long when) { in getPendingIntent() argument 69 updateIntent.putExtra("when", when); in getPendingIntent()
|
D | NotificationService.java | 80 long when) { in makeBigTextNotification() argument 118 when = System.currentTimeMillis(); in makeBigTextNotification() 127 .setWhen(when) in makeBigTextNotification() 132 UpdateService.getPendingIntent(context, update + 1, id, when)) in makeBigTextNotification() 141 public static Notification makeUploadNotification(Context context, int progress, long when) { in makeUploadNotification() argument 147 .setWhen(when) in makeUploadNotification()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/ |
D | SetDateTimeActivity.java | 159 long when = c.getTimeInMillis(); in setDate() local 161 if (when / 1000 < Integer.MAX_VALUE) { in setDate() 162 ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).setTime(when); in setDate() 173 long when = c.getTimeInMillis(); in setTime() local 175 if (when / 1000 < Integer.MAX_VALUE) { in setTime() 176 ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).setTime(when); in setTime()
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | NotificationActionUtils.java | 202 final Folder folder, final int notificationId, final long when, in addNotificationActions() argument 210 folder, notificationIntent, notificationAction, notificationId, when); in addNotificationActions() 223 folder, notificationIntent, notificationAction, notificationId, when); in addNotificationActions() 352 final NotificationActionType action, final int notificationId, final long when) { in getNotificationActionPendingIntent() argument 356 conversation, message, folder, conversation.id, message.serverId, message.id, when, in getNotificationActionPendingIntent() 421 final NotificationActionType action, final int notificationId, final long when) { in getWearNotificationActionPendingIntent() argument 425 conversation, message, folder, conversation.id, message.serverId, message.id, when, in getWearNotificationActionPendingIntent() 500 final long localMessageId, final long when, final int source, in NotificationAction() argument 510 mWhen = when; in NotificationAction()
|
D | NotificationUtils.java | 644 final long when; in validateNotifications() local 649 when = oldWhen; in validateNotifications() 651 when = System.currentTimeMillis(); in validateNotifications() 654 notification.setWhen(when); in validateNotifications() 723 folder, when, contactFetcher); in validateNotifications() 801 folder, when, unseenCount, unreadCount, clickIntent); in validateNotifications() 853 Folder folder, long when, int unseenCount, int unreadCount, PendingIntent clickIntent) { in createPublicNotification() argument 863 .setWhen(when); in createPublicNotification() 973 final Folder folder, final long when, final ContactFetcher contactFetcher) { in configureLatestEventInfoFromConversation() argument 1111 conversationCursor, notificationIntent, folder, when, res, in configureLatestEventInfoFromConversation() [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | DateTimeSettings.java | 327 long when = c.getTimeInMillis(); in setDate() local 329 if (when / 1000 < Integer.MAX_VALUE) { in setDate() 330 ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).setTime(when); in setDate() 341 long when = c.getTimeInMillis(); in setTime() local 343 if (when / 1000 < Integer.MAX_VALUE) { in setTime() 344 ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).setTime(when); in setTime()
|
/packages/apps/Camera/tests/src/com/android/camera/activity/ |
D | CameraTestCase.java | 130 doReturn(getParameters()).when(mMockCamera[0]).getParameters(); in setUp() 131 doReturn(getParameters()).when(mMockCamera[1]).getParameters(); in setUp() 138 doReturn(getParameters()).when(mOneMockCamera[0]).getParameters(); in setUp() 141 doAnswer(mTakePictureCallable).when(mMockBackCamera).takePicture( in setUp() 146 doAnswer(mAutoFocusCallable).when(mMockBackCamera).autoFocus( in setUp()
|
/packages/apps/Camera2/tests_camera/src/com/android/camera/activity/ |
D | CameraTestCase.java | 130 doReturn(getParameters()).when(mMockCamera[0]).getParameters(); in setUp() 131 doReturn(getParameters()).when(mMockCamera[1]).getParameters(); in setUp() 138 doReturn(getParameters()).when(mOneMockCamera[0]).getParameters(); in setUp() 141 doAnswer(mTakePictureCallable).when(mMockBackCamera).takePicture( in setUp() 146 doAnswer(mAutoFocusCallable).when(mMockBackCamera).autoFocus( in setUp()
|
/packages/apps/InCallUI/tests/src/com/android/incallui/ |
D | MockCallListWrapper.java | 21 import static org.mockito.Mockito.when; 42 when(mCallList.getFirstCallWithState(anyInt())).thenAnswer(new Answer<Call>() { in MockCallListWrapper() 74 when(call.getState()).thenReturn(Integer.valueOf(state)); in getMockCall() 76 when(call.getAccountHandle()).thenReturn(new PhoneAccountHandle(null, null)); in getMockCall()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
D | ImportantNoticeUtilsTests.java | 20 import static org.mockito.Mockito.when; 105 when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(true); in setUp() 118 when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(true); in testPersonalizationSetting() 123 when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(false); in testPersonalizationSetting()
|
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/ |
D | DevicePolicyUtilsTest.java | 101 doReturn(isBluetoothContactsSharingDisabled).when(mockDpm) in getMockContext() 106 .when(mockUm).getProfiles(anyInt()); in getMockContext() 109 doReturn(mockDpm).when(mockContext).getSystemService(Context.DEVICE_POLICY_SERVICE); in getMockContext() 110 doReturn(mockUm).when(mockContext).getSystemService(Context.USER_SERVICE); in getMockContext()
|