Fix boot loop when deriving device name.
Bug: 17490408
Change-Id: If1cc25a341eed4e41a7bf170bab077203fa19d15
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 625dc96..934ed38 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -193,11 +193,11 @@
<!-- Default for Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, 1==on -->
<integer name="def_heads_up_enabled">1</integer>
- <!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
- <string name="def_device_name">%1$s</string>
-
<!-- Default for Settings.Global.DEVICE_NAME $1=MANUFACTURER $2=MODEL-->
- <string name="def_device_name_old">%1$s %2$s</string>
+ <string name="def_device_name">%1$s %2$s</string>
+
+ <!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
+ <string name="def_device_name_simple">%1$s</string>
<!-- Default for Settings.Secure.WAKE_GESTURE_ENABLED -->
<bool name="def_wake_gesture_enabled">true</bool>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index bdb167f..873257c 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2609,11 +2609,11 @@
}
private String getOldDefaultDeviceName() {
- return mContext.getResources().getString(R.string.def_device_name_old,
+ return mContext.getResources().getString(R.string.def_device_name,
Build.MANUFACTURER, Build.MODEL);
}
private String getDefaultDeviceName() {
- return mContext.getResources().getString(R.string.def_device_name, Build.MODEL);
+ return mContext.getResources().getString(R.string.def_device_name_simple, Build.MODEL);
}
}