Merge "Revert "Show warning dialog in a multiuser system when adding a new account."" into jb-mr1-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1373b30..853c273 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3091,20 +3091,9 @@
     <!-- Title for the accessibility preference category of system related preferences. [CHAR LIMIT=25] -->
     <string name="accessibility_system_title">System</string>
     <!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
-    <string name="accessibility_screen_magnification_title">Screen magnification</string>
+    <string name="accessibility_screen_magnification_title">Magnification gestures</string>
     <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=none] -->
-    <string name="accessibility_screen_magnification_summary">
-        When screen magnification is on, you can\:\n\n
-
-        Zoom: Triple-tap &amp; hold.\n
-        Zoom &amp; pan: Triple-tap &amp; hold, then drag your finger.\n
-        Toggle zoom in or out: Triple tap &amp; release.\n\n
-
-        While you\'re zoomed in, you can:\n
-
-        Pan: Drag two or more fingers across the screen.\n
-        Adjust zoom level: Pinch or expand using two or more fingers.
-    </string>
+    <string name="accessibility_screen_magnification_summary">When this feature is turned on, you can zoom in and out by triple-tapping the screen.\n\nWhile zoomed in, you can:\n<ul><li>Pan: Drag two or more fingers across the screen.</li>\n<li>Adjust zoom level: Pinch two or more fingers together or spread them apart.</li></ul>\n\nYou can also temporarily magnify what\'s under your finger by triple-tapping and holding. In this magnified state, you can drag your finger to explore different parts of the screen. Lift your finger to return to your previous state.\n\nNote: Triple-tap for magnification works everywhere except the keyboard and navigation bar.</string>
     <!-- Title for the preference to enable the global geture that turns on accessibility. [CHAR LIMIT=35] -->
     <string name="accessibility_global_gesture_preference_title">Accessibility shortcut</string>
     <!-- Summary for the preference to enable the global geture that turns on accessibility (on state). [CHAR LIMIT=60] -->
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index 266621f..d64a092 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -282,7 +282,7 @@
         Bundle extras = mDisplayMagnificationPreferenceScreen.getExtras();
         extras.putString(EXTRA_TITLE, getString(
                 R.string.accessibility_screen_magnification_title));
-        extras.putString(EXTRA_SUMMARY, getString(
+        extras.putCharSequence(EXTRA_SUMMARY, getActivity().getResources().getText(
                 R.string.accessibility_screen_magnification_summary));
         extras.putBoolean(EXTRA_CHECKED, Settings.Secure.getInt(getContentResolver(),
                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1);
@@ -1005,7 +1005,7 @@
                 getActivity().getActionBar().setTitle(title);
             }
             // Summary.
-            String summary = arguments.getString(EXTRA_SUMMARY);
+            CharSequence summary = arguments.getCharSequence(EXTRA_SUMMARY);
             mSummaryPreference.setSummary(summary);
         }
     }
diff --git a/src/com/android/settings/AppWidgetPickActivity.java b/src/com/android/settings/AppWidgetPickActivity.java
index 97f816a..953d10c 100644
--- a/src/com/android/settings/AppWidgetPickActivity.java
+++ b/src/com/android/settings/AppWidgetPickActivity.java
@@ -269,7 +269,7 @@
         // If not specified, we don't filter on any specific
         int featuresFilter = AppWidgetProviderInfo.WIDGET_FEATURES_NONE;
         if (intent.getExtras().containsKey(AppWidgetManager.EXTRA_FEATURES_FILTER)) {
-            featuresFilter = intent.getExtras().getInt(AppWidgetManager.EXTRA_CATEGORY_FILTER);
+            featuresFilter = intent.getExtras().getInt(AppWidgetManager.EXTRA_FEATURES_FILTER);
         }
 
         putInstalledAppWidgets(items, categoryFilter, featuresFilter);
diff --git a/src/com/android/settings/LocalePicker.java b/src/com/android/settings/LocalePicker.java
index 1272ddc..0afa4d5 100644
--- a/src/com/android/settings/LocalePicker.java
+++ b/src/com/android/settings/LocalePicker.java
@@ -17,9 +17,7 @@
 package com.android.settings;
 
 import android.app.Dialog;
-import android.content.Context;
 import android.os.Bundle;
-import android.os.UserManager;
 import android.util.Log;
 
 import com.android.settings.SettingsPreferenceFragment.SettingsDialogFragment;
@@ -78,11 +76,12 @@
         mDialogFragment.show(getActivity().getFragmentManager(), Integer.toString(dialogId));
     }
 
-    public Dialog onCreateDialog(int dialogId) {
+    public Dialog onCreateDialog(final int dialogId) {
         return Utils.buildGlobalChangeWarningDialog(getActivity(),
                 R.string.global_locale_change_title,
                 new Runnable() {
                     public void run() {
+                        removeDialog(dialogId);
                         getActivity().onBackPressed();
                         LocalePicker.updateLocale(mTargetLocale);
                     }
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 7690b7e..1cdb4dc 100644
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -464,7 +464,7 @@
             showIt = false;
         } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
             showIt = false;
-        } else if (mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
+        } else if (mPackageInfo == null || mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
             showIt = false;
         } else if (UserHandle.myUserId() != 0) {
             showIt = false;