Merge "Add mobile hotspot provisioning support"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7307dff..781387c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -788,7 +788,7 @@
<string name="unlock_set_unlock_launch_picker_enable_summary">Choose a method to lock the screen</string>
<!-- Info explaining the backup lock which is used for facelock -->
- <string name="unlock_backup_info_summary">When conditions for Face Unlock aren\'t ideal, how do you want to unlock?</string>
+ <string name="unlock_backup_info_summary">When Face Unlock can\'t see you, how do you want to unlock?</string>
<!-- Title for preference that disables unlock security [CHAR LIMIT=22] -->
<string name="unlock_set_unlock_off_title">None</string>
@@ -3533,6 +3533,11 @@
<!-- Label for data usage occuring while application in background. [CHAR LIMIT=48] -->
<string name="data_usage_label_background">Background</string>
+ <!-- Disclaimer that contrasts device versus carrier reporting. [CHAR LIMIT=80] -->
+ <string name="data_usage_disclaimer" product="tablet">Measured by your tablet. Your carrier\'s data usage accounting may differ.</string>
+ <!-- Disclaimer that contrasts device versus carrier reporting. [CHAR LIMIT=80] -->
+ <string name="data_usage_disclaimer" product="default">Measured by your phone. Your carrier\'s data usage accounting may differ.</string>
+
<!-- Body of dialog shown to request confirmation that mobile data will be disabled. [CHAR LIMIT=NONE] -->
<string name="data_usage_disable_mobile">Disable mobile data?</string>
<!-- Checkbox label that will disable mobile network data connection when user-defined limit is reached. [CHAR LIMIT=32] -->
@@ -3597,7 +3602,9 @@
<!-- Title of dialog shown before user limits data usage. [CHAR LIMIT=48] -->
<string name="data_usage_limit_dialog_title">Limiting data usage</string>
<!-- Body of dialog shown before user limits mobile data usage. [CHAR LIMIT=NONE] -->
- <string name="data_usage_limit_dialog">Your <xliff:g id="networks" example="mobile">%1$s</xliff:g> data connection will be disabled when the specified limit is reached.\n\nTo avoid overage charges, consider using a reduced limit, as device and accounting methods may vary.</string>
+ <string name="data_usage_limit_dialog" product="tablet">Your <xliff:g id="networks" example="mobile">%1$s</xliff:g> data connection will be disabled when the specified limit is reached.\n\nSince data usage is measured by your tablet, and your carrier may account for usage differently, consider using a conservative limit.</string>
+ <!-- Body of dialog shown before user limits mobile data usage. [CHAR LIMIT=NONE] -->
+ <string name="data_usage_limit_dialog" product="default">Your <xliff:g id="networks" example="mobile">%1$s</xliff:g> data connection will be disabled when the specified limit is reached.\n\nSince data usage is measured by your phone, and your carrier may account for usage differently, consider using a conservative limit.</string>
<!-- Title of dialog shown before user restricts background data usage. [CHAR LIMIT=48] -->
<string name="data_usage_restrict_background_title">Restrict background data?</string>
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index 67a5bdb..c9703dc 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -35,6 +35,7 @@
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemProperties;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
@@ -45,12 +46,15 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.text.TextUtils.SimpleStringSplitter;
+import android.util.Log;
import android.view.Gravity;
+import android.view.IWindowManager;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
+import android.view.Surface;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
@@ -72,6 +76,7 @@
*/
public class AccessibilitySettings extends SettingsPreferenceFragment implements DialogCreatable,
Preference.OnPreferenceChangeListener {
+ private static final String TAG = "AccessibilitySettings";
private static final String DEFAULT_SCREENREADER_MARKET_LINK =
"market://search?q=pname:com.google.android.marvin.talkback";
@@ -230,9 +235,17 @@
}
private void handleToggleAutoRotateScreenPreferenceClick() {
- Settings.System.putInt(getContentResolver(),
- Settings.System.ACCELEROMETER_ROTATION,
- (mToggleAutoRotateScreenPreference.isChecked() ? 1 : 0));
+ try {
+ IWindowManager wm = IWindowManager.Stub.asInterface(
+ ServiceManager.getService(Context.WINDOW_SERVICE));
+ if (mToggleAutoRotateScreenPreference.isChecked()) {
+ wm.thawRotation();
+ } else {
+ wm.freezeRotation(Surface.ROTATION_0);
+ }
+ } catch (RemoteException exc) {
+ Log.w(TAG, "Unable to save auto-rotate setting");
+ }
}
private void initializeAllPreferences() {
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 8b7545c..5887140 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -28,6 +28,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
@@ -35,6 +36,8 @@
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
+import android.view.IWindowManager;
+import android.view.Surface;
import java.util.ArrayList;
@@ -230,9 +233,17 @@
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (preference == mAccelerometer) {
- Settings.System.putInt(getContentResolver(),
- Settings.System.ACCELEROMETER_ROTATION,
- mAccelerometer.isChecked() ? 1 : 0);
+ try {
+ IWindowManager wm = IWindowManager.Stub.asInterface(
+ ServiceManager.getService(Context.WINDOW_SERVICE));
+ if (mAccelerometer.isChecked()) {
+ wm.thawRotation();
+ } else {
+ wm.freezeRotation(Surface.ROTATION_0);
+ }
+ } catch (RemoteException exc) {
+ Log.w(TAG, "Unable to save auto-rotate setting");
+ }
} else if (preference == mNotificationPulse) {
boolean value = mNotificationPulse.isChecked();
Settings.System.putInt(getContentResolver(), Settings.System.NOTIFICATION_LIGHT_PULSE,