/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | RedactingFileDescriptor.java | 120 long[] res = new long[0]; in removeRange() local 126 res = Arrays.copyOf(res, res.length + 4); in removeRange() 127 res[res.length - 4] = ranges[i]; in removeRange() 128 res[res.length - 3] = start; in removeRange() 129 res[res.length - 2] = end; in removeRange() 130 res[res.length - 1] = ranges[i + 1]; in removeRange() 133 res = Arrays.copyOf(res, res.length + 2); in removeRange() 135 res[res.length - 2] = Math.max(ranges[i], end); in removeRange() 137 res[res.length - 2] = ranges[i]; in removeRange() 140 res[res.length - 1] = Math.min(ranges[i + 1], start); in removeRange() [all …]
|
D | FileUtils.java | 199 int res = 0; in translateModeStringToPosix() local 201 res = O_RDWR | O_CREAT; in translateModeStringToPosix() 203 res = O_WRONLY | O_CREAT; in translateModeStringToPosix() 205 res = O_RDONLY; in translateModeStringToPosix() 210 res |= O_TRUNC; in translateModeStringToPosix() 213 res |= O_APPEND; in translateModeStringToPosix() 215 return res; in translateModeStringToPosix() 222 String res = ""; in translateModePosixToString() local 224 res = "rw"; in translateModePosixToString() 226 res = "w"; in translateModePosixToString() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
D | Settings.java | 22 import android.content.res.Configuration; 23 import android.content.res.Resources; 180 protected SettingsValues job(final Resources res) { in loadSettings() 181 return new SettingsValues(context, prefs, res, inputAttributes); in loadSettings() 199 public static int readScreenMetrics(final Resources res) { in readScreenMetrics() argument 200 return res.getInteger(R.integer.config_screen_metrics); in readScreenMetrics() 205 final Resources res) { in readKeypressSoundEnabled() argument 207 res.getBoolean(R.bool.config_default_sound_enabled)); in readKeypressSoundEnabled() 211 final Resources res) { in readVibrationEnabled() argument 214 res.getBoolean(R.bool.config_default_vibration_enabled)); in readVibrationEnabled() [all …]
|
D | AdvancedSettingsFragment.java | 21 import android.content.res.Resources; 49 final Resources res = getResources(); in onCreate() local 68 if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) { in onCreate() 74 final String popupDismissDelayDefaultValue = Integer.toString(res.getInteger( in onCreate() 77 res.getString(R.string.key_preview_popup_dismiss_no_delay), in onCreate() 78 res.getString(R.string.key_preview_popup_dismiss_default_delay), in onCreate() 88 Settings.readKeyPreviewPopupEnabled(prefs, res)); in onCreate() 106 final Resources res = getResources(); in onSharedPreferenceChanged() local 109 Settings.readKeyPreviewPopupEnabled(prefs, res)); in onSharedPreferenceChanged() 119 final Resources res = getResources(); in refreshEnablingsOfKeypressSoundAndVibrationSettings() local [all …]
|
D | SettingsValues.java | 22 import android.content.res.Configuration; 23 import android.content.res.Resources; 122 public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res, in SettingsValues() argument 124 mLocale = res.getConfiguration().locale; in SettingsValues() 127 res.getInteger(R.integer.config_delay_in_milliseconds_to_update_old_suggestions); in SettingsValues() 128 mSpacingAndPunctuations = new SpacingAndPunctuations(res); in SettingsValues() 135 mVibrateOn = Settings.readVibrationEnabled(prefs, res); in SettingsValues() 136 mSoundOn = Settings.readKeypressSoundEnabled(prefs, res); in SettingsValues() 137 mKeyPreviewPopupOn = Settings.readKeyPreviewPopupEnabled(prefs, res); in SettingsValues() 140 mShowsVoiceInputKey = needsToShowVoiceInputKey(prefs, res) in SettingsValues() [all …]
|
D | SpacingAndPunctuations.java | 19 import android.content.res.Resources; 46 public SpacingAndPunctuations(final Resources res) { in SpacingAndPunctuations() argument 49 res.getString(R.string.symbols_preceded_by_space)); in SpacingAndPunctuations() 52 res.getString(R.string.symbols_followed_by_space)); in SpacingAndPunctuations() 54 res.getString(R.string.symbols_clustering_together)); in SpacingAndPunctuations() 57 res.getString(R.string.symbols_word_connectors)); in SpacingAndPunctuations() 59 res.getString(R.string.symbols_word_separators)); in SpacingAndPunctuations() 61 res.getString(R.string.symbols_sentence_terminators)); in SpacingAndPunctuations() 62 mSentenceSeparator = res.getInteger(R.integer.sentence_separator); in SpacingAndPunctuations() 63 mAbbreviationMarker = res.getInteger(R.integer.abbreviation_marker); in SpacingAndPunctuations() [all …]
|
/packages/apps/Nfc/nci/jni/ |
D | Mutex.cpp | 43 int res = pthread_mutex_init(&mMutex, NULL); in Mutex() local 44 if (res != 0) { in Mutex() 45 LOG(ERROR) << StringPrintf("Mutex::Mutex: fail init; error=0x%X", res); in Mutex() 59 int res = pthread_mutex_destroy(&mMutex); in ~Mutex() local 60 if (res != 0) { in ~Mutex() 61 LOG(ERROR) << StringPrintf("Mutex::~Mutex: fail destroy; error=0x%X", res); in ~Mutex() 75 int res = pthread_mutex_lock(&mMutex); in lock() local 76 if (res != 0) { in lock() 77 LOG(ERROR) << StringPrintf("Mutex::lock: fail lock; error=0x%X", res); in lock() 91 int res = pthread_mutex_unlock(&mMutex); in unlock() local [all …]
|
D | CondVar.cpp | 46 int const res = pthread_cond_init(&mCondition, &attr); in CondVar() local 47 if (res) { in CondVar() 48 LOG(ERROR) << StringPrintf("CondVar::CondVar: fail init; error=0x%X", res); in CondVar() 62 int const res = pthread_cond_destroy(&mCondition); in ~CondVar() local 63 if (res) { in ~CondVar() 65 res); in ~CondVar() 79 int const res = pthread_cond_wait(&mCondition, mutex.nativeHandle()); in wait() local 80 if (res) { in wait() 81 LOG(ERROR) << StringPrintf("CondVar::wait: fail wait; error=0x%X", res); in wait() 131 int const res = pthread_cond_signal(&mCondition); in notifyOne() local [all …]
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
D | MessageDetailsDialog.java | 21 import android.content.res.Resources; 104 final Resources res = Factory.get().getApplicationContext().getResources(); in getSmsMessageDetails() local 108 details.append(res.getString(R.string.message_type_label)); in getSmsMessageDetails() 109 details.append(res.getString(R.string.text_message)); in getSmsMessageDetails() 116 details.append(res.getString(R.string.from_label)); in getSmsMessageDetails() 123 details.append(res.getString(R.string.to_address_label)); in getSmsMessageDetails() 131 details.append(res.getString(R.string.sent_label)); in getSmsMessageDetails() 139 appendSentOrReceivedTimestamp(res, details, data); in getSmsMessageDetails() 141 appendSimInfo(res, self, details); in getSmsMessageDetails() 157 final Resources res = Factory.get().getApplicationContext().getResources(); in getMmsMessageDetails() local [all …]
|
/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/ |
D | MoreWirelessSettingsTest2.java | 183 .res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_SSID_RES_ID) in testAddNetworkMenu_Default() 189 .res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_SECURITY_OPTION_RES_ID) in testAddNetworkMenu_Default() 195 .res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_ADV_TOGGLE_RES_ID) in testAddNetworkMenu_Default() 207 .res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_ADV_TOGGLE_RES_ID) in testAddNetworkMenu_Proxy() 212 By.res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_PROXY_SETTINGS_RES_ID) in testAddNetworkMenu_Proxy() 223 By.res(SETTINGS_PACKAGE, "proxy_warning_limited_support")); in testAddNetworkMenu_Proxy() 225 By.res(SETTINGS_PACKAGE, "proxy_hostname")); in testAddNetworkMenu_Proxy() 227 By.res(SETTINGS_PACKAGE, "proxy_exclusionlist")); in testAddNetworkMenu_Proxy() 234 By.res(SETTINGS_PACKAGE, "proxy_pac")); in testAddNetworkMenu_Proxy() 244 .res(SETTINGS_PACKAGE, ADD_NETWORK_MENU_ADV_TOGGLE_RES_ID) in testAddNetworkMenu_IpSettings() [all …]
|
D | StorageWizardTest.java | 89 waitFor(By.res(PACKAGE, "suc_layout_title").text(containsIgnoringCase("How will you use"))); in testInternal() 90 waitFor(By.res(PACKAGE, "storage_wizard_init_internal")).click(); in testInternal() 93 waitFor(By.res(ANDROID_PACKAGE, "alertTitle").textContains("Format")); in testInternal() 97 waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("Slow")); in testInternal() 98 waitFor(By.res(PACKAGE, "storage_next_button")).click(); in testInternal() 101 waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("Move content")); in testInternal() 102 waitFor(By.res(PACKAGE, "storage_next_button")).click(); in testInternal() 105 waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("ready to use")); in testInternal() 106 waitFor(By.res(PACKAGE, "storage_next_button")).click(); in testInternal() 117 waitFor(By.res(PACKAGE, "suc_layout_title").textContains("How will you use")); in testExternal() [all …]
|
/packages/providers/MediaProvider/jni/ |
D | MediaProviderWrapper.cpp | 87 int res = env->CallIntMethod(media_provider_object, mid_insert_file, j_path.get(), uid); in insertFileInternal() local 92 return res; in insertFileInternal() 98 int res = env->CallIntMethod(media_provider_object, mid_delete_file, j_path.get(), uid); in deleteFileInternal() local 103 return res; in deleteFileInternal() 109 int res = env->CallIntMethod(media_provider_object, mid_is_open_allowed, j_path.get(), uid, in isOpenAllowedInternal() local 115 return res; in isOpenAllowedInternal() 129 int res = env->CallIntMethod(media_provider_object, mid_is_mkdir_or_rmdir_allowed, j_path.get(), in isMkdirOrRmdirAllowedInternal() local 135 return res; in isMkdirOrRmdirAllowedInternal() 142 int res = env->CallIntMethod(media_provider_object, mid_is_opendir_allowed, j_path.get(), uid, in isOpendirAllowedInternal() local 148 return res; in isOpendirAllowedInternal() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | DeviceProfile.java | 20 import android.content.res.Configuration; 21 import android.content.res.Resources; 182 final Resources res = context.getResources(); in DeviceProfile() local 184 edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin); in DeviceProfile() 189 int cellLayoutPadding = res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_padding); in DeviceProfile() 198 workspacePageIndicatorHeight = res.getDimensionPixelSize( in DeviceProfile() 201 res.getDimensionPixelSize(R.dimen.workspace_page_indicator_overlap_workspace); in DeviceProfile() 204 res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding); in DeviceProfile() 205 dropTargetBarSizePx = res.getDimensionPixelSize(R.dimen.dynamic_grid_drop_target_size); in DeviceProfile() 207 res.getDimensionPixelSize(R.dimen.dynamic_grid_min_spring_loaded_space); in DeviceProfile() [all …]
|
D | ResourceUtils.java | 19 import android.content.res.Resources; 28 public static int getNavbarSize(String resName, Resources res) { in getNavbarSize() argument 29 return getDimenByName(resName, res, DEFAULT_NAVBAR_VALUE); in getNavbarSize() 32 public static int getDimenByName(String resName, Resources res, int defaultValue) { in getDimenByName() argument 34 final int frameSizeResID = res.getIdentifier(resName, "dimen", "android"); in getDimenByName() 36 frameSize = res.getDimensionPixelSize(frameSizeResID); in getDimenByName() 38 frameSize = pxFromDp(defaultValue, res.getDisplayMetrics()); in getDimenByName() 43 public static boolean getBoolByName(String resName, Resources res, boolean defaultValue) { in getBoolByName() argument 45 final int resId = res.getIdentifier(resName, "bool", "android"); in getBoolByName() 47 val = res.getBoolean(resId); in getBoolByName()
|
/packages/modules/DnsResolver/ |
D | getaddrinfo.cpp | 152 addrinfo** res); 155 static int res_queryN(const char* name, res_target* target, res_state res, int* herrno); 156 static int res_searchN(const char* name, res_target* target, res_state res, int* herrno); 157 static int res_querydomainN(const char* name, const char* domain, res_target* target, res_state res, 325 addrinfo** res, NetworkDnsEventReported* event) { in android_getaddrinfofornetcontext() argument 329 assert(res != nullptr); in android_getaddrinfofornetcontext() 398 return resolv_getaddrinfo(hostname, servname, hints, netcontext, res, event); in android_getaddrinfofornetcontext() 403 *res = nullptr; in android_getaddrinfofornetcontext() 405 *res = sentinel.ai_next; in android_getaddrinfofornetcontext() 411 const android_net_context* _Nonnull netcontext, addrinfo** _Nonnull res, in resolv_getaddrinfo() argument [all …]
|
D | DnsResolverService.cpp | 136 int res = ResolverEventReporter::getInstance().addListener(listener); in registerEventListener() local 138 return statusFromErrcode(res); in registerEventListener() 200 int res = gDnsResolv->resolverCtrl.setResolverConfiguration(resolverParams); in setResolverConfiguration() local 201 gResNetdCallbacks.log(entry.returns(res).withAutomaticDuration().toString().c_str()); in setResolverConfiguration() 203 return statusFromErrcode(res); in setResolverConfiguration() 213 int res = gDnsResolv->resolverCtrl.getResolverInfo(netId, servers, domains, tlsServers, params, in getResolverInfo() local 216 return statusFromErrcode(res); in getResolverInfo() 241 int res = gDnsResolv->resolverCtrl.getPrefix64(netId, &prefix); in getPrefix64() local 244 return statusFromErrcode(res); in getPrefix64() 265 int res = gDnsResolv->setLogSeverity(logSeverity); in setLogSeverity() local [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | ResourceUtils.java | 19 import android.content.res.Resources; 20 import android.content.res.TypedArray; 70 public static String getDeviceOverrideValue(final Resources res, final int overrideResId, in getDeviceOverrideValue() argument 72 final int orientation = res.getConfiguration().orientation; in getDeviceOverrideValue() 78 final String[] overrideArray = res.getStringArray(overrideResId); in getDeviceOverrideValue() 83 + " resource="+ res.getResourceEntryName(overrideResId) in getDeviceOverrideValue() 185 public static int getDefaultKeyboardWidth(final Resources res) { in getDefaultKeyboardWidth() argument 186 final DisplayMetrics dm = res.getDisplayMetrics(); in getDefaultKeyboardWidth() 190 public static int getKeyboardHeight(final Resources res, final SettingsValues settingsValues) { in getKeyboardHeight() argument 191 final int defaultKeyboardHeight = getDefaultKeyboardHeight(res); in getKeyboardHeight() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | AccessibilityUtil.java | 19 import android.content.res.Resources; 111 public static String getVocalizedPhoneNumber(final Resources res, final String phoneNumber) { in getVocalizedPhoneNumber() argument 117 getVocalizedNumber(res, c, vocalizedPhoneNumber); in getVocalizedPhoneNumber() 122 public static void getVocalizedNumber(final Resources res, final char c, in getVocalizedNumber() argument 126 builder.append(res.getString(R.string.content_description_for_number_zero)); in getVocalizedNumber() 130 builder.append(res.getString(R.string.content_description_for_number_one)); in getVocalizedNumber() 134 builder.append(res.getString(R.string.content_description_for_number_two)); in getVocalizedNumber() 138 builder.append(res.getString(R.string.content_description_for_number_three)); in getVocalizedNumber() 142 builder.append(res.getString(R.string.content_description_for_number_four)); in getVocalizedNumber() 146 builder.append(res.getString(R.string.content_description_for_number_five)); in getVocalizedNumber() [all …]
|
/packages/apps/Settings/src/com/android/settings/accounts/ |
D | AccountPreference.java | 99 int res; in getSyncStatusMessage() local 102 res = R.string.sync_enabled; in getSyncStatusMessage() 105 res = R.string.sync_disabled; in getSyncStatusMessage() 108 res = R.string.sync_error; in getSyncStatusMessage() 111 res = R.string.sync_in_progress; in getSyncStatusMessage() 114 res = R.string.sync_error; in getSyncStatusMessage() 117 return res; in getSyncStatusMessage() 121 int res; in getSyncStatusIcon() local 125 res = R.drawable.ic_settings_sync; in getSyncStatusIcon() 128 res = R.drawable.ic_settings_sync_disabled; in getSyncStatusIcon() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/ |
D | AccountPreference.java | 99 int res; in getSyncStatusMessage() local 102 res = R.string.sync_enabled; in getSyncStatusMessage() 105 res = R.string.sync_disabled; in getSyncStatusMessage() 108 res = R.string.sync_error; in getSyncStatusMessage() 111 res = R.string.sync_in_progress; in getSyncStatusMessage() 114 res = R.string.sync_error; in getSyncStatusMessage() 117 return res; in getSyncStatusMessage() 121 int res; in getSyncStatusIcon() local 125 res = R.drawable.ic_settings_sync; in getSyncStatusIcon() 128 res = R.drawable.ic_sync_grey_holo; in getSyncStatusIcon() [all …]
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastSettings.java | 30 import android.content.res.Resources; 304 Resources res = CellBroadcastSettings.getResources(getContext(), in onCreatePreferences() local 308 mDisableSevereWhenExtremeDisabled = res.getBoolean( in onCreatePreferences() 386 mOverrideDndCheckBox.setChecked(res.getBoolean(R.bool.override_dnd_default)); in onCreatePreferences() 434 Resources res = CellBroadcastSettings.getResources(getContext(), in updatePreferenceVisibility() local 442 res.getBoolean(R.bool.show_presidential_alerts_settings)); in updatePreferenceVisibility() 446 mExtremeCheckBox.setVisible(res.getBoolean(R.bool.show_extreme_alert_settings) in updatePreferenceVisibility() 452 mSevereCheckBox.setVisible(res.getBoolean(R.bool.show_severe_alert_settings) in updatePreferenceVisibility() 458 mAmberCheckBox.setVisible(res.getBoolean(R.bool.show_amber_alert_settings) in updatePreferenceVisibility() 465 res.getBoolean(R.bool.show_public_safety_settings) in updatePreferenceVisibility() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/ |
D | TransitionUtils.java | 20 import android.content.res.Resources; 34 public static ObjectAnimator createActivityFadeInAnimator(Resources res, boolean useFloats) { in createActivityFadeInAnimator() argument 36 res.getValue(R.dimen.alpha_activity_in_bkg_start, startAlpha, true); in createActivityFadeInAnimator() 39 res.getValue(R.dimen.alpha_activity_in_bkg_end, endAlpha, true); in createActivityFadeInAnimator() 49 animator.setDuration(res.getInteger(R.integer.alpha_activity_in_bkg_duration)); in createActivityFadeInAnimator() 50 animator.setStartDelay(res.getInteger(R.integer.alpha_activity_in_bkg_delay)); in createActivityFadeInAnimator() 54 public static ObjectAnimator createActivityFadeOutAnimator(Resources res, boolean useFloats) { in createActivityFadeOutAnimator() argument 56 res.getValue(R.dimen.alpha_activity_out_bkg_start, startAlpha, true); in createActivityFadeOutAnimator() 59 res.getValue(R.dimen.alpha_activity_out_bkg_end, endAlpha, true); in createActivityFadeOutAnimator() 69 animator.setDuration(res.getInteger(R.integer.alpha_activity_out_bkg_duration)); in createActivityFadeOutAnimator() [all …]
|
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/ |
D | DefaultPartnerProvider.java | 24 import android.content.res.Resources; 66 final Resources res = pm.getResourcesForApplication(packageName); in findSystemApk() local 67 return Pair.create(packageName, res); in findSystemApk() 84 Resources res = getResources(); in getLegacyWallpaperDirectory() local 87 if (res != null) { in getLegacyWallpaperDirectory() 88 resId = res.getIdentifier(PartnerProvider.RES_LEGACY_SYSTEM_WALLPAPER_DIR, in getLegacyWallpaperDirectory() 91 return (resId != 0) ? new File(res.getString(resId)) : null; in getLegacyWallpaperDirectory() 101 Resources res = getResources(); in shouldHideDefaultWallpaper() local 104 if (res != null) { in shouldHideDefaultWallpaper() 105 final int resId = res.getIdentifier( in shouldHideDefaultWallpaper() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
D | Util.java | 23 import android.content.res.Resources; 47 public static Uri getResourceUri(Context packageContext, int res) { in getResourceUri() argument 50 return getResourceUri(resources, packageContext.getPackageName(), res); in getResourceUri() 52 Log.e(TAG, "Resource not found: " + res + " in " + packageContext.getPackageName()); in getResourceUri() 57 public static Uri getResourceUri(Context context, ApplicationInfo appInfo, int res) { in getResourceUri() argument 60 return getResourceUri(resources, appInfo.packageName, res); in getResourceUri() 65 Log.e(TAG, "Resource not found: " + res + " in " + appInfo.packageName); in getResourceUri() 70 private static Uri getResourceUri(Resources resources, String appPkg, int res) in getResourceUri() argument 72 String resPkg = resources.getResourcePackageName(res); in getResourceUri() 73 String type = resources.getResourceTypeName(res); in getResourceUri() [all …]
|
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | LetterTileDrawable.java | 18 import android.content.res.Resources; 19 import android.content.res.TypedArray; 71 public LetterTileDrawable(final Resources res) { in LetterTileDrawable() argument 72 this(res, null, null); in LetterTileDrawable() 80 public LetterTileDrawable(final Resources res, @Nullable String letters, in LetterTileDrawable() argument 88 sDefaultColor = res.getColor(R.color.letter_tile_default_color, null /* theme */); in LetterTileDrawable() 89 TypedArray ta = res.obtainTypedArray(R.array.letter_tile_colors); in LetterTileDrawable() 105 sTileFontColor = res.getColor(R.color.letter_tile_font_color, null /* theme */); in LetterTileDrawable() 106 sLetterToTileRatio = res.getFraction(R.fraction.letter_to_tile_ratio, 1, 1); in LetterTileDrawable() 108 sDefaultPersonAvatar = res.getDrawable(R.drawable.ic_person, null /* theme */); in LetterTileDrawable() [all …]
|