Merge "Hide notifications until the device is provisioned." into jb-dev
diff --git a/api/16.txt b/api/16.txt
index b8aeb39..ec35e21 100644
--- a/api/16.txt
+++ b/api/16.txt
@@ -140,36 +140,16 @@
   public static final class Manifest.permission_group {
     ctor public Manifest.permission_group();
     field public static final java.lang.String ACCOUNTS = "android.permission-group.ACCOUNTS";
-    field public static final java.lang.String AFFECTS_BATTERY = "android.permission-group.AFFECTS_BATTERY";
-    field public static final java.lang.String APP_INFO = "android.permission-group.APP_INFO";
-    field public static final java.lang.String AUDIO_SETTINGS = "android.permission-group.AUDIO_SETTINGS";
-    field public static final java.lang.String BLUETOOTH_NETWORK = "android.permission-group.BLUETOOTH_NETWORK";
-    field public static final java.lang.String BOOKMARKS = "android.permission-group.BOOKMARKS";
-    field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
-    field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
     field public static final java.lang.String COST_MONEY = "android.permission-group.COST_MONEY";
     field public static final java.lang.String DEVELOPMENT_TOOLS = "android.permission-group.DEVELOPMENT_TOOLS";
-    field public static final java.lang.String DEVICE_ALARMS = "android.permission-group.DEVICE_ALARMS";
-    field public static final java.lang.String DISPLAY = "android.permission-group.DISPLAY";
     field public static final java.lang.String HARDWARE_CONTROLS = "android.permission-group.HARDWARE_CONTROLS";
     field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
     field public static final java.lang.String MESSAGES = "android.permission-group.MESSAGES";
-    field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
     field public static final java.lang.String NETWORK = "android.permission-group.NETWORK";
     field public static final java.lang.String PERSONAL_INFO = "android.permission-group.PERSONAL_INFO";
     field public static final java.lang.String PHONE_CALLS = "android.permission-group.PHONE_CALLS";
-    field public static final java.lang.String SCREENLOCK = "android.permission-group.SCREENLOCK";
-    field public static final java.lang.String SHORTRANGE_NETWORK = "android.permission-group.SHORTRANGE_NETWORK";
-    field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
-    field public static final java.lang.String STATUS_BAR = "android.permission-group.STATUS_BAR";
     field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
-    field public static final java.lang.String SYNC_SETTINGS = "android.permission-group.SYNC_SETTINGS";
-    field public static final java.lang.String SYSTEM_CLOCK = "android.permission-group.SYSTEM_CLOCK";
     field public static final java.lang.String SYSTEM_TOOLS = "android.permission-group.SYSTEM_TOOLS";
-    field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
-    field public static final java.lang.String VOICEMAIL = "android.permission-group.VOICEMAIL";
-    field public static final java.lang.String WALLPAPER = "android.permission-group.WALLPAPER";
-    field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission-group.WRITE_USER_DICTIONARY";
   }
 
   public final class R {
@@ -754,7 +734,6 @@
     field public static final int pathPrefix = 16842795; // 0x101002b
     field public static final int permission = 16842758; // 0x1010006
     field public static final int permissionGroup = 16842762; // 0x101000a
-    field public static final int permissionGroupFlags = 16843688; // 0x10103a8
     field public static final int persistent = 16842765; // 0x101000d
     field public static final int persistentDrawingCache = 16842990; // 0x10100ee
     field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -6596,11 +6575,8 @@
     method public int describeContents();
     method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
     field public static final android.os.Parcelable.Creator CREATOR;
-    field public static final int FLAG_PERSONAL_INFO = 1; // 0x1
     field public int descriptionRes;
-    field public int flags;
     field public java.lang.CharSequence nonLocalizedDescription;
-    field public int priority;
   }
 
   public class PermissionInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
diff --git a/api/current.txt b/api/current.txt
index b8aeb39..ec35e21 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -140,36 +140,16 @@
   public static final class Manifest.permission_group {
     ctor public Manifest.permission_group();
     field public static final java.lang.String ACCOUNTS = "android.permission-group.ACCOUNTS";
-    field public static final java.lang.String AFFECTS_BATTERY = "android.permission-group.AFFECTS_BATTERY";
-    field public static final java.lang.String APP_INFO = "android.permission-group.APP_INFO";
-    field public static final java.lang.String AUDIO_SETTINGS = "android.permission-group.AUDIO_SETTINGS";
-    field public static final java.lang.String BLUETOOTH_NETWORK = "android.permission-group.BLUETOOTH_NETWORK";
-    field public static final java.lang.String BOOKMARKS = "android.permission-group.BOOKMARKS";
-    field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
-    field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
     field public static final java.lang.String COST_MONEY = "android.permission-group.COST_MONEY";
     field public static final java.lang.String DEVELOPMENT_TOOLS = "android.permission-group.DEVELOPMENT_TOOLS";
-    field public static final java.lang.String DEVICE_ALARMS = "android.permission-group.DEVICE_ALARMS";
-    field public static final java.lang.String DISPLAY = "android.permission-group.DISPLAY";
     field public static final java.lang.String HARDWARE_CONTROLS = "android.permission-group.HARDWARE_CONTROLS";
     field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
     field public static final java.lang.String MESSAGES = "android.permission-group.MESSAGES";
-    field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
     field public static final java.lang.String NETWORK = "android.permission-group.NETWORK";
     field public static final java.lang.String PERSONAL_INFO = "android.permission-group.PERSONAL_INFO";
     field public static final java.lang.String PHONE_CALLS = "android.permission-group.PHONE_CALLS";
-    field public static final java.lang.String SCREENLOCK = "android.permission-group.SCREENLOCK";
-    field public static final java.lang.String SHORTRANGE_NETWORK = "android.permission-group.SHORTRANGE_NETWORK";
-    field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
-    field public static final java.lang.String STATUS_BAR = "android.permission-group.STATUS_BAR";
     field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
-    field public static final java.lang.String SYNC_SETTINGS = "android.permission-group.SYNC_SETTINGS";
-    field public static final java.lang.String SYSTEM_CLOCK = "android.permission-group.SYSTEM_CLOCK";
     field public static final java.lang.String SYSTEM_TOOLS = "android.permission-group.SYSTEM_TOOLS";
-    field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
-    field public static final java.lang.String VOICEMAIL = "android.permission-group.VOICEMAIL";
-    field public static final java.lang.String WALLPAPER = "android.permission-group.WALLPAPER";
-    field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission-group.WRITE_USER_DICTIONARY";
   }
 
   public final class R {
@@ -754,7 +734,6 @@
     field public static final int pathPrefix = 16842795; // 0x101002b
     field public static final int permission = 16842758; // 0x1010006
     field public static final int permissionGroup = 16842762; // 0x101000a
-    field public static final int permissionGroupFlags = 16843688; // 0x10103a8
     field public static final int persistent = 16842765; // 0x101000d
     field public static final int persistentDrawingCache = 16842990; // 0x10100ee
     field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -6596,11 +6575,8 @@
     method public int describeContents();
     method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
     field public static final android.os.Parcelable.Creator CREATOR;
-    field public static final int FLAG_PERSONAL_INFO = 1; // 0x1
     field public int descriptionRes;
-    field public int flags;
     field public java.lang.CharSequence nonLocalizedDescription;
-    field public int priority;
   }
 
   public class PermissionInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
diff --git a/core/java/android/animation/LayoutTransition.java b/core/java/android/animation/LayoutTransition.java
index bdcb2af..4d3a519 100644
--- a/core/java/android/animation/LayoutTransition.java
+++ b/core/java/android/animation/LayoutTransition.java
@@ -831,6 +831,14 @@
             return;
         }
 
+        // Don't animate items up from size(0,0); this is likely because the objects
+        // were offscreen/invisible or otherwise measured to be infinitely small. We don't
+        // want to see them animate into their real size; just ignore animation requests
+        // on these views
+        if (child.getWidth() == 0 && child.getHeight() == 0) {
+            return;
+        }
+
         // Make a copy of the appropriate animation
         final Animator anim = baseAnimator.clone();
 
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index e180df4..679a8ac 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1464,8 +1464,7 @@
         perm.info.descriptionRes = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_description,
                 0);
-        perm.info.flags = sa.getInt(
-                com.android.internal.R.styleable.AndroidManifestPermissionGroup_permissionGroupFlags, 0);
+        perm.info.flags = 0;
         perm.info.priority = sa.getInt(
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_priority, 0);
         if (perm.info.priority > 0 && (flags&PARSE_IS_SYSTEM) == 0) {
diff --git a/core/java/android/content/pm/PermissionGroupInfo.java b/core/java/android/content/pm/PermissionGroupInfo.java
index 452bf0d..96d30d4 100644
--- a/core/java/android/content/pm/PermissionGroupInfo.java
+++ b/core/java/android/content/pm/PermissionGroupInfo.java
@@ -44,17 +44,20 @@
     /**
      * Flag for {@link #flags}, corresponding to <code>personalInfo</code>
      * value of {@link android.R.attr#permissionGroupFlags}.
+     * @hide
      */
     public static final int FLAG_PERSONAL_INFO = 1<<0;
 
     /**
      * Additional flags about this group as given by
      * {@link android.R.attr#permissionGroupFlags}.
+     * @hide
      */
     public int flags;
 
     /**
      * Prioritization of this group, for visually sorting with other groups.
+     * @hide
      */
     public int priority;
 
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index 6dc31dd..bd86a8d 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -62,6 +62,8 @@
 
     private final int mMyProcessId;
 
+    private final ArrayList<View> mTempArrayList = new ArrayList<View>();
+
     public AccessibilityInteractionController(ViewRootImpl viewRootImpl) {
         Looper looper =  viewRootImpl.mHandler.getLooper();
         mMyLooperThreadId = looper.getThread().getId();
@@ -313,7 +315,7 @@
                     infos = provider.findAccessibilityNodeInfosByText(text,
                             virtualDescendantId);
                 } else if (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED) {
-                    ArrayList<View> foundViews = mViewRootImpl.mAttachInfo.mTempArrayList;
+                    ArrayList<View> foundViews = mTempArrayList;
                     foundViews.clear();
                     root.findViewsWithText(foundViews, text, View.FIND_VIEWS_WITH_TEXT
                             | View.FIND_VIEWS_WITH_CONTENT_DESCRIPTION
diff --git a/core/java/android/view/DisplayList.java b/core/java/android/view/DisplayList.java
index da666b5..a42e156 100644
--- a/core/java/android/view/DisplayList.java
+++ b/core/java/android/view/DisplayList.java
@@ -62,6 +62,13 @@
     public static final int STATUS_INVOKE = 0x2;
 
     /**
+     * Indicates that the display list performed GL drawing operations.
+     *
+     * @see HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)
+     */
+    public static final int STATUS_DREW = 0x4;
+
+    /**
      * Starts recording the display list. All operations performed on the
      * returned canvas are recorded and stored in this display list.
      * 
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index cba488e..7e86ea3 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -1104,6 +1104,7 @@
 
                     onPreDraw(dirty);
 
+                    int status = DisplayList.STATUS_DONE;
                     int saveCount = canvas.save();
                     callbacks.onHardwarePreDraw(canvas);
 
@@ -1137,7 +1138,7 @@
                                 drawDisplayListStartTime = System.nanoTime();
                             }
 
-                            int status = canvas.drawDisplayList(displayList, mRedrawClip,
+                            status = canvas.drawDisplayList(displayList, mRedrawClip,
                                     DisplayList.FLAG_CLIP_CHILDREN);
 
                             if (mProfileEnabled) {
@@ -1173,22 +1174,25 @@
                     onPostDraw();
 
                     attachInfo.mIgnoreDirtyState = false;
+                    
+                    if ((status & DisplayList.STATUS_DREW) == DisplayList.STATUS_DREW) {
 
-                    long eglSwapBuffersStartTime = 0;
-                    if (mProfileEnabled) {
-                        eglSwapBuffersStartTime = System.nanoTime();
+                        long eglSwapBuffersStartTime = 0;
+                        if (mProfileEnabled) {
+                            eglSwapBuffersStartTime = System.nanoTime();
+                        }
+    
+                        sEgl.eglSwapBuffers(sEglDisplay, mEglSurface);
+    
+                        if (mProfileEnabled) {
+                            long now = System.nanoTime();
+                            float total = (now - eglSwapBuffersStartTime) * 0.000001f;
+                            mProfileData[mProfileCurrentFrame + 2] = total;
+                        }
+    
+                        checkEglErrors();
                     }
 
-                    sEgl.eglSwapBuffers(sEglDisplay, mEglSurface);
-
-                    if (mProfileEnabled) {
-                        long now = System.nanoTime();
-                        float total = (now - eglSwapBuffersStartTime) * 0.000001f;
-                        mProfileData[mProfileCurrentFrame + 2] = total;
-                    }
-
-                    checkEglErrors();
-
                     return dirty == null;
                 }
             }
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 9613149..9f5613e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6308,10 +6308,7 @@
         }
     }
 
-    /**
-     * @hide
-     */
-    public boolean canTakeAccessibilityFocusFromHover() {
+    private boolean canTakeAccessibilityFocusFromHover() {
         if (includeForAccessibility() && isActionableForAccessibility()) {
             return true;
         }
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index fe812af..5108990 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -74,7 +74,6 @@
     private final CallbackProxy mCallbackProxy;
     private final WebSettingsClassic mSettings;
     private final Context mContext;
-    private final WebViewDatabaseClassic mDatabase;
     private final WebViewCore mWebViewCore;
     /* package */ boolean mLoadInitFromJava;
     private int mLoadType;
@@ -243,7 +242,6 @@
         mSettings = settings;
         mContext = context;
         mCallbackProxy = proxy;
-        mDatabase = WebViewDatabaseClassic.getInstance(appContext);
         mWebViewCore = w;
 
         mSearchBox = new SearchBoxImpl(mWebViewCore, mCallbackProxy);
@@ -426,7 +424,8 @@
             if (h != null) {
                 String url = WebTextView.urlForAutoCompleteData(h.getUrl());
                 if (url != null) {
-                    mDatabase.setFormData(url, data);
+                    WebViewDatabaseClassic.getInstance(mContext).setFormData(
+                            url, data);
                 }
             }
         }
@@ -498,8 +497,9 @@
                     if (item != null) {
                         WebAddress uri = new WebAddress(item.getUrl());
                         String schemePlusHost = uri.getScheme() + uri.getHost();
-                        String[] up = mDatabase.getUsernamePassword(
-                                schemePlusHost);
+                        String[] up =
+                                WebViewDatabaseClassic.getInstance(mContext)
+                                        .getUsernamePassword(schemePlusHost);
                         if (up != null && up[0] != null) {
                             setUsernamePassword(up[0], up[1]);
                         }
@@ -800,10 +800,10 @@
             // the post data (there could be another form on the
             // page and that was posted instead.
             String postString = new String(postData);
+            WebViewDatabaseClassic db = WebViewDatabaseClassic.getInstance(mContext);
             if (postString.contains(URLEncoder.encode(username)) &&
                     postString.contains(URLEncoder.encode(password))) {
-                String[] saved = mDatabase.getUsernamePassword(
-                        schemePlusHost);
+                String[] saved = db.getUsernamePassword(schemePlusHost);
                 if (saved != null) {
                     // null username implies that user has chosen not to
                     // save password
@@ -811,7 +811,8 @@
                         // non-null username implies that user has
                         // chosen to save password, so update the
                         // recorded password
-                        mDatabase.setUsernamePassword(schemePlusHost, username, password);
+                        db.setUsernamePassword(schemePlusHost, username,
+                                password);
                     }
                 } else {
                     // CallbackProxy will handle creating the resume
diff --git a/core/java/android/webkit/WebSyncManager.java b/core/java/android/webkit/WebSyncManager.java
index d3ec603..38b5e5c 100644
--- a/core/java/android/webkit/WebSyncManager.java
+++ b/core/java/android/webkit/WebSyncManager.java
@@ -37,6 +37,9 @@
     // handler of the sync thread
     protected Handler mHandler;
     // database for the persistent storage
+    // Note that this remains uninitialised as it is unused. We cannot remove
+    // the member as it leaked into the public API via CookieSyncManager.
+    // TODO: hide this member, ditto for mHandler.
     protected WebViewDatabase mDataBase;
     // Ref count for calls to start/stop sync
     private int mStartSyncRefCount;
@@ -62,7 +65,6 @@
     protected WebSyncManager(Context context, String name) {
         mThreadName = name;
         if (context != null) {
-            mDataBase = WebViewDatabase.getInstance(context);
             mSyncThread = new Thread(this);
             mSyncThread.setName(mThreadName);
             mSyncThread.start();
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index dae9c6a..a84ece6 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -57,7 +57,6 @@
 import android.view.ViewDebug;
 import android.view.ViewGroup;
 import android.view.ViewParent;
-import android.view.ViewRootImpl;
 import android.view.ViewTreeObserver;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
@@ -1331,43 +1330,42 @@
 
     @Override
     public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
-        if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY
-                && (direction == ACCESSIBILITY_FOCUS_FORWARD
-                        || direction == ACCESSIBILITY_FOCUS_BACKWARD)) {
-            if (canTakeAccessibilityFocusFromHover()) {
-                views.add(this);
+        if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY) {
+            switch(direction) {
+                case ACCESSIBILITY_FOCUS_BACKWARD: {
+                    View focusable = (getChildCount() > 0) ? getChildAt(getChildCount() - 1) : this;
+                    if (focusable.isAccessibilityFocusable()) {
+                        views.add(focusable);
+                    }
+                } return;
+                case ACCESSIBILITY_FOCUS_FORWARD: {
+                    if (isAccessibilityFocusable()) {
+                        views.add(this);
+                    }
+                } return;
             }
-        } else {
             super.addFocusables(views, direction, focusableMode);
         }
     }
 
     @Override
     public View focusSearch(int direction) {
-        return focusSearch(null, direction);
+        return focusSearch(this, direction);
     }
 
     @Override
     public View focusSearch(View focused, int direction) {
         switch (direction) {
             case ACCESSIBILITY_FOCUS_FORWARD: {
-                ViewRootImpl viewRootImpl = getViewRootImpl();
-                if (viewRootImpl == null) {
-                    return null;
-                }
-                View currentFocus = viewRootImpl.getAccessibilityFocusedHost();
-                if (currentFocus == null) {
-                    return super.focusSearch(this, direction);
-                }
-                // If we have the focus try giving it to the first child.
-                if (currentFocus == this) {
+                // If we are the focused view try giving it to the first child.
+                if (focused == this) {
                     if (getChildCount() > 0) {
                         return getChildAt(0);
                     }
                     return super.focusSearch(this, direction);
                 }
-                // Find the item that has accessibility focus.
-                final int currentPosition = getPositionForView(currentFocus);
+                // Find the item that has the focused view.
+                final int currentPosition = getPositionForView(focused);
                 if (currentPosition < 0 || currentPosition >= getCount()) {
                     return super.focusSearch(this, direction);
                 }
@@ -1376,9 +1374,9 @@
                 if (currentItem instanceof ViewGroup) {
                     ViewGroup currentItemGroup = (ViewGroup) currentItem;
                     View nextFocus = FocusFinder.getInstance().findNextFocus(currentItemGroup,
-                                currentFocus, direction);
+                                focused, direction);
                     if (nextFocus != null && nextFocus != currentItemGroup
-                            && nextFocus != currentFocus) {
+                            && nextFocus != focused) {
                         return nextFocus;
                     }
                 }
@@ -1386,50 +1384,54 @@
                 final int nextPosition = currentPosition - getFirstVisiblePosition() + 1;
                 if (nextPosition < getChildCount()) {
                     return getChildAt(nextPosition);
-                } else {
-                    return super.focusSearch(this, direction);
                 }
+                // No next item start searching from the list.
+                return super.focusSearch(this, direction);
             }
             case ACCESSIBILITY_FOCUS_BACKWARD: {
-                ViewRootImpl viewRootImpl = getViewRootImpl();
-                if (viewRootImpl == null) {
-                    return null;
-                }
-                View currentFocus = viewRootImpl.getAccessibilityFocusedHost();
-                if (currentFocus == null) {
-                    return super.focusSearch(this, direction);
-                }
-                // If we have the focus do a generic search.
-                if (currentFocus == this) {
-                    final int lastChildIndex = getChildCount() - 1;
-                    if (lastChildIndex >= 0) {
-                        return getChildAt(lastChildIndex);
+                // If we are the focused search from the view that is
+                // as closer to the bottom as possible.
+                if (focused == this) {
+                    final int childCount = getChildCount();
+                    if (childCount > 0) {
+                        return super.focusSearch(getChildAt(childCount - 1), direction);
                     }
                     return super.focusSearch(this, direction);
                 }
-                // Find the item that has accessibility focus.
-                final int currentPosition = getPositionForView(currentFocus);
+                // Find the item that has the focused view.
+                final int currentPosition = getPositionForView(focused);
                 if (currentPosition < 0 || currentPosition >= getCount()) {
                     return super.focusSearch(this, direction);
                 }
-                // Try to advance focus in the current item.
+
                 View currentItem = getChildAt(currentPosition - getFirstVisiblePosition());
+
+                // If a list item is the focused view we try to find a view
+                // in the previous item since in reverse the item contents
+                // get accessibility focus before the item itself.
+                if (currentItem == focused) {
+                    // This list gets accessibility focus after the last first item.
+                    final int previoustPosition = currentPosition - getFirstVisiblePosition() - 1;
+                    if (previoustPosition < 0) {
+                        return this;
+                    }
+                    currentItem = getChildAt(previoustPosition);
+                    focused = null;
+                }
+
+                // Search for into the item.
                 if (currentItem instanceof ViewGroup) {
                     ViewGroup currentItemGroup = (ViewGroup) currentItem;
                     View nextFocus = FocusFinder.getInstance().findNextFocus(currentItemGroup,
-                                currentFocus, direction);
+                                focused, direction);
                     if (nextFocus != null && nextFocus != currentItemGroup
-                            && nextFocus != currentFocus) {
+                            && nextFocus != focused) {
                         return nextFocus;
                     }
                 }
-                // Try to move focus to the previous item.
-                final int nextPosition = currentPosition - getFirstVisiblePosition() - 1;
-                if (nextPosition >= 0) {
-                    return getChildAt(nextPosition);
-                } else {
-                    return super.focusSearch(this, direction);
-                }
+
+                // If not item content wants focus we give it to the item.
+                return currentItem;
             }
         }
         return super.focusSearch(focused, direction);
diff --git a/core/java/android/widget/AppSecurityPermissions.java b/core/java/android/widget/AppSecurityPermissions.java
index 64f6c07..988760d 100755
--- a/core/java/android/widget/AppSecurityPermissions.java
+++ b/core/java/android/widget/AppSecurityPermissions.java
@@ -18,9 +18,7 @@
 
 import com.android.internal.R;
 
-import android.app.AlertDialog;
 import android.content.Context;
-import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
@@ -28,14 +26,9 @@
 import android.content.pm.PermissionGroupInfo;
 import android.content.pm.PermissionInfo;
 import android.graphics.drawable.Drawable;
-import android.os.Parcel;
-import android.text.SpannableStringBuilder;
-import android.text.TextUtils;
-import android.util.AttributeSet;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.ViewGroup;
 
 import java.text.Collator;
 import java.util.ArrayList;
@@ -43,6 +36,7 @@
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -58,200 +52,52 @@
  * 
  * {@hide}
  */
-public class AppSecurityPermissions {
+public class AppSecurityPermissions  implements View.OnClickListener {
 
-    public static final int WHICH_PERSONAL = 1<<0;
-    public static final int WHICH_DEVICE = 1<<1;
-    public static final int WHICH_NEW = 1<<2;
-    public static final int WHICH_ALL = 0xffff;
+    private enum State {
+        NO_PERMS,
+        DANGEROUS_ONLY,
+        NORMAL_ONLY,
+        BOTH
+    }
 
     private final static String TAG = "AppSecurityPermissions";
     private boolean localLOGV = false;
     private Context mContext;
     private LayoutInflater mInflater;
     private PackageManager mPm;
-    private PackageInfo mInstalledPackageInfo;
-    private final Map<String, MyPermissionGroupInfo> mPermGroups
-            = new HashMap<String, MyPermissionGroupInfo>();
-    private final List<MyPermissionGroupInfo> mPermGroupsList
-            = new ArrayList<MyPermissionGroupInfo>();
-    private final PermissionGroupInfoComparator mPermGroupComparator;
-    private final PermissionInfoComparator mPermComparator;
-    private List<MyPermissionInfo> mPermsList;
-    private CharSequence mNewPermPrefix;
+    private LinearLayout mPermsView;
+    private Map<String, String> mDangerousMap;
+    private Map<String, String> mNormalMap;
+    private List<PermissionInfo> mPermsList;
+    private String mDefaultGrpLabel;
+    private String mDefaultGrpName="DefaultGrp";
+    private String mPermFormat;
     private Drawable mNormalIcon;
     private Drawable mDangerousIcon;
-
-    static class MyPermissionGroupInfo extends PermissionGroupInfo {
-        CharSequence mLabel;
-
-        final ArrayList<MyPermissionInfo> mNewPermissions = new ArrayList<MyPermissionInfo>();
-        final ArrayList<MyPermissionInfo> mPersonalPermissions = new ArrayList<MyPermissionInfo>();
-        final ArrayList<MyPermissionInfo> mDevicePermissions = new ArrayList<MyPermissionInfo>();
-        final ArrayList<MyPermissionInfo> mAllPermissions = new ArrayList<MyPermissionInfo>();
-
-        MyPermissionGroupInfo(PermissionInfo perm) {
-            name = perm.packageName;
-            packageName = perm.packageName;
-        }
-
-        MyPermissionGroupInfo(PermissionGroupInfo info) {
-            super(info);
-        }
-
-        public Drawable loadGroupIcon(PackageManager pm) {
-            if (icon != 0) {
-                return loadIcon(pm);
-            } else {
-                ApplicationInfo appInfo;
-                try {
-                    appInfo = pm.getApplicationInfo(packageName, 0);
-                    return appInfo.loadIcon(pm);
-                } catch (NameNotFoundException e) {
-                }
-            }
-            return null;
-        }
-    }
-
-    static class MyPermissionInfo extends PermissionInfo {
-        CharSequence mLabel;
-
-        /**
-         * PackageInfo.requestedPermissionsFlags for the new package being installed.
-         */
-        int mNewReqFlags;
-
-        /**
-         * PackageInfo.requestedPermissionsFlags for the currently installed
-         * package, if it is installed.
-         */
-        int mExistingReqFlags;
-
-        /**
-         * True if this should be considered a new permission.
-         */
-        boolean mNew;
-
-        MyPermissionInfo() {
-        }
-
-        MyPermissionInfo(PermissionInfo info) {
-            super(info);
-        }
-
-        MyPermissionInfo(MyPermissionInfo info) {
-            super(info);
-            mNewReqFlags = info.mNewReqFlags;
-            mExistingReqFlags = info.mExistingReqFlags;
-            mNew = info.mNew;
-        }
-    }
-
-    public static class PermissionItemView extends LinearLayout implements View.OnClickListener {
-        MyPermissionGroupInfo mGroup;
-        MyPermissionInfo mPerm;
-        AlertDialog mDialog;
-
-        public PermissionItemView(Context context, AttributeSet attrs) {
-            super(context, attrs);
-            setClickable(true);
-        }
-
-        public void setPermission(MyPermissionGroupInfo grp, MyPermissionInfo perm,
-                boolean first, CharSequence newPermPrefix) {
-            mGroup = grp;
-            mPerm = perm;
-
-            ImageView permGrpIcon = (ImageView) findViewById(R.id.perm_icon);
-            TextView permNameView = (TextView) findViewById(R.id.perm_name);
-
-            PackageManager pm = getContext().getPackageManager();
-            Drawable icon = null;
-            if (first) {
-                icon = grp.loadGroupIcon(pm);
-            }
-            CharSequence label = perm.mLabel;
-            if (perm.mNew && newPermPrefix != null) {
-                // If this is a new permission, format it appropriately.
-                SpannableStringBuilder builder = new SpannableStringBuilder();
-                Parcel parcel = Parcel.obtain();
-                TextUtils.writeToParcel(newPermPrefix, parcel, 0);
-                parcel.setDataPosition(0);
-                CharSequence newStr = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
-                parcel.recycle();
-                builder.append(newStr);
-                builder.append(label);
-                label = builder;
-            }
-
-            permGrpIcon.setImageDrawable(icon);
-            permNameView.setText(label);
-            setOnClickListener(this);
-        }
-
-        @Override
-        public void onClick(View v) {
-            if (mGroup != null && mPerm != null) {
-                if (mDialog != null) {
-                    mDialog.dismiss();
-                }
-                PackageManager pm = getContext().getPackageManager();
-                AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
-                builder.setTitle(mGroup.mLabel);
-                if (mPerm.descriptionRes != 0) {
-                    builder.setMessage(mPerm.loadDescription(pm));
-                } else {
-                    CharSequence appName;
-                    try {
-                        ApplicationInfo app = pm.getApplicationInfo(mPerm.packageName, 0);
-                        appName = app.loadLabel(pm);
-                    } catch (NameNotFoundException e) {
-                        appName = mPerm.packageName;
-                    }
-                    StringBuilder sbuilder = new StringBuilder(128);
-                    sbuilder.append(getContext().getString(
-                            R.string.perms_description_app, appName));
-                    sbuilder.append("\n\n");
-                    sbuilder.append(mPerm.name);
-                    builder.setMessage(sbuilder.toString());
-                }
-                builder.setCancelable(true);
-                builder.setIcon(mGroup.loadGroupIcon(pm));
-                mDialog = builder.show();
-                mDialog.setCanceledOnTouchOutside(true);
-            }
-        }
-
-        @Override
-        protected void onDetachedFromWindow() {
-            super.onDetachedFromWindow();
-            if (mDialog != null) {
-                mDialog.dismiss();
-            }
-        }
-    }
-
+    private boolean mExpanded;
+    private Drawable mShowMaxIcon;
+    private Drawable mShowMinIcon;
+    private View mShowMore;
+    private TextView mShowMoreText;
+    private ImageView mShowMoreIcon;
+    private State mCurrentState;
+    private LinearLayout mNonDangerousList;
+    private LinearLayout mDangerousList;
+    private HashMap<String, CharSequence> mGroupLabelCache;
+    private View mNoPermsView;
+    
     public AppSecurityPermissions(Context context, List<PermissionInfo> permList) {
         mContext = context;
         mPm = mContext.getPackageManager();
-        loadResources();
-        mPermComparator = new PermissionInfoComparator();
-        mPermGroupComparator = new PermissionGroupInfoComparator();
-        for (PermissionInfo pi : permList) {
-            mPermsList.add(new MyPermissionInfo(pi));
-        }
-        setPermissions(mPermsList);
+        mPermsList = permList;
     }
     
     public AppSecurityPermissions(Context context, String packageName) {
         mContext = context;
         mPm = mContext.getPackageManager();
-        loadResources();
-        mPermComparator = new PermissionInfoComparator();
-        mPermGroupComparator = new PermissionGroupInfoComparator();
-        mPermsList = new ArrayList<MyPermissionInfo>();
-        Set<MyPermissionInfo> permSet = new HashSet<MyPermissionInfo>();
+        mPermsList = new ArrayList<PermissionInfo>();
+        Set<PermissionInfo> permSet = new HashSet<PermissionInfo>();
         PackageInfo pkgInfo;
         try {
             pkgInfo = mPm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS);
@@ -263,39 +109,29 @@
         if((pkgInfo.applicationInfo != null) && (pkgInfo.applicationInfo.uid != -1)) {
             getAllUsedPermissions(pkgInfo.applicationInfo.uid, permSet);
         }
-        for(MyPermissionInfo tmpInfo : permSet) {
+        for(PermissionInfo tmpInfo : permSet) {
             mPermsList.add(tmpInfo);
         }
-        setPermissions(mPermsList);
     }
-
+    
     public AppSecurityPermissions(Context context, PackageParser.Package pkg) {
         mContext = context;
         mPm = mContext.getPackageManager();
-        loadResources();
-        mPermComparator = new PermissionInfoComparator();
-        mPermGroupComparator = new PermissionGroupInfoComparator();
-        mPermsList = new ArrayList<MyPermissionInfo>();
-        Set<MyPermissionInfo> permSet = new HashSet<MyPermissionInfo>();
+        mPermsList = new ArrayList<PermissionInfo>();
+        Set<PermissionInfo> permSet = new HashSet<PermissionInfo>();
         if(pkg == null) {
             return;
         }
-
-        // Convert to a PackageInfo
-        PackageInfo info = PackageParser.generatePackageInfo(pkg, null,
-                PackageManager.GET_PERMISSIONS, 0, 0, null);
-        PackageInfo installedPkgInfo = null;
         // Get requested permissions
-        if (info.requestedPermissions != null) {
-            try {
-                installedPkgInfo = mPm.getPackageInfo(info.packageName,
-                        PackageManager.GET_PERMISSIONS);
-            } catch (NameNotFoundException e) {
+        if (pkg.requestedPermissions != null) {
+            ArrayList<String> strList = pkg.requestedPermissions;
+            int size = strList.size();
+            if (size > 0) {
+                extractPerms(strList.toArray(new String[size]), permSet);
             }
-            extractPerms(info, permSet, installedPkgInfo);
         }
         // Get permissions related to  shared user if any
-        if (pkg.mSharedUserId != null) {
+        if(pkg.mSharedUserId != null) {
             int sharedUid;
             try {
                 sharedUid = mPm.getUidForSharedUser(pkg.mSharedUserId);
@@ -305,23 +141,13 @@
             }
         }
         // Retrieve list of permissions
-        for (MyPermissionInfo tmpInfo : permSet) {
+        for(PermissionInfo tmpInfo : permSet) {
             mPermsList.add(tmpInfo);
         }
-        setPermissions(mPermsList);
     }
-
-    private void loadResources() {
-        // Pick up from framework resources instead.
-        mNewPermPrefix = mContext.getText(R.string.perms_new_perm_prefix);
-        mNormalIcon = mContext.getResources().getDrawable(R.drawable.ic_text_dot);
-        mDangerousIcon = mContext.getResources().getDrawable(R.drawable.ic_bullet_key_permission);
-    }
-
+    
     /**
-     * Utility to retrieve a view displaying a single permission.  This provides
-     * the old UI layout for permissions; it is only here for the device admin
-     * settings to continue to use.
+     * Utility to retrieve a view displaying a single permission.
      */
     public static View getPermissionItemView(Context context,
             CharSequence grpName, CharSequence description, boolean dangerous) {
@@ -329,15 +155,11 @@
                 Context.LAYOUT_INFLATER_SERVICE);
         Drawable icon = context.getResources().getDrawable(dangerous
                 ? R.drawable.ic_bullet_key_permission : R.drawable.ic_text_dot);
-        return getPermissionItemViewOld(context, inflater, grpName,
+        return getPermissionItemView(context, inflater, grpName,
                 description, dangerous, icon);
     }
     
-    public PackageInfo getInstalledPackageInfo() {
-        return mInstalledPackageInfo;
-    }
-
-    private void getAllUsedPermissions(int sharedUid, Set<MyPermissionInfo> permSet) {
+    private void getAllUsedPermissions(int sharedUid, Set<PermissionInfo> permSet) {
         String sharedPkgList[] = mPm.getPackagesForUid(sharedUid);
         if(sharedPkgList == null || (sharedPkgList.length == 0)) {
             return;
@@ -348,95 +170,29 @@
     }
     
     private void getPermissionsForPackage(String packageName, 
-            Set<MyPermissionInfo> permSet) {
+            Set<PermissionInfo> permSet) {
         PackageInfo pkgInfo;
         try {
             pkgInfo = mPm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS);
         } catch (NameNotFoundException e) {
-            Log.w(TAG, "Couldn't retrieve permissions for package:"+packageName);
+            Log.w(TAG, "Could'nt retrieve permissions for package:"+packageName);
             return;
         }
         if ((pkgInfo != null) && (pkgInfo.requestedPermissions != null)) {
-            extractPerms(pkgInfo, permSet, pkgInfo);
+            extractPerms(pkgInfo.requestedPermissions, permSet);
         }
     }
-
-    private void extractPerms(PackageInfo info, Set<MyPermissionInfo> permSet,
-            PackageInfo installedPkgInfo) {
-        String[] strList = info.requestedPermissions;
-        int[] flagsList = info.requestedPermissionsFlags;
-        if ((strList == null) || (strList.length == 0)) {
+    
+    private void extractPerms(String strList[], Set<PermissionInfo> permSet) {
+        if((strList == null) || (strList.length == 0)) {
             return;
         }
-        mInstalledPackageInfo = installedPkgInfo;
-        for (int i=0; i<strList.length; i++) {
-            String permName = strList[i];
-            // If we are only looking at an existing app, then we only
-            // care about permissions that have actually been granted to it.
-            if (installedPkgInfo != null && info == installedPkgInfo) {
-                if ((flagsList[i]&PackageInfo.REQUESTED_PERMISSION_GRANTED) == 0) {
-                    continue;
-                }
-            }
+        for(String permName:strList) {
             try {
                 PermissionInfo tmpPermInfo = mPm.getPermissionInfo(permName, 0);
-                if (tmpPermInfo == null) {
-                    continue;
+                if(tmpPermInfo != null) {
+                    permSet.add(tmpPermInfo);
                 }
-                int existingIndex = -1;
-                if (installedPkgInfo != null
-                        && installedPkgInfo.requestedPermissions != null) {
-                    for (int j=0; j<installedPkgInfo.requestedPermissions.length; j++) {
-                        if (permName.equals(installedPkgInfo.requestedPermissions[j])) {
-                            existingIndex = j;
-                            break;
-                        }
-                    }
-                }
-                final int existingFlags = existingIndex >= 0 ?
-                        installedPkgInfo.requestedPermissionsFlags[existingIndex] : 0;
-                if (!isDisplayablePermission(tmpPermInfo, flagsList[i], existingFlags)) {
-                    // This is not a permission that is interesting for the user
-                    // to see, so skip it.
-                    continue;
-                }
-                final String origGroupName = tmpPermInfo.group;
-                String groupName = origGroupName;
-                if (groupName == null) {
-                    groupName = tmpPermInfo.packageName;
-                    tmpPermInfo.group = groupName;
-                }
-                MyPermissionGroupInfo group = mPermGroups.get(groupName);
-                if (group == null) {
-                    PermissionGroupInfo grp = null;
-                    if (origGroupName != null) {
-                        grp = mPm.getPermissionGroupInfo(origGroupName, 0);
-                    }
-                    if (grp != null) {
-                        group = new MyPermissionGroupInfo(grp);
-                    } else {
-                        // We could be here either because the permission
-                        // didn't originally specify a group or the group it
-                        // gave couldn't be found.  In either case, we consider
-                        // its group to be the permission's package name.
-                        tmpPermInfo.group = tmpPermInfo.packageName;
-                        group = mPermGroups.get(tmpPermInfo.group);
-                        if (group == null) {
-                            group = new MyPermissionGroupInfo(tmpPermInfo);
-                        }
-                        group = new MyPermissionGroupInfo(tmpPermInfo);
-                    }
-                    mPermGroups.put(tmpPermInfo.group, group);
-                }
-                final boolean newPerm = installedPkgInfo != null
-                        && (existingFlags&PackageInfo.REQUESTED_PERMISSION_GRANTED) == 0;
-                MyPermissionInfo myPerm = new MyPermissionInfo(tmpPermInfo);
-                myPerm.mNewReqFlags = flagsList[i];
-                myPerm.mExistingReqFlags = existingFlags;
-                // This is a new permission if the app is already installed and
-                // doesn't currently hold this permission.
-                myPerm.mNew = newPerm;
-                permSet.add(myPerm);
             } catch (NameNotFoundException e) {
                 Log.i(TAG, "Ignoring unknown permission:"+permName);
             }
@@ -444,99 +200,131 @@
     }
     
     public int getPermissionCount() {
-        return getPermissionCount(WHICH_ALL);
-    }
-
-    private List<MyPermissionInfo> getPermissionList(MyPermissionGroupInfo grp, int which) {
-        if (which == WHICH_NEW) {
-            return grp.mNewPermissions;
-        } else if (which == WHICH_PERSONAL) {
-            return grp.mPersonalPermissions;
-        } else if (which == WHICH_DEVICE) {
-            return grp.mDevicePermissions;
-        } else {
-            return grp.mAllPermissions;
-        }
-    }
-
-    public int getPermissionCount(int which) {
-        int N = 0;
-        for (int i=0; i<mPermGroupsList.size(); i++) {
-            N += getPermissionList(mPermGroupsList.get(i), which).size();
-        }
-        return N;
+        return mPermsList.size();
     }
 
     public View getPermissionsView() {
-        return getPermissionsView(WHICH_ALL);
+        
+        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        mPermsView = (LinearLayout) mInflater.inflate(R.layout.app_perms_summary, null);
+        mShowMore = mPermsView.findViewById(R.id.show_more);
+        mShowMoreIcon = (ImageView) mShowMore.findViewById(R.id.show_more_icon);
+        mShowMoreText = (TextView) mShowMore.findViewById(R.id.show_more_text);
+        mDangerousList = (LinearLayout) mPermsView.findViewById(R.id.dangerous_perms_list);
+        mNonDangerousList = (LinearLayout) mPermsView.findViewById(R.id.non_dangerous_perms_list);
+        mNoPermsView = mPermsView.findViewById(R.id.no_permissions);
+
+        // Set up the LinearLayout that acts like a list item.
+        mShowMore.setClickable(true);
+        mShowMore.setOnClickListener(this);
+        mShowMore.setFocusable(true);
+
+        // Pick up from framework resources instead.
+        mDefaultGrpLabel = mContext.getString(R.string.default_permission_group);
+        mPermFormat = mContext.getString(R.string.permissions_format);
+        mNormalIcon = mContext.getResources().getDrawable(R.drawable.ic_text_dot);
+        mDangerousIcon = mContext.getResources().getDrawable(R.drawable.ic_bullet_key_permission);
+        mShowMaxIcon = mContext.getResources().getDrawable(R.drawable.expander_close_holo_dark);
+        mShowMinIcon = mContext.getResources().getDrawable(R.drawable.expander_open_holo_dark);
+        
+        // Set permissions view
+        setPermissions(mPermsList);
+        return mPermsView;
     }
 
-    public View getPermissionsView(int which) {
-        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
-        LinearLayout permsView = (LinearLayout) mInflater.inflate(R.layout.app_perms_summary, null);
-        LinearLayout displayList = (LinearLayout) permsView.findViewById(R.id.perms_list);
-        View noPermsView = permsView.findViewById(R.id.no_permissions);
-
-        displayPermissions(mPermGroupsList, displayList, which);
-        if (displayList.getChildCount() <= 0) {
-            noPermsView.setVisibility(View.VISIBLE);
+    /**
+     * Canonicalizes the group description before it is displayed to the user.
+     *
+     * TODO check for internationalization issues remove trailing '.' in str1
+     */
+    private String canonicalizeGroupDesc(String groupDesc) {
+        if ((groupDesc == null) || (groupDesc.length() == 0)) {
+            return null;
         }
+        // Both str1 and str2 are non-null and are non-zero in size.
+        int len = groupDesc.length();
+        if(groupDesc.charAt(len-1) == '.') {
+            groupDesc = groupDesc.substring(0, len-1);
+        }
+        return groupDesc;
+    }
 
-        return permsView;
+    /**
+     * Utility method that concatenates two strings defined by mPermFormat.
+     * a null value is returned if both str1 and str2 are null, if one of the strings
+     * is null the other non null value is returned without formatting
+     * this is to placate initial error checks
+     */
+    private String formatPermissions(String groupDesc, CharSequence permDesc) {
+        if(groupDesc == null) {
+            if(permDesc == null) {
+                return null;
+            }
+            return permDesc.toString();
+        }
+        groupDesc = canonicalizeGroupDesc(groupDesc);
+        if(permDesc == null) {
+            return groupDesc;
+        }
+        // groupDesc and permDesc are non null
+        return String.format(mPermFormat, groupDesc, permDesc.toString());
+    }
+
+    private CharSequence getGroupLabel(String grpName) {
+        if (grpName == null) {
+            //return default label
+            return mDefaultGrpLabel;
+        }
+        CharSequence cachedLabel = mGroupLabelCache.get(grpName);
+        if (cachedLabel != null) {
+            return cachedLabel;
+        }
+        PermissionGroupInfo pgi;
+        try {
+            pgi = mPm.getPermissionGroupInfo(grpName, 0);
+        } catch (NameNotFoundException e) {
+            Log.i(TAG, "Invalid group name:" + grpName);
+            return null;
+        }
+        CharSequence label = pgi.loadLabel(mPm).toString();
+        mGroupLabelCache.put(grpName, label);
+        return label;
     }
 
     /**
      * Utility method that displays permissions from a map containing group name and
      * list of permission descriptions.
      */
-    private void displayPermissions(List<MyPermissionGroupInfo> groups,
-            LinearLayout permListView, int which) {
+    private void displayPermissions(boolean dangerous) {
+        Map<String, String> permInfoMap = dangerous ? mDangerousMap : mNormalMap;
+        LinearLayout permListView = dangerous ? mDangerousList : mNonDangerousList;
         permListView.removeAllViews();
 
-        int spacing = (int)(8*mContext.getResources().getDisplayMetrics().density);
-
-        for (int i=0; i<groups.size(); i++) {
-            MyPermissionGroupInfo grp = groups.get(i);
-            final List<MyPermissionInfo> perms = getPermissionList(grp, which);
-            for (int j=0; j<perms.size(); j++) {
-                MyPermissionInfo perm = perms.get(j);
-                View view = getPermissionItemView(grp, perm, j == 0,
-                        which != WHICH_NEW ? mNewPermPrefix : null);
-                LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
-                        ViewGroup.LayoutParams.MATCH_PARENT,
-                        ViewGroup.LayoutParams.WRAP_CONTENT);
-                if (j == 0) {
-                    lp.topMargin = spacing;
-                }
-                if (j == grp.mAllPermissions.size()-1) {
-                    lp.bottomMargin = spacing;
-                }
-                if (permListView.getChildCount() == 0) {
-                    lp.topMargin *= 2;
-                }
-                permListView.addView(view, lp);
-            }
+        Set<String> permInfoStrSet = permInfoMap.keySet();
+        for (String loopPermGrpInfoStr : permInfoStrSet) {
+            CharSequence grpLabel = getGroupLabel(loopPermGrpInfoStr);
+            //guaranteed that grpLabel wont be null since permissions without groups
+            //will belong to the default group
+            if(localLOGV) Log.i(TAG, "Adding view group:" + grpLabel + ", desc:"
+                    + permInfoMap.get(loopPermGrpInfoStr));
+            permListView.addView(getPermissionItemView(grpLabel,
+                    permInfoMap.get(loopPermGrpInfoStr), dangerous));
         }
     }
 
-    private PermissionItemView getPermissionItemView(MyPermissionGroupInfo grp,
-            MyPermissionInfo perm, boolean first, CharSequence newPermPrefix) {
-        return getPermissionItemView(mContext, mInflater, grp, perm, first, newPermPrefix);
+    private void displayNoPermissions() {
+        mNoPermsView.setVisibility(View.VISIBLE);
     }
 
-    private static PermissionItemView getPermissionItemView(Context context, LayoutInflater inflater,
-            MyPermissionGroupInfo grp, MyPermissionInfo perm, boolean first,
-            CharSequence newPermPrefix) {
-        PermissionItemView permView = (PermissionItemView)inflater.inflate(
-                R.layout.app_permission_item, null);
-        permView.setPermission(grp, perm, first, newPermPrefix);
-        return permView;
+    private View getPermissionItemView(CharSequence grpName, CharSequence permList,
+            boolean dangerous) {
+        return getPermissionItemView(mContext, mInflater, grpName, permList,
+                dangerous, dangerous ? mDangerousIcon : mNormalIcon);
     }
 
-    private static View getPermissionItemViewOld(Context context, LayoutInflater inflater,
+    private static View getPermissionItemView(Context context, LayoutInflater inflater,
             CharSequence grpName, CharSequence permList, boolean dangerous, Drawable icon) {
-        View permView = inflater.inflate(R.layout.app_permission_item_old, null);
+        View permView = inflater.inflate(R.layout.app_permission_item, null);
 
         TextView permGrpView = (TextView) permView.findViewById(R.id.permission_group);
         TextView permDescView = (TextView) permView.findViewById(R.id.permission_list);
@@ -553,107 +341,159 @@
         return permView;
     }
 
-    private boolean isDisplayablePermission(PermissionInfo pInfo, int newReqFlags,
-            int existingReqFlags) {
-        final int base = pInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE;
-        // Dangerous and normal permissions are always shown to the user.
-        if (base == PermissionInfo.PROTECTION_DANGEROUS ||
-                base == PermissionInfo.PROTECTION_NORMAL) {
-            return true;
+    private void showPermissions() {
+
+        switch(mCurrentState) {
+        case NO_PERMS:
+            displayNoPermissions();
+            break;
+
+        case DANGEROUS_ONLY:
+            displayPermissions(true);
+            break;
+
+        case NORMAL_ONLY:
+            displayPermissions(false);
+            break;
+
+        case BOTH:
+            displayPermissions(true);
+            if (mExpanded) {
+                displayPermissions(false);
+                mShowMoreIcon.setImageDrawable(mShowMaxIcon);
+                mShowMoreText.setText(R.string.perms_hide);
+                mNonDangerousList.setVisibility(View.VISIBLE);
+            } else {
+                mShowMoreIcon.setImageDrawable(mShowMinIcon);
+                mShowMoreText.setText(R.string.perms_show_all);
+                mNonDangerousList.setVisibility(View.GONE);
+            }
+            mShowMore.setVisibility(View.VISIBLE);
+            break;
         }
-        // Development permissions are only shown to the user if they are already
-        // granted to the app -- if we are installing an app and they are not
-        // already granted, they will not be granted as part of the install.
-        if ((existingReqFlags&PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0
-                && (pInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {
+    }
+    
+    private boolean isDisplayablePermission(PermissionInfo pInfo) {
+        if(pInfo.protectionLevel == PermissionInfo.PROTECTION_DANGEROUS ||
+                pInfo.protectionLevel == PermissionInfo.PROTECTION_NORMAL) {
             return true;
         }
         return false;
     }
     
-    private static class PermissionGroupInfoComparator implements Comparator<MyPermissionGroupInfo> {
-        private final Collator sCollator = Collator.getInstance();
-        PermissionGroupInfoComparator() {
+    /*
+     * Utility method that aggregates all permission descriptions categorized by group
+     * Say group1 has perm11, perm12, perm13, the group description will be
+     * perm11_Desc, perm12_Desc, perm13_Desc
+     */
+    private void aggregateGroupDescs(
+            Map<String, List<PermissionInfo> > map, Map<String, String> retMap) {
+        if(map == null) {
+            return;
         }
-        public final int compare(MyPermissionGroupInfo a, MyPermissionGroupInfo b) {
-            if (((a.flags^b.flags)&PermissionGroupInfo.FLAG_PERSONAL_INFO) != 0) {
-                return ((a.flags&PermissionGroupInfo.FLAG_PERSONAL_INFO) != 0) ? -1 : 1;
+        if(retMap == null) {
+           return;
+        }
+        Set<String> grpNames = map.keySet();
+        Iterator<String> grpNamesIter = grpNames.iterator();
+        while(grpNamesIter.hasNext()) {
+            String grpDesc = null;
+            String grpNameKey = grpNamesIter.next();
+            List<PermissionInfo> grpPermsList = map.get(grpNameKey);
+            if(grpPermsList == null) {
+                continue;
             }
-            if (a.priority != b.priority) {
-                return a.priority > b.priority ? -1 : 1;
+            for(PermissionInfo permInfo: grpPermsList) {
+                CharSequence permDesc = permInfo.loadLabel(mPm);
+                grpDesc = formatPermissions(grpDesc, permDesc);
             }
-            return sCollator.compare(a.mLabel, b.mLabel);
+            // Insert grpDesc into map
+            if(grpDesc != null) {
+                if(localLOGV) Log.i(TAG, "Group:"+grpNameKey+" description:"+grpDesc.toString());
+                retMap.put(grpNameKey, grpDesc.toString());
+            }
         }
     }
     
-    private static class PermissionInfoComparator implements Comparator<MyPermissionInfo> {
+    private static class PermissionInfoComparator implements Comparator<PermissionInfo> {
+        private PackageManager mPm;
         private final Collator sCollator = Collator.getInstance();
-        PermissionInfoComparator() {
+        PermissionInfoComparator(PackageManager pm) {
+            mPm = pm;
         }
-        public final int compare(MyPermissionInfo a, MyPermissionInfo b) {
-            return sCollator.compare(a.mLabel, b.mLabel);
+        public final int compare(PermissionInfo a, PermissionInfo b) {
+            CharSequence sa = a.loadLabel(mPm);
+            CharSequence sb = b.loadLabel(mPm);
+            return sCollator.compare(sa, sb);
         }
     }
-
-    private void addPermToList(List<MyPermissionInfo> permList,
-            MyPermissionInfo pInfo) {
-        if (pInfo.mLabel == null) {
-            pInfo.mLabel = pInfo.loadLabel(mPm);
-        }
-        int idx = Collections.binarySearch(permList, pInfo, mPermComparator);
-        if(localLOGV) Log.i(TAG, "idx="+idx+", list.size="+permList.size());
-        if (idx < 0) {
-            idx = -idx-1;
-            permList.add(idx, pInfo);
-        }
-    }
-
-    private void setPermissions(List<MyPermissionInfo> permList) {
+    
+    private void setPermissions(List<PermissionInfo> permList) {
+        mGroupLabelCache = new HashMap<String, CharSequence>();
+        //add the default label so that uncategorized permissions can go here
+        mGroupLabelCache.put(mDefaultGrpName, mDefaultGrpLabel);
+        
+        // Map containing group names and a list of permissions under that group
+        // categorized as dangerous
+        mDangerousMap = new HashMap<String, String>();
+        // Map containing group names and a list of permissions under that group
+        // categorized as normal
+        mNormalMap = new HashMap<String, String>();
+        
+        // Additional structures needed to ensure that permissions are unique under 
+        // each group
+        Map<String, List<PermissionInfo>> dangerousMap = 
+            new HashMap<String,  List<PermissionInfo>>();
+        Map<String, List<PermissionInfo> > normalMap = 
+            new HashMap<String,  List<PermissionInfo>>();
+        PermissionInfoComparator permComparator = new PermissionInfoComparator(mPm);
+        
         if (permList != null) {
             // First pass to group permissions
-            for (MyPermissionInfo pInfo : permList) {
+            for (PermissionInfo pInfo : permList) {
                 if(localLOGV) Log.i(TAG, "Processing permission:"+pInfo.name);
-                if(!isDisplayablePermission(pInfo, pInfo.mNewReqFlags, pInfo.mExistingReqFlags)) {
+                if(!isDisplayablePermission(pInfo)) {
                     if(localLOGV) Log.i(TAG, "Permission:"+pInfo.name+" is not displayable");
                     continue;
                 }
-                MyPermissionGroupInfo group = mPermGroups.get(pInfo.group);
-                if (group != null) {
-                    pInfo.mLabel = pInfo.loadLabel(mPm);
-                    addPermToList(group.mAllPermissions, pInfo);
-                    if (pInfo.mNew) {
-                        addPermToList(group.mNewPermissions, pInfo);
-                    }
-                    if ((group.flags&PermissionGroupInfo.FLAG_PERSONAL_INFO) != 0) {
-                        addPermToList(group.mPersonalPermissions, pInfo);
-                    } else {
-                        addPermToList(group.mDevicePermissions, pInfo);
+                Map<String, List<PermissionInfo> > permInfoMap =
+                    (pInfo.protectionLevel == PermissionInfo.PROTECTION_DANGEROUS) ?
+                            dangerousMap : normalMap;
+                String grpName = (pInfo.group == null) ? mDefaultGrpName : pInfo.group;
+                if(localLOGV) Log.i(TAG, "Permission:"+pInfo.name+" belongs to group:"+grpName);
+                List<PermissionInfo> grpPermsList = permInfoMap.get(grpName);
+                if(grpPermsList == null) {
+                    grpPermsList = new ArrayList<PermissionInfo>();
+                    permInfoMap.put(grpName, grpPermsList);
+                    grpPermsList.add(pInfo);
+                } else {
+                    int idx = Collections.binarySearch(grpPermsList, pInfo, permComparator);
+                    if(localLOGV) Log.i(TAG, "idx="+idx+", list.size="+grpPermsList.size());
+                    if (idx < 0) {
+                        idx = -idx-1;
+                        grpPermsList.add(idx, pInfo);
                     }
                 }
             }
+            // Second pass to actually form the descriptions
+            // Look at dangerous permissions first
+            aggregateGroupDescs(dangerousMap, mDangerousMap);
+            aggregateGroupDescs(normalMap, mNormalMap);
         }
 
-        for (MyPermissionGroupInfo pgrp : mPermGroups.values()) {
-            if (pgrp.labelRes != 0 || pgrp.nonLocalizedLabel != null) {
-                pgrp.mLabel = pgrp.loadLabel(mPm);
-            } else {
-                ApplicationInfo app;
-                try {
-                    app = mPm.getApplicationInfo(pgrp.packageName, 0);
-                    pgrp.mLabel = app.loadLabel(mPm);
-                } catch (NameNotFoundException e) {
-                    pgrp.mLabel = pgrp.loadLabel(mPm);
-                }
-            }
-            mPermGroupsList.add(pgrp);
+        mCurrentState = State.NO_PERMS;
+        if(mDangerousMap.size() > 0) {
+            mCurrentState = (mNormalMap.size() > 0) ? State.BOTH : State.DANGEROUS_ONLY;
+        } else if(mNormalMap.size() > 0) {
+            mCurrentState = State.NORMAL_ONLY;
         }
-        Collections.sort(mPermGroupsList, mPermGroupComparator);
-        if (false) {
-            for (MyPermissionGroupInfo grp : mPermGroupsList) {
-                Log.i("foo", "Group " + grp.name + " personal="
-                        + ((grp.flags&PermissionGroupInfo.FLAG_PERSONAL_INFO) != 0)
-                        + " priority=" + grp.priority);
-            }
-        }
+        if(localLOGV) Log.i(TAG, "mCurrentState=" + mCurrentState);
+        showPermissions();
+    }
+
+    public void onClick(View v) {
+        if(localLOGV) Log.i(TAG, "mExpanded="+mExpanded);
+        mExpanded = !mExpanded;
+        showPermissions();
     }
 }
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index b60ffc5..a458f57 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -1421,7 +1421,7 @@
         // We do not want the real descendant to be considered focus search
         // since it is managed by the accessibility node provider.
         if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY) {
-            if (canTakeAccessibilityFocusFromHover() || getAccessibilityNodeProvider() != null) {
+            if (isAccessibilityFocusable()) {
                 views.add(this);
                 return;
             }
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
index b2c3091..89dbd1b 100644
--- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
@@ -23,12 +23,16 @@
 import android.animation.TimeInterpolator;
 import android.animation.ValueAnimator;
 import android.animation.ValueAnimator.AnimatorUpdateListener;
+import android.content.ComponentName;
 import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
+import android.os.Bundle;
 import android.os.Vibrator;
 import android.text.TextUtils;
 import android.util.AttributeSet;
@@ -1233,4 +1237,62 @@
         }
         return -1;
     }
+
+    private boolean replaceTargetDrawables(Resources res, int existingResourceId,
+            int newResourceId) {
+        if (existingResourceId == 0 || newResourceId == 0) {
+            return false;
+        }
+
+        boolean result = false;
+        final ArrayList<TargetDrawable> drawables = mTargetDrawables;
+        final int size = drawables.size();
+        for (int i = 0; i < size; i++) {
+            final TargetDrawable target = drawables.get(i);
+            if (target != null && target.getResourceId() == existingResourceId) {
+                target.setDrawable(res, newResourceId);
+                result = true;
+            }
+        }
+
+        if (result) {
+            requestLayout(); // in case any given drawable's size changes
+        }
+
+        return result;
+    }
+
+    /**
+     * Searches the given package for a resource to use to replace the Drawable on the
+     * target with the given resource id
+     * @param component of the .apk that contains the resource
+     * @param name of the metadata in the .apk
+     * @param existingResId the resource id of the target to search for
+     * @return true if found in the given package and replaced at least one target Drawables
+     */
+    public boolean replaceTargetDrawablesIfPresent(ComponentName component, String name,
+                int existingResId) {
+        if (existingResId == 0) return false;
+
+        try {
+            PackageManager packageManager = mContext.getPackageManager();
+            // Look for the search icon specified in the activity meta-data
+            Bundle metaData = packageManager.getActivityInfo(
+                    component, PackageManager.GET_META_DATA).metaData;
+            if (metaData != null) {
+                int iconResId = metaData.getInt(name);
+                if (iconResId != 0) {
+                    Resources res = packageManager.getResourcesForActivity(component);
+                    return replaceTargetDrawables(res, existingResId, iconResId);
+                }
+            }
+        } catch (NameNotFoundException e) {
+            Log.w(TAG, "Failed to swap drawable; "
+                    + component.flattenToShortString() + " not found", e);
+        } catch (Resources.NotFoundException nfe) {
+            Log.w(TAG, "Failed to swap drawable from "
+                    + component.flattenToShortString(), nfe);
+        }
+        return false;
+    }
 }
diff --git a/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java b/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
index 6392093..30f5f2f 100644
--- a/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
+++ b/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
@@ -44,7 +44,7 @@
     private float mAlpha = 1.0f;
     private Drawable mDrawable;
     private boolean mEnabled = true;
-    private int mResourceId;
+    private final int mResourceId;
 
     /* package */ static class DrawableWithAlpha extends Drawable {
         private float mAlpha = 1.0f;
@@ -78,6 +78,12 @@
 
     public TargetDrawable(Resources res, int resId) {
         mResourceId = resId;
+        setDrawable(res, resId);
+    }
+
+    public void setDrawable(Resources res, int resId) {
+        // Note we explicitly don't set mResourceId to resId since we allow the drawable to be
+        // swapped at runtime and want to re-use the existing resource id for identification.
         Drawable drawable = resId == 0 ? null : res.getDrawable(resId);
         // Mutate the drawable so we can animate shared drawable properties.
         mDrawable = drawable != null ? drawable.mutate() : null;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 155e59c..9b417a2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -139,11 +139,39 @@
     <eat-comment />
 
     <!-- Used for permissions that can be used to make the user spend money
-         without their direct involvement. -->
+         without their direct involvement.  For example, this is the group
+         for permissions that allow you to directly place phone calls,
+         directly send SMS messages, etc. -->
     <permission-group android:name="android.permission-group.COST_MONEY"
         android:label="@string/permgrouplab_costMoney"
         android:description="@string/permgroupdesc_costMoney" />
 
+
+    <!-- Allows an application to send SMS messages. -->
+    <permission android:name="android.permission.SEND_SMS"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_sendSms"
+        android:description="@string/permdesc_sendSms" />
+
+    <!-- Allows an application to send SMS messages via the Messaging app with no user
+         input or confirmation.
+         @hide -->
+    <permission android:name="android.permission.SEND_SMS_NO_CONFIRMATION"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="signature|system"
+        android:label="@string/permlab_sendSmsNoConfirmation"
+        android:description="@string/permdesc_sendSmsNoConfirmation" />
+
+    <!-- Allows an application to initiate a phone call without going through
+         the Dialer user interface for the user to confirm the call
+         being placed. -->
+    <permission android:name="android.permission.CALL_PHONE"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_callPhone"
+        android:description="@string/permdesc_callPhone" />
+
     <!-- ================================== -->
     <!-- Permissions for accessing messages -->
     <!-- ================================== -->
@@ -155,26 +183,7 @@
          receiving or reading an MMS. -->
     <permission-group android:name="android.permission-group.MESSAGES"
         android:label="@string/permgrouplab_messages"
-        android:icon="@drawable/perm_group_messages"
-        android:description="@string/permgroupdesc_messages"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="360"/>
-
-  <!-- Allows an application to send SMS messages. -->
-    <permission android:name="android.permission.SEND_SMS"
-        android:permissionGroup="android.permission-group.MESSAGES"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_sendSms"
-        android:description="@string/permdesc_sendSms" />
-
-    <!-- Allows an application to send SMS messages via the Messaging app with no user
-         input or confirmation.
-         @hide -->
-    <permission android:name="android.permission.SEND_SMS_NO_CONFIRMATION"
-        android:permissionGroup="android.permission-group.MESSAGES"
-        android:protectionLevel="signature|system"
-        android:label="@string/permlab_sendSmsNoConfirmation"
-        android:description="@string/permdesc_sendSmsNoConfirmation" />
+        android:description="@string/permgroupdesc_messages" />
 
     <!-- Allows an application to monitor incoming SMS messages, to record
          or perform processing on them. -->
@@ -240,25 +249,22 @@
         android:description="@string/permdesc_receiveWapPush" />
 
     <!-- =============================================================== -->
-    <!-- Permissions for accessing social info (contacts and social) -->
+    <!-- Permissions for accessing personal info (contacts and calendar) -->
     <!-- =============================================================== -->
     <eat-comment />
 
-    <!-- Used for permissions that provide access to the user's social connections,
-         such as contacts, call logs, social stream, etc.  This includes
+    <!-- Used for permissions that provide access to the user's private data,
+         such as contacts, calendar events, e-mail messages, etc.  This includes
          both reading and writing of this data (which should generally be
          expressed as two distinct permissions). -->
 
-    <permission-group android:name="android.permission-group.SOCIAL_INFO"
-        android:label="@string/permgrouplab_socialInfo"
-        android:icon="@drawable/perm_group_social_info"
-        android:description="@string/permgroupdesc_socialInfo"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="320" />
+    <permission-group android:name="android.permission-group.PERSONAL_INFO"
+        android:label="@string/permgrouplab_personalInfo"
+        android:description="@string/permgroupdesc_personalInfo" />
 
     <!-- Allows an application to read the user's contacts data. -->
     <permission android:name="android.permission.READ_CONTACTS"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_readContacts"
         android:description="@string/permdesc_readContacts" />
@@ -266,14 +272,14 @@
     <!-- Allows an application to write (but not read) the user's
          contacts data. -->
     <permission android:name="android.permission.WRITE_CONTACTS"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_writeContacts"
         android:description="@string/permdesc_writeContacts" />
 
     <!-- Allows an application to read the user's call log. -->
     <permission android:name="android.permission.READ_CALL_LOG"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_readCallLog"
         android:description="@string/permdesc_readCallLog" />
@@ -281,42 +287,11 @@
     <!-- Allows an application to write (but not read) the user's
          contacts data. -->
     <permission android:name="android.permission.WRITE_CALL_LOG"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_writeCallLog"
         android:description="@string/permdesc_writeCallLog" />
 
-  <!-- Allows an application to read from the user's social stream. -->
-    <permission android:name="android.permission.READ_SOCIAL_STREAM"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_readSocialStream"
-        android:description="@string/permdesc_readSocialStream" />
-
-    <!-- Allows an application to write (but not read) the user's
-         social stream data. -->
-    <permission android:name="android.permission.WRITE_SOCIAL_STREAM"
-        android:permissionGroup="android.permission-group.SOCIAL_INFO"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_writeSocialStream"
-        android:description="@string/permdesc_writeSocialStream" />
-
-    <!-- =============================================================== -->
-    <!-- Permissions for accessing information about the device owner    -->
-    <!-- =============================================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to information about the device
-         user such as profile information.  This includes both reading and
-         writing of this data (which should generally be expressed as two
-         distinct permissions). -->
-    <permission-group android:name="android.permission-group.PERSONAL_INFO"
-        android:label="@string/permgrouplab_personalInfo"
-        android:icon="@drawable/perm_group_personal_info"
-        android:description="@string/permgroupdesc_personalInfo"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="310" />
-
     <!-- Allows an application to read the user's personal profile data. -->
     <permission android:name="android.permission.READ_PROFILE"
         android:permissionGroup="android.permission-group.PERSONAL_INFO"
@@ -332,19 +307,20 @@
         android:label="@string/permlab_writeProfile"
         android:description="@string/permdesc_writeProfile" />
 
-    <!-- =============================================================== -->
-    <!-- Permissions for accessing the device calendar                   -->
-    <!-- =============================================================== -->
-    <eat-comment />
+    <!-- Allows an application to read from the user's social stream. -->
+    <permission android:name="android.permission.READ_SOCIAL_STREAM"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_readSocialStream"
+        android:description="@string/permdesc_readSocialStream" />
 
-    <!-- Used for permissions that provide access to the device
-         calendar to create / view events.-->
-    <permission-group android:name="android.permission-group.CALENDAR"
-        android:label="@string/permgrouplab_calendar"
-        android:icon="@drawable/perm_group_calendar"
-        android:description="@string/permgroupdesc_calendar"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="290" />
+    <!-- Allows an application to write (but not read) the user's
+         social stream data. -->
+    <permission android:name="android.permission.WRITE_SOCIAL_STREAM"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_writeSocialStream"
+        android:description="@string/permdesc_writeSocialStream" />
 
     <!-- Allows an application to read the user's calendar data. -->
     <permission android:name="android.permission.READ_CALENDAR"
@@ -361,63 +337,26 @@
         android:label="@string/permlab_writeCalendar"
         android:description="@string/permdesc_writeCalendar" />
 
-    <!-- =============================================================== -->
-    <!-- Permissions for accessing the user dictionary-->
-    <!-- =============================================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to the user
-         calendar to create / view events.-->
-    <permission-group android:name="android.permission-group.USER_DICTIONARY"
-        android:label="@string/permgrouplab_dictionary"
-        android:icon="@drawable/perm_group_user_dictionary"
-        android:description="@string/permgroupdesc_dictionary"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="170" />
-
     <!-- Allows an application to read the user dictionary. This should
          really only be required by an IME, or a dictionary editor like
          the Settings app. -->
     <permission android:name="android.permission.READ_USER_DICTIONARY"
-        android:permissionGroup="android.permission-group.USER_DICTIONARY"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_readDictionary"
         android:description="@string/permdesc_readDictionary" />
 
-    <!-- Used for permissions that provide access to the user
-         calendar to create / view events.-->
-    <permission-group android:name="android.permission-group.WRITE_USER_DICTIONARY"
-        android:label="@string/permgrouplab_writeDictionary"
-        android:icon="@drawable/perm_group_user_dictionary_write"
-        android:description="@string/permgroupdesc_writeDictionary"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="160" />
-
     <!-- Allows an application to write to the user dictionary. -->
     <permission android:name="android.permission.WRITE_USER_DICTIONARY"
-        android:permissionGroup="android.permission-group.WRITE_USER_DICTIONARY"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="normal"
         android:label="@string/permlab_writeDictionary"
         android:description="@string/permdesc_writeDictionary" />
 
-    <!-- =============================================================== -->
-    <!-- Permissions for accessing the user bookmarks                    -->
-    <!-- =============================================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to the user
-         bookmarks and browser history.-->
-    <permission-group android:name="android.permission-group.BOOKMARKS"
-        android:label="@string/permgrouplab_bookmarks"
-        android:icon="@drawable/perm_group_bookmarks"
-        android:description="@string/permgroupdesc_bookmarks"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="300" />
-
     <!-- Allows an application to read (but not write) the user's
         browsing history and bookmarks. -->
     <permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
-        android:permissionGroup="android.permission-group.BOOKMARKS"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:label="@string/permlab_readHistoryBookmarks"
         android:description="@string/permdesc_readHistoryBookmarks"
         android:protectionLevel="dangerous" />
@@ -425,48 +364,23 @@
     <!-- Allows an application to write (but not read) the user's
         browsing history and bookmarks. -->
     <permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"
-        android:permissionGroup="android.permission-group.BOOKMARKS"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:label="@string/permlab_writeHistoryBookmarks"
         android:description="@string/permdesc_writeHistoryBookmarks"
         android:protectionLevel="dangerous" />
 
-    <!-- =============================================================== -->
-    <!-- Permissions for setting the device alarm                        -->
-    <!-- =============================================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to the user voicemail box. -->
-    <permission-group android:name="android.permission-group.DEVICE_ALARMS"
-        android:label="@string/permgrouplab_deviceAlarms"
-        android:icon="@drawable/perm_group_device_alarms"
-        android:description="@string/permgroupdesc_deviceAlarms"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="210" />
-
     <!-- Allows an application to broadcast an Intent to set an alarm for the
          user. -->
     <permission android:name="com.android.alarm.permission.SET_ALARM"
-        android:permissionGroup="android.permission-group.DEVICE_ALARMS"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:label="@string/permlab_setAlarm"
         android:description="@string/permdesc_setAlarm"
         android:protectionLevel="normal" />
 
-    <!-- =============================================================== -->
-    <!-- Permissions for accessing the user voicemail                    -->
-    <!-- =============================================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to the user voicemail box. -->
-    <permission-group android:name="android.permission-group.VOICEMAIL"
-        android:label="@string/permgrouplab_voicemail"
-        android:icon="@drawable/perm_group_voicemail"
-        android:description="@string/permgroupdesc_voicemail"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="280" />
 
    <!-- Allows an application to add voicemails into the system. -->
     <permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"
-        android:permissionGroup="android.permission-group.VOICEMAIL"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_addVoicemail"
         android:description="@string/permdesc_addVoicemail" />
@@ -481,9 +395,7 @@
     <permission-group android:name="android.permission-group.LOCATION"
         android:label="@string/permgrouplab_location"
         android:icon="@drawable/perm_group_location"
-        android:description="@string/permgroupdesc_location"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="330" />
+        android:description="@string/permgroupdesc_location" />
 
     <!-- Allows an application to access fine (e.g., GPS) location -->
     <permission android:name="android.permission.ACCESS_FINE_LOCATION"
@@ -530,9 +442,7 @@
          or other related network operations. -->
     <permission-group android:name="android.permission-group.NETWORK"
         android:label="@string/permgrouplab_network"
-        android:icon="@drawable/perm_group_network"
-        android:description="@string/permgroupdesc_network"
-        android:priority="270" />
+        android:description="@string/permgroupdesc_network" />
 
     <!-- Allows applications to open network sockets. -->
     <permission android:name="android.permission.INTERNET"
@@ -554,13 +464,6 @@
         android:protectionLevel="normal"
         android:description="@string/permdesc_accessWifiState"
         android:label="@string/permlab_accessWifiState" />
-        
-    <!-- Allows applications to change Wi-Fi connectivity state -->
-    <permission android:name="android.permission.CHANGE_WIFI_STATE"
-        android:permissionGroup="android.permission-group.NETWORK"
-        android:protectionLevel="normal"
-        android:description="@string/permdesc_changeWifiState"
-        android:label="@string/permlab_changeWifiState" />
 
     <!-- @hide -->
     <permission android:name="android.permission.ACCESS_WIMAX_STATE"
@@ -569,55 +472,35 @@
         android:description="@string/permdesc_accessWimaxState"
         android:label="@string/permlab_accessWimaxState" />
 
-    <!-- @hide -->
-    <permission android:name="android.permission.CHANGE_WIMAX_STATE"
-        android:permissionGroup="android.permission-group.NETWORK"
-        android:protectionLevel="dangerous"
-        android:description="@string/permdesc_changeWimaxState"
-        android:label="@string/permlab_changeWimaxState" />
-
-    <!-- ======================================= -->
-    <!-- Permissions for short range, peripheral networks -->
-    <!-- ======================================= -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide access to other devices through Bluetooth.-->
-    <permission-group android:name="android.permission-group.BLUETOOTH_NETWORK"
-        android:label="@string/permgrouplab_bluetoothNetwork"
-        android:icon="@drawable/perm_group_bluetooth"
-        android:description="@string/permgroupdesc_bluetoothNetwork"
-        android:priority="260" />
-
-    <!-- Allows applications to connect to paired bluetooth devices -->
+     <!-- Allows applications to connect to paired bluetooth devices -->
     <permission android:name="android.permission.BLUETOOTH"
-        android:permissionGroup="android.permission-group.BLUETOOTH_NETWORK"
+        android:permissionGroup="android.permission-group.NETWORK"
         android:protectionLevel="dangerous"
         android:description="@string/permdesc_bluetooth"
         android:label="@string/permlab_bluetooth" />
-        
-    <!-- Allows applications to discover and pair bluetooth devices -->
-    <permission android:name="android.permission.BLUETOOTH_ADMIN"
-        android:permissionGroup="android.permission-group.BLUETOOTH_NETWORK"
-        android:protectionLevel="dangerous"
-        android:description="@string/permdesc_bluetoothAdmin"
-        android:label="@string/permlab_bluetoothAdmin" />
-   
-    <!-- Used for permissions that provide access to network services that
-         are for peripherals and other nearby devices.  These networks
-         generally do not provide IP based networking or internet access.-->
-    <permission-group android:name="android.permission-group.SHORTRANGE_NETWORK"
-        android:label="@string/permgrouplab_shortrangeNetwork"
-        android:icon="@drawable/perm_group_shortrange_network"
-        android:description="@string/permgroupdesc_shortrangeNetwork"
-        android:priority="250" />
 
     <!-- Allows applications to perform I/O operations over NFC -->
     <permission android:name="android.permission.NFC"
-        android:permissionGroup="android.permission-group.SHORTRANGE_NETWORK"
+        android:permissionGroup="android.permission-group.NETWORK"
         android:protectionLevel="dangerous"
         android:description="@string/permdesc_nfc"
         android:label="@string/permlab_nfc" />
 
+    <!-- Allows an application to use SIP service -->
+    <permission android:name="android.permission.USE_SIP"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_use_sip"
+        android:label="@string/permlab_use_sip" />
+
+    <!-- Allows applications to call into AccountAuthenticators. Only
+    the system can get this permission. -->
+    <permission android:name="android.permission.ACCOUNT_MANAGER"
+        android:permissionGroup="android.permission-group.ACCOUNTS"
+        android:protectionLevel="signature"
+        android:description="@string/permdesc_accountManagerService"
+        android:label="@string/permlab_accountManagerService" />
+
     <!-- Allows an internal user to use privileged ConnectivityManager
     APIs.
         @hide -->
@@ -634,10 +517,7 @@
          by the Account Manager. -->
     <permission-group android:name="android.permission-group.ACCOUNTS"
         android:label="@string/permgrouplab_accounts"
-        android:icon="@drawable/perm_group_accounts"
-        android:description="@string/permgroupdesc_accounts"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="200" />
+        android:description="@string/permgroupdesc_accounts" />
 
     <!-- Allows access to the list of accounts in the Accounts Service -->
     <permission android:name="android.permission.GET_ACCOUNTS"
@@ -668,77 +548,6 @@
         android:label="@string/permlab_manageAccounts"
         android:description="@string/permdesc_manageAccounts" />
 
-    <!-- Allows applications to call into AccountAuthenticators. Only
-         the system can get this permission. -->
-    <permission android:name="android.permission.ACCOUNT_MANAGER"
-        android:permissionGroup="android.permission-group.ACCOUNTS"
-        android:protectionLevel="signature"
-        android:description="@string/permdesc_accountManagerService"
-        android:label="@string/permlab_accountManagerService" />
-
-    <!-- ================================== -->
-    <!-- Permissions for accessing hardware that may effect battery life-->
-    <!-- ================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that provide direct access to the hardware on
-         the device that has an effect on battery life.  This includes vibrator,
-         flashlight,  etc. -->
-
-    <permission-group android:name="android.permission-group.AFFECTS_BATTERY"
-        android:label="@string/permgrouplab_affectsBattery"
-        android:icon="@drawable/perm_group_affects_battery"
-        android:description="@string/permgroupdesc_affectsBattery"
-        android:priority="180" />
-
-    <!-- Allows applications to enter Wi-Fi Multicast mode -->
-    <permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
-        android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
-        android:protectionLevel="normal"
-        android:description="@string/permdesc_changeWifiMulticastState"
-        android:label="@string/permlab_changeWifiMulticastState" />
-
-    <!-- Allows access to the vibrator -->
-    <permission android:name="android.permission.VIBRATE"
-        android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_vibrate"
-        android:description="@string/permdesc_vibrate" />
-
-    <!-- Allows access to the flashlight -->
-    <permission android:name="android.permission.FLASHLIGHT"
-        android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_flashlight"
-        android:description="@string/permdesc_flashlight" />
-
-    <!-- Allows using PowerManager WakeLocks to keep processor from sleeping or screen
-         from dimming -->
-    <permission android:name="android.permission.WAKE_LOCK"
-        android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_wakeLock"
-        android:description="@string/permdesc_wakeLock" />
-
-    <!-- ==================================================== -->
-    <!-- Permissions related to changing audio settings   -->
-    <!-- ==================================================== -->
-
-    <!-- Used for permissions that provide direct access to speaker settings
-         the device. -->
-    <permission-group android:name="android.permission-group.AUDIO_SETTINGS"
-        android:label="@string/permgrouplab_audioSettings"
-        android:icon="@drawable/perm_group_audio_settings"
-        android:description="@string/permgroupdesc_audioSettings"
-        android:priority="130" />
-
-    <!-- Allows an application to modify global audio settings -->
-    <permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
-        android:permissionGroup="android.permission-group.AUDIO_SETTINGS"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_modifyAudioSettings"
-        android:description="@string/permdesc_modifyAudioSettings" />
-
     <!-- ================================== -->
     <!-- Permissions for accessing hardware -->
     <!-- ================================== -->
@@ -748,8 +557,49 @@
          the device.  This includes audio, the camera, vibrator, etc. -->
     <permission-group android:name="android.permission-group.HARDWARE_CONTROLS"
         android:label="@string/permgrouplab_hardwareControls"
-        android:description="@string/permgroupdesc_hardwareControls"
-        android:priority="260"/>
+        android:description="@string/permgroupdesc_hardwareControls" />
+
+
+    <!-- Allows an application to modify global audio settings -->
+    <permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_modifyAudioSettings"
+        android:description="@string/permdesc_modifyAudioSettings" />
+
+    <!-- Allows an application to record audio -->
+    <permission android:name="android.permission.RECORD_AUDIO"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_recordAudio"
+        android:description="@string/permdesc_recordAudio" />
+
+    <!-- Required to be able to access the camera device.
+         <p>This will automatically enforce the <a
+         href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
+         &lt;uses-feature&gt;}</a> manifest element for <em>all</em> camera features.
+         If you do not require all camera features or can properly operate if a camera
+         is not available, then you must modify your manifest as appropriate in order to
+         install on devices that don't support all camera features.</p> -->
+    <permission android:name="android.permission.CAMERA"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_camera"
+        android:description="@string/permdesc_camera" />
+
+    <!-- Allows access to the vibrator -->
+    <permission android:name="android.permission.VIBRATE"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="normal"
+        android:label="@string/permlab_vibrate"
+        android:description="@string/permdesc_vibrate" />
+
+    <!-- Allows access to the flashlight -->
+    <permission android:name="android.permission.FLASHLIGHT"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="normal"
+        android:label="@string/permlab_flashlight"
+        android:description="@string/permdesc_flashlight" />
 
     <!-- Allows an application to manage preferences and permissions for USB devices
          @hide -->
@@ -787,68 +637,18 @@
         android:protectionLevel="signature" />
 
     <!-- =========================================== -->
-    <!-- Permissions associated with audio capture -->
-    <!-- =========================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that are associated with accessing
-         microphone audio from the device. Note that phone calls also capture audio
-         but are in a separate (more visible) permission group. -->
-    <permission-group android:name="android.permission-group.MICROPHONE"
-        android:label="@string/permgrouplab_microphone"
-        android:icon="@drawable/perm_group_microphone"
-        android:description="@string/permgroupdesc_microphone"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="340" />
-
-    <!-- Allows an application to record audio -->
-    <permission android:name="android.permission.RECORD_AUDIO"
-        android:permissionGroup="android.permission-group.MICROPHONE"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_recordAudio" />
-
-
-    <!-- =========================================== -->
-    <!-- Permissions associated with camera and image capture -->
-    <!-- =========================================== -->
-    <eat-comment />
-
-    <!-- Used for permissions that are associated with accessing
-         camera or capturing images/video from the device. -->
-    <permission-group android:name="android.permission-group.CAMERA"
-        android:label="@string/permgrouplab_camera"
-        android:icon="@drawable/perm_group_camera"
-        android:description="@string/permgroupdesc_camera"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="350" />
-
-    <!-- Required to be able to access the camera device.
-         <p>This will automatically enforce the <a
-         href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-         &lt;uses-feature&gt;}</a> manifest element for <em>all</em> camera features.
-         If you do not require all camera features or can properly operate if a camera
-         is not available, then you must modify your manifest as appropriate in order to
-         install on devices that don't support all camera features.</p> -->
-    <permission android:name="android.permission.CAMERA"
-        android:permissionGroup="android.permission-group.CAMERA"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_camera"
-        android:description="@string/permdesc_camera" />
-
-    <!-- =========================================== -->
     <!-- Permissions associated with telephony state -->
     <!-- =========================================== -->
     <eat-comment />
 
     <!-- Used for permissions that are associated with accessing and modifyign
-         telephony state: placing calls, intercepting outgoing calls, reading
-         and modifying the phone state. -->
+         telephony state: intercepting outgoing calls, reading
+         and modifying the phone state.  Note that
+         placing phone calls is not in this group, since that is in the
+         more important "takin' yer moneys" group. -->
     <permission-group android:name="android.permission-group.PHONE_CALLS"
         android:label="@string/permgrouplab_phoneCalls"
-        android:icon="@drawable/perm_group_phone_calls"
-        android:description="@string/permgroupdesc_phoneCalls"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="370" />
+        android:description="@string/permgroupdesc_phoneCalls" />
 
     <!-- Allows an application to monitor, modify, or abort outgoing
          calls. -->
@@ -879,22 +679,6 @@
         android:permissionGroup="android.permission-group.PHONE_CALLS"
         android:protectionLevel="signature|system" />
 
-     <!-- Allows an application to initiate a phone call without going through
-         the Dialer user interface for the user to confirm the call
-         being placed. -->
-    <permission android:name="android.permission.CALL_PHONE"
-        android:permissionGroup="android.permission-group.PHONE_CALLS"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_callPhone"
-        android:description="@string/permdesc_callPhone" />
-
-    <!-- Allows an application to use SIP service -->
-    <permission android:name="android.permission.USE_SIP"
-        android:permissionGroup="android.permission-group.PHONE_CALLS"
-        android:protectionLevel="dangerous"
-        android:description="@string/permdesc_use_sip"
-        android:label="@string/permlab_use_sip" />
-
     <!-- ================================== -->
     <!-- Permissions for sdcard interaction -->
     <!-- ================================== -->
@@ -903,17 +687,14 @@
     <!-- Group of permissions that are related to SD card access. -->
     <permission-group android:name="android.permission-group.STORAGE"
         android:label="@string/permgrouplab_storage"
-        android:icon="@drawable/perm_group_storage"
-        android:description="@string/permgroupdesc_storage"
-        android:permissionGroupFlags="personalInfo"
-        android:priority="240" />
+        android:description="@string/permgroupdesc_storage" />
 
     <!-- Allows an application to read from external storage -->
     <permission android:name="android.permission.READ_EXTERNAL_STORAGE"
-        android:permissionGroup="android.permission-group.STORAGE"
+        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
         android:label="@string/permlab_sdcardRead"
         android:description="@string/permdesc_sdcardRead"
-        android:protectionLevel="dangerous" />
+        android:protectionLevel="normal" />
 
     <!-- Allows an application to write to external storage -->
     <permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
@@ -930,44 +711,45 @@
         android:description="@string/permdesc_mediaStorageWrite"
         android:protectionLevel="signature|system" />
 
-    <!-- ================================== -->
-    <!-- Permissions for screenlock         -->
-    <!-- ================================== -->
+    <!-- ============================================ -->
+    <!-- Permissions for low-level system interaction -->
+    <!-- ============================================ -->
     <eat-comment />
 
-    <!-- Group of permissions that are related to the screenlock. -->
-    <permission-group android:name="android.permission-group.SCREENLOCK"
-        android:label="@string/permgrouplab_storage"
-        android:icon="@drawable/perm_group_screenlock"
-        android:permissionGroupFlags="personalInfo"
-        android:description="@string/permgroupdesc_storage"
-        android:priority="230" />
+    <!-- Group of permissions that are related to system APIs.  Many
+         of these are not permissions the user will be expected to understand,
+         and such permissions should generally be marked as "normal" protection
+         level so they don't get displayed.  This can also, however, be used
+         for miscellaneous features that provide access to the operating system,
+         such as writing the global system settings. -->
+    <permission-group android:name="android.permission-group.SYSTEM_TOOLS"
+        android:label="@string/permgrouplab_systemTools"
+        android:description="@string/permgroupdesc_systemTools" />
 
-    <!-- Allows applications to disable the keyguard -->
-    <permission android:name="android.permission.DISABLE_KEYGUARD"
-        android:permissionGroup="android.permission-group.SCREENLOCK"
+    <!-- Allows an application to read or write the system settings. -->
+    <permission android:name="android.permission.WRITE_SETTINGS"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
         android:protectionLevel="dangerous"
-        android:description="@string/permdesc_disableKeyguard"
-        android:label="@string/permlab_disableKeyguard" />
+        android:label="@string/permlab_writeSettings"
+        android:description="@string/permdesc_writeSettings" />
 
-    <!-- ================================== -->
-    <!-- Permissions to access other installed applications  -->
-    <!-- ================================== -->
-    <eat-comment />
+    <!-- Allows an application to modify the Google service map. -->
+    <permission android:name="android.permission.WRITE_GSERVICES"
+        android:protectionLevel="signature|system"
+        android:label="@string/permlab_writeGservices"
+        android:description="@string/permdesc_writeGservices" />
 
-    <!-- Group of permissions that are related to the other applications
-         installed on the system.  Examples include such as listing
-         running apps, or killing background processes. -->
-    <permission-group android:name="android.permission-group.APP_INFO"
-        android:label="@string/permgrouplab_appInfo"
-        android:icon="@drawable/perm_group_app_info"
-        android:description="@string/permgroupdesc_appInfo"
-        android:priority="220" />
+    <!-- Allows an application to expand or collapse the status bar. -->
+    <permission android:name="android.permission.EXPAND_STATUS_BAR"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="normal"
+        android:label="@string/permlab_expandStatusBar"
+        android:description="@string/permdesc_expandStatusBar" />
 
     <!-- Allows an application to get information about the currently
          or recently running tasks. -->
     <permission android:name="android.permission.GET_TASKS"
-        android:permissionGroup="android.permission-group.APP_INFO"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_getTasks"
         android:description="@string/permdesc_getTasks" />
@@ -983,14 +765,14 @@
 
     <!-- Allows an application to change the Z-order of tasks -->
     <permission android:name="android.permission.REORDER_TASKS"
-        android:permissionGroup="android.permission-group.APP_INFO"
-        android:protectionLevel="normal"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
         android:label="@string/permlab_reorderTasks"
         android:description="@string/permdesc_reorderTasks" />
 
     <!-- @hide Allows an application to change to remove/kill tasks -->
     <permission android:name="android.permission.REMOVE_TASKS"
-        android:permissionGroup="android.permission-group.APP_INFO"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
         android:protectionLevel="signature"
         android:label="@string/permlab_removeTasks"
         android:description="@string/permdesc_removeTasks" />
@@ -1003,10 +785,25 @@
         android:label="@string/permlab_startAnyActivity"
         android:description="@string/permdesc_startAnyActivity" />
 
+    <!-- @hide Change the screen compatibility mode of applications -->
+    <permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="signature"
+        android:label="@string/permlab_setScreenCompatibility"
+        android:description="@string/permdesc_setScreenCompatibility" />
+
+    <!-- Allows an application to modify the current configuration, such
+         as locale. -->
+    <permission android:name="android.permission.CHANGE_CONFIGURATION"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_changeConfiguration"
+        android:description="@string/permdesc_changeConfiguration" />
+
     <!-- @deprecated The {@link android.app.ActivityManager#restartPackage}
         API is no longer supported. -->
     <permission android:name="android.permission.RESTART_PACKAGES"
-        android:permissionGroup="android.permission-group.APP_INFO"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
         android:protectionLevel="normal"
         android:label="@string/permlab_killBackgroundProcesses"
         android:description="@string/permdesc_killBackgroundProcesses" />
@@ -1014,199 +811,11 @@
     <!-- Allows an application to call
         {@link android.app.ActivityManager#killBackgroundProcesses}. -->
     <permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"
-        android:permissionGroup="android.permission-group.APP_INFO"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
         android:protectionLevel="normal"
         android:label="@string/permlab_killBackgroundProcesses"
         android:description="@string/permdesc_killBackgroundProcesses" />
 
-    <!-- ================================== -->
-    <!-- Permissions affecting the display of other applications  -->
-    <!-- ================================== -->
-    <eat-comment />
-
-    <!-- Group of permissions that allow manipulation of how
-         another application displays UI to the user. -->
-    <permission-group android:name="android.permission-group.DISPLAY"
-        android:label="@string/permgrouplab_display"
-        android:icon="@drawable/perm_group_display"
-        android:description="@string/permgroupdesc_display"
-        android:priority="190"/>
-
-    <!-- Allows an application to open windows using the type
-         {@link android.view.WindowManager.LayoutParams#TYPE_SYSTEM_ALERT},
-         shown on top of all other applications.  Very few applications
-         should use this permission; these windows are intended for
-         system-level interaction with the user. -->
-    <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
-        android:permissionGroup="android.permission-group.DISPLAY"
-        android:protectionLevel="dangerous"
-        android:label="@string/permlab_systemAlertWindow"
-        android:description="@string/permdesc_systemAlertWindow" />
-
-    <!-- ================================== -->
-    <!-- Permissions affecting the system wallpaper -->
-    <!-- ================================== -->
-    <eat-comment />
-
-    <!-- Group of permissions that allow manipulation of how
-         another application displays UI to the user. -->
-    <permission-group android:name="android.permission-group.WALLPAPER"
-        android:label="@string/permgrouplab_wallpaper"
-        android:icon="@drawable/perm_group_wallpaper"
-        android:description="@string/permgroupdesc_wallpaper"
-        android:priority="150" />
-
-    <!-- Allows applications to set the wallpaper -->
-    <permission android:name="android.permission.SET_WALLPAPER"
-        android:permissionGroup="android.permission-group.WALLPAPER"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_setWallpaper"
-        android:description="@string/permdesc_setWallpaper" />
-
-    <!-- Allows applications to set the wallpaper hints -->
-    <permission android:name="android.permission.SET_WALLPAPER_HINTS"
-        android:permissionGroup="android.permission-group.WALLPAPER"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_setWallpaperHints"
-        android:description="@string/permdesc_setWallpaperHints" />
-
-    <!-- ============================================ -->
-    <!-- Permissions for changing the system clock -->
-    <!-- ============================================ -->
-    <eat-comment />
-
-    <!-- Group of permissions that are related to system clock. -->
-    <permission-group android:name="android.permission-group.SYSTEM_CLOCK"
-        android:label="@string/permgrouplab_systemClock"
-        android:icon="@drawable/perm_group_system_clock"
-        android:description="@string/permgroupdesc_systemClock"
-        android:priority="140" />
-
-    <!-- Allows applications to set the system time -->
-    <permission android:name="android.permission.SET_TIME"
-        android:protectionLevel="signature|system"
-        android:label="@string/permlab_setTime"
-        android:description="@string/permdesc_setTime" />
-
-    <!-- Allows applications to set the system time zone -->
-    <permission android:name="android.permission.SET_TIME_ZONE"
-        android:permissionGroup="android.permission-group.SYSTEM_CLOCK"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_setTimeZone"
-        android:description="@string/permdesc_setTimeZone" />
-
-    <!-- ==================================================== -->
-    <!-- Permissions related to changing status bar   -->
-    <!-- ==================================================== -->
-
-    <!-- Used for permissions that change the status bar -->
-    <permission-group android:name="android.permission-group.STATUS_BAR"
-        android:label="@string/permgrouplab_statusBar"
-        android:icon="@drawable/perm_group_status_bar"
-        android:description="@string/permgroupdesc_statusBar"
-        android:priority="110" />
-
-    <!-- Allows an application to expand or collapse the status bar. -->
-    <permission android:name="android.permission.EXPAND_STATUS_BAR"
-        android:permissionGroup="android.permission-group.STATUS_BAR"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_expandStatusBar"
-        android:description="@string/permdesc_expandStatusBar" />
-
-    <!-- ==================================================== -->
-    <!-- Permissions related to accessing sync settings   -->
-    <!-- ==================================================== -->
-
-    <!-- Used for permissions that access the sync settings or sync
-         related information. -->
-    <permission-group android:name="android.permission-group.SYNC_SETTINGS"
-        android:label="@string/permgrouplab_syncSettings"
-        android:icon="@drawable/perm_group_sync_settings"
-        android:description="@string/permgroupdesc_syncSettings"
-        android:priority="120" />
-
-    <!-- Allows applications to read the sync settings -->
-    <permission android:name="android.permission.READ_SYNC_SETTINGS"
-        android:permissionGroup="android.permission-group.SYNC_SETTINGS"
-        android:protectionLevel="normal"
-        android:description="@string/permdesc_readSyncSettings"
-        android:label="@string/permlab_readSyncSettings" />
-
-    <!-- Allows applications to write the sync settings -->
-    <permission android:name="android.permission.WRITE_SYNC_SETTINGS"
-        android:permissionGroup="android.permission-group.SYNC_SETTINGS"
-        android:protectionLevel="normal"
-        android:description="@string/permdesc_writeSyncSettings"
-        android:label="@string/permlab_writeSyncSettings" />
-
-    <!-- Allows applications to read the sync stats -->
-    <permission android:name="android.permission.READ_SYNC_STATS"
-        android:permissionGroup="android.permission-group.SYNC_SETTINGS"
-        android:protectionLevel="normal"
-        android:description="@string/permdesc_readSyncStats"
-        android:label="@string/permlab_readSyncStats" />
-
-
-    <!-- ============================================ -->
-    <!-- Permissions for low-level system interaction -->
-    <!-- ============================================ -->
-    <eat-comment />
-
-    <!-- Group of permissions that are related to system APIs.  Many
-         of these are not permissions the user will be expected to understand,
-         and such permissions should generally be marked as "normal" protection
-         level so they don't get displayed.  This can also, however, be used
-         for miscellaneous features that provide access to the operating system,
-         such as writing the global system settings. -->
-    <permission-group android:name="android.permission-group.SYSTEM_TOOLS"
-        android:label="@string/permgrouplab_systemTools"
-        android:icon="@drawable/perm_group_system_tools"
-        android:description="@string/permgroupdesc_systemTools"
-        android:priority="100" />
-
-    <!-- @hide Change the screen compatibility mode of applications -->
-    <permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
-        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="signature"
-        android:label="@string/permlab_setScreenCompatibility"
-        android:description="@string/permdesc_setScreenCompatibility" />
-
-    <!-- Allows an application to modify the current configuration, such
-         as locale. -->
-    <permission android:name="android.permission.CHANGE_CONFIGURATION"
-        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="signature|system|development"
-        android:label="@string/permlab_changeConfiguration"
-        android:description="@string/permdesc_changeConfiguration" />
-
-    <!-- Allows an application to read or write the system settings. -->
-    <permission android:name="android.permission.WRITE_SETTINGS"
-        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="normal"
-        android:label="@string/permlab_writeSettings"
-        android:description="@string/permdesc_writeSettings" />
-
-    <!-- Allows an application to modify the Google service map. -->
-    <permission android:name="android.permission.WRITE_GSERVICES"
-        android:protectionLevel="signature|system"
-        android:label="@string/permlab_writeGservices"
-        android:description="@string/permdesc_writeGservices" />
-
-    <!-- @hide Change the screen compatibility mode of applications -->
-    <permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
-        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="signature"
-        android:label="@string/permlab_setScreenCompatibility"
-        android:description="@string/permdesc_setScreenCompatibility" />
-
-    <!-- Allows an application to modify the current configuration, such
-         as locale. -->
-    <permission android:name="android.permission.CHANGE_CONFIGURATION"
-        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="system|signature"
-        android:label="@string/permlab_changeConfiguration"
-        android:description="@string/permdesc_changeConfiguration" />
-
     <!-- Allows an application to call
         {@link android.app.ActivityManager#forceStopPackage}.
         @hide -->
@@ -1224,6 +833,17 @@
         android:label="@string/permlab_retrieve_window_content"
         android:description="@string/permdesc_retrieve_window_content" />
 
+    <!-- Allows an application to open windows using the type
+         {@link android.view.WindowManager.LayoutParams#TYPE_SYSTEM_ALERT},
+         shown on top of all other applications.  Very few applications
+         should use this permission; these windows are intended for
+         system-level interaction with the user. -->
+    <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_systemAlertWindow"
+        android:description="@string/permdesc_systemAlertWindow" />
+
     <!-- Modify the global animation scaling factor. -->
     <permission android:name="android.permission.SET_ANIMATION_SCALE"
         android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -1235,7 +855,7 @@
          not use. Allow an application to make its activities persistent. -->
     <permission android:name="android.permission.PERSISTENT_ACTIVITY"
         android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="normal"
+        android:protectionLevel="dangerous"
         android:label="@string/permlab_persistentActivity"
         android:description="@string/permdesc_persistentActivity" />
 
@@ -1282,17 +902,52 @@
         android:label="@string/permlab_broadcastSticky"
         android:description="@string/permdesc_broadcastSticky" />
 
+    <!-- Allows using PowerManager WakeLocks to keep processor from sleeping or screen
+         from dimming -->
+    <permission android:name="android.permission.WAKE_LOCK"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_wakeLock"
+        android:description="@string/permdesc_wakeLock" />
+
+    <!-- Allows applications to set the wallpaper -->
+    <permission android:name="android.permission.SET_WALLPAPER"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="normal"
+        android:label="@string/permlab_setWallpaper"
+        android:description="@string/permdesc_setWallpaper" />
+
+    <!-- Allows applications to set the wallpaper hints -->
+    <permission android:name="android.permission.SET_WALLPAPER_HINTS"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="normal"
+        android:label="@string/permlab_setWallpaperHints"
+        android:description="@string/permdesc_setWallpaperHints" />
+
+    <!-- Allows applications to set the system time -->
+    <permission android:name="android.permission.SET_TIME"
+        android:protectionLevel="signature|system"
+        android:label="@string/permlab_setTime"
+        android:description="@string/permdesc_setTime" />
+
+    <!-- Allows applications to set the system time zone -->
+    <permission android:name="android.permission.SET_TIME_ZONE"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_setTimeZone"
+        android:description="@string/permdesc_setTimeZone" />
+
     <!-- Allows mounting and unmounting file systems for removable storage. -->
     <permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
         android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="system|signature"
+        android:protectionLevel="dangerous"
         android:label="@string/permlab_mount_unmount_filesystems"
         android:description="@string/permdesc_mount_unmount_filesystems" />
 
     <!-- Allows formatting file systems for removable storage. -->
     <permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS"
         android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="system|signature"
+        android:protectionLevel="dangerous"
         android:label="@string/permlab_mount_format_filesystems"
         android:description="@string/permdesc_mount_format_filesystems" />
 
@@ -1336,6 +991,34 @@
         android:label="@string/permlab_asec_rename"
         android:description="@string/permdesc_asec_rename" />
 
+    <!-- Allows applications to disable the keyguard -->
+    <permission android:name="android.permission.DISABLE_KEYGUARD"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_disableKeyguard"
+        android:label="@string/permlab_disableKeyguard" />
+
+    <!-- Allows applications to read the sync settings -->
+    <permission android:name="android.permission.READ_SYNC_SETTINGS"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="normal"
+        android:description="@string/permdesc_readSyncSettings"
+        android:label="@string/permlab_readSyncSettings" />
+
+    <!-- Allows applications to write the sync settings -->
+    <permission android:name="android.permission.WRITE_SYNC_SETTINGS"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_writeSyncSettings"
+        android:label="@string/permlab_writeSyncSettings" />
+
+    <!-- Allows applications to read the sync stats -->
+    <permission android:name="android.permission.READ_SYNC_STATS"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="normal"
+        android:description="@string/permdesc_readSyncStats"
+        android:label="@string/permlab_readSyncStats" />
+
     <!-- Allows applications to write the apn settings -->
     <permission android:name="android.permission.WRITE_APN_SETTINGS"
                 android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -1359,10 +1042,41 @@
     <!-- Allows applications to change network connectivity state -->
     <permission android:name="android.permission.CHANGE_NETWORK_STATE"
         android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
-        android:protectionLevel="normal"
+        android:protectionLevel="dangerous"
         android:description="@string/permdesc_changeNetworkState"
         android:label="@string/permlab_changeNetworkState" />
 
+    <!-- Allows applications to change Wi-Fi connectivity state -->
+    <permission android:name="android.permission.CHANGE_WIFI_STATE"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_changeWifiState"
+        android:label="@string/permlab_changeWifiState" />
+
+
+    <!-- @hide -->
+    <permission android:name="android.permission.CHANGE_WIMAX_STATE"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_changeWimaxState"
+        android:label="@string/permlab_changeWimaxState" />
+
+
+
+    <!-- Allows applications to enter Wi-Fi Multicast mode -->
+    <permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_changeWifiMulticastState"
+        android:label="@string/permlab_changeWifiMulticastState" />
+
+    <!-- Allows applications to discover and pair bluetooth devices -->
+    <permission android:name="android.permission.BLUETOOTH_ADMIN"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_bluetoothAdmin"
+        android:label="@string/permlab_bluetoothAdmin" />
+
     <!-- Allows an application to clear the caches of all installed
          applications on the device.  -->
     <permission android:name="android.permission.CLEAR_APP_CACHE"
@@ -1389,8 +1103,7 @@
          purposes. -->
     <permission-group android:name="android.permission-group.DEVELOPMENT_TOOLS"
         android:label="@string/permgrouplab_developmentTools"
-        android:description="@string/permgroupdesc_developmentTools"
-        android:priority="310" />
+        android:description="@string/permgroupdesc_developmentTools" />
 
     <!-- Allows an application to read or write the secure system settings. -->
     <permission android:name="android.permission.WRITE_SECURE_SETTINGS"
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo1.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo1.png
index bf3cabb..7efb94f 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo1.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo2.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo2.png
index c4f00be..00e6879 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo2.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo3.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo3.png
index 935e44f..3ffcd68 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo3.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo4.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo4.png
index 03ae28b..a5e94f7 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo4.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo5.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo5.png
index b68981f..dfdeba3 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo5.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo6.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo6.png
index 678b772..5b02b13 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo6.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo7.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo7.png
index 0aeb0a6..815f31b 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo7.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo8.png b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo8.png
index 1bd7312..936794c 100644
--- a/core/res/res/drawable-hdpi/progressbar_indeterminate_holo8.png
+++ b/core/res/res/drawable-hdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo1.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo1.png
index 1e5d956..5a9dec3 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo1.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo2.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo2.png
index d0c0200..184b280 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo2.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo3.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo3.png
index bfdc5ea..96f0644 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo3.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo4.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo4.png
index 1440bc8..2393a2c 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo4.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo5.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo5.png
index 4f645fa8..4c1d60d 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo5.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo6.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo6.png
index 21966fd..cb89d16 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo6.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo7.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo7.png
index 7ca15ed..a4f843a 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo7.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo8.png b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo8.png
index 369d0ac..ea1ee05 100644
--- a/core/res/res/drawable-mdpi/progressbar_indeterminate_holo8.png
+++ b/core/res/res/drawable-mdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo1.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
index ca24502..f541e32 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo2.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
index 5653118..4c3f686 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo3.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
index 438b1b5..42ccc49 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo4.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
index efe3fed..e5f0cd3 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo5.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
index cb7931c..415494b 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo6.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
index 8ff7ee9..297d7b7 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo7.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
index ce07298..ba152f2 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo8.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
index 87e9d8f..b996b94 100644
--- a/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/core/res/res/drawable/ic_lockscreen_search.xml b/core/res/res/drawable/ic_lockscreen_search.xml
index 4040153..d7a5b00 100644
--- a/core/res/res/drawable/ic_lockscreen_search.xml
+++ b/core/res/res/drawable/ic_lockscreen_search.xml
@@ -31,6 +31,6 @@
         android:state_enabled="true"
         android:state_active="false"
         android:state_focused="true"
-        android:drawable="@drawable/ic_lockscreen_google_activated" />
+        android:drawable="@drawable/ic_lockscreen_google_focused" />
 
 </selector>
diff --git a/core/res/res/layout/app_permission_item.xml b/core/res/res/layout/app_permission_item.xml
index c448bd1..1bd267f 100644
--- a/core/res/res/layout/app_permission_item.xml
+++ b/core/res/res/layout/app_permission_item.xml
@@ -19,33 +19,37 @@
   Contains the group name and a list of permission labels under the group.
 -->
 
-<view class="android.widget.AppSecurityPermissions$PermissionItemView"
+<RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:background="?android:attr/selectableItemBackground">
+    android:layout_height="wrap_content">
 
     <ImageView
         android:id="@+id/perm_icon"
-        android:layout_width="32dp"
-        android:layout_height="32dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginRight="8dp"
+        android:layout_width="30dip"
+        android:layout_height="30dip"
+        android:layout_alignParentLeft="true" 
         android:scaleType="fitCenter" />
 
-    <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:background="?android:attr/dividerVertical" />
 
     <TextView
-        android:id="@+id/perm_name"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:textSize="16sp"
-        android:layout_marginLeft="8dp"
+        android:id="@+id/permission_group"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textStyle="bold"
+        android:paddingLeft="6dip"
+        android:layout_toRightOf="@id/perm_icon"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top|left" />
+        android:layout_height="wrap_content" />
 
-</view>
+    <TextView
+        android:id="@+id/permission_list"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:layout_marginTop="-4dip"
+        android:paddingBottom="8dip"
+        android:paddingLeft="6dip"
+        android:layout_below="@id/permission_group"
+        android:layout_toRightOf="@id/perm_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+</RelativeLayout>
diff --git a/core/res/res/layout/app_perms_summary.xml b/core/res/res/layout/app_perms_summary.xml
index 509c502..3f99dde 100755
--- a/core/res/res/layout/app_perms_summary.xml
+++ b/core/res/res/layout/app_perms_summary.xml
@@ -26,17 +26,79 @@
         android:id="@+id/no_permissions"
         android:text="@string/no_permissions"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:paddingLeft="8dp"
-        android:paddingRight="8dp"
+        android:paddingLeft="16dip"
+        android:paddingRight="12dip"
         android:visibility="gone"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content" />
 
-    <!-- Populated with all permissions. -->
+    <!-- List view containing list of dangerous permissions categorized by groups. -->
     <LinearLayout
-        android:id="@+id/perms_list"
+        android:id="@+id/dangerous_perms_list"
         android:orientation="vertical"
         android:layout_width="match_parent"
+        android:paddingLeft="16dip"
+        android:paddingRight="12dip"
+        android:layout_height="wrap_content" />
+
+    <!-- Clickable area letting user display additional permissions. -->
+    <LinearLayout
+        android:id="@+id/show_more"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone"
+        android:layout_marginTop="12dip"
+        android:layout_marginBottom="16dip">
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dip"
+            android:background="?android:attr/listDivider" />
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingTop="16dip"
+            android:paddingBottom="12dip"
+            android:paddingLeft="16dip"
+            android:duplicateParentState="true"
+            android:background="?android:attr/selectableItemBackground">
+
+            <TextView
+                android:id="@+id/show_more_text"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:duplicateParentState="true"
+                android:layout_alignTop="@+id/show_more_icon"
+                android:layout_gravity="center_vertical"
+                android:paddingLeft="36dip"
+                android:layout_weight="1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content" />
+
+            <ImageView
+                android:id="@id/show_more_icon"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="12dip" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dip"
+            android:background="?android:attr/listDivider" />
+
+    </LinearLayout>
+
+    <!-- List view containing list of permissions that aren't dangerous. -->
+    <LinearLayout
+        android:id="@+id/non_dangerous_perms_list"
+        android:orientation="vertical"
+        android:paddingLeft="16dip"
+        android:paddingRight="12dip"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content" />
 
 </LinearLayout>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index ca5d5f6..62c1723 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Выдаліць запыт"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Адправіць запыт"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Галасавы пошук"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Уключыць функцыю Explore by Touch?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"Служба доступу <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> запытвае ўключэнне функцыі Explore by Touch. Калі функцыя Explore by Touch будзе ўключаная, вы зможаце пачуць або ўбачыць апісанні таго, што знаходзіцца пад вашым пальцам, або выконваць жэсты для ўзаемадзеяння з планшэтам."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Служба доступу <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> запытвае ўключэнне функцыі Explore by Touch. Калі функцыя Explore by Touch будзе ўключаная, вы зможаце пачуць або ўбачыць апісанні таго, што знаходзіцца пад вашым пальцам, або выконваць жэсты для ўзаемадзеяння з тэлефонам."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 месяц таму"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Раней, чым 1 месяц таму"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Наладзіць метады ўводу"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Фізічная клавіятура"</string>
     <string name="hardware" msgid="7517821086888990278">"Апар. ср."</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Выбраць раскладку клавіятуры"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Націсніце, каб выбраць раскладку клавіятуры."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" АБВГДЕЁЖЗІЙКЛМНОПРСТУЎФХЦЧШ\'ЫЬЭЮЯ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"кандыдат."</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Запусцiць браўзер?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Прыняць выклік?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Заўсёды"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Толькі адзін раз"</string>
 </resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 98c7ac5..e33bda8 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Smazat dotaz"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Odeslat dotaz"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Hlasové vyhledávání"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Povolit funkci Prozkoumání dotykem?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolení funkce Prozkoumání dotykem. Pokud je funkce Prozkoumání dotykem zapnuta, můžete slyšet nebo vidět popisy objektů pod vaším prstem nebo ovládat tablet gesty."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolení funkce Prozkoumání dotykem. Pokud je funkce Prozkoumání dotykem zapnuta, můžete slyšet nebo vidět popisy objektů pod vaším prstem nebo ovládat telefon gesty."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"před 1 měsícem"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Déle než před 1 měsícem"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Nastavit metody zadávání"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fyzická klávesnice"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardware"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Výběr rozložení klávesnice"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Dotykem vyberte rozložení klávesnice."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidáti"</u></string>
@@ -1323,5 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Spustit prohlížeč?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Přijmout hovor?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
-    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Jen jednou"</string>
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Pouze jednou"</string>
 </resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index a326e2d..b76da67 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Anfrage löschen"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Anfrage senden"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Sprachsuche"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"\"Tippen &amp; Entdecken\" aktivieren?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> fordert die Aktivierung von \"Tippen &amp; Entdecken\". Wenn \"Tippen &amp; Entdecken\" aktiviert ist, können Sie Beschreibungen dessen hören oder sehen, was sich unter ihren Fingern befindet, oder Gesten ausführen, um mit dem Tablet zu interagieren."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> fordert die Aktivierung von \"Tippen &amp; Entdecken\". Wenn \"Tippen &amp; Entdecken\" aktiviert ist, können Sie Beschreibungen dessen hören oder sehen, was sich unter ihren Fingern befindet, oder Gesten ausführen, um mit dem Telefon zu interagieren."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"Vor 1 Monat"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Vor mehr als 1 Monat"</string>
   <plurals name="num_seconds_ago">
@@ -1009,7 +1006,7 @@
     <string name="smv_application" msgid="3307209192155442829">"Die App <xliff:g id="APPLICATION">%1$s</xliff:g> (Prozess <xliff:g id="PROCESS">%2$s</xliff:g>) hat gegen ihre selbsterzwungene StrictMode-Richtlinie verstoßen."</string>
     <string name="smv_process" msgid="5120397012047462446">"Der Prozess <xliff:g id="PROCESS">%1$s</xliff:g> hat gegen seine selbsterzwungene StrictMode-Richtlinie verstoßen."</string>
     <string name="android_upgrading_title" msgid="1584192285441405746">"Android wird aktualisiert..."</string>
-    <string name="android_upgrading_apk" msgid="7904042682111526169">"App <xliff:g id="NUMBER_0">%1$d</xliff:g> von <xliff:g id="NUMBER_1">%2$d</xliff:g> wird optimiert."</string>
+    <string name="android_upgrading_apk" msgid="7904042682111526169">"App <xliff:g id="NUMBER_0">%1$d</xliff:g> von <xliff:g id="NUMBER_1">%2$d</xliff:g> wird optimiert..."</string>
     <string name="android_upgrading_starting_apps" msgid="451464516346926713">"Apps werden gestartet."</string>
     <string name="android_upgrading_complete" msgid="1405954754112999229">"Start wird abgeschlossen..."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> läuft"</string>
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Eingabemethoden einrichten"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Physische Tastatur"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardware"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Tastaturlayout auswählen"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Zum Auswählen eines Tastaturlayouts berühren"</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"Kandidaten"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Browser starten?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Anruf annehmen?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Immer"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Nur einmal"</string>
 </resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index e53e3bc..043ee30 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -662,7 +662,7 @@
     <string name="phoneTypeWorkPager" msgid="649938731231157056">"Busca del trabajo"</string>
     <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistente"</string>
     <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
-    <string name="eventTypeCustom" msgid="7837586198458073404">"Personalizados"</string>
+    <string name="eventTypeCustom" msgid="7837586198458073404">"Personalizado"</string>
     <string name="eventTypeBirthday" msgid="2813379844211390740">"Cumpleaños"</string>
     <string name="eventTypeAnniversary" msgid="3876779744518284000">"Aniversario"</string>
     <string name="eventTypeOther" msgid="7388178939010143077">"Otros"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 1ec3a3e..d3d8e4f 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Tyhjennä kysely"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Lähetä kysely"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Puhehaku"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Otetaanko Tutki koskettamalla käyttöön?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> haluaa ottaa Tutki koskettamalla -ominaisuuden käyttöön. Kun Tutki koskettamalla on käytössä, näet tai kuulet kuvauksen sormen alla olevista kohteista ja voit käyttää tablet-laitetta sormieleiden avulla."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> haluaa ottaa Tutustu koskettamalla -ominaisuuden käyttöön. Kun Tutustu koskettamalla on käytössä, näet tai kuulet kuvauksen sormen alla olevista kohteista ja voit käyttää puhelinta sormieleiden avulla."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"kuukausi sitten"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Yli kuukausi sitten"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Määritä syöttötavat"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fyysinen näppäimistö"</string>
     <string name="hardware" msgid="7517821086888990278">"Laitteisto"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Valitse näppäimistöasettelu"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Kosketa ja valitse näppäimistöasettelu."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidaatit"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Käynnistetäänkö selain?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vastataanko puheluun?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Aina"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Vain kerran"</string>
 </resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index d7cb12c..0d96e6d 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Effacer la requête"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Envoyer la requête"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Recherche vocale"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Activer \"Explorer au toucher\" ?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec la tablette en effectuant certains gestes."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec le téléphone en effectuant certains gestes."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"Il y a 1 mois"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Il y a plus d\'un mois"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Configurer les modes de saisie"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Clavier physique"</string>
     <string name="hardware" msgid="7517821086888990278">"Matériel"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Sélectionnez la disposition du clavier"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Appuyez ici pour sélectionner une disposition de clavier."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"candidats"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Lancer le navigateur ?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prendre l\'appel ?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Toujours"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Une seule fois"</string>
 </resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 2a83a16..b0fd087 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"क्‍वेरी साफ़ करें"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"क्वेरी सबमिट करें"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"ध्वनि खोज"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"स्‍पर्श के द्वारा अन्‍वेषण करें सक्षम करें?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्‍पर्श के द्वारा अन्‍वेषण करें सक्षम करना चाहती है. स्‍पर्श के द्वारा अन्‍वेष करें चालू होने पर, आप अपनी अंगुली के नीचे क्या है उसका विवरण सुन सकते हैं या देख सकते हैं या टेबलेट से संवाद करने के लिए जेस्‍चर निष्‍पादित कर सकते हैं."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्‍पर्श के द्वारा अन्‍वेषण करें सक्षम करना चाहती है. स्‍पर्श के द्वारा अन्‍वेष करें चालू होने पर, आप अपनी अंगुली के नीचे क्या है उसका विवरण सुन सकते हैं या देख सकते हैं या फ़ोन से संवाद करने के लिए जेस्‍चर निष्‍पादित कर सकते हैं."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 माह पहले"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 माह से पहले"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"इनपुट पद्धतियां सेट करें"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"भौतिक कीबोर्ड"</string>
     <string name="hardware" msgid="7517821086888990278">"हार्डवेयर"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"कीबोर्ड लेआउट का चयन करें"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"कीबोर्ड लेआउट का चयन करने के लिए स्‍पर्श करें."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"उम्‍मीदवार"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"ब्राउज़र लॉन्च करें?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"कॉल स्वीकार करें?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"हमेशा"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"केवल एक बार"</string>
 </resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index d8bd15f..edb0032 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Izbriši upit"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Pošalji upit"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Glasovno pretraživanje"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Omogućiti Istraživanje dodirom?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"Usluga <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogućiti značajku Istraživanje dodirom. Kad je značajka Istraživanje dodirom uključena, možete čuti ili vidjeti opise onoga što je pod vašim prstom ili izvršiti pokrete za interakciju s tabletnim računalom."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Usluga <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogućiti značajku Istraživanje dodirom. Kad je značajka Istraživanje dodirom uključena, možete čuti ili vidjeti opise onoga što je pod vašim prstom ili izvršiti pokrete za interakciju s telefonom."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"Prije 1 mjesec"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Prije 1 mjesec"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Postavljanje načina unosa"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fizička tipkovnica"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardver"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Odaberite izgled tipkovnice"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Dodirnite za odabir izgleda tipkovnice."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidati"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Pokrenuti preglednik?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prihvatiti poziv?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Uvijek"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Samo jednom"</string>
 </resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 188f6d7..8334d44 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Lekérdezés törlése"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Lekérdezés küldése"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Hangalapú keresés"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Aktiválja a Felfedezés érintésselt?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> aktiválni szeretné a Felfedezés érintéssel funkciót. Amikor be van kapcsolva a Felfedezés érintéssel, akkor hallhatja vagy láthatja annak leírását, ami az ujja alatt van, illetve végrehajthat kézmozdulatokat a táblagép kezeléséhez."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> aktiválni szeretné a Felfedezés érintéssel funkciót. Amikor be van kapcsolva a Felfedezés érintéssel, akkor hallhatja vagy láthatja annak leírását, ami az ujja alatt van, illetve végrehajthat kézmozdulatokat a telefon kezeléséhez."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 hónapja"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Több mint 1 hónapja"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Beviteli módok beállítása"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fizikai billentyűzet"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardver"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Válasszon billentyűzetkiosztást"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Érintse meg az egyik billentyűzetkiosztás kiválasztásához."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"jelöltek"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Böngésző indítása?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Fogadja a hívást?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Mindig"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Csak egyszer"</string>
 </resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 604e163..2220454 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"検索キーワードを削除"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"検索キーワードを送信"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"音声検索"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"タッチガイドをONにしますか?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>がタッチガイドをONにしようとしています。タッチガイドをONにすると、指の位置にあるアイテムの説明を読み上げたり表示したりできます。また、タブレットを通常とは違うジェスチャーで操作できます。"</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>がタッチガイドをONにしようとしています。タッチガイドをONにすると、指の位置にあるアイテムの説明を読み上げたり表示したりできます。また、携帯端末を通常とは違うジェスチャーで操作できます。"</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1か月前"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1か月前"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"入力方法をセットアップ"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"物理キーボード"</string>
     <string name="hardware" msgid="7517821086888990278">"ハードウェア"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"キーボードレイアウトの選択"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"タップしてキーボードレイアウトを選択してください。"</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"候補"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"ブラウザを起動しますか?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"通話を受けますか?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"常時"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"1回のみ"</string>
 </resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 6ed825f..c7e818d 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Slett søket"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Send inn spørsmål"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Talesøk"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Aktivere Utforsk ved å trykke?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ber om aktivering av Utforsk ved å trykke. Når Utforsk ved å trykke er slått på, kan du høre og se beskrivelser av det som er under fingrene dine. Du kan også utføre handlinger på nettbrettet ved hjelp av bevegelser."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ber om aktivering av Utforsk ved å trykke. Når Utforsk ved å trykke er slått på, kan du høre eller se beskrivelser av det som er under fingrene dine. Du kan også utføre handlinger på nettbrettet ved hjelp av bevegelser."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"For én måned siden"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"For over en måned siden"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Konfigurer inndatametoder"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fysisk tastatur"</string>
     <string name="hardware" msgid="7517821086888990278">"Maskinvare"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Velg tastaturoppsett"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Trykk for å velge et tastaturoppsett"</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string>
     <string name="candidates_style" msgid="4333913089637062257">"TAG_FONT"<u>"kandidater"</u>"CLOSE_FONT"</string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Vil du starte nettleseren?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vil du besvare anropet?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alltid"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Bare én gang"</string>
 </resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index b92c38c..857e655 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Zoekopdracht wissen"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Zoekopdracht verzenden"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Spraakgestuurd zoeken"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"\'Verkennen via aanraking\' aan?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil \'Verkennen via aanraking\' inschakelen. Wanneer \'Verkennen via aanraking\' is ingeschakeld, kunt u beschrijvingen beluisteren of bekijken van wat er onder uw vinger staat of aanraakbewerkingen uitvoeren op de tablet."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil \'Verkennen via aanraking\' inschakelen. Wanneer \'Verkennen via aanraking\' is ingeschakeld, kunt u beschrijvingen beluisteren of bekijken van wat er onder uw vinger staat of aanraakbewerkingen uitvoeren op de telefoon."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 maand geleden"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Meer dan 1 maand geleden"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Invoermethoden instellen"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fysiek toetsenbord"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardware"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Toetsenbordindeling selecteren"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Tik om een ​​toetsenbordindeling te selecteren."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidaten"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Browser starten?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Oproep accepteren?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Altijd"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Eén keer"</string>
 </resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 6c5ea32..fdce9ea 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Jasný dopyt"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Odoslať dopyt"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Hlasové vyhľadávanie"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Povoliť Preskúmanie dotykom?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolenie funkcie Preskúmanie dotykom. Ak je funkcia Explore by Touch zapnutá, môžete počuť alebo vidieť popisy objektov pod vaším prstom alebo ovládať tablet gestami."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolenie funkcie Preskúmanie dotykom. Ak je funkcia Explore by Touch zapnutá, môžete počuť alebo vidieť popisy objektov pod vaším prstom alebo ovládať telefón gestami."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"pred 1 mesiacom"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Viac ako pred 1 mesiacom"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Nastavenie metód vstupu"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fyzická klávesnica"</string>
     <string name="hardware" msgid="7517821086888990278">"Hardvér"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Zvoľte rozloženie klávesnice"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Dotykom zvoľte rozloženie klávesnice."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" AÁÄBCČDĎDZDŽEÉFGHCHIÍJKLĽMNŇOÓÔPRŔSŠTŤUÚVWXYÝZŽ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidáti"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Spustiť prehliadač?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prijať hovor?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Len raz"</string>
 </resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 049c1d8..b3929e2 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Izbris poizvedbe"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Pošlji poizvedbo"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Glasovno iskanje"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Vklop raziskovanja z dotikom?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"Storitev <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogočiti raziskovanje z dotikom. Ko je raziskovanje z dotikom vklopljeno, lahko slišite ali vidite opise tega, kar je pod vašim prstom, ali izvajate poteze za interakcijo s tabličnim računalnikom."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Storitev <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogočiti raziskovanje z dotikom. Ko je raziskovanje z dotikom vklopljeno, lahko slišite ali vidite opise tega, kar je pod vašim prstom, ali izvajate poteze za interakcijo s telefonom."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"Pred 1 mesecem"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Pred več kot 1 mesecem"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Nastavi načine vnosa"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fizična tipkovnica"</string>
     <string name="hardware" msgid="7517821086888990278">"Strojna oprema"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Izberite razporeditev tipkovnice"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Dotaknite se, da izberete razporeditev tipkovnice"</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"kandidati"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Ali želite odpreti brskalnik?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Ali želite sprejeti klic?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vedno"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Samo tokrat"</string>
 </resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index fa7da01..5438262 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Обриши упит"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Пошаљи упит"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Гласовна претрага"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Желите да омог. Истражив. додиром?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> жели да омогући Истраживање додиром. Када је Истраживање додиром укључено, можете да чујете или видите описе ставке на коју сте ставили прст или да комуницирате са таблетом помоћу покрета."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> жели да омогући Истраживање додиром. Када је Истраживање додиром укључено, можете да чујете или видите описе ставке на коју сте ставили прст или да комуницирате са телефоном помоћу покрета."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"Пре месец дана"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Пре месец дана"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Подеси методе уноса"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Физичка тастатура"</string>
     <string name="hardware" msgid="7517821086888990278">"Хардвер"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Избор распореда тастатуре"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Додирните да бисте изабрали распоред тастатуре."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"кандидати"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Желите ли да покренете прегледач?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Желите ли да прихватите позив?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Увек"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Само једном"</string>
 </resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index f2430c2..2beeb39 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"Sorguyu temizle"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"Sorguyu gönder"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"Sesli arama"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"Dokunarak Keşfet etkinleştirilsin mi?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> Dokunarak Keşfet özelliğini etkinleştirmek istiyor. Dokunarak Keşfet açık olduğunda, parmağınızın altındaki öğelere ait açıklamaları duyabilir veya görebilir ya da tabletle etkileşimde bulunmak için ilgili hareketleri yapabilirsiniz."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>, Dokunarak Keşfet özelliğini etkinleştirmek istiyor. Dokunarak Keşfet açık olduğunda parmağınızın altındaki öğelere ait açıklamaları duyabilir veya görebilir ya da telefonla etkileşimde bulunmak için ilgili hareketleri yapabilirsiniz."</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ay önce"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ay önce"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"Giriş yöntemlerini ayarla"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"Fiziksel klavye"</string>
     <string name="hardware" msgid="7517821086888990278">"Donanım"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"Bir klavye düzeni seç"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"Bir klavye düzeni seçmek için dokunun."</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"adaylar"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"Tarayıcı Başlatılsın mı?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"Çağrı kabul edilsin mi?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Her zaman"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"Yalnızca bir defa"</string>
 </resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 2c6a4ed..3df0de5 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -855,12 +855,9 @@
     <string name="searchview_description_clear" msgid="1330281990951833033">"清除查詢"</string>
     <string name="searchview_description_submit" msgid="2688450133297983542">"提交查詢"</string>
     <string name="searchview_description_voice" msgid="2453203695674994440">"語音搜尋"</string>
-    <!-- no translation found for enable_explore_by_touch_warning_title (7460694070309730149) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (8655887539089910577) -->
-    <skip />
-    <!-- no translation found for enable_explore_by_touch_warning_message (2708199672852373195) -->
-    <skip />
+    <string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"啟用輕觸探索?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指時顯示或朗讀說明,您也可以執行手勢來與平板電腦互動。"</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指輕觸螢幕上的物件時顯示或朗讀說明,您也可以執行手勢來與手機互動。"</string>
     <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 個月以前"</string>
     <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 個月前"</string>
   <plurals name="num_seconds_ago">
@@ -1127,10 +1124,8 @@
     <string name="configure_input_methods" msgid="9091652157722495116">"設定輸入法"</string>
     <string name="use_physical_keyboard" msgid="6203112478095117625">"實體鍵盤"</string>
     <string name="hardware" msgid="7517821086888990278">"硬體"</string>
-    <!-- no translation found for select_keyboard_layout_notification_title (1407367017263030773) -->
-    <skip />
-    <!-- no translation found for select_keyboard_layout_notification_message (4465907700449257063) -->
-    <skip />
+    <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"選取鍵盤配置"</string>
+    <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"輕觸即可選取鍵盤配置。"</string>
     <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="candidates_style" msgid="4333913089637062257"><u>"待選項目"</u></string>
@@ -1323,6 +1318,5 @@
     <string name="launchBrowserDefault" msgid="2057951947297614725">"啟動「瀏覽器」嗎?"</string>
     <string name="SetupCallDefault" msgid="5834948469253758575">"接聽電話嗎?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"一律採用"</string>
-    <!-- no translation found for activity_resolver_use_once (2404644797149173758) -->
-    <skip />
+    <string name="activity_resolver_use_once" msgid="2404644797149173758">"僅限一次"</string>
 </resources>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index f24733c..f971d39 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -199,7 +199,7 @@
         <flag name="development" value="0x20" />
     </attr>
 
-    <!-- Flags indicating more context for a permission group. -->
+    <!-- Flags indicating more context for a permission group. @hide -->
     <attr name="permissionGroupFlags">
         <!-- Set to indicate that this permission group contains permissions
              protecting access to some information that is considered
@@ -903,7 +903,6 @@
         <attr name="icon" />
         <attr name="logo" />
         <attr name="description" />
-        <attr name="permissionGroupFlags" />
         <attr name="priority" />
     </declare-styleable>
     
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index bf9fe42..51be22d 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -123,9 +123,12 @@
   <java-symbol type="id" name="package_label" />
   <java-symbol type="id" name="packages_list" />
   <java-symbol type="id" name="pause" />
-  <java-symbol type="id" name="perms_list" />
+  <java-symbol type="id" name="show_more" />
   <java-symbol type="id" name="perm_icon" />
-  <java-symbol type="id" name="perm_name" />
+  <java-symbol type="id" name="show_more_icon" />
+  <java-symbol type="id" name="show_more_text" />
+  <java-symbol type="id" name="dangerous_perms_list" />
+  <java-symbol type="id" name="non_dangerous_perms_list" />
   <java-symbol type="id" name="permission_group" />
   <java-symbol type="id" name="permission_list" />
   <java-symbol type="id" name="pickers" />
@@ -660,6 +663,10 @@
   <java-symbol type="string" name="passwordIncorrect" />
   <java-symbol type="string" name="perms_description_app" />
   <java-symbol type="string" name="perms_new_perm_prefix" />
+  <java-symbol type="string" name="perms_hide" />
+  <java-symbol type="string" name="perms_show_all" />
+  <java-symbol type="string" name="default_permission_group" />
+  <java-symbol type="string" name="permissions_format" />
   <java-symbol type="string" name="petabyteShort" />
   <java-symbol type="string" name="phoneTypeAssistant" />
   <java-symbol type="string" name="phoneTypeCallback" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 65457b3..d7386fa 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -390,12 +390,11 @@
     <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgrouplab_personalInfo">Your personal information</string>
     <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_personalInfo">Direct access to information about you, stored in on your contact card.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_socialInfo">Your social information</string>
+    <string name="permgroupdesc_personalInfo" product="tablet">Direct access to your contacts
+        and calendar stored on the tablet.</string>
     <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_socialInfo">Direct access to information about your contacts and social connections.</string>
+    <string name="permgroupdesc_personalInfo" product="default">Direct access to your contacts
+        and calendar stored on the phone.</string>
 
     <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgrouplab_location">Your location</string>
@@ -408,91 +407,6 @@
     <string name="permgroupdesc_network">Access various network features.</string>
 
     <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_bluetoothNetwork">Bluetooth</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_bluetoothNetwork">Access devices and networks through Bluetooth.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_shortrangeNetwork">Short-range Networks</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_shortrangeNetwork">Access devices through short-range networks such as NFC.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_audioSettings">Audio Settings</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_audioSettings">Change audio settings.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_affectsBattery">Affects Battery</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_affectsBattery">Use features that can quickly drain battery.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_calendar">Calendar</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_calendar">Direct access to calendar and events.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_dictionary">Read User Dictionary</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_dictionary">Read words in user dictionary.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_writeDictionary">Write User Dictionary</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_writeDictionary">Add words to the user dictionary.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_bookmarks">Bookmarks and History</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_bookmarks">Direct access to bookmarks and browser history.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_deviceAlarms">Alarm</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_deviceAlarms">Set the alarm clock.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_voicemail">Voicemail</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_voicemail">Direct access to voicemail.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_microphone">Microphone</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_microphone">Direct access to the microphone to record audio.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_camera">Camera</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_camera">Direct access to camera for image or video capture.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_appInfo">Your applications information</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_appInfo">Ability to affect behavior of other applications on your device.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_wallpaper">Wallpaper</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_wallpaper">Change the device wallpaper settings.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_systemClock">Clock</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_systemClock">Change the device time or timezone.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_statusBar">Status Bar</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_statusBar">Change the device status bar settings.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_syncSettings">Sync Settings</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_syncSettings">Access to the sync settings.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgrouplab_accounts">Your accounts</string>
     <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgroupdesc_accounts">Access the available accounts.</string>
@@ -518,11 +432,6 @@
     <string name="permgroupdesc_developmentTools">Features only needed for app developers.</string>
 
     <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgrouplab_display">Other Application UI</string>
-    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permgroupdesc_display">Effect the UI of other applications.</string>
-
-    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgrouplab_storage">Storage</string>
     <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this.   [CHAR LIMIT=30] -->
     <string name="permgroupdesc_storage" product="nosdcard">Access the USB storage.</string>
@@ -549,23 +458,23 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_processOutgoingCalls">reroute outgoing calls</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_processOutgoingCalls">Allows the app to
-        process outgoing calls and change the number to be dialed. Malicious
-        apps may monitor, redirect, or prevent outgoing calls.</string>
+    <string name="permdesc_processOutgoingCalls">Allows the app to process
+      outgoing calls and change the number to be dialed. This permission allows
+      the app to monitor, redirect, or prevent outgoing calls.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_receiveSms">receive text messages (SMS)</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_receiveSms">Allows the app to receive
-      and process SMS messages. Malicious apps may monitor
-      your messages or delete them without showing them to you.</string>
+    <string name="permdesc_receiveSms">Allows the app to receive and process SMS
+      messages. This means the app could monitor or delete messages sent to your
+      device without showing them to you.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_receiveMms">receive text messages (MMS)</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_receiveMms">Allows the app to receive
-      and process MMS messages. Malicious apps may monitor
-      your messages or delete them without showing them to you.</string>
+    <string name="permdesc_receiveMms">Allows the app to receive and process MMS
+      messages. This means the app could monitor or delete messages sent to your
+      device without showing them to you.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_receiveEmergencyBroadcast">receive emergency broadcasts</string>
@@ -586,27 +495,27 @@
      <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_sendSms">send SMS messages</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_sendSms">Allows the app to send SMS
-      messages. Malicious apps may cost you money by sending
-      messages without your confirmation.</string>
+    <string name="permdesc_sendSms">Allows the app to send SMS messages.
+     This may result in unexpected charges. Malicious apps may cost you money by
+     sending messages without your confirmation.</string>
 
      <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_sendSmsNoConfirmation">send SMS messages with no confirmation</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_sendSmsNoConfirmation">Allows the app to send SMS
-      messages. Malicious apps may cost you money by sending
-      messages without your confirmation.</string>
+      messages. This may result in unexpected charges. Malicious apps may cost
+      you money by sending messages without your confirmation.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readSms">read your text messages (SMS or MMS)</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readSms" product="tablet">Allows the app to read
-      SMS messages stored on your tablet or SIM card. Malicious apps
-      may read your confidential messages.</string>
+    <string name="permdesc_readSms" product="tablet">Allows the app to read SMS
+      messages stored on your tablet or SIM card. This allows the app to read all
+      SMS messages, regardless of content or confidentiality.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readSms" product="default">Allows the app to read
-      SMS messages stored on your phone or SIM card. Malicious apps
-      may read your confidential messages.</string>
+    <string name="permdesc_readSms" product="default">Allows the app to read SMS
+      messages stored on your phone or SIM card. This allows the app to read all
+      SMS messages, regardless of content or confidentiality.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeSms">edit your text messages (SMS or MMS)</string>
@@ -622,30 +531,30 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_receiveWapPush">receive text messages (WAP)</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_receiveWapPush">Allows the app to receive
-      and process WAP messages. Malicious apps may monitor
-      your messages or delete them without showing them to you.</string>
+    <string name="permdesc_receiveWapPush">Allows the app to receive and process
+     WAP messages.  This permission includes the ability to monitor or delete
+     messages sent to you without showing them to you.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_getTasks">retrieve running apps</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_getTasks">Allows the app to retrieve
-        information about currently and recently running tasks. Malicious apps may
-        discover private information about other apps.</string>
+
+    <string name="permdesc_getTasks">Allows the app to retrieve information
+       about currently and recently running tasks.  This may allow the app to
+       discover information about which applications are used on the device.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=50] -->
     <string name="permlab_getDetailedTasks">retrieve details of running apps</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
     <string name="permdesc_getDetailedTasks">Allows the app to retrieve
-        detailed information about currently and recently running tasks. Malicious apps may 
+        detailed information about currently and recently running tasks. Malicious apps may
         discover private information about other apps.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_reorderTasks">reorder running apps</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_reorderTasks">Allows the app to move
-        tasks to the foreground and background. Malicious apps may force
-        themselves to the front without your control.</string>
+    <string name="permdesc_reorderTasks">Allows the app to move tasks to the
+      foreground and background.  The app may do this without your input.</string>
 
     <!-- Title of an application permission, allowing an application to remove/kill tasks -->
     <string name="permlab_removeTasks">stop running apps</string>
@@ -689,9 +598,9 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_killBackgroundProcesses">close other apps</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_killBackgroundProcesses">Allows the app to
-        kill background processes of other apps, even if memory
-        isn\'t low.</string>
+    <string name="permdesc_killBackgroundProcesses">Allows the app to end
+      background processes of other apps.  This may cause other apps to stop
+      running.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_forceStopPackages">force stop other apps</string>
@@ -804,9 +713,9 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_systemAlertWindow">draw over other apps</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_systemAlertWindow">Allows the app to
-        show system alert windows. Malicious apps may take over the
-        entire screen.</string>
+    <string name="permdesc_systemAlertWindow">Allows the app to show system
+      alert windows.  Some alert windows may take over the entire screen.
+      </string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_setAnimationScale">modify global animation speed</string>
@@ -910,9 +819,8 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_persistentActivity">make app always run</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_persistentActivity">Allows the app to make
-        parts of itself persistent, so the system can\'t use it for other
-        apps.</string>
+    <string name="permdesc_persistentActivity" product="tablet">Allows the app to make parts of itself persistent in memory.  This can limit memory available to other apps slowing down the tablet.</string>
+    <string name="permdesc_persistentActivity" product="default">Allows the app to make parts of itself persistent in memory.  This can limit memory available to other apps slowing down the phone.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_deletePackages">delete apps</string>
@@ -1049,56 +957,60 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_broadcastSticky">send sticky broadcast</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_broadcastSticky" product="tablet">Allows the app to send
-        sticky broadcasts, which remain after the broadcast ends.
-        Malicious apps may make the tablet slow or unstable by causing it
-        to use too much memory.</string>
+    <string name="permdesc_broadcastSticky" product="tablet">Allows the app to
+    send sticky broadcasts, which remain after the broadcast ends. Excessive use
+    may make the tablet slow or unstable by causing it to use too much memory.
+    </string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_broadcastSticky" product="default">Allows the app to send
-        sticky broadcasts, which remain after the broadcast ends.
-        Malicious apps may make the phone slow or unstable by causing it
-        to use too much memory.</string>
+    <string name="permdesc_broadcastSticky" product="default">Allows the app to
+    send sticky broadcasts, which remain after the broadcast ends. Excessive
+    use may make the phone slow or unstable by causing it to use too
+    much memory.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readContacts">read your contacts</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readContacts" product="tablet">Allows the app to read all
-        the data about your contacts stored on your tablet, including the frequency
-        with which you\'ve called, emailed, or communicated in other ways with specific
-        individuals. This helps with auto-completion of email addresses and other convenient
-        features. Malicious apps can use this permission to send your contact data to
-        other people.</string>
+    <string name="permdesc_readContacts" product="tablet">Allows the app to read
+      data about your contacts stored on your tablet, including the frequency
+      with which you\'ve called, emailed, or communicated in other ways with
+      specific individuals. This permission allows apps to save your contact
+      data, and malicious apps may share contact data without your
+      knowledge.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readContacts" product="default">Allows the app to read all
-        the data about your contacts stored on your phone, including the frequency
-        with which you\'ve called, emailed, or communicated in other ways with specific
-        individuals. This helps with auto-completion of email addresses and other convenient
-        features. Malicious apps can use this permission to send your contact data to
-        other people.</string>
+    <string name="permdesc_readContacts" product="default">Allows the app to
+      read data about your contacts stored on your phone, including the
+      frequency with which you\'ve called, emailed, or communicated in other ways
+      with specific individuals. This permission allows apps to save your
+      contact data, and malicious apps may share contact data without your
+      knowledge.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeContacts">modify your contacts</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeContacts" product="tablet">Allows the app to modify
-        the data about your contacts stored on your tablet, including the frequency
-        with which you\'ve called, emailed, or communicated in other ways with specific
-        individuals. This helps with auto-completion of email addresses and other convenient
-        features. Malicious apps may use this to erase or modify your contact data.</string>
+    <string name="permdesc_writeContacts" product="tablet">Allows the app to
+      modify the data about your contacts stored on your tablet, including the
+      frequency with which you\'ve called, emailed, or communicated in other ways
+      with specific contacts. This permission allows apps to delete contact
+      data.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeContacts" product="default">Allows the app to modify
-        the data about your contacts stored on your phone, including the frequency
-        with which you\'ve called, emailed, or communicated in other ways with specific
-        individuals. This helps with auto-completion of email addresses and other convenient
-        features. Malicious apps may use this to erase or modify your contact data.</string>
+    <string name="permdesc_writeContacts" product="default">Allows the app to
+    modify the data about your contacts stored on your phone, including the
+    frequency with which you\'ve called, emailed, or communicated in other ways
+    with specific contacts. This permission allows apps to delete contact
+    data.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readCallLog">read call log</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCallLog" product="tablet">Allows the app to read your tablet\'s call log, including data about incoming and outgoing calls.
-        Malicious apps may use this to send your data to other people.</string>
+    <string name="permdesc_readCallLog" product="tablet">Allows the app to read
+     your tablet\'s call log, including data about incoming and outgoing calls.
+     This permission allows apps to save your call log data, and malicious apps
+     may share call log data without your knowledge.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCallLog" product="default">Allows the app to read your phone\'s call log, including data about incoming and outgoing calls.
-        Malicious apps may use this to send your data to other people.</string>
+    <string name="permdesc_readCallLog" product="default">Allows the app to read
+      your phone\'s call log, including data about incoming and outgoing calls.
+      This permission allows apps to save your call log data, and malicious apps
+      may share call log data without your knowledge.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeCallLog">write call log</string>
@@ -1113,93 +1025,110 @@
     <!-- Title of the read profile permission, listed so the user can decide whether to allow the application to read the user's personal profile data. [CHAR LIMIT=30] -->
     <string name="permlab_readProfile">read your own contact card</string>
     <!-- Description of the read profile permission, listed so the user can decide whether to allow the application to read the user's personal profile data. [CHAR LIMIT=NONE] -->
-    <string name="permdesc_readProfile" product="default">Allows the app to read personal
-        profile information stored on your device, such as your name and contact information. This
-        means the app can identify you and send your profile information to others.</string>
+    <string name="permdesc_readProfile" product="default">Allows the app to read
+     personal profile information stored on your device, such as your name and
+     contact information. This means the app can identify you and may send your
+     profile information to others.</string>
 
     <!-- Title of the write profile permission, listed so the user can decide whether to allow the application to write to the user's personal profile data. [CHAR LIMIT=30] -->
     <string name="permlab_writeProfile">modify your own contact card</string>
     <!-- Description of the write profile permission, listed so the user can decide whether to allow the application to write to the user's personal profile data. [CHAR LIMIT=NONE] -->
-    <string name="permdesc_writeProfile" product="default">Allows the app to change or add
-        to personal profile information stored on your device, such as your name and contact
-        information.  This means other apps can identify you and send your profile
-        information to others.</string>
+    <string name="permdesc_writeProfile" product="default">Allows the app to
+      change or add to personal profile information stored on your device, such
+      as your name and contact information.  This means the app can identify you
+      and may send your profile information to others.</string>
 
     <!-- Title of the read social stream permission, listed so the user can decide whether to allow the application to read information from the user's social stream. [CHAR LIMIT=30] -->
     <string name="permlab_readSocialStream" product="default">read your social stream</string>
-    <string name="permdesc_readSocialStream" product="default">Allows the app to access
-        and sync social updates from you and your friends. Malicious apps may use this to read
-        private communications between you and your friends on social networks.</string>
+    <string name="permdesc_readSocialStream" product="default">Allows the app
+      to access and sync social updates from you and your friends. Be careful
+      when sharing information -- this allows the app to read communications
+      between you and your friends on social networks, regardless of
+      confidentiality. Note: this permission may not be enforced on all social
+      networks.</string>
 
     <!-- Title of the write social stream permission, listed so the user can decide whether to allow the application to write information to the user's social stream. [CHAR LIMIT=30] -->
     <string name="permlab_writeSocialStream" product="default">write to your social stream</string>
-    <string name="permdesc_writeSocialStream" product="default">Allows the app to display
-        social updates from your friends. Malicious apps may use this to pretend to be a friend
-        and trick you into revealing passwords or other confidential information.</string>
-
+    <string name="permdesc_writeSocialStream" product="default">Allows the app to
+     display social updates from your friends.  Be careful when sharing
+     information -- this allows the app to produce messages that may appear to
+     come from a friend. Note: this permission may not be enforced on all social
+     networks.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readCalendar">read calendar events plus confidential information</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCalendar" product="tablet">Allows the app to read all calendar
-        events stored on your tablet, including those of friends or coworkers. Malicious apps
-        may extract personal information from these calendars without the owners\' knowledge.</string>
+
+    <string name="permdesc_readCalendar" product="tablet">Allows the app to read
+       all calendar events stored on your tablet, including those of friends or
+       co-workers. This may allow the app to share or save your calendar data,
+       regardless of confidentiality or sensitivity.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCalendar" product="default">Allows the app to read all calendar
-        events stored on your phone, including those of friends or coworkers. Malicious apps
-        may extract personal information from these calendars without the owners\' knowledge.</string>
+    <string name="permdesc_readCalendar" product="default">Allows the app to
+       read all calendar events stored on your phone, including those of friends
+       or co-workers. This may allow the app to share or save your calendar data,
+       regardless of confidentiality or sensitivity.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeCalendar">add or modify calendar events and send email to guests without owners\' knowledge</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeCalendar">Allows the app to send event invitations as the calendar owner and add, remove,
-        change events that you can modify on your device, including those of friends or co-workers. Malicious apps
-        may send spam emails that appear to come from calendar owners, modify events without the owners\' knowledge, or add fake events.</string>
+
+<string name="permdesc_writeCalendar" product="tablet">Allows the app to
+     add, remove, change events that you can modify on your tablet, including
+     those of friends or co-workers. This may allow the app to send messages
+     that appear to come from calendar owners, or modify events without the
+     owners\' knowledge.</string>
+<string name="permdesc_writeCalendar" product="default">Allows the app to
+     add, remove, change events that you can modify on your phone, including
+     those of friends or co-workers. This may allow the app to send messages
+     that appear to come from calendar owners, or modify events without the
+     owners\' knowledge.</string>
+
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessMockLocation">mock location sources for testing</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessMockLocation">Allows the app to create mock location sources for testing.
-        Malicious apps may use this to override the location and/or status returned by real
-        location sources such as GPS or network providers.</string>
+    <string name="permdesc_accessMockLocation">Create mock location sources for
+      testing or install a new location provider.  This allows the app to
+      override the location and/or status returned by other location sources
+      such as GPS or location providers.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessLocationExtraCommands">access extra location provider commands</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessLocationExtraCommands">Allows the app to access extra location provider commands.
-        Malicious apps may use this to interfere with the operation of the GPS
-        or other location sources.</string>
+    <string name="permdesc_accessLocationExtraCommands">Allows the app to access
+      extra location provider commands.  This may allow the app to to interfere
+      with the operation of the GPS or other location sources.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_installLocationProvider">permission to install a location provider</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_installLocationProvider">Create mock location sources for testing.
-        Malicious apps may use this to override the location and/or status returned by real
-        location sources such as GPS or Network providers or monitor and report your location to an external source.</string>
+    <string name="permdesc_installLocationProvider">Create mock location sources
+      for testing or install a new location provider.  This allows the app to
+      override the location and/or status returned by other location sources
+      such as GPS or location providers.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_accessFineLocation">fine (GPS) location</string>
+    <string name="permlab_accessFineLocation">precise (GPS) location</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessFineLocation" product="tablet">Access fine location sources such as the
-        Global Positioning System on the tablet, where available.
-        Malicious apps may use this to determine where you are, and may
-        consume additional battery power.</string>
+    <string name="permdesc_accessFineLocation" product="tablet">Access precise
+      location sources such as the Global Positioning System on the tablet. When
+      location services are available and turned on, this permission allows the
+      app to determine your precise location.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessFineLocation" product="default">Access fine location sources such as the
-        Global Positioning System on the phone, where available.
-        Malicious apps may use this to determine where you are, and may
-        consume additional battery power.</string>
+    <string name="permdesc_accessFineLocation" product="default">Access precise
+      location sources such as the Global Positioning System on the phone. When
+      location services are available and turned on, this permission allows the
+      app to determine your precise location.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_accessCoarseLocation">coarse (network-based) location</string>
+    <string name="permlab_accessCoarseLocation">approximate (network-based) location</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessCoarseLocation" product="tablet">Access coarse location sources such as the cellular
-        network database to determine an approximate tablet location, where available. Malicious
-        apps may use this to determine approximately where you are.</string>
-    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessCoarseLocation" product="default">Access coarse location sources such as the cellular
-        network database to determine an approximate phone location, where available. Malicious
-        apps may use this to determine approximately where you are.</string>
+    <string name="permdesc_accessCoarseLocation">Access
+      approximate location from location providers using network sources such as
+      cell tower and Wi-Fi. When these location services are available and turned
+      on, this permission allows the app to determine your approximate
+      location.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessSurfaceFlinger">access SurfaceFlinger</string>
@@ -1214,19 +1143,21 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_modifyAudioSettings">change your audio settings</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_modifyAudioSettings">Allows the app to modify global audio settings such as volume and routing.</string>
+    <string name="permdesc_modifyAudioSettings">Allows the app to modify global audio settings such as volume and which speaker is used for output.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_recordAudio">record audio</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_recordAudio">Allows the app to access the audio record path.</string>
+    <string name="permdesc_recordAudio">Allows the app to record audio with the
+      microphone.  This permission allows the app to record audio at any time
+      without your confirmation.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_camera">take pictures and videos</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_camera">Allows the app to take pictures and videos
-        with the camera. This allows the app at any time to collect
-        images the camera is seeing.</string>
+      with the camera.  This permission allows the app to use the camera at any
+      time without your confirmation.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_brick" product="tablet">permanently disable tablet</string>
@@ -1318,10 +1249,11 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_callPhone">directly call phone numbers</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_callPhone">Allows the app to call
-        phone numbers without your intervention. Malicious apps may
-        cause unexpected calls on your phone bill. Note that this doesn\'t
-        allow the app to call emergency numbers.</string>
+    <string name="permdesc_callPhone">Allows the app to call phone numbers
+      without your intervention. This may result in unexpected charges or calls.
+      Note that this doesn\'t allow the app to call emergency numbers.
+      Malicious apps may cost you money by making calls without your
+      confirmation.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_callPrivileged">directly call any phone numbers</string>
@@ -1372,9 +1304,9 @@
     <string name="permlab_readPhoneState">read phone status and identity</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_readPhoneState">Allows the app to access the phone
-        features of the device.  An app with this permission can determine the phone
-        number and serial number of this phone, whether a call is active, the number that call
-        is connected to and the like.</string>
+      features of the device.  This permission allows the app to determine the
+      phone number and device IDs, whether a call is active, and the remote number
+      connected by a call.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_wakeLock" product="tablet">prevent tablet from sleeping</string>
@@ -1445,9 +1377,13 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_getAccounts">find accounts on the device</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_getAccounts" product="tablet">Allows the app to get the list of accounts known by the tablet.</string>
+    <string name="permdesc_getAccounts" product="tablet">Allows the app to get
+      the list of accounts known by the tablet.  This may include any accounts
+      created by applications you have installed.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_getAccounts" product="default">Allows the app to get the list of accounts known by the phone.</string>
+    <string name="permdesc_getAccounts" product="default">Allows the app to get
+      the list of accounts known by the phone.  This may include any accounts
+      created by applications you have installed.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_authenticateAccounts">create accounts and set passwords</string>
@@ -1472,12 +1408,17 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessNetworkState">view network connections</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessNetworkState">Allows the app to view the state of all networks.</string>
+    <string name="permdesc_accessNetworkState">Allows the app to view
+      information about network connections such as which networks exist and are
+      connected.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_createNetworkSockets">full Internet access</string>
+    <string name="permlab_createNetworkSockets">full network access</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_createNetworkSockets">Allows the app to create network sockets.</string>
+    <string name="permdesc_createNetworkSockets">Allows the app to create
+     network sockets and use custom network protocols. The browser and other
+     applications provide means to send data to the internet, so this
+     permission is not required to send data to the internet.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeApnSettings">change/intercept network settings and traffic</string>
@@ -1504,21 +1445,26 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessWifiState">view Wi-Fi connections</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_accessWifiState">Allows the app to view the information about the state of Wi-Fi.</string>
+    <string name="permdesc_accessWifiState">Allows the app to view information
+      about Wi-Fi networking, such as whether Wi-Fi is enabled and name of
+      connected Wi-Fi devices.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_changeWifiState">connect and disconnect from Wi-Fi</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_changeWifiState">Allows the app to connect to and disconnect from Wi-Fi access points, and to make changes to
-      configured Wi-Fi networks.</string>
+    <string name="permdesc_changeWifiState">Allows the app to connect to and
+      disconnect from Wi-Fi access points and to make changes to device
+      configuration for Wi-Fi networks.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_changeWifiMulticastState">allow Wi-Fi Multicast reception</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_changeWifiMulticastState">Allows the app to
-      receive packets not directly addressed to your device. This can be
-      useful when discovering services offered near by. It uses more power
-      than the non-multicast mode.</string>
+    <string name="permdesc_changeWifiMulticastState" product="tablet">Allows the app to receive
+      packets sent to all devices on a Wi-Fi network using multicast addresses,
+      not just your tablet.  It uses more power than the non-multicast mode.</string>
+    <string name="permdesc_changeWifiMulticastState" product="default">Allows the app to receive
+      packets sent to all devices on a Wi-Fi network using multicast addresses,
+      not just your phone.  It uses more power than the non-multicast mode.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_bluetoothAdmin">access Bluetooth settings</string>
@@ -1531,19 +1477,25 @@
       the local Bluetooth phone, and to discover and pair with remote devices.</string>
 
     <string name="permlab_accessWimaxState">View WiMAX connections</string>
-    <string name="permdesc_accessWimaxState">Allows the app to view the information about the state of WiMAX.</string>
+    <string name="permdesc_accessWimaxState">Allows the app to determine whether
+     WiMAX is enabled and information about any WiMAX networks that are
+     connected. </string>
+
     <string name="permlab_changeWimaxState">Change WiMAX state</string>
-    <string name="permdesc_changeWimaxState">Allows the app to connect to and disconnect from WiMAX network.</string>
+    <string name="permdesc_changeWimaxState" product="tablet">Allows the app to
+      connect the tablet to and disconnect the tablet from WiMAX networks.</string>
+    <string name="permdesc_changeWimaxState" product="default">Allows the app to
+      connect the phone to and disconnect the phone from WiMAX networks.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_bluetooth">pair with Bluetooth devices</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_bluetooth" product="tablet">Allows the app to view the
-      configuration of the local Bluetooth tablet, and to make and accept
+      configuration of Bluetooth on the tablet, and to make and accept
       connections with paired devices.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_bluetooth" product="default">Allows the app to view the
-      configuration of the local Bluetooth phone, and to make and accept
+      configuration of the Bluetooth on the phone, and to make and accept
       connections with paired devices.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -1555,28 +1507,25 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_disableKeyguard">disable your screen lock</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_disableKeyguard">Allows the app to disable
-      the keylock and any associated password security. A legitimate example of
-      this is the phone disabling the keylock when receiving an incoming phone call,
-      then re-enabling the keylock when the call is finished.</string>
+    <string name="permdesc_disableKeyguard">Allows the app to disable the
+      keylock and any associated password security.  For example, the phone
+      disables the keylock when receiving an incoming phone call, then
+      re-enables the keylock when the call is finished.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readSyncSettings">read sync settings</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readSyncSettings">Allows the app to read the sync settings,
-        such as whether sync is enabled for the People app.</string>
+    <string name="permdesc_readSyncSettings">Allows the app to read the sync settings for an account. For example, this can determine whether the People app is synced with an account.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeSyncSettings">toggle sync on and off</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeSyncSettings">Allows the app to modify the sync
-        settings, such as whether sync is enabled for the People app.</string>
+    <string name="permdesc_writeSyncSettings">Allows an app to modify the sync settings for an account.  For example, this can be used to enable sync of the People app with an account.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readSyncStats">read sync statistics</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readSyncStats">Allows the app to read the sync stats; e.g., the
-        history of syncs that have occurred.</string>
+    <string name="permdesc_readSyncStats">Allows an app to read the sync stats for an account, including the history of sync events and how much data is synced. </string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_subscribedFeedsRead">read subscribed feeds</string>
@@ -1592,8 +1541,8 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readDictionary">read terms you added to the dictionary</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readDictionary">Allows the app to read any private
-      words, names and phrases that the user may have stored in the user dictionary.</string>
+    <string name="permdesc_readDictionary">Allows the app to read all words,
+       names and phrases that the user may have stored in the user dictionary.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeDictionary">write to user-defined dictionary</string>
@@ -1602,13 +1551,13 @@
       user dictionary.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
-    <string name="permlab_sdcardRead" product="nosdcard">read the contents of your USB storage</string>
+    <string name="permlab_sdcardRead" product="nosdcard">test access to protected storage</string>
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_sdcardRead" product="default">read the contents of your SD card</string>
+    <string name="permlab_sdcardRead" product="default">test access to protected storage</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
-    <string name="permdesc_sdcardRead" product="nosdcard">Allows the app to read contents of USB storage, which may include photos and media.</string>
+    <string name="permdesc_sdcardRead" product="nosdcard">Allows the app to test a permission for USB storage that will be availabe on future devices. </string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_sdcardRead" product="default">Allows the app to read contents of SD card, which may include photos and media.</string>
+    <string name="permdesc_sdcardRead" product="default">Allows the app to test a permission for the SD card that will be available on future devices.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
     <string name="permlab_sdcardWrite" product="nosdcard">modify or delete the contents of your USB storage</string>
@@ -2386,21 +2335,28 @@
     <string name="permlab_readHistoryBookmarks">read your Web bookmarks and history</string>
     <!-- Description of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
-    <string name="permdesc_readHistoryBookmarks">Allows the app to read all
-        the URLs that the Browser has visited, and all of the Browser\'s bookmarks.</string>
+    <string name="permdesc_readHistoryBookmarks">Allows the app to read the
+     history of all URLs that the Browser has visited, and all of the Browser\'s
+     bookmarks. Note: this permission may not be enforced by third-party
+     browsers or other  applications with web browsing capabilities.</string>
     <!-- Title of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
+
     <string name="permlab_writeHistoryBookmarks">write web bookmarks and history</string>
     <!-- Description of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
-    <string name="permdesc_writeHistoryBookmarks" product="tablet">Allows the app to modify the
-        Browser\'s history or bookmarks stored on your tablet. Malicious apps
-        may use this to erase or modify your Browser\'s data.</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tablet">Allows the
+        app to modify the Browser\'s history or bookmarks stored on your tablet.
+        This may allow the app to erase or modify Browser data.  Note: this
+        permission may note be enforced by third-party browsers or other
+        applications with web browsing capabilities.</string>
     <!-- Description of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
-    <string name="permdesc_writeHistoryBookmarks" product="default">Allows the app to modify the
-        Browser\'s history or bookmarks stored on your phone. Malicious apps
-        may use this to erase or modify your Browser\'s data.</string>
+    <string name="permdesc_writeHistoryBookmarks" product="default">Allows the
+        app to modify the Browser\'s history or bookmarks stored on your phone.
+        This may allow the app to erase or modify Browser data.  Note:
+        this permission may note be enforced by third-party browsers or other
+        applications with web browsing capabilities.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
@@ -2505,7 +2461,7 @@
 
     <!-- Title for a warning message about the interaction model changes after allowing an accessibility
          service to put the device into explore by touch mode, displayed as a dialog message when
-         the user selects to enables the service. (default). [CHAR LIMIT=35] -->
+         the user selects to enables the service. (default). [CHAR LIMIT=45] -->
     <string name="enable_explore_by_touch_warning_title">Enable Explore by Touch?</string>
     <!-- Summary for a warning message about the interaction model changes after allowing an accessibility
          service to put the device into explore by touch mode, displayed as a dialog message when
@@ -3010,13 +2966,23 @@
     <!-- Name of the button in the date/time picker to accept the date/time change -->
     <string name="date_time_done">Done</string>
 
-    <!-- Security Permissions strings-->
+    <!-- Security Permissions strings (old)-->
+    <!-- The default permission group for any permissions that have not explicitly set a group. -->
+    <string name="default_permission_group">Default</string>
+    <!-- Do not translate. -->
+    <string name="permissions_format"><xliff:g id="perm_line1">%1$s</xliff:g>, <xliff:g id="perm_line2">%2$s</xliff:g></string>
+    <!-- Shown for an application when it doesn't require any permission grants. -->
+    <string name="no_permissions">No permissions required</string>
+    <!-- When installing an application, the less-dangerous permissions are hidden.  If the user showed those, this is the text to hide them again.  -->
+    <string name="perms_hide"><b>Hide</b></string>
+    <!-- When installing an application, the less-dangerous permissions are hidden.  This is the text to show those. -->
+    <string name="perms_show_all"><b>Show all</b></string>
+
+    <!-- Security Permissions strings (new)-->
     <!-- Text that is placed at the front of a permission name that is being added to an app [CHAR LIMIT=NONE] -->
     <string name="perms_new_perm_prefix"><font size="12" fgcolor="#ff900000">NEW: </font></string>
     <!-- Text that is placed at the front of a permission name that is being added to an app [CHAR LIMIT=NONE] -->
     <string name="perms_description_app">Provided by <xliff:g id="app_name">%1$s</xliff:g>.</string>
-    <!-- Shown for an application when it doesn't require any permission grants. -->
-    <string name="no_permissions">No permissions required</string>
 
     <!-- USB storage dialog strings -->
     <!-- This is the title for the activity's window. -->
diff --git a/include/private/hwui/DrawGlInfo.h b/include/private/hwui/DrawGlInfo.h
index e33823e..fc810be 100644
--- a/include/private/hwui/DrawGlInfo.h
+++ b/include/private/hwui/DrawGlInfo.h
@@ -72,7 +72,14 @@
         // The functor needs to be invoked again but will
         // not redraw. Only the functor is invoked again
         // (unless another functor requests a redraw.)
-        kStatusInvoke = 0x2
+        kStatusInvoke = 0x2,
+        // DisplayList actually issued GL drawing commands.
+        // This is used to signal the HardwareRenderer that the
+        // buffers should be flipped - otherwise, there were no
+        // changes to the buffer, so no need to flip. Some hardware
+        // has issues with stale buffer contents when no GL
+        // commands are issued.
+        kStatusDrew = 0x4
     };
 }; // struct DrawGlInfo
 
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 546925e..88d2209 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -833,7 +833,7 @@
  * purposes of logging display list info for a given view.
  */
 status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flags, uint32_t level) {
-    status_t drawGlStatus = 0;
+    status_t drawGlStatus = DrawGlInfo::kStatusDone;
     TextContainer text;
     mReader.rewind();
 
@@ -859,7 +859,7 @@
         DISPLAY_LIST_LOGD("%s%s %d", (char*) indent, "RestoreToCount", restoreTo);
         renderer.restoreToCount(restoreTo);
         renderer.endMark();
-        return false;
+        return drawGlStatus;
     }
 
     DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance();
@@ -1002,7 +1002,7 @@
                 }
                 DISPLAY_LIST_LOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
                         layer, x, y, paint);
-                renderer.drawLayer(layer, x, y, paint);
+                drawGlStatus |= renderer.drawLayer(layer, x, y, paint);
             }
             break;
             case DrawBitmap: {
@@ -1015,7 +1015,7 @@
                 }
                 DISPLAY_LIST_LOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
                         bitmap, x, y, paint);
-                renderer.drawBitmap(bitmap, x, y, paint);
+                drawGlStatus |= renderer.drawBitmap(bitmap, x, y, paint);
             }
             break;
             case DrawBitmapMatrix: {
@@ -1024,7 +1024,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %p, %p, %p", (char*) indent, OP_NAMES[op],
                         bitmap, matrix, paint);
-                renderer.drawBitmap(bitmap, matrix, paint);
+                drawGlStatus |= renderer.drawBitmap(bitmap, matrix, paint);
             }
             break;
             case DrawBitmapRect: {
@@ -1041,7 +1041,7 @@
                 DISPLAY_LIST_LOGD("%s%s %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p",
                         (char*) indent, OP_NAMES[op], bitmap,
                         f1, f2, f3, f4, f5, f6, f7, f8,paint);
-                renderer.drawBitmap(bitmap, f1, f2, f3, f4, f5, f6, f7, f8, paint);
+                drawGlStatus |= renderer.drawBitmap(bitmap, f1, f2, f3, f4, f5, f6, f7, f8, paint);
             }
             break;
             case DrawBitmapData: {
@@ -1051,7 +1051,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
                         bitmap, x, y, paint);
-                renderer.drawBitmap(bitmap, x, y, paint);
+                drawGlStatus |= renderer.drawBitmap(bitmap, x, y, paint);
             }
             break;
             case DrawBitmapMesh: {
@@ -1067,7 +1067,8 @@
                 SkPaint* paint = getPaint(renderer);
 
                 DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
-                renderer.drawBitmapMesh(bitmap, meshWidth, meshHeight, vertices, colors, paint);
+                drawGlStatus |= renderer.drawBitmapMesh(bitmap, meshWidth, meshHeight, vertices,
+                        colors, paint);
             }
             break;
             case DrawPatch: {
@@ -1091,15 +1092,15 @@
                 SkPaint* paint = getPaint(renderer);
 
                 DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
-                renderer.drawPatch(bitmap, xDivs, yDivs, colors, xDivsCount, yDivsCount,
-                        numColors, left, top, right, bottom, paint);
+                drawGlStatus |= renderer.drawPatch(bitmap, xDivs, yDivs, colors,
+                        xDivsCount, yDivsCount, numColors, left, top, right, bottom, paint);
             }
             break;
             case DrawColor: {
                 int32_t color = getInt();
                 int32_t xferMode = getInt();
                 DISPLAY_LIST_LOGD("%s%s 0x%x %d", (char*) indent, OP_NAMES[op], color, xferMode);
-                renderer.drawColor(color, (SkXfermode::Mode) xferMode);
+                drawGlStatus |= renderer.drawColor(color, (SkXfermode::Mode) xferMode);
             }
             break;
             case DrawRect: {
@@ -1110,7 +1111,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
                         f1, f2, f3, f4, paint);
-                renderer.drawRect(f1, f2, f3, f4, paint);
+                drawGlStatus |= renderer.drawRect(f1, f2, f3, f4, paint);
             }
             break;
             case DrawRoundRect: {
@@ -1123,7 +1124,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p",
                         (char*) indent, OP_NAMES[op], f1, f2, f3, f4, f5, f6, paint);
-                renderer.drawRoundRect(f1, f2, f3, f4, f5, f6, paint);
+                drawGlStatus |= renderer.drawRoundRect(f1, f2, f3, f4, f5, f6, paint);
             }
             break;
             case DrawCircle: {
@@ -1133,7 +1134,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %p",
                         (char*) indent, OP_NAMES[op], f1, f2, f3, paint);
-                renderer.drawCircle(f1, f2, f3, paint);
+                drawGlStatus |= renderer.drawCircle(f1, f2, f3, paint);
             }
             break;
             case DrawOval: {
@@ -1144,7 +1145,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p",
                         (char*) indent, OP_NAMES[op], f1, f2, f3, f4, paint);
-                renderer.drawOval(f1, f2, f3, f4, paint);
+                drawGlStatus |= renderer.drawOval(f1, f2, f3, f4, paint);
             }
             break;
             case DrawArc: {
@@ -1158,14 +1159,14 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %d, %p",
                         (char*) indent, OP_NAMES[op], f1, f2, f3, f4, f5, f6, i1, paint);
-                renderer.drawArc(f1, f2, f3, f4, f5, f6, i1 == 1, paint);
+                drawGlStatus |= renderer.drawArc(f1, f2, f3, f4, f5, f6, i1 == 1, paint);
             }
             break;
             case DrawPath: {
                 SkPath* path = getPath();
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %p, %p", (char*) indent, OP_NAMES[op], path, paint);
-                renderer.drawPath(path, paint);
+                drawGlStatus |= renderer.drawPath(path, paint);
             }
             break;
             case DrawLines: {
@@ -1173,7 +1174,7 @@
                 float* points = getFloats(count);
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
-                renderer.drawLines(points, count, paint);
+                drawGlStatus |= renderer.drawLines(points, count, paint);
             }
             break;
             case DrawPoints: {
@@ -1181,7 +1182,7 @@
                 float* points = getFloats(count);
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
-                renderer.drawPoints(points, count, paint);
+                drawGlStatus |= renderer.drawPoints(points, count, paint);
             }
             break;
             case DrawText: {
@@ -1193,7 +1194,8 @@
                 float length = getFloat();
                 DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p, %.2f", (char*) indent,
                         OP_NAMES[op], text.text(), text.length(), count, x, y, paint, length);
-                renderer.drawText(text.text(), text.length(), count, x, y, paint, length);
+                drawGlStatus |= renderer.drawText(text.text(), text.length(), count, x, y,
+                        paint, length);
             }
             break;
             case DrawTextOnPath: {
@@ -1205,7 +1207,7 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %p", (char*) indent, OP_NAMES[op],
                     text.text(), text.length(), count, paint);
-                renderer.drawTextOnPath(text.text(), text.length(), count, path,
+                drawGlStatus |= renderer.drawTextOnPath(text.text(), text.length(), count, path,
                         hOffset, vOffset, paint);
             }
             break;
@@ -1217,7 +1219,8 @@
                 SkPaint* paint = getPaint(renderer);
                 DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %p", (char*) indent,
                         OP_NAMES[op], text.text(), text.length(), count, paint);
-                renderer.drawPosText(text.text(), text.length(), count, positions, paint);
+                drawGlStatus |= renderer.drawPosText(text.text(), text.length(), count,
+                        positions, paint);
             }
             break;
             case ResetShader: {
@@ -1490,23 +1493,25 @@
     return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
+status_t DisplayListRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
     addOp(DisplayList::DrawLayer);
     addInt((int) layer);
     addPoint(x, y);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
+status_t DisplayListRenderer::drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
     const bool reject = quickReject(left, top, left + bitmap->width(), top + bitmap->height());
     uint32_t* location = addOp(DisplayList::DrawBitmap, reject);
     addBitmap(bitmap);
     addPoint(left, top);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint) {
+status_t DisplayListRenderer::drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint) {
     Rect r(0.0f, 0.0f, bitmap->width(), bitmap->height());
     const mat4 transform(*matrix);
     transform.mapRect(r);
@@ -1517,9 +1522,10 @@
     addMatrix(matrix);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
+status_t DisplayListRenderer::drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
         float srcRight, float srcBottom, float dstLeft, float dstTop,
         float dstRight, float dstBottom, SkPaint* paint) {
     const bool reject = quickReject(dstLeft, dstTop, dstRight, dstBottom);
@@ -1529,18 +1535,21 @@
     addBounds(dstLeft, dstTop, dstRight, dstBottom);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
+status_t DisplayListRenderer::drawBitmapData(SkBitmap* bitmap, float left, float top,
+        SkPaint* paint) {
     const bool reject = quickReject(left, top, left + bitmap->width(), bitmap->height());
     uint32_t* location = addOp(DisplayList::DrawBitmapData, reject);
     addBitmapData(bitmap);
     addPoint(left, top);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
+status_t DisplayListRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
         float* vertices, int* colors, SkPaint* paint) {
     addOp(DisplayList::DrawBitmapMesh);
     addBitmap(bitmap);
@@ -1554,11 +1563,12 @@
         addInt(0);
     }
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
-        const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
-        float left, float top, float right, float bottom, SkPaint* paint) {
+status_t DisplayListRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs,
+        const int32_t* yDivs, const uint32_t* colors, uint32_t width, uint32_t height,
+        int8_t numColors, float left, float top, float right, float bottom, SkPaint* paint) {
     const bool reject = quickReject(left, top, right, bottom);
     uint32_t* location = addOp(DisplayList::DrawPatch, reject);
     addBitmap(bitmap);
@@ -1568,15 +1578,17 @@
     addBounds(left, top, right, bottom);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawColor(int color, SkXfermode::Mode mode) {
+status_t DisplayListRenderer::drawColor(int color, SkXfermode::Mode mode) {
     addOp(DisplayList::DrawColor);
     addInt(color);
     addInt(mode);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawRect(float left, float top, float right, float bottom,
+status_t DisplayListRenderer::drawRect(float left, float top, float right, float bottom,
         SkPaint* paint) {
     const bool reject = paint->getStyle() == SkPaint::kFill_Style &&
             quickReject(left, top, right, bottom);
@@ -1584,9 +1596,10 @@
     addBounds(left, top, right, bottom);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawRoundRect(float left, float top, float right, float bottom,
+status_t DisplayListRenderer::drawRoundRect(float left, float top, float right, float bottom,
         float rx, float ry, SkPaint* paint) {
     const bool reject = paint->getStyle() == SkPaint::kFill_Style &&
             quickReject(left, top, right, bottom);
@@ -1595,32 +1608,36 @@
     addPoint(rx, ry);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
+status_t DisplayListRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
     addOp(DisplayList::DrawCircle);
     addPoint(x, y);
     addFloat(radius);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawOval(float left, float top, float right, float bottom,
+status_t DisplayListRenderer::drawOval(float left, float top, float right, float bottom,
         SkPaint* paint) {
     addOp(DisplayList::DrawOval);
     addBounds(left, top, right, bottom);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawArc(float left, float top, float right, float bottom,
+status_t DisplayListRenderer::drawArc(float left, float top, float right, float bottom,
         float startAngle, float sweepAngle, bool useCenter, SkPaint* paint) {
     addOp(DisplayList::DrawArc);
     addBounds(left, top, right, bottom);
     addPoint(startAngle, sweepAngle);
     addInt(useCenter ? 1 : 0);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawPath(SkPath* path, SkPaint* paint) {
+status_t DisplayListRenderer::drawPath(SkPath* path, SkPaint* paint) {
     float left, top, offset;
     uint32_t width, height;
     computePathBounds(path, paint, left, top, offset, width, height);
@@ -1630,23 +1647,26 @@
     addPath(path);
     addPaint(paint);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawLines(float* points, int count, SkPaint* paint) {
+status_t DisplayListRenderer::drawLines(float* points, int count, SkPaint* paint) {
     addOp(DisplayList::DrawLines);
     addFloats(points, count);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawPoints(float* points, int count, SkPaint* paint) {
+status_t DisplayListRenderer::drawPoints(float* points, int count, SkPaint* paint) {
     addOp(DisplayList::DrawPoints);
     addFloats(points, count);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
+status_t DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
         float x, float y, SkPaint* paint, float length) {
-    if (!text || count <= 0) return;
+    if (!text || count <= 0) return DrawGlInfo::kStatusDone;
 
     // TODO: We should probably make a copy of the paint instead of modifying
     //       it; modifying the paint will change its generationID the first
@@ -1672,11 +1692,12 @@
     addPaint(paint);
     addFloat(length);
     addSkip(location);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawTextOnPath(const char* text, int bytesCount, int count,
+status_t DisplayListRenderer::drawTextOnPath(const char* text, int bytesCount, int count,
         SkPath* path, float hOffset, float vOffset, SkPaint* paint) {
-    if (!text || count <= 0) return;
+    if (!text || count <= 0) return DrawGlInfo::kStatusDone;
     addOp(DisplayList::DrawTextOnPath);
     addText(text, bytesCount);
     addInt(count);
@@ -1685,17 +1706,19 @@
     addFloat(vOffset);
     paint->setAntiAlias(true);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
-void DisplayListRenderer::drawPosText(const char* text, int bytesCount, int count,
+status_t DisplayListRenderer::drawPosText(const char* text, int bytesCount, int count,
         const float* positions, SkPaint* paint) {
-    if (!text || count <= 0) return;
+    if (!text || count <= 0) return DrawGlInfo::kStatusDone;
     addOp(DisplayList::DrawPosText);
     addText(text, bytesCount);
     addInt(count);
     addFloats(positions, count * 2);
     paint->setAntiAlias(true);
     addPaint(paint);
+    return DrawGlInfo::kStatusDone;
 }
 
 void DisplayListRenderer::resetShader() {
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 0ba4078..4fa1baa 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -576,35 +576,35 @@
 
     virtual status_t drawDisplayList(DisplayList* displayList, Rect& dirty, int32_t flags,
             uint32_t level = 0);
-    virtual void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
+    virtual status_t drawLayer(Layer* layer, float x, float y, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
             float srcRight, float srcBottom, float dstLeft, float dstTop,
             float dstRight, float dstBottom, SkPaint* paint);
-    virtual void drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
-    virtual void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
+    virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+    virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
             float* vertices, int* colors, SkPaint* paint);
-    virtual void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
+    virtual status_t drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
             const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
             float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawColor(int color, SkXfermode::Mode mode);
-    virtual void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawRoundRect(float left, float top, float right, float bottom,
+    virtual status_t drawColor(int color, SkXfermode::Mode mode);
+    virtual status_t drawRect(float left, float top, float right, float bottom, SkPaint* paint);
+    virtual status_t drawRoundRect(float left, float top, float right, float bottom,
             float rx, float ry, SkPaint* paint);
-    virtual void drawCircle(float x, float y, float radius, SkPaint* paint);
-    virtual void drawOval(float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawArc(float left, float top, float right, float bottom,
+    virtual status_t drawCircle(float x, float y, float radius, SkPaint* paint);
+    virtual status_t drawOval(float left, float top, float right, float bottom, SkPaint* paint);
+    virtual status_t drawArc(float left, float top, float right, float bottom,
             float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
-    virtual void drawPath(SkPath* path, SkPaint* paint);
-    virtual void drawLines(float* points, int count, SkPaint* paint);
-    virtual void drawPoints(float* points, int count, SkPaint* paint);
-    virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
+    virtual status_t drawPath(SkPath* path, SkPaint* paint);
+    virtual status_t drawLines(float* points, int count, SkPaint* paint);
+    virtual status_t drawPoints(float* points, int count, SkPaint* paint);
+    virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
             SkPaint* paint, float length = -1.0f);
-    virtual void drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
+    virtual status_t drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
             float hOffset, float vOffset, SkPaint* paint);
-    virtual void drawPosText(const char* text, int bytesCount, int count, const float* positions,
-            SkPaint* paint);
+    virtual status_t drawPosText(const char* text, int bytesCount, int count,
+            const float* positions, SkPaint* paint);
 
     virtual void resetShader();
     virtual void setupShader(SkiaShader* shader);
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 2a8b32c..2dc9726 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -336,7 +336,7 @@
     info.height = getSnapshot()->height;
     getSnapshot()->transform->copyTo(&info.transform[0]);
 
-    status_t result = (*functor)(DrawGlInfo::kModeDraw, &info);
+    status_t result = (*functor)(DrawGlInfo::kModeDraw, &info) | DrawGlInfo::kStatusDrew;
 
     if (result != DrawGlInfo::kStatusDone) {
         Rect localDirty(info.dirtyLeft, info.dirtyTop, info.dirtyRight, info.dirtyBottom);
@@ -1472,17 +1472,17 @@
     finishDrawTexture();
 }
 
-void OpenGLRenderer::drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
+status_t OpenGLRenderer::drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
     const float right = left + bitmap->width();
     const float bottom = top + bitmap->height();
 
     if (quickReject(left, top, right, bottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
     Texture* texture = mCaches.textureCache.get(bitmap);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     if (CC_UNLIKELY(bitmap->getConfig() == SkBitmap::kA8_Config)) {
@@ -1490,20 +1490,22 @@
     } else {
         drawTextureRect(left, top, right, bottom, texture, paint);
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint) {
+status_t OpenGLRenderer::drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint) {
     Rect r(0.0f, 0.0f, bitmap->width(), bitmap->height());
     const mat4 transform(*matrix);
     transform.mapRect(r);
 
     if (quickReject(r.left, r.top, r.right, r.bottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
     Texture* texture = mCaches.textureCache.get(bitmap);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     // This could be done in a cheaper way, all we need is pass the matrix
@@ -1512,14 +1514,16 @@
     concatMatrix(matrix);
     drawTextureRect(0.0f, 0.0f, bitmap->width(), bitmap->height(), texture, paint);
     restore();
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
+status_t OpenGLRenderer::drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint) {
     const float right = left + bitmap->width();
     const float bottom = top + bitmap->height();
 
     if (quickReject(left, top, right, bottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
@@ -1527,18 +1531,20 @@
     const AutoTexture autoCleanup(texture);
 
     drawTextureRect(left, top, right, bottom, texture, paint);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
+status_t OpenGLRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
         float* vertices, int* colors, SkPaint* paint) {
     // TODO: Do a quickReject
     if (!vertices || mSnapshot->isIgnored()) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
     Texture* texture = mCaches.textureCache.get(bitmap);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     texture->setWrap(GL_CLAMP_TO_EDGE, true);
@@ -1611,19 +1617,21 @@
     drawTextureMesh(0.0f, 0.0f, 1.0f, 1.0f, texture->id, alpha / 255.0f,
             mode, texture->blend, &mesh[0].position[0], &mesh[0].texture[0],
             GL_TRIANGLES, count, false, false, 0, false, false);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawBitmap(SkBitmap* bitmap,
+status_t OpenGLRenderer::drawBitmap(SkBitmap* bitmap,
          float srcLeft, float srcTop, float srcRight, float srcBottom,
          float dstLeft, float dstTop, float dstRight, float dstBottom,
          SkPaint* paint) {
     if (quickReject(dstLeft, dstTop, dstRight, dstBottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
     Texture* texture = mCaches.textureCache.get(bitmap);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     const float width = texture->width;
@@ -1666,18 +1674,20 @@
     }
 
     resetDrawTextureTexCoords(0.0f, 0.0f, 1.0f, 1.0f);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
+status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
         const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
         float left, float top, float right, float bottom, SkPaint* paint) {
     if (quickReject(left, top, right, bottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     mCaches.activeTexture(0);
     Texture* texture = mCaches.textureCache.get(bitmap);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
     texture->setWrap(GL_CLAMP_TO_EDGE, true);
     texture->setFilter(GL_LINEAR, true);
@@ -1726,6 +1736,8 @@
                     true, !mesh->hasEmptyQuads);
         }
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
 /**
@@ -1826,8 +1838,8 @@
  * 'inside' the line area being filled opaquely and the other pixels being filled according to
  * how far into the boundary region they are, which is determined by shader interpolation.
  */
-void OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) {
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     const bool isAA = paint->isAntiAlias();
     // We use half the stroke width here because we're going to position the quad
@@ -2083,10 +2095,12 @@
     if (isAA) {
         finishDrawAALine(widthSlot, lengthSlot);
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawPoints(float* points, int count, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+status_t OpenGLRenderer::drawPoints(float* points, int count, SkPaint* paint) {
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     // TODO: The paint's cap style defines whether the points are square or circular
     // TODO: Handle AA for round points
@@ -2138,86 +2152,92 @@
     }
 
     glDrawArrays(GL_POINTS, 0, generatedVerticesCount);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawColor(int color, SkXfermode::Mode mode) {
+status_t OpenGLRenderer::drawColor(int color, SkXfermode::Mode mode) {
     // No need to check against the clip, we fill the clip region
-    if (mSnapshot->isIgnored()) return;
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     Rect& clip(*mSnapshot->clipRect);
     clip.snapToPixelBoundaries();
 
     drawColorRect(clip.left, clip.top, clip.right, clip.bottom, color, mode, true);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawShape(float left, float top, const PathTexture* texture, SkPaint* paint) {
-    if (!texture) return;
+status_t OpenGLRenderer::drawShape(float left, float top, const PathTexture* texture,
+        SkPaint* paint) {
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     const float x = left + texture->left - texture->offset;
     const float y = top + texture->top - texture->offset;
 
     drawPathTexture(texture, x, y, paint);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawRoundRect(float left, float top, float right, float bottom,
+status_t OpenGLRenderer::drawRoundRect(float left, float top, float right, float bottom,
         float rx, float ry, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     mCaches.activeTexture(0);
     const PathTexture* texture = mCaches.roundRectShapeCache.getRoundRect(
             right - left, bottom - top, rx, ry, paint);
-    drawShape(left, top, texture, paint);
+    return drawShape(left, top, texture, paint);
 }
 
-void OpenGLRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+status_t OpenGLRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     mCaches.activeTexture(0);
     const PathTexture* texture = mCaches.circleShapeCache.getCircle(radius, paint);
-    drawShape(x - radius, y - radius, texture, paint);
+    return drawShape(x - radius, y - radius, texture, paint);
 }
 
-void OpenGLRenderer::drawOval(float left, float top, float right, float bottom, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+status_t OpenGLRenderer::drawOval(float left, float top, float right, float bottom,
+        SkPaint* paint) {
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     mCaches.activeTexture(0);
     const PathTexture* texture = mCaches.ovalShapeCache.getOval(right - left, bottom - top, paint);
-    drawShape(left, top, texture, paint);
+    return drawShape(left, top, texture, paint);
 }
 
-void OpenGLRenderer::drawArc(float left, float top, float right, float bottom,
+status_t OpenGLRenderer::drawArc(float left, float top, float right, float bottom,
         float startAngle, float sweepAngle, bool useCenter, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     if (fabs(sweepAngle) >= 360.0f) {
-        drawOval(left, top, right, bottom, paint);
-        return;
+        return drawOval(left, top, right, bottom, paint);
     }
 
     mCaches.activeTexture(0);
     const PathTexture* texture = mCaches.arcShapeCache.getArc(right - left, bottom - top,
             startAngle, sweepAngle, useCenter, paint);
-    drawShape(left, top, texture, paint);
+    return drawShape(left, top, texture, paint);
 }
 
-void OpenGLRenderer::drawRectAsShape(float left, float top, float right, float bottom,
+status_t OpenGLRenderer::drawRectAsShape(float left, float top, float right, float bottom,
         SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     mCaches.activeTexture(0);
     const PathTexture* texture = mCaches.rectShapeCache.getRect(right - left, bottom - top, paint);
-    drawShape(left, top, texture, paint);
+    return drawShape(left, top, texture, paint);
 }
 
-void OpenGLRenderer::drawRect(float left, float top, float right, float bottom, SkPaint* p) {
+status_t OpenGLRenderer::drawRect(float left, float top, float right, float bottom, SkPaint* p) {
     if (p->getStyle() != SkPaint::kFill_Style) {
-        drawRectAsShape(left, top, right, bottom, p);
-        return;
+        return drawRectAsShape(left, top, right, bottom, p);
     }
 
     if (quickReject(left, top, right, bottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     SkXfermode::Mode mode;
@@ -2237,18 +2257,20 @@
     } else {
         drawColorRect(left, top, right, bottom, color, mode);
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count,
+status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count,
         const float* positions, SkPaint* paint) {
     if (text == NULL || count == 0 || mSnapshot->isIgnored() ||
             (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     // NOTE: Skia does not support perspective transform on drawPosText yet
     if (!mSnapshot->transform->isSimple()) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     float x = 0.0f;
@@ -2308,13 +2330,15 @@
         }
 #endif
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
+status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
         float x, float y, SkPaint* paint, float length) {
     if (text == NULL || count == 0 || mSnapshot->isIgnored() ||
             (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     if (length < 0.0f) length = paint->measureText(text, bytesCount);
@@ -2332,7 +2356,7 @@
     SkPaint::FontMetrics metrics;
     paint->getFontMetrics(&metrics, 0.0f);
     if (quickReject(x, y + metrics.fTop, x + length, y + metrics.fBottom)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     const float oldX = x;
@@ -2432,13 +2456,15 @@
     }
 
     drawTextDecorations(text, bytesCount, length, oldX, oldY, paint);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
+status_t OpenGLRenderer::drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
         float hOffset, float vOffset, SkPaint* paint) {
     if (text == NULL || count == 0 || mSnapshot->isIgnored() ||
             (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     FontRenderer& fontRenderer = mCaches.fontRenderer.getFontRenderer(paint);
@@ -2482,27 +2508,31 @@
         }
 #endif
     }
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) {
-    if (mSnapshot->isIgnored()) return;
+status_t OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) {
+    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
 
     mCaches.activeTexture(0);
 
     // TODO: Perform early clip test before we rasterize the path
     const PathTexture* texture = mCaches.pathCache.get(path, paint);
-    if (!texture) return;
+    if (!texture) return DrawGlInfo::kStatusDone;
     const AutoTexture autoCleanup(texture);
 
     const float x = texture->left - texture->offset;
     const float y = texture->top - texture->offset;
 
     drawPathTexture(texture, x, y, paint);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
-void OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
+status_t OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
     if (!layer || quickReject(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight())) {
-        return;
+        return DrawGlInfo::kStatusDone;
     }
 
     if (layer->deferredUpdateScheduled && layer->renderer && layer->displayList) {
@@ -2575,6 +2605,8 @@
     const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight());
     composeLayerRect(layer, r);
 #endif
+
+    return DrawGlInfo::kStatusDrew;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index ad83b31..7703e80 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -111,34 +111,34 @@
     virtual status_t drawDisplayList(DisplayList* displayList, Rect& dirty, int32_t flags,
             uint32_t level = 0);
     virtual void outputDisplayList(DisplayList* displayList, uint32_t level = 0);
-    virtual void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
-    virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
+    virtual status_t drawLayer(Layer* layer, float x, float y, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
+    virtual status_t drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
             float srcRight, float srcBottom, float dstLeft, float dstTop,
             float dstRight, float dstBottom, SkPaint* paint);
-    virtual void drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
-    virtual void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
+    virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+    virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
             float* vertices, int* colors, SkPaint* paint);
-    virtual void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
+    virtual status_t drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
             const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
             float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawColor(int color, SkXfermode::Mode mode);
-    virtual void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawRoundRect(float left, float top, float right, float bottom,
+    virtual status_t drawColor(int color, SkXfermode::Mode mode);
+    virtual status_t drawRect(float left, float top, float right, float bottom, SkPaint* paint);
+    virtual status_t drawRoundRect(float left, float top, float right, float bottom,
             float rx, float ry, SkPaint* paint);
-    virtual void drawCircle(float x, float y, float radius, SkPaint* paint);
-    virtual void drawOval(float left, float top, float right, float bottom, SkPaint* paint);
-    virtual void drawArc(float left, float top, float right, float bottom,
+    virtual status_t drawCircle(float x, float y, float radius, SkPaint* paint);
+    virtual status_t drawOval(float left, float top, float right, float bottom, SkPaint* paint);
+    virtual status_t drawArc(float left, float top, float right, float bottom,
             float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
-    virtual void drawPath(SkPath* path, SkPaint* paint);
-    virtual void drawLines(float* points, int count, SkPaint* paint);
-    virtual void drawPoints(float* points, int count, SkPaint* paint);
-    virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
+    virtual status_t drawPath(SkPath* path, SkPaint* paint);
+    virtual status_t drawLines(float* points, int count, SkPaint* paint);
+    virtual status_t drawPoints(float* points, int count, SkPaint* paint);
+    virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
             SkPaint* paint, float length = -1.0f);
-    virtual void drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
+    virtual status_t drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
             float hOffset, float vOffset, SkPaint* paint);
-    virtual void drawPosText(const char* text, int bytesCount, int count,
+    virtual status_t drawPosText(const char* text, int bytesCount, int count,
             const float* positions, SkPaint* paint);
 
     virtual void resetShader();
@@ -336,7 +336,7 @@
      * @param texture The texture reprsenting the shape
      * @param paint The paint to draw the shape with
      */
-    void drawShape(float left, float top, const PathTexture* texture, SkPaint* paint);
+    status_t drawShape(float left, float top, const PathTexture* texture, SkPaint* paint);
 
     /**
      * Renders the rect defined by the specified bounds as a shape.
@@ -349,7 +349,7 @@
      * @param bottom The bottom coordinate of the rect to draw
      * @param p The paint to draw the rect with
      */
-    void drawRectAsShape(float left, float top, float right, float bottom, SkPaint* p);
+    status_t drawRectAsShape(float left, float top, float right, float bottom, SkPaint* p);
 
     /**
      * Draws the specified texture as an alpha bitmap. Alpha bitmaps obey
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 84856bf..a2c20fd 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -135,8 +135,8 @@
     private static final int MSG_RCDISPLAY_UPDATE = 13;
     private static final int MSG_SET_ALL_VOLUMES = 14;
     private static final int MSG_PERSIST_MASTER_VOLUME_MUTE = 15;
-    private static final int MSG_SET_WIRED_DEVICE_CONNECTION_STATE = 16;
-    private static final int MSG_SET_A2DP_CONNECTION_STATE = 17;
+    private static final int MSG_SET_WIRED_DEVICE_CONNECTION_STATE = 16;//handled under wakelock
+    private static final int MSG_SET_A2DP_CONNECTION_STATE = 17;        //handled under wakelock
 
 
     // flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be
@@ -410,7 +410,7 @@
                 com.android.internal.R.bool.config_voice_capable);
 
         PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
-        mMediaEventWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "mediaKeyEvent");
+        mMediaEventWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "handleMediaEvent");
 
         Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
         mHasVibrator = vibrator == null ? false : vibrator.hasVibrator();
@@ -2228,6 +2228,15 @@
     }
 
     // Message helper methods
+    /**
+     * Queue a message on the given handler's message queue, after acquiring the service wake lock.
+     * Note that the wake lock needs to be released after the message has been handled.
+     */
+    private void queueMsgUnderWakeLock(Handler handler, int msg,
+            int arg1, int arg2, Object obj, int delay) {
+        mMediaEventWakeLock.acquire();
+        sendMsg(handler, msg, SENDMSG_QUEUE, arg1, arg2, obj, delay);
+    }
 
     private static void sendMsg(Handler handler, int msg,
             int existingMsgPolicy, int arg1, int arg2, Object obj, int delay) {
@@ -2273,9 +2282,8 @@
     public void setWiredDeviceConnectionState(int device, int state, String name) {
         synchronized (mConnectedDevices) {
             int delay = checkSendBecomingNoisyIntent(device, state);
-            sendMsg(mAudioHandler,
+            queueMsgUnderWakeLock(mAudioHandler,
                     MSG_SET_WIRED_DEVICE_CONNECTION_STATE,
-                    SENDMSG_QUEUE,
                     device,
                     state,
                     name,
@@ -2289,9 +2297,8 @@
         synchronized (mConnectedDevices) {
             delay = checkSendBecomingNoisyIntent(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
                                             (state == BluetoothA2dp.STATE_CONNECTED) ? 1 : 0);
-            sendMsg(mAudioHandler,
+            queueMsgUnderWakeLock(mAudioHandler,
                     MSG_SET_A2DP_CONNECTION_STATE,
-                    SENDMSG_QUEUE,
                     state,
                     0,
                     device,
@@ -3000,10 +3007,12 @@
 
                 case MSG_SET_WIRED_DEVICE_CONNECTION_STATE:
                     onSetWiredDeviceConnectionState(msg.arg1, msg.arg2, (String)msg.obj);
+                    mMediaEventWakeLock.release();
                     break;
 
                 case MSG_SET_A2DP_CONNECTION_STATE:
                     onSetA2dpConnectionState((BluetoothDevice)msg.obj, msg.arg1);
+                    mMediaEventWakeLock.release();
                     break;
             }
         }
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/BlackWhiteFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/BlackWhiteFilter.java
index dd7f5e0..20b02d2 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/BlackWhiteFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/BlackWhiteFilter.java
@@ -56,13 +56,25 @@
             "uniform float stepsize;\n" +
             "varying vec2 v_texcoord;\n" +
             "float rand(vec2 loc) {\n" +
-            "  const float divide = 0.00048828125;\n" +
-            "  const float factor = 2048.0;\n" +
-            "  float value = sin(dot(loc, vec2(12.9898, 78.233)));\n" +
-            "  float residual = mod(dot(mod(loc, divide), vec2(0.9898, 0.233)), divide);\n" +
-            "  float part2 = mod(value, divide);\n" +
-            "  float part1 = value - part2;\n" +
-            "  return fract(0.5453 * part1 + factor * (part2 + residual));\n" +
+            // Compute sin(theta), theta = 12.9898 x + 78.233y
+            // because floating point has limited range, make theta = theta1 + theta2
+            // where theta1 = 12x + 78y and theta2 = 0.9898x + 0.233y)
+            // Note that theta1 and theta2 cover diffent range of theta.
+            "  float theta1 = dot(loc, vec2(0.9898, 0.233));\n" +
+            "  float theta2 = dot(loc, vec2(12.0, 78.0));\n" +
+            // Use the property sin(theta) = cos(theta1)*sin(theta2)+sin(theta1)*cos(theta2)
+            // this approach also increases the precisions of sin(theta)
+            "  float value = cos(theta1) * sin(theta2) + sin(theta1) * cos(theta2);\n" +
+            // fract(43758.5453 * x) = fract(43758 * x + 0.5453 * x)
+            // keep value of part1 in range: (2^-14 to 2^14). Since 43758 = 117 * 374
+            // fract(43758 * sin(theta)) = mod(221 * mod(198*sin(theta), 1.0), 1.0)
+            // also to keep as much decimal digits, use the property
+            // mod(mod(198*sin(theta)) = mod(mod(197*sin(theta) + sin(theta))
+            "  float temp = mod(197.0 * value, 1.0) + value;\n" +
+            "  float part1 = mod(220.0 * temp, 1.0) + temp;\n" +
+            "  float part2 = value * 0.5453;\n" +
+            "  float part3 = cos(theta1 + theta2) * 0.43758;\n" +
+            "  return fract(part1 + part2 + part3);\n" +
             "}\n" +
             "void main() {\n" +
             "  vec4 color = texture2D(tex_sampler_0, v_texcoord);\n" +
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/ColorTemperatureFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/ColorTemperatureFilter.java
index 19da006..7488980 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/ColorTemperatureFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/ColorTemperatureFilter.java
@@ -51,7 +51,7 @@
             "  new_color.r = color.r + color.r * ( 1.0 - color.r) * scale;\n" +
             "  new_color.b = color.b - color.b * ( 1.0 - color.b) * scale;\n" +
             "  if (scale > 0.0) { \n" +
-            "    color.g = color.g + color.g * ( 1.0 - color.g) * scale * 0.25;\n" +
+            "    new_color.g = color.g + color.g * ( 1.0 - color.g) * scale * 0.25;\n" +
             "  }\n" +
             "  float max_value = max(new_color.r, max(new_color.g, new_color.b));\n" +
             "  if (max_value > 1.0) { \n" +
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/DocumentaryFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/DocumentaryFilter.java
index 377e49d5..f93a82c 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/DocumentaryFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/DocumentaryFilter.java
@@ -49,16 +49,18 @@
             "uniform vec2 seed;\n" +
             "uniform float stepsize;\n" +
             "uniform float inv_max_dist;\n" +
-            "uniform vec2 center;\n" +
+            "uniform vec2 scale;\n" +
             "varying vec2 v_texcoord;\n" +
             "float rand(vec2 loc) {\n" +
-            "  const float divide = 0.00048828125;\n" +
-            "  const float factor = 2048.0;\n" +
-            "  float value = sin(dot(loc, vec2(12.9898, 78.233)));\n" +
-            "  float residual = mod(dot(mod(loc, divide), vec2(0.9898, 0.233)), divide);\n" +
-            "  float part2 = mod(value, divide);\n" +
-            "  float part1 = value - part2;\n" +
-            "  return fract(0.5453 * part1 + factor * (part2 + residual));\n" +
+            "  float theta1 = dot(loc, vec2(0.9898, 0.233));\n" +
+            "  float theta2 = dot(loc, vec2(12.0, 78.0));\n" +
+            "  float value = cos(theta1) * sin(theta2) + sin(theta1) * cos(theta2);\n" +
+            // keep value of part1 in range: (2^-14 to 2^14).
+            "  float temp = mod(197.0 * value, 1.0) + value;\n" +
+            "  float part1 = mod(220.0 * temp, 1.0) + temp;\n" +
+            "  float part2 = value * 0.5453;\n" +
+            "  float part3 = cos(theta1 + theta2) * 0.43758;\n" +
+            "  return fract(part1 + part2 + part3);\n" +
             "}\n" +
             "void main() {\n" +
             // black white
@@ -71,7 +73,8 @@
             "  float gray = dot(new_color, vec3(0.299, 0.587, 0.114));\n" +
             "  new_color = vec3(gray, gray, gray);\n" +
             // vignette
-            "  float dist = distance(gl_FragCoord.xy, center);\n" +
+            "  vec2 coord = v_texcoord - vec2(0.5, 0.5);\n" +
+            "  float dist = length(coord * scale);\n" +
             "  float lumen = 0.85 / (1.0 + exp((dist * inv_max_dist - 0.83) * 20.0)) + 0.15;\n" +
             "  gl_FragColor = vec4(new_color * lumen, color.a);\n" +
             "}\n";
@@ -141,12 +144,17 @@
 
     private void initParameters() {
         if (mProgram != null) {
-            float centerX = (float) (0.5 * mWidth);
-            float centerY = (float) (0.5 * mHeight);
-            float center[] = {centerX, centerY};
-            float max_dist = (float) Math.sqrt(centerX * centerX + centerY * centerY);
+            float scale[] = new float[2];
+            if (mWidth > mHeight) {
+                scale[0] = 1f;
+                scale[1] = ((float) mHeight) / mWidth;
+            } else {
+                scale[0] = ((float) mWidth) / mHeight;
+                scale[1] = 1f;
+            }
+            float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f;
 
-            mProgram.setHostValue("center", center);
+            mProgram.setHostValue("scale", scale);
             mProgram.setHostValue("inv_max_dist", 1.0f / max_dist);
             mProgram.setHostValue("stepsize", 1.0f / 255.0f);
 
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/FisheyeFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/FisheyeFilter.java
index 8d38f98..5d7929f 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/FisheyeFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/FisheyeFilter.java
@@ -58,24 +58,19 @@
     private static final String mFisheyeShader =
             "precision mediump float;\n" +
             "uniform sampler2D tex_sampler_0;\n" +
-            "uniform vec2 center;\n" +
+            "uniform vec2 scale;\n" +
             "uniform float alpha;\n" +
-            "uniform float bound;\n" +
             "uniform float radius2;\n" +
             "uniform float factor;\n" +
-            "uniform float inv_height;\n" +
-            "uniform float inv_width;\n" +
             "varying vec2 v_texcoord;\n" +
             "void main() {\n" +
             "  const float m_pi_2 = 1.570963;\n" +
-            "  float dist = distance(gl_FragCoord.xy, center);\n" +
+            "  vec2 coord = v_texcoord - vec2(0.5, 0.5);\n" +
+            "  float dist = length(coord * scale);\n" +
             "  float radian = m_pi_2 - atan(alpha * sqrt(radius2 - dist * dist), dist);\n" +
-            "  float scale = radian * factor / dist;\n" +
-            "  vec2 new_coord = gl_FragCoord.xy * scale + (1.0 - scale) * center;\n" +
-            "  new_coord.x *= inv_width;\n" +
-            "  new_coord.y *= inv_height;\n" +
-            "  vec4 color = texture2D(tex_sampler_0, new_coord);\n" +
-            "  gl_FragColor = color;\n" +
+            "  float scalar = radian * factor / dist;\n" +
+            "  vec2 new_coord = coord * scalar + vec2(0.5, 0.5);\n" +
+            "  gl_FragColor = texture2D(tex_sampler_0, new_coord);\n" +
             "}\n";
 
     public FisheyeFilter(String name) {
@@ -145,12 +140,6 @@
     }
 
     private void updateFrameSize(int width, int height) {
-        float center[] = {0.5f * width, 0.5f * height};
-
-        mProgram.setHostValue("center", center);
-        mProgram.setHostValue("inv_width", 1.0f / width);
-        mProgram.setHostValue("inv_height", 1.0f / height);
-
         mWidth = width;
         mHeight = height;
 
@@ -159,9 +148,16 @@
 
     private void updateProgramParams() {
         final float pi = 3.14159265f;
-
+        float scale[] = new float[2];
+        if (mWidth > mHeight) {
+          scale[0] = 1f;
+          scale[1] = ((float) mHeight) / mWidth;
+        } else {
+          scale[0] = ((float) mWidth) / mHeight;
+          scale[1] = 1f;
+        }
         float alpha = mScale * 2.0f + 0.75f;
-        float bound2 = 0.25f * (mWidth * mWidth  + mHeight * mHeight);
+        float bound2 = 0.25f * (scale[0] * scale[0] + scale[1] * scale[1]);
         float bound = (float) Math.sqrt(bound2);
         float radius = 1.15f * bound;
         float radius2 = radius * radius;
@@ -169,10 +165,9 @@
             (float) Math.atan(alpha / bound * (float) Math.sqrt(radius2 - bound2));
         float factor = bound / max_radian;
 
+        mProgram.setHostValue("scale", scale);
         mProgram.setHostValue("radius2",radius2);
         mProgram.setHostValue("factor", factor);
-        mProgram.setHostValue("alpha", (float) (mScale * 2.0 + 0.75));
+        mProgram.setHostValue("alpha", alpha);
     }
-
-
 }
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/GrainFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/GrainFilter.java
index f236856..577243a 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/GrainFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/GrainFilter.java
@@ -57,13 +57,15 @@
             "uniform vec2 seed;\n" +
             "varying vec2 v_texcoord;\n" +
             "float rand(vec2 loc) {\n" +
-            "  const float divide = 0.00048828125;\n" +
-            "  const float factor = 2048.0;\n" +
-            "  float value = sin(dot(loc, vec2(12.9898, 78.233)));\n" +
-            "  float residual = mod(dot(mod(loc, divide), vec2(0.9898, 0.233)), divide);\n" +
-            "  float part2 = mod(value, divide);\n" +
-            "  float part1 = value - part2;\n" +
-            "  return fract(0.5453 * part1 + factor * (part2 + residual));\n" +
+            "  float theta1 = dot(loc, vec2(0.9898, 0.233));\n" +
+            "  float theta2 = dot(loc, vec2(12.0, 78.0));\n" +
+            "  float value = cos(theta1) * sin(theta2) + sin(theta1) * cos(theta2);\n" +
+            // keep value of part1 in range: (2^-14 to 2^14).
+            "  float temp = mod(197.0 * value, 1.0) + value;\n" +
+            "  float part1 = mod(220.0 * temp, 1.0) + temp;\n" +
+            "  float part2 = value * 0.5453;\n" +
+            "  float part3 = cos(theta1 + theta2) * 0.43758;\n" +
+            "  return fract(part1 + part2 + part3);\n" +
             "}\n" +
             "void main() {\n" +
             "  gl_FragColor = vec4(rand(v_texcoord + seed), 0.0, 0.0, 1.0);\n" +
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/LomoishFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/LomoishFilter.java
index 22a2ec8..726ffff 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/LomoishFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/LomoishFilter.java
@@ -50,17 +50,19 @@
             "uniform float stepsizeX;\n" +
             "uniform float stepsizeY;\n" +
             "uniform float stepsize;\n" +
-            "uniform vec2 center;\n" +
+            "uniform vec2 scale;\n" +
             "uniform float inv_max_dist;\n" +
             "varying vec2 v_texcoord;\n" +
             "float rand(vec2 loc) {\n" +
-            "  const float divide = 0.00048828125;\n" +
-            "  const float factor = 2048.0;\n" +
-            "  float value = sin(dot(loc, vec2(12.9898, 78.233)));\n" +
-            "  float residual = mod(dot(mod(loc, divide), vec2(0.9898, 0.233)), divide);\n" +
-            "  float part2 = mod(value, divide);\n" +
-            "  float part1 = value - part2;\n" +
-            "  return fract(0.5453 * part1 + factor * (part2 + residual));\n" +
+            "  float theta1 = dot(loc, vec2(0.9898, 0.233));\n" +
+            "  float theta2 = dot(loc, vec2(12.0, 78.0));\n" +
+            "  float value = cos(theta1) * sin(theta2) + sin(theta1) * cos(theta2);\n" +
+            // keep value of part1 in range: (2^-14 to 2^14).
+            "  float temp = mod(197.0 * value, 1.0) + value;\n" +
+            "  float part1 = mod(220.0 * temp, 1.0) + temp;\n" +
+            "  float part2 = value * 0.5453;\n" +
+            "  float part3 = cos(theta1 + theta2) * 0.43758;\n" +
+            "  return fract(part1 + part2 + part3);\n" +
             "}\n" +
             "void main() {\n" +
             // sharpen
@@ -112,7 +114,8 @@
             "  vec3 temp = clamp((color.rgb + stepsize - 0.15) * 1.53846, 0.0, 1.0);\n" +
             "  vec3 bw_color = clamp(xform + (temp - xform) * (dither - 0.5), 0.0, 1.0);\n" +
             // vignette
-            "  float dist = distance(gl_FragCoord.xy, center);\n" +
+            "  coord = v_texcoord - vec2(0.5, 0.5);\n" +
+            "  float dist = length(coord * scale);\n" +
             "  float lumen = 0.85 / (1.0 + exp((dist * inv_max_dist - 0.73) * 20.0)) + 0.15;\n" +
             "  gl_FragColor = vec4(bw_color * lumen, color.a);\n" +
             "}\n";
@@ -150,12 +153,17 @@
 
     private void initParameters() {
         if (mProgram !=null) {
-            float centerX = (float) (0.5 * mWidth);
-            float centerY = (float) (0.5 * mHeight);
-            float center[] = {centerX, centerY};
-            float max_dist = (float) Math.sqrt(centerX * centerX + centerY * centerY);
+            float scale[] = new float[2];
+            if (mWidth > mHeight) {
+                scale[0] = 1f;
+                scale[1] = ((float) mHeight) / mWidth;
+            } else {
+                scale[0] = ((float) mWidth) / mHeight;
+                scale[1] = 1f;
+            }
+            float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f;
 
-            mProgram.setHostValue("center", center);
+            mProgram.setHostValue("scale", scale);
             mProgram.setHostValue("inv_max_dist", 1.0f / max_dist);
 
             mProgram.setHostValue("stepsize", 1.0f / 255.0f);
diff --git a/media/mca/filterpacks/java/android/filterpacks/imageproc/VignetteFilter.java b/media/mca/filterpacks/java/android/filterpacks/imageproc/VignetteFilter.java
index 2d78fff..715fec6 100644
--- a/media/mca/filterpacks/java/android/filterpacks/imageproc/VignetteFilter.java
+++ b/media/mca/filterpacks/java/android/filterpacks/imageproc/VignetteFilter.java
@@ -51,11 +51,12 @@
             "uniform float range;\n" +
             "uniform float inv_max_dist;\n" +
             "uniform float shade;\n" +
-            "uniform vec2 center;\n" +
+            "uniform vec2 scale;\n" +
             "varying vec2 v_texcoord;\n" +
             "void main() {\n" +
             "  const float slope = 20.0;\n" +
-            "  float dist = distance(gl_FragCoord.xy, center);\n" +
+            "  vec2 coord = v_texcoord - vec2(0.5, 0.5);\n" +
+            "  float dist = length(coord * scale);\n" +
             "  float lumen = shade / (1.0 + exp((dist * inv_max_dist - range) * slope)) + (1.0 - shade);\n" +
             "  vec4 color = texture2D(tex_sampler_0, v_texcoord);\n" +
             "  gl_FragColor = vec4(color.rgb * lumen, color.a);\n" +
@@ -93,13 +94,17 @@
 
     private void initParameters() {
         if (mProgram != null) {
-            float centerX = (float) (0.5 * mWidth);
-            float centerY = (float) (0.5 * mHeight);
-            float center[] = {centerX, centerY};
-            float max_dist = (float) Math.sqrt(centerX * centerX + centerY * centerY);
-
-            mProgram.setHostValue("center", center);
-            mProgram.setHostValue("inv_max_dist", 1.0f / max_dist);
+            float scale[] = new float[2];
+            if (mWidth > mHeight) {
+                scale[0] = 1f;
+                scale[1] = ((float) mHeight) / mWidth;
+            } else {
+                scale[0] = ((float) mWidth) / mHeight;
+                scale[1] = 1f;
+            }
+            float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f;
+            mProgram.setHostValue("scale", scale);
+            mProgram.setHostValue("inv_max_dist", 1f / max_dist);
             mProgram.setHostValue("shade", mShade);
 
             updateParameters();
diff --git a/packages/FakeOemFeatures/Android.mk b/packages/FakeOemFeatures/Android.mk
index b0b0eeb..d96bb3d 100644
--- a/packages/FakeOemFeatures/Android.mk
+++ b/packages/FakeOemFeatures/Android.mk
@@ -1,7 +1,7 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_MODULE_TAGS := debug
+LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
diff --git a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
index af88a06..1cd8d50 100644
--- a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
@@ -50,6 +50,8 @@
     private static final int SEARCH_PANEL_HOLD_DURATION = 500;
     static final String TAG = "SearchPanelView";
     static final boolean DEBUG = TabletStatusBar.DEBUG || PhoneStatusBar.DEBUG || false;
+    private static final String ASSIST_ICON_METADATA_NAME =
+            "com.android.systemui.action_assist_icon";
     private final Context mContext;
     private BaseStatusBar mBar;
     private StatusBarTouchProxy mStatusBarTouchProxy;
@@ -168,6 +170,21 @@
         // TODO: fetch views
         mMultiWaveView = (MultiWaveView) findViewById(R.id.multi_wave_view);
         mMultiWaveView.setOnTriggerListener(mMultiWaveViewListener);
+        SearchManager searchManager = getSearchManager();
+        if (searchManager != null) {
+            ComponentName component = searchManager.getGlobalSearchActivity();
+            if (component != null) {
+                if (!mMultiWaveView.replaceTargetDrawablesIfPresent(component,
+                        ASSIST_ICON_METADATA_NAME,
+                        com.android.internal.R.drawable.ic_lockscreen_search)) {
+                    Slog.w(TAG, "Couldn't grab icon from component " + component);
+                }
+            } else {
+                Slog.w(TAG, "No search icon specified in component " + component);
+            }
+        } else {
+            Slog.w(TAG, "No SearchManager");
+        }
     }
 
     private boolean pointInside(int x, int y, View v) {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
index 1302c1f..e1abb23 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
@@ -73,10 +73,16 @@
         return mLinearLayout.getWidth() - getWidth();
     }
 
+    private void addToRecycledViews(View v) {
+        if (mRecycledViews.size() < mNumItemsInOneScreenful) {
+            mRecycledViews.add(v);
+        }
+    }
+
     private void update() {
         for (int i = 0; i < mLinearLayout.getChildCount(); i++) {
             View v = mLinearLayout.getChildAt(i);
-            mRecycledViews.add(v);
+            addToRecycledViews(v);
             mAdapter.recycleView(v);
         }
         LayoutTransition transitioner = getLayoutTransition();
@@ -187,7 +193,7 @@
     }
 
     public void onChildDismissed(View v) {
-        mRecycledViews.add(v);
+        addToRecycledViews(v);
         mLinearLayout.removeView(v);
         if (v.getParent() != null) {
             throw new RuntimeException("Recycled child has parent");
@@ -362,13 +368,13 @@
         child.measure(childWidthMeasureSpec, childheightMeasureSpec);
         mNumItemsInOneScreenful =
                 (int) FloatMath.ceil(dm.widthPixels / (float) child.getMeasuredWidth());
-        mRecycledViews.add(child);
+        addToRecycledViews(child);
         if (child.getParent() != null) {
             throw new RuntimeException("First recycled child has parent");
         }
 
         for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) {
-            mRecycledViews.add(mAdapter.createView(mLinearLayout));
+            addToRecycledViews(mAdapter.createView(mLinearLayout));
             if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) {
                 throw new RuntimeException("Recycled child has parent");
             }
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 587bfe8..34cd397 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -174,6 +174,13 @@
         public View getView(int position, View convertView, ViewGroup parent) {
             if (convertView == null) {
                 convertView = createView(parent);
+                if (convertView.getParent() != null) {
+                    throw new RuntimeException("Recycled child has parent");
+                }
+            } else {
+                if (convertView.getParent() != null) {
+                    throw new RuntimeException("Recycled child has parent");
+                }
             }
             ViewHolder holder = (ViewHolder) convertView.getTag();
 
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
index 6bd1826..9bc54cb 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
@@ -78,9 +78,10 @@
 
     public void addViewCallback(View newLinearLayoutChild) {
         if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
-            final View view = newLinearLayoutChild;
-            view.setDrawingCacheEnabled(true);
-            view.buildDrawingCache();
+            final RecentsPanelView.ViewHolder holder =
+                    (RecentsPanelView.ViewHolder) newLinearLayoutChild.getTag();
+            holder.labelView.setDrawingCacheEnabled(true);
+            holder.labelView.buildDrawingCache();
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
index f682203..33d2a75 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
@@ -74,10 +74,16 @@
         return mLinearLayout.getHeight() - getHeight();
     }
 
+    private void addToRecycledViews(View v) {
+        if (mRecycledViews.size() < mNumItemsInOneScreenful) {
+            mRecycledViews.add(v);
+        }
+    }
+
     private void update() {
         for (int i = 0; i < mLinearLayout.getChildCount(); i++) {
             View v = mLinearLayout.getChildAt(i);
-            mRecycledViews.add(v);
+            addToRecycledViews(v);
             mAdapter.recycleView(v);
         }
         LayoutTransition transitioner = getLayoutTransition();
@@ -203,7 +209,7 @@
     }
 
     public void onChildDismissed(View v) {
-        mRecycledViews.add(v);
+        addToRecycledViews(v);
         mLinearLayout.removeView(v);
         if (v.getParent() != null) {
             throw new RuntimeException("Recycled child has parent");
@@ -380,13 +386,13 @@
         child.measure(childWidthMeasureSpec, childheightMeasureSpec);
         mNumItemsInOneScreenful =
                 (int) FloatMath.ceil(dm.heightPixels / (float) child.getMeasuredHeight());
-        mRecycledViews.add(child);
+        addToRecycledViews(child);
         if (child.getParent() != null) {
             throw new RuntimeException("First recycled child has parent");
         }
 
         for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) {
-            mRecycledViews.add(mAdapter.createView(mLinearLayout));
+            addToRecycledViews(mAdapter.createView(mLinearLayout));
             if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) {
                 throw new RuntimeException("Recycled child has parent");
             }
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 8795154..c09e4c4 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -188,10 +188,16 @@
             Intent sharingIntent = new Intent(Intent.ACTION_SEND);
             sharingIntent.setType("image/png");
             sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);
-            sharingIntent.setFlags(Intent.FLAG_ACTIVITY_CLOSE_SYSTEM_DIALOGS);
+
+            Intent chooserIntent = Intent.createChooser(sharingIntent, null);
+            chooserIntent.addFlags(Intent.FLAG_ACTIVITY_CLOSE_SYSTEM_DIALOGS
+                    | Intent.FLAG_ACTIVITY_CLEAR_TASK 
+                    | Intent.FLAG_ACTIVITY_NEW_TASK);
+
             mNotificationBuilder.addAction(R.drawable.ic_menu_share,
                      r.getString(com.android.internal.R.string.share),
-                     PendingIntent.getActivity(context, 0, sharingIntent, 0));
+                     PendingIntent.getActivity(context, 0, chooserIntent, 
+                             PendingIntent.FLAG_CANCEL_CURRENT));
 
             OutputStream out = resolver.openOutputStream(uri);
             image.compress(Bitmap.CompressFormat.PNG, 100, out);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 7ee7e62..6842b17 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1067,6 +1067,9 @@
     }
 
     private static void makeSlippery(View view, boolean slippery) {
+        if (view == null) {
+            return;
+        }
         WindowManager.LayoutParams lp = (WindowManager.LayoutParams) view.getLayoutParams();
         if (slippery) {
             lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 584a69e4..273076c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -127,6 +127,7 @@
     private static final int INET_CONDITION_THRESHOLD = 50;
 
     private boolean mAirplaneMode = false;
+    private boolean mLastAirplaneMode = true;
 
     // our ui
     Context mContext;
@@ -1062,7 +1063,8 @@
          || mLastDataDirectionOverlayIconId != combinedActivityIconId
          || mLastWifiIconId                 != mWifiIconId
          || mLastWimaxIconId                != mWimaxIconId
-         || mLastDataTypeIconId             != mDataTypeIconId)
+         || mLastDataTypeIconId             != mDataTypeIconId
+         || mLastAirplaneMode               != mAirplaneMode)
         {
             // NB: the mLast*s will be updated later
             for (SignalCluster cluster : mSignalClusters) {
@@ -1070,6 +1072,10 @@
             }
         }
 
+        if (mLastAirplaneMode != mAirplaneMode) {
+            mLastAirplaneMode = mAirplaneMode;
+        }
+
         // the phone icon on phones
         if (mLastPhoneSignalIconId != mPhoneSignalIconId) {
             mLastPhoneSignalIconId = mPhoneSignalIconId;
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 30cb530..d37207c 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -62,6 +62,8 @@
     private static final String ENABLE_MENU_KEY_FILE = "/data/local/enable_menu_key";
     private static final int WAIT_FOR_ANIMATION_TIMEOUT = 0;
     private static final int STAY_ON_WHILE_GRABBED_TIMEOUT = 30000;
+    private static final String ASSIST_ICON_METADATA_NAME =
+            "com.android.systemui.action_assist_icon";
 
     private LockPatternUtils mLockPatternUtils;
     private KeyguardUpdateMonitor mUpdateMonitor;
@@ -290,8 +292,6 @@
 
         MultiWaveViewMethods(MultiWaveView multiWaveView) {
             mMultiWaveView = multiWaveView;
-
-            // TODO: get search icon.  See Launcher.updateGlobalSearchIcon()
         }
 
         public boolean isTargetPresent(int resId) {
@@ -310,6 +310,26 @@
             if (mMultiWaveView.getTargetResourceId() != resId) {
                 mMultiWaveView.setTargetResources(resId);
             }
+
+            // Update the search icon with drawable from the search .apk
+            if (!mSearchDisabled) {
+                SearchManager searchManager = getSearchManager();
+                if (searchManager != null) {
+                    ComponentName component = searchManager.getGlobalSearchActivity();
+                    if (component != null) {
+                        if (!mMultiWaveView.replaceTargetDrawablesIfPresent(component,
+                                ASSIST_ICON_METADATA_NAME,
+                                com.android.internal.R.drawable.ic_lockscreen_search)) {
+                            Slog.w(TAG, "Couldn't grab icon from package " + component);
+                        }
+                    } else {
+                        Slog.w(TAG, "No search icon specified in package " + component);
+                    }
+                } else {
+                    Slog.w(TAG, "No SearchManager");
+                }
+            }
+
             setEnabled(com.android.internal.R.drawable.ic_lockscreen_camera, !mCameraDisabled);
             setEnabled(com.android.internal.R.drawable.ic_lockscreen_search, !mSearchDisabled);
         }
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 52ba665..f6d3b608 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -494,10 +494,11 @@
             String action = intent.getAction();
 
             boolean queryRestart = false;
+            boolean packageChanged = false;
             
             if (action.equals(Intent.ACTION_PACKAGE_REMOVED)
                     || action.equals(Intent.ACTION_PACKAGE_RESTARTED)
-                    || action.equals(Intent.ACTION_PACKAGE_CHANGED)
+                    || (packageChanged=action.equals(Intent.ACTION_PACKAGE_CHANGED))
                     || (queryRestart=action.equals(Intent.ACTION_QUERY_PACKAGE_RESTART))
                     || action.equals(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE)) {
                 String pkgList[] = null;
@@ -514,6 +515,15 @@
                     if (pkgName == null) {
                         return;
                     }
+                    if (packageChanged) {
+                        // We cancel notifications for packages which have just been disabled
+                        final int enabled = mContext.getPackageManager()
+                                .getApplicationEnabledSetting(pkgName);
+                        if (enabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+                                || enabled == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
+                            return;
+                        }
+                    }
                     pkgList = new String[]{pkgName};
                 }
                 if (pkgList != null && (pkgList.length > 0)) {
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 469b4f1..5aa0d16 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -2285,6 +2285,10 @@
 
         public void animateTo(int target, int sensorTarget, int mask, int animationDuration) {
             synchronized(this) {
+                if (isAnimating() && (mask ^ currentMask) != 0) {
+                    // current animation is unrelated to new animation, jump to final values
+                    cancelAnimation();
+                }
                 startValue = currentValue;
                 endValue = target;
                 startSensorValue = mHighestLightSensorValue;
@@ -2409,7 +2413,8 @@
 
     private boolean isScreenTurningOffLocked() {
         return (mScreenBrightnessAnimator.isAnimating()
-                && mScreenBrightnessAnimator.endValue == PowerManager.BRIGHTNESS_OFF);
+                && mScreenBrightnessAnimator.endValue == PowerManager.BRIGHTNESS_OFF
+                && (mScreenBrightnessAnimator.currentMask & SCREEN_BRIGHT_BIT) != 0);
     }
 
     private boolean shouldLog(long time) {
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java
index 4c38ab9..67bdabd 100644
--- a/services/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/java/com/android/server/accessibility/TouchExplorer.java
@@ -1247,25 +1247,45 @@
 
         @Override
         public void run() {
-            final int pointerIndex = mEvent.getActionIndex();
+            // If the last touched explored location is not within the focused
+            // window we will long press at that exact spot, otherwise we find the
+            // accessibility focus and if the tap is within its bounds we long press
+            // there, otherwise we pick the middle of the focus rectangle.
+            MotionEvent lastEvent = mInjectedPointerTracker.getLastInjectedHoverEvent();
+            if (lastEvent == null) {
+                return;
+            }
+
+            final int exploreLocationX = (int) lastEvent.getX(lastEvent.getActionIndex());
+            final int exploreLocationY = (int) lastEvent.getY(lastEvent.getActionIndex());
+
+            Rect bounds = mTempRect;
+            boolean useFocusedBounds = false;
+
+            final int pointerId = mEvent.getPointerId(mEvent.getActionIndex());
+            final int pointerIndex = mEvent.findPointerIndex(pointerId);
+            if (mAms.getAccessibilityFocusBounds(exploreLocationX, exploreLocationY, bounds)) {
+                // If the user's last touch explored location is not
+                // within the accessibility focus bounds we use the center
+                // of the accessibility focused rectangle.
+                if (!bounds.contains((int) mEvent.getX(pointerIndex),
+                        (int) mEvent.getY(pointerIndex))) {
+                    useFocusedBounds = true;
+                }
+            }
+
+            mLongPressingPointerId = mEvent.getPointerId(pointerIndex);
+
             final int eventX = (int) mEvent.getX(pointerIndex);
             final int eventY = (int) mEvent.getY(pointerIndex);
-            Rect bounds = mTempRect;
-            if (mAms.getAccessibilityFocusBounds(eventX, eventY, bounds)
-                    && !bounds.contains(eventX, eventY)) {
-                mLongPressingPointerId = mEvent.getPointerId(pointerIndex);
+            if (useFocusedBounds) {
                 mLongPressingPointerDeltaX = eventX - bounds.centerX();
                 mLongPressingPointerDeltaY = eventY - bounds.centerY();
             } else {
-                mLongPressingPointerId = -1;
-                mLongPressingPointerDeltaX = 0;
-                mLongPressingPointerDeltaY = 0;
+                mLongPressingPointerDeltaX = eventX - exploreLocationX;
+                mLongPressingPointerDeltaY = eventY - exploreLocationY;
             }
-            // We are sending events so send exit and gesture
-            // end since we transition to another state.
-            final int pointerId = mReceivedPointerTracker.getPrimaryActivePointerId();
-            final int pointerIdBits = (1 << pointerId);
-            mAms.touchExplorationGestureEnded();
+
             sendExitEventsIfNeeded(mPolicyFlags);
 
             mCurrentState = STATE_DELEGATING;
diff --git a/services/java/com/android/server/pm/ShutdownThread.java b/services/java/com/android/server/pm/ShutdownThread.java
index 1d6e068..69406c8 100644
--- a/services/java/com/android/server/pm/ShutdownThread.java
+++ b/services/java/com/android/server/pm/ShutdownThread.java
@@ -51,11 +51,11 @@
 public final class ShutdownThread extends Thread {
     // constants
     private static final String TAG = "ShutdownThread";
-    private static final int MAX_NUM_PHONE_STATE_READS = 24;
     private static final int PHONE_STATE_POLL_SLEEP_MSEC = 500;
     // maximum time we wait for the shutdown broadcast before going on.
     private static final int MAX_BROADCAST_TIME = 10*1000;
     private static final int MAX_SHUTDOWN_WAIT_TIME = 20*1000;
+    private static final int MAX_RADIO_WAIT_TIME = 12*1000;
 
     // length of vibration before shutting down
     private static final int SHUTDOWN_VIBRATE_MS = 500;
@@ -263,10 +263,6 @@
      * Shuts off power regardless of radio and bluetooth state if the alloted time has passed.
      */
     public void run() {
-        boolean nfcOff;
-        boolean bluetoothOff;
-        boolean radioOff;
-
         BroadcastReceiver br = new BroadcastReceiver() {
             @Override public void onReceive(Context context, Intent intent) {
                 // We don't allow apps to cancel this, so ignore the result.
@@ -324,89 +320,9 @@
             } catch (RemoteException e) {
             }
         }
-        
-        final INfcAdapter nfc =
-                INfcAdapter.Stub.asInterface(ServiceManager.checkService("nfc"));
-        final ITelephony phone =
-                ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
-        final IBluetooth bluetooth =
-                IBluetooth.Stub.asInterface(ServiceManager.checkService(
-                        BluetoothAdapter.BLUETOOTH_SERVICE));
-        final IMountService mount =
-                IMountService.Stub.asInterface(
-                        ServiceManager.checkService("mount"));
 
-        try {
-            nfcOff = nfc == null ||
-                     nfc.getState() == NfcAdapter.STATE_OFF;
-            if (!nfcOff) {
-                Log.w(TAG, "Turning off NFC...");
-                nfc.disable(false); // Don't persist new state
-            }
-        } catch (RemoteException ex) {
-	    Log.e(TAG, "RemoteException during NFC shutdown", ex);
-            nfcOff = true;
-        }
-
-        try {
-            bluetoothOff = bluetooth == null ||
-                           bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF;
-            if (!bluetoothOff) {
-                Log.w(TAG, "Disabling Bluetooth...");
-                bluetooth.disable(false);  // disable but don't persist new state
-            }
-        } catch (RemoteException ex) {
-            Log.e(TAG, "RemoteException during bluetooth shutdown", ex);
-            bluetoothOff = true;
-        }
-
-        try {
-            radioOff = phone == null || !phone.isRadioOn();
-            if (!radioOff) {
-                Log.w(TAG, "Turning off radio...");
-                phone.setRadio(false);
-            }
-        } catch (RemoteException ex) {
-            Log.e(TAG, "RemoteException during radio shutdown", ex);
-            radioOff = true;
-        }
-
-        Log.i(TAG, "Waiting for NFC, Bluetooth and Radio...");
-        
-        // Wait a max of 32 seconds for clean shutdown
-        for (int i = 0; i < MAX_NUM_PHONE_STATE_READS; i++) {
-            if (!bluetoothOff) {
-                try {
-                    bluetoothOff =
-                            bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF;
-                } catch (RemoteException ex) {
-                    Log.e(TAG, "RemoteException during bluetooth shutdown", ex);
-                    bluetoothOff = true;
-                }
-            }
-            if (!radioOff) {
-                try {
-                    radioOff = !phone.isRadioOn();
-                } catch (RemoteException ex) {
-                    Log.e(TAG, "RemoteException during radio shutdown", ex);
-                    radioOff = true;
-                }
-            }
-            if (!nfcOff) {
-                try {
-                    nfcOff = nfc.getState() == NfcAdapter.STATE_OFF;
-                } catch (RemoteException ex) {
-                    Log.e(TAG, "RemoteException during NFC shutdown", ex);
-                    nfcOff = true;
-                }
-            }
-
-            if (radioOff && bluetoothOff && nfcOff) {
-                Log.i(TAG, "NFC, Radio and Bluetooth shutdown complete.");
-                break;
-            }
-            SystemClock.sleep(PHONE_STATE_POLL_SLEEP_MSEC);
-        }
+        // Shutdown radios.
+        shutdownRadios(MAX_RADIO_WAIT_TIME);
 
         // Shutdown MountService to ensure media is in a safe state
         IMountShutdownObserver observer = new IMountShutdownObserver.Stub() {
@@ -417,11 +333,14 @@
         };
 
         Log.i(TAG, "Shutting down MountService");
+
         // Set initial variables and time out time.
         mActionDone = false;
         final long endShutTime = SystemClock.elapsedRealtime() + MAX_SHUTDOWN_WAIT_TIME;
         synchronized (mActionDoneSync) {
             try {
+                final IMountService mount = IMountService.Stub.asInterface(
+                        ServiceManager.checkService("mount"));
                 if (mount != null) {
                     mount.shutdown(observer);
                 } else {
@@ -446,6 +365,118 @@
         rebootOrShutdown(mReboot, mRebootReason);
     }
 
+    private void shutdownRadios(int timeout) {
+        // If a radio is wedged, disabling it may hang so we do this work in another thread,
+        // just in case.
+        final long endTime = SystemClock.elapsedRealtime() + timeout;
+        final boolean[] done = new boolean[1];
+        Thread t = new Thread() {
+            public void run() {
+                boolean nfcOff;
+                boolean bluetoothOff;
+                boolean radioOff;
+
+                final INfcAdapter nfc =
+                        INfcAdapter.Stub.asInterface(ServiceManager.checkService("nfc"));
+                final ITelephony phone =
+                        ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
+                final IBluetooth bluetooth =
+                        IBluetooth.Stub.asInterface(ServiceManager.checkService(
+                                BluetoothAdapter.BLUETOOTH_SERVICE));
+
+                try {
+                    nfcOff = nfc == null ||
+                             nfc.getState() == NfcAdapter.STATE_OFF;
+                    if (!nfcOff) {
+                        Log.w(TAG, "Turning off NFC...");
+                        nfc.disable(false); // Don't persist new state
+                    }
+                } catch (RemoteException ex) {
+                Log.e(TAG, "RemoteException during NFC shutdown", ex);
+                    nfcOff = true;
+                }
+
+                try {
+                    bluetoothOff = bluetooth == null ||
+                                   bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF;
+                    if (!bluetoothOff) {
+                        Log.w(TAG, "Disabling Bluetooth...");
+                        bluetooth.disable(false);  // disable but don't persist new state
+                    }
+                } catch (RemoteException ex) {
+                    Log.e(TAG, "RemoteException during bluetooth shutdown", ex);
+                    bluetoothOff = true;
+                }
+
+                try {
+                    radioOff = phone == null || !phone.isRadioOn();
+                    if (!radioOff) {
+                        Log.w(TAG, "Turning off radio...");
+                        phone.setRadio(false);
+                    }
+                } catch (RemoteException ex) {
+                    Log.e(TAG, "RemoteException during radio shutdown", ex);
+                    radioOff = true;
+                }
+
+                Log.i(TAG, "Waiting for NFC, Bluetooth and Radio...");
+
+                while (SystemClock.elapsedRealtime() < endTime) {
+                    if (!bluetoothOff) {
+                        try {
+                            bluetoothOff =
+                                    bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF;
+                        } catch (RemoteException ex) {
+                            Log.e(TAG, "RemoteException during bluetooth shutdown", ex);
+                            bluetoothOff = true;
+                        }
+                        if (bluetoothOff) {
+                            Log.i(TAG, "Bluetooth turned off.");
+                        }
+                    }
+                    if (!radioOff) {
+                        try {
+                            radioOff = !phone.isRadioOn();
+                        } catch (RemoteException ex) {
+                            Log.e(TAG, "RemoteException during radio shutdown", ex);
+                            radioOff = true;
+                        }
+                        if (radioOff) {
+                            Log.i(TAG, "Radio turned off.");
+                        }
+                    }
+                    if (!nfcOff) {
+                        try {
+                            nfcOff = nfc.getState() == NfcAdapter.STATE_OFF;
+                        } catch (RemoteException ex) {
+                            Log.e(TAG, "RemoteException during NFC shutdown", ex);
+                            nfcOff = true;
+                        }
+                        if (radioOff) {
+                            Log.i(TAG, "NFC turned off.");
+                        }
+                    }
+
+                    if (radioOff && bluetoothOff && nfcOff) {
+                        Log.i(TAG, "NFC, Radio and Bluetooth shutdown complete.");
+                        done[0] = true;
+                        break;
+                    }
+                    SystemClock.sleep(PHONE_STATE_POLL_SLEEP_MSEC);
+                }
+            }
+        };
+
+        t.start();
+        try {
+            t.join(timeout);
+        } catch (InterruptedException ex) {
+        }
+        if (!done[0]) {
+            Log.w(TAG, "Timed out waiting for NFC, Radio and Bluetooth shutdown.");
+        }
+    }
+
     /**
      * Do not call this directly. Use {@link #reboot(Context, String, boolean)}
      * or {@link #shutdown(Context, boolean)} instead.
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index efbf0d4..2053299 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8078,7 +8078,7 @@
                 }
                 if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
                         "New transit: " + transit);
-            } else if ((oldWallpaper != null) && (oldWallpaper != mWallpaperTarget)) {
+            } else if (oldWallpaper != null) {
                 // We are transitioning from an activity with
                 // a wallpaper to one without.
                 transit = WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE;
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index c800182..806730c 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -897,7 +897,11 @@
                     break;
                 case WifiMonitor.P2P_DEVICE_LOST_EVENT:
                     WifiP2pDevice device = (WifiP2pDevice) message.obj;
-                    if (!mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
+
+                    // If we lose a device during an autonomous group creation,
+                    // mSavedPeerConfig can be empty
+                    if (mSavedPeerConfig != null &&
+                            !mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
                         // Do the regular device lost handling
                         ret = NOT_HANDLED;
                         break;