Home
last modified time | relevance | path

Searched refs:defaultValue (Results 1 – 25 of 292) sorted by relevance

12345678910>>...12

/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
DCompatUtils.java93 public static Object invoke(final Object receiver, final Object defaultValue, in invoke() argument
96 return defaultValue; in invoke()
104 return defaultValue; in invoke()
107 public static Object getFieldValue(final Object receiver, final Object defaultValue, in getFieldValue() argument
110 return defaultValue; in getFieldValue()
117 return defaultValue; in getFieldValue()
146 final T defaultValue, final Class<?>... parameterTypes) { in getMethod() argument
148 defaultValue); in getMethod()
151 public ToIntMethodWrapper getPrimitiveMethod(final String name, final int defaultValue, in getPrimitiveMethod() argument
154 defaultValue); in getPrimitiveMethod()
[all …]
/packages/modules/Permission/tests/utils/safetycenter/java/com/android/safetycenter/testing/
DSafetyCenterFlags.kt48 Flag("safety_center_is_enabled", defaultValue = SdkLevel.isAtLeastU(), BooleanParser()) in <lambda>()
52 Flag("safety_center_notifications_enabled", defaultValue = false, BooleanParser()) in <lambda>()
63 defaultValue = Duration.ofHours(2), in <lambda>()
74 defaultValue = emptySet(), in <lambda>()
85 defaultValue = emptySet(), in <lambda>()
100 defaultValue = Duration.ofDays(-1), in <lambda>()
106 Flag("safety_center_replace_lock_screen_icon_action", defaultValue = true, BooleanParser()) in <lambda>()
121 defaultValue = getAllRefreshTimeoutsMap(TEST_TIMEOUT), in <lambda>()
132 defaultValue = TIMEOUT_LONG, in <lambda>()
140 defaultValue = Duration.ofDays(2), in <lambda>()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/fixture/
DTestableSystemPropertiesTest.java39 int defaultValue = 2; in testForceToReturnDefaultValue_intValue() local
48 assertThat(SystemProperties.getInt(systemPropertyKey, defaultValue)) in testForceToReturnDefaultValue_intValue()
49 .isEqualTo(defaultValue); in testForceToReturnDefaultValue_intValue()
54 assertThat(SystemProperties.getInt(systemPropertyKey, defaultValue)) in testForceToReturnDefaultValue_intValue()
62 long defaultValue = 2L; in testForceToReturnDefaultValue_longValue() local
71 assertThat(SystemProperties.getLong(systemPropertyKey, defaultValue)) in testForceToReturnDefaultValue_longValue()
72 .isEqualTo(defaultValue); in testForceToReturnDefaultValue_longValue()
77 assertThat(SystemProperties.getLong(systemPropertyKey, defaultValue)) in testForceToReturnDefaultValue_longValue()
85 boolean defaultValue = false; in testForceToReturnDefaultValue_booleanValue()
94 assertThat(SystemProperties.getBoolean(systemPropertyKey, defaultValue)) in testForceToReturnDefaultValue_booleanValue()
[all …]
DTestableSystemProperties.java88 String defaultValue = invocation.getArgument(1); in getStringValue() local
89 String valueToReturn = sKeyValueMap.getOrDefault(key, defaultValue); in getStringValue()
96 Integer defaultValue = invocation.getArgument(1); in getIntValue() local
100 : defaultValue; in getIntValue()
107 Long defaultValue = invocation.getArgument(1); in getLongValue() local
111 : defaultValue; in getLongValue()
118 Boolean defaultValue = invocation.getArgument(1); in getBooleanValue() local
122 : defaultValue; in getBooleanValue()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/
DLauncherPrefsTest.kt57 putSync(TEST_BOOLEAN_ITEM.to(TEST_BOOLEAN_ITEM.defaultValue)) in has_keyPresentInLauncherPrefs_returnsTrue()
69 putSync(TEST_STRING_ITEM.to(TEST_STRING_ITEM.defaultValue)) in addListener_listeningForStringItemUpdates_isCorrectlyNotifiedOfUpdates()
71 putSync(TEST_STRING_ITEM.to(TEST_STRING_ITEM.defaultValue + "abc")) in addListener_listeningForStringItemUpdates_isCorrectlyNotifiedOfUpdates()
86 putSync(TEST_STRING_ITEM.to(TEST_STRING_ITEM.defaultValue + "hello.")) in removeListener_previouslyListeningForStringItemUpdates_isNoLongerNotifiedOfUpdates()
102 TEST_INT_ITEM.to(TEST_INT_ITEM.defaultValue + 123), in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
103 TEST_STRING_ITEM.to(TEST_STRING_ITEM.defaultValue + "abc"), in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
104 TEST_BOOLEAN_ITEM.to(!TEST_BOOLEAN_ITEM.defaultValue) in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
111 TEST_INT_ITEM.to(TEST_INT_ITEM.defaultValue), in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
112 TEST_STRING_ITEM.to(TEST_STRING_ITEM.defaultValue), in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
113 TEST_BOOLEAN_ITEM.to(TEST_BOOLEAN_ITEM.defaultValue) in addListenerAndRemoveListener_forMultipleItems_bothWorkProperly()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/util/
DFakeBugleGservices.java31 public long getLong(final String key, final long defaultValue) { in getLong() argument
32 return defaultValue; in getLong()
36 public int getInt(final String key, final int defaultValue) { in getInt() argument
37 return defaultValue; in getInt()
41 public boolean getBoolean(final String key, final boolean defaultValue) { in getBoolean() argument
42 return defaultValue; in getBoolean()
46 public String getString(final String key, final String defaultValue) { in getString() argument
47 return defaultValue; in getString()
51 public float getFloat(String key, float defaultValue) { in getFloat() argument
52 return defaultValue; in getFloat()
DFakeBuglePrefs.java28 public int getInt(final String key, final int defaultValue) { in getInt() argument
29 return defaultValue; in getInt()
33 public long getLong(final String key, final long defaultValue) { in getLong() argument
34 return defaultValue; in getLong()
38 public boolean getBoolean(final String key, final boolean defaultValue) { in getBoolean() argument
39 return defaultValue; in getBoolean()
43 public String getString(final String key, final String defaultValue) { in getString() argument
44 return defaultValue; in getString()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/
DDeviceConfigFlagsHelper.java34 public static boolean getDeviceConfigFlag(String name, boolean defaultValue) { in getDeviceConfigFlag() argument
35 return DeviceConfig.getBoolean(NAMESPACE_ADSERVICES, name, defaultValue); in getDeviceConfigFlag()
39 public static String getDeviceConfigFlag(String name, String defaultValue) { in getDeviceConfigFlag() argument
40 return DeviceConfig.getString(NAMESPACE_ADSERVICES, name, defaultValue); in getDeviceConfigFlag()
44 public static int getDeviceConfigFlag(String name, int defaultValue) { in getDeviceConfigFlag() argument
45 return DeviceConfig.getInt(NAMESPACE_ADSERVICES, name, defaultValue); in getDeviceConfigFlag()
49 public static long getDeviceConfigFlag(String name, long defaultValue) { in getDeviceConfigFlag() argument
50 return DeviceConfig.getLong(NAMESPACE_ADSERVICES, name, defaultValue); in getDeviceConfigFlag()
54 public static float getDeviceConfigFlag(String name, float defaultValue) { in getDeviceConfigFlag() argument
55 return DeviceConfig.getFloat(NAMESPACE_ADSERVICES, name, defaultValue); in getDeviceConfigFlag()
/packages/apps/Messaging/src/com/android/messaging/util/
DBugleGservicesImpl.java40 public long getLong(final String key, final long defaultValue) { in getLong() argument
42 return defaultValue; in getLong()
46 public int getInt(final String key, final int defaultValue) { in getInt() argument
48 return defaultValue; in getInt()
52 public boolean getBoolean(final String key, final boolean defaultValue) { in getBoolean() argument
54 return defaultValue; in getBoolean()
58 public String getString(final String key, final String defaultValue) { in getString() argument
60 return defaultValue; in getString()
64 public float getFloat(final String key, final float defaultValue) { in getFloat() argument
66 return defaultValue; in getFloat()
DBuglePrefsImpl.java43 public int getInt(final String key, final int defaultValue) { in getInt() argument
47 return prefs.getInt(key, defaultValue); in getInt()
51 public long getLong(final String key, final long defaultValue) { in getLong() argument
55 return prefs.getLong(key, defaultValue); in getLong()
59 public boolean getBoolean(final String key, final boolean defaultValue) { in getBoolean() argument
63 return prefs.getBoolean(key, defaultValue); in getBoolean()
67 public String getString(final String key, final String defaultValue) { in getString() argument
71 return prefs.getString(key, defaultValue); in getString()
DBugleGservices.java42 public abstract long getLong(final String key, final long defaultValue); in getLong() argument
50 public abstract int getInt(final String key, final int defaultValue); in getInt() argument
57 public abstract boolean getBoolean(final String key, final boolean defaultValue); in getBoolean() argument
64 public abstract String getString(final String key, final String defaultValue); in getString() argument
71 public abstract float getFloat(final String key, final float defaultValue); in getFloat() argument
/packages/modules/Connectivity/thread/service/java/com/android/server/thread/
DThreadPersistentSettings.java134 private <T> T getObject(String key, T defaultValue) { in getObject() argument
137 if (defaultValue == null) { in getObject()
139 } else if (defaultValue instanceof Boolean) { in getObject()
140 value = mSettings.getBoolean(key, (Boolean) defaultValue); in getObject()
141 } else if (defaultValue instanceof Integer) { in getObject()
142 value = mSettings.getInt(key, (Integer) defaultValue); in getObject()
143 } else if (defaultValue instanceof Long) { in getObject()
144 value = mSettings.getLong(key, (Long) defaultValue); in getObject()
145 } else if (defaultValue instanceof Double) { in getObject()
146 value = mSettings.getDouble(key, (Double) defaultValue); in getObject()
[all …]
/packages/modules/IPsec/src/java/com/android/internal/net/utils/
DIkeDeviceConfigUtils.java34 @NonNull String namespace, @NonNull String name, int defaultValue) { in getDeviceConfigPropertyInt() argument
37 return (value != null) ? Integer.parseInt(value) : defaultValue; in getDeviceConfigPropertyInt()
39 return defaultValue; in getDeviceConfigPropertyInt()
63 int defaultValue) { in getDeviceConfigPropertyInt() argument
64 int value = getDeviceConfigPropertyInt(namespace, name, defaultValue); in getDeviceConfigPropertyInt()
65 if (value < minimumValue || value > maximumValue) return defaultValue; in getDeviceConfigPropertyInt()
77 @NonNull String namespace, @NonNull String name, boolean defaultValue) { in getDeviceConfigPropertyBoolean() argument
79 return (value != null) ? Boolean.parseBoolean(value) : defaultValue; in getDeviceConfigPropertyBoolean()
92 @NonNull String namespace, @NonNull String name, @Nullable String defaultValue) { in getDeviceConfigProperty() argument
94 return value != null ? value : defaultValue; in getDeviceConfigProperty()
/packages/modules/StatsD/statsd/src/flags/
DFlagProvider.cpp36 string FlagProvider::getFlagString(const string& flagName, const string& defaultValue) const { in getFlagString()
37 return getFlagStringInternal(flagName, defaultValue, /* isBootFlag= */ false); in getFlagString()
40 bool FlagProvider::getFlagBool(const string& flagName, const string& defaultValue) const { in getFlagBool()
41 return getFlagStringInternal(flagName, defaultValue, /* isBootFlag= */ false) == FLAG_TRUE; in getFlagBool()
44 string FlagProvider::getBootFlagString(const string& flagName, const string& defaultValue) const { in getBootFlagString()
45 return getFlagStringInternal(flagName, defaultValue, /* isBootFlag= */ true); in getBootFlagString()
48 bool FlagProvider::getBootFlagBool(const string& flagName, const string& defaultValue) const { in getBootFlagBool()
49 return getFlagStringInternal(flagName, defaultValue, /* isBootFlag= */ true) == FLAG_TRUE; in getBootFlagBool()
87 const std::string& defaultValue, in getFlagStringInternal() argument
91 return defaultValue; in getFlagStringInternal()
[all …]
/packages/modules/Uwb/service/java/com/android/server/uwb/
DUwbSettingsStore.java210 private <T> T getObject(@NonNull String key, T defaultValue) { in getObject() argument
213 if (defaultValue instanceof Boolean) { in getObject()
214 value = mSettings.getBoolean(key, (Boolean) defaultValue); in getObject()
215 } else if (defaultValue instanceof Integer) { in getObject()
216 value = mSettings.getInt(key, (Integer) defaultValue); in getObject()
217 } else if (defaultValue instanceof Long) { in getObject()
218 value = mSettings.getLong(key, (Long) defaultValue); in getObject()
219 } else if (defaultValue instanceof Double) { in getObject()
220 value = mSettings.getDouble(key, (Double) defaultValue); in getObject()
221 } else if (defaultValue instanceof String) { in getObject()
[all …]
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/core/configuration/
DDeviceConfigProxyImpl.kt38 override fun <T> getFlag(namespace: String, key: String, defaultValue: T): T { in getFlag()
44 return when (defaultValue) { in getFlag()
47 (DeviceConfig.getBoolean(namespace, key, defaultValue) as? T) ?: defaultValue in getFlag()
50 (DeviceConfig.getString(namespace, key, defaultValue as String) as? T) in getFlag()
51 ?: defaultValue in getFlag()
57 " supported. The default value of $defaultValue will be returned." in getFlag()
59 return defaultValue in getFlag()
/packages/modules/Permission/framework-s/java/android/safetycenter/config/
DBuilderUtils.java42 @Nullable Object defaultValue) { in validateAttribute() argument
46 boolean nonDefaultValueProvided = !Objects.equals(attribute, defaultValue); in validateAttribute()
93 int defaultValue, in validateIntDef() argument
95 validateAttribute(value, name, required, prohibited, defaultValue); in validateIntDef()
97 return defaultValue; in validateIntDef()
115 int defaultValue) { in validateInteger() argument
116 validateAttribute(value, name, required, prohibited, defaultValue); in validateInteger()
118 return defaultValue; in validateInteger()
128 boolean defaultValue) { in validateBoolean() argument
129 validateAttribute(value, name, required, prohibited, defaultValue); in validateBoolean()
[all …]
/packages/apps/TV/common/src/com/android/tv/common/dev/
DDeveloperPreference.java35 public static DeveloperPreference<Boolean> create(String key, boolean defaultValue) { in create() argument
36 return new DeveloperBooleanPreference(key, defaultValue); in create()
50 public static DeveloperPreference<Integer> create(String key, int defaultValue) { in create() argument
51 return new DeveloperIntegerPreference(key, defaultValue); in create()
58 private DeveloperPreference(String key, T defaultValue) { in DeveloperPreference() argument
61 mDefaultValue = defaultValue; in DeveloperPreference()
101 private DeveloperBooleanPreference(String key, Boolean defaultValue) { in DeveloperBooleanPreference() argument
102 super(key, defaultValue); in DeveloperBooleanPreference()
118 private DeveloperIntegerPreference(String key, Integer defaultValue) { in DeveloperIntegerPreference() argument
119 super(key, defaultValue); in DeveloperIntegerPreference()
/packages/modules/Profiling/service/java/com/android/os/profiling/
DDeviceConfigHelper.java138 public static String getString(String name, String defaultValue) { in getString() argument
139 return DeviceConfig.getString(NAMESPACE, name, defaultValue); in getString()
146 public static boolean getBoolean(String name, boolean defaultValue) { in getBoolean() argument
147 return DeviceConfig.getBoolean(NAMESPACE, name, defaultValue); in getBoolean()
154 public static int getInt(String name, int defaultValue) { in getInt() argument
155 return DeviceConfig.getInt(NAMESPACE, name, defaultValue); in getInt()
162 public static long getLong(String name, long defaultValue) { in getLong() argument
163 return DeviceConfig.getLong(NAMESPACE, name, defaultValue); in getLong()
170 public static boolean getTestBoolean(String name, boolean defaultValue) { in getTestBoolean() argument
171 return DeviceConfig.getBoolean(NAMESPACE_TESTING, name, defaultValue); in getTestBoolean()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DDeviceConfigUtils.java105 @Nullable String defaultValue) { in getDeviceConfigProperty() argument
107 return value != null ? value : defaultValue; in getDeviceConfigProperty()
118 int defaultValue) { in getDeviceConfigPropertyInt() argument
121 return (value != null) ? Integer.parseInt(value) : defaultValue; in getDeviceConfigPropertyInt()
123 return defaultValue; in getDeviceConfigPropertyInt()
142 int minimumValue, int maximumValue, int defaultValue) { in getDeviceConfigPropertyInt() argument
143 int value = getDeviceConfigPropertyInt(namespace, name, defaultValue); in getDeviceConfigPropertyInt()
144 if (value < minimumValue || value > maximumValue) return defaultValue; in getDeviceConfigPropertyInt()
156 @NonNull String name, boolean defaultValue) { in getDeviceConfigPropertyBoolean() argument
158 return (value != null) ? Boolean.parseBoolean(value) : defaultValue; in getDeviceConfigPropertyBoolean()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DSystemPropertyService.java22 public String get(String key, String defaultValue) { in get() argument
23 return android.os.SystemProperties.get(key, defaultValue); in get()
27 public boolean getBoolean(String key, boolean defaultValue) { in getBoolean() argument
28 return android.os.SystemProperties.getBoolean(key, defaultValue); in getBoolean()
32 public String getString(String key, String defaultValue) { in getString() argument
33 return android.os.SystemProperties.get(key, defaultValue); in getString()
/packages/apps/Camera2/src/com/android/camera/settings/
DSettingsManager.java298 public void setDefaults(String key, String defaultValue, String[] possibleValues) {
300 mDefaultsStore.storeDefaults(key, defaultValue, possibleValues);
309 public void setDefaults(String key, int defaultValue, int[] possibleValues) {
311 String defaultValueString = Integer.toString(defaultValue);
325 public void setDefaults(String key, boolean defaultValue) {
327 String defaultValueString = defaultValue ? "1" : "0";
367 public String getString(String scope, String key, String defaultValue) {
371 return preferences.getString(key, defaultValue);
375 return defaultValue;
395 public int getInteger(String scope, String key, Integer defaultValue) {
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/
DFlagsTest.java731 boolean defaultValue = getConstantValue(name); in testFeatureFlagGuardedByGlobalKillSwitch()
740 .isEqualTo(defaultValue); in testFeatureFlagGuardedByGlobalKillSwitch()
743 expect.withMessage("%s", name).that(defaultValue).isFalse(); in testFeatureFlagGuardedByGlobalKillSwitch()
747 boolean defaultValue = getConstantValue(name); in testFeatureFlag()
753 .isEqualTo(defaultValue); in testFeatureFlag()
759 .isEqualTo(defaultValue); in testFeatureFlag()
762 .isEqualTo(defaultValue); in testFeatureFlag()
765 expect.withMessage("%s", name).that(defaultValue).isFalse(); in testFeatureFlag()
769 String getterName, long defaultValue, Flaginator<Flags, Long> flaginator) { in testFlag() argument
772 .isEqualTo(defaultValue); in testFlag()
[all …]
/packages/apps/Launcher3/tests/multivalentTests/shared/com/android/launcher3/testing/shared/
DResourceUtils.java45 public static int getDimenByName(String resName, Resources res, int defaultValue) { in getDimenByName() argument
51 frameSize = pxFromDp(defaultValue, res.getDisplayMetrics()); in getDimenByName()
56 public static boolean getBoolByName(String resName, Resources res, boolean defaultValue) { in getBoolByName() argument
62 val = defaultValue; in getBoolByName()
67 public static int getIntegerByName(String resName, Resources res, int defaultValue) { in getIntegerByName() argument
69 return resId != 0 ? res.getInteger(resId) : defaultValue; in getIntegerByName()
/packages/modules/ConfigInfrastructure/framework/java/android/provider/
DDeviceConfig.java1192 @Nullable String defaultValue) { in getString() argument
1194 return value != null ? value : defaultValue; in getString()
1209 boolean defaultValue) { in getBoolean() argument
1211 return value != null ? Boolean.parseBoolean(value) : defaultValue; in getBoolean()
1226 public static int getInt(@NonNull String namespace, @NonNull String name, int defaultValue) { in getInt() argument
1229 return defaultValue; in getInt()
1235 return defaultValue; in getInt()
1251 public static long getLong(@NonNull String namespace, @NonNull String name, long defaultValue) { in getLong() argument
1254 return defaultValue; in getLong()
1260 return defaultValue; in getLong()
[all …]

12345678910>>...12