Bug 875637 - Save default volume name pref with the correct type. r=gwagner

This commit is contained in:
Dave Hylands 2013-05-24 17:40:03 -07:00
parent 702a315b61
commit 3a08f2fc18

View File

@ -262,8 +262,13 @@ SettingsListener.observe('debug.log-animations.enabled', false, function(value)
});
// =================== Device Storage ====================
SettingsListener.observe('device.storage.writable.name', false, function(value) {
Services.prefs.setBoolPref('device.storage.writable.name', value);
SettingsListener.observe('device.storage.writable.name', 'sdcard', function(value) {
if (Services.prefs.getPrefType('device.storage.writable.name') != Ci.nsIPrefBranch.PREF_STRING) {
// We clear the pref because it used to be erroneously written as a bool
// and we need to clear it before we can change it to have the correct type.
Services.prefs.clearUserPref('device.storage.writable.name');
}
Services.prefs.setCharPref('device.storage.writable.name', value);
});
// =================== Privacy ====================