/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/Browser/src/com/android/browser/widget/ |
D | BookmarkThumbnailWidgetProvider.java | 39 public void onReceive(Context context, Intent intent) { in onReceive() argument 44 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in onReceive() 45 performUpdate(context, appWidgetManager, in onReceive() 46 appWidgetManager.getAppWidgetIds(getComponentName(context))); in onReceive() 48 super.onReceive(context, intent); in onReceive() 53 public void onUpdate(Context context, AppWidgetManager mngr, int[] ids) { in onUpdate() argument 54 performUpdate(context, mngr, ids); in onUpdate() 58 public void onDeleted(Context context, int[] appWidgetIds) { in onDeleted() argument 59 super.onDeleted(context, appWidgetIds); in onDeleted() 61 BookmarkThumbnailWidgetService.deleteWidgetState(context, widgetId); in onDeleted() [all …]
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | Recycler.java | 65 public static boolean checkForThreadsOverLimit(Context context) { in checkForThreadsOverLimit() argument 69 return smsRecycler.anyThreadOverLimit(context) || mmsRecycler.anyThreadOverLimit(context); in checkForThreadsOverLimit() 72 public void deleteOldMessages(Context context) { in deleteOldMessages() argument 76 if (!isAutoDeleteEnabled(context)) { in deleteOldMessages() 80 Cursor cursor = getAllThreads(context); in deleteOldMessages() 82 int limit = getMessageLimit(context); in deleteOldMessages() 85 deleteMessagesForThread(context, threadId, limit); in deleteOldMessages() 92 public void deleteOldMessagesByThreadId(Context context, long threadId) { in deleteOldMessagesByThreadId() argument 97 if (!isAutoDeleteEnabled(context)) { in deleteOldMessagesByThreadId() 101 deleteMessagesForThread(context, threadId, getMessageLimit(context)); in deleteOldMessagesByThreadId() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/model/account/ |
D | FallbackAccountType.java | 29 private FallbackAccountType(Context context, String resPackageName) { in FallbackAccountType() argument 40 addDataKindStructuredName(context); in FallbackAccountType() 41 addDataKindDisplayName(context); in FallbackAccountType() 42 addDataKindPhoneticName(context); in FallbackAccountType() 43 addDataKindNickname(context); in FallbackAccountType() 44 addDataKindPhone(context); in FallbackAccountType() 45 addDataKindEmail(context); in FallbackAccountType() 46 addDataKindStructuredPostal(context); in FallbackAccountType() 47 addDataKindIm(context); in FallbackAccountType() 48 addDataKindOrganization(context); in FallbackAccountType() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | Alarms.java | 112 public static long addAlarm(Context context, Alarm alarm) { in addAlarm() argument 114 Uri uri = context.getContentResolver().insert( in addAlarm() 120 clearSnoozeIfNeeded(context, timeInMillis); in addAlarm() 122 setNextAlert(context); in addAlarm() 130 public static void deleteAlarm(Context context, int alarmId) { in deleteAlarm() argument 133 ContentResolver contentResolver = context.getContentResolver(); in deleteAlarm() 135 disableSnoozeAlert(context, alarmId); in deleteAlarm() 140 setNextAlert(context); in deleteAlarm() 144 public static CursorLoader getAlarmsCursorLoader(Context context) { in getAlarmsCursorLoader() argument 145 return new CursorLoader(context, Alarm.Columns.CONTENT_URI, in getAlarmsCursorLoader() [all …]
|
D | AlarmReceiver.java | 41 public void onReceive(final Context context, final Intent intent) { in onReceive() argument 43 final WakeLock wl = AlarmAlertWakeLock.createPartialWakeLock(context); in onReceive() 47 handleIntent(context, intent); in onReceive() 54 private void handleIntent(Context context, Intent intent) { in handleIntent() argument 57 updateNotification(context, (Alarm) in handleIntent() 69 Alarms.disableSnoozeAlert(context, alarm.id); in handleIntent() 70 Alarms.setNextAlert(context); in handleIntent() 75 Alarms.saveSnoozeAlert(context, Alarms.INVALID_ALARM_ID, -1); in handleIntent() 78 context.sendBroadcast(new Intent(Alarms.ALARM_SNOOZE_CANCELLED)); in handleIntent() 101 Alarms.setNextAlert(context); in handleIntent() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | ImfUtils.java | 39 public static InputMethodManager getInputMethodManager(Context context) { in getInputMethodManager() argument 41 sInputMethodManager = (InputMethodManager)context.getSystemService( in getInputMethodManager() 49 public static InputMethodInfo getInputMethodInfoOfThisIme(Context context) { in getInputMethodInfoOfThisIme() argument 51 final InputMethodManager imm = getInputMethodManager(context); in getInputMethodInfoOfThisIme() 52 final String packageName = context.getPackageName(); in getInputMethodInfoOfThisIme() 62 public static String getInputMethodIdOfThisIme(Context context) { in getInputMethodIdOfThisIme() argument 63 return getInputMethodInfoOfThisIme(context).getId(); in getInputMethodIdOfThisIme() 66 public static boolean checkIfSubtypeBelongsToThisImeAndEnabled(Context context, in checkIfSubtypeBelongsToThisImeAndEnabled() argument 68 final InputMethodInfo myImi = getInputMethodInfoOfThisIme(context); in checkIfSubtypeBelongsToThisImeAndEnabled() 69 final InputMethodManager imm = getInputMethodManager(context); in checkIfSubtypeBelongsToThisImeAndEnabled() [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/DeskClock/src/com/android/deskclock/timer/ |
D | TimerReceiver.java | 48 public void onReceive(final Context context, final Intent intent) { in onReceive() argument 56 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in onReceive() 67 showInUseNotification(context); in onReceive() 70 cancelInUseNotification(context); in onReceive() 94 stopRingtoneIfNoTimesup(context); in onReceive() 96 Intent activityIntent = new Intent(context, DeskClock.class); in onReceive() 99 context.startActivity(activityIntent); in onReceive() 116 si.setClass(context, TimerRingService.class); in onReceive() 117 context.startService(si); in onReceive() 122 cancelInUseNotification(context); in onReceive() [all …]
|
/packages/apps/Mms/src/com/android/mms/transaction/ |
D | MessagingNotification.java | 149 public void onReceive(Context context, Intent intent) { in onReceive() argument 154 Conversation.markAllConversationsAsSeen(context); in onReceive() 180 public static void init(Context context) { in init() argument 186 context.registerReceiver(sNotificationDeletedReceiver, intentFilter); in init() 187 sPduPersister = PduPersister.getPduPersister(context); in init() 192 sScreenDensity = context.getResources().getDisplayMetrics().density; in init() 220 public static void nonBlockingUpdateNewMessageIndicator(final Context context, in nonBlockingUpdateNewMessageIndicator() argument 231 blockingUpdateNewMessageIndicator(context, newMsgThreadId, isStatusMessage); in nonBlockingUpdateNewMessageIndicator() 246 public static void blockingUpdateNewMessageIndicator(Context context, long newMsgThreadId, in blockingUpdateNewMessageIndicator() argument 259 addMmsNotificationInfos(context, threads, notificationSet); in blockingUpdateNewMessageIndicator() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetProvider.java | 56 public void onReceive(Context context, Intent intent) { in onReceive() argument 62 if (Utils.getWidgetUpdateAction(context).equals(action)) { in onReceive() 63 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in onReceive() 64 performUpdate(context, appWidgetManager, in onReceive() 65 appWidgetManager.getAppWidgetIds(getComponentName(context)), in onReceive() 71 || action.equals(Utils.getWidgetScheduledUpdateAction(context))) { in onReceive() 72 Intent service = new Intent(context, CalendarAppWidgetService.class); in onReceive() 73 context.startService(service); in onReceive() 75 super.onReceive(context, intent); in onReceive() 83 public void onDisabled(Context context) { in onDisabled() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | LocalBluetoothPreferences.java | 51 private static SharedPreferences getSharedPreferences(Context context) { in getSharedPreferences() argument 52 return context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); in getSharedPreferences() 55 static long getDiscoverableEndTimestamp(Context context) { in getDiscoverableEndTimestamp() argument 56 return getSharedPreferences(context).getLong( in getDiscoverableEndTimestamp() 60 static boolean shouldShowDialogInForeground(Context context, in shouldShowDialogInForeground() argument 62 LocalBluetoothManager manager = LocalBluetoothManager.getInstance(context); in shouldShowDialogInForeground() 73 if ((context.getResources().getConfiguration().uiMode & in shouldShowDialogInForeground() 79 SharedPreferences sharedPreferences = getSharedPreferences(context); in shouldShowDialogInForeground() 115 static void persistSelectedDeviceInPicker(Context context, String deviceAddress) { in persistSelectedDeviceInPicker() argument 116 SharedPreferences.Editor editor = getSharedPreferences(context).edit(); in persistSelectedDeviceInPicker() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | PhoneCapabilityTester.java | 44 public static boolean isIntentRegistered(Context context, Intent intent) { in isIntentRegistered() argument 45 final PackageManager packageManager = context.getPackageManager(); in isIntentRegistered() 54 public static boolean isPhone(Context context) { in isPhone() argument 55 if (!sIsInitialized) initialize(context); in isPhone() 60 private static void initialize(Context context) { in initialize() argument 61 final TelephonyManager telephonyManager = new TelephonyManager(context); in initialize() 63 sIsSipPhone = sIsPhone && SipManager.isVoipSupported(context); in initialize() 70 public static boolean isSipPhone(Context context) { in isSipPhone() argument 71 if (!sIsInitialized) initialize(context); in isSipPhone() 78 public static boolean isSmsIntentRegistered(Context context) { in isSmsIntentRegistered() argument [all …]
|
D | AccountSelectionUtil.java | 59 public AccountSelectedListener(Context context, List<AccountWithDataSet> accountList, in AccountSelectedListener() argument 64 mContext = context; in AccountSelectedListener() 75 public static Dialog getSelectAccountDialog(Context context, int resId) { in getSelectAccountDialog() argument 76 return getSelectAccountDialog(context, resId, null, null); in getSelectAccountDialog() 79 public static Dialog getSelectAccountDialog(Context context, int resId, in getSelectAccountDialog() argument 81 return getSelectAccountDialog(context, resId, onClickListener, null); in getSelectAccountDialog() 88 public static Dialog getSelectAccountDialog(Context context, int resId, in getSelectAccountDialog() argument 91 final AccountTypeManager accountTypes = AccountTypeManager.getInstance(context); in getSelectAccountDialog() 100 context, android.R.style.Theme_Light); in getSelectAccountDialog() 104 new ArrayAdapter<AccountWithDataSet>(context, android.R.layout.simple_list_item_2, in getSelectAccountDialog() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SearchWidgetProvider.java | 63 public void onReceive(Context context, Intent intent) { in onReceive() argument 69 updateSearchWidgets(context); in onReceive() 75 private static SearchWidgetState[] getSearchWidgetStates(Context context) { in getSearchWidgetStates() argument 76 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in getSearchWidgetStates() 77 int[] appWidgetIds = appWidgetManager.getAppWidgetIds(myComponentName(context)); in getSearchWidgetStates() 80 states[i] = getSearchWidgetState(context, appWidgetIds[i]); in getSearchWidgetStates() 89 public static void updateSearchWidgets(Context context) { in updateSearchWidgets() argument 91 SearchWidgetState[] states = getSearchWidgetStates(context); in updateSearchWidgets() 94 state.updateWidget(context, AppWidgetManager.getInstance(context)); in updateSearchWidgets() 101 private static ComponentName myComponentName(Context context) { in myComponentName() argument [all …]
|
/packages/apps/Email/src/com/android/email/ |
D | Email.java | 92 public static void setServicesEnabledAsync(final Context context) { in setServicesEnabledAsync() argument 96 setServicesEnabledSync(context); in setServicesEnabledAsync() 111 public static boolean setServicesEnabledSync(Context context) { in setServicesEnabledSync() argument 114 c = context.getContentResolver().query( in setServicesEnabledSync() 119 setServicesEnabled(context, enable); in setServicesEnabledSync() 128 private static void setServicesEnabled(Context context, boolean enabled) { in setServicesEnabled() argument 129 PackageManager pm = context.getPackageManager(); in setServicesEnabled() 131 new ComponentName(context, MailService.class)) == in setServicesEnabled() 137 MailService.actionReschedule(context); in setServicesEnabled() 140 new ComponentName(context, MessageCompose.class), in setServicesEnabled() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | DetailsHelper.java | 90 public static String getDetailsName(Context context, int key) { in getDetailsName() argument 93 return context.getString(R.string.title); in getDetailsName() 95 return context.getString(R.string.description); in getDetailsName() 97 return context.getString(R.string.time); in getDetailsName() 99 return context.getString(R.string.location); in getDetailsName() 101 return context.getString(R.string.path); in getDetailsName() 103 return context.getString(R.string.width); in getDetailsName() 105 return context.getString(R.string.height); in getDetailsName() 107 return context.getString(R.string.orientation); in getDetailsName() 109 return context.getString(R.string.duration); in getDetailsName() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppReceiver.java | 61 public void onReceive(Context context, Intent intent) { in onReceive() argument 69 context.startService(new Intent(context, BluetoothOppService.class)); in onReceive() 74 if (BluetoothOppManager.getInstance(context).mSendingFlag) { in onReceive() 76 BluetoothOppManager.getInstance(context).mSendingFlag = false; in onReceive() 88 context.startActivity(in1); in onReceive() 93 BluetoothOppManager mOppManager = BluetoothOppManager.getInstance(context); in onReceive() 107 toastMsg = context.getString(R.string.bt_toast_5, Integer.toString(batchSize), in onReceive() 110 toastMsg = context.getString(R.string.bt_toast_4, deviceName); in onReceive() 112 Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show(); in onReceive() 117 Intent in = new Intent(context, BluetoothOppIncomingFileConfirmActivity.class); in onReceive() [all …]
|
D | BluetoothOppUtility.java | 68 public static BluetoothOppTransferInfo queryRecord(Context context, Uri uri) { in queryRecord() argument 71 Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); in queryRecord() 94 info.mFileName = context.getString(R.string.unknown_file); in queryRecord() 101 info.mFileType = context.getContentResolver().getType(u); in queryRecord() 104 info.mFileType = context.getContentResolver().getType(u); in queryRecord() 113 BluetoothOppManager.getInstance(context).getDeviceName(remoteDevice); in queryRecord() 135 public static ArrayList<String> queryTransfersInBatch(Context context, Long timeStamp) { in queryTransfersInBatch() argument 139 Cursor metadataCursor = context.getContentResolver().query(BluetoothShare.CONTENT_URI, in queryTransfersInBatch() 167 public static void openReceivedFile(Context context, String fileName, String mimetype, in openReceivedFile() argument 176 Intent in = new Intent(context, BluetoothOppBtErrorActivity.class); in openReceivedFile() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
D | AlertReceiver.java | 88 public void onReceive(final Context context, final Intent intent) { in onReceive() argument 98 Intent serviceIntent = new Intent(context, DismissAlarmsService.class); in onReceive() 99 context.startService(serviceIntent); in onReceive() 103 context.sendBroadcast(closeNotificationShadeIntent); in onReceive() 108 Intent i = new Intent(context, QuickResponseActivity.class); in onReceive() 111 context.startActivity(i); in onReceive() 115 i.setClass(context, AlertService.class); in onReceive() 124 beginStartingService(context, i); in onReceive() 132 public static void beginStartingService(Context context, Intent intent) { in beginStartingService() argument 136 (PowerManager)context.getSystemService(Context.POWER_SERVICE); in beginStartingService() [all …]
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastReceiver.java | 47 public void onReceive(Context context, Intent intent) { in onReceive() argument 48 onReceiveWithPrivilege(context, intent, false); in onReceive() 51 protected void onReceiveWithPrivilege(Context context, Intent intent, boolean privileged) { in onReceiveWithPrivilege() argument 58 TelephonyManager tm = (TelephonyManager) context.getSystemService( in onReceiveWithPrivilege() 60 tm.listen(new ServiceStateListener(context.getApplicationContext()), in onReceiveWithPrivilege() 65 startConfigService(context); in onReceiveWithPrivilege() 74 intent.setClass(context, CellBroadcastAlertService.class); in onReceiveWithPrivilege() 75 context.startService(intent); in onReceiveWithPrivilege() 85 handleCdmaSmsCbProgramData(context, programDataList); in onReceiveWithPrivilege() 99 context.sendBroadcastAsUser(areaInfoIntent, UserHandle.ALL, in onReceiveWithPrivilege() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | SpecialCharSequenceMgr.java | 80 public static boolean handleChars(Context context, String input, EditText textField) { in handleChars() argument 81 return handleChars(context, input, false, textField); in handleChars() 84 static boolean handleChars(Context context, String input) { in handleChars() argument 85 return handleChars(context, input, false, null); in handleChars() 88 static boolean handleChars(Context context, String input, boolean useSystemWindow, in handleChars() argument 94 if (handleIMEIDisplay(context, dialString, useSystemWindow) in handleChars() 95 || handlePinEntry(context, dialString) in handleChars() 96 || handleAdnEntry(context, dialString, textField) in handleChars() 97 || handleSecretCode(context, dialString)) { in handleChars() 130 static boolean handleSecretCode(Context context, String input) { in handleSecretCode() argument [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/ |
D | DataExporter.java | 54 public static Uri exportData(Context context) throws IOException { in exportData() argument 56 final File outFile = getOutputFile(context, fileName); in exportData() 59 removeDumpFiles(context); in exportData() 63 ensureOutputDirectory(context); in exportData() 67 addDirectory(context, os, context.getFilesDir().getParentFile(), "contacts-files"); in exportData() 84 private static File getOutputDirectory(Context context) { in getOutputDirectory() argument 85 return new File(context.getCacheDir(), DUMP_FILE_DIRECTORY_NAME); in getOutputDirectory() 88 private static void ensureOutputDirectory(Context context) { in ensureOutputDirectory() argument 89 final File directory = getOutputDirectory(context); in ensureOutputDirectory() 95 public static File getOutputFile(Context context, String fileName) { in getOutputFile() argument [all …]
|
/packages/apps/Mms/src/com/android/mms/widget/ |
D | MmsWidgetProvider.java | 45 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { in onUpdate() argument 46 super.onUpdate(context, appWidgetManager, appWidgetIds); in onUpdate() 49 updateWidget(context, appWidgetIds[i]); in onUpdate() 54 public void onReceive(Context context, Intent intent) { in onReceive() argument 65 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); in onReceive() 66 int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, in onReceive() 75 super.onReceive(context, intent); in onReceive() 82 private static void updateWidget(Context context, int appWidgetId) { in updateWidget() argument 86 RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget); in updateWidget() 90 final Intent intent = new Intent(context, MmsWidgetService.class); in updateWidget() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
D | PhotoAppWidgetProvider.java | 40 static RemoteViews buildWidget(Context context, int id, Entry entry) { in buildWidget() argument 45 return buildStackWidget(context, id, entry); in buildWidget() 47 return buildFrameWidget(context, id, entry); in buildWidget() 53 public void onUpdate(Context context, in onUpdate() argument 58 GalleryWidgetMigrator.migrateGalleryWidgets(context); in onUpdate() 61 WidgetDatabaseHelper helper = new WidgetDatabaseHelper(context); in onUpdate() 66 RemoteViews views = buildWidget(context, id, entry); in onUpdate() 75 super.onUpdate(context, appWidgetManager, appWidgetIds); in onUpdate() 80 private static RemoteViews buildStackWidget(Context context, int widgetId, Entry entry) { in buildStackWidget() argument 82 context.getPackageName(), R.layout.appwidget_main); in buildStackWidget() [all …]
|