Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bfad89b authored by Allen Xu's avatar Allen Xu Committed by Automerger Merge Worker
Browse files

Merge "Support PersistableBundle type config values in...

Merge "Support PersistableBundle type config values in getConfigByComponentForSubId" into tm-dev am: e8af69f3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17159291

Change-Id: I445be8d27e0e30bfc96dd2dbcb85c00ebc5ce4e3
parents b1f0006c e8af69f3
Loading
Loading
Loading
Loading
+11 −27
Original line number Diff line number Diff line
@@ -9499,42 +9499,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);
        }
    }
}