Home
last modified time | relevance | path

Searched refs:defValue (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/core/java/com/android/internal/util/
DParseUtils.java32 public static int parseInt(@Nullable String value, int defValue) { in parseInt() argument
33 return parseIntWithBase(value, 10, defValue); in parseInt()
37 public static int parseIntWithBase(@Nullable String value, int base, int defValue) { in parseIntWithBase() argument
39 return defValue; in parseIntWithBase()
44 return defValue; in parseIntWithBase()
49 public static long parseLong(@Nullable String value, long defValue) { in parseLong() argument
50 return parseLongWithBase(value, 10, defValue); in parseLong()
54 public static long parseLongWithBase(@Nullable String value, int base, long defValue) { in parseLongWithBase() argument
56 return defValue; in parseLongWithBase()
61 return defValue; in parseLongWithBase()
[all …]
/frameworks/base/core/java/android/preference/
DPreferenceDataStore.java138 default String getString(String key, @Nullable String defValue) { in getString() argument
139 return defValue; in getString()
161 default int getInt(String key, int defValue) { in getInt() argument
162 return defValue; in getInt()
172 default long getLong(String key, long defValue) { in getLong() argument
173 return defValue; in getLong()
183 default float getFloat(String key, float defValue) { in getFloat() argument
184 return defValue; in getFloat()
194 default boolean getBoolean(String key, boolean defValue) { in getBoolean() argument
195 return defValue; in getBoolean()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DBridgeSharedPreferences.java37 public String getString(String key, String defValue) { in getString() argument
38 return defValue; in getString()
47 public int getInt(String key, int defValue) { in getInt() argument
48 return defValue; in getInt()
52 public long getLong(String key, long defValue) { in getLong() argument
53 return defValue; in getLong()
57 public float getFloat(String key, float defValue) { in getFloat() argument
58 return defValue; in getFloat()
62 public boolean getBoolean(String key, boolean defValue) { in getBoolean() argument
63 return defValue; in getBoolean()
/frameworks/layoutlib/bridge/src/android/content/res/
DBridgeTypedArray.java251 public boolean getBoolean(int index, boolean defValue) { in getBoolean() argument
253 return s == null ? defValue : XmlUtils.convertValueToBoolean(s, defValue); in getBoolean()
266 public int getInt(int index, int defValue) { in getInt() argument
269 return convertValueToInt(s, defValue); in getInt()
281 return defValue; in getInt()
292 public float getFloat(int index, float defValue) { in getFloat() argument
304 return defValue; in getFloat()
320 public int getColor(int index, int defValue) { in getColor() argument
322 return defValue; in getColor()
326 return defValue; in getColor()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/
DFakeSharedPreferences.kt39 override fun getString(key: String, defValue: String?): String? { in <lambda>()
40 return data.getOrDefault(key, defValue) as? String? in <lambda>()
47 override fun getInt(key: String, defValue: Int): Int { in <lambda>()
48 return data.getOrDefault(key, defValue) as Int in <lambda>()
51 override fun getLong(key: String, defValue: Long): Long { in <lambda>()
52 return data.getOrDefault(key, defValue) as Long in <lambda>()
55 override fun getFloat(key: String, defValue: Float): Float { in <lambda>()
56 return data.getOrDefault(key, defValue) as Float in <lambda>()
59 override fun getBoolean(key: String, defValue: Boolean): Boolean { in <lambda>()
60 return data.getOrDefault(key, defValue) as Boolean in <lambda>()
/frameworks/base/tools/aapt/
DAaptXml.cpp49 int32_t defValue, String8* outError) { in getIntegerAttributeAtIndex() argument
55 return defValue; in getIntegerAttributeAtIndex()
63 return defValue; in getIntegerAttributeAtIndex()
140 const char* attr, int32_t defValue, String8* outError) { in getIntegerAttribute() argument
143 return defValue; in getIntegerAttribute()
145 return getIntegerAttributeAtIndex(tree, idx, defValue, outError); in getIntegerAttribute()
148 int32_t getIntegerAttribute(const ResXMLTree& tree, uint32_t attrRes, int32_t defValue, in getIntegerAttribute() argument
152 return defValue; in getIntegerAttribute()
154 return getIntegerAttributeAtIndex(tree, idx, defValue, outError); in getIntegerAttribute()
158 uint32_t attrRes, int32_t defValue, String8* outError) { in getResolvedIntegerAttribute() argument
[all …]
DAaptXml.h54 const char* attr, int32_t defValue = -1, android::String8* outError = NULL);
72 int32_t defValue = -1, android::String8* outError = NULL);
90 const android::ResXMLTree& tree, uint32_t attrRes, int32_t defValue = -1,
/frameworks/base/core/java/android/content/
DSharedPreferences.java287 String getString(String key, @Nullable String defValue); in getString() argument
320 int getInt(String key, int defValue); in getInt() argument
334 long getLong(String key, long defValue); in getLong() argument
348 float getFloat(String key, float defValue); in getFloat() argument
362 boolean getBoolean(String key, boolean defValue); in getBoolean() argument
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/
DSharedPreferencesLogger.java63 public String getString(String key, @Nullable String defValue) { in getString() argument
64 return defValue; in getString()
73 public int getInt(String key, int defValue) { in getInt() argument
74 return defValue; in getInt()
78 public long getLong(String key, long defValue) { in getLong() argument
79 return defValue; in getLong()
83 public float getFloat(String key, float defValue) { in getFloat() argument
84 return defValue; in getFloat()
88 public boolean getBoolean(String key, boolean defValue) { in getBoolean() argument
89 return defValue; in getBoolean()
/frameworks/base/core/java/android/content/res/
DTypedArray.java382 public boolean getBoolean(@StyleableRes int index, boolean defValue) { in getBoolean() argument
391 return defValue; in getBoolean()
400 return XmlUtils.convertValueToBoolean(v.coerceToString(), defValue); in getBoolean()
421 public int getInt(@StyleableRes int index, int defValue) { in getInt() argument
430 return defValue; in getInt()
439 return XmlUtils.convertValueToInt(v.coerceToString(), defValue); in getInt()
458 public float getFloat(@StyleableRes int index, float defValue) { in getFloat() argument
467 return defValue; in getFloat()
507 public int getColor(@StyleableRes int index, @ColorInt int defValue) { in getColor() argument
518 return defValue; in getColor()
[all …]
/frameworks/base/core/java/android/app/
DSharedPreferencesImpl.java307 public String getString(String key, @Nullable String defValue) { in getString() argument
311 return v != null ? v : defValue; in getString()
326 public int getInt(String key, int defValue) { in getInt() argument
330 return v != null ? v : defValue; in getInt()
334 public long getLong(String key, long defValue) { in getLong() argument
338 return v != null ? v : defValue; in getLong()
342 public float getFloat(String key, float defValue) { in getFloat() argument
346 return v != null ? v : defValue; in getFloat()
350 public boolean getBoolean(String key, boolean defValue) { in getBoolean() argument
354 return v != null ? v : defValue; in getBoolean()
DNotificationChannel.java1470 private static int safeInt(TypedXmlPullParser parser, String att, int defValue) { in safeInt() argument
1471 return parser.getAttributeInt(null, att, defValue); in safeInt()
1474 private static boolean safeBool(TypedXmlPullParser parser, String att, boolean defValue) { in safeBool() argument
1475 return parser.getAttributeBoolean(null, att, defValue); in safeBool()
1478 private static long[] safeLongArray(TypedXmlPullParser parser, String att, long[] defValue) { in safeLongArray() argument
1480 if (TextUtils.isEmpty(attributeValue)) return defValue; in safeLongArray()
/frameworks/base/services/core/java/com/android/server/graphics/fonts/
DPersistentSystemFontConfig.java123 private static long parseLongAttribute(TypedXmlPullParser parser, String attr, long defValue) { in parseLongAttribute() argument
126 return defValue; in parseLongAttribute()
131 return defValue; in parseLongAttribute()
/frameworks/base/core/tests/systemproperties/src/android/os/
DSystemPropertiesTest.java104 private static void testInt(String setVal, int defValue, int expected) { in testInt() argument
106 int value = SystemProperties.getInt(KEY, defValue); in testInt()
110 private static void testLong(String setVal, long defValue, long expected) { in testLong() argument
112 long value = SystemProperties.getLong(KEY, defValue); in testLong()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DGraphicsUtils.java139 public static float getFloat(Context context, int attr, float defValue) { in getFloat() argument
141 float value = ta.getFloat(0, defValue); in getFloat()
/frameworks/base/services/core/java/com/android/server/wallpaper/
DWallpaperDataParser.java415 private static int getAttributeInt(TypedXmlPullParser parser, String name, int defValue) { in getAttributeInt() argument
416 return parser.getAttributeInt(null, name, defValue); in getAttributeInt()
419 private static float getAttributeFloat(TypedXmlPullParser parser, String name, float defValue) { in getAttributeFloat() argument
420 return parser.getAttributeFloat(null, name, defValue); in getAttributeFloat()
423 private String getAttributeString(XmlPullParser parser, String name, String defValue) { in getAttributeString() argument
425 return (s != null) ? s : defValue; in getAttributeString()
/frameworks/base/core/java/android/service/notification/
DZenModeConfig.java901 private static int tryParseInt(String value, int defValue) { in tryParseInt() argument
902 if (TextUtils.isEmpty(value)) return defValue; in tryParseInt()
906 return defValue; in tryParseInt()
910 private static long tryParseLong(String value, long defValue) { in tryParseLong() argument
911 if (TextUtils.isEmpty(value)) return defValue; in tryParseLong()
915 return defValue; in tryParseLong()
919 private static Long tryParseLong(String value, Long defValue) { in tryParseLong() argument
920 if (TextUtils.isEmpty(value)) return defValue; in tryParseLong()
924 return defValue; in tryParseLong()
1521 private static boolean safeBoolean(TypedXmlPullParser parser, String att, boolean defValue) { in safeBoolean() argument
[all …]
/frameworks/base/core/java/android/inputmethodservice/
DKeyboard.java908 static int getDimensionOrFraction(TypedArray a, int index, int base, int defValue) { in getDimensionOrFraction() argument
910 if (value == null) return defValue; in getDimensionOrFraction()
912 return a.getDimensionPixelOffset(index, defValue); in getDimensionOrFraction()
915 return Math.round(a.getFraction(index, base, base, defValue)); in getDimensionOrFraction()
917 return defValue; in getDimensionOrFraction()
/frameworks/base/core/java/android/view/accessibility/
DAccessibilityRecord.java983 private void appendUnless(boolean defValue, int prop, StringBuilder builder) { in appendUnless() argument
985 if (DEBUG_CONCISE_TOSTRING && value == defValue) return; in appendUnless()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/
DAppIdleHistory.java859 private long getLongValue(XmlPullParser parser, String attrName, long defValue) { in getLongValue() argument
861 if (value == null) return defValue; in getLongValue()
865 private int getIntValue(XmlPullParser parser, String attrName, int defValue) { in getIntValue() argument
867 if (value == null) return defValue; in getIntValue()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/batterysaver/
DBatterySaverStateMachineTest.java141 public int getGlobalSetting(String key, int defValue) { in getGlobalSetting() argument
142 return mPersistedState.global.getOrDefault(key, defValue); in getGlobalSetting()
163 protected int getGlobalSetting(String key, int defValue) { in getGlobalSetting() argument
164 return mDevice.getGlobalSetting(key, defValue); in getGlobalSetting()
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySaverStateMachine.java1006 protected int getGlobalSetting(String key, int defValue) { in getGlobalSetting() argument
1007 return Settings.Global.getInt(mContext.getContentResolver(), key, defValue); in getGlobalSetting()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DUtils.java375 public static int getColorAttrDefaultColor(Context context, int attr, @ColorInt int defValue) { in getColorAttrDefaultColor() argument
377 @ColorInt int colorAccent = ta.getColor(0, defValue); in getColorAttrDefaultColor()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/satellite/
DSatelliteControllerTest.java4376 public boolean getBoolean(String key, boolean defValue) { in getBoolean() argument
4380 return defValue; in getBoolean()
4384 public float getFloat(String key, float defValue) { in getFloat() argument
4388 return defValue; in getFloat()
4392 public int getInt(String key, int defValue) { in getInt() argument
4396 return defValue; in getInt()
4400 public long getLong(String key, long defValue) { in getLong() argument
4404 return defValue; in getLong()
4408 public String getString(String key, String defValue) { in getString() argument
4410 else return defValue; in getString()
/frameworks/base/packages/WallpaperBackup/src/com/android/wallpaperbackup/
DWallpaperBackupAgent.java961 private int getAttributeInt(XmlPullParser parser, String name, int defValue) { in getAttributeInt() argument
963 return (value == null) ? defValue : Integer.parseInt(value); in getAttributeInt()

12