summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 10:36:07 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 10:36:07 +0100
commit813d4309fb2144b96ffcd644c71a30aadc50fd1e (patch)
tree532609cc34968f682701176114c484f5278b8349 /packages/SettingsProvider
parent8bc386657e4bd582ea0897410523e27230a8e157 (diff)
parentdf301d4a64fe0dfc812b39e3f7e2c2ca4b93c305 (diff)
downloadframeworks_base-813d4309fb2144b96ffcd644c71a30aadc50fd1e.zip
frameworks_base-813d4309fb2144b96ffcd644c71a30aadc50fd1e.tar.gz
frameworks_base-813d4309fb2144b96ffcd644c71a30aadc50fd1e.tar.bz2
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_base into replicant-6.0
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r--packages/SettingsProvider/res/values-be/strings.xml (renamed from packages/SettingsProvider/res/values-pt-rBR/strings.xml)13
-rw-r--r--packages/SettingsProvider/res/values-gu-rIN/strings.xml23
-rw-r--r--packages/SettingsProvider/res/values-pt-rPT/strings.xml2
-rw-r--r--packages/SettingsProvider/res/values-sq-rAL/strings.xml23
-rw-r--r--packages/SettingsProvider/res/values-vi/strings.xml2
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml2
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java3
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java19
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java12
9 files changed, 43 insertions, 56 deletions
diff --git a/packages/SettingsProvider/res/values-pt-rBR/strings.xml b/packages/SettingsProvider/res/values-be/strings.xml
index ade1746..2c3d4d7 100644
--- a/packages/SettingsProvider/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsProvider/res/values-be/strings.xml
@@ -1,5 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
/**
* Copyright (c) 2007, The Android Open Source Project
*
@@ -15,9 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"Armazenamento de configurações"</string>
+-->
+<resources>
+ <string name="app_label">Захоўванне налад</string>
</resources>
diff --git a/packages/SettingsProvider/res/values-gu-rIN/strings.xml b/packages/SettingsProvider/res/values-gu-rIN/strings.xml
deleted file mode 100644
index 7241974..0000000
--- a/packages/SettingsProvider/res/values-gu-rIN/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2007, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"સેટિંગ્સ સંગ્રહ"</string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-pt-rPT/strings.xml b/packages/SettingsProvider/res/values-pt-rPT/strings.xml
index c7dc9e6..6bd62e3 100644
--- a/packages/SettingsProvider/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsProvider/res/values-pt-rPT/strings.xml
@@ -19,5 +19,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"Armazenamento de definições"</string>
+ <string name="app_label" msgid="4567566098528588863">"Armazenamento de Definições"</string>
</resources>
diff --git a/packages/SettingsProvider/res/values-sq-rAL/strings.xml b/packages/SettingsProvider/res/values-sq-rAL/strings.xml
deleted file mode 100644
index a8e66d5..0000000
--- a/packages/SettingsProvider/res/values-sq-rAL/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2007, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"Hapësira ruajtëse e \"Cilësimeve\""</string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-vi/strings.xml b/packages/SettingsProvider/res/values-vi/strings.xml
index 015fbfd..504479d 100644
--- a/packages/SettingsProvider/res/values-vi/strings.xml
+++ b/packages/SettingsProvider/res/values-vi/strings.xml
@@ -19,5 +19,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"Lưu trữ bộ nhớ"</string>
+ <string name="app_label" msgid="4567566098528588863">"Lưu trữ cài đặt"</string>
</resources>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 210a096..d9402fc 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -25,6 +25,7 @@
<!-- Comma-separated list of bluetooth, wifi, and cell. -->
<string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string>
<string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string>
+ <string name="def_bluetooth_disabled_profiles" translatable="false">0</string>
<bool name="def_auto_time">true</bool>
<bool name="def_auto_time_zone">true</bool>
<bool name="def_accelerometer_rotation">true</bool>
@@ -42,6 +43,7 @@
<fraction name="def_window_transition_scale">100%</fraction>
<fraction name="def_animator_duration_scale">100%</fraction>
<bool name="def_haptic_feedback">true</bool>
+ <bool name="def_dozeEnabledByDefault">false</bool>
<bool name="def_bluetooth_on">false</bool>
<bool name="def_wifi_display_on">false</bool>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 203c592..858baa5 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -724,6 +724,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
Secure.LOCK_PATTERN_ENABLED,
Secure.LOCK_PATTERN_VISIBLE,
Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED,
+ CMSettings.Secure.LOCK_PASS_TO_SECURITY_VIEW,
Secure.LOCK_PATTERN_SIZE,
Secure.LOCK_DOTS_VISIBLE,
Secure.LOCK_SHOW_ERROR_PATH,
@@ -2706,6 +2707,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
com.android.internal.R.string.config_dreamsDefaultComponent);
loadStringSetting(stmt, Settings.Secure.SCREENSAVER_DEFAULT_COMPONENT,
com.android.internal.R.string.config_dreamsDefaultComponent);
+ loadBooleanSetting(stmt, Settings.Secure.DOZE_ENABLED,
+ R.bool.def_dozeEnabledByDefault);
loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
R.bool.def_accessibility_display_magnification_enabled);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
index b4543b3..ffe7623 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -161,6 +161,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
String key_mgmt = "";
boolean certUsed = false;
boolean hasWepKey = false;
+ boolean isEap = false;
final ArrayList<String> rawLines = new ArrayList<String>();
public static Network readFromStream(BufferedReader in) {
@@ -191,6 +192,9 @@ public class SettingsBackupAgent extends BackupAgentHelper {
ssid = line;
} else if (line.startsWith("key_mgmt=")) {
key_mgmt = line;
+ if (line.contains("EAP")) {
+ isEap = true;
+ }
} else if (line.startsWith("client_cert=")) {
certUsed = true;
} else if (line.startsWith("ca_cert=")) {
@@ -199,6 +203,8 @@ public class SettingsBackupAgent extends BackupAgentHelper {
certUsed = true;
} else if (line.startsWith("wep_")) {
hasWepKey = true;
+ } else if (line.startsWith("eap=")) {
+ isEap = true;
}
}
@@ -327,6 +333,13 @@ public class SettingsBackupAgent extends BackupAgentHelper {
continue;
}
}
+ // Don't propagate EAP network definitions
+ if (net.isEap) {
+ if (DEBUG_BACKUP) {
+ Log.v(TAG, "Skipping EAP network " + net.ssid + " / " + net.key_mgmt);
+ }
+ continue;
+ }
if (! mKnownNetworks.contains(net)) {
if (DEBUG_BACKUP) {
Log.v(TAG, "Adding " + net.ssid + " / " + net.key_mgmt);
@@ -355,6 +368,12 @@ public class SettingsBackupAgent extends BackupAgentHelper {
continue;
}
+ if (net.isEap) {
+ // Similarly, omit EAP network definitions to avoid propagating
+ // controlled enterprise network definitions.
+ continue;
+ }
+
net.write(w);
}
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index f55cead..5c871ca 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -1986,7 +1986,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 122;
+ private static final int SETTINGS_VERSION = 123;
/**
* This is the 12.1 database version (DO NOT INCREMENT)
*/
@@ -2170,6 +2170,16 @@ public class SettingsProvider extends ContentProvider {
}
currentVersion = 122;
}
+
+ if (currentVersion == 122) {
+ final SettingsState globalSettings = getGlobalSettingsLocked();
+ String defaultDisabledProfiles = (getContext().getResources().getString(
+ R.string.def_bluetooth_disabled_profiles));
+ globalSettings.insertSettingLocked(Settings.Global.BLUETOOTH_DISABLED_PROFILES,
+ defaultDisabledProfiles, SettingsState.SYSTEM_PACKAGE_NAME);
+ currentVersion = 123;
+ }
+
// vXXX: Add new settings above this point.
// Return the current version.