diff options
-rw-r--r-- | src/org/protonaosp/deviceconfig/BootReceiver.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/org/protonaosp/deviceconfig/BootReceiver.java b/src/org/protonaosp/deviceconfig/BootReceiver.java index a2aca63..286b678 100644 --- a/src/org/protonaosp/deviceconfig/BootReceiver.java +++ b/src/org/protonaosp/deviceconfig/BootReceiver.java @@ -42,13 +42,17 @@ public class BootReceiver extends BroadcastReceiver { // Set current properties String[] rawProperties = context.getResources().getStringArray(configArray); for (String property : rawProperties) { + // Format: namespace/key=value String[] kv = property.split("="); String fullKey = kv[0]; - String[] nk = fullKey.split("/"); - - String namespace = nk[0]; - String key = nk[1]; - String value = kv[1]; + String[] nsKey = fullKey.split("/"); + + String namespace = nsKey[0]; + String key = nsKey[1]; + String value = ""; + if (kv.length > 1) { + value = kv[1]; + } DeviceConfig.setProperty(namespace, key, value, true); } |