Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove duplicate settings in build/settings.js and throw when there is one #2237

Merged
merged 1 commit into from

2 participants

@vingtetun
Collaborator

@gregorwagner What do you think of that?

@vingtetun vingtetun merged commit 54fca71 into from
@gregorwagner
Owner

argh we worked on this in parallel :)

@gregorwagner
Owner

But you have some typos in there:
keyboard.layouts.japanese
it should be layout right?

@vingtetun
Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 16 deletions.
  1. +20 −16 build/settings.js
View
36 build/settings.js
@@ -45,6 +45,7 @@ var settings = [
new Setting("sms.ring.received", true),
new Setting("sms.vibration.received", true),
new Setting("ums.enabled", false),
+ new Setting("ums.mode", ""),
new Setting("ril.data.roaming.enabled", false),
new Setting("ril.data.apn", ""),
new Setting("ril.data.user", ""),
@@ -54,26 +55,13 @@ var settings = [
new Setting("ril.data.mmsport", 0),
new Setting("devtools.debugger.remote-enabled", false),
new Setting("devtools.debugger.log", false),
- new Setting("devtools.remote.port", 6000),
- new Setting("devtools.remote.force-local", true),
- new Setting("debug.fps.enabled", false),
+ new Setting("devtools.debugger.remote-port", 6000),
+ new Setting("devtools.debugger.force-local", true),
new Setting("debug.debug.paint-flashing.enabled", false),
new Setting("homescreen.wallpaper", "default.png"),
- new Setting("ums.enabled", false),
- new Setting("debug.grid.enabled", false),
- new Setting("accessibility.invert", false),
- new Setting("lockscreen.enabled", true),
new Setting("lockscreen.wallpaper", "default.png"),
- new Setting("lockscreen.passcode-lock.enabled", true),
- new Setting("ril.radio.disabled", false),
- new Setting("ril.data.enabled", false),
- new Setting("ums.mode", ""),
- new Setting("keyboard.vibration", false),
- new Setting("keyboard.clicksound", ""),
new Setting("keyboard.layout.english", true),
new Setting("keyboard.layout.dvorak", false),
- new Setting("keyboard.layout.spanish", false),
- new Setting("keyboard.layout.portuguese", false),
new Setting("keyboard.layout.otherlatins", false),
new Setting("keyboard.layout.cyrillic", false),
new Setting("keyboard.layout.hebrew", false),
@@ -81,9 +69,25 @@ var settings = [
new Setting("keyboard.layout.pinyin", false),
new Setting("keyboard.layout.arabic", false),
new Setting("keyboard.layout.greek", false),
- new Setting("keyboard.layout.japanese", false)
+ new Setting("keyboard.layouts.japanese", false),
+ new Setting("keyboard.layouts.portuguese", false),
+ new Setting("keyboard.layouts.spanish", false),
+ new Setting("screen.timeout", 60)
];
+// Ensure there is no duplicate
+for (let i in settings) {
+ var settingName = settings[i].name;
+ for (let j in settings) {
+ if (i === j)
+ continue;
+
+ if (settingName === settings[j].name) {
+ throw new Error('There is a at least 2 settings called: ' + settingName);
+ }
+ }
+}
+
function Setting(aName, aValue) {
this.name = aName;
this.value = aValue;
Something went wrong with that request. Please try again.