Support PersistableBundle type config values in getConfigByComponentForSubId
PersistableBundle support is required to enable better handling of more complex carrier configurations. Bug: 223443016 Test: make, atest CarrierConfigManagerTest Merged-In: Idb564cf44d7d321b95cccb18798992e718f30da4 Change-Id: I94f581acc4cc7a7de39958e598e845831f81aab9
This commit is contained in:
@@ -6836,42 +6836,26 @@ public class CarrierConfigManager {
|
||||
private void addConfig(String key, Object value, PersistableBundle configs) {
|
||||
if (value instanceof String) {
|
||||
configs.putString(key, (String) value);
|
||||
}
|
||||
|
||||
if (value instanceof String[]) {
|
||||
} else if (value instanceof String[]) {
|
||||
configs.putStringArray(key, (String[]) value);
|
||||
}
|
||||
|
||||
if (value instanceof Integer) {
|
||||
} else if (value instanceof Integer) {
|
||||
configs.putInt(key, (Integer) value);
|
||||
}
|
||||
|
||||
if (value instanceof Long) {
|
||||
} else if (value instanceof Long) {
|
||||
configs.putLong(key, (Long) value);
|
||||
}
|
||||
|
||||
if (value instanceof Double) {
|
||||
} else if (value instanceof Double) {
|
||||
configs.putDouble(key, (Double) value);
|
||||
}
|
||||
|
||||
if (value instanceof Boolean) {
|
||||
} else if (value instanceof Boolean) {
|
||||
configs.putBoolean(key, (Boolean) value);
|
||||
}
|
||||
|
||||
if (value instanceof int[]) {
|
||||
} else if (value instanceof int[]) {
|
||||
configs.putIntArray(key, (int[]) value);
|
||||
}
|
||||
|
||||
if (value instanceof double[]) {
|
||||
} else if (value instanceof double[]) {
|
||||
configs.putDoubleArray(key, (double[]) value);
|
||||
}
|
||||
|
||||
if (value instanceof boolean[]) {
|
||||
} else if (value instanceof boolean[]) {
|
||||
configs.putBooleanArray(key, (boolean[]) value);
|
||||
}
|
||||
|
||||
if (value instanceof long[]) {
|
||||
} else if (value instanceof long[]) {
|
||||
configs.putLongArray(key, (long[]) value);
|
||||
} else if (value instanceof PersistableBundle) {
|
||||
configs.putPersistableBundle(key, (PersistableBundle) value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user