/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
D | AlarmStateManager.java | 120 public static int getGlobalIntentId(Context context) { in getGlobalIntentId() argument 121 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getGlobalIntentId() 125 public static void updateGloablIntentId(Context context) { in updateGloablIntentId() argument 126 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in updateGloablIntentId() 137 public static void updateNextAlarm(Context context) { in updateNextAlarm() argument 139 ContentResolver cr = context.getContentResolver(); in updateNextAlarm() 146 AlarmNotifications.registerNextAlarmWithAlarmManager(context, nextAlarm); in updateNextAlarm() 156 private static void updateParentAlarm(Context context, AlarmInstance instance) { in updateParentAlarm() argument 157 ContentResolver cr = context.getContentResolver(); in updateParentAlarm() 183 AlarmUtils.getFormattedTime(context, nextRepeatedInstance.getAlarmTime())); in updateParentAlarm() [all …]
|
D | AlarmNotifications.java | 36 public static void registerNextAlarmWithAlarmManager(Context context, AlarmInstance instance) { in registerNextAlarmWithAlarmManager() argument 41 AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in registerNextAlarmWithAlarmManager() 44 PendingIntent operation = PendingIntent.getBroadcast(context, 0 /* requestCode */, in registerNextAlarmWithAlarmManager() 45 AlarmStateManager.createIndicatorIntent(context), flags); in registerNextAlarmWithAlarmManager() 51 PendingIntent viewIntent = PendingIntent.getActivity(context, instance.hashCode(), in registerNextAlarmWithAlarmManager() 52 createViewAlarmIntent(context, instance), PendingIntent.FLAG_UPDATE_CURRENT); in registerNextAlarmWithAlarmManager() 62 public static void showLowPriorityNotification(Context context, AlarmInstance instance) { in showLowPriorityNotification() argument 65 context.getSystemService(Context.NOTIFICATION_SERVICE); in showLowPriorityNotification() 67 Resources resources = context.getResources(); in showLowPriorityNotification() 68 Notification.Builder notification = new Notification.Builder(context) in showLowPriorityNotification() [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | SettingsAppWidgetProvider.java | 134 public final void toggleState(Context context) { in toggleState() argument 135 int currentState = getTriState(context); in toggleState() 159 requestStateChange(context, newState); in toggleState() 198 public final void setImageViewResources(Context context, RemoteViews views) { in setImageViewResources() argument 203 switch (getTriState(context)) { in setImageViewResources() 206 getContentDescription(context, R.string.gadget_state_off)); in setImageViewResources() 213 getContentDescription(context, R.string.gadget_state_on)); in setImageViewResources() 226 getContentDescription(context, R.string.gadget_state_turning_on)); in setImageViewResources() 232 getContentDescription(context, R.string.gadget_state_turning_off)); in setImageViewResources() 245 private final String getContentDescription(Context context, int stateResId) { in getContentDescription() argument [all …]
|
/packages/apps/Mms/src/com/android/mms/transaction/ |
D | MessagingNotification.java | 151 public void onReceive(Context context, Intent intent) { in onReceive() argument 156 Conversation.markAllConversationsAsSeen(context); in onReceive() 182 public static void init(Context context) { in init() argument 188 context.registerReceiver(sNotificationDeletedReceiver, intentFilter); in init() 189 sPduPersister = PduPersister.getPduPersister(context); in init() 194 sScreenDensity = context.getResources().getDisplayMetrics().density; in init() 222 public static void nonBlockingUpdateNewMessageIndicator(final Context context, in nonBlockingUpdateNewMessageIndicator() argument 233 blockingUpdateNewMessageIndicator(context, newMsgThreadId, isStatusMessage); in nonBlockingUpdateNewMessageIndicator() 248 public static void blockingUpdateNewMessageIndicator(Context context, long newMsgThreadId, in blockingUpdateNewMessageIndicator() argument 254 final boolean isDefaultSmsApp = MmsConfig.isSmsEnabled(context); in blockingUpdateNewMessageIndicator() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | UpdateHandler.java | 141 private static void writeMetadataDownloadId(final Context context, final String uri, in writeMetadataDownloadId() argument 143 MetadataDbHelper.registerMetadataDownloadId(context, uri, downloadId); in writeMetadataDownloadId() 153 public static void setDownloadOverMeteredSetting(final Context context, in setDownloadOverMeteredSetting() argument 155 final SharedPreferences prefs = CommonPreferences.getCommonPreferences(context); in setDownloadOverMeteredSetting() 167 public static int getDownloadOverMeteredSetting(final Context context) { in getDownloadOverMeteredSetting() argument 168 final SharedPreferences prefs = CommonPreferences.getCommonPreferences(context); in getDownloadOverMeteredSetting() 180 public static boolean tryUpdate(final Context context, final boolean updateNow) { in tryUpdate() argument 183 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in tryUpdate() 190 MetadataDbHelper.getMetadataUriAsString(context, clientId); in tryUpdate() 206 updateClientsWithMetadataUri(context, updateNow, metadataUri); in tryUpdate() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/timer/ |
D | TimerReceiver.java | 48 public void onReceive(final Context context, final Intent intent) { in onReceive() argument 55 cancelInUseNotification(context); in onReceive() 63 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in onReceive() 68 showInUseNotification(context); in onReceive() 71 showTimesUpNotification(context); in onReceive() 74 cancelTimesUpNotification(context); in onReceive() 105 si.setClass(context, TimerRingService.class); in onReceive() 106 context.startService(si); in onReceive() 111 cancelInUseNotification(context); in onReceive() 113 showInUseNotification(context); in onReceive() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | NotificationUtils.java | 129 public static void clearAllNotfications(Context context) { in clearAllNotfications() argument 131 final NotificationMap notificationMap = getNotificationMap(context); in clearAllNotfications() 133 notificationMap.saveNotificationMap(context); in clearAllNotfications() 139 private static synchronized NotificationMap getNotificationMap(Context context) { in getNotificationMap() argument 144 sActiveNotificationMap.loadNotificationMap(context); in getNotificationMap() 229 public synchronized void loadNotificationMap(final Context context) { in loadNotificationMap() argument 230 final MailPrefs mailPrefs = MailPrefs.get(context); in loadNotificationMap() 239 final Cursor accountCursor = context.getContentResolver().query( in loadNotificationMap() 259 final Cursor folderCursor = context.getContentResolver().query( in loadNotificationMap() 290 public synchronized void saveNotificationMap(Context context) { in saveNotificationMap() argument [all …]
|
D | Utils.java | 159 public static boolean isLowRamDevice(Context context) { in isLowRamDevice() argument 161 final ActivityManager am = (ActivityManager) context.getSystemService( in isLowRamDevice() 188 public static void setCustomUserAgent(WebView webView, Context context) { in setCustomUserAgent() argument 190 final String version = getVersionCode(context); in setCustomUserAgent() 192 final String userAgent = context.getResources().getString( in setCustomUserAgent() 200 public static String getVersionCode(Context context) { in getVersionCode() argument 203 sVersionCode = String.valueOf(context.getPackageManager() in getVersionCode() 204 .getPackageInfo(context.getPackageName(), 0 /* flags */) in getVersionCode() 208 context.getApplicationInfo().packageName); in getVersionCode() 220 public static String formatPlural(Context context, int resource, int count) { in formatPlural() argument [all …]
|
D | NotificationActionUtils.java | 198 public static void addNotificationActions(final Context context, in addNotificationActions() argument 209 context, account, conversation, message, in addNotificationActions() 213 final String title = context.getString(notificationAction.getDisplayStringResId( in addNotificationActions() 222 context, account, conversation, message, in addNotificationActions() 232 final String[] choices = context.getResources().getStringArray( in addNotificationActions() 349 private static PendingIntent getNotificationActionPendingIntent(final Context context, in getNotificationActionPendingIntent() argument 363 final TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context); in getNotificationActionPendingIntent() 365 final Intent intent = createReplyIntent(context, account, messageUri, false); in getNotificationActionPendingIntent() 366 intent.setPackage(context.getPackageName()); in getNotificationActionPendingIntent() 377 final TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context); in getNotificationActionPendingIntent() [all …]
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | Recycler.java | 66 public static boolean checkForThreadsOverLimit(Context context) { in checkForThreadsOverLimit() argument 70 return smsRecycler.anyThreadOverLimit(context) || mmsRecycler.anyThreadOverLimit(context); in checkForThreadsOverLimit() 73 public void deleteOldMessages(Context context) { in deleteOldMessages() argument 77 if (!isAutoDeleteEnabled(context)) { in deleteOldMessages() 81 Cursor cursor = getAllThreads(context); in deleteOldMessages() 83 int limit = getMessageLimit(context); in deleteOldMessages() 86 deleteMessagesForThread(context, threadId, limit); in deleteOldMessages() 93 public void deleteOldMessagesByThreadId(Context context, long threadId) { in deleteOldMessagesByThreadId() argument 98 if (!isAutoDeleteEnabled(context)) { in deleteOldMessagesByThreadId() 102 deleteMessagesForThread(context, threadId, getMessageLimit(context)); in deleteOldMessagesByThreadId() [all …]
|
/packages/apps/DeskClock/src/com/android/alarmclock/ |
D | DigitalAppWidgetProvider.java | 63 public void onEnabled(Context context) { in onEnabled() argument 64 super.onEnabled(context); in onEnabled() 65 startAlarmOnQuarterHour(context); in onEnabled() 69 public void onDisabled(Context context) { in onDisabled() argument 70 super.onDisabled(context); in onDisabled() 71 cancelAlarmOnQuarterHour(context); in onDisabled() 75 public void onReceive(Context context, Intent intent) { in onReceive() argument 80 super.onReceive(context, intent); in onReceive() 87 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in onReceive() 89 int[] appWidgetIds = appWidgetManager.getAppWidgetIds(getComponentName(context)); in onReceive() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
D | AlertReceiver.java | 101 public void onReceive(final Context context, final Intent intent) { in onReceive() argument 111 URLSpan[] urlSpans = getURLSpans(context, eventId); in onReceive() 112 Intent geoIntent = createMapActivityIntent(context, urlSpans); in onReceive() 115 context.startActivity(geoIntent); in onReceive() 116 closeNotificationShade(context); in onReceive() 121 AlertService.updateAlertNotification(context); in onReceive() 130 URLSpan[] urlSpans = getURLSpans(context, eventId); in onReceive() 131 Intent callIntent = createCallActivityIntent(context, urlSpans); in onReceive() 134 context.startActivity(callIntent); in onReceive() 135 closeNotificationShade(context); in onReceive() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/testapps/ |
D | CallServiceNotifier.java | 77 public void updateNotification(Context context) { in updateNotification() argument 79 getNotificationManager(context).notify(CALL_NOTIFICATION_ID, getMainNotification(context)); in updateNotification() 80 getNotificationManager(context).notify( in updateNotification() 81 PHONE_ACCOUNT_NOTIFICATION_ID, getPhoneAccountNotification(context)); in updateNotification() 87 public void cancelNotifications(Context context) { in cancelNotifications() argument 89 getNotificationManager(context).cancel(CALL_NOTIFICATION_ID); in cancelNotifications() 90 getNotificationManager(context).cancel(PHONE_ACCOUNT_NOTIFICATION_ID); in cancelNotifications() 96 public void registerPhoneAccount(Context context) { in registerPhoneAccount() argument 98 (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); in registerPhoneAccount() 104 new ComponentName(context, TestConnectionService.class), in registerPhoneAccount() [all …]
|
/packages/apps/Email/src/com/android/email/activity/setup/ |
D | AccountSettingsUtils.java | 61 public static void commitSettings(Context context, Account account) { in commitSettings() argument 63 account.save(context); in commitSettings() 74 PolicyServiceProxy.setAccountPolicy2(context, in commitSettings() 83 context.getResources().getStringArray(R.array.default_quick_responses); in commitSettings() 86 ContentResolver resolver = context.getContentResolver(); in commitSettings() 97 account.update(context, cv); in commitSettings() 101 AccountBackupRestore.backup(context); in commitSettings() 128 public static Uri createOAuthRegistrationRequest(final Context context, in createOAuthRegistrationRequest() argument 147 public static OAuthProvider findOAuthProvider(final Context context, final String id) { in findOAuthProvider() argument 148 return findOAuthProvider(context, id, R.xml.oauth); in findOAuthProvider() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/widget/ |
D | BaseWidgetProvider.java | 73 public void onDeleted(Context context, int[] appWidgetIds) { in onDeleted() argument 74 super.onDeleted(context, appWidgetIds); in onDeleted() 77 MailPrefs.get(context).clearWidgets(appWidgetIds); in onDeleted() 80 public static String getProviderName(Context context) { in getProviderName() argument 81 return context.getString(R.string.widget_provider); in getProviderName() 91 protected int[] getCurrentWidgetIds(Context context) { in getCurrentWidgetIds() argument 92 final AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in getCurrentWidgetIds() 93 final ComponentName mailComponent = new ComponentName(context, getProviderName(context)); in getCurrentWidgetIds() 101 static public String[][] getWidgetInfo(Context context, int[] widgetIds) { in getWidgetInfo() argument 106 final String accountFolder = MailPrefs.get(context).getWidgetConfiguration( in getWidgetInfo() [all …]
|
/packages/apps/Music/src/com/android/music/ |
D | MusicUtils.java | 94 …public static String makeAlbumsLabel(Context context, int numalbums, int numsongs, boolean isUnkno… in makeAlbumsLabel() argument 101 Resources r = context.getResources(); in makeAlbumsLabel() 104 songs_albums.append(context.getString(R.string.onesong)); in makeAlbumsLabel() 116 songs_albums.append(context.getString(R.string.albumsongseparator)); in makeAlbumsLabel() 124 …public static String makeAlbumsSongsLabel(Context context, int numalbums, int numsongs, boolean is… in makeAlbumsSongsLabel() argument 135 songs_albums.append(context.getString(R.string.onesong)); in makeAlbumsSongsLabel() 137 Resources r = context.getResources(); in makeAlbumsSongsLabel() 143 songs_albums.append(context.getString(R.string.albumsongseparator)); in makeAlbumsSongsLabel() 158 ServiceToken(ContextWrapper context) { in ServiceToken() argument 159 mWrappedContext = context; in ServiceToken() [all …]
|
/packages/apps/Email/src/com/android/email/service/ |
D | EmailServiceUtils.java | 89 public static void killService(Context context, String protocol) { in killService() argument 90 EmailServiceInfo info = getServiceInfo(context, protocol); in killService() 94 context.startService(serviceIntent); in killService() 101 public static void startService(Context context, String protocol) { in startService() argument 102 EmailServiceInfo info = getServiceInfo(context, protocol); in startService() 105 context.startService(serviceIntent); in startService() 112 public static void startRemoteServices(Context context) { in startRemoteServices() argument 113 for (EmailServiceInfo info: getServiceInfoList(context)) { in startRemoteServices() 116 context.startService(serviceIntent); in startRemoteServices() 124 public static boolean areRemoteServicesInstalled(Context context) { in areRemoteServicesInstalled() argument [all …]
|
D | ImapService.java | 163 public static synchronized int synchronizeMailboxSynchronous(Context context, in synchronizeMailboxSynchronous() argument 166 TrafficStats.setThreadStatsTag(TrafficFlags.getSyncFlags(context, account)); in synchronizeMailboxSynchronous() 167 NotificationController nc = NotificationController.getInstance(context); in synchronizeMailboxSynchronous() 170 remoteStore = Store.getInstance(account, context); in synchronizeMailboxSynchronous() 171 processPendingActionsSynchronous(context, account, remoteStore, uiRefresh); in synchronizeMailboxSynchronous() 172 synchronizeMailboxGeneric(context, account, remoteStore, folder, loadMore, uiRefresh); in synchronizeMailboxSynchronous() 252 static void loadUnsyncedMessages(final Context context, final Account account, in loadUnsyncedMessages() argument 274 Utilities.copyOneMessageToProvider(context, message, account, toMailbox, in loadUnsyncedMessages() 279 public static void downloadFlagAndEnvelope(final Context context, final Account account, in downloadFlagAndEnvelope() argument 316 context, localMessageInfo.mId); in downloadFlagAndEnvelope() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | TransactionContextTest.java | 33 TransactionContext context = new TransactionContext(false); in testClearExceptSearchIndexUpdates_returnsNewSets() local 34 context.markRawContactDirtyAndChanged(1L, false); in testClearExceptSearchIndexUpdates_returnsNewSets() 35 context.rawContactUpdated(1L); in testClearExceptSearchIndexUpdates_returnsNewSets() 36 context.rawContactInserted(1L, 1L); in testClearExceptSearchIndexUpdates_returnsNewSets() 37 context.syncStateUpdated(1L, new Object()); in testClearExceptSearchIndexUpdates_returnsNewSets() 39 context.clearExceptSearchIndexUpdates(); in testClearExceptSearchIndexUpdates_returnsNewSets() 41 Set<Long> newDirty = context.getDirtyRawContactIds(); in testClearExceptSearchIndexUpdates_returnsNewSets() 42 Set<Long> newChanged = context.getChangedRawContactIds(); in testClearExceptSearchIndexUpdates_returnsNewSets() 43 Set<Long> newInserted = context.getInsertedRawContactIds(); in testClearExceptSearchIndexUpdates_returnsNewSets() 44 Set<Long> newUpdated = context.getUpdatedRawContactIds(); in testClearExceptSearchIndexUpdates_returnsNewSets() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | Utils.java | 245 public static String getWidgetUpdateAction(Context context) { in getWidgetUpdateAction() argument 246 return context.getPackageName() + ".APPWIDGET_UPDATE"; in getWidgetUpdateAction() 252 public static String getWidgetScheduledUpdateAction(Context context) { in getWidgetScheduledUpdateAction() argument 253 return context.getPackageName() + ".APPWIDGET_SCHEDULED_UPDATE"; in getWidgetScheduledUpdateAction() 259 public static String getSearchAuthority(Context context) { in getSearchAuthority() argument 260 return context.getPackageName() + ".CalendarRecentSuggestionsProvider"; in getSearchAuthority() 272 public static void setTimeZone(Context context, String timeZone) { in setTimeZone() argument 273 mTZUtils.setTimeZone(context, timeZone); in setTimeZone() 291 public static String getTimeZone(Context context, Runnable callback) { in getTimeZone() argument 292 return mTZUtils.getTimeZone(context, callback); in getTimeZone() [all …]
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/model/ |
D | GoogleSource.java | 52 protected void inflate(Context context, int inflateLevel) { in inflate() argument 54 inflateStructuredName(context, inflateLevel); in inflate() 55 inflateNickname(context, inflateLevel); in inflate() 56 inflatePhone(context, inflateLevel); in inflate() 57 inflateEmail(context, inflateLevel); in inflate() 58 inflateStructuredPostal(context, inflateLevel); in inflate() 59 inflateIm(context, inflateLevel); in inflate() 60 inflateOrganization(context, inflateLevel); in inflate() 61 inflatePhoto(context, inflateLevel); in inflate() 62 inflateNote(context, inflateLevel); in inflate() [all …]
|
/packages/apps/Mms/src/com/android/mms/data/ |
D | Conversation.java | 105 private Conversation(Context context) { in Conversation() argument 106 mContext = context; in Conversation() 111 private Conversation(Context context, long threadId, boolean allowQuery) { in Conversation() argument 115 mContext = context; in Conversation() 122 private Conversation(Context context, Cursor cursor, boolean allowQuery) { in Conversation() argument 126 mContext = context; in Conversation() 127 fillFromCursor(context, this, cursor, allowQuery); in Conversation() 135 public static Conversation createNew(Context context) { in createNew() argument 136 return new Conversation(context); in createNew() 142 public static Conversation get(Context context, long threadId, boolean allowQuery) { in get() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | Utils.java | 150 public static boolean updatePreferenceToSpecificActivityOrRemove(Context context, in updatePreferenceToSpecificActivityOrRemove() argument 161 PackageManager pm = context.getPackageManager(); in updatePreferenceToSpecificActivityOrRemove() 190 public static boolean updateTileToSpecificActivityFromMetaDataOrRemove(Context context, in updateTileToSpecificActivityFromMetaDataOrRemove() argument 196 PackageManager pm = context.getPackageManager(); in updateTileToSpecificActivityFromMetaDataOrRemove() 257 public static boolean isVoiceCapable(Context context) { in isVoiceCapable() argument 259 (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in isVoiceCapable() 263 public static boolean isWifiOnly(Context context) { in isWifiOnly() argument 264 ConnectivityManager cm = (ConnectivityManager)context.getSystemService( in isWifiOnly() 274 public static String getWifiIpAddresses(Context context) { in getWifiIpAddresses() argument 276 context.getSystemService(Context.CONNECTIVITY_SERVICE); in getWifiIpAddresses() [all …]
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | DetailsDialog.java | 54 public static Dialog create(Context context, MediaDetails mediaDetails) { in create() argument 55 ListView detailsList = (ListView) LayoutInflater.from(context).inflate( in create() 57 detailsList.setAdapter(new DetailsAdapter(context, mediaDetails)); in create() 60 new AlertDialog.Builder(context); in create() 83 public DetailsAdapter(Context context, MediaDetails details) { 84 mContext = context; 87 setDetails(context, details); 90 private void setDetails(Context context, MediaDetails details) { 98 context, (Long) detail.getValue()); 103 ? context.getString(R.string.manual) [all …]
|
/packages/apps/Email/src/com/android/email/ |
D | SecurityPolicy.java | 77 public synchronized static SecurityPolicy getInstance(Context context) { in getInstance() argument 79 sInstance = new SecurityPolicy(context.getApplicationContext()); in getInstance() 87 private SecurityPolicy(Context context) { in SecurityPolicy() argument 88 mContext = context.getApplicationContext(); in SecurityPolicy() 90 mAdminName = new ComponentName(context, PolicyAdmin.class); in SecurityPolicy() 97 /* package */ void setContext(Context context) { in setContext() argument 98 mContext = context; in setContext() 450 public static void setAccountHoldFlag(Context context, long accountId, boolean newState) { in setAccountHoldFlag() argument 451 Account account = Account.restoreAccountWithId(context, accountId); in setAccountHoldFlag() 453 setAccountHoldFlag(context, account, newState); in setAccountHoldFlag() [all …]
|