Merge "Remove translations that contain mangled format strings."
diff --git a/api/current.txt b/api/current.txt
index c70cea8..3ea70b7 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -14658,6 +14658,7 @@
     method public int describeContents();
     method public int detachFd();
     method public static android.os.ParcelFileDescriptor dup(java.io.FileDescriptor) throws java.io.IOException;
+    method public android.os.ParcelFileDescriptor dup() throws java.io.IOException;
     method public static android.os.ParcelFileDescriptor fromDatagramSocket(java.net.DatagramSocket);
     method public static android.os.ParcelFileDescriptor fromFd(int) throws java.io.IOException;
     method public static android.os.ParcelFileDescriptor fromSocket(java.net.Socket);
@@ -16036,6 +16037,12 @@
     field public static final java.lang.String GROUP_SOURCE_ID = "group_sourceid";
   }
 
+  public static final class ContactsContract.CommonDataKinds.Identity implements android.provider.ContactsContract.DataColumnsWithJoins {
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/identity";
+    field public static final java.lang.String IDENTITY = "data1";
+    field public static final java.lang.String NAMESPACE = "data2";
+  }
+
   public static final class ContactsContract.CommonDataKinds.Im implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getProtocolLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getProtocolLabelResource(int);
@@ -20729,7 +20736,7 @@
     method public void writeToParcel(android.os.Parcel, int);
   }
 
-  public class SuggestionSpan implements android.text.ParcelableSpan {
+  public class SuggestionSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan {
     ctor public SuggestionSpan(android.content.Context, java.lang.String[], int);
     ctor public SuggestionSpan(java.util.Locale, java.lang.String[], int);
     ctor public SuggestionSpan(android.content.Context, java.util.Locale, java.lang.String[], int, java.lang.Class<?>);
@@ -20739,10 +20746,12 @@
     method public java.lang.String getLocale();
     method public int getSpanTypeId();
     method public java.lang.String[] getSuggestions();
+    method public void updateDrawState(android.text.TextPaint);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final java.lang.String ACTION_SUGGESTION_PICKED = "android.text.style.SUGGESTION_PICKED";
     field public static final android.os.Parcelable.Creator CREATOR;
-    field public static final int FLAG_VERBATIM = 1; // 0x1
+    field public static final int FLAG_EASY_CORRECT = 1; // 0x1
+    field public static final int FLAG_MISSPELLED = 2; // 0x2
     field public static final int SUGGESTIONS_MAX_SIZE = 5; // 0x5
     field public static final java.lang.String SUGGESTION_SPAN_PICKED_AFTER = "after";
     field public static final java.lang.String SUGGESTION_SPAN_PICKED_BEFORE = "before";
@@ -22478,12 +22487,14 @@
     method public android.graphics.Bitmap getBitmap(android.graphics.Bitmap);
     method public android.graphics.SurfaceTexture getSurfaceTexture();
     method public android.view.TextureView.SurfaceTextureListener getSurfaceTextureListener();
+    method public android.graphics.Matrix getTransform(android.graphics.Matrix);
     method public boolean isAvailable();
     method public android.graphics.Canvas lockCanvas();
     method public android.graphics.Canvas lockCanvas(android.graphics.Rect);
     method protected final void onDraw(android.graphics.Canvas);
     method public void setOpaque(boolean);
     method public void setSurfaceTextureListener(android.view.TextureView.SurfaceTextureListener);
+    method public void setTransform(android.graphics.Matrix);
     method public void unlockCanvasAndPost(android.graphics.Canvas);
   }
 
@@ -23470,6 +23481,7 @@
     method public abstract void setTitleColor(int);
     method public void setType(int);
     method public void setUiOptions(int);
+    method public void setUiOptions(int, int);
     method public abstract void setVolumeControlStream(int);
     method public void setWindowAnimations(int);
     method public void setWindowManager(android.view.WindowManager, android.os.IBinder, java.lang.String);
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 6dfa12b..293116cb 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -28,6 +28,8 @@
 import android.content.Context;
 import android.content.IIntentReceiver;
 import android.content.Intent;
+import android.content.pm.IPackageManager;
+import android.content.pm.ResolveInfo;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
@@ -44,8 +46,8 @@
 import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
 
 public class Am {
 
@@ -56,6 +58,10 @@
 
     private boolean mDebugOption = false;
     private boolean mWaitOption = false;
+    private boolean mStopOption = false;
+
+    private String mProfileFile;
+    private boolean mProfileAutoStop;
 
     // These are magic strings understood by the Eclipse plugin.
     private static final String FATAL_ERROR_CODE = "Error type 1";
@@ -74,7 +80,7 @@
             showUsage();
             System.err.println("Error: " + e.getMessage());
         } catch (Exception e) {
-            System.err.println(e.toString());
+            e.printStackTrace(System.err);
             System.exit(1);
         }
     }
@@ -126,6 +132,8 @@
 
         mDebugOption = false;
         mWaitOption = false;
+        mStopOption = false;
+        mProfileFile = null;
         Uri data = null;
         String type = null;
 
@@ -249,6 +257,14 @@
                 mDebugOption = true;
             } else if (opt.equals("-W")) {
                 mWaitOption = true;
+            } else if (opt.equals("-P")) {
+                mProfileFile = nextArgRequired();
+                mProfileAutoStop = true;
+            } else if (opt.equals("--start-profiler")) {
+                mProfileFile = nextArgRequired();
+                mProfileAutoStop = false;
+            } else if (opt.equals("-S")) {
+                mStopOption = true;
             } else {
                 System.err.println("Error: Unknown option: " + opt);
                 showUsage();
@@ -257,23 +273,43 @@
         }
         intent.setDataAndType(data, type);
 
-        String uri = nextArg();
-        if (uri != null) {
-            Intent oldIntent = intent;
-            intent = Intent.parseUri(uri, 0);
-            if (oldIntent.getAction() != null) {
-                intent.setAction(oldIntent.getAction());
+        String arg = nextArg();
+        if (arg != null) {
+            Intent baseIntent;
+            if (arg.indexOf(':') >= 0) {
+                // The argument is a URI.  Fully parse it, and use that result
+                // to fill in any data not specified so far.
+                baseIntent = Intent.parseUri(arg, Intent.URI_INTENT_SCHEME);
+            } else if (arg.indexOf('/') >= 0) {
+                // The argument is a component name.  Build an Intent to launch
+                // it.
+                baseIntent = new Intent(Intent.ACTION_MAIN);
+                baseIntent.addCategory(Intent.CATEGORY_LAUNCHER);
+                baseIntent.setComponent(ComponentName.unflattenFromString(arg));
+            } else {
+                // Assume the argument is a package name.
+                baseIntent = new Intent(Intent.ACTION_MAIN);
+                baseIntent.addCategory(Intent.CATEGORY_LAUNCHER);
+                baseIntent.setPackage(arg);
             }
-            if (oldIntent.getData() != null || oldIntent.getType() != null) {
-                intent.setDataAndType(oldIntent.getData(), oldIntent.getType());
-            }
-            Set cats = oldIntent.getCategories();
-            if (cats != null) {
-                Iterator it = cats.iterator();
-                while (it.hasNext()) {
-                    intent.addCategory((String)it.next());
+            Bundle extras = intent.getExtras();
+            intent.replaceExtras((Bundle)null);
+            Bundle uriExtras = baseIntent.getExtras();
+            baseIntent.replaceExtras((Bundle)null);
+            if (intent.getAction() != null && baseIntent.getCategories() != null) {
+                HashSet<String> cats = new HashSet<String>(baseIntent.getCategories());
+                for (String c : cats) {
+                    baseIntent.removeCategory(c);
                 }
             }
+            intent.fillIn(baseIntent, Intent.FILL_IN_COMPONENT);
+            if (extras == null) {
+                extras = uriExtras;
+            } else if (uriExtras != null) {
+                uriExtras.putAll(extras);
+                extras = uriExtras;
+            }
+            intent.replaceExtras(extras);
             hasIntentInfo = true;
         }
 
@@ -292,18 +328,70 @@
 
     private void runStart() throws Exception {
         Intent intent = makeIntent();
+
+        String mimeType = intent.getType();
+        if (mimeType == null && intent.getData() != null
+                && "content".equals(intent.getData().getScheme())) {
+            mimeType = mAm.getProviderMimeType(intent.getData());
+        }
+
+        if (mStopOption) {
+            String packageName;
+            if (intent.getComponent() != null) {
+                packageName = intent.getComponent().getPackageName();
+            } else {
+                IPackageManager pm = IPackageManager.Stub.asInterface(
+                        ServiceManager.getService("package"));
+                if (pm == null) {
+                    System.err.println("Error: Package manager not running; aborting");
+                    return;
+                }
+                List<ResolveInfo> activities = pm.queryIntentActivities(intent, mimeType, 0);
+                if (activities == null || activities.size() <= 0) {
+                    System.err.println("Error: Intent does not match any activities: "
+                            + intent);
+                    return;
+                } else if (activities.size() > 1) {
+                    System.err.println("Error: Intent matches multiple activities; can't stop: "
+                            + intent);
+                    return;
+                }
+                packageName = activities.get(0).activityInfo.packageName;
+            }
+            System.out.println("Stopping: " + packageName);
+            mAm.forceStopPackage(packageName);
+            Thread.sleep(250);
+        }
+
         System.out.println("Starting: " + intent);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        // XXX should do something to determine the MIME type.
+
+        ParcelFileDescriptor fd = null;
+
+        if (mProfileFile != null) {
+            try {
+                fd = ParcelFileDescriptor.open(
+                        new File(mProfileFile),
+                        ParcelFileDescriptor.MODE_CREATE |
+                        ParcelFileDescriptor.MODE_TRUNCATE |
+                        ParcelFileDescriptor.MODE_READ_WRITE);
+            } catch (FileNotFoundException e) {
+                System.err.println("Error: Unable to open file: " + mProfileFile);
+                return;
+            }
+        }
+
         IActivityManager.WaitResult result = null;
         int res;
         if (mWaitOption) {
-            result = mAm.startActivityAndWait(null, intent, intent.getType(),
-                        null, 0, null, null, 0, false, mDebugOption);
+            result = mAm.startActivityAndWait(null, intent, mimeType,
+                        null, 0, null, null, 0, false, mDebugOption,
+                        mProfileFile, fd, mProfileAutoStop);
             res = result.result;
         } else {
-            res = mAm.startActivity(null, intent, intent.getType(),
-                    null, 0, null, null, 0, false, mDebugOption);
+            res = mAm.startActivity(null, intent, mimeType,
+                    null, 0, null, null, 0, false, mDebugOption,
+                    mProfileFile, fd, mProfileAutoStop);
         }
         PrintStream out = mWaitOption ? System.out : System.err;
         boolean launched = false;
@@ -483,7 +571,7 @@
             wall = "--wall".equals(nextOption());
             process = nextArgRequired();
         } else if ("stop".equals(cmd)) {
-            process = nextArgRequired();
+            process = nextArg();
         } else {
             // Compatibility with old syntax: process is specified first.
             process = cmd;
@@ -1076,14 +1164,14 @@
     private static void showUsage() {
         System.err.println(
                 "usage: am [subcommand] [options]\n" +
-                "usage: am start [-D] [-W] <INTENT>\n" +
+                "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] [-S] <INTENT>\n" +
                 "       am startservice <INTENT>\n" +
                 "       am force-stop <PACKAGE>\n" +
                 "       am broadcast <INTENT>\n" +
-                "       am instrument [-r] [-e <NAME> <VALUE>] [-p] [-w]\n" +
+                "       am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]\n" +
                 "               [--no-window-animation] <COMPONENT>\n" +
                 "       am profile [looper] start <PROCESS> <FILE>\n" +
-                "       am profile [looper] stop <PROCESS>\n" +
+                "       am profile [looper] stop [<PROCESS>]\n" +
                 "       am dumpheap [flags] <PROCESS> <FILE>\n" +
                 "       am monitor [--gdb <port>]\n" +
                 "       am screen-compat [on|off] <PACKAGE>\n" +
@@ -1092,6 +1180,9 @@
                 "am start: start an Activity.  Options are:\n" +
                 "    -D: enable debugging\n" +
                 "    -W: wait for launch to complete\n" +
+                "    --start-profiler <FILE>: start profiler and send results to <FILE>\n" +
+                "    -P <FILE>: like above, but profiling stops when app goes idle\n" +
+                "    -S: force stop the target app before starting the activity\n" +
                 "\n" +
                 "am startservice: start a Service.\n" +
                 "\n" +
@@ -1146,7 +1237,7 @@
                 "    [--activity-single-top] [--activity-clear-task]\n" +
                 "    [--activity-task-on-home]\n" +
                 "    [--receiver-registered-only] [--receiver-replace-pending]\n" +
-                "    [<URI>]\n"
+                "    [<URI> | <PACKAGE> | <COMPONENT>]\n"
                 );
     }
 }
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index ccd668d..d816e7c 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -37,7 +37,6 @@
 #include <ui/Region.h>
 #include <ui/DisplayInfo.h>
 #include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
 
 #include <surfaceflinger/ISurfaceComposer.h>
 #include <surfaceflinger/ISurfaceComposerClient.h>
@@ -222,6 +221,9 @@
 
     // initialize opengl and egl
     const EGLint attribs[] = {
+            EGL_RED_SIZE,   8,
+            EGL_GREEN_SIZE, 8,
+            EGL_BLUE_SIZE,  8,
             EGL_DEPTH_SIZE, 0,
             EGL_NONE
     };
@@ -234,7 +236,7 @@
     EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
 
     eglInitialize(display, 0, 0);
-    EGLUtils::selectConfigForNativeWindow(display, attribs, s.get(), &config);
+    eglChooseConfig(display, attribs, &config, 1, &numConfigs);
     surface = eglCreateWindowSurface(display, config, s.get(), NULL);
     context = eglCreateContext(display, config, NULL, NULL);
     eglQuerySurface(display, surface, EGL_WIDTH, &w);
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index c980715..0ec007c 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -772,18 +772,33 @@
             }
         }
 
-        String apkFilePath = nextArg();
+        final Uri apkURI;
+        final Uri verificationURI;
+
+        // Populate apkURI, must be present
+        final String apkFilePath = nextArg();
         System.err.println("\tpkg: " + apkFilePath);
-        if (apkFilePath == null) {
+        if (apkFilePath != null) {
+            apkURI = Uri.fromFile(new File(apkFilePath));
+        } else {
             System.err.println("Error: no package specified");
             showUsage();
             return;
         }
 
+        // Populate verificationURI, optionally present
+        final String verificationFilePath = nextArg();
+        if (verificationFilePath != null) {
+            System.err.println("\tver: " + verificationFilePath);
+            verificationURI = Uri.fromFile(new File(verificationFilePath));
+        } else {
+            verificationURI = null;
+        }
+
         PackageInstallObserver obs = new PackageInstallObserver();
         try {
-            mPm.installPackage(Uri.fromFile(new File(apkFilePath)), obs, installFlags,
-                    installerPackageName);
+            mPm.installPackageWithVerification(apkURI, obs, installFlags, installerPackageName,
+                    verificationURI, null);
 
             synchronized (obs) {
                 while (!obs.finished) {
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 929867b..1271ddd 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -3353,7 +3353,8 @@
                             intent, intent.resolveTypeIfNeeded(
                                     getContentResolver()),
                             null, 0,
-                            mToken, mEmbeddedID, requestCode, true, false);
+                            mToken, mEmbeddedID, requestCode, true, false,
+                            null, null, false);
             } catch (RemoteException e) {
                 // Empty
             }
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index a73e10a..8901fc8 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -124,9 +124,13 @@
             int requestCode = data.readInt();
             boolean onlyIfNeeded = data.readInt() != 0;
             boolean debug = data.readInt() != 0;
+            String profileFile = data.readString();
+            ParcelFileDescriptor profileFd = data.readInt() != 0
+                    ? data.readFileDescriptor() : null;
+            boolean autoStopProfiler = data.readInt() != 0;
             int result = startActivity(app, intent, resolvedType,
                     grantedUriPermissions, grantedMode, resultTo, resultWho,
-                    requestCode, onlyIfNeeded, debug);
+                    requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -146,9 +150,13 @@
             int requestCode = data.readInt();
             boolean onlyIfNeeded = data.readInt() != 0;
             boolean debug = data.readInt() != 0;
+            String profileFile = data.readString();
+            ParcelFileDescriptor profileFd = data.readInt() != 0
+                    ? data.readFileDescriptor() : null;
+            boolean autoStopProfiler = data.readInt() != 0;
             WaitResult result = startActivityAndWait(app, intent, resolvedType,
                     grantedUriPermissions, grantedMode, resultTo, resultWho,
-                    requestCode, onlyIfNeeded, debug);
+                    requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler);
             reply.writeNoException();
             result.writeToParcel(reply, 0);
             return true;
@@ -349,8 +357,9 @@
             if (data.readInt() != 0) {
                 config = Configuration.CREATOR.createFromParcel(data);
             }
+            boolean stopProfiling = data.readInt() != 0;
             if (token != null) {
-                activityIdle(token, config);
+                activityIdle(token, config, stopProfiling);
             }
             reply.writeNoException();
             return true;
@@ -1572,7 +1581,8 @@
             String resolvedType, Uri[] grantedUriPermissions, int grantedMode,
             IBinder resultTo, String resultWho,
             int requestCode, boolean onlyIfNeeded,
-            boolean debug) throws RemoteException {
+            boolean debug, String profileFile, ParcelFileDescriptor profileFd,
+            boolean autoStopProfiler) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -1586,6 +1596,14 @@
         data.writeInt(requestCode);
         data.writeInt(onlyIfNeeded ? 1 : 0);
         data.writeInt(debug ? 1 : 0);
+        data.writeString(profileFile);
+        if (profileFd != null) {
+            data.writeInt(1);
+            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+        } else {
+            data.writeInt(0);
+        }
+        data.writeInt(autoStopProfiler ? 1 : 0);
         mRemote.transact(START_ACTIVITY_TRANSACTION, data, reply, 0);
         reply.readException();
         int result = reply.readInt();
@@ -1597,7 +1615,8 @@
             String resolvedType, Uri[] grantedUriPermissions, int grantedMode,
             IBinder resultTo, String resultWho,
             int requestCode, boolean onlyIfNeeded,
-            boolean debug) throws RemoteException {
+            boolean debug, String profileFile, ParcelFileDescriptor profileFd,
+            boolean autoStopProfiler) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -1611,6 +1630,14 @@
         data.writeInt(requestCode);
         data.writeInt(onlyIfNeeded ? 1 : 0);
         data.writeInt(debug ? 1 : 0);
+        data.writeString(profileFile);
+        if (profileFd != null) {
+            data.writeInt(1);
+            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+        } else {
+            data.writeInt(0);
+        }
+        data.writeInt(autoStopProfiler ? 1 : 0);
         mRemote.transact(START_ACTIVITY_AND_WAIT_TRANSACTION, data, reply, 0);
         reply.readException();
         WaitResult result = WaitResult.CREATOR.createFromParcel(reply);
@@ -1829,7 +1856,8 @@
         data.recycle();
         reply.recycle();
     }
-    public void activityIdle(IBinder token, Configuration config) throws RemoteException
+    public void activityIdle(IBinder token, Configuration config, boolean stopProfiling)
+            throws RemoteException
     {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
@@ -1841,6 +1869,7 @@
         } else {
             data.writeInt(0);
         }
+        data.writeInt(stopProfiling ? 1 : 0);
         mRemote.transact(ACTIVITY_IDLE_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
         reply.readException();
         data.recycle();
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d5f630a..e376220 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -225,6 +225,10 @@
         Configuration createdConfig;
         ActivityClientRecord nextIdle;
 
+        String profileFile;
+        ParcelFileDescriptor profileFd;
+        boolean autoStopProfiler;
+
         ActivityInfo activityInfo;
         CompatibilityInfo compatInfo;
         LoadedApk packageInfo;
@@ -361,6 +365,9 @@
         List<ProviderInfo> providers;
         ComponentName instrumentationName;
         String profileFile;
+        ParcelFileDescriptor profileFd;
+        boolean autoStopProfiler;
+        boolean profiling;
         Bundle instrumentationArgs;
         IInstrumentationWatcher instrumentationWatcher;
         int debugMode;
@@ -371,6 +378,57 @@
         public String toString() {
             return "AppBindData{appInfo=" + appInfo + "}";
         }
+        public void setProfiler(String file, ParcelFileDescriptor fd) {
+            if (profiling) {
+                if (fd != null) {
+                    try {
+                        fd.close();
+                    } catch (IOException e) {
+                    }
+                }
+                return;
+            }
+            if (profileFd != null) {
+                try {
+                    profileFd.close();
+                } catch (IOException e) {
+                }
+            }
+            profileFile = file;
+            profileFd = fd;
+        }
+        public void startProfiling() {
+            if (profileFd == null || profiling) {
+                return;
+            }
+            try {
+                Debug.startMethodTracing(profileFile, profileFd.getFileDescriptor(),
+                        8 * 1024 * 1024, 0);
+                profiling = true;
+            } catch (RuntimeException e) {
+                Slog.w(TAG, "Profiling failed on path " + profileFile);
+                try {
+                    profileFd.close();
+                    profileFd = null;
+                } catch (IOException e2) {
+                    Slog.w(TAG, "Failure closing profile fd", e2);
+                }
+            }
+        }
+        public void stopProfiling() {
+            if (profiling) {
+                profiling = false;
+                Debug.stopMethodTracing();
+                if (profileFd != null) {
+                    try {
+                        profileFd.close();
+                    } catch (IOException e) {
+                    }
+                }
+                profileFd = null;
+                profileFile = null;
+            }
+        }
     }
 
     static final class DumpComponentInfo {
@@ -463,7 +521,8 @@
         public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
                 ActivityInfo info, CompatibilityInfo compatInfo, Bundle state,
                 List<ResultInfo> pendingResults,
-                List<Intent> pendingNewIntents, boolean notResumed, boolean isForward) {
+                List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
+                String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
             ActivityClientRecord r = new ActivityClientRecord();
 
             r.token = token;
@@ -479,6 +538,10 @@
             r.startsNotResumed = notResumed;
             r.isForward = isForward;
 
+            r.profileFile = profileName;
+            r.profileFd = profileFd;
+            r.autoStopProfiler = autoStopProfiler;
+
             queueOrSendMessage(H.LAUNCH_ACTIVITY, r);
         }
 
@@ -579,6 +642,7 @@
         public final void bindApplication(String processName,
                 ApplicationInfo appInfo, List<ProviderInfo> providers,
                 ComponentName instrumentationName, String profileFile,
+                ParcelFileDescriptor profileFd, boolean autoStopProfiler,
                 Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher,
                 int debugMode, boolean isRestrictedBackupMode, Configuration config,
                 CompatibilityInfo compatInfo, Map<String, IBinder> services,
@@ -596,7 +660,8 @@
             data.appInfo = appInfo;
             data.providers = providers;
             data.instrumentationName = instrumentationName;
-            data.profileFile = profileFile;
+            data.setProfiler(profileFile, profileFd);
+            data.autoStopProfiler = false;
             data.instrumentationArgs = instrumentationArgs;
             data.instrumentationWatcher = instrumentationWatcher;
             data.debugMode = debugMode;
@@ -1225,6 +1290,10 @@
     private class Idler implements MessageQueue.IdleHandler {
         public final boolean queueIdle() {
             ActivityClientRecord a = mNewActivities;
+            boolean stopProfiling = false;
+            if (mBoundApplication.profileFd != null && mBoundApplication.autoStopProfiler) {
+                stopProfiling = true;
+            }
             if (a != null) {
                 mNewActivities = null;
                 IActivityManager am = ActivityManagerNative.getDefault();
@@ -1236,7 +1305,7 @@
                         (a.activity != null && a.activity.mFinished));
                     if (a.activity != null && !a.activity.mFinished) {
                         try {
-                            am.activityIdle(a.token, a.createdConfig);
+                            am.activityIdle(a.token, a.createdConfig, stopProfiling);
                             a.createdConfig = null;
                         } catch (RemoteException ex) {
                             // Ignore
@@ -1247,6 +1316,9 @@
                     prev.nextIdle = null;
                 } while (a != null);
             }
+            if (stopProfiling) {
+                mBoundApplication.stopProfiling();
+            }
             ensureJitEnabled();
             return false;
         }
@@ -1560,7 +1632,8 @@
     }
 
     public boolean isProfiling() {
-        return mBoundApplication != null && mBoundApplication.profileFile != null;
+        return mBoundApplication != null && mBoundApplication.profileFile != null
+                && mBoundApplication.profileFd == null;
     }
 
     public String getProfileFilePath() {
@@ -1870,6 +1943,13 @@
         // we are back active so skip it.
         unscheduleGcIdler();
 
+        Slog.i(TAG, "Launch: profileFd=" + r.profileFile + " stop=" + r.autoStopProfiler);
+        if (r.profileFd != null) {
+            mBoundApplication.setProfiler(r.profileFile, r.profileFd);
+            mBoundApplication.startProfiling();
+            mBoundApplication.autoStopProfiler = r.autoStopProfiler;
+        }
+
         if (localLOGV) Slog.v(
             TAG, "Handling launch of " + r);
         Activity a = performLaunchActivity(r, customIntent);
@@ -3489,8 +3569,9 @@
                         ViewDebug.startLooperProfiling(pcd.path, pcd.fd.getFileDescriptor());
                         break;
                     default:
-                        Debug.startMethodTracing(pcd.path, pcd.fd.getFileDescriptor(),
-                                8 * 1024 * 1024, 0);
+                        mBoundApplication.setProfiler(pcd.path, pcd.fd);
+                        mBoundApplication.autoStopProfiler = false;
+                        mBoundApplication.startProfiling();
                         break;
                 }
             } catch (RuntimeException e) {
@@ -3509,9 +3590,8 @@
                     ViewDebug.stopLooperProfiling();
                     break;
                 default:
-                    Debug.stopMethodTracing();
+                    mBoundApplication.stopProfiling();
                     break;
-                    
             }
         }
     }
@@ -3607,6 +3687,10 @@
         Process.setArgV0(data.processName);
         android.ddm.DdmHandleAppName.setAppName(data.processName);
 
+        if (data.profileFd != null) {
+            data.startProfiling();
+        }
+
         // If the app is Honeycomb MR1 or earlier, switch its AsyncTask
         // implementation to use the pool executor.  Normally, we use the
         // serialized executor as the default. This has to happen in the
@@ -3745,7 +3829,8 @@
             mInstrumentation.init(this, instrContext, appContext,
                     new ComponentName(ii.packageName, ii.name), data.instrumentationWatcher);
 
-            if (data.profileFile != null && !ii.handleProfiling) {
+            if (data.profileFile != null && !ii.handleProfiling
+                    && data.profileFd == null) {
                 data.handlingProfiling = true;
                 File file = new File(data.profileFile);
                 file.getParentFile().mkdirs();
@@ -3799,7 +3884,8 @@
 
     /*package*/ final void finishInstrumentation(int resultCode, Bundle results) {
         IActivityManager am = ActivityManagerNative.getDefault();
-        if (mBoundApplication.profileFile != null && mBoundApplication.handlingProfiling) {
+        if (mBoundApplication.profileFile != null && mBoundApplication.handlingProfiling
+                && mBoundApplication.profileFd == null) {
             Debug.stopMethodTracing();
         }
         //Slog.i(TAG, "am: " + ActivityManagerNative.getDefault()
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 4cff12f..4b2a8d2 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -41,11 +41,11 @@
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.pm.UserInfo;
+import android.content.pm.ManifestDigest;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
-import android.os.Parcel;
 import android.os.Process;
 import android.os.RemoteException;
 import android.util.Log;
@@ -941,6 +941,27 @@
     }
 
     @Override
+    public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer,
+            int flags, String installerPackageName, Uri verificationURI,
+            ManifestDigest manifestDigest) {
+        try {
+            mPM.installPackageWithVerification(packageURI, observer, flags, installerPackageName,
+                    verificationURI, manifestDigest);
+        } catch (RemoteException e) {
+            // Should never happen!
+        }
+    }
+
+    @Override
+    public void verifyPendingInstall(int id, boolean verified, String failureMessage) {
+        try {
+            mPM.verifyPendingInstall(id, verified, failureMessage);
+        } catch (RemoteException e) {
+            // Should never happen!
+        }
+    }
+
+    @Override
     public void setInstallerPackageName(String targetPackage,
             String installerPackageName) {
         try {
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index bea057e..0a6fdd4 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -138,8 +138,12 @@
             List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
             boolean notResumed = data.readInt() != 0;
             boolean isForward = data.readInt() != 0;
+            String profileName = data.readString();
+            ParcelFileDescriptor profileFd = data.readInt() != 0
+                    ? data.readFileDescriptor() : null;
+            boolean autoStopProfiler = data.readInt() != 0;
             scheduleLaunchActivity(intent, b, ident, info, compatInfo, state, ri, pi,
-                    notResumed, isForward);
+                    notResumed, isForward, profileName, profileFd, autoStopProfiler);
             return true;
         }
         
@@ -255,6 +259,9 @@
             ComponentName testName = (data.readInt() != 0)
                 ? new ComponentName(data) : null;
             String profileName = data.readString();
+            ParcelFileDescriptor profileFd = data.readInt() != 0
+                    ? data.readFileDescriptor() : null;
+            boolean autoStopProfiler = data.readInt() != 0;
             Bundle testArgs = data.readBundle();
             IBinder binder = data.readStrongBinder();
             IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
@@ -265,7 +272,7 @@
             HashMap<String, IBinder> services = data.readHashMap(null);
             Bundle coreSettings = data.readBundle();
             bindApplication(packageName, info,
-                            providers, testName, profileName,
+                            providers, testName, profileName, profileFd, autoStopProfiler,
                             testArgs, testWatcher, testMode, restrictedBackupMode,
                             config, compatInfo, services, coreSettings);
             return true;
@@ -624,7 +631,8 @@
     public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
             ActivityInfo info, CompatibilityInfo compatInfo, Bundle state,
             List<ResultInfo> pendingResults,
-    		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward)
+		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
+		String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
     		throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -638,6 +646,14 @@
         data.writeTypedList(pendingNewIntents);
         data.writeInt(notResumed ? 1 : 0);
         data.writeInt(isForward ? 1 : 0);
+        data.writeString(profileName);
+        if (profileFd != null) {
+            data.writeInt(1);
+            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+        } else {
+            data.writeInt(0);
+        }
+        data.writeInt(autoStopProfiler ? 1 : 0);
         mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
@@ -793,8 +809,9 @@
     }
 
     public final void bindApplication(String packageName, ApplicationInfo info,
-            List<ProviderInfo> providers, ComponentName testName,
-            String profileName, Bundle testArgs, IInstrumentationWatcher testWatcher, int debugMode,
+            List<ProviderInfo> providers, ComponentName testName, String profileName,
+            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
+            IInstrumentationWatcher testWatcher, int debugMode,
             boolean restrictedBackupMode, Configuration config, CompatibilityInfo compatInfo,
             Map<String, IBinder> services, Bundle coreSettings) throws RemoteException {
         Parcel data = Parcel.obtain();
@@ -809,6 +826,13 @@
             testName.writeToParcel(data, 0);
         }
         data.writeString(profileName);
+        if (profileFd != null) {
+            data.writeInt(1);
+            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+        } else {
+            data.writeInt(0);
+        }
+        data.writeInt(autoStopProfiler ? 1 : 0);
         data.writeBundle(testArgs);
         data.writeStrongInterface(testWatcher);
         data.writeInt(debugMode);
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index b1b0583..49f8449 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -84,11 +84,13 @@
     public int startActivity(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo, String resultWho, int requestCode,
-            boolean onlyIfNeeded, boolean debug) throws RemoteException;
+            boolean onlyIfNeeded, boolean debug, String profileFile,
+            ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException;
     public WaitResult startActivityAndWait(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo, String resultWho, int requestCode,
-            boolean onlyIfNeeded, boolean debug) throws RemoteException;
+            boolean onlyIfNeeded, boolean debug, String profileFile,
+            ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException;
     public int startActivityWithConfig(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo, String resultWho, int requestCode,
@@ -118,7 +120,8 @@
     public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException;
     public void attachApplication(IApplicationThread app) throws RemoteException;
     /* oneway */
-    public void activityIdle(IBinder token, Configuration config) throws RemoteException;
+    public void activityIdle(IBinder token, Configuration config,
+            boolean stopProfiling) throws RemoteException;
     public void activityPaused(IBinder token) throws RemoteException;
     /* oneway */
     public void activityStopped(IBinder token, Bundle state,
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index 3a8eb28..9ae5ab1 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -55,7 +55,8 @@
     void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
             ActivityInfo info, CompatibilityInfo compatInfo, Bundle state,
             List<ResultInfo> pendingResults,
-    		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward)
+		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
+		String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
     		throws RemoteException;
     void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults,
             List<Intent> pendingNewIntents, int configChanges,
@@ -86,7 +87,8 @@
     static final int DEBUG_ON = 1;
     static final int DEBUG_WAIT = 2;
     void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers,
-            ComponentName testName, String profileName, Bundle testArguments, 
+            ComponentName testName, String profileName, ParcelFileDescriptor profileFd,
+            boolean autoStopProfiler, Bundle testArguments,
             IInstrumentationWatcher testWatcher, int debugMode, boolean restrictedBackupMode,
             Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
             Bundle coreSettings) throws RemoteException;
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index f99b420..f3bc495 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1379,7 +1379,7 @@
                 .startActivity(whoThread, intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         null, 0, token, target != null ? target.mEmbeddedID : null,
-                        requestCode, false, false);
+                        requestCode, false, false, null, null, false);
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
@@ -1475,7 +1475,7 @@
                 .startActivity(whoThread, intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         null, 0, token, target != null ? target.mWho : null,
-                        requestCode, false, false);
+                        requestCode, false, false, null, null, false);
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 1ef99a1..09661a5 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -184,16 +184,6 @@
      */
     public static final String META_DATA_APPWIDGET_PROVIDER = "android.appwidget.provider";
 
-    /**
-     * Field for the manifest meta-data tag used to indicate any previous name for the
-     * app widget receiver.
-     *
-     * @see AppWidgetProviderInfo
-     *
-     * @hide Pending API approval
-     */
-    public static final String META_DATA_APPWIDGET_OLD_NAME = "android.appwidget.oldName";
-
     static WeakHashMap<Context, WeakReference<AppWidgetManager>> sManagerCache =
         new WeakHashMap<Context, WeakReference<AppWidgetManager>>();
     static IAppWidgetService sService;
diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java
index 9c352d5..c33681d 100644
--- a/core/java/android/appwidget/AppWidgetProviderInfo.java
+++ b/core/java/android/appwidget/AppWidgetProviderInfo.java
@@ -138,17 +138,6 @@
     public int icon;
 
     /**
-     * The previous name, if any, of the app widget receiver. If not supplied, it will be
-     * ignored.
-     *
-     * <p>This field corresponds to the <code>&lt;meta-data /&gt;</code> with the name
-     * <code>android.appwidget.oldName</code>.
-     * 
-     * @hide Pending API approval
-     */
-    public String oldName;
-
-    /**
      * The view id of the AppWidget subview which should be auto-advanced by the widget's host.
      *
      * <p>This field corresponds to the <code>android:autoAdvanceViewId</code> attribute in
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 2579ced..8d6cee1 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1530,6 +1530,18 @@
     public static final String ACTION_PACKAGE_FIRST_LAUNCH = "android.intent.action.PACKAGE_FIRST_LAUNCH";
 
     /**
+     * Broadcast Action: Sent to the system package verifier when a package
+     * needs to be verified. The data contains the package URI.
+     * <p class="note">
+     * This is a protected intent that can only be sent by the system.
+     * </p>
+     *
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_PACKAGE_NEEDS_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_VERIFICATION";
+
+    /**
      * Broadcast Action: Resources for a set of packages (which were
      * previously unavailable) are currently
      * available since the media on which they exist is available.
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 5be6ec1..496da41 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -1573,8 +1573,11 @@
                     final Long periodInSeconds = info.periodicSyncs.get(i).second;
                     // find when this periodic sync was last scheduled to run
                     final long lastPollTimeAbsolute = status.getPeriodicSyncTime(i);
-                    // compute when this periodic sync should next run
-                    long nextPollTimeAbsolute = lastPollTimeAbsolute + periodInSeconds * 1000;
+                    // compute when this periodic sync should next run - this can be in the future
+                    // for example if the user changed the time, synced and changed back.
+                    final long nextPollTimeAbsolute = lastPollTimeAbsolute > nowAbsolute
+                            ? nowAbsolute
+                            : lastPollTimeAbsolute + periodInSeconds * 1000;
                     // if it is ready to run then schedule it and mark it as having been scheduled
                     if (nextPollTimeAbsolute <= nowAbsolute) {
                         final Pair<Long, Long> backoff =
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 37b6822..d7607e3 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -30,6 +30,7 @@
 import android.content.pm.IPackageStatsObserver;
 import android.content.pm.InstrumentationInfo;
 import android.content.pm.PackageInfo;
+import android.content.pm.ManifestDigest;
 import android.content.pm.ParceledListSlice;
 import android.content.pm.ProviderInfo;
 import android.content.pm.PermissionGroupInfo;
@@ -346,4 +347,10 @@
 
     UserInfo createUser(in String name, int flags);
     boolean removeUser(int userId);
+
+    void installPackageWithVerification(in Uri packageURI, in IPackageInstallObserver observer,
+            int flags, in String installerPackageName, in Uri verificationURI,
+            in ManifestDigest manifestDigest);
+
+    void verifyPendingInstall(int id, boolean verified, in String message);
 }
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index dd684cd..5c641f1 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -23,6 +23,7 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.IntentSender;
+import android.content.pm.ManifestDigest;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
 import android.graphics.drawable.Drawable;
@@ -289,11 +290,19 @@
     public static final int INSTALL_EXTERNAL = 0x00000008;
 
     /**
-    * Flag parameter for {@link #installPackage} to indicate that this
-    * package has to be installed on the sdcard.
-    * @hide
-    */
-   public static final int INSTALL_INTERNAL = 0x00000010;
+     * Flag parameter for {@link #installPackage} to indicate that this package
+     * has to be installed on the sdcard.
+     * @hide
+     */
+    public static final int INSTALL_INTERNAL = 0x00000010;
+
+    /**
+     * Flag parameter for {@link #installPackage} to indicate that this install
+     * was initiated via ADB.
+     *
+     * @hide
+     */
+    public static final int INSTALL_FROM_ADB = 0x00000020;
 
     /**
      * Flag parameter for
@@ -483,6 +492,30 @@
     public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20;
 
     /**
+     * Installation return code: this is passed to the {@link IPackageInstallObserver} by
+     * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
+     * the new package couldn't be installed because the verification timed out.
+     * @hide
+     */
+    public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21;
+
+    /**
+     * Installation return code: this is passed to the {@link IPackageInstallObserver} by
+     * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
+     * the new package couldn't be installed because the verification did not succeed.
+     * @hide
+     */
+    public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22;
+
+    /**
+     * Installation return code: this is passed to the {@link IPackageInstallObserver} by
+     * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
+     * the package changed from what the calling program expected.
+     * @hide
+     */
+    public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;
+
+    /**
      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
      * if the parser was given a path that is not a file, or does not end with the expected
@@ -995,35 +1028,63 @@
             = "android.content.pm.CLEAN_EXTERNAL_STORAGE";
 
     /**
+     * Extra field name for the URI to a verification file. Passed to a package
+     * verifier.
+     *
+     * @hide
+     */
+    public static final String EXTRA_VERIFICATION_URI = "android.content.pm.extra.VERIFICATION_URI";
+
+    /**
+     * Extra field name for the ID of a package pending verification. Passed to
+     * a package verifier and is used to call back to
+     * {@link PackageManager#verifyPendingInstall(int, boolean)}
+     *
+     * @hide
+     */
+    public static final String EXTRA_VERIFICATION_ID = "android.content.pm.extra.VERIFICATION_ID";
+
+    /**
+     * Extra field name for the package identifier which is trying to install
+     * the package.
+     *
+     * @hide
+     */
+    public static final String EXTRA_VERIFICATION_INSTALLER_PACKAGE
+            = "android.content.pm.extra.VERIFICATION_INSTALLER_PACKAGE";
+
+    /**
+     * Extra field name for the requested install flags for a package pending
+     * verification. Passed to a package verifier.
+     *
+     * @hide
+     */
+    public static final String EXTRA_VERIFICATION_INSTALL_FLAGS
+            = "android.content.pm.extra.VERIFICATION_INSTALL_FLAGS";
+
+    /**
      * Retrieve overall information about an application package that is
      * installed on the system.
-     *
-     * <p>Throws {@link NameNotFoundException} if a package with the given
-     * name can not be found on the system.
+     * <p>
+     * Throws {@link NameNotFoundException} if a package with the given name can
+     * not be found on the system.
      *
      * @param packageName The full name (i.e. com.google.apps.contacts) of the
-     *                    desired package.
-
+     *            desired package.
      * @param flags Additional option flags. Use any combination of
-     * {@link #GET_ACTIVITIES},
-     * {@link #GET_GIDS},
-     * {@link #GET_CONFIGURATIONS},
-     * {@link #GET_INSTRUMENTATION},
-     * {@link #GET_PERMISSIONS},
-     * {@link #GET_PROVIDERS},
-     * {@link #GET_RECEIVERS},
-     * {@link #GET_SERVICES},
-     * {@link #GET_SIGNATURES},
-     * {@link #GET_UNINSTALLED_PACKAGES} to modify the data returned.
-     *
-     * @return Returns a PackageInfo object containing information about the package.
-     *         If flag GET_UNINSTALLED_PACKAGES is set and  if the package is not
-     *         found in the list of installed applications, the package information is
-     *         retrieved from the list of uninstalled applications(which includes
-     *         installed applications as well as applications
-     *         with data directory ie applications which had been
+     *            {@link #GET_ACTIVITIES}, {@link #GET_GIDS},
+     *            {@link #GET_CONFIGURATIONS}, {@link #GET_INSTRUMENTATION},
+     *            {@link #GET_PERMISSIONS}, {@link #GET_PROVIDERS},
+     *            {@link #GET_RECEIVERS}, {@link #GET_SERVICES},
+     *            {@link #GET_SIGNATURES}, {@link #GET_UNINSTALLED_PACKAGES} to
+     *            modify the data returned.
+     * @return Returns a PackageInfo object containing information about the
+     *         package. If flag GET_UNINSTALLED_PACKAGES is set and if the
+     *         package is not found in the list of installed applications, the
+     *         package information is retrieved from the list of uninstalled
+     *         applications(which includes installed applications as well as
+     *         applications with data directory ie applications which had been
      *         deleted with DONT_DELTE_DATA flag set).
-     *
      * @see #GET_ACTIVITIES
      * @see #GET_GIDS
      * @see #GET_CONFIGURATIONS
@@ -1034,7 +1095,6 @@
      * @see #GET_SERVICES
      * @see #GET_SIGNATURES
      * @see #GET_UNINSTALLED_PACKAGES
-     *
      */
     public abstract PackageInfo getPackageInfo(String packageName, int flags)
             throws NameNotFoundException;
@@ -2061,6 +2121,46 @@
             String installerPackageName);
 
     /**
+     * Similar to
+     * {@link #installPackage(Uri, IPackageInstallObserver, int, String)} but
+     * with an extra verification file provided.
+     *
+     * @param packageURI The location of the package file to install. This can
+     *            be a 'file:' or a 'content:' URI.
+     * @param observer An observer callback to get notified when the package
+     *            installation is complete.
+     *            {@link IPackageInstallObserver#packageInstalled(String, int)}
+     *            will be called when that happens. observer may be null to
+     *            indicate that no callback is desired.
+     * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK},
+     *            {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}
+     *            .
+     * @param installerPackageName Optional package name of the application that
+     *            is performing the installation. This identifies which market
+     *            the package came from.
+     * @param verificationURI The location of the supplementary verification
+     *            file. This can be a 'file:' or a 'content:' URI.
+     * @hide
+     */
+    public abstract void installPackageWithVerification(Uri packageURI,
+            IPackageInstallObserver observer, int flags, String installerPackageName,
+            Uri verificationURI, ManifestDigest manifestDigest);
+
+    /**
+     * Allows a package listening to the
+     * {@link Intent#ACTION_PACKAGE_NEEDS_VERIFICATION package verification
+     * broadcast} to respond to the package manager.
+     *
+     * @param id pending package identifier as passed via the
+     *            {@link PackageManager#EXTRA_VERIFICATION_ID} Intent extra
+     * @param verified whether the package was verified as valid
+     * @param failureMessage if verification was false, this is the error
+     *            message that may be shown to the user
+     * @hide
+     */
+    public abstract void verifyPendingInstall(int id, boolean verified, String failureMessage);
+
+    /**
      * Change the installer associated with a given package.  There are limitations
      * on how the installer package can be changed; in particular:
      * <ul>
diff --git a/core/java/android/content/pm/Signature.java b/core/java/android/content/pm/Signature.java
index b32664e..c6aefb8 100644
--- a/core/java/android/content/pm/Signature.java
+++ b/core/java/android/content/pm/Signature.java
@@ -16,7 +16,6 @@
 
 package android.content.pm;
 
-import android.content.ComponentName;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -40,26 +39,41 @@
         mSignature = signature.clone();
     }
 
+    private static final int parseHexDigit(int nibble) {
+        if ('0' <= nibble && nibble <= '9') {
+            return nibble - '0';
+        } else if ('a' <= nibble && nibble <= 'f') {
+            return nibble - 'a' + 10;
+        } else if ('A' <= nibble && nibble <= 'F') {
+            return nibble - 'A' + 10;
+        } else {
+            throw new IllegalArgumentException("Invalid character " + nibble + " in hex string");
+        }
+    }
+
     /**
      * Create Signature from a text representation previously returned by
-     * {@link #toChars} or {@link #toCharsString()}.
+     * {@link #toChars} or {@link #toCharsString()}. Signatures are expected to
+     * be a hex-encoded ASCII string.
+     *
+     * @param text hex-encoded string representing the signature
+     * @throws IllegalArgumentException when signature is odd-length
      */
     public Signature(String text) {
         final byte[] input = text.getBytes();
         final int N = input.length;
+
+        if (N % 2 != 0) {
+            throw new IllegalArgumentException("text size " + N + " is not even");
+        }
+
         final byte[] sig = new byte[N / 2];
         int sigIndex = 0;
 
         for (int i = 0; i < N;) {
-            int b;
-
-            final int hi = input[i++];
-            b = (hi >= 'a' ? (hi - 'a' + 10) : (hi - '0')) << 4;
-
-            final int lo = input[i++];
-            b |= (lo >= 'a' ? (lo - 'a' + 10) : (lo - '0')) & 0x0F;
-
-            sig[sigIndex++] = (byte) (b & 0xFF);
+            final int hi = parseHexDigit(input[i++]);
+            final int lo = parseHexDigit(input[i++]);
+            sig[sigIndex++] = (byte) ((hi << 4) | lo);
         }
 
         mSignature = sig;
@@ -100,8 +114,7 @@
     }
 
     /**
-     * Return the result of {@link #toChars()} as a String.  This result is
-     * cached so future calls will return the same String.
+     * Return the result of {@link #toChars()} as a String.
      */
     public String toCharsString() {
         String str = mStringRef == null ? null : mStringRef.get();
@@ -127,7 +140,7 @@
         try {
             if (obj != null) {
                 Signature other = (Signature)obj;
-                return Arrays.equals(mSignature, other.mSignature);
+                return this == other || Arrays.equals(mSignature, other.mSignature);
             }
         } catch (ClassCastException e) {
         }
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index eb9cd21..53fd50d 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -260,11 +260,18 @@
      */
     public static final int TYPE_MOBILE_CBS  = 12;
 
-    /** {@hide} */
-    public static final int MAX_RADIO_TYPE   = TYPE_MOBILE_CBS;
+    /**
+     * A Wi-Fi p2p connection. Only requesting processes will have access to
+     * the peers connected.
+     * {@hide}
+     */
+    public static final int TYPE_WIFI_P2P    = 13;
 
     /** {@hide} */
-    public static final int MAX_NETWORK_TYPE = TYPE_MOBILE_CBS;
+    public static final int MAX_RADIO_TYPE   = TYPE_WIFI_P2P;
+
+    /** {@hide} */
+    public static final int MAX_NETWORK_TYPE = TYPE_WIFI_P2P;
 
     public static final int DEFAULT_NETWORK_PREFERENCE = TYPE_WIFI;
 
@@ -303,6 +310,8 @@
                 return "MOBILE_IMS";
             case TYPE_MOBILE_CBS:
                 return "MOBILE_CBS";
+            case TYPE_WIFI_P2P:
+                return "WIFI_P2P";
             default:
                 return Integer.toString(type);
         }
diff --git a/core/java/android/net/DhcpInfoInternal.java b/core/java/android/net/DhcpInfoInternal.java
index 860da0a..9b0a2d7 100644
--- a/core/java/android/net/DhcpInfoInternal.java
+++ b/core/java/android/net/DhcpInfoInternal.java
@@ -100,7 +100,8 @@
         if (TextUtils.isEmpty(dns1) == false) {
             p.addDns(NetworkUtils.numericToInetAddress(dns1));
         } else {
-            Log.d(TAG, "makeLinkProperties with empty dns1!");
+            p.addDns(NetworkUtils.numericToInetAddress(serverAddress));
+            Log.d(TAG, "empty dns1, use dhcp server as dns1!");
         }
         if (TextUtils.isEmpty(dns2) == false) {
             p.addDns(NetworkUtils.numericToInetAddress(dns2));
diff --git a/core/java/android/net/INetworkStatsService.aidl b/core/java/android/net/INetworkStatsService.aidl
index b65506c..0e883cf 100644
--- a/core/java/android/net/INetworkStatsService.aidl
+++ b/core/java/android/net/INetworkStatsService.aidl
@@ -26,7 +26,7 @@
     /** Return historical network layer stats for traffic that matches template. */
     NetworkStatsHistory getHistoryForNetwork(in NetworkTemplate template, int fields);
     /** Return historical network layer stats for specific UID traffic that matches template. */
-    NetworkStatsHistory getHistoryForUid(in NetworkTemplate template, int uid, int tag, int fields);
+    NetworkStatsHistory getHistoryForUid(in NetworkTemplate template, int uid, int set, int tag, int fields);
 
     /** Return network layer usage summary for traffic that matches template. */
     NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end);
@@ -38,6 +38,8 @@
     /** Increment data layer count of operations performed for UID and tag. */
     void incrementOperationCount(int uid, int tag, int operationCount);
 
+    /** Mark given UID as being in foreground for stats purposes. */
+    void setUidForeground(int uid, boolean uidForeground);
     /** Force update of statistics. */
     void forceUpdate();
 
diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java
index f2fcb8f..272545d 100644
--- a/core/java/android/net/NetworkStats.java
+++ b/core/java/android/net/NetworkStats.java
@@ -42,7 +42,13 @@
     public static final String IFACE_ALL = null;
     /** {@link #uid} value when UID details unavailable. */
     public static final int UID_ALL = -1;
-    /** {@link #tag} value for without tag. */
+    /** {@link #set} value when all sets combined. */
+    public static final int SET_ALL = -1;
+    /** {@link #set} value where background data is accounted. */
+    public static final int SET_DEFAULT = 0;
+    /** {@link #set} value where foreground data is accounted. */
+    public static final int SET_FOREGROUND = 1;
+    /** {@link #tag} value for total data across all tags. */
     public static final int TAG_NONE = 0;
 
     /**
@@ -53,6 +59,7 @@
     private int size;
     private String[] iface;
     private int[] uid;
+    private int[] set;
     private int[] tag;
     private long[] rxBytes;
     private long[] rxPackets;
@@ -63,6 +70,7 @@
     public static class Entry {
         public String iface;
         public int uid;
+        public int set;
         public int tag;
         public long rxBytes;
         public long rxPackets;
@@ -71,17 +79,19 @@
         public long operations;
 
         public Entry() {
-            this(IFACE_ALL, UID_ALL, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
+            this(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
         }
 
         public Entry(long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) {
-            this(IFACE_ALL, UID_ALL, TAG_NONE, rxBytes, rxPackets, txBytes, txPackets, operations);
+            this(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, rxBytes, rxPackets, txBytes, txPackets,
+                    operations);
         }
 
-        public Entry(String iface, int uid, int tag, long rxBytes, long rxPackets, long txBytes,
-                long txPackets, long operations) {
+        public Entry(String iface, int uid, int set, int tag, long rxBytes, long rxPackets,
+                long txBytes, long txPackets, long operations) {
             this.iface = iface;
             this.uid = uid;
+            this.set = set;
             this.tag = tag;
             this.rxBytes = rxBytes;
             this.rxPackets = rxPackets;
@@ -96,6 +106,7 @@
         this.size = 0;
         this.iface = new String[initialSize];
         this.uid = new int[initialSize];
+        this.set = new int[initialSize];
         this.tag = new int[initialSize];
         this.rxBytes = new long[initialSize];
         this.rxPackets = new long[initialSize];
@@ -109,6 +120,7 @@
         size = parcel.readInt();
         iface = parcel.createStringArray();
         uid = parcel.createIntArray();
+        set = parcel.createIntArray();
         tag = parcel.createIntArray();
         rxBytes = parcel.createLongArray();
         rxPackets = parcel.createLongArray();
@@ -123,6 +135,7 @@
         dest.writeInt(size);
         dest.writeStringArray(iface);
         dest.writeIntArray(uid);
+        dest.writeIntArray(set);
         dest.writeIntArray(tag);
         dest.writeLongArray(rxBytes);
         dest.writeLongArray(rxPackets);
@@ -131,15 +144,18 @@
         dest.writeLongArray(operations);
     }
 
-    public NetworkStats addValues(String iface, int uid, int tag, long rxBytes, long rxPackets,
-            long txBytes, long txPackets) {
-        return addValues(iface, uid, tag, rxBytes, rxPackets, txBytes, txPackets, 0L);
+    // @VisibleForTesting
+    public NetworkStats addIfaceValues(
+            String iface, long rxBytes, long rxPackets, long txBytes, long txPackets) {
+        return addValues(
+                iface, UID_ALL, SET_DEFAULT, TAG_NONE, rxBytes, rxPackets, txBytes, txPackets, 0L);
     }
 
-    public NetworkStats addValues(String iface, int uid, int tag, long rxBytes, long rxPackets,
-            long txBytes, long txPackets, long operations) {
-        return addValues(
-                new Entry(iface, uid, tag, rxBytes, rxPackets, txBytes, txPackets, operations));
+    // @VisibleForTesting
+    public NetworkStats addValues(String iface, int uid, int set, int tag, long rxBytes,
+            long rxPackets, long txBytes, long txPackets, long operations) {
+        return addValues(new Entry(
+                iface, uid, set, tag, rxBytes, rxPackets, txBytes, txPackets, operations));
     }
 
     /**
@@ -151,6 +167,7 @@
             final int newLength = Math.max(iface.length, 10) * 3 / 2;
             iface = Arrays.copyOf(iface, newLength);
             uid = Arrays.copyOf(uid, newLength);
+            set = Arrays.copyOf(set, newLength);
             tag = Arrays.copyOf(tag, newLength);
             rxBytes = Arrays.copyOf(rxBytes, newLength);
             rxPackets = Arrays.copyOf(rxPackets, newLength);
@@ -161,6 +178,7 @@
 
         iface[size] = entry.iface;
         uid[size] = entry.uid;
+        set[size] = entry.set;
         tag[size] = entry.tag;
         rxBytes[size] = entry.rxBytes;
         rxPackets[size] = entry.rxPackets;
@@ -179,6 +197,7 @@
         final Entry entry = recycle != null ? recycle : new Entry();
         entry.iface = iface[i];
         entry.uid = uid[i];
+        entry.set = set[i];
         entry.tag = tag[i];
         entry.rxBytes = rxBytes[i];
         entry.rxPackets = rxPackets[i];
@@ -201,19 +220,26 @@
         return iface.length;
     }
 
+    @Deprecated
     public NetworkStats combineValues(String iface, int uid, int tag, long rxBytes, long rxPackets,
             long txBytes, long txPackets, long operations) {
         return combineValues(
-                new Entry(iface, uid, tag, rxBytes, rxPackets, txBytes, txPackets, operations));
+                iface, uid, SET_DEFAULT, tag, rxBytes, rxPackets, txBytes, txPackets, operations);
+    }
+
+    public NetworkStats combineValues(String iface, int uid, int set, int tag, long rxBytes,
+            long rxPackets, long txBytes, long txPackets, long operations) {
+        return combineValues(new Entry(
+                iface, uid, set, tag, rxBytes, rxPackets, txBytes, txPackets, operations));
     }
 
     /**
      * Combine given values with an existing row, or create a new row if
-     * {@link #findIndex(String, int, int)} is unable to find match. Can also be
-     * used to subtract values from existing rows.
+     * {@link #findIndex(String, int, int, int)} is unable to find match. Can
+     * also be used to subtract values from existing rows.
      */
     public NetworkStats combineValues(Entry entry) {
-        final int i = findIndex(entry.iface, entry.uid, entry.tag);
+        final int i = findIndex(entry.iface, entry.uid, entry.set, entry.tag);
         if (i == -1) {
             // only create new entry when positive contribution
             addValues(entry);
@@ -230,9 +256,10 @@
     /**
      * Find first stats index that matches the requested parameters.
      */
-    public int findIndex(String iface, int uid, int tag) {
+    public int findIndex(String iface, int uid, int set, int tag) {
         for (int i = 0; i < size; i++) {
-            if (Objects.equal(iface, this.iface[i]) && uid == this.uid[i] && tag == this.tag[i]) {
+            if (Objects.equal(iface, this.iface[i]) && uid == this.uid[i] && set == this.set[i]
+                    && tag == this.tag[i]) {
                 return i;
             }
         }
@@ -246,7 +273,7 @@
      */
     public void spliceOperationsFrom(NetworkStats stats) {
         for (int i = 0; i < size; i++) {
-            final int j = stats.findIndex(IFACE_ALL, uid[i], tag[i]);
+            final int j = stats.findIndex(IFACE_ALL, uid[i], set[i], tag[i]);
             if (j == -1) {
                 operations[i] = 0;
             } else {
@@ -332,10 +359,11 @@
         for (int i = 0; i < size; i++) {
             entry.iface = iface[i];
             entry.uid = uid[i];
+            entry.set = set[i];
             entry.tag = tag[i];
 
             // find remote row that matches, and subtract
-            final int j = value.findIndex(entry.iface, entry.uid, entry.tag);
+            final int j = value.findIndex(entry.iface, entry.uid, entry.set, entry.tag);
             if (j == -1) {
                 // newly appearing row, return entire value
                 entry.rxBytes = rxBytes[i];
@@ -377,7 +405,8 @@
             pw.print(prefix);
             pw.print("  iface="); pw.print(iface[i]);
             pw.print(" uid="); pw.print(uid[i]);
-            pw.print(" tag=0x"); pw.print(Integer.toHexString(tag[i]));
+            pw.print(" set="); pw.print(setToString(set[i]));
+            pw.print(" tag="); pw.print(tagToString(tag[i]));
             pw.print(" rxBytes="); pw.print(rxBytes[i]);
             pw.print(" rxPackets="); pw.print(rxPackets[i]);
             pw.print(" txBytes="); pw.print(txBytes[i]);
@@ -386,6 +415,29 @@
         }
     }
 
+    /**
+     * Return text description of {@link #set} value.
+     */
+    public static String setToString(int set) {
+        switch (set) {
+            case SET_ALL:
+                return "ALL";
+            case SET_DEFAULT:
+                return "DEFAULT";
+            case SET_FOREGROUND:
+                return "FOREGROUND";
+            default:
+                return "UNKNOWN";
+        }
+    }
+
+    /**
+     * Return text description of {@link #tag} value.
+     */
+    public static String tagToString(int tag) {
+        return "0x" + Integer.toHexString(tag);
+    }
+
     @Override
     public String toString() {
         final CharArrayWriter writer = new CharArrayWriter();
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index 4ba44ca..b4f15ac 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -17,6 +17,7 @@
 package android.net;
 
 import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.SET_DEFAULT;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.NetworkStatsHistory.DataStreamUtils.readFullLongArray;
@@ -215,8 +216,8 @@
      */
     @Deprecated
     public void recordData(long start, long end, long rxBytes, long txBytes) {
-        recordData(start, end,
-                new NetworkStats.Entry(IFACE_ALL, UID_ALL, TAG_NONE, rxBytes, 0L, txBytes, 0L, 0L));
+        recordData(start, end, new NetworkStats.Entry(
+                IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, rxBytes, 0L, txBytes, 0L, 0L));
     }
 
     /**
@@ -269,7 +270,7 @@
      */
     public void recordEntireHistory(NetworkStatsHistory input) {
         final NetworkStats.Entry entry = new NetworkStats.Entry(
-                IFACE_ALL, UID_ALL, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
+                IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
         for (int i = 0; i < input.bucketCount; i++) {
             final long start = input.bucketStart[i];
             final long end = start + input.bucketDuration;
@@ -422,7 +423,7 @@
         ensureBuckets(start, end);
 
         final NetworkStats.Entry entry = new NetworkStats.Entry(
-                IFACE_ALL, UID_ALL, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
+                IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
         final Random r = new Random();
         while (rxBytes > 1024 || rxPackets > 128 || txBytes > 1024 || txPackets > 128
                 || operations > 32) {
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index f138e49..c2c5c18 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -205,10 +205,6 @@
      * @param operationCount Number of operations to increment count by.
      */
     public static void incrementOperationCount(int tag, int operationCount) {
-        if (operationCount < 0) {
-            throw new IllegalArgumentException("operation count can only be incremented");
-        }
-
         final INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(
                 ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
         final int uid = android.os.Process.myUid();
diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java
index 3ea3f56..ac15d9c 100644
--- a/core/java/android/os/ParcelFileDescriptor.java
+++ b/core/java/android/os/ParcelFileDescriptor.java
@@ -129,6 +129,16 @@
     }
 
     /**
+     * Create a new ParcelFileDescriptor that is a dup of the existing
+     * FileDescriptor.  This obeys standard POSIX semantics, where the
+     * new file descriptor shared state such as file position with the
+     * original file descriptor.
+     */
+    public ParcelFileDescriptor dup() throws IOException {
+        return dup(getFileDescriptor());
+    }
+
+    /**
      * Create a new ParcelFileDescriptor from a raw native fd.  The new
      * ParcelFileDescriptor holds a dup of the original fd passed in here,
      * so you must still close that fd as well as the new ParcelFileDescriptor.
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index d867e35..a66fa81 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -6455,6 +6455,37 @@
                 }
             }
         }
+
+        /**
+         * A data kind representing an Identity related to the contact.
+         * <p>
+         * This can be used as a signal by the aggregator to combine raw contacts into
+         * contacts, e.g. if two contacts have Identity rows with
+         * the same NAMESPACE and IDENTITY values the aggregator can know that they refer
+         * to the same person.
+         * </p>
+         */
+        public static final class Identity implements DataColumnsWithJoins {
+            /**
+             * This utility class cannot be instantiated
+             */
+            private Identity() {}
+
+            /** MIME type used when storing this in data table. */
+            public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/identity";
+
+            /**
+             * The identity string.
+             * <P>Type: TEXT</P>
+             */
+            public static final String IDENTITY = DataColumns.DATA1;
+
+            /**
+             * The namespace of the identity string, e.g. "com.google"
+             * <P>Type: TEXT</P>
+             */
+            public static final String NAMESPACE = DataColumns.DATA2;
+        }
     }
 
     /**
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index f8702b9..de06f20 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3960,6 +3960,12 @@
         public static final String WEB_AUTOFILL_QUERY_URL =
             "web_autofill_query_url";
 
+        /** Whether package verification is enabled. {@hide} */
+        public static final String PACKAGE_VERIFIER_ENABLE = "verifier_enable";
+
+        /** Timeout for package verification. {@hide} */
+        public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
+
         /**
          * @hide
          */
diff --git a/core/java/android/server/BluetoothAdapterStateMachine.java b/core/java/android/server/BluetoothAdapterStateMachine.java
index 031375ec..69fbca3 100644
--- a/core/java/android/server/BluetoothAdapterStateMachine.java
+++ b/core/java/android/server/BluetoothAdapterStateMachine.java
@@ -39,14 +39,14 @@
  *                         (BluetootOn)<----------------------<-
  *                           |    ^    -------------------->-  |
  *                           |    |                         |  |
- *                 TURN_OFF  |    | BECAME_PAIRABLE      m1 |  | USER_TURN_ON
+ *                 TURN_OFF  |    | SCAN_MODE_CHANGED    m1 |  | USER_TURN_ON
  *         AIRPLANE_MODE_ON  |    |                         |  |
  *                           V    |                         |  |
  *                         (Switching)                   (PerProcessState)
  *                           |    ^                         |  |
- *     BECAME_NON_PAIRABLE&  |    | TURN_ON(_CONTINUE)      |  |
+ *     POWER_STATE_CHANGED & |    | TURN_ON(_CONTINUE)      |  |
  * ALL_DEVICES_DISCONNECTED  |    |                     m2  |  |
- *                           V    |------------------------<   | BECAME_PAIRABLE
+ *                           V    |------------------------<   | SCAN_MODE_CHANGED
  *                          (HotOff)-------------------------->- PER_PROCESS_TURN_ON
  *                           /    ^
  *                          /     |  SERVICE_RECORD_LOADED
@@ -61,7 +61,7 @@
  * Legend:
  * m1 = TURN_HOT
  * m2 = Transition to HotOff when number of process wanting BT on is 0.
- *      BECAME_NON_PAIRABLE will make the transition.
+ *      POWER_STATE_CHANGED will make the transition.
  */
 final class BluetoothAdapterStateMachine extends StateMachine {
     private static final String TAG = "BluetoothAdapterStateMachine";
@@ -83,10 +83,10 @@
     static final int SERVICE_RECORD_LOADED = 51;
     // Event indicates all the remote Bluetooth devices has been disconnected
     static final int ALL_DEVICES_DISCONNECTED = 52;
-    // Event indicates the Bluetooth is connectable
-    static final int BECAME_PAIRABLE = 53;
-    // Event indicates the Bluetooth is non-connectable.
-    static final int BECAME_NON_PAIRABLE = 54;
+    // Event indicates the Bluetooth scan mode has changed
+    static final int SCAN_MODE_CHANGED = 53;
+    // Event indicates the powered state has changed
+    static final int POWER_STATE_CHANGED = 54;
     // Event indicates airplane mode is turned on
     static final int AIRPLANE_MODE_ON = 55;
     // Event indicates airplane mode is turned off
@@ -107,6 +107,8 @@
     private static final int TURN_COLD = 103;
     // Device disconnecting timeout happens
     private static final int DEVICES_DISCONNECT_TIMEOUT = 104;
+    // Prepare Bluetooth timeout happens
+    private static final int PREPARE_BLUETOOTH_TIMEOUT = 105;
 
     private Context mContext;
     private BluetoothService mBluetoothService;
@@ -125,6 +127,8 @@
     // timeout value waiting for all the devices to be disconnected
     private static final int DEVICES_DISCONNECT_TIMEOUT_TIME = 3000;
 
+    private static final int PREPARE_BLUETOOTH_TIMEOUT_TIME = 10000;
+
     BluetoothAdapterStateMachine(Context context, BluetoothService bluetoothService,
                                  BluetoothAdapter bluetoothAdapter) {
         super(TAG);
@@ -165,7 +169,7 @@
         }
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("PowerOff process message: " + message.what);
+            log("PowerOff process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch(message.what) {
@@ -257,6 +261,7 @@
                     try {
                         Thread.sleep(100);
                     } catch (InterruptedException e) {
+                        log("prepareBluetooth sleep interrupted: " + pollCount);
                         break;
                     }
                 }
@@ -274,6 +279,7 @@
                 return false;
             }
 
+            sendMessageDelayed(PREPARE_BLUETOOTH_TIMEOUT, PREPARE_BLUETOOTH_TIMEOUT_TIME);
             return true;
         }
     }
@@ -291,13 +297,20 @@
 
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("WarmUp process message: " + message.what);
+            log("WarmUp process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch(message.what) {
                 case SERVICE_RECORD_LOADED:
+                    removeMessages(PREPARE_BLUETOOTH_TIMEOUT);
                     transitionTo(mHotOff);
                     break;
+                case PREPARE_BLUETOOTH_TIMEOUT:
+                    Log.e(TAG, "Bluetooth adapter SDP failed to load");
+                    shutoffBluetooth();
+                    transitionTo(mPowerOff);
+                    broadcastState(BluetoothAdapter.STATE_OFF);
+                    break;
                 case USER_TURN_ON: // handle this at HotOff state
                 case TURN_ON_CONTINUE: // Once in HotOff state, continue turn bluetooth
                                        // on to the BluetoothOn state
@@ -331,7 +344,7 @@
 
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("HotOff process message: " + message.what);
+            log("HotOff process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch(message.what) {
@@ -348,8 +361,7 @@
                     break;
                 case AIRPLANE_MODE_ON:
                 case TURN_COLD:
-                    mBluetoothService.shutoffBluetooth();
-                    mEventLoop.stop();
+                    shutoffBluetooth();
                     transitionTo(mPowerOff);
                     broadcastState(BluetoothAdapter.STATE_OFF);
                     break;
@@ -390,32 +402,32 @@
         }
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("Switching process message: " + message.what);
+            log("Switching process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch(message.what) {
-                case BECAME_PAIRABLE:
-                    mBluetoothService.initBluetoothAfterTurningOn();
-                    transitionTo(mBluetoothOn);
-                    broadcastState(BluetoothAdapter.STATE_ON);
-                    // run bluetooth now that it's turned on
-                    // Note runBluetooth should be called only in adapter STATE_ON
-                    mBluetoothService.runBluetooth();
+                case SCAN_MODE_CHANGED:
+                    // This event matches mBluetoothService.switchConnectable action
+                    if (mPublicState == BluetoothAdapter.STATE_TURNING_ON) {
+                        // set pairable if it's not
+                        mBluetoothService.setPairable();
+                        mBluetoothService.initBluetoothAfterTurningOn();
+                        transitionTo(mBluetoothOn);
+                        broadcastState(BluetoothAdapter.STATE_ON);
+                        // run bluetooth now that it's turned on
+                        // Note runBluetooth should be called only in adapter STATE_ON
+                        mBluetoothService.runBluetooth();
+                    }
                     break;
-                case BECAME_NON_PAIRABLE:
-                    if (mBluetoothService.getAdapterConnectionState() ==
-                        BluetoothAdapter.STATE_DISCONNECTED) {
-                        removeMessages(DEVICES_DISCONNECT_TIMEOUT);
+                case POWER_STATE_CHANGED:
+                    if (!((Boolean) message.obj)) {
                         transitionTo(mHotOff);
                         finishSwitchingOff();
                     }
                     break;
                 case ALL_DEVICES_DISCONNECTED:
                     removeMessages(DEVICES_DISCONNECT_TIMEOUT);
-                    if (mBluetoothService.getScanMode() == BluetoothAdapter.SCAN_MODE_NONE) {
-                        transitionTo(mHotOff);
-                        finishSwitchingOff();
-                    }
+                    mBluetoothService.switchConnectable(false);
                     break;
                 case DEVICES_DISCONNECT_TIMEOUT:
                     sendMessage(ALL_DEVICES_DISCONNECTED);
@@ -461,7 +473,7 @@
         }
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("BluetoothOn process message: " + message.what);
+            log("BluetoothOn process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch(message.what) {
@@ -482,9 +494,14 @@
                 case AIRPLANE_MODE_ON:
                     transitionTo(mSwitching);
                     broadcastState(BluetoothAdapter.STATE_TURNING_OFF);
-                    mBluetoothService.switchConnectable(false);
-                    mBluetoothService.disconnectDevices();
-                    sendMessageDelayed(DEVICES_DISCONNECT_TIMEOUT, DEVICES_DISCONNECT_TIMEOUT_TIME);
+                    if (mBluetoothService.getAdapterConnectionState() !=
+                        BluetoothAdapter.STATE_DISCONNECTED) {
+                        mBluetoothService.disconnectDevices();
+                        sendMessageDelayed(DEVICES_DISCONNECT_TIMEOUT,
+                                           DEVICES_DISCONNECT_TIMEOUT_TIME);
+                    } else {
+                        mBluetoothService.switchConnectable(false);
+                    }
 
                     // we turn all the way to PowerOff with AIRPLANE_MODE_ON
                     if (message.what == AIRPLANE_MODE_ON) {
@@ -514,15 +531,25 @@
 
     private class PerProcessState extends State {
         IBluetoothStateChangeCallback mCallback = null;
+        boolean isTurningOn = false;
 
         @Override
         public void enter() {
-            if (DBG) log("Enter PerProcessState: " + getCurrentMessage().what);
+            int what = getCurrentMessage().what;
+            if (DBG) log("Enter PerProcessState: " + what);
+
+            if (what == PER_PROCESS_TURN_ON) {
+                isTurningOn = true;
+            } else if (what == PER_PROCESS_TURN_OFF) {
+                isTurningOn = false;
+            } else {
+                Log.e(TAG, "enter PerProcessState: wrong msg: " + what);
+            }
         }
 
         @Override
         public boolean processMessage(Message message) {
-            if (DBG) log("PerProcessState process message: " + message.what);
+            log("PerProcessState process message: " + message.what);
 
             boolean retValue = HANDLED;
             switch (message.what) {
@@ -534,8 +561,20 @@
                         perProcessCallback(true, mCallback);
                     }
                     break;
-                case BECAME_PAIRABLE:
-                    perProcessCallback(true, mCallback);
+                case SCAN_MODE_CHANGED:
+                    if (isTurningOn) {
+                        perProcessCallback(true, mCallback);
+                        isTurningOn = false;
+                    }
+                    break;
+                case POWER_STATE_CHANGED:
+                    if (!((Boolean) message.obj)) {
+                        transitionTo(mHotOff);
+                        if (!mContext.getResources().getBoolean
+                            (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
+                            deferMessage(obtainMessage(TURN_COLD));
+                        }
+                    }
                     break;
                 case USER_TURN_ON:
                     broadcastState(BluetoothAdapter.STATE_TURNING_ON);
@@ -579,13 +618,6 @@
                         mBluetoothService.switchConnectable(false);
                     }
                     break;
-                case BECAME_NON_PAIRABLE:
-                    transitionTo(mHotOff);
-                    if (!mContext.getResources().getBoolean
-                        (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
-                        deferMessage(obtainMessage(TURN_COLD));
-                    }
-                    break;
                 case AIRPLANE_MODE_ON:
                     mBluetoothService.switchConnectable(false);
                     allProcessesCallback(false);
@@ -602,6 +634,11 @@
         }
     }
 
+    private void shutoffBluetooth() {
+        mBluetoothService.shutoffBluetooth();
+        mEventLoop.stop();
+        mBluetoothService.cleanNativeAfterShutoffBluetooth();
+    }
 
     private void perProcessCallback(boolean on, IBluetoothStateChangeCallback c) {
         if (c == null) return;
diff --git a/core/java/android/server/BluetoothBondState.java b/core/java/android/server/BluetoothBondState.java
index 6710aab..fbc1c27 100644
--- a/core/java/android/server/BluetoothBondState.java
+++ b/core/java/android/server/BluetoothBondState.java
@@ -134,7 +134,6 @@
     /** reason is ignored unless state == BOND_NOT_BONDED */
     public synchronized void setBondState(String address, int state, int reason) {
         if (DBG) Log.d(TAG, "setBondState " + "address" + " " + state + "reason: " + reason);
-        if (!mService.isEnabled()) return;
 
         int oldState = getBondState(address);
         if (oldState == state) {
@@ -459,16 +458,26 @@
         //   intent reach them. But that left a small time gap that could reject
         //   incoming connection due to undefined priorities.
         if (state == BluetoothDevice.BOND_BONDED) {
-            if (mA2dpProxy.getPriority(remoteDevice) == BluetoothProfile.PRIORITY_UNDEFINED) {
+            if (mA2dpProxy != null &&
+                  mA2dpProxy.getPriority(remoteDevice) == BluetoothProfile.PRIORITY_UNDEFINED) {
                 mA2dpProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_ON);
             }
 
-            if (mHeadsetProxy.getPriority(remoteDevice) == BluetoothProfile.PRIORITY_UNDEFINED) {
+            if (mHeadsetProxy != null &&
+                  mHeadsetProxy.getPriority(remoteDevice) == BluetoothProfile.PRIORITY_UNDEFINED) {
                 mHeadsetProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_ON);
             }
         } else if (state == BluetoothDevice.BOND_NONE) {
-            mA2dpProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_UNDEFINED);
-            mHeadsetProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_UNDEFINED);
+            if (mA2dpProxy != null) {
+                mA2dpProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_UNDEFINED);
+            }
+            if (mHeadsetProxy != null) {
+                mHeadsetProxy.setPriority(remoteDevice, BluetoothProfile.PRIORITY_UNDEFINED);
+            }
+        }
+
+        if (mA2dpProxy == null || mHeadsetProxy == null) {
+            Log.e(TAG, "Proxy is null:" + mA2dpProxy + ":" + mHeadsetProxy);
         }
     }
 
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index d73f8c9..6eff796 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -322,6 +322,12 @@
             intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
             mContext.sendBroadcast(intent, BLUETOOTH_PERM);
         } else if (name.equals("Pairable") || name.equals("Discoverable")) {
+            adapterProperties.setProperty(name, propValues[1]);
+
+            if (name.equals("Discoverable")) {
+                mBluetoothState.sendMessage(BluetoothAdapterStateMachine.SCAN_MODE_CHANGED);
+            }
+
             String pairable = name.equals("Pairable") ? propValues[1] :
                 adapterProperties.getProperty("Pairable");
             String discoverable = name.equals("Discoverable") ? propValues[1] :
@@ -331,16 +337,6 @@
             if (pairable == null || discoverable == null)
                 return;
 
-            adapterProperties.setProperty(name, propValues[1]);
-
-            if (name.equals("Pairable")) {
-                if (pairable.equals("true")) {
-                    mBluetoothState.sendMessage(BluetoothAdapterStateMachine.BECAME_PAIRABLE);
-                } else {
-                    mBluetoothState.sendMessage(BluetoothAdapterStateMachine.BECAME_NON_PAIRABLE);
-                }
-            }
-
             int mode = BluetoothService.bluezStringToScanMode(
                     pairable.equals("true"),
                     discoverable.equals("true"));
@@ -377,10 +373,11 @@
                 mBluetoothService.updateBluetoothState(value);
             }
         } else if (name.equals("Powered")) {
+            mBluetoothState.sendMessage(BluetoothAdapterStateMachine.POWER_STATE_CHANGED,
+                propValues[1].equals("true") ? new Boolean(true) : new Boolean(false));
             // bluetoothd has restarted, re-read all our properties.
             // Note: bluez only sends this property change when it restarts.
-            if (propValues[1].equals("true"))
-                onRestartRequired();
+            onRestartRequired();
         } else if (name.equals("DiscoverableTimeout")) {
             adapterProperties.setProperty(name, propValues[1]);
         }
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 0357958..ee14673 100755
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -437,7 +437,21 @@
      * power off Bluetooth
      */
     synchronized void shutoffBluetooth() {
+        if (mAdapterSdpHandles != null) removeReservedServiceRecordsNative(mAdapterSdpHandles);
+        setBluetoothTetheringNative(false, BluetoothPanProfileHandler.NAP_ROLE,
+                BluetoothPanProfileHandler.NAP_BRIDGE);
         tearDownNativeDataNative();
+    }
+
+    /**
+     * Data clean up after Bluetooth shutoff
+     */
+    synchronized void cleanNativeAfterShutoffBluetooth() {
+        // Ths method is called after shutdown of event loop in the Bluetooth shut down
+        // procedure
+
+        // the adapter property could be changed before event loop is stoped, clear it again
+        mAdapterProperties.clear();
         disableNative();
         if (mRestart) {
             mRestart = false;
@@ -743,26 +757,6 @@
     public synchronized boolean setScanMode(int mode, int duration) {
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS,
                                                 "Need WRITE_SECURE_SETTINGS permission");
-        return setScanMode(mode, duration, true);
-    }
-
-    /**
-     * @param on true set the local Bluetooth module to be connectable
-     *                but not dicoverable
-     *           false set the local Bluetooth module to be not connectable
-     *                 and not dicoverable
-     */
-    /*package*/ synchronized void switchConnectable(boolean on) {
-        if (on) {
-            // 0 is a dummy value, does not apply for SCAN_MODE_CONNECTABLE
-            setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE, 0, false);
-        } else {
-            // 0 is a dummy value, does not apply for SCAN_MODE_NONE
-            setScanMode(BluetoothAdapter.SCAN_MODE_NONE, 0, false);
-        }
-    }
-
-    private synchronized boolean setScanMode(int mode, int duration, boolean allowOnlyInOnState) {
         boolean pairable;
         boolean discoverable;
 
@@ -785,19 +779,33 @@
             return false;
         }
 
-        if (allowOnlyInOnState) {
-            setPropertyBoolean("Discoverable", discoverable);
-            setPropertyBoolean("Pairable", pairable);
-        } else {
-            // allowed to set the property through native layer directly
-            setAdapterPropertyBooleanNative("Discoverable", discoverable ? 1 : 0);
-            // do setting pairable after setting discoverable since the adapter
-            // state machine uses pairable event for state change
-            setAdapterPropertyBooleanNative("Pairable", pairable ? 1 : 0);
-        }
+        setPropertyBoolean("Discoverable", discoverable);
+        setPropertyBoolean("Pairable", pairable);
         return true;
     }
 
+    /**
+     * @param on true set the local Bluetooth module to be connectable
+     *                The dicoverability is recovered to what it was before
+     *                switchConnectable(false) call
+     *           false set the local Bluetooth module to be not connectable
+     *                 and not dicoverable
+     */
+    /*package*/ synchronized void switchConnectable(boolean on) {
+        setAdapterPropertyBooleanNative("Powered", on ? 1 : 0);
+    }
+
+    /*package*/ synchronized void setPairable() {
+        String pairableString = getProperty("Pairable", false);
+        if (pairableString == null) {
+            Log.e(TAG, "null pairableString");
+            return;
+        }
+        if (pairableString.equals("false")) {
+            setAdapterPropertyBooleanNative("Pairable", 1);
+        }
+    }
+
     /*package*/ synchronized String getProperty(String name, boolean checkState) {
         // If checkState is false, check if the event loop is running.
         // before making the call to Bluez
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index 2c78679..2f9852d 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -275,7 +275,7 @@
         }
 
         if (reflowed == null) {
-            reflowed = new StaticLayout(true);
+            reflowed = new StaticLayout(getText());
         } else {
             reflowed.prepare();
         }
@@ -488,7 +488,8 @@
 
     private int mTopPadding, mBottomPadding;
 
-    private static StaticLayout sStaticLayout = new StaticLayout(true);
+    private static StaticLayout sStaticLayout = null;
+
     private static final Object[] sLock = new Object[0];
 
     private static final int START = 0;
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index eabeef0..421e995 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -880,6 +880,10 @@
             }
         }
         Directions directions = getLineDirections(line);
+        // Returned directions can actually be null
+        if (directions == null) {
+            return 0f;
+        }
         int dir = getParagraphDirection(line);
 
         TextLine tl = TextLine.obtain();
@@ -1781,17 +1785,6 @@
         }
     }
 
-    /**
-     * Inform this layout that not all of its lines will be displayed, because a maximum number of
-     * lines has been set on the associated TextView.
-     *
-     * A non strictly positive value means that all lines are displayed.
-     *
-     * @param lineCount number of visible lines
-     * @hide
-     */
-    public void setMaximumVisibleLineCount(int lineCount) {}
-
     private CharSequence mText;
     private TextPaint mPaint;
     /* package */ TextPaint mWorkPaint;
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 14c71b2..788711d 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -23,6 +23,7 @@
 import android.text.style.LineHeightSpan;
 import android.text.style.MetricAffectingSpan;
 import android.text.style.TabStopSpan;
+import android.util.Log;
 
 import com.android.internal.util.ArrayUtils;
 
@@ -38,6 +39,8 @@
  */
 public class StaticLayout extends Layout {
 
+    static final String TAG = "StaticLayout";
+
     public StaticLayout(CharSequence source, TextPaint paint,
                         int width,
                         Alignment align, float spacingmult, float spacingadd,
@@ -75,7 +78,7 @@
             float spacingmult, float spacingadd,
             boolean includepad) {
         this(source, bufstart, bufend, paint, outerwidth, align, textDir,
-                spacingmult, spacingadd, includepad, null, 0);
+                spacingmult, spacingadd, includepad, null, 0, Integer.MAX_VALUE);
 }
 
     public StaticLayout(CharSequence source, int bufstart, int bufend,
@@ -86,7 +89,7 @@
             TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
         this(source, bufstart, bufend, paint, outerwidth, align,
                 TextDirectionHeuristics.FIRSTSTRONG_LTR,
-                spacingmult, spacingadd, includepad, ellipsize, ellipsizedWidth);
+                spacingmult, spacingadd, includepad, ellipsize, ellipsizedWidth, Integer.MAX_VALUE);
     }
 
     /**
@@ -97,7 +100,7 @@
                         Alignment align, TextDirectionHeuristic textDir,
                         float spacingmult, float spacingadd,
                         boolean includepad,
-                        TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
+                        TextUtils.TruncateAt ellipsize, int ellipsizedWidth, int maxLines) {
         super((ellipsize == null)
                 ? source
                 : (source instanceof Spanned)
@@ -130,6 +133,7 @@
         mLines = new int[ArrayUtils.idealIntArraySize(2 * mColumns)];
         mLineDirections = new Directions[
                              ArrayUtils.idealIntArraySize(2 * mColumns)];
+        mMaximumVisibleLineCount = maxLines;
 
         mMeasured = MeasuredText.obtain();
 
@@ -141,8 +145,8 @@
         mFontMetricsInt = null;
     }
 
-    /* package */ StaticLayout(boolean ellipsize) {
-        super(null, null, 0, null, 0, 0);
+    /* package */ StaticLayout(CharSequence text) {
+        super(text, null, 0, null, 0, 0);
 
         mColumns = COLUMNS_ELLIPSIZE;
         mLines = new int[ArrayUtils.idealIntArraySize(2 * mColumns)];
@@ -394,6 +398,7 @@
                                 okBottom = fitBottom;
                         }
                     } else {
+                            final boolean moreChars = (j + 1 < spanEnd);
                             if (ok != here) {
                                 // Log.e("text", "output ok " + here + " to " +ok);
 
@@ -411,7 +416,7 @@
                                         ok == bufEnd, includepad, trackpad,
                                         chs, widths, paraStart,
                                         ellipsize, ellipsizedWidth, okWidth,
-                                        paint);
+                                        paint, moreChars);
 
                                 here = ok;
                             } else if (fit != here) {
@@ -427,7 +432,7 @@
                                         fit == bufEnd, includepad, trackpad,
                                         chs, widths, paraStart,
                                         ellipsize, ellipsizedWidth, fitWidth,
-                                        paint);
+                                        paint, moreChars);
 
                                 here = fit;
                             } else {
@@ -449,7 +454,7 @@
                                         trackpad,
                                         chs, widths, paraStart,
                                         ellipsize, ellipsizedWidth,
-                                        widths[here - paraStart], paint);
+                                        widths[here - paraStart], paint, moreChars);
 
                                 here = here + 1;
                             }
@@ -472,10 +477,13 @@
                             width = restWidth;
                         }
                     }
+                    if (mLineCount >= mMaximumVisibleLineCount) {
+                        break;
+                    }
                 }
             }
 
-            if (paraEnd != here) {
+            if (paraEnd != here && mLineCount < mMaximumVisibleLineCount) {
                 if ((fitTop | fitBottom | fitDescent | fitAscent) == 0) {
                     paint.getFontMetricsInt(fm);
 
@@ -496,7 +504,7 @@
                         needMultiply, paraStart, chdirs, dir, easy,
                         paraEnd == bufEnd, includepad, trackpad,
                         chs, widths, paraStart,
-                        ellipsize, ellipsizedWidth, w, paint);
+                        ellipsize, ellipsizedWidth, w, paint, paraEnd != bufEnd);
             }
 
             paraStart = paraEnd;
@@ -505,7 +513,8 @@
                 break;
         }
 
-        if (bufEnd == bufStart || source.charAt(bufEnd - 1) == CHAR_NEW_LINE) {
+        if ((bufEnd == bufStart || source.charAt(bufEnd - 1) == CHAR_NEW_LINE) &&
+                mLineCount < mMaximumVisibleLineCount) {
             // Log.e("text", "output last " + bufEnd);
 
             paint.getFontMetricsInt(fm);
@@ -519,7 +528,7 @@
                     needMultiply, bufEnd, null, DEFAULT_DIR, true,
                     true, includepad, trackpad,
                     null, null, bufStart,
-                    ellipsize, ellipsizedWidth, 0, paint);
+                    ellipsize, ellipsizedWidth, 0, paint, false);
         }
     }
 
@@ -624,7 +633,7 @@
                       boolean includePad, boolean trackPad,
                       char[] chs, float[] widths, int widthStart,
                       TextUtils.TruncateAt ellipsize, float ellipsisWidth,
-                      float textWidth, TextPaint paint) {
+                      float textWidth, TextPaint paint, boolean moreChars) {
         int j = mLineCount;
         int off = j * mColumns;
         int want = off + mColumns + TOP;
@@ -722,9 +731,10 @@
 
         // If ellipsize is in marquee mode, do not apply ellipsis on the first line
         if (ellipsize != null && (ellipsize != TextUtils.TruncateAt.MARQUEE || j != 0)) {
+            boolean forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount);
             calculateEllipsis(start, end, widths, widthStart,
                     ellipsisWidth, ellipsize, j,
-                    textWidth, paint);
+                    textWidth, paint, forceEllipsis);
         }
 
         mLineCount++;
@@ -734,9 +744,9 @@
     private void calculateEllipsis(int lineStart, int lineEnd,
                                    float[] widths, int widthStart,
                                    float avail, TextUtils.TruncateAt where,
-                                   int line, float textWidth, TextPaint paint) {
-
-        if (textWidth <= avail) {
+                                   int line, float textWidth, TextPaint paint,
+                                   boolean forceEllipsis) {
+        if (textWidth <= avail && !forceEllipsis) {
             // Everything fits!
             mLines[mColumns * line + ELLIPSIS_START] = 0;
             mLines[mColumns * line + ELLIPSIS_COUNT] = 0;
@@ -744,25 +754,33 @@
         }
 
         float ellipsisWidth = paint.measureText(HORIZONTAL_ELLIPSIS);
-        int ellipsisStart, ellipsisCount;
+        int ellipsisStart = 0;
+        int ellipsisCount = 0;
         int len = lineEnd - lineStart;
 
+        // We only support start ellipsis on a single line
         if (where == TextUtils.TruncateAt.START) {
-            float sum = 0;
-            int i;
+            if (mMaximumVisibleLineCount == 1) {
+                float sum = 0;
+                int i;
 
-            for (i = len; i >= 0; i--) {
-                float w = widths[i - 1 + lineStart - widthStart];
+                for (i = len; i >= 0; i--) {
+                    float w = widths[i - 1 + lineStart - widthStart];
 
-                if (w + sum + ellipsisWidth > avail) {
-                    break;
+                    if (w + sum + ellipsisWidth > avail) {
+                        break;
+                    }
+
+                    sum += w;
                 }
 
-                sum += w;
+                ellipsisStart = 0;
+                ellipsisCount = i;
+            } else {
+                if (Log.isLoggable(TAG, Log.WARN)) {
+                    Log.w(TAG, "Start Ellipsis only supported with one line");
+                }
             }
-
-            ellipsisStart = 0;
-            ellipsisCount = i;
         } else if (where == TextUtils.TruncateAt.END || where == TextUtils.TruncateAt.MARQUEE) {
             float sum = 0;
             int i;
@@ -779,34 +797,45 @@
 
             ellipsisStart = i;
             ellipsisCount = len - i;
-        } else /* where = TextUtils.TruncateAt.MIDDLE */ {
-            float lsum = 0, rsum = 0;
-            int left = 0, right = len;
+            if (forceEllipsis && ellipsisCount == 0 && i > 0) {
+                ellipsisStart = i - 1;
+                ellipsisCount = 1;
+            }
+        } else {
+            // where = TextUtils.TruncateAt.MIDDLE We only support middle ellipsis on a single line
+            if (mMaximumVisibleLineCount == 1) {
+                float lsum = 0, rsum = 0;
+                int left = 0, right = len;
 
-            float ravail = (avail - ellipsisWidth) / 2;
-            for (right = len; right >= 0; right--) {
-                float w = widths[right - 1 + lineStart - widthStart];
+                float ravail = (avail - ellipsisWidth) / 2;
+                for (right = len; right >= 0; right--) {
+                    float w = widths[right - 1 + lineStart - widthStart];
 
-                if (w + rsum > ravail) {
-                    break;
+                    if (w + rsum > ravail) {
+                        break;
+                    }
+
+                    rsum += w;
                 }
 
-                rsum += w;
-            }
+                float lavail = avail - ellipsisWidth - rsum;
+                for (left = 0; left < right; left++) {
+                    float w = widths[left + lineStart - widthStart];
 
-            float lavail = avail - ellipsisWidth - rsum;
-            for (left = 0; left < right; left++) {
-                float w = widths[left + lineStart - widthStart];
+                    if (w + lsum > lavail) {
+                        break;
+                    }
 
-                if (w + lsum > lavail) {
-                    break;
+                    lsum += w;
                 }
 
-                lsum += w;
+                ellipsisStart = left;
+                ellipsisCount = right - left;
+            } else {
+                if (Log.isLoggable(TAG, Log.WARN)) {
+                    Log.w(TAG, "Middle Ellipsis only supported with one line");
+                }
             }
-
-            ellipsisStart = left;
-            ellipsisCount = right - left;
         }
 
         mLines[mColumns * line + ELLIPSIS_START] = ellipsisStart;
@@ -916,14 +945,6 @@
         return mEllipsizedWidth;
     }
 
-    /**
-     * @hide
-     */
-    @Override
-    public void setMaximumVisibleLineCount(int lineCount) {
-        mMaximumVisibleLineCount = lineCount;
-    }
-    
     void prepare() {
         mMeasured = MeasuredText.obtain();
     }
@@ -949,7 +970,7 @@
 
     private int[] mLines;
     private Directions[] mLineDirections;
-    private int mMaximumVisibleLineCount = 0;
+    private int mMaximumVisibleLineCount = Integer.MAX_VALUE;
 
     private static final int START_MASK = 0x1FFFFFFF;
     private static final int DIR_SHIFT  = 30;
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index 376e4f5..fcc372e 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -125,6 +125,9 @@
         mLen = limit - start;
         mDir = dir;
         mDirections = directions;
+        if (mDirections == null) {
+            throw new IllegalArgumentException("Directions cannot be null");
+        }
         mHasTabs = hasTabs;
         mSpanned = null;
 
diff --git a/core/java/android/text/style/SuggestionSpan.java b/core/java/android/text/style/SuggestionSpan.java
index 555aac5..fb94bc7 100644
--- a/core/java/android/text/style/SuggestionSpan.java
+++ b/core/java/android/text/style/SuggestionSpan.java
@@ -17,10 +17,13 @@
 package android.text.style;
 
 import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Color;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.SystemClock;
 import android.text.ParcelableSpan;
+import android.text.TextPaint;
 import android.text.TextUtils;
 import android.widget.TextView;
 
@@ -34,23 +37,36 @@
  * display a popup dialog listing suggestion replacement for that text. The user can then replace
  * the original text by one of the suggestions.
  *
- * These spans should typically be created by the input method to privide correction and alternates
+ * These spans should typically be created by the input method to provide correction and alternates
  * for the text.
  *
  * @see TextView#setSuggestionsEnabled(boolean)
  */
-public class SuggestionSpan implements ParcelableSpan {
+public class SuggestionSpan extends CharacterStyle implements ParcelableSpan {
+
     /**
-     * Flag for indicating that the input is verbatim. TextView refers to this flag to determine
-     * how it displays a word with SuggestionSpan.
+     * Sets this flag if the suggestions should be easily accessible with few interactions.
+     * This flag should be set for every suggestions that the user is likely to use.
      */
-    public static final int FLAG_VERBATIM = 0x0001;
+    public static final int FLAG_EASY_CORRECT = 0x0001;
+
+    /**
+     * Sets this flag if the suggestions apply to a misspelled word/text. This type of suggestion is
+     * rendered differently to highlight the error.
+     */
+    public static final int FLAG_MISSPELLED = 0x0002;
 
     public static final String ACTION_SUGGESTION_PICKED = "android.text.style.SUGGESTION_PICKED";
     public static final String SUGGESTION_SPAN_PICKED_AFTER = "after";
     public static final String SUGGESTION_SPAN_PICKED_BEFORE = "before";
     public static final String SUGGESTION_SPAN_PICKED_HASHCODE = "hashcode";
 
+    /**
+     * The default underline thickness as a percentage of the system's default underline thickness
+     * (i.e., 100 means the default thickness, and 200 is a double thickness).
+     */
+    private static final int DEFAULT_UNDERLINE_PERCENTAGE = 100;
+
     public static final int SUGGESTIONS_MAX_SIZE = 5;
 
     /*
@@ -66,6 +82,11 @@
     private final String mNotificationTargetClassName;
     private final int mHashCode;
 
+    private float mMisspelledUnderlineThickness;
+    private int mMisspelledUnderlineColor;
+    private float mEasyCorrectUnderlineThickness;
+    private int mEasyCorrectUnderlineColor;
+
     /*
      * TODO: If switching IME is required, needs to add parameters for ids of InputMethodInfo
      * and InputMethodSubtype.
@@ -107,6 +128,7 @@
         } else {
             mLocaleString = locale.toString();
         }
+
         if (notificationTargetClass != null) {
             mNotificationTargetClassName = notificationTargetClass.getCanonicalName();
         } else {
@@ -114,6 +136,36 @@
         }
         mHashCode = hashCodeInternal(
                 mFlags, mSuggestions, mLocaleString, mNotificationTargetClassName);
+
+        initStyle(context);
+    }
+
+    private void initStyle(Context context) {
+        // Read the colors. We need to store the color and the underline thickness, as the span
+        // does not have access to the context when it is read from a parcel.
+        TypedArray typedArray;
+
+        typedArray = context.obtainStyledAttributes(null,
+                com.android.internal.R.styleable.SuggestionSpan,
+                com.android.internal.R.attr.textAppearanceEasyCorrectSuggestion, 0);
+
+        mEasyCorrectUnderlineThickness = getThicknessPercentage(typedArray,
+                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThicknessPercentage);
+        mEasyCorrectUnderlineColor = typedArray.getColor(
+                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
+
+        typedArray = context.obtainStyledAttributes(null,
+                com.android.internal.R.styleable.SuggestionSpan,
+                com.android.internal.R.attr.textAppearanceMisspelledSuggestion, 0);
+        mMisspelledUnderlineThickness = getThicknessPercentage(typedArray,
+                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThicknessPercentage);
+        mMisspelledUnderlineColor = typedArray.getColor(
+                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
+    }
+
+    private static float getThicknessPercentage(TypedArray typedArray, int index) {
+        int value  = typedArray.getInteger(index, DEFAULT_UNDERLINE_PERCENTAGE);
+        return value / 100.0f;
     }
 
     public SuggestionSpan(Parcel src) {
@@ -122,6 +174,10 @@
         mLocaleString = src.readString();
         mNotificationTargetClassName = src.readString();
         mHashCode = src.readInt();
+        mEasyCorrectUnderlineColor = src.readInt();
+        mEasyCorrectUnderlineThickness = src.readFloat();
+        mMisspelledUnderlineColor = src.readInt();
+        mMisspelledUnderlineThickness = src.readFloat();
     }
 
     /**
@@ -167,6 +223,10 @@
         dest.writeString(mLocaleString);
         dest.writeString(mNotificationTargetClassName);
         dest.writeInt(mHashCode);
+        dest.writeInt(mEasyCorrectUnderlineColor);
+        dest.writeFloat(mEasyCorrectUnderlineThickness);
+        dest.writeInt(mMisspelledUnderlineColor);
+        dest.writeFloat(mMisspelledUnderlineThickness);
     }
 
     @Override
@@ -205,4 +265,13 @@
             return new SuggestionSpan[size];
         }
     };
+
+    @Override
+    public void updateDrawState(TextPaint tp) {
+        if ((getFlags() & FLAG_MISSPELLED) != 0) {
+            tp.setUnderlineText(true, mMisspelledUnderlineColor, mMisspelledUnderlineThickness);
+        } else if ((getFlags() & FLAG_EASY_CORRECT) != 0) {
+            tp.setUnderlineText(true, mEasyCorrectUnderlineColor, mEasyCorrectUnderlineThickness);
+        }
+    }
 }
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index e586370..cfbb47c 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -151,6 +151,7 @@
     static native void nResizeLayer(int layerId, int width, int height, int[] layerInfo);
     static native void nUpdateTextureLayer(int layerId, int width, int height, boolean opaque,
             SurfaceTexture surface);
+    static native void nSetTextureLayerTransform(int layerId, int matrix);
     static native void nDestroyLayer(int layerId);
     static native void nDestroyLayerDeferred(int layerId);
     static native boolean nCopyLayer(int layerId, int bitmap);
diff --git a/core/java/android/view/GLES20RenderLayer.java b/core/java/android/view/GLES20RenderLayer.java
index 41f16e2..23a7166 100644
--- a/core/java/android/view/GLES20RenderLayer.java
+++ b/core/java/android/view/GLES20RenderLayer.java
@@ -17,6 +17,7 @@
 package android.view;
 
 import android.graphics.Canvas;
+import android.graphics.Matrix;
 
 /**
  * An OpenGL ES 2.0 implementation of {@link HardwareLayer}. This
@@ -87,4 +88,11 @@
         }
         return getCanvas();
     }
+
+    /**
+     * Ignored
+     */
+    @Override
+    void setTransform(Matrix matrix) {
+    }
 }
diff --git a/core/java/android/view/GLES20TextureLayer.java b/core/java/android/view/GLES20TextureLayer.java
index 391d9f4..6c41023 100644
--- a/core/java/android/view/GLES20TextureLayer.java
+++ b/core/java/android/view/GLES20TextureLayer.java
@@ -17,6 +17,7 @@
 package android.view;
 
 import android.graphics.Canvas;
+import android.graphics.Matrix;
 import android.graphics.SurfaceTexture;
 
 /**
@@ -75,4 +76,9 @@
         super.update(width, height, isOpaque);
         GLES20Canvas.nUpdateTextureLayer(mLayer, width, height, isOpaque, mSurface);
     }
+
+    @Override
+    void setTransform(Matrix matrix) {
+        GLES20Canvas.nSetTextureLayerTransform(mLayer, matrix.native_instance);
+    }
 }
diff --git a/core/java/android/view/HardwareLayer.java b/core/java/android/view/HardwareLayer.java
index dfb39ae..28389ab 100644
--- a/core/java/android/view/HardwareLayer.java
+++ b/core/java/android/view/HardwareLayer.java
@@ -18,6 +18,7 @@
 
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Matrix;
 
 /**
  * A hardware layer can be used to render graphics operations into a hardware
@@ -150,4 +151,11 @@
         mHeight = height;
         mOpaque = isOpaque;
     }
+
+    /**
+     * Sets an optional transform on this layer.
+     * 
+     * @param matrix The transform to apply to the layer.
+     */
+    abstract void setTransform(Matrix matrix);
 }
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index f2c3131..a05637d 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -718,7 +718,9 @@
                 if (!createSurface(holder)) {
                     return;
                 }
-                setEnabled(true);                
+                if (mCanvas != null) {
+                    setEnabled(true);
+                }
             }
         }
 
diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java
index 53a6bcb..b72222e 100644
--- a/core/java/android/view/TextureView.java
+++ b/core/java/android/view/TextureView.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Matrix;
 import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.SurfaceTexture;
@@ -104,6 +105,9 @@
 
     private boolean mOpaque = true;
 
+    private final Matrix mMatrix = new Matrix();
+    private boolean mMatrixChanged;
+
     private final Object[] mLock = new Object[0];
     private boolean mUpdateLayer;
 
@@ -312,6 +316,11 @@
 
         applyUpdate();
 
+        if (mMatrixChanged) {
+            mLayer.setTransform(mMatrix);
+            mMatrixChanged = false;
+        }
+
         return mLayer;
     }
 
@@ -358,6 +367,50 @@
     }
 
     /**
+     * <p>Sets the transform to associate with this texture view.
+     * The specified transform applies to the underlying surface
+     * texture and does not affect the size or position of the view
+     * itself, only of its content.</p>
+     * 
+     * <p>Some transforms might prevent the content from drawing
+     * all the pixels contained within this view's bounds. In such
+     * situations, make sure this texture view is not marked opaque.</p>
+     * 
+     * @param transform The transform to apply to the content of
+     *        this view.
+     * 
+     * @see #getTransform(android.graphics.Matrix) 
+     * @see #isOpaque() 
+     * @see #setOpaque(boolean) 
+     */
+    public void setTransform(Matrix transform) {
+        mMatrix.set(transform);
+        mMatrixChanged = true;
+        invalidate();
+    }
+
+    /**
+     * Returns the transform associated with this texture view.
+     * 
+     * @param transform The {@link Matrix} in which to copy the current
+     *        transform. Can be null.
+     * 
+     * @return The specified matrix if not null or a new {@link Matrix}
+     *         instance otherwise.
+     *         
+     * @see #setTransform(android.graphics.Matrix) 
+     */
+    public Matrix getTransform(Matrix transform) {
+        if (transform == null) {
+            transform = new Matrix();
+        }
+
+        transform.set(mMatrix);
+
+        return transform;
+    }
+
+    /**
      * <p>Returns a {@link android.graphics.Bitmap} representation of the content
      * of the associated surface texture. If the surface texture is not available,
      * this method returns null.</p>
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 54bd637..6627bf6 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4898,22 +4898,22 @@
         switch (direction) {
             case FOCUS_LEFT:
                 if (mNextFocusLeftId == View.NO_ID) return null;
-                return findViewShouldExist(root, mNextFocusLeftId);
+                return findViewInsideOutShouldExist(root, mNextFocusLeftId);
             case FOCUS_RIGHT:
                 if (mNextFocusRightId == View.NO_ID) return null;
-                return findViewShouldExist(root, mNextFocusRightId);
+                return findViewInsideOutShouldExist(root, mNextFocusRightId);
             case FOCUS_UP:
                 if (mNextFocusUpId == View.NO_ID) return null;
-                return findViewShouldExist(root, mNextFocusUpId);
+                return findViewInsideOutShouldExist(root, mNextFocusUpId);
             case FOCUS_DOWN:
                 if (mNextFocusDownId == View.NO_ID) return null;
-                return findViewShouldExist(root, mNextFocusDownId);
+                return findViewInsideOutShouldExist(root, mNextFocusDownId);
             case FOCUS_FORWARD:
                 if (mNextFocusForwardId == View.NO_ID) return null;
-                return findViewShouldExist(root, mNextFocusForwardId);
+                return findViewInsideOutShouldExist(root, mNextFocusForwardId);
             case FOCUS_BACKWARD: {
                 final int id = mID;
-                return root.findViewByPredicate(new Predicate<View>() {
+                return root.findViewByPredicateInsideOut(this, new Predicate<View>() {
                     @Override
                     public boolean apply(View t) {
                         return t.mNextFocusForwardId == id;
@@ -4924,8 +4924,14 @@
         return null;
     }
 
-    private static View findViewShouldExist(View root, int childViewId) {
-        View result = root.findViewById(childViewId);
+    private View findViewInsideOutShouldExist(View root, final int childViewId) {
+        View result = root.findViewByPredicateInsideOut(this, new Predicate<View>() {
+            @Override
+            public boolean apply(View t) {
+                return t.mID == childViewId;
+            }
+        });
+
         if (result == null) {
             Log.w(VIEW_LOG_TAG, "couldn't find next focus view specified "
                     + "by user for id " + childViewId);
@@ -11746,9 +11752,10 @@
     /**
      * {@hide}
      * @param predicate The predicate to evaluate.
+     * @param childToSkip If not null, ignores this child during the recursive traversal.
      * @return The first view that matches the predicate or null.
      */
-    protected View findViewByPredicateTraversal(Predicate<View> predicate) {
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
         if (predicate.apply(this)) {
             return this;
         }
@@ -11792,7 +11799,41 @@
      * @return The first view that matches the predicate or null.
      */
     public final View findViewByPredicate(Predicate<View> predicate) {
-        return findViewByPredicateTraversal(predicate);
+        return findViewByPredicateTraversal(predicate, null);
+    }
+
+    /**
+     * {@hide}
+     * Look for a child view that matches the specified predicate,
+     * starting with the specified view and its descendents and then
+     * recusively searching the ancestors and siblings of that view
+     * until this view is reached.
+     *
+     * This method is useful in cases where the predicate does not match
+     * a single unique view (perhaps multiple views use the same id)
+     * and we are trying to find the view that is "closest" in scope to the
+     * starting view.
+     *
+     * @param start The view to start from.
+     * @param predicate The predicate to evaluate.
+     * @return The first view that matches the predicate or null.
+     */
+    public final View findViewByPredicateInsideOut(View start, Predicate<View> predicate) {
+        View childToSkip = null;
+        for (;;) {
+            View view = start.findViewByPredicateTraversal(predicate, childToSkip);
+            if (view != null || start == this) {
+                return view;
+            }
+
+            ViewParent parent = start.getParent();
+            if (parent == null || !(parent instanceof View)) {
+                return null;
+            }
+
+            childToSkip = start;
+            start = (View) parent;
+        }
     }
 
     /**
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 7a1acfd..08cb270 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3038,7 +3038,7 @@
      * {@hide}
      */
     @Override
-    protected View findViewByPredicateTraversal(Predicate<View> predicate) {
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
         if (predicate.apply(this)) {
             return this;
         }
@@ -3049,7 +3049,7 @@
         for (int i = 0; i < len; i++) {
             View v = where[i];
 
-            if ((v.mPrivateFlags & IS_ROOT_NAMESPACE) == 0) {
+            if (v != childToSkip && (v.mPrivateFlags & IS_ROOT_NAMESPACE) == 0) {
                 v = v.findViewByPredicate(predicate);
 
                 if (v != null) {
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 6ac679c..e0e1a1a 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -1219,4 +1219,12 @@
      * @param uiOptions Flags specifying extra options for this window.
      */
     public void setUiOptions(int uiOptions) { }
+
+    /**
+     * Set extra options that will influence the UI for this window.
+     * Only the bits filtered by mask will be modified.
+     * @param uiOptions Flags specifying extra options for this window.
+     * @param mask Flags specifying which options should be modified. Others will remain unchanged.
+     */
+    public void setUiOptions(int uiOptions, int mask) { }
 }
diff --git a/core/java/android/webkit/HTML5Audio.java b/core/java/android/webkit/HTML5Audio.java
index 6fc0d11..1e95854 100644
--- a/core/java/android/webkit/HTML5Audio.java
+++ b/core/java/android/webkit/HTML5Audio.java
@@ -27,6 +27,8 @@
 import android.util.Log;
 
 import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -46,6 +48,8 @@
 
     // The C++ MediaPlayerPrivateAndroid object.
     private int mNativePointer;
+    // The private status of the view that created this player
+    private boolean mIsPrivate;
 
     private static int IDLE        =  0;
     private static int INITIALIZED =  1;
@@ -64,6 +68,9 @@
     // Timer thread -> UI thread
     private static final int TIMEUPDATE = 100;
 
+    private static final String COOKIE = "Cookie";
+    private static final String HIDE_URL_LOGS = "x-hide-urls-from-log";
+
     // The spec says the timer should fire every 250 ms or less.
     private static final int TIMEUPDATE_PERIOD = 250;  // ms
     // The timer for timeupate events.
@@ -138,10 +145,11 @@
     /**
      * @param nativePtr is the C++ pointer to the MediaPlayerPrivate object.
      */
-    public HTML5Audio(int nativePtr) {
+    public HTML5Audio(WebViewCore webViewCore, int nativePtr) {
         // Save the native ptr
         mNativePointer = nativePtr;
         resetMediaPlayer();
+        mIsPrivate = webViewCore.getWebView().isPrivateBrowsingEnabled();
     }
 
     private void resetMediaPlayer() {
@@ -169,7 +177,17 @@
             if (mState != IDLE) {
                 resetMediaPlayer();
             }
-            mMediaPlayer.setDataSource(url);
+            String cookieValue = CookieManager.getInstance().getCookie(url, mIsPrivate);
+            Map<String, String> headers = new HashMap<String, String>();
+
+            if (cookieValue != null) {
+                headers.put(COOKIE, cookieValue);
+            }
+            if (mIsPrivate) {
+                headers.put(HIDE_URL_LOGS, "true");
+            }
+
+            mMediaPlayer.setDataSource(url, headers);
             mState = INITIALIZED;
             mMediaPlayer.prepareAsync();
         } catch (IOException e) {
diff --git a/core/java/android/webkit/JniUtil.java b/core/java/android/webkit/JniUtil.java
index 620973e..4264e9d 100644
--- a/core/java/android/webkit/JniUtil.java
+++ b/core/java/android/webkit/JniUtil.java
@@ -16,6 +16,7 @@
 
 package android.webkit;
 
+import android.app.ActivityManager;
 import android.content.Context;
 import android.net.Uri;
 import android.provider.Settings;
@@ -175,5 +176,16 @@
                 Settings.Secure.WEB_AUTOFILL_QUERY_URL);
     }
 
+    private static boolean canSatisfyMemoryAllocation(long bytesRequested) {
+        checkInitialized();
+        ActivityManager manager = (ActivityManager) sContext.getSystemService(
+                Context.ACTIVITY_SERVICE);
+        ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
+        manager.getMemoryInfo(memInfo);
+        long leftToAllocate = memInfo.availMem - memInfo.threshold;
+        return !memInfo.lowMemory && bytesRequested < leftToAllocate;
+    }
+
+
     private static native boolean nativeUseChromiumHttpStack();
 }
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 2bb9da1..6374b47 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -27,7 +27,6 @@
 import android.content.IntentFilter;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
-import android.content.res.AssetManager;
 import android.content.res.Configuration;
 import android.database.DataSetObserver;
 import android.graphics.Bitmap;
@@ -8104,8 +8103,7 @@
                     // nativeCreate sets mNativeClass to a non-zero value
                     String drawableDir = BrowserFrame.getRawResFilename(
                             BrowserFrame.DRAWABLEDIR, mContext);
-                    AssetManager am = mContext.getAssets();
-                    nativeCreate(msg.arg1, drawableDir, am);
+                    nativeCreate(msg.arg1, drawableDir);
                     if (mDelaySetPicture != null) {
                         setNewPicture(mDelaySetPicture, true);
                         mDelaySetPicture = null;
@@ -9140,7 +9138,7 @@
     private native Rect nativeCacheHitNodeBounds();
     private native int nativeCacheHitNodePointer();
     /* package */ native void nativeClearCursor();
-    private native void     nativeCreate(int ptr, String drawableDir, AssetManager am);
+    private native void     nativeCreate(int ptr, String drawableDir);
     private native int      nativeCursorFramePointer();
     private native Rect     nativeCursorNodeBounds();
     private native int nativeCursorNodePointer();
diff --git a/core/java/android/webkit/ZoomManager.java b/core/java/android/webkit/ZoomManager.java
index 70e48ad..2bcb020 100644
--- a/core/java/android/webkit/ZoomManager.java
+++ b/core/java/android/webkit/ZoomManager.java
@@ -709,10 +709,14 @@
 
         final WebSettings settings = mWebView.getSettings();
         final PackageManager pm = context.getPackageManager();
-        mSupportMultiTouch = pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)
+        mSupportMultiTouch = 
+                (pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)
+                 || pm.hasSystemFeature(PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT))
                 && settings.supportZoom() && settings.getBuiltInZoomControls();
-        mAllowPanAndScale = pm.hasSystemFeature(
-                PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT);
+        mAllowPanAndScale =
+                pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)
+                || pm.hasSystemFeature(PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT);
+
         if (mSupportMultiTouch && (mScaleDetector == null)) {
             mScaleDetector = new ScaleGestureDetector(context, new ScaleDetectorListener());
         } else if (!mSupportMultiTouch && (mScaleDetector != null)) {
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index db4df40..dae118e 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -637,6 +637,11 @@
     private boolean mIsAttached;
 
     /**
+     * Track the item count from the last time we handled a data change.
+     */
+    private int mLastHandledItemCount;
+
+    /**
      * Interface definition for a callback to be invoked when the list or grid
      * has been scrolled.
      */
@@ -1829,10 +1834,10 @@
         // Check if our previous measured size was at a point where we should scroll later.
         if (mTranscriptMode == TRANSCRIPT_MODE_NORMAL) {
             final int childCount = getChildCount();
-            final int listBottom = getBottom() - getPaddingBottom();
+            final int listBottom = getHeight() - getPaddingBottom();
             final View lastChild = getChildAt(childCount - 1);
             final int lastBottom = lastChild != null ? lastChild.getBottom() : listBottom;
-            mForceTranscriptScroll = mFirstPosition + childCount >= mOldItemCount &&
+            mForceTranscriptScroll = mFirstPosition + childCount >= mLastHandledItemCount &&
                     lastBottom <= listBottom;
         }
     }
@@ -4744,6 +4749,8 @@
     @Override
     protected void handleDataChanged() {
         int count = mItemCount;
+        int lastHandledItemCount = mLastHandledItemCount;
+        mLastHandledItemCount = mItemCount;
         if (count > 0) {
 
             int newPos;
@@ -4765,10 +4772,11 @@
                         return;
                     }
                     final int childCount = getChildCount();
-                    final int listBottom = getBottom() - getPaddingBottom();
+                    final int listBottom = getHeight() - getPaddingBottom();
                     final View lastChild = getChildAt(childCount - 1);
                     final int lastBottom = lastChild != null ? lastChild.getBottom() : listBottom;
-                    if (mFirstPosition + childCount >= mOldItemCount && lastBottom <= listBottom) {
+                    if (mFirstPosition + childCount >= lastHandledItemCount &&
+                            lastBottom <= listBottom) {
                         mLayoutMode = LAYOUT_FORCE_BOTTOM;
                         return;
                     }
diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java
index 593cb59..44f04db 100644
--- a/core/java/android/widget/ArrayAdapter.java
+++ b/core/java/android/widget/ArrayAdapter.java
@@ -206,13 +206,9 @@
     public void addAll(T ... items) {
         synchronized (mLock) {
             if (mOriginalValues != null) {
-                for (T item : items) {
-                    mOriginalValues.add(item);
-                }
+                Collections.addAll(mOriginalValues, items);
             } else {
-                for (T item : items) {
-                    mObjects.add(item);
-                }
+                Collections.addAll(mObjects, items);
             }
         }
         if (mNotifyOnChange) notifyDataSetChanged();
@@ -462,18 +458,22 @@
             }
 
             if (prefix == null || prefix.length() == 0) {
+                ArrayList<T> list;
                 synchronized (mLock) {
-                    ArrayList<T> list = new ArrayList<T>(mOriginalValues);
-                    results.values = list;
-                    results.count = list.size();
+                    list = new ArrayList<T>(mOriginalValues);
                 }
+                results.values = list;
+                results.count = list.size();
             } else {
                 String prefixString = prefix.toString().toLowerCase();
 
-                final ArrayList<T> values = mOriginalValues;
-                final int count = values.size();
+                ArrayList<T> values;
+                synchronized (mLock) {
+                    values = new ArrayList<T>(mOriginalValues);
+                }
 
-                final ArrayList<T> newValues = new ArrayList<T>(count);
+                final int count = values.size();
+                final ArrayList<T> newValues = new ArrayList<T>();
 
                 for (int i = 0; i < count; i++) {
                     final T value = values.get(i);
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 307959b..a2910af 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -449,6 +449,8 @@
         if (popupBackground != null) {
             popupBackground.getPadding(mTempRect);
             mDropDownWidth = mTempRect.left + mTempRect.right + width;
+        } else {
+            setWidth(width);
         }
     }
 
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 946f009..133f435 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3545,16 +3545,16 @@
      * First look in our children, then in any header and footer views that may be scrolled off.
      */
     @Override
-    protected View findViewByPredicateTraversal(Predicate<View> predicate) {
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
         View v;
-        v = super.findViewByPredicateTraversal(predicate);
+        v = super.findViewByPredicateTraversal(predicate, childToSkip);
         if (v == null) {
-            v = findViewByPredicateInHeadersOrFooters(mHeaderViewInfos, predicate);
+            v = findViewByPredicateInHeadersOrFooters(mHeaderViewInfos, predicate, childToSkip);
             if (v != null) {
                 return v;
             }
 
-            v = findViewByPredicateInHeadersOrFooters(mFooterViewInfos, predicate);
+            v = findViewByPredicateInHeadersOrFooters(mFooterViewInfos, predicate, childToSkip);
             if (v != null) {
                 return v;
             }
@@ -3568,7 +3568,7 @@
      * the predicate.
      */
     View findViewByPredicateInHeadersOrFooters(ArrayList<FixedViewInfo> where,
-            Predicate<View> predicate) {
+            Predicate<View> predicate, View childToSkip) {
         if (where != null) {
             int len = where.size();
             View v;
@@ -3576,7 +3576,7 @@
             for (int i = 0; i < len; i++) {
                 v = where.get(i).view;
 
-                if (!v.isRootNamespace()) {
+                if (v != childToSkip && !v.isRootNamespace()) {
                     v = v.findViewByPredicate(predicate);
 
                     if (v != null) {
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 36927ca..4d45c2f 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1065,9 +1065,10 @@
     private boolean findDropDownPosition(View anchor, WindowManager.LayoutParams p,
             int xoff, int yoff) {
 
+        final int anchorHeight = anchor.getHeight();
         anchor.getLocationInWindow(mDrawingLocation);
         p.x = mDrawingLocation[0] + xoff;
-        p.y = mDrawingLocation[1] + anchor.getHeight() + yoff;
+        p.y = mDrawingLocation[1] + anchorHeight + yoff;
         
         boolean onTop = false;
 
@@ -1076,9 +1077,12 @@
         anchor.getLocationOnScreen(mScreenLocation);
         final Rect displayFrame = new Rect();
         anchor.getWindowVisibleDisplayFrame(displayFrame);
+
+        int screenY = mScreenLocation[1] + anchorHeight + yoff;
         
         final View root = anchor.getRootView();
-        if (p.y + mPopupHeight > displayFrame.bottom || p.x + mPopupWidth - root.getWidth() > 0) {
+        if (screenY + mPopupHeight > displayFrame.bottom ||
+                p.x + mPopupWidth - root.getWidth() > 0) {
             // if the drop down disappears at the bottom of the screen. we try to
             // scroll a parent scrollview or move the drop down back up on top of
             // the edit box
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 4eecd64..aba6834 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -627,12 +627,33 @@
         int widthMode = MeasureSpec.getMode(widthMeasureSpec);
         int width = MeasureSpec.getSize(widthMeasureSpec);
 
-        if ((widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.EXACTLY) && mMaxWidth > 0
-                && width > mMaxWidth) {
-            super.onMeasure(MeasureSpec.makeMeasureSpec(mMaxWidth, widthMode), heightMeasureSpec);
-        } else {
-            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+        switch (widthMode) {
+        case MeasureSpec.AT_MOST:
+            // If there is an upper limit, don't exceed maximum width (explicit or implicit)
+            if (mMaxWidth > 0) {
+                width = Math.min(mMaxWidth, width);
+            } else {
+                width = Math.min(getPreferredWidth(), width);
+            }
+            break;
+        case MeasureSpec.EXACTLY:
+            // If an exact width is specified, still don't exceed any specified maximum width
+            if (mMaxWidth > 0) {
+                width = Math.min(mMaxWidth, width);
+            }
+            break;
+        case MeasureSpec.UNSPECIFIED:
+            // Use maximum width, if specified, else preferred width
+            width = mMaxWidth > 0 ? mMaxWidth : getPreferredWidth();
+            break;
         }
+        widthMode = MeasureSpec.EXACTLY;
+        super.onMeasure(MeasureSpec.makeMeasureSpec(width, widthMode), heightMeasureSpec);
+    }
+
+    private int getPreferredWidth() {
+        return getContext().getResources()
+                .getDimensionPixelSize(R.dimen.search_view_preferred_width);
     }
 
     private void updateViewsVisibility(final boolean collapsed) {
@@ -695,7 +716,7 @@
         // Should we show the close button? It is not shown if there's no focus,
         // field is not iconified by default and there is no text in it.
         final boolean showClose = hasText || (mIconifiedByDefault && !mExpandedInActionView);
-        mCloseButton.setVisibility(showClose ? VISIBLE : INVISIBLE);
+        mCloseButton.setVisibility(showClose ? VISIBLE : GONE);
         mCloseButton.getDrawable().setState(hasText ? ENABLED_STATE_SET : EMPTY_STATE_SET);
     }
 
@@ -991,7 +1012,7 @@
      */
     private void updateVoiceButton(boolean empty) {
         int visibility = GONE;
-        if (mVoiceButtonEnabled && !isIconified() && (empty || !mSubmitButtonEnabled)) {
+        if (mVoiceButtonEnabled && !isIconified() && empty) {
             visibility = VISIBLE;
             mSubmitButton.setVisibility(GONE);
         }
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index 2fba18b..27d44bf 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -714,14 +714,27 @@
 
         @Override
         public void show() {
+            final int spinnerPaddingLeft = Spinner.this.getPaddingLeft();
             if (mDropDownWidth == WRAP_CONTENT) {
-                setWidth(Math.max(measureContentWidth((SpinnerAdapter) mAdapter, getBackground()),
-                        Spinner.this.getWidth()));
+                final int spinnerWidth = Spinner.this.getWidth();
+                final int spinnerPaddingRight = Spinner.this.getPaddingRight();
+                setContentWidth(Math.max(
+                        measureContentWidth((SpinnerAdapter) mAdapter, getBackground()),
+                        spinnerWidth - spinnerPaddingLeft - spinnerPaddingRight));
             } else if (mDropDownWidth == MATCH_PARENT) {
-                setWidth(Spinner.this.getWidth());
+                final int spinnerWidth = Spinner.this.getWidth();
+                final int spinnerPaddingRight = Spinner.this.getPaddingRight();
+                setContentWidth(spinnerWidth - spinnerPaddingLeft - spinnerPaddingRight);
             } else {
-                setWidth(mDropDownWidth);
+                setContentWidth(mDropDownWidth);
             }
+            final Drawable background = getBackground();
+            int bgOffset = 0;
+            if (background != null) {
+                background.getPadding(mTempRect);
+                bgOffset = -mTempRect.left;
+            }
+            setHorizontalOffset(bgOffset + spinnerPaddingLeft);
             setInputMethodMode(ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
             super.show();
             getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 57a8531..88d7230 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -24,6 +24,7 @@
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
+import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -566,10 +567,15 @@
                     false); // no inflate params
 
             final TextView tv = (TextView) tabIndicator.findViewById(R.id.title);
+            final ImageView iconView = (ImageView) tabIndicator.findViewById(R.id.icon);
+
+            // when icon is gone by default, we're in exclusive mode
+            final boolean exclusive = iconView.getVisibility() == View.GONE;
+            final boolean bindIcon = !exclusive || TextUtils.isEmpty(mLabel);
+
             tv.setText(mLabel);
 
-            final ImageView iconView = (ImageView) tabIndicator.findViewById(R.id.icon);
-            if (mIcon != null) {
+            if (bindIcon && mIcon != null) {
                 iconView.setImageDrawable(mIcon);
                 iconView.setVisibility(VISIBLE);
             }
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index 3d1dedc..9afb625 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -62,8 +62,6 @@
     private boolean mDrawBottomStrips = true;
     private boolean mStripMoved;
 
-    private Drawable mDividerDrawable;
-
     private final Rect mBounds = new Rect();
 
     // When positive, the widths and heights of tabs will be imposed so that they fit in parent
@@ -79,16 +77,14 @@
     }
 
     public TabWidget(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs);
+        super(context, attrs, defStyle);
 
-        TypedArray a =
-            context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.TabWidget,
-                    defStyle, 0);
+        final TypedArray a = context.obtainStyledAttributes(
+                attrs, com.android.internal.R.styleable.TabWidget, defStyle, 0);
 
-        mDrawBottomStrips = a.getBoolean(R.styleable.TabWidget_tabStripEnabled, true);
-        mDividerDrawable = a.getDrawable(R.styleable.TabWidget_divider);
-        mLeftStrip = a.getDrawable(R.styleable.TabWidget_tabStripLeft);
-        mRightStrip = a.getDrawable(R.styleable.TabWidget_tabStripRight);
+        setStripEnabled(a.getBoolean(R.styleable.TabWidget_tabStripEnabled, true));
+        setLeftStripDrawable(a.getDrawable(R.styleable.TabWidget_tabStripLeft));
+        setRightStripDrawable(a.getDrawable(R.styleable.TabWidget_tabStripRight));
 
         a.recycle();
 
@@ -119,7 +115,7 @@
     }
 
     private void initTabWidget() {
-        mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER;
+        setChildrenDrawingOrderEnabled(true);
 
         final Context context = mContext;
         final Resources resources = context.getResources();
@@ -146,7 +142,7 @@
                 mRightStrip = resources.getDrawable(
                         com.android.internal.R.drawable.tab_bottom_right);
             }
-         }
+        }
 
         // Deal with focus, as we don't want the focus to go by default
         // to a tab other than the current tab
@@ -158,8 +154,7 @@
     void measureChildBeforeLayout(View child, int childIndex,
             int widthMeasureSpec, int totalWidth,
             int heightMeasureSpec, int totalHeight) {
-
-        if (mImposedTabsHeight >= 0) {
+        if (!isMeasureWithLargestChildEnabled() && mImposedTabsHeight >= 0) {
             widthMeasureSpec = MeasureSpec.makeMeasureSpec(
                     totalWidth + mImposedTabWidths[childIndex], MeasureSpec.EXACTLY);
             heightMeasureSpec = MeasureSpec.makeMeasureSpec(mImposedTabsHeight,
@@ -223,11 +218,6 @@
      * @return the tab indicator view at the given index
      */
     public View getChildTabViewAt(int index) {
-        // If we are using dividers, then instead of tab views at 0, 1, 2, ...
-        // we have tab views at 0, 2, 4, ...
-        if (mDividerDrawable != null) {
-            index *= 2;
-        }
         return getChildAt(index);
     }
 
@@ -236,15 +226,7 @@
      * @return the number of tab indicator views.
      */
     public int getTabCount() {
-        int children = getChildCount();
-
-        // If we have dividers, then we will always have an odd number of
-        // children: 1, 3, 5, ... and we want to convert that sequence to
-        // this: 1, 2, 3, ...
-        if (mDividerDrawable != null) {
-            children = (children + 1) / 2;
-        }
-        return children;
+        return getChildCount();
     }
 
     /**
@@ -253,9 +235,7 @@
      */
     @Override
     public void setDividerDrawable(Drawable drawable) {
-        mDividerDrawable = drawable;
-        requestLayout();
-        invalidate();
+        super.setDividerDrawable(drawable);
     }
 
     /**
@@ -264,9 +244,7 @@
      * divider.
      */
     public void setDividerDrawable(int resId) {
-        mDividerDrawable = mContext.getResources().getDrawable(resId);
-        requestLayout();
-        invalidate();
+        setDividerDrawable(getResources().getDrawable(resId));
     }
     
     /**
@@ -287,9 +265,7 @@
      * left strip drawable
      */
     public void setLeftStripDrawable(int resId) {
-        mLeftStrip = mContext.getResources().getDrawable(resId);
-        requestLayout();
-        invalidate();
+        setLeftStripDrawable(getResources().getDrawable(resId));
     }
 
     /**
@@ -300,7 +276,8 @@
     public void setRightStripDrawable(Drawable drawable) {
         mRightStrip = drawable;
         requestLayout();
-        invalidate();    }
+        invalidate();
+    }
 
     /**
      * Sets the drawable to use as the right part of the strip below the
@@ -309,11 +286,9 @@
      * right strip drawable
      */
     public void setRightStripDrawable(int resId) {
-        mRightStrip = mContext.getResources().getDrawable(resId);
-        requestLayout();
-        invalidate();
+        setRightStripDrawable(getResources().getDrawable(resId));
     }
-    
+
     /**
      * Controls whether the bottom strips on the tab indicators are drawn or
      * not.  The default is to draw them.  If the user specifies a custom
@@ -471,8 +446,8 @@
     @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
-        int count = getTabCount();
 
+        final int count = getTabCount();
         for (int i = 0; i < count; i++) {
             View child = getChildTabViewAt(i);
             child.setEnabled(enabled);
@@ -493,18 +468,6 @@
         child.setFocusable(true);
         child.setClickable(true);
 
-        // If we have dividers between the tabs and we already have at least one
-        // tab, then add a divider before adding the next tab.
-        if (mDividerDrawable != null && getTabCount() > 0) {
-            ImageView divider = new ImageView(mContext);
-            final LinearLayout.LayoutParams lp = new LayoutParams(
-                    mDividerDrawable.getIntrinsicWidth(),
-                    LayoutParams.MATCH_PARENT);
-            lp.setMargins(0, 0, 0, 0);
-            divider.setLayoutParams(lp);
-            divider.setBackgroundDrawable(mDividerDrawable);
-            super.addView(divider);
-        }
         super.addView(child);
 
         // TODO: detect this via geometry with a tabwidget listener rather
@@ -535,6 +498,7 @@
         mSelectionChangedListener = listener;
     }
 
+    /** {@inheritDoc} */
     public void onFocusChange(View v, boolean hasFocus) {
         if (v == this && hasFocus && getTabCount() > 0) {
             getChildTabViewAt(mSelectedTab).requestFocus();
@@ -588,6 +552,4 @@
          */
         void onTabSelectionChanged(int tabIndex, boolean clicked);
     }
-
 }
-
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 1ab1a87..d6cb61d 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -139,11 +139,6 @@
 
 import org.xmlpull.v1.XmlPullParserException;
 
-import com.android.internal.util.FastMath;
-import com.android.internal.widget.EditableInputConnection;
-
-import org.xmlpull.v1.XmlPullParserException;
-
 import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.text.BreakIterator;
@@ -6068,6 +6063,10 @@
                                  int ellipsisWidth, boolean bringIntoView) {
         stopMarquee();
 
+        // Update "old" cached values
+        mOldMaximum = mMaximum;
+        mOldMaxMode = mMaxMode;
+
         mHighlightPathBogus = true;
 
         if (w < 0) {
@@ -6129,7 +6128,7 @@
                                 0, mTransformed.length(),
                                 mTextPaint, w, alignment, mTextDir, mSpacingMult,
                                 mSpacingAdd, mIncludePad, mEllipsize,
-                                ellipsisWidth);
+                                ellipsisWidth, mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
                 } else {
                     mLayout = new StaticLayout(mTransformed, mTextPaint,
                             w, alignment, mTextDir, mSpacingMult, mSpacingAdd,
@@ -6140,7 +6139,7 @@
                             0, mTransformed.length(),
                             mTextPaint, w, alignment, mTextDir, mSpacingMult,
                             mSpacingAdd, mIncludePad, mEllipsize,
-                            ellipsisWidth);
+                            ellipsisWidth, mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
             } else {
                 mLayout = new StaticLayout(mTransformed, mTextPaint,
                         w, alignment, mTextDir, mSpacingMult, mSpacingAdd,
@@ -6195,7 +6194,7 @@
                                 0, mHint.length(),
                                 mTextPaint, hintWidth, alignment, mTextDir, mSpacingMult,
                                 mSpacingAdd, mIncludePad, mEllipsize,
-                                ellipsisWidth);
+                                ellipsisWidth, mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
                 } else {
                     mHintLayout = new StaticLayout(mHint, mTextPaint,
                             hintWidth, alignment, mTextDir, mSpacingMult, mSpacingAdd,
@@ -6206,7 +6205,7 @@
                             0, mHint.length(),
                             mTextPaint, hintWidth, alignment, mTextDir, mSpacingMult,
                             mSpacingAdd, mIncludePad, mEllipsize,
-                            ellipsisWidth);
+                            ellipsisWidth, mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
             } else {
                 mHintLayout = new StaticLayout(mHint, mTextPaint,
                         hintWidth, alignment, mTextDir, mSpacingMult, mSpacingAdd,
@@ -6411,25 +6410,34 @@
         if (mHorizontallyScrolling) want = VERY_WIDE;
 
         int hintWant = want;
-        int hintWidth = mHintLayout == null ? hintWant : mHintLayout.getWidth();
+        int hintWidth = (mHintLayout == null) ? hintWant : mHintLayout.getWidth();
 
         if (mLayout == null) {
             makeNewLayout(want, hintWant, boring, hintBoring,
                           width - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
-        } else if ((mLayout.getWidth() != want) || (hintWidth != hintWant) ||
-                   (mLayout.getEllipsizedWidth() !=
-                        width - getCompoundPaddingLeft() - getCompoundPaddingRight())) {
-            if (mHint == null && mEllipsize == null &&
-                    want > mLayout.getWidth() &&
-                    (mLayout instanceof BoringLayout ||
-                            (fromexisting && des >= 0 && des <= want))) {
-                mLayout.increaseWidthTo(want);
-            } else {
-                makeNewLayout(want, hintWant, boring, hintBoring,
-                              width - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
-            }
         } else {
-            // Width has not changed.
+            final boolean layoutChanged = (mLayout.getWidth() != want) ||
+                    (hintWidth != hintWant) ||
+                    (mLayout.getEllipsizedWidth() !=
+                            width - getCompoundPaddingLeft() - getCompoundPaddingRight());
+
+            final boolean widthChanged = (mHint == null) &&
+                    (mEllipsize == null) &&
+                    (want > mLayout.getWidth()) &&
+                    (mLayout instanceof BoringLayout || (fromexisting && des >= 0 && des <= want));
+
+            final boolean maximumChanged = (mMaxMode != mOldMaxMode) || (mMaximum != mOldMaximum);
+
+            if (layoutChanged || maximumChanged) {
+                if (!maximumChanged && widthChanged) {
+                    mLayout.increaseWidthTo(want);
+                } else {
+                    makeNewLayout(want, hintWant, boring, hintBoring,
+                            width - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
+                }
+            } else {
+                // Nothing has changed
+            }
         }
 
         if (heightMode == MeasureSpec.EXACTLY) {
@@ -6489,7 +6497,6 @@
         }
 
         desired += pad;
-        layout.setMaximumVisibleLineCount(0);
 
         if (mMaxMode == LINES) {
             /*
@@ -6498,7 +6505,6 @@
              */
             if (cap) {
                 if (linecount > mMaximum) {
-                    layout.setMaximumVisibleLineCount(mMaximum);
                     desired = layout.getLineTop(mMaximum);
 
                     if (dr != null) {
@@ -7106,6 +7112,10 @@
      * to constrain the text to a single line.  Use <code>null</code>
      * to turn off ellipsizing.
      *
+     * If {@link #setMaxLines} has been used to set two or more lines,
+     * {@link TextUtils.TruncateAt#END} and {@link TextUtils.TruncateAt#MARQUEE}
+     * are only supported (other ellipsizing types will not do anything).
+     *
      * @attr ref android.R.styleable#TextView_ellipsize
      */
     public void setEllipsize(TextUtils.TruncateAt where) {
@@ -7951,8 +7961,12 @@
                     startSelectionActionMode();
                 } else {
                     hideControllers();
-                    if (hasInsertionController() && !selectAllGotFocus && mText.length() > 0) {
-                        getInsertionController().show();
+                    if (!selectAllGotFocus && mText.length() > 0) {
+                        if (isCursorInsideEasyCorrectionSpan()) {
+                            showSuggestions();
+                        } else if (hasInsertionController()) {
+                            getInsertionController().show();
+                        }
                     }
                 }
             }
@@ -7965,6 +7979,22 @@
         return superResult;
     }
 
+    /**
+     * @return <code>true</code> if the cursor is inside an {@link SuggestionSpan} with
+     * {@link SuggestionSpan#FLAG_EASY_CORRECT} set.
+     */
+    private boolean isCursorInsideEasyCorrectionSpan() {
+        Spannable spannable = (Spannable) TextView.this.mText;
+        SuggestionSpan[] suggestionSpans = spannable.getSpans(getSelectionStart(),
+                getSelectionEnd(), SuggestionSpan.class);
+        for (int i = 0; i < suggestionSpans.length; i++) {
+            if ((suggestionSpans[i].getFlags() & SuggestionSpan.FLAG_EASY_CORRECT) != 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     @Override
     public boolean onGenericMotionEvent(MotionEvent event) {
         if (mMovement != null && mText instanceof Spannable && mLayout != null) {
@@ -10878,6 +10908,9 @@
     private int                     mMinimum = 0;
     private int                     mMinMode = LINES;
 
+    private int                     mOldMaximum = mMaximum;
+    private int                     mOldMaxMode = mMaxMode;
+
     private int                     mMaxWidth = Integer.MAX_VALUE;
     private int                     mMaxWidthMode = PIXELS;
     private int                     mMinWidth = 0;
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 16336e0..9c45dc6 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -474,7 +474,7 @@
         String args[] = {
             "--setuid=1000",
             "--setgid=1000",
-            "--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,3001,3002,3003,3006",
+            "--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,3001,3002,3003,3006,3007",
             "--capabilities=130104352,130104352",
             "--runtime-init",
             "--nice-name=system_server",
diff --git a/core/java/com/android/internal/view/menu/ActionMenuItemView.java b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
index 09bebae..cde9a49 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
@@ -18,19 +18,23 @@
 
 import android.content.Context;
 import android.content.res.Resources;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
 import android.util.AttributeSet;
+import android.view.Gravity;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.LinearLayout;
+import android.widget.Toast;
 
 /**
  * @hide
  */
 public class ActionMenuItemView extends LinearLayout
-        implements MenuView.ItemView, View.OnClickListener, ActionMenuView.ActionMenuChildView {
+        implements MenuView.ItemView, View.OnClickListener, View.OnLongClickListener,
+        ActionMenuView.ActionMenuChildView {
     private static final String TAG = "ActionMenuItemView";
 
     private MenuItemImpl mItemData;
@@ -65,7 +69,9 @@
         mTextButton = (Button) findViewById(com.android.internal.R.id.textButton);
         mImageButton.setOnClickListener(this);
         mTextButton.setOnClickListener(this);
+        mImageButton.setOnLongClickListener(this);
         setOnClickListener(this);
+        setOnLongClickListener(this);
     }
 
     public MenuItemImpl getItemData() {
@@ -170,4 +176,35 @@
     public boolean needsDividerAfter() {
         return hasText();
     }
+
+    @Override
+    public boolean onLongClick(View v) {
+        if (hasText()) {
+            // Don't show the cheat sheet for items that already show text.
+            return false;
+        }
+
+        final int[] screenPos = new int[2];
+        final Rect displayFrame = new Rect();
+        getLocationOnScreen(screenPos);
+        getWindowVisibleDisplayFrame(displayFrame);
+
+        final Context context = getContext();
+        final int width = getWidth();
+        final int height = getHeight();
+        final int midy = screenPos[1] + height / 2;
+        final int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
+
+        Toast cheatSheet = Toast.makeText(context, mItemData.getTitle(), Toast.LENGTH_SHORT);
+        if (midy < displayFrame.height()) {
+            // Show along the top; follow action buttons
+            cheatSheet.setGravity(Gravity.TOP | Gravity.RIGHT,
+                    screenWidth - screenPos[0] - width / 2, height);
+        } else {
+            // Show along the bottom center
+            cheatSheet.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, height);
+        }
+        cheatSheet.show();
+        return true;
+    }
 }
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java
index 267221b..d613921 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuView.java
@@ -109,6 +109,13 @@
         // Divide the view into cells.
         final int cellCount = widthSize / mMinCellSize;
         final int cellSizeRemaining = widthSize % mMinCellSize;
+
+        if (cellCount == 0) {
+            // Give up, nothing fits.
+            setMeasuredDimension(widthSize, 0);
+            return;
+        }
+
         final int cellSize = mMinCellSize + cellSizeRemaining / cellCount;
 
         int cellsRemaining = cellCount;
@@ -213,7 +220,8 @@
                 }
             }
 
-            final int extraPixels = (int) (cellsRemaining * cellSize / expandCount);
+            final int extraPixels = expandCount > 0 ?
+                    (int) (cellsRemaining * cellSize / expandCount) : 0;
 
             for (int i = 0; i < childCount; i++) {
                 if ((smallestItemsAt & (1 << i)) == 0) continue;
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index 83f32945..6b5ea60 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -695,7 +695,8 @@
     private void initTitle() {
         if (mTitleLayout == null) {
             LayoutInflater inflater = LayoutInflater.from(getContext());
-            mTitleLayout = (LinearLayout) inflater.inflate(R.layout.action_bar_title_item, null);
+            mTitleLayout = (LinearLayout) inflater.inflate(R.layout.action_bar_title_item,
+                    this, false);
             mTitleView = (TextView) mTitleLayout.findViewById(R.id.action_bar_title);
             mSubtitleView = (TextView) mTitleLayout.findViewById(R.id.action_bar_subtitle);
             mTitleUpView = (View) mTitleLayout.findViewById(R.id.up);
@@ -724,8 +725,7 @@
             mTitleLayout.setEnabled(titleUp);
         }
 
-        addView(mTitleLayout, new LayoutParams(LayoutParams.WRAP_CONTENT,
-                LayoutParams.MATCH_PARENT));
+        addView(mTitleLayout);
         if (mExpandedActionView != null) {
             // Don't show while in expanded mode
             mTitleLayout.setVisibility(GONE);
@@ -820,7 +820,8 @@
             boolean showTitle = mTitleLayout != null && mTitleLayout.getVisibility() != GONE &&
                     (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0;
             if (showTitle) {
-                availableWidth = measureChildView(mTitleLayout, availableWidth, childSpecHeight, 0);
+                availableWidth = measureChildView(mTitleLayout, availableWidth,
+                        MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY), 0);
                 leftOfCenter = Math.max(0, leftOfCenter - mTitleLayout.getMeasuredWidth());
             }
 
diff --git a/core/java/com/android/server/NetworkManagementSocketTagger.java b/core/java/com/android/server/NetworkManagementSocketTagger.java
index 4667e5f..23af37e 100644
--- a/core/java/com/android/server/NetworkManagementSocketTagger.java
+++ b/core/java/com/android/server/NetworkManagementSocketTagger.java
@@ -16,8 +16,11 @@
 
 package com.android.server;
 
+import android.net.NetworkStats;
 import android.os.SystemProperties;
 import android.util.Log;
+import android.util.Slog;
+
 import dalvik.system.SocketTagger;
 import libcore.io.IoUtils;
 
@@ -122,6 +125,26 @@
         public int statsUid = -1;
     }
 
+    public static void setKernelCounterSet(int uid, int counterSet) {
+        final StringBuilder command = new StringBuilder();
+        command.append("s ").append(counterSet).append(" ").append(uid);
+        try {
+            internalModuleCtrl(command.toString());
+        } catch (IOException e) {
+            Slog.w(TAG, "problem changing counter set for uid " + uid + " : " + e);
+        }
+    }
+
+    public static void resetKernelUidStats(int uid) {
+        final StringBuilder command = new StringBuilder();
+        command.append("d 0 ").append(uid);
+        try {
+            internalModuleCtrl(command.toString());
+        } catch (IOException e) {
+            Slog.w(TAG, "problem clearing counters for uid " + uid + " : " + e);
+        }
+    }
+
     /**
      * Sends commands to the kernel netfilter module.
      *
@@ -141,7 +164,7 @@
      *   <li><i>*_tag</i> are 64bit values</li></ul>
      *
      */
-    private void internalModuleCtrl(String cmd) throws IOException {
+    private static void internalModuleCtrl(String cmd) throws IOException {
         if (!SystemProperties.getBoolean(PROP_QTAGUID_ENABLED, false)) return;
 
         // TODO: migrate to native library for tagging commands
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp
index 23a4ec7..89440c9 100644
--- a/core/jni/android/graphics/TextLayoutCache.cpp
+++ b/core/jni/android/graphics/TextLayoutCache.cpp
@@ -360,31 +360,7 @@
     shaperItem->item.length = count;
     shaperItem->item.bidiLevel = isRTL;
 
-    ssize_t nextCodePoint = 0;
-    uint32_t codePoint = utf16_to_code_point(chars, count, &nextCodePoint);
-
-    HB_Script script = code_point_to_script(codePoint);
-
-    if (script == HB_Script_Inherited) {
-#if DEBUG_GLYPHS
-        LOGD("Cannot find a correct script for code point=%d "
-                " Need to look at the next code points.", codePoint);
-#endif
-        while (script == HB_Script_Inherited && nextCodePoint < count) {
-            codePoint = utf16_to_code_point(chars, count, &nextCodePoint);
-            script = code_point_to_script(codePoint);
-        }
-    }
-
-    if (script == HB_Script_Inherited) {
-#if DEBUG_GLYPHS
-        LOGD("Cannot find a correct script from the text."
-                " Need to select a default script depending on the passed text direction.");
-#endif
-        script = isRTL ? HB_Script_Arabic : HB_Script_Common;
-    }
-
-    shaperItem->item.script = script;
+    shaperItem->item.script = isRTL ? HB_Script_Arabic : HB_Script_Common;
 
     shaperItem->string = chars;
     shaperItem->stringLength = contextCount;
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 039c5ba..80c79fd 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -683,6 +683,12 @@
     LayerRenderer::updateTextureLayer(layer, width, height, isOpaque, renderTarget, transform);
 }
 
+static void android_view_GLES20Canvas_setTextureLayerTransform(JNIEnv* env, jobject clazz,
+        Layer* layer, SkMatrix* matrix) {
+
+    layer->getTransform().load(*matrix);
+}
+
 static void android_view_GLES20Canvas_destroyLayer(JNIEnv* env, jobject clazz, Layer* layer) {
     LayerRenderer::destroyLayer(layer);
 }
@@ -827,6 +833,7 @@
     { "nCreateTextureLayer",     "(Z[I)I",     (void*) android_view_GLES20Canvas_createTextureLayer },
     { "nUpdateTextureLayer",     "(IIIZLandroid/graphics/SurfaceTexture;)V",
                                                (void*) android_view_GLES20Canvas_updateTextureLayer },
+    { "nSetTextureLayerTransform", "(II)V",    (void*) android_view_GLES20Canvas_setTextureLayerTransform },
     { "nDestroyLayer",           "(I)V",       (void*) android_view_GLES20Canvas_destroyLayer },
     { "nDestroyLayerDeferred",   "(I)V",       (void*) android_view_GLES20Canvas_destroyLayerDeferred },
     { "nDrawLayer",              "(IIFFI)V",   (void*) android_view_GLES20Canvas_drawLayer },
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index b9868db..2dbb0b2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -42,6 +42,7 @@
     <protected-broadcast android:name="android.intent.action.PACKAGE_RESTARTED" />
     <protected-broadcast android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
     <protected-broadcast android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" />
+    <protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" />
     <protected-broadcast android:name="android.intent.action.UID_REMOVED" />
     <protected-broadcast android:name="android.intent.action.CONFIGURATION_CHANGED" />
     <protected-broadcast android:name="android.intent.action.LOCALE_CHANGED" />
@@ -1429,6 +1430,24 @@
           android:protectionLevel="signature" />
     <uses-permission android:name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"/>
 
+    <!-- Package verifier needs to have this permission before the PackageManager will
+         trust it to verify packages.
+         @hide
+    -->
+    <permission android:name="android.permission.PACKAGE_VERIFICATION_AGENT"
+        android:label="@string/permlab_packageVerificationAgent"
+        android:description="@string/permdesc_packageVerificationAgent"
+        android:protectionLevel="signatureOrSystem" />
+
+    <!-- Must be required by package verifier receiver, to ensure that only the
+         system can interact with it.
+         @hide
+    -->
+    <permission android:name="android.permission.BIND_PACKAGE_VERIFIER"
+        android:label="@string/permlab_bindPackageVerifier"
+        android:description="@string/permdesc_bindPackageVerifier"
+        android:protectionLevel="signature" />
+
     <!-- The system process is explicitly the only one allowed to launch the
          confirmation UI for full backup/restore -->
     <uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
diff --git a/core/res/res/drawable-hdpi/ab_bottom_solid_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_bottom_solid_dark_holo.9.png
index 3ea6c44..81829bb 100644
--- a/core/res/res/drawable-hdpi/ab_bottom_solid_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_bottom_solid_inverse_holo.9.png b/core/res/res/drawable-hdpi/ab_bottom_solid_inverse_holo.9.png
index 6c6fcd2..0436801 100644
--- a/core/res/res/drawable-hdpi/ab_bottom_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_bottom_solid_light_holo.9.png b/core/res/res/drawable-hdpi/ab_bottom_solid_light_holo.9.png
index 854631e..6574c8c 100644
--- a/core/res/res/drawable-hdpi/ab_bottom_solid_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_bottom_transparent_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_bottom_transparent_dark_holo.9.png
index aef6142d..1565ac2 100644
--- a/core/res/res/drawable-hdpi/ab_bottom_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_bottom_transparent_light_holo.9.png b/core/res/res/drawable-hdpi/ab_bottom_transparent_light_holo.9.png
index d8b5edc..77d4c4b 100644
--- a/core/res/res/drawable-hdpi/ab_bottom_transparent_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_solid_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_solid_dark_holo.9.png
index 660a234..0fc8632 100644
--- a/core/res/res/drawable-hdpi/ab_solid_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_solid_light_holo.9.png b/core/res/res/drawable-hdpi/ab_solid_light_holo.9.png
index 9756cf5..74540c1 100644
--- a/core/res/res/drawable-hdpi/ab_solid_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_solid_shadow_holo.9.png b/core/res/res/drawable-hdpi/ab_solid_shadow_holo.9.png
index 80213d5..69bcd7a 100644
--- a/core/res/res/drawable-hdpi/ab_solid_shadow_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_stacked_solid_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_stacked_solid_dark_holo.9.png
index 6de2bf2c..9f8829f 100644
--- a/core/res/res/drawable-hdpi/ab_stacked_solid_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png b/core/res/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png
index c23e473..d63e85e 100644
--- a/core/res/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_stacked_solid_light_holo.9.png b/core/res/res/drawable-hdpi/ab_stacked_solid_light_holo.9.png
index 343d7c6..9cff5d8 100644
--- a/core/res/res/drawable-hdpi/ab_stacked_solid_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_stacked_transparent_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_stacked_transparent_dark_holo.9.png
index 3de1174..12a6454 100644
--- a/core/res/res/drawable-hdpi/ab_stacked_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_stacked_transparent_light_holo.9.png b/core/res/res/drawable-hdpi/ab_stacked_transparent_light_holo.9.png
index da8b042..3355d30 100644
--- a/core/res/res/drawable-hdpi/ab_stacked_transparent_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_transparent_dark_holo.9.png b/core/res/res/drawable-hdpi/ab_transparent_dark_holo.9.png
index 1957c32..a5e8570 100644
--- a/core/res/res/drawable-hdpi/ab_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ab_transparent_light_holo.9.png b/core/res/res/drawable-hdpi/ab_transparent_light_holo.9.png
index 0f1ce73..c49412a 100644
--- a/core/res/res/drawable-hdpi/ab_transparent_light_holo.9.png
+++ b/core/res/res/drawable-hdpi/ab_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_default_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_cab_done_default_holo_dark.9.png
index 769f570..fabc252 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_default_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_default_holo_light.9.png b/core/res/res/drawable-hdpi/btn_cab_done_default_holo_light.9.png
index 74cefd6..f59ef4e 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_default_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_dark.9.png
index 4450f11..c87c5a6 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_light.9.png
index 93b7b17..6e4cae2 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_dark.9.png
index 3ada1be..e6f83cc 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_light.9.png
index 749ea569..5c97e3f 100644
--- a/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_cab_done_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_group_focused_holo_dark.9.png
index 1d1a589..34762f8 100644
--- a/core/res/res/drawable-hdpi/btn_group_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_group_focused_holo_light.9.png
index 1d1a589..34762f8 100644
--- a/core/res/res/drawable-hdpi/btn_group_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png
index 8922fa4..0d2eb4b 100644
--- a/core/res/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_group_pressed_holo_light.9.png
index 53cf2f3..7de8d9b 100644
--- a/core/res/res/drawable-hdpi/btn_group_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png
index 39f1ca4..a7ce7e1 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png
index 0456759..93c0df0 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png
index 20cfc23..f0508ac 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png
index c05dcd3..14fbc7a 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png
index c91b76f..0f4ffff 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png
index 4764c67..8fab476 100644
--- a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png
index 5997c2d..c56166f 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png
index ee6c869..6bb4ad6 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png
index f052e67..edfb365 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png
index 247d306..f2664c4 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png
index f95f155..435c10d 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png
index 7bebc96..f2e4190 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png
index 0231925..5b87782 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png
index cfde3cb..41c9e6c 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png
index 0296a62e..c91da17 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png
index 6970012..8d6b81d 100644
--- a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/create_contact.png b/core/res/res/drawable-hdpi/create_contact.png
index 19d59b4..7a29b65 100644
--- a/core/res/res/drawable-hdpi/create_contact.png
+++ b/core/res/res/drawable-hdpi/create_contact.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png
index 2edae8f..1deaad7 100644
--- a/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png
+++ b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_holo_dark.9.png b/core/res/res/drawable-hdpi/divider_horizontal_holo_dark.9.png
index e8e1deb..a529487 100644
--- a/core/res/res/drawable-hdpi/divider_horizontal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_holo_light.9.png b/core/res/res/drawable-hdpi/divider_horizontal_holo_light.9.png
index 9e6cbbe..e3641b5 100644
--- a/core/res/res/drawable-hdpi/divider_horizontal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_angel.png b/core/res/res/drawable-hdpi/emo_im_angel.png
index 10742a6..e9d4983 100644
--- a/core/res/res/drawable-hdpi/emo_im_angel.png
+++ b/core/res/res/drawable-hdpi/emo_im_angel.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_cool.png b/core/res/res/drawable-hdpi/emo_im_cool.png
index e3c8654..c8464b5 100644
--- a/core/res/res/drawable-hdpi/emo_im_cool.png
+++ b/core/res/res/drawable-hdpi/emo_im_cool.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_crying.png b/core/res/res/drawable-hdpi/emo_im_crying.png
index b23791c..94a2b9a 100644
--- a/core/res/res/drawable-hdpi/emo_im_crying.png
+++ b/core/res/res/drawable-hdpi/emo_im_crying.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_embarrassed.png b/core/res/res/drawable-hdpi/emo_im_embarrassed.png
index cf7daf7..fe9138d 100644
--- a/core/res/res/drawable-hdpi/emo_im_embarrassed.png
+++ b/core/res/res/drawable-hdpi/emo_im_embarrassed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_foot_in_mouth.png b/core/res/res/drawable-hdpi/emo_im_foot_in_mouth.png
index 050b7be..9847177 100644
--- a/core/res/res/drawable-hdpi/emo_im_foot_in_mouth.png
+++ b/core/res/res/drawable-hdpi/emo_im_foot_in_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_happy.png b/core/res/res/drawable-hdpi/emo_im_happy.png
index 69e3bed..eba9deb 100644
--- a/core/res/res/drawable-hdpi/emo_im_happy.png
+++ b/core/res/res/drawable-hdpi/emo_im_happy.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_kissing.png b/core/res/res/drawable-hdpi/emo_im_kissing.png
index 0cca68e..ff19711 100644
--- a/core/res/res/drawable-hdpi/emo_im_kissing.png
+++ b/core/res/res/drawable-hdpi/emo_im_kissing.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_laughing.png b/core/res/res/drawable-hdpi/emo_im_laughing.png
index 8406ad0..b1d4d6a 100644
--- a/core/res/res/drawable-hdpi/emo_im_laughing.png
+++ b/core/res/res/drawable-hdpi/emo_im_laughing.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_lips_are_sealed.png b/core/res/res/drawable-hdpi/emo_im_lips_are_sealed.png
index 222f175..e47cf2a 100644
--- a/core/res/res/drawable-hdpi/emo_im_lips_are_sealed.png
+++ b/core/res/res/drawable-hdpi/emo_im_lips_are_sealed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_money_mouth.png b/core/res/res/drawable-hdpi/emo_im_money_mouth.png
index d711bfb..82f80f2 100644
--- a/core/res/res/drawable-hdpi/emo_im_money_mouth.png
+++ b/core/res/res/drawable-hdpi/emo_im_money_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_sad.png b/core/res/res/drawable-hdpi/emo_im_sad.png
index 40017f1..b5959ec 100644
--- a/core/res/res/drawable-hdpi/emo_im_sad.png
+++ b/core/res/res/drawable-hdpi/emo_im_sad.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_surprised.png b/core/res/res/drawable-hdpi/emo_im_surprised.png
index 4b2af7a..dbe1c38 100644
--- a/core/res/res/drawable-hdpi/emo_im_surprised.png
+++ b/core/res/res/drawable-hdpi/emo_im_surprised.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_tongue_sticking_out.png b/core/res/res/drawable-hdpi/emo_im_tongue_sticking_out.png
index 42ac80d..fb5f9ad 100644
--- a/core/res/res/drawable-hdpi/emo_im_tongue_sticking_out.png
+++ b/core/res/res/drawable-hdpi/emo_im_tongue_sticking_out.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_undecided.png b/core/res/res/drawable-hdpi/emo_im_undecided.png
index 2cf5bd2..b7edef7 100644
--- a/core/res/res/drawable-hdpi/emo_im_undecided.png
+++ b/core/res/res/drawable-hdpi/emo_im_undecided.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_winking.png b/core/res/res/drawable-hdpi/emo_im_winking.png
index a3a0876..6fe1027 100644
--- a/core/res/res/drawable-hdpi/emo_im_winking.png
+++ b/core/res/res/drawable-hdpi/emo_im_winking.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_wtf.png b/core/res/res/drawable-hdpi/emo_im_wtf.png
index 86c4bda..1d4a99b 100644
--- a/core/res/res/drawable-hdpi/emo_im_wtf.png
+++ b/core/res/res/drawable-hdpi/emo_im_wtf.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/emo_im_yelling.png b/core/res/res/drawable-hdpi/emo_im_yelling.png
index cfd991a..99d694b 100644
--- a/core/res/res/drawable-hdpi/emo_im_yelling.png
+++ b/core/res/res/drawable-hdpi/emo_im_yelling.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_close_holo_dark.9.png b/core/res/res/drawable-hdpi/expander_close_holo_dark.9.png
index dc0c534..6bb4d1e 100644
--- a/core/res/res/drawable-hdpi/expander_close_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/expander_close_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_close_holo_light.9.png b/core/res/res/drawable-hdpi/expander_close_holo_light.9.png
index 2dd4548..3fb3eb1 100644
--- a/core/res/res/drawable-hdpi/expander_close_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/expander_close_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_open_holo_dark.9.png b/core/res/res/drawable-hdpi/expander_open_holo_dark.9.png
index d9fd48f..a679da5 100644
--- a/core/res/res/drawable-hdpi/expander_open_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/expander_open_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_open_holo_light.9.png b/core/res/res/drawable-hdpi/expander_open_holo_light.9.png
index 7cec83a..175ce17 100644
--- a/core/res/res/drawable-hdpi/expander_open_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/expander_open_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_thumb_default_holo.png b/core/res/res/drawable-hdpi/fastscroll_thumb_default_holo.png
index d41a7dc..2b7c917 100644
--- a/core/res/res/drawable-hdpi/fastscroll_thumb_default_holo.png
+++ b/core/res/res/drawable-hdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png b/core/res/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
index 818b1c5..1227e9e 100644
--- a/core/res/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
+++ b/core/res/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png b/core/res/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
index 44502db..5cd1ac7 100644
--- a/core/res/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png b/core/res/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
index 44502db..5cd1ac7 100644
--- a/core/res/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
index 8d58ab5..9a7e5ae 100644
--- a/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
index 8d58ab5..9a7e5ae 100644
--- a/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_alarm_mute.png b/core/res/res/drawable-hdpi/ic_audio_alarm_mute.png
index e31fdb8..45ed7b6 100644
--- a/core/res/res/drawable-hdpi/ic_audio_alarm_mute.png
+++ b/core/res/res/drawable-hdpi/ic_audio_alarm_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_bt_mute.png b/core/res/res/drawable-hdpi/ic_audio_bt_mute.png
index 14542eb..298db92 100644
--- a/core/res/res/drawable-hdpi/ic_audio_bt_mute.png
+++ b/core/res/res/drawable-hdpi/ic_audio_bt_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_notification_mute.png b/core/res/res/drawable-hdpi/ic_audio_notification_mute.png
index a350e16..697cc92 100644
--- a/core/res/res/drawable-hdpi/ic_audio_notification_mute.png
+++ b/core/res/res/drawable-hdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_phone.png b/core/res/res/drawable-hdpi/ic_audio_phone.png
index 2fff204..8a7d67a 100644
--- a/core/res/res/drawable-hdpi/ic_audio_phone.png
+++ b/core/res/res/drawable-hdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_ring_notif.png b/core/res/res/drawable-hdpi/ic_audio_ring_notif.png
index 3938778..1df6858 100644
--- a/core/res/res/drawable-hdpi/ic_audio_ring_notif.png
+++ b/core/res/res/drawable-hdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png
index 499c0a3..fae02f9 100644
--- a/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png
+++ b/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_vol_mute.png b/core/res/res/drawable-hdpi/ic_audio_vol_mute.png
index f7428c7..4256385 100644
--- a/core/res/res/drawable-hdpi/ic_audio_vol_mute.png
+++ b/core/res/res/drawable-hdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_btn_search.png b/core/res/res/drawable-hdpi/ic_btn_search.png
index 0a91eab..98e61a3 100644
--- a/core/res/res/drawable-hdpi/ic_btn_search.png
+++ b/core/res/res/drawable-hdpi/ic_btn_search.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_btn_search_go.png b/core/res/res/drawable-hdpi/ic_btn_search_go.png
index 8a3a402..65f8079 100644
--- a/core/res/res/drawable-hdpi/ic_btn_search_go.png
+++ b/core/res/res/drawable-hdpi/ic_btn_search_go.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_btn_speak_now.png b/core/res/res/drawable-hdpi/ic_btn_speak_now.png
index 45a8155..c9281d3 100644
--- a/core/res/res/drawable-hdpi/ic_btn_speak_now.png
+++ b/core/res/res/drawable-hdpi/ic_btn_speak_now.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_commit.png b/core/res/res/drawable-hdpi/ic_commit.png
deleted file mode 100644
index 404051c..0000000
--- a/core/res/res/drawable-hdpi/ic_commit.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_commit_search_api_holo_dark.png b/core/res/res/drawable-hdpi/ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..83f36a9
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_commit_search_api_holo_light.png b/core/res/res/drawable-hdpi/ic_commit_search_api_holo_light.png
index b01688f..a3cc21e 100644
--- a/core/res/res/drawable-hdpi/ic_commit_search_api_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_contact_picture.png b/core/res/res/drawable-hdpi/ic_contact_picture.png
index e29e63a..9123c8c 100644
--- a/core/res/res/drawable-hdpi/ic_contact_picture.png
+++ b/core/res/res/drawable-hdpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_airplane_mode.png b/core/res/res/drawable-hdpi/ic_lock_airplane_mode.png
index 610f9d0..90c80fd 100644
--- a/core/res/res/drawable-hdpi/ic_lock_airplane_mode.png
+++ b/core/res/res/drawable-hdpi/ic_lock_airplane_mode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png
index cd50647..b055894 100644
--- a/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png
+++ b/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_lock.png b/core/res/res/drawable-hdpi/ic_lock_lock.png
index 0fc79e1..6d1029c 100644
--- a/core/res/res/drawable-hdpi/ic_lock_lock.png
+++ b/core/res/res/drawable-hdpi/ic_lock_lock.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_power_off.png b/core/res/res/drawable-hdpi/ic_lock_power_off.png
index 2f120c6..bc2dc70 100644
--- a/core/res/res/drawable-hdpi/ic_lock_power_off.png
+++ b/core/res/res/drawable-hdpi/ic_lock_power_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_silent_mode_off.png b/core/res/res/drawable-hdpi/ic_lock_silent_mode_off.png
index 17d705c..ecb7d04 100644
--- a/core/res/res/drawable-hdpi/ic_lock_silent_mode_off.png
+++ b/core/res/res/drawable-hdpi/ic_lock_silent_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
index 8089912..6395294 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
index e4ba8fd..74fda0f 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
index c9197c8..1558a0a 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_camera_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_camera_activated.png
index d510e1d..a94d1b9e 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_camera_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_camera_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
index f5dfacc4..0ccf361 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
index b4d399d..14a684e 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
index 0f4bfe6..1b7f499 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
index 995705d..399aa1c 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_activated.png
index d1938b9..7060d59 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
index ecafbea..b79dbba 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
index 1f527b7..8632545 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_activated.png
index f6ccbd2..88d0a9f 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
index d4e558d..e25c7a0 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
index 5d999a6..701fa42 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_text_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_text_activated.png
index 10b3268..0ebff0b 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_text_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_text_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
index 72b8f0a..c8de3a3 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
index d1f3015..e300943 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_focused.png
index e053222..da77340 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_embed_play.png b/core/res/res/drawable-hdpi/ic_media_embed_play.png
index 23ac7e4..05778c1 100644
--- a/core/res/res/drawable-hdpi/ic_media_embed_play.png
+++ b/core/res/res/drawable-hdpi/ic_media_embed_play.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_ff.png b/core/res/res/drawable-hdpi/ic_media_ff.png
index a892ba2..c65956a 100644
--- a/core/res/res/drawable-hdpi/ic_media_ff.png
+++ b/core/res/res/drawable-hdpi/ic_media_ff.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_fullscreen.png b/core/res/res/drawable-hdpi/ic_media_fullscreen.png
index 0cdbf77..ad082453 100644
--- a/core/res/res/drawable-hdpi/ic_media_fullscreen.png
+++ b/core/res/res/drawable-hdpi/ic_media_fullscreen.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_next.png b/core/res/res/drawable-hdpi/ic_media_next.png
index 2285670..c74703e 100644
--- a/core/res/res/drawable-hdpi/ic_media_next.png
+++ b/core/res/res/drawable-hdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_pause.png b/core/res/res/drawable-hdpi/ic_media_pause.png
index ffb55cd..671148e 100644
--- a/core/res/res/drawable-hdpi/ic_media_pause.png
+++ b/core/res/res/drawable-hdpi/ic_media_pause.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_play.png b/core/res/res/drawable-hdpi/ic_media_play.png
index e525bd2..c2e366a 100644
--- a/core/res/res/drawable-hdpi/ic_media_play.png
+++ b/core/res/res/drawable-hdpi/ic_media_play.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_previous.png b/core/res/res/drawable-hdpi/ic_media_previous.png
index 3333711..15dc390 100644
--- a/core/res/res/drawable-hdpi/ic_media_previous.png
+++ b/core/res/res/drawable-hdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_rew.png b/core/res/res/drawable-hdpi/ic_media_rew.png
index b14e9b9..a4ac181 100644
--- a/core/res/res/drawable-hdpi/ic_media_rew.png
+++ b/core/res/res/drawable-hdpi/ic_media_rew.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_stop.png b/core/res/res/drawable-hdpi/ic_media_stop.png
new file mode 100644
index 0000000..ec0c1ea
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_media_stop.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
index 82f6734..5654cd6 100644
--- a/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
index 82f6734..5654cd6 100644
--- a/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png
index 5522f5c..43a20ad 100644
--- a/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
index a9dbfb9..b7b292e 100644
--- a/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
index 5f5b23f..dae40ca 100644
--- a/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_light.9.png b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
index 5f5b23f..dae40ca 100644
--- a/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_submenu_background.9.png b/core/res/res/drawable-hdpi/menu_submenu_background.9.png
index cbd4400..7b7c8b2 100644
--- a/core/res/res/drawable-hdpi/menu_submenu_background.9.png
+++ b/core/res/res/drawable-hdpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png b/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png
index 0f883dc8..416b456 100644
--- a/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/picture_emergency.png b/core/res/res/drawable-hdpi/picture_emergency.png
index e088f12..0e13a43 100644
--- a/core/res/res/drawable-hdpi/picture_emergency.png
+++ b/core/res/res/drawable-hdpi/picture_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_away.png b/core/res/res/drawable-hdpi/presence_away.png
index 4ef2821..b25b821 100644
--- a/core/res/res/drawable-hdpi/presence_away.png
+++ b/core/res/res/drawable-hdpi/presence_away.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
index 5aea3d9..310c368 100644
--- a/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
index 5743d06..70cb7fc 100644
--- a/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
index e2c63b0..7cbff01 100644
--- a/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
index e2c63b0..7cbff01 100644
--- a/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
index 4b204e7..40d0d16 100644
--- a/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
index 4b204e7..40d0d16 100644
--- a/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
index 501a573..df7f236 100644
--- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
+++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png
index b43cb43..8950f81 100644
--- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png
+++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
index 0fdd530..0d13f71 100644
--- a/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
index a7eaf66..b39d831 100644
--- a/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
index 14ce985..c997bf0 100644
--- a/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
index 5edaed5..b2a22dc 100644
--- a/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png
index 15a7aa1..b306f22 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png
index a0f7e3e..21cf17e 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png
index 03f0254..b9833f3 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png
index 54c4f17..f68b662 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png
index 7f062fe..2a23d3a 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png
index 7f062fe..2a23d3a 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png
index 5b0958b..3128fd9 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png
index 6d34b40..924a93b 100644
--- a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png
index 80bba6b..09fc9c3 100644
--- a/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png
index ffd9e37..bb257b9 100644
--- a/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
index ea20276..df49a4d 100644
--- a/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png
index c2b031c..a6cb992 100644
--- a/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png
index a3fc804..75815a6 100644
--- a/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png
index a3fc804..75815a6 100644
--- a/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
index 86aa7da..dff47c0 100644
--- a/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png
index c8ec05d..8c3d297 100644
--- a/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_call_mute.png b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
old mode 100755
new mode 100644
index 9887faa..1446fa7
--- a/core/res/res/drawable-hdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_car_mode.png b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
index 94f288c..bc6137d 100644
--- a/core/res/res/drawable-hdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_chat.png b/core/res/res/drawable-hdpi/stat_notify_chat.png
index bddea50..845aef3 100644
--- a/core/res/res/drawable-hdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-hdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_disk_full.png b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
old mode 100755
new mode 100644
index b44ce58..c696a5b
--- a/core/res/res/drawable-hdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_email_generic.png b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
index 8d60237..c19d667 100644
--- a/core/res/res/drawable-hdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_error.png b/core/res/res/drawable-hdpi/stat_notify_error.png
old mode 100755
new mode 100644
index 6942871..dbaf944
--- a/core/res/res/drawable-hdpi/stat_notify_error.png
+++ b/core/res/res/drawable-hdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_gmail.png b/core/res/res/drawable-hdpi/stat_notify_gmail.png
index bf8582a..f205a7c 100644
--- a/core/res/res/drawable-hdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-hdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_missed_call.png b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
index 6df57ff3..74f5df7 100644
--- a/core/res/res/drawable-hdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard.png b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
old mode 100755
new mode 100644
index 0857774..5892d38
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
old mode 100755
new mode 100644
index 3880496..1c101ea
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
old mode 100755
new mode 100644
index ac984ef..901eac4
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
old mode 100755
new mode 100644
index b7ba4ba..a357251
--- a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync.png b/core/res/res/drawable-hdpi/stat_notify_sync.png
old mode 100755
new mode 100644
index 76319b0..90b39c9
--- a/core/res/res/drawable-hdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
old mode 100755
new mode 100644
index 863c3d7..90b39c9
--- a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_error.png b/core/res/res/drawable-hdpi/stat_notify_sync_error.png
old mode 100755
new mode 100644
index 0083c3f..074cdee
--- a/core/res/res/drawable-hdpi/stat_notify_sync_error.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_voicemail.png b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
old mode 100755
new mode 100644
index 499325b..896d1ce
--- a/core/res/res/drawable-hdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
index 8d80709..97ddb3c 100644
--- a/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
+++ b/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_adb.png b/core/res/res/drawable-hdpi/stat_sys_adb.png
old mode 100755
new mode 100644
index 615e8b3..ddb8a71
--- a/core/res/res/drawable-hdpi/stat_sys_adb.png
+++ b/core/res/res/drawable-hdpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
index 526fbfa..8e08f1c 100644
--- a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_usb.png b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
old mode 100755
new mode 100644
index 606ef80..f14f908
--- a/core/res/res/drawable-hdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
index 0510128..910de29 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
index 631622b..71ea925 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
index e300245..bc1877d 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
index fd220e3..9f41092 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
index a1ea9e3..5fa6305 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
index 7804a29..703759a 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_gps_on.png b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
index 542ebb0..cb8a1e8 100644
--- a/core/res/res/drawable-hdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_secure.png b/core/res/res/drawable-hdpi/stat_sys_secure.png
old mode 100755
new mode 100644
index c4a17de..5e979db
--- a/core/res/res/drawable-hdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-hdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
old mode 100755
new mode 100644
index a9a2b2e..a9af4a8
--- a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png b/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png
index 6218c3f..576bd77 100644
--- a/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png
+++ b/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_throttled.png b/core/res/res/drawable-hdpi/stat_sys_throttled.png
old mode 100755
new mode 100644
index 99ae4ac..ed66abf
--- a/core/res/res/drawable-hdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-hdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
index 48ba735..78f54b7 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
index cbb06a5..9ec9f2e 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
index e4edda9..3a9031e 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
index c2a9b03..486c1ed 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
index 23f2f9d..b35672c 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
index 3fd8b7f..4611122 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_warning.png b/core/res/res/drawable-hdpi/stat_sys_warning.png
old mode 100755
new mode 100644
index 0d1a33c..dbaf944
--- a/core/res/res/drawable-hdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-hdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png
index ed3656c..e65f21a 100644
--- a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png
index 7f483966..76c5484 100644
--- a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png
index fb7cfb0..80a7ef1 100644
--- a/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png b/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png
index ff74860..bd11555 100644
--- a/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_bg_holo_dark.9.png
index 941b131..1fba7ee 100644
--- a/core/res/res/drawable-hdpi/switch_bg_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_bg_holo_light.9.png b/core/res/res/drawable-hdpi/switch_bg_holo_light.9.png
index a776df9..5a484dfc 100644
--- a/core/res/res/drawable-hdpi/switch_bg_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
index 268e395..152c338 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png
index f842ca5..9c44d4b 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png
index 29e6f24..cb45648 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png
index 08af1f7..13dd09a 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png
index 797e9fb..e72f428 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png
index 370faf2..84504eb 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png
index 200a243..44a4baa 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png
index 4e537c9..5c5ee81 100644
--- a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_bottom_holo.9.png b/core/res/res/drawable-hdpi/tab_bottom_holo.9.png
index ec9fa8d..9286c7a 100644
--- a/core/res/res/drawable-hdpi/tab_bottom_holo.9.png
+++ b/core/res/res/drawable-hdpi/tab_bottom_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus.9.png b/core/res/res/drawable-hdpi/tab_focus.9.png
index 6e8a71f..89a1c0b 100644
--- a/core/res/res/drawable-hdpi/tab_focus.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png b/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
index 51194a4..e879e37 100644
--- a/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png b/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
index 51194a4..e879e37 100644
--- a/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focused_holo.9.png b/core/res/res/drawable-hdpi/tab_focused_holo.9.png
deleted file mode 100644
index 39a8f7a..0000000
--- a/core/res/res/drawable-hdpi/tab_focused_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press.9.png b/core/res/res/drawable-hdpi/tab_press.9.png
index 119b2c6..4c34188 100644
--- a/core/res/res/drawable-hdpi/tab_press.9.png
+++ b/core/res/res/drawable-hdpi/tab_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press_bar_left.9.png b/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
index dc2fbce..c5f44f3 100644
--- a/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press_bar_right.9.png b/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
index dc2fbce..c5f44f3 100644
--- a/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_pressed_holo.9.png b/core/res/res/drawable-hdpi/tab_pressed_holo.9.png
index b8a569f..2adb22c 100644
--- a/core/res/res/drawable-hdpi/tab_pressed_holo.9.png
+++ b/core/res/res/drawable-hdpi/tab_pressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected.9.png b/core/res/res/drawable-hdpi/tab_selected.9.png
index f036b9a..46a331f 100644
--- a/core/res/res/drawable-hdpi/tab_selected.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png b/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
index aa935fe..53efbb4 100644
--- a/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png b/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
index aa935fe..53efbb4 100644
--- a/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_unselected.9.png b/core/res/res/drawable-hdpi/tab_unselected.9.png
index c3a1f30..74181af 100644
--- a/core/res/res/drawable-hdpi/tab_unselected.9.png
+++ b/core/res/res/drawable-hdpi/tab_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_edit_side_paste_window.9.png b/core/res/res/drawable-hdpi/text_edit_side_paste_window.9.png
index c564495..c6adea3 100644
--- a/core/res/res/drawable-hdpi/text_edit_side_paste_window.9.png
+++ b/core/res/res/drawable-hdpi/text_edit_side_paste_window.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_left.png b/core/res/res/drawable-hdpi/text_select_handle_left.png
index e42a62e..82cb640 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_left.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_middle.png b/core/res/res/drawable-hdpi/text_select_handle_middle.png
index 00d47f2..a2a909a 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_middle.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_middle.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_right.png b/core/res/res/drawable-hdpi/text_select_handle_right.png
index 7426543..31f1c03 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_right.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_focused_holo_dark.9.png
index 0ce5d13..03a81d9 100644
--- a/core/res/res/drawable-hdpi/textfield_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_focused_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_focused_holo_light.9.png
index 945516e..03a81d9 100644
--- a/core/res/res/drawable-hdpi/textfield_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png
index e79e95b..b778741 100644
--- a/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
index 177b631..c423a74 100644
--- a/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/bottombar_565.png b/core/res/res/drawable-land-hdpi/bottombar_565.png
deleted file mode 100755
index 9df56ca..0000000
--- a/core/res/res/drawable-land-hdpi/bottombar_565.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/bottombar_565.png b/core/res/res/drawable-land-ldpi/bottombar_565.png
deleted file mode 100644
index 112c17d..0000000
--- a/core/res/res/drawable-land-ldpi/bottombar_565.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/bottombar_565.png b/core/res/res/drawable-land-mdpi/bottombar_565.png
deleted file mode 100644
index 6121856..0000000
--- a/core/res/res/drawable-land-mdpi/bottombar_565.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-xhdpi/btn_lock_normal.9.png b/core/res/res/drawable-land-xhdpi/btn_lock_normal.9.png
new file mode 100644
index 0000000..e7c4a19
--- /dev/null
+++ b/core/res/res/drawable-land-xhdpi/btn_lock_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_bottom_solid_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_bottom_solid_dark_holo.9.png
index 3807a48..b3d51ed 100644
--- a/core/res/res/drawable-mdpi/ab_bottom_solid_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_bottom_solid_inverse_holo.9.png b/core/res/res/drawable-mdpi/ab_bottom_solid_inverse_holo.9.png
index 9994438..abae537 100644
--- a/core/res/res/drawable-mdpi/ab_bottom_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_bottom_solid_light_holo.9.png b/core/res/res/drawable-mdpi/ab_bottom_solid_light_holo.9.png
index 5648403..4c98afb 100644
--- a/core/res/res/drawable-mdpi/ab_bottom_solid_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_bottom_transparent_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_bottom_transparent_dark_holo.9.png
index 261365d..de8010a 100644
--- a/core/res/res/drawable-mdpi/ab_bottom_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_bottom_transparent_light_holo.9.png b/core/res/res/drawable-mdpi/ab_bottom_transparent_light_holo.9.png
index 95df5fc..ecb2a0e 100644
--- a/core/res/res/drawable-mdpi/ab_bottom_transparent_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_solid_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_solid_dark_holo.9.png
index 4a6c3bc..56d27a8 100644
--- a/core/res/res/drawable-mdpi/ab_solid_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_solid_light_holo.9.png b/core/res/res/drawable-mdpi/ab_solid_light_holo.9.png
index 93a0c3e..98b4956 100644
--- a/core/res/res/drawable-mdpi/ab_solid_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_solid_shadow_holo.9.png b/core/res/res/drawable-mdpi/ab_solid_shadow_holo.9.png
index f3abd07..dcd3703 100644
--- a/core/res/res/drawable-mdpi/ab_solid_shadow_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_stacked_solid_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_stacked_solid_dark_holo.9.png
index e1d8f67..aa0a3a0 100644
--- a/core/res/res/drawable-mdpi/ab_stacked_solid_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png b/core/res/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png
index 9d7e953..cf17967 100644
--- a/core/res/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_stacked_solid_light_holo.9.png b/core/res/res/drawable-mdpi/ab_stacked_solid_light_holo.9.png
index 711e0fd..ab0003b 100644
--- a/core/res/res/drawable-mdpi/ab_stacked_solid_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_stacked_transparent_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_stacked_transparent_dark_holo.9.png
index 9649a2d..5f1eb1e 100644
--- a/core/res/res/drawable-mdpi/ab_stacked_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_stacked_transparent_light_holo.9.png b/core/res/res/drawable-mdpi/ab_stacked_transparent_light_holo.9.png
index 376e4ef..89822b6 100644
--- a/core/res/res/drawable-mdpi/ab_stacked_transparent_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_transparent_dark_holo.9.png b/core/res/res/drawable-mdpi/ab_transparent_dark_holo.9.png
index 99c8fd3..bd9921f 100644
--- a/core/res/res/drawable-mdpi/ab_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_transparent_light_holo.9.png b/core/res/res/drawable-mdpi/ab_transparent_light_holo.9.png
index a86ec34..8d93926 100644
--- a/core/res/res/drawable-mdpi/ab_transparent_light_holo.9.png
+++ b/core/res/res/drawable-mdpi/ab_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_group_focused_holo_dark.9.png
index b77cc78..290b977 100644
--- a/core/res/res/drawable-mdpi/btn_group_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_group_focused_holo_light.9.png
index aa00c75..290b977 100644
--- a/core/res/res/drawable-mdpi/btn_group_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png
index e35333b..ffc11b7 100644
--- a/core/res/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_group_pressed_holo_light.9.png
index 878fdda..8b5d036 100644
--- a/core/res/res/drawable-mdpi/btn_group_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal.9.png
index 0fbdbfa..93767a5 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_off.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_off.9.png
index ae97453..7f16a44 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_off.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_on.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_on.9.png
index 4127d1e..7887c2e 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_on.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed.9.png
index 525ab8a..88dc173 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_off.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_off.9.png
index eb05820..9578c09 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_off.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_on.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_on.9.png
index 416b2c7..48d2b09 100644
--- a/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_on.9.png
+++ b/core/res/res/drawable-mdpi/btn_keyboard_key_fulltrans_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png
index 480ef44..056b9b8 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png
index eaac916..66aab54 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png
index 2f27022..303177c 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png
index 20a98b3..e939d92 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png
index 46ebc0d6..b615e9e 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png
index 8052955..a081e7e 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png
index 7bd4276..f43d7fc 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png
index 0473f84..e137d46 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png
index d92d7ee..1337d85 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png
index f10cbd3..4dc896e 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png
index 3ec97a3..d051fb7 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png
index 6624511..260283d 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png
index 7826205..6628c81 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png
index ed5acc9..3bfa580 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png
index fad9d2a..a6ccaab 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png
index f5d5453..001cada1 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
index e51a584..ebea1db 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
index 820416a..761c936 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
index f02e838..c505d3d 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
index 321fcb9..99a71ef 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
index f671c56..3c48fa1 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/checkbox_off_background.png b/core/res/res/drawable-mdpi/checkbox_off_background.png
index 6b2124f..825ea66 100644
--- a/core/res/res/drawable-mdpi/checkbox_off_background.png
+++ b/core/res/res/drawable-mdpi/checkbox_off_background.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/checkbox_on_background.png b/core/res/res/drawable-mdpi/checkbox_on_background.png
index 56495fc..57585da 100644
--- a/core/res/res/drawable-mdpi/checkbox_on_background.png
+++ b/core/res/res/drawable-mdpi/checkbox_on_background.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/combobox_disabled.png b/core/res/res/drawable-mdpi/combobox_disabled.png
index c32db7e..94ad006 100644
--- a/core/res/res/drawable-mdpi/combobox_disabled.png
+++ b/core/res/res/drawable-mdpi/combobox_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/combobox_nohighlight.png b/core/res/res/drawable-mdpi/combobox_nohighlight.png
index 1963316..75d642c 100644
--- a/core/res/res/drawable-mdpi/combobox_nohighlight.png
+++ b/core/res/res/drawable-mdpi/combobox_nohighlight.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/create_contact.png b/core/res/res/drawable-mdpi/create_contact.png
index 5c5718b..5a9360b 100644
--- a/core/res/res/drawable-mdpi/create_contact.png
+++ b/core/res/res/drawable-mdpi/create_contact.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png
index a8cfd77..7b75019 100644
--- a/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png
+++ b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png
index 77b0999..1851468 100644
--- a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png
index 3fde76e..a60aad5 100644
--- a/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png
index d9ad9d3..bc6636c 100644
--- a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png
index 3d82dc6..7f9a9f1 100644
--- a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png
index 15e2993..6af742a 100644
--- a/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png
index 4831556..f54d0b4 100644
--- a/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png
index 4021da8..b7044db 100644
--- a/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png
index 120fe9a..0de1bb1 100644
--- a/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png
index d2b3557..95e684a 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png
index cf50169..ed3e240 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png
index 2663411..2bbfc3a 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png
index def24e4..db6347b 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png
index 85372b9..7c88a57 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png
index 566be42..81de1bb 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png
index e600500..c3fdef7 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png
index 52fc112..5352c02 100644
--- a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png
+++ b/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png
index a5da0cd..05d9e7e 100644
--- a/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png
index 6695af9..4a15c63 100644
--- a/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png
index e7e70fb..5248c48b 100644
--- a/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png
index f760c88..f2f6428 100644
--- a/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_angel.png b/core/res/res/drawable-mdpi/emo_im_angel.png
index c34dfa6..297fcf0 100644
--- a/core/res/res/drawable-mdpi/emo_im_angel.png
+++ b/core/res/res/drawable-mdpi/emo_im_angel.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_cool.png b/core/res/res/drawable-mdpi/emo_im_cool.png
index d8eeb34..9ee1d5d 100644
--- a/core/res/res/drawable-mdpi/emo_im_cool.png
+++ b/core/res/res/drawable-mdpi/emo_im_cool.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_crying.png b/core/res/res/drawable-mdpi/emo_im_crying.png
index 1cafdb3..42ec8db 100644
--- a/core/res/res/drawable-mdpi/emo_im_crying.png
+++ b/core/res/res/drawable-mdpi/emo_im_crying.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_embarrassed.png b/core/res/res/drawable-mdpi/emo_im_embarrassed.png
index e4db963..048f4b1 100644
--- a/core/res/res/drawable-mdpi/emo_im_embarrassed.png
+++ b/core/res/res/drawable-mdpi/emo_im_embarrassed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_foot_in_mouth.png b/core/res/res/drawable-mdpi/emo_im_foot_in_mouth.png
index 09d1fba..db5c801 100644
--- a/core/res/res/drawable-mdpi/emo_im_foot_in_mouth.png
+++ b/core/res/res/drawable-mdpi/emo_im_foot_in_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_happy.png b/core/res/res/drawable-mdpi/emo_im_happy.png
index b86602a..e85af7d 100644
--- a/core/res/res/drawable-mdpi/emo_im_happy.png
+++ b/core/res/res/drawable-mdpi/emo_im_happy.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_kissing.png b/core/res/res/drawable-mdpi/emo_im_kissing.png
index 56378f6..6c2458c 100644
--- a/core/res/res/drawable-mdpi/emo_im_kissing.png
+++ b/core/res/res/drawable-mdpi/emo_im_kissing.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_laughing.png b/core/res/res/drawable-mdpi/emo_im_laughing.png
index 980bf28..268c864 100644
--- a/core/res/res/drawable-mdpi/emo_im_laughing.png
+++ b/core/res/res/drawable-mdpi/emo_im_laughing.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_lips_are_sealed.png b/core/res/res/drawable-mdpi/emo_im_lips_are_sealed.png
index f2de993..a838158 100644
--- a/core/res/res/drawable-mdpi/emo_im_lips_are_sealed.png
+++ b/core/res/res/drawable-mdpi/emo_im_lips_are_sealed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_money_mouth.png b/core/res/res/drawable-mdpi/emo_im_money_mouth.png
index 08c53fd..56fcce4 100644
--- a/core/res/res/drawable-mdpi/emo_im_money_mouth.png
+++ b/core/res/res/drawable-mdpi/emo_im_money_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_sad.png b/core/res/res/drawable-mdpi/emo_im_sad.png
index 31c08d0..c5245cc 100644
--- a/core/res/res/drawable-mdpi/emo_im_sad.png
+++ b/core/res/res/drawable-mdpi/emo_im_sad.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_surprised.png b/core/res/res/drawable-mdpi/emo_im_surprised.png
index abe8c7a..231ccb1 100644
--- a/core/res/res/drawable-mdpi/emo_im_surprised.png
+++ b/core/res/res/drawable-mdpi/emo_im_surprised.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_tongue_sticking_out.png b/core/res/res/drawable-mdpi/emo_im_tongue_sticking_out.png
index 6f0f47b..9384718 100644
--- a/core/res/res/drawable-mdpi/emo_im_tongue_sticking_out.png
+++ b/core/res/res/drawable-mdpi/emo_im_tongue_sticking_out.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_undecided.png b/core/res/res/drawable-mdpi/emo_im_undecided.png
index eb4f8c5..9927af9 100644
--- a/core/res/res/drawable-mdpi/emo_im_undecided.png
+++ b/core/res/res/drawable-mdpi/emo_im_undecided.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_winking.png b/core/res/res/drawable-mdpi/emo_im_winking.png
index 568562a..a9b39bd 100644
--- a/core/res/res/drawable-mdpi/emo_im_winking.png
+++ b/core/res/res/drawable-mdpi/emo_im_winking.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_wtf.png b/core/res/res/drawable-mdpi/emo_im_wtf.png
index 41dd47f..1780652 100644
--- a/core/res/res/drawable-mdpi/emo_im_wtf.png
+++ b/core/res/res/drawable-mdpi/emo_im_wtf.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/emo_im_yelling.png b/core/res/res/drawable-mdpi/emo_im_yelling.png
index c3c8612..18e4715 100644
--- a/core/res/res/drawable-mdpi/emo_im_yelling.png
+++ b/core/res/res/drawable-mdpi/emo_im_yelling.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/expander_close_holo_dark.9.png b/core/res/res/drawable-mdpi/expander_close_holo_dark.9.png
index e37c559..6fa069f 100644
--- a/core/res/res/drawable-mdpi/expander_close_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/expander_close_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/expander_close_holo_light.9.png b/core/res/res/drawable-mdpi/expander_close_holo_light.9.png
index 2ea9668..b9067933 100644
--- a/core/res/res/drawable-mdpi/expander_close_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/expander_close_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/expander_open_holo_dark.9.png b/core/res/res/drawable-mdpi/expander_open_holo_dark.9.png
index 18a991f..5c7fa38 100644
--- a/core/res/res/drawable-mdpi/expander_open_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/expander_open_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/expander_open_holo_light.9.png b/core/res/res/drawable-mdpi/expander_open_holo_light.9.png
index 28b9ec7..c392ecb 100644
--- a/core/res/res/drawable-mdpi/expander_open_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/expander_open_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_thumb_default_holo.png b/core/res/res/drawable-mdpi/fastscroll_thumb_default_holo.png
index 6f51eef..9dddbd2 100644
--- a/core/res/res/drawable-mdpi/fastscroll_thumb_default_holo.png
+++ b/core/res/res/drawable-mdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png b/core/res/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png
index 2ff83ed..6da2c1c 100644
--- a/core/res/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png
+++ b/core/res/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png b/core/res/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png
index 8796e21..55f17c2 100644
--- a/core/res/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png b/core/res/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png
index 8796e21..55f17c2 100644
--- a/core/res/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png
index e037d61..34e126b 100644
--- a/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png
index e037d61..34e126b 100644
--- a/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_alarm_mute.png b/core/res/res/drawable-mdpi/ic_audio_alarm_mute.png
index ca3ed93..451e932 100644
--- a/core/res/res/drawable-mdpi/ic_audio_alarm_mute.png
+++ b/core/res/res/drawable-mdpi/ic_audio_alarm_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_bt_mute.png b/core/res/res/drawable-mdpi/ic_audio_bt_mute.png
index 017338e..f734c1c 100644
--- a/core/res/res/drawable-mdpi/ic_audio_bt_mute.png
+++ b/core/res/res/drawable-mdpi/ic_audio_bt_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_notification_mute.png b/core/res/res/drawable-mdpi/ic_audio_notification_mute.png
index f0b6d8a..2567f76 100644
--- a/core/res/res/drawable-mdpi/ic_audio_notification_mute.png
+++ b/core/res/res/drawable-mdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_phone.png b/core/res/res/drawable-mdpi/ic_audio_phone.png
index 00ec59e..beda721 100644
--- a/core/res/res/drawable-mdpi/ic_audio_phone.png
+++ b/core/res/res/drawable-mdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_ring_notif.png b/core/res/res/drawable-mdpi/ic_audio_ring_notif.png
index 856193b..b9b7c7b 100644
--- a/core/res/res/drawable-mdpi/ic_audio_ring_notif.png
+++ b/core/res/res/drawable-mdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png
index d5d1360..cbe5021 100644
--- a/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png
+++ b/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_vol_mute.png b/core/res/res/drawable-mdpi/ic_audio_vol_mute.png
index 52611b6..0dfc21f 100644
--- a/core/res/res/drawable-mdpi/ic_audio_vol_mute.png
+++ b/core/res/res/drawable-mdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_btn_search.png b/core/res/res/drawable-mdpi/ic_btn_search.png
index 3f8913e..662f5de 100644
--- a/core/res/res/drawable-mdpi/ic_btn_search.png
+++ b/core/res/res/drawable-mdpi/ic_btn_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_btn_search_go.png b/core/res/res/drawable-mdpi/ic_btn_search_go.png
index 0ed9e8e..9a4e9b9 100644
--- a/core/res/res/drawable-mdpi/ic_btn_search_go.png
+++ b/core/res/res/drawable-mdpi/ic_btn_search_go.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_btn_speak_now.png b/core/res/res/drawable-mdpi/ic_btn_speak_now.png
index 83ee68b..0589be6 100644
--- a/core/res/res/drawable-mdpi/ic_btn_speak_now.png
+++ b/core/res/res/drawable-mdpi/ic_btn_speak_now.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_clear_disabled.png b/core/res/res/drawable-mdpi/ic_clear_disabled.png
index b9c3b44..79228ba 100644
--- a/core/res/res/drawable-mdpi/ic_clear_disabled.png
+++ b/core/res/res/drawable-mdpi/ic_clear_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_clear_search_api_disabled_holo_light.png b/core/res/res/drawable-mdpi/ic_clear_search_api_disabled_holo_light.png
index 3edbd74..c0bdf06 100644
--- a/core/res/res/drawable-mdpi/ic_clear_search_api_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_clear_search_api_holo_light.png b/core/res/res/drawable-mdpi/ic_clear_search_api_holo_light.png
index 90db01b..15b86cb 100644
--- a/core/res/res/drawable-mdpi/ic_clear_search_api_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_commit.png b/core/res/res/drawable-mdpi/ic_commit.png
index 49d7ec8..3d167b5 100644
--- a/core/res/res/drawable-mdpi/ic_commit.png
+++ b/core/res/res/drawable-mdpi/ic_commit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_commit_search_api_holo_dark.png b/core/res/res/drawable-mdpi/ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..844c99c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_commit_search_api_holo_light.png b/core/res/res/drawable-mdpi/ic_commit_search_api_holo_light.png
index b01688f..86c170e 100644
--- a/core/res/res/drawable-mdpi/ic_commit_search_api_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_contact_picture.png b/core/res/res/drawable-mdpi/ic_contact_picture.png
index faa3dc0..535a772 100644
--- a/core/res/res/drawable-mdpi/ic_contact_picture.png
+++ b/core/res/res/drawable-mdpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_contact_picture_2.png b/core/res/res/drawable-mdpi/ic_contact_picture_2.png
index 8b184af..004a6c6 100644
--- a/core/res/res/drawable-mdpi/ic_contact_picture_2.png
+++ b/core/res/res/drawable-mdpi/ic_contact_picture_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_contact_picture_3.png b/core/res/res/drawable-mdpi/ic_contact_picture_3.png
index a2d08b5..001bf29 100644
--- a/core/res/res/drawable-mdpi/ic_contact_picture_3.png
+++ b/core/res/res/drawable-mdpi/ic_contact_picture_3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_dialog_alert.png b/core/res/res/drawable-mdpi/ic_dialog_alert.png
index 0a7de047..ef498ef 100644
--- a/core/res/res/drawable-mdpi/ic_dialog_alert.png
+++ b/core/res/res/drawable-mdpi/ic_dialog_alert.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_go.png b/core/res/res/drawable-mdpi/ic_go.png
index 2340648..bf19833 100644
--- a/core/res/res/drawable-mdpi/ic_go.png
+++ b/core/res/res/drawable-mdpi/ic_go.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_go_search_api_holo_light.png b/core/res/res/drawable-mdpi/ic_go_search_api_holo_light.png
index 7e1ba2a..8518498 100644
--- a/core/res/res/drawable-mdpi/ic_go_search_api_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_go_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_airplane_mode.png b/core/res/res/drawable-mdpi/ic_lock_airplane_mode.png
old mode 100755
new mode 100644
index caafcb2..2b1dc1a
--- a/core/res/res/drawable-mdpi/ic_lock_airplane_mode.png
+++ b/core/res/res/drawable-mdpi/ic_lock_airplane_mode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png
old mode 100755
new mode 100644
index cb2cbdf..49ed3d2
--- a/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png
+++ b/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_lock.png b/core/res/res/drawable-mdpi/ic_lock_lock.png
index b662b03..5ff3654 100644
--- a/core/res/res/drawable-mdpi/ic_lock_lock.png
+++ b/core/res/res/drawable-mdpi/ic_lock_lock.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_power_off.png b/core/res/res/drawable-mdpi/ic_lock_power_off.png
index 4405b43..2c55e47 100644
--- a/core/res/res/drawable-mdpi/ic_lock_power_off.png
+++ b/core/res/res/drawable-mdpi/ic_lock_power_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_silent_mode_off.png b/core/res/res/drawable-mdpi/ic_lock_silent_mode_off.png
index 95257a3..1a02aaa 100644
--- a/core/res/res/drawable-mdpi/ic_lock_silent_mode_off.png
+++ b/core/res/res/drawable-mdpi/ic_lock_silent_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_embed_play.png b/core/res/res/drawable-mdpi/ic_media_embed_play.png
index fc5d8c6..3576ce5 100644
--- a/core/res/res/drawable-mdpi/ic_media_embed_play.png
+++ b/core/res/res/drawable-mdpi/ic_media_embed_play.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_ff.png b/core/res/res/drawable-mdpi/ic_media_ff.png
index 892772e..170dd2d 100644
--- a/core/res/res/drawable-mdpi/ic_media_ff.png
+++ b/core/res/res/drawable-mdpi/ic_media_ff.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_fullscreen.png b/core/res/res/drawable-mdpi/ic_media_fullscreen.png
index 1c60e15..960aa85 100644
--- a/core/res/res/drawable-mdpi/ic_media_fullscreen.png
+++ b/core/res/res/drawable-mdpi/ic_media_fullscreen.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_next.png b/core/res/res/drawable-mdpi/ic_media_next.png
index bbe311b..a6feed0 100644
--- a/core/res/res/drawable-mdpi/ic_media_next.png
+++ b/core/res/res/drawable-mdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_pause.png b/core/res/res/drawable-mdpi/ic_media_pause.png
index e4e8d86..548ba02 100644
--- a/core/res/res/drawable-mdpi/ic_media_pause.png
+++ b/core/res/res/drawable-mdpi/ic_media_pause.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_play.png b/core/res/res/drawable-mdpi/ic_media_play.png
index 8eaf962..0fe6806 100644
--- a/core/res/res/drawable-mdpi/ic_media_play.png
+++ b/core/res/res/drawable-mdpi/ic_media_play.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_previous.png b/core/res/res/drawable-mdpi/ic_media_previous.png
index e9abc7f..0163d0945 100644
--- a/core/res/res/drawable-mdpi/ic_media_previous.png
+++ b/core/res/res/drawable-mdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_rew.png b/core/res/res/drawable-mdpi/ic_media_rew.png
index a5eb94a2..5489180 100644
--- a/core/res/res/drawable-mdpi/ic_media_rew.png
+++ b/core/res/res/drawable-mdpi/ic_media_rew.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_stop.png b/core/res/res/drawable-mdpi/ic_media_stop.png
new file mode 100644
index 0000000..24bcb70
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_media_stop.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_notification_ime_default.png b/core/res/res/drawable-mdpi/ic_notification_ime_default.png
index 1a9d88c..25700c0 100644
--- a/core/res/res/drawable-mdpi/ic_notification_ime_default.png
+++ b/core/res/res/drawable-mdpi/ic_notification_ime_default.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_search.png b/core/res/res/drawable-mdpi/ic_search.png
index d92071b..4be72f1 100644
--- a/core/res/res/drawable-mdpi/ic_search.png
+++ b/core/res/res/drawable-mdpi/ic_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_search_api_holo_light.png b/core/res/res/drawable-mdpi/ic_search_api_holo_light.png
index 72e207b..f2e26f8 100644
--- a/core/res/res/drawable-mdpi/ic_search_api_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_voice_search.png b/core/res/res/drawable-mdpi/ic_voice_search.png
index a2fe874..73c6be6 100644
--- a/core/res/res/drawable-mdpi/ic_voice_search.png
+++ b/core/res/res/drawable-mdpi/ic_voice_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_voice_search_api_holo_light.png b/core/res/res/drawable-mdpi/ic_voice_search_api_holo_light.png
index 3481c98..71d838e 100644
--- a/core/res/res/drawable-mdpi/ic_voice_search_api_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png
index fe72d00..f6d9f1b 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
index be666c6..b7262d1 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
index adbb146..0f1190b 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png
index e8be7bf..88ca2e0 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png
index 120a9d8..f0f9436 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
index 60ec146..8aa1263 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png
index 7477453..4a89f4b 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png
index c79a35c..78c7a9f 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png
index 2e6ca2e..36f9a32 100644
--- a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_gray.png b/core/res/res/drawable-mdpi/jog_tab_target_gray.png
index 517b253..a1e25e1 100644
--- a/core/res/res/drawable-mdpi/jog_tab_target_gray.png
+++ b/core/res/res/drawable-mdpi/jog_tab_target_gray.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_green.png b/core/res/res/drawable-mdpi/jog_tab_target_green.png
index 188f3cc..d1377ee 100644
--- a/core/res/res/drawable-mdpi/jog_tab_target_green.png
+++ b/core/res/res/drawable-mdpi/jog_tab_target_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_red.png b/core/res/res/drawable-mdpi/jog_tab_target_red.png
index a36394d..b840bc6 100644
--- a/core/res/res/drawable-mdpi/jog_tab_target_red.png
+++ b/core/res/res/drawable-mdpi/jog_tab_target_red.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_yellow.png b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png
index ba999b1..58b2e62 100644
--- a/core/res/res/drawable-mdpi/jog_tab_target_yellow.png
+++ b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
index b60aaa5..6e77525 100644
--- a/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
index b60aaa5..6e77525 100644
--- a/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
index f707453..af0bc16 100644
--- a/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
index 441ccc0..c2f2dd8 100644
--- a/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
index faa0672..4cbcee9 100644
--- a/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_light.9.png b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
index faa0672..4cbcee9 100644
--- a/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_submenu_background.9.png b/core/res/res/drawable-mdpi/menu_submenu_background.9.png
index a153532..2281c46 100644
--- a/core/res/res/drawable-mdpi/menu_submenu_background.9.png
+++ b/core/res/res/drawable-mdpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png b/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png
index 9ecb8af..f0bdfb0 100644
--- a/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png
+++ b/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png b/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png
index 78a86a5..c64da8d 100644
--- a/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error.9.png b/core/res/res/drawable-mdpi/popup_inline_error.9.png
old mode 100755
new mode 100644
index 6a8297a..2d62071
--- a/core/res/res/drawable-mdpi/popup_inline_error.9.png
+++ b/core/res/res/drawable-mdpi/popup_inline_error.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_above.9.png b/core/res/res/drawable-mdpi/popup_inline_error_above.9.png
index 2e601d0..a318891 100644
--- a/core/res/res/drawable-mdpi/popup_inline_error_above.9.png
+++ b/core/res/res/drawable-mdpi/popup_inline_error_above.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
index c5418f9..3d946e5 100644
--- a/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
index c943b2e..4bb22f0 100644
--- a/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
index 4bf3cb9..31228b6 100644
--- a/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
index 4bf3cb9..31228b6 100644
--- a/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
index b13c878..7274274 100644
--- a/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
index b13c878..7274274 100644
--- a/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png
index 0920336..0fc20e0 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png
index fb7a955..2b7a262 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
index c994519..7cbf2f2 100644
--- a/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
index 5e21da4..81772a8 100644
--- a/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
index 017b593..b8037a3 100644
--- a/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
index 12c6e21..76df16f 100644
--- a/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png
index 8cedc02..9c99bda 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png
index b5af0f7..81b205a 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png
index ffb97a5..3ad6687 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png
index 1d7948c0..fab4c67 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png
index fb6a0a0..bfe4da8 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png
index fb6a0a0..bfe4da8 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png
index 556b106..dda2998 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png
index fcca39f..951301d 100644
--- a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png
index ddc2b22..f88dcba 100644
--- a/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png
index eb0d501..c75eece 100644
--- a/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
index 8ba2a42..eb23155 100644
--- a/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png
index cf50964..4318af5 100644
--- a/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png
index 7ab9428..440ef6d 100644
--- a/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png
index 7ab9428..440ef6d 100644
--- a/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
index 5654920..4785df9 100644
--- a/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png
index 655339d..246e0d0 100644
--- a/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_call_mute.png b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
index 845ec86..8797a09 100644
--- a/core/res/res/drawable-mdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_car_mode.png b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
index dfd2e0a..d8015dc 100644
--- a/core/res/res/drawable-mdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_chat.png b/core/res/res/drawable-mdpi/stat_notify_chat.png
index e4464c2..82c83d0 100644
--- a/core/res/res/drawable-mdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-mdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_disk_full.png b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
old mode 100755
new mode 100644
index 69b513c..392e7bf
--- a/core/res/res/drawable-mdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_email_generic.png b/core/res/res/drawable-mdpi/stat_notify_email_generic.png
index 42d518d..7732c10 100644
--- a/core/res/res/drawable-mdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-mdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_error.png b/core/res/res/drawable-mdpi/stat_notify_error.png
index ddf0a2f..168f8f6 100644
--- a/core/res/res/drawable-mdpi/stat_notify_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_gmail.png b/core/res/res/drawable-mdpi/stat_notify_gmail.png
index 516e865..47ee782 100644
--- a/core/res/res/drawable-mdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-mdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_missed_call.png b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
index d2e3631..9583a6b 100644
--- a/core/res/res/drawable-mdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_more.png b/core/res/res/drawable-mdpi/stat_notify_more.png
index a85a16e..ca9e09e 100644
--- a/core/res/res/drawable-mdpi/stat_notify_more.png
+++ b/core/res/res/drawable-mdpi/stat_notify_more.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard.png b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
index 8f64201..5eae7a2 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
index fc051fa..a7a8b5c 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
index b936f45..6f17feb 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
old mode 100755
new mode 100644
index 87327b4..6a774cf
--- a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync.png b/core/res/res/drawable-mdpi/stat_notify_sync.png
index 4876b8e..1be8677 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
index 8372756..1be8677 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_error.png b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
index 2725549..30658c5 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_voicemail.png b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
index 67a0f91..dd70146 100644
--- a/core/res/res/drawable-mdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
index de63297..11b6a5a 100644
--- a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
+++ b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_adb.png b/core/res/res/drawable-mdpi/stat_sys_adb.png
index 6ba480d..730d96f 100644
--- a/core/res/res/drawable-mdpi/stat_sys_adb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
index 46f6901..68fe66a 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_usb.png b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
index 44860bf..40d77f0 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
index 9c77ecb..25324f6 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
index 4bf5e6c..6d1fb4a 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
index 2211810..4c3e963 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
index 7db3096..2aae625 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
index 894dd63..55dbe12 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
index 889c01e..53fda44 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_gps_on.png b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
index e0b9d6e..2c98972 100644
--- a/core/res/res/drawable-mdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call.png b/core/res/res/drawable-mdpi/stat_sys_phone_call.png
index c44d062..71da6a2 100644
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png b/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
old mode 100755
new mode 100644
index ed4b6ec..b0dbe6d
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png b/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
index 9216447..22e9082 100644
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_secure.png b/core/res/res/drawable-mdpi/stat_sys_secure.png
index 7167c3a..da3e318 100644
--- a/core/res/res/drawable-mdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-mdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
index 25fef560..e8c6374 100644
--- a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_throttled.png b/core/res/res/drawable-mdpi/stat_sys_throttled.png
index 2cbe7f4..ef6a7af 100644
--- a/core/res/res/drawable-mdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-mdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
index 6a05585e..6402aa5 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
index af492c8..b9c364c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
index 4ba150c8..217ea4e 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
index cbcf280..e22ec6d 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
index cb8628c..a86d5cd 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
index e7a5376..3387dbb 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
index aa03b4f..32b23ed 100644
--- a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
+++ b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
index 5f45440..a4c1fc8 100644
--- a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
+++ b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_warning.png b/core/res/res/drawable-mdpi/stat_sys_warning.png
index 2a764fa..168f8f6 100644
--- a/core/res/res/drawable-mdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-mdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png b/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
index c079615..873c556 100644
--- a/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png
index 35ff948..b8dd545 100644
--- a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png
index ceb1869..11b8426 100644
--- a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png
index 4753a93..c9481fa 100644
--- a/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png b/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png
index 4469501..eb08c87 100644
--- a/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_bg_holo_dark.9.png
index ac00325..429d73d 100644
--- a/core/res/res/drawable-mdpi/switch_bg_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_bg_holo_light.9.png b/core/res/res/drawable-mdpi/switch_bg_holo_light.9.png
index f48f960..693ee33 100644
--- a/core/res/res/drawable-mdpi/switch_bg_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
index c70261f..bf4b161 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png
index c17d9bf..4535993 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png
index 744128d..c56f49d 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png
index e89439d..5272f08 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png
index 51b6b2b..9b738046 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png
index f418398..bcd503f 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png
index 699ade9..9c948a5 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png
index 7f674c6..b035f42 100644
--- a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/sym_keyboard_shift.png b/core/res/res/drawable-mdpi/sym_keyboard_shift.png
index 91d6e32..572c1c1 100644
--- a/core/res/res/drawable-mdpi/sym_keyboard_shift.png
+++ b/core/res/res/drawable-mdpi/sym_keyboard_shift.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/sym_keyboard_shift_locked.png b/core/res/res/drawable-mdpi/sym_keyboard_shift_locked.png
index 2bd0536..175ed6d 100644
--- a/core/res/res/drawable-mdpi/sym_keyboard_shift_locked.png
+++ b/core/res/res/drawable-mdpi/sym_keyboard_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_focused_holo.9.png b/core/res/res/drawable-mdpi/tab_focused_holo.9.png
deleted file mode 100644
index 187d8c5..0000000
--- a/core/res/res/drawable-mdpi/tab_focused_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected_bar_left_v4.9.png b/core/res/res/drawable-mdpi/tab_selected_bar_left_v4.9.png
index d14c02b..6710945 100644
--- a/core/res/res/drawable-mdpi/tab_selected_bar_left_v4.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected_bar_left_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected_bar_right_v4.9.png b/core/res/res/drawable-mdpi/tab_selected_bar_right_v4.9.png
index d14c02b..6710945 100644
--- a/core/res/res/drawable-mdpi/tab_selected_bar_right_v4.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected_bar_right_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected_v4.9.png b/core/res/res/drawable-mdpi/tab_selected_v4.9.png
index 52cc34e..3c1c4eb 100644
--- a/core/res/res/drawable-mdpi/tab_selected_v4.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_unselected_v4.9.png b/core/res/res/drawable-mdpi/tab_unselected_v4.9.png
index 7d0859a..bb38337 100644
--- a/core/res/res/drawable-mdpi/tab_unselected_v4.9.png
+++ b/core/res/res/drawable-mdpi/tab_unselected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_edit_side_paste_window.9.png b/core/res/res/drawable-mdpi/text_edit_side_paste_window.9.png
index d8ae54c..23684fa 100644
--- a/core/res/res/drawable-mdpi/text_edit_side_paste_window.9.png
+++ b/core/res/res/drawable-mdpi/text_edit_side_paste_window.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_left.png b/core/res/res/drawable-mdpi/text_select_handle_left.png
index 959887f..d2cb710 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_left.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_middle.png b/core/res/res/drawable-mdpi/text_select_handle_middle.png
index 42d4e1a..db70e5a 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_middle.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_middle.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_right.png b/core/res/res/drawable-mdpi/text_select_handle_right.png
index 61f9c12..be3d6ea 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_right.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_focused_holo_dark.9.png
index 0ce5d13..efbaef8 100644
--- a/core/res/res/drawable-mdpi/textfield_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_focused_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_focused_holo_light.9.png
index 945516e..efbaef8 100644
--- a/core/res/res/drawable-mdpi/textfield_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
index faaa6c2..99840b1 100644
--- a/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
index ec44405..6bd9509 100644
--- a/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png
index 1cc76a3..22493de 100644
--- a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png
index 2593760..02b491c 100644
--- a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png
index 8688d6a..16c4c1a 100644
--- a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png
index 3f4c282..e474bc5 100644
--- a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
index 8692528..c56ab9c 100644
--- a/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
index 849af73..a2e5944 100644
--- a/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/vpn_connected.png b/core/res/res/drawable-mdpi/vpn_connected.png
index 65fc6db..0d1a026 100644
--- a/core/res/res/drawable-mdpi/vpn_connected.png
+++ b/core/res/res/drawable-mdpi/vpn_connected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/vpn_disconnected.png b/core/res/res/drawable-mdpi/vpn_disconnected.png
index 2440c69..d16d7fb 100644
--- a/core/res/res/drawable-mdpi/vpn_disconnected.png
+++ b/core/res/res/drawable-mdpi/vpn_disconnected.png
Binary files differ
diff --git a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png
new file mode 100644
index 0000000..cc46f19
--- /dev/null
+++ b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 0000000..cc46f19
--- /dev/null
+++ b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-nodpi/platlogo.png b/core/res/res/drawable-nodpi/platlogo.png
index c235005..e619ed5 100644
--- a/core/res/res/drawable-nodpi/platlogo.png
+++ b/core/res/res/drawable-nodpi/platlogo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_bottom_solid_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_bottom_solid_dark_holo.9.png
index 462e0e0..506cd68ff 100644
--- a/core/res/res/drawable-xhdpi/ab_bottom_solid_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_bottom_solid_inverse_holo.9.png b/core/res/res/drawable-xhdpi/ab_bottom_solid_inverse_holo.9.png
index 939ff4eb..c185112 100644
--- a/core/res/res/drawable-xhdpi/ab_bottom_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_bottom_solid_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_bottom_solid_light_holo.9.png
index 8f89040..8ed7f9b 100644
--- a/core/res/res/drawable-xhdpi/ab_bottom_solid_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_bottom_transparent_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_bottom_transparent_dark_holo.9.png
index ccd53a3..c4694cd 100644
--- a/core/res/res/drawable-xhdpi/ab_bottom_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_bottom_transparent_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_bottom_transparent_light_holo.9.png
index 0b1ae2d..57f5cfa 100644
--- a/core/res/res/drawable-xhdpi/ab_bottom_transparent_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_solid_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_solid_dark_holo.9.png
index c8e5efc4..d16e50cc 100644
--- a/core/res/res/drawable-xhdpi/ab_solid_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_solid_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_solid_light_holo.9.png
index 6cb8a0e..45cc807 100644
--- a/core/res/res/drawable-xhdpi/ab_solid_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_solid_shadow_holo.9.png b/core/res/res/drawable-xhdpi/ab_solid_shadow_holo.9.png
index 49b2669..a9e0d4d 100644
--- a/core/res/res/drawable-xhdpi/ab_solid_shadow_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_stacked_solid_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_stacked_solid_dark_holo.9.png
index 201e21d..5ea235d 100644
--- a/core/res/res/drawable-xhdpi/ab_stacked_solid_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png b/core/res/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png
index ac96200..0220c8d 100644
--- a/core/res/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_stacked_solid_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_stacked_solid_light_holo.9.png
index d605d96..be13077 100644
--- a/core/res/res/drawable-xhdpi/ab_stacked_solid_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_stacked_transparent_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_stacked_transparent_dark_holo.9.png
index 8ece2a9..ab02e7a 100644
--- a/core/res/res/drawable-xhdpi/ab_stacked_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_stacked_transparent_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_stacked_transparent_light_holo.9.png
index ae0b6b7..0b5a24e 100644
--- a/core/res/res/drawable-xhdpi/ab_stacked_transparent_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_transparent_dark_holo.9.png b/core/res/res/drawable-xhdpi/ab_transparent_dark_holo.9.png
index d3a3809..6d21429 100644
--- a/core/res/res/drawable-xhdpi/ab_transparent_dark_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ab_transparent_light_holo.9.png b/core/res/res/drawable-xhdpi/ab_transparent_light_holo.9.png
index 7e6e24d..c34c46f 100644
--- a/core/res/res/drawable-xhdpi/ab_transparent_light_holo.9.png
+++ b/core/res/res/drawable-xhdpi/ab_transparent_light_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/activity_title_bar.9.png b/core/res/res/drawable-xhdpi/activity_title_bar.9.png
new file mode 100644
index 0000000..949f31e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/activity_title_bar.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/arrow_down_float.png b/core/res/res/drawable-xhdpi/arrow_down_float.png
new file mode 100644
index 0000000..b165ee3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/arrow_down_float.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/arrow_up_float.png b/core/res/res/drawable-xhdpi/arrow_up_float.png
new file mode 100644
index 0000000..793ec42
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/arrow_up_float.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/battery_charge_background.png b/core/res/res/drawable-xhdpi/battery_charge_background.png
new file mode 100644
index 0000000..84b168c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/battery_charge_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/bottom_bar.png b/core/res/res/drawable-xhdpi/bottom_bar.png
new file mode 100644
index 0000000..67b1e47
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/bottom_bar.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_check_buttonless_off.png b/core/res/res/drawable-xhdpi/btn_check_buttonless_off.png
new file mode 100644
index 0000000..a3c5655
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_check_buttonless_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_check_buttonless_on.png b/core/res/res/drawable-xhdpi/btn_check_buttonless_on.png
new file mode 100644
index 0000000..0629581
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_check_buttonless_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_check_label_background.9.png b/core/res/res/drawable-xhdpi/btn_check_label_background.9.png
new file mode 100644
index 0000000..9257ca9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_check_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_circle_disable.png b/core/res/res/drawable-xhdpi/btn_circle_disable.png
new file mode 100644
index 0000000..420e01a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_circle_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_circle_disable_focused.png b/core/res/res/drawable-xhdpi/btn_circle_disable_focused.png
new file mode 100644
index 0000000..6876916
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_circle_normal.png b/core/res/res/drawable-xhdpi/btn_circle_normal.png
new file mode 100644
index 0000000..de7e71e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_circle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_circle_pressed.png b/core/res/res/drawable-xhdpi/btn_circle_pressed.png
new file mode 100644
index 0000000..17776e4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_circle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_circle_selected.png b/core/res/res/drawable-xhdpi/btn_circle_selected.png
new file mode 100644
index 0000000..98aeff5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_circle_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_close_normal.png b/core/res/res/drawable-xhdpi/btn_close_normal.png
new file mode 100644
index 0000000..2d0b0ea
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_close_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_close_pressed.png b/core/res/res/drawable-xhdpi/btn_close_pressed.png
new file mode 100644
index 0000000..5d9b5ee
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_close_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_close_selected.png b/core/res/res/drawable-xhdpi/btn_close_selected.png
new file mode 100644
index 0000000..1bf1740
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_close_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_default.png b/core/res/res/drawable-xhdpi/btn_code_lock_default.png
new file mode 100644
index 0000000..a644014
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_touched.png b/core/res/res/drawable-xhdpi/btn_code_lock_touched.png
new file mode 100644
index 0000000..67faad2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_normal.9.png b/core/res/res/drawable-xhdpi/btn_default_normal.9.png
index 9f18a87..4ca0b374 100644
--- a/core/res/res/drawable-xhdpi/btn_default_normal.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_normal_disable.9.png b/core/res/res/drawable-xhdpi/btn_default_normal_disable.9.png
index 652aa3e..f7af2a4 100644
--- a/core/res/res/drawable-xhdpi/btn_default_normal_disable.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_normal_disable_focused.9.png b/core/res/res/drawable-xhdpi/btn_default_normal_disable_focused.9.png
index 92a7664..ab7084e 100644
--- a/core/res/res/drawable-xhdpi/btn_default_normal_disable_focused.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_pressed.9.png b/core/res/res/drawable-xhdpi/btn_default_pressed.9.png
index 3f42693..02f5bb8 100644
--- a/core/res/res/drawable-xhdpi/btn_default_pressed.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_selected.9.png b/core/res/res/drawable-xhdpi/btn_default_selected.9.png
index ecdc72b..0375a18 100644
--- a/core/res/res/drawable-xhdpi/btn_default_selected.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_small_normal.9.png b/core/res/res/drawable-xhdpi/btn_default_small_normal.9.png
index f823033..d368073 100644
--- a/core/res/res/drawable-xhdpi/btn_default_small_normal.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_small_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_small_normal_disable.9.png b/core/res/res/drawable-xhdpi/btn_default_small_normal_disable.9.png
index f537a6d..6d1eb48 100644
--- a/core/res/res/drawable-xhdpi/btn_default_small_normal_disable.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_small_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_small_normal_disable_focused.9.png b/core/res/res/drawable-xhdpi/btn_default_small_normal_disable_focused.9.png
index 1b11689..f4783d4 100644
--- a/core/res/res/drawable-xhdpi/btn_default_small_normal_disable_focused.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_small_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_small_selected.9.png b/core/res/res/drawable-xhdpi/btn_default_small_selected.9.png
index 74a156f..0df43d7 100644
--- a/core/res/res/drawable-xhdpi/btn_default_small_selected.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_small_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_default_transparent_normal.9.png b/core/res/res/drawable-xhdpi/btn_default_transparent_normal.9.png
index 44860dc..4412346 100644
--- a/core/res/res/drawable-xhdpi/btn_default_transparent_normal.9.png
+++ b/core/res/res/drawable-xhdpi/btn_default_transparent_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dialog_disable.png b/core/res/res/drawable-xhdpi/btn_dialog_disable.png
new file mode 100644
index 0000000..571e40af
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dialog_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dialog_normal.png b/core/res/res/drawable-xhdpi/btn_dialog_normal.png
new file mode 100644
index 0000000..2d0b0ea
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dialog_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dialog_pressed.png b/core/res/res/drawable-xhdpi/btn_dialog_pressed.png
new file mode 100644
index 0000000..56195d2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dialog_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dialog_selected.png b/core/res/res/drawable-xhdpi/btn_dialog_selected.png
new file mode 100644
index 0000000..c33da56
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dialog_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dropdown_disabled.9.png b/core/res/res/drawable-xhdpi/btn_dropdown_disabled.9.png
new file mode 100644
index 0000000..e45c731
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dropdown_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dropdown_disabled_focused.9.png b/core/res/res/drawable-xhdpi/btn_dropdown_disabled_focused.9.png
new file mode 100644
index 0000000..0e0e0d1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dropdown_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dropdown_normal.9.png b/core/res/res/drawable-xhdpi/btn_dropdown_normal.9.png
new file mode 100644
index 0000000..a47ad5a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dropdown_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dropdown_pressed.9.png b/core/res/res/drawable-xhdpi/btn_dropdown_pressed.9.png
new file mode 100644
index 0000000..a3851a8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dropdown_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_dropdown_selected.9.png b/core/res/res/drawable-xhdpi/btn_dropdown_selected.9.png
new file mode 100644
index 0000000..80e4d04
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_dropdown_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_erase_default.9.png b/core/res/res/drawable-xhdpi/btn_erase_default.9.png
new file mode 100644
index 0000000..f189e9c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_erase_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_erase_pressed.9.png b/core/res/res/drawable-xhdpi/btn_erase_pressed.9.png
new file mode 100644
index 0000000..99cd6fd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_erase_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_erase_selected.9.png b/core/res/res/drawable-xhdpi/btn_erase_selected.9.png
new file mode 100644
index 0000000..b6de266
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_erase_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_global_search_normal.9.png b/core/res/res/drawable-xhdpi/btn_global_search_normal.9.png
new file mode 100644
index 0000000..cc11942
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_global_search_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png
new file mode 100644
index 0000000..6bf2fb4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png
new file mode 100644
index 0000000..979eccd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png
new file mode 100644
index 0000000..7252482
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_group_focused_holo_light.9.png
new file mode 100644
index 0000000..7252482
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000..3065564
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000..a444e63
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png
new file mode 100644
index 0000000..60d6675
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png
new file mode 100644
index 0000000..142a1c9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal.9.png
new file mode 100644
index 0000000..ef9262f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_off.9.png
new file mode 100644
index 0000000..6715afd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_on.9.png
new file mode 100644
index 0000000..8ffddcf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed.9.png
new file mode 100644
index 0000000..5a52bbc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_off.9.png
new file mode 100644
index 0000000..77c6d78
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_on.9.png
new file mode 100644
index 0000000..ed73f09
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_fulltrans_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_normal.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal.9.png
new file mode 100644
index 0000000..08021f9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png
new file mode 100644
index 0000000..41c8ccb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png
new file mode 100644
index 0000000..546ccbc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png
new file mode 100644
index 0000000..802b22e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png
new file mode 100644
index 0000000..d317f94
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png
new file mode 100644
index 0000000..80b50a1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal.9.png
new file mode 100644
index 0000000..200d934
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_off.9.png
new file mode 100644
index 0000000..76202a4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_on.9.png
new file mode 100644
index 0000000..e9b2d7e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed.9.png
new file mode 100644
index 0000000..f3626b6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_off.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_off.9.png
new file mode 100644
index 0000000..8db4f8e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_on.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_on.9.png
new file mode 100644
index 0000000..b835a07
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_selected.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_selected.9.png
new file mode 100644
index 0000000..8dd3070
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_keyboard_key_trans_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_media_player.9.png b/core/res/res/drawable-xhdpi/btn_media_player.9.png
new file mode 100644
index 0000000..06e523d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_media_player.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_media_player_disabled.9.png b/core/res/res/drawable-xhdpi/btn_media_player_disabled.9.png
new file mode 100644
index 0000000..9b3350f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_media_player_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_media_player_disabled_selected.9.png b/core/res/res/drawable-xhdpi/btn_media_player_disabled_selected.9.png
new file mode 100644
index 0000000..1872a0b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_media_player_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_media_player_pressed.9.png b/core/res/res/drawable-xhdpi/btn_media_player_pressed.9.png
new file mode 100644
index 0000000..e8810b0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_media_player_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_media_player_selected.9.png b/core/res/res/drawable-xhdpi/btn_media_player_selected.9.png
new file mode 100644
index 0000000..b9287d6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_media_player_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_minus_default.png b/core/res/res/drawable-xhdpi/btn_minus_default.png
new file mode 100644
index 0000000..7e952f11
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_minus_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_minus_disable.png b/core/res/res/drawable-xhdpi/btn_minus_disable.png
new file mode 100644
index 0000000..63901e3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_minus_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_minus_disable_focused.png b/core/res/res/drawable-xhdpi/btn_minus_disable_focused.png
new file mode 100644
index 0000000..9073d49
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_minus_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_minus_pressed.png b/core/res/res/drawable-xhdpi/btn_minus_pressed.png
new file mode 100644
index 0000000..49dfc3f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_minus_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_minus_selected.png b/core/res/res/drawable-xhdpi/btn_minus_selected.png
new file mode 100644
index 0000000..d1d2101
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_minus_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_plus_default.png b/core/res/res/drawable-xhdpi/btn_plus_default.png
new file mode 100644
index 0000000..d47113a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_plus_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_plus_disable.png b/core/res/res/drawable-xhdpi/btn_plus_disable.png
new file mode 100644
index 0000000..6432c81
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_plus_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_plus_disable_focused.png b/core/res/res/drawable-xhdpi/btn_plus_disable_focused.png
new file mode 100644
index 0000000..666bf9d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_plus_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_plus_pressed.png b/core/res/res/drawable-xhdpi/btn_plus_pressed.png
new file mode 100644
index 0000000..2fdb1d2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_plus_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_plus_selected.png b/core/res/res/drawable-xhdpi/btn_plus_selected.png
new file mode 100644
index 0000000..0f9157d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_plus_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_label_background.9.png b/core/res/res/drawable-xhdpi/btn_radio_label_background.9.png
new file mode 100644
index 0000000..e5dee60
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off.png b/core/res/res/drawable-xhdpi/btn_radio_off.png
new file mode 100644
index 0000000..be4bafa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..0aa6b93
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000..e7a7020
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png
new file mode 100644
index 0000000..e3fac69
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png
new file mode 100644
index 0000000..c2c8b5e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png
new file mode 100644
index 0000000..c28914c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png
new file mode 100644
index 0000000..9ddffd1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_holo.png b/core/res/res/drawable-xhdpi/btn_radio_off_holo.png
new file mode 100644
index 0000000..1167e1f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_off_holo_dark.png
new file mode 100644
index 0000000..e6c2474
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_off_holo_light.png
new file mode 100644
index 0000000..c642355
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_pressed.png b/core/res/res/drawable-xhdpi/btn_radio_off_pressed.png
new file mode 100644
index 0000000..19e4443
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png
new file mode 100644
index 0000000..786ce59
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png
new file mode 100644
index 0000000..f56d716
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_off_selected.png b/core/res/res/drawable-xhdpi/btn_radio_off_selected.png
new file mode 100644
index 0000000..599b48b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on.png b/core/res/res/drawable-xhdpi/btn_radio_on.png
new file mode 100644
index 0000000..d0416572
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..99f3d53
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000..2d98e17
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png
new file mode 100644
index 0000000..71984bc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png
new file mode 100644
index 0000000..e77b6e3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png
new file mode 100644
index 0000000..5d1edc7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png
new file mode 100644
index 0000000..db9fc32
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_holo.png b/core/res/res/drawable-xhdpi/btn_radio_on_holo.png
new file mode 100644
index 0000000..e39e097
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_on_holo_dark.png
new file mode 100644
index 0000000..4fc05dd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_on_holo_light.png
new file mode 100644
index 0000000..bfcef36
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_pressed.png b/core/res/res/drawable-xhdpi/btn_radio_on_pressed.png
new file mode 100644
index 0000000..88640d0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png b/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png
new file mode 100644
index 0000000..ec7fa73
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png b/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png
new file mode 100644
index 0000000..6941ce0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_radio_on_selected.png b/core/res/res/drawable-xhdpi/btn_radio_on_selected.png
new file mode 100644
index 0000000..c90b24d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_radio_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_off_normal.png b/core/res/res/drawable-xhdpi/btn_rating_star_off_normal.png
new file mode 100644
index 0000000..d17506f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_off_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_off_pressed.png b/core/res/res/drawable-xhdpi/btn_rating_star_off_pressed.png
new file mode 100644
index 0000000..93a01a5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_off_selected.png b/core/res/res/drawable-xhdpi/btn_rating_star_off_selected.png
new file mode 100644
index 0000000..dea640a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_on_normal.png b/core/res/res/drawable-xhdpi/btn_rating_star_on_normal.png
new file mode 100644
index 0000000..cf93bfb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_on_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_on_pressed.png b/core/res/res/drawable-xhdpi/btn_rating_star_on_pressed.png
new file mode 100644
index 0000000..0696e04
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_rating_star_on_selected.png b/core/res/res/drawable-xhdpi/btn_rating_star_on_selected.png
new file mode 100644
index 0000000..5f3bec24
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_rating_star_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_default.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_default.9.png
new file mode 100644
index 0000000..07cb53c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_pressed.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_pressed.9.png
new file mode 100644
index 0000000..d3ccef8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_selected.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_selected.9.png
new file mode 100644
index 0000000..c553c58
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_voice_default.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_default.9.png
new file mode 100644
index 0000000..f478c46
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_voice_pressed.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_pressed.9.png
new file mode 100644
index 0000000..ea5e509
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_search_dialog_voice_selected.9.png b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_selected.9.png
new file mode 100644
index 0000000..a46f0ed
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_search_dialog_voice_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_square_overlay_disabled.png b/core/res/res/drawable-xhdpi/btn_square_overlay_disabled.png
new file mode 100644
index 0000000..3cad470
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_square_overlay_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_square_overlay_disabled_focused.png b/core/res/res/drawable-xhdpi/btn_square_overlay_disabled_focused.png
new file mode 100644
index 0000000..fff0d50
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_square_overlay_disabled_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_square_overlay_normal.png b/core/res/res/drawable-xhdpi/btn_square_overlay_normal.png
new file mode 100644
index 0000000..d2bd151
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_square_overlay_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_square_overlay_pressed.png b/core/res/res/drawable-xhdpi/btn_square_overlay_pressed.png
new file mode 100644
index 0000000..b1bf326
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_square_overlay_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_square_overlay_selected.png b/core/res/res/drawable-xhdpi/btn_square_overlay_selected.png
new file mode 100644
index 0000000..c48a996
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_square_overlay_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_off.png b/core/res/res/drawable-xhdpi/btn_star_big_off.png
new file mode 100644
index 0000000..4ed5142
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_off_disable.png b/core/res/res/drawable-xhdpi/btn_star_big_off_disable.png
new file mode 100644
index 0000000..cc52dec
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_off_disable_focused.png b/core/res/res/drawable-xhdpi/btn_star_big_off_disable_focused.png
new file mode 100644
index 0000000..fea7717
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_off_pressed.png b/core/res/res/drawable-xhdpi/btn_star_big_off_pressed.png
new file mode 100644
index 0000000..503a5b2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_off_selected.png b/core/res/res/drawable-xhdpi/btn_star_big_off_selected.png
new file mode 100644
index 0000000..8470723
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_on.png b/core/res/res/drawable-xhdpi/btn_star_big_on.png
new file mode 100644
index 0000000..a094406
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_on_disable.png b/core/res/res/drawable-xhdpi/btn_star_big_on_disable.png
new file mode 100644
index 0000000..bbf7d17
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_on_disable_focused.png b/core/res/res/drawable-xhdpi/btn_star_big_on_disable_focused.png
new file mode 100644
index 0000000..a46ea69
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_on_pressed.png b/core/res/res/drawable-xhdpi/btn_star_big_on_pressed.png
new file mode 100644
index 0000000..7e45f2a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_big_on_selected.png b/core/res/res/drawable-xhdpi/btn_star_big_on_selected.png
new file mode 100644
index 0000000..0607b78
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_big_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_star_label_background.9.png b/core/res/res/drawable-xhdpi/btn_star_label_background.9.png
new file mode 100644
index 0000000..a8b0568
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_star_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_down_disabled.9.png b/core/res/res/drawable-xhdpi/btn_zoom_down_disabled.9.png
new file mode 100644
index 0000000..7e4297b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_down_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_down_disabled_focused.9.png b/core/res/res/drawable-xhdpi/btn_zoom_down_disabled_focused.9.png
new file mode 100644
index 0000000..f23f23c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_down_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_down_normal.9.png b/core/res/res/drawable-xhdpi/btn_zoom_down_normal.9.png
new file mode 100644
index 0000000..59ae103
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_down_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_down_pressed.9.png b/core/res/res/drawable-xhdpi/btn_zoom_down_pressed.9.png
new file mode 100644
index 0000000..23c19c1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_down_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_down_selected.9.png b/core/res/res/drawable-xhdpi/btn_zoom_down_selected.9.png
new file mode 100644
index 0000000..9066821
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_down_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_page_normal.png b/core/res/res/drawable-xhdpi/btn_zoom_page_normal.png
new file mode 100644
index 0000000..9ae3f50
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_page_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_page_press.png b/core/res/res/drawable-xhdpi/btn_zoom_page_press.png
new file mode 100644
index 0000000..3549bdf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_page_press.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_up_disabled.9.png b/core/res/res/drawable-xhdpi/btn_zoom_up_disabled.9.png
new file mode 100644
index 0000000..6bc9e2e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_up_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_up_disabled_focused.9.png b/core/res/res/drawable-xhdpi/btn_zoom_up_disabled_focused.9.png
new file mode 100644
index 0000000..8dc0568
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_up_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_up_normal.9.png b/core/res/res/drawable-xhdpi/btn_zoom_up_normal.9.png
new file mode 100644
index 0000000..7776d28
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_up_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_up_pressed.9.png b/core/res/res/drawable-xhdpi/btn_zoom_up_pressed.9.png
new file mode 100644
index 0000000..2a5b1f4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_up_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_zoom_up_selected.9.png b/core/res/res/drawable-xhdpi/btn_zoom_up_selected.9.png
new file mode 100644
index 0000000..f88c377
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_zoom_up_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/button_onoff_indicator_off.png b/core/res/res/drawable-xhdpi/button_onoff_indicator_off.png
new file mode 100644
index 0000000..f70fd68
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/button_onoff_indicator_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/button_onoff_indicator_on.png b/core/res/res/drawable-xhdpi/button_onoff_indicator_on.png
new file mode 100644
index 0000000..9163be4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/button_onoff_indicator_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/call_contact.png b/core/res/res/drawable-xhdpi/call_contact.png
new file mode 100644
index 0000000..343e2db
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/call_contact.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/checkbox_off_background.png b/core/res/res/drawable-xhdpi/checkbox_off_background.png
new file mode 100644
index 0000000..ade4c0a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/checkbox_off_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/checkbox_on_background.png b/core/res/res/drawable-xhdpi/checkbox_on_background.png
new file mode 100644
index 0000000..5f6803a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/checkbox_on_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/clock_dial.png b/core/res/res/drawable-xhdpi/clock_dial.png
new file mode 100644
index 0000000..6cb60a2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/clock_dial.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/clock_hand_hour.png b/core/res/res/drawable-xhdpi/clock_hand_hour.png
new file mode 100644
index 0000000..bc0c5bd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/clock_hand_hour.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/clock_hand_minute.png b/core/res/res/drawable-xhdpi/clock_hand_minute.png
new file mode 100644
index 0000000..01d611f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/clock_hand_minute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/code_lock_bottom.9.png b/core/res/res/drawable-xhdpi/code_lock_bottom.9.png
new file mode 100644
index 0000000..1dbab24
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/code_lock_bottom.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/code_lock_left.9.png b/core/res/res/drawable-xhdpi/code_lock_left.9.png
new file mode 100644
index 0000000..ae65521
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/code_lock_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/code_lock_top.9.png b/core/res/res/drawable-xhdpi/code_lock_top.9.png
new file mode 100644
index 0000000..6f5cf62
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/code_lock_top.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/combobox_disabled.png b/core/res/res/drawable-xhdpi/combobox_disabled.png
new file mode 100644
index 0000000..9edf16e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/combobox_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/combobox_nohighlight.png b/core/res/res/drawable-xhdpi/combobox_nohighlight.png
new file mode 100644
index 0000000..0b58042
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/combobox_nohighlight.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/compass_arrow.png b/core/res/res/drawable-xhdpi/compass_arrow.png
new file mode 100644
index 0000000..1d0f360
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/compass_arrow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/compass_base.png b/core/res/res/drawable-xhdpi/compass_base.png
new file mode 100644
index 0000000..a66eb4a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/compass_base.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/contact_header_bg.9.png b/core/res/res/drawable-xhdpi/contact_header_bg.9.png
new file mode 100644
index 0000000..aee15b8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/contact_header_bg.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/create_contact.png b/core/res/res/drawable-xhdpi/create_contact.png
new file mode 100644
index 0000000..c6d5622
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/create_contact.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dark_header.9.png b/core/res/res/drawable-xhdpi/dark_header.9.png
new file mode 100644
index 0000000..5a0adc8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dark_header.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png b/core/res/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png
new file mode 100644
index 0000000..701a1b2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000..e966846
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png
new file mode 100644
index 0000000..093802b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_divider_horizontal_light.9.png b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_light.9.png
new file mode 100644
index 0000000..02aa017
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_divider_horizontal_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_dark.png b/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_dark.png
new file mode 100644
index 0000000..aa473ab
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_light.png b/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_light.png
new file mode 100644
index 0000000..ab21bbe
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_dark.png b/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_dark.png
new file mode 100644
index 0000000..338e1b7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_light.png b/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_light.png
new file mode 100644
index 0000000..e11f2e3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_dark.png b/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_dark.png
new file mode 100644
index 0000000..0401bcd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_light.png b/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_light.png
new file mode 100644
index 0000000..7040392
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dialog_ic_close_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_bright.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_bright.9.png
new file mode 100644
index 0000000..41b776b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_bright_opaque.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_bright_opaque.9.png
new file mode 100644
index 0000000..eb75a22
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_dark.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_dark.9.png
new file mode 100644
index 0000000..55a5e53
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_dark_opaque.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_dark_opaque.9.png
new file mode 100644
index 0000000..60e2cb2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_dim_dark.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_dim_dark.9.png
new file mode 100644
index 0000000..cf34613
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_dim_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_holo_dark.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000..48a88b8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_holo_light.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_holo_light.9.png
new file mode 100644
index 0000000..712aef2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_horizontal_textfield.9.png b/core/res/res/drawable-xhdpi/divider_horizontal_textfield.9.png
new file mode 100644
index 0000000..c9fa0fd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_horizontal_textfield.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_bright.9.png b/core/res/res/drawable-xhdpi/divider_vertical_bright.9.png
new file mode 100644
index 0000000..41b776b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_bright_opaque.9.png b/core/res/res/drawable-xhdpi/divider_vertical_bright_opaque.9.png
new file mode 100644
index 0000000..eb75a22
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_dark.9.png b/core/res/res/drawable-xhdpi/divider_vertical_dark.9.png
new file mode 100644
index 0000000..55a5e53
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_dark_opaque.9.png b/core/res/res/drawable-xhdpi/divider_vertical_dark_opaque.9.png
new file mode 100644
index 0000000..60e2cb2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_holo_dark.9.png b/core/res/res/drawable-xhdpi/divider_vertical_holo_dark.9.png
new file mode 100644
index 0000000..9350789
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/divider_vertical_holo_light.9.png b/core/res/res/drawable-xhdpi/divider_vertical_holo_light.9.png
new file mode 100644
index 0000000..e0f6e0a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/divider_vertical_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000..b5d226a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000..af85561
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png
new file mode 100644
index 0000000..bf01b0a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png
new file mode 100644
index 0000000..f4effa1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png
new file mode 100644
index 0000000..ce31d0f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png
new file mode 100644
index 0000000..4596171
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..adb6c36
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png
new file mode 100644
index 0000000..a1075d5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png
new file mode 100644
index 0000000..782325f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png
new file mode 100644
index 0000000..195ecbb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png
new file mode 100644
index 0000000..988e3f4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png
new file mode 100644
index 0000000..36d8cf4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png
new file mode 100644
index 0000000..a931132
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png
new file mode 100644
index 0000000..833bc13
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png
new file mode 100644
index 0000000..ca18b0d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png
new file mode 100644
index 0000000..37ad0e0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png
new file mode 100644
index 0000000..bdee422
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png
new file mode 100644
index 0000000..12ea0548
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/edit_query.png b/core/res/res/drawable-xhdpi/edit_query.png
new file mode 100644
index 0000000..dea9701
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/edit_query.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/edit_query_background_normal.9.png b/core/res/res/drawable-xhdpi/edit_query_background_normal.9.png
new file mode 100644
index 0000000..7787df3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/edit_query_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/edit_query_background_pressed.9.png b/core/res/res/drawable-xhdpi/edit_query_background_pressed.9.png
new file mode 100644
index 0000000..af81b2f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/edit_query_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/edit_query_background_selected.9.png b/core/res/res/drawable-xhdpi/edit_query_background_selected.9.png
new file mode 100644
index 0000000..b4f0f59
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/edit_query_background_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/editbox_background_focus_yellow.9.png b/core/res/res/drawable-xhdpi/editbox_background_focus_yellow.9.png
new file mode 100644
index 0000000..c4fdda1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/editbox_background_focus_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/editbox_background_normal.9.png b/core/res/res/drawable-xhdpi/editbox_background_normal.9.png
new file mode 100644
index 0000000..e1ee276
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/editbox_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/editbox_dropdown_background.9.png b/core/res/res/drawable-xhdpi/editbox_dropdown_background.9.png
new file mode 100644
index 0000000..ac9de9a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/editbox_dropdown_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/editbox_dropdown_background_dark.9.png b/core/res/res/drawable-xhdpi/editbox_dropdown_background_dark.9.png
new file mode 100644
index 0000000..439a856
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/editbox_dropdown_background_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_angel.png b/core/res/res/drawable-xhdpi/emo_im_angel.png
new file mode 100644
index 0000000..b4123ff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_angel.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_cool.png b/core/res/res/drawable-xhdpi/emo_im_cool.png
new file mode 100644
index 0000000..0efacf8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_cool.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_crying.png b/core/res/res/drawable-xhdpi/emo_im_crying.png
new file mode 100644
index 0000000..7de7bf0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_crying.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_embarrassed.png b/core/res/res/drawable-xhdpi/emo_im_embarrassed.png
new file mode 100644
index 0000000..baa0765
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_embarrassed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_foot_in_mouth.png b/core/res/res/drawable-xhdpi/emo_im_foot_in_mouth.png
new file mode 100644
index 0000000..afb22bb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_foot_in_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_happy.png b/core/res/res/drawable-xhdpi/emo_im_happy.png
new file mode 100644
index 0000000..08a242d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_happy.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_kissing.png b/core/res/res/drawable-xhdpi/emo_im_kissing.png
new file mode 100644
index 0000000..c643a3c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_kissing.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_laughing.png b/core/res/res/drawable-xhdpi/emo_im_laughing.png
new file mode 100644
index 0000000..0301f80
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_laughing.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_lips_are_sealed.png b/core/res/res/drawable-xhdpi/emo_im_lips_are_sealed.png
new file mode 100644
index 0000000..594e5e7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_lips_are_sealed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_money_mouth.png b/core/res/res/drawable-xhdpi/emo_im_money_mouth.png
new file mode 100644
index 0000000..df9283a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_money_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_sad.png b/core/res/res/drawable-xhdpi/emo_im_sad.png
new file mode 100644
index 0000000..f42f0a9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_sad.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_surprised.png b/core/res/res/drawable-xhdpi/emo_im_surprised.png
new file mode 100644
index 0000000..6b057fa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_surprised.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_tongue_sticking_out.png b/core/res/res/drawable-xhdpi/emo_im_tongue_sticking_out.png
new file mode 100644
index 0000000..ef128c5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_tongue_sticking_out.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_undecided.png b/core/res/res/drawable-xhdpi/emo_im_undecided.png
new file mode 100644
index 0000000..fcc0f42
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_undecided.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_winking.png b/core/res/res/drawable-xhdpi/emo_im_winking.png
new file mode 100644
index 0000000..687b62b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_winking.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_wtf.png b/core/res/res/drawable-xhdpi/emo_im_wtf.png
new file mode 100644
index 0000000..cb75a18
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_wtf.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/emo_im_yelling.png b/core/res/res/drawable-xhdpi/emo_im_yelling.png
new file mode 100644
index 0000000..32a7028
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/emo_im_yelling.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/expander_ic_maximized.9.png b/core/res/res/drawable-xhdpi/expander_ic_maximized.9.png
new file mode 100644
index 0000000..6eed88a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/expander_ic_minimized.9.png b/core/res/res/drawable-xhdpi/expander_ic_minimized.9.png
new file mode 100644
index 0000000..0683be6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_thumb_default_holo.png b/core/res/res/drawable-xhdpi/fastscroll_thumb_default_holo.png
index 71f8a06..98404d4 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_thumb_default_holo.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png b/core/res/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
index 850bd5e..6824947 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
index 431336a..c727bd4 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png b/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
index 431336a..c727bd4 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
index 7882e55..f2c6b42 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
index 7882e55..f2c6b42 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/focused_application_background_static.png b/core/res/res/drawable-xhdpi/focused_application_background_static.png
new file mode 100644
index 0000000..8231e4f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/focused_application_background_static.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/frame_gallery_thumb.9.png b/core/res/res/drawable-xhdpi/frame_gallery_thumb.9.png
new file mode 100644
index 0000000..915fbed
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/frame_gallery_thumb.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/frame_gallery_thumb_pressed.9.png b/core/res/res/drawable-xhdpi/frame_gallery_thumb_pressed.9.png
new file mode 100644
index 0000000..13ea006
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/frame_gallery_thumb_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/frame_gallery_thumb_selected.9.png b/core/res/res/drawable-xhdpi/frame_gallery_thumb_selected.9.png
new file mode 100644
index 0000000..f947144
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/frame_gallery_thumb_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/gallery_selected_default.9.png b/core/res/res/drawable-xhdpi/gallery_selected_default.9.png
new file mode 100644
index 0000000..742492a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/gallery_selected_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/gallery_selected_focused.9.png b/core/res/res/drawable-xhdpi/gallery_selected_focused.9.png
new file mode 100644
index 0000000..4f5700f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/gallery_selected_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/gallery_selected_pressed.9.png b/core/res/res/drawable-xhdpi/gallery_selected_pressed.9.png
new file mode 100644
index 0000000..00b36b8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/gallery_selected_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/gallery_unselected_default.9.png b/core/res/res/drawable-xhdpi/gallery_unselected_default.9.png
new file mode 100644
index 0000000..9bc0cdb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/gallery_unselected_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/gallery_unselected_pressed.9.png b/core/res/res/drawable-xhdpi/gallery_unselected_pressed.9.png
new file mode 100644
index 0000000..c10554a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/gallery_unselected_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/grid_selector_background_focus.9.png b/core/res/res/drawable-xhdpi/grid_selector_background_focus.9.png
new file mode 100644
index 0000000..bafc62a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/grid_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/grid_selector_background_pressed.9.png b/core/res/res/drawable-xhdpi/grid_selector_background_pressed.9.png
new file mode 100644
index 0000000..40e8a0e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/grid_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/highlight_disabled.9.png b/core/res/res/drawable-xhdpi/highlight_disabled.9.png
new file mode 100644
index 0000000..a65fe8f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/highlight_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/highlight_pressed.9.png b/core/res/res/drawable-xhdpi/highlight_pressed.9.png
new file mode 100644
index 0000000..d0e1564
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/highlight_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/highlight_selected.9.png b/core/res/res/drawable-xhdpi/highlight_selected.9.png
new file mode 100644
index 0000000..d332ee6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/highlight_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_aggregated.png b/core/res/res/drawable-xhdpi/ic_aggregated.png
new file mode 100644
index 0000000..818a1b1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_aggregated.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_alarm.png b/core/res/res/drawable-xhdpi/ic_audio_alarm.png
new file mode 100644
index 0000000..c1f56a1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_alarm_mute.png b/core/res/res/drawable-xhdpi/ic_audio_alarm_mute.png
new file mode 100644
index 0000000..0d7034f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_alarm_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_bt.png b/core/res/res/drawable-xhdpi/ic_audio_bt.png
new file mode 100644
index 0000000..b8aa083
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_bt.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_bt_mute.png b/core/res/res/drawable-xhdpi/ic_audio_bt_mute.png
new file mode 100644
index 0000000..93a2481
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_bt_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_notification.png b/core/res/res/drawable-xhdpi/ic_audio_notification.png
new file mode 100644
index 0000000..15182b9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_notification.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_notification_mute.png b/core/res/res/drawable-xhdpi/ic_audio_notification_mute.png
new file mode 100644
index 0000000..c26b839
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_phone.png b/core/res/res/drawable-xhdpi/ic_audio_phone.png
new file mode 100644
index 0000000..2a04619
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_ring_notif.png b/core/res/res/drawable-xhdpi/ic_audio_ring_notif.png
new file mode 100644
index 0000000..3fa4197
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute.png
new file mode 100644
index 0000000..e8e7fcc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_vol.png b/core/res/res/drawable-xhdpi/ic_audio_vol.png
new file mode 100644
index 0000000..4e2e20e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_vol.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_vol_mute.png b/core/res/res/drawable-xhdpi/ic_audio_vol_mute.png
new file mode 100644
index 0000000..64a5215
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_find_next.png b/core/res/res/drawable-xhdpi/ic_btn_find_next.png
new file mode 100644
index 0000000..a334a5d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_find_next.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_find_prev.png b/core/res/res/drawable-xhdpi/ic_btn_find_prev.png
new file mode 100644
index 0000000..d7b3177
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_find_prev.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_round_more_disabled.png b/core/res/res/drawable-xhdpi/ic_btn_round_more_disabled.png
new file mode 100644
index 0000000..99f37c5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_round_more_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_round_more_normal.png b/core/res/res/drawable-xhdpi/ic_btn_round_more_normal.png
new file mode 100644
index 0000000..7a8221f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_round_more_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_search.png b/core/res/res/drawable-xhdpi/ic_btn_search.png
new file mode 100644
index 0000000..a267c0a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_search.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_search_go.png b/core/res/res/drawable-xhdpi/ic_btn_search_go.png
new file mode 100644
index 0000000..896dddd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_search_go.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_speak_now.png b/core/res/res/drawable-xhdpi/ic_btn_speak_now.png
new file mode 100644
index 0000000..f7f4922
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_speak_now.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_disabled.png b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_disabled.png
new file mode 100644
index 0000000..299a7bf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_normal.png b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_normal.png
new file mode 100644
index 0000000..c43c68c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_fit_page_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_disabled.png b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_disabled.png
new file mode 100644
index 0000000..fa94bff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_normal.png b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_normal.png
new file mode 100644
index 0000000..1629d64
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_btn_square_browser_zoom_page_overview_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png
new file mode 100644
index 0000000..b2db65c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_cab_done_holo.png b/core/res/res/drawable-xhdpi/ic_cab_done_holo.png
new file mode 100644
index 0000000..4eeee43
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_cab_done_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_clear_disabled.png b/core/res/res/drawable-xhdpi/ic_clear_disabled.png
new file mode 100644
index 0000000..e35c5f0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_clear_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_clear_search_api_disabled_holo_light.png b/core/res/res/drawable-xhdpi/ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000..7fd7aeb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_clear_search_api_holo_light.png b/core/res/res/drawable-xhdpi/ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000..53cfbd3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_commit.png b/core/res/res/drawable-xhdpi/ic_commit.png
new file mode 100644
index 0000000..b871f7e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_commit.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_dark.png b/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..d8faf90
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_light.png b/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000..e7c7280
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_contact_picture.png b/core/res/res/drawable-xhdpi/ic_contact_picture.png
new file mode 100644
index 0000000..4ade625
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_contact_picture_2.png b/core/res/res/drawable-xhdpi/ic_contact_picture_2.png
new file mode 100644
index 0000000..ecb7b67
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_contact_picture_2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_contact_picture_3.png b/core/res/res/drawable-xhdpi/ic_contact_picture_3.png
new file mode 100644
index 0000000..326f2f8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_contact_picture_3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_delete.png b/core/res/res/drawable-xhdpi/ic_delete.png
new file mode 100644
index 0000000..9abc51a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_alert.png b/core/res/res/drawable-xhdpi/ic_dialog_alert.png
new file mode 100644
index 0000000..2834f35
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_alert.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_dark.png b/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_dark.png
new file mode 100644
index 0000000..f906e2a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_light.png b/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_light.png
new file mode 100644
index 0000000..a99f062
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_alert_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_close_normal_holo.png b/core/res/res/drawable-xhdpi/ic_dialog_close_normal_holo.png
new file mode 100644
index 0000000..ea3bb48
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_close_normal_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_close_pressed_holo.png b/core/res/res/drawable-xhdpi/ic_dialog_close_pressed_holo.png
new file mode 100644
index 0000000..5475ef9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_close_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_dialer.png b/core/res/res/drawable-xhdpi/ic_dialog_dialer.png
new file mode 100644
index 0000000..18f6880
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_dialer.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_email.png b/core/res/res/drawable-xhdpi/ic_dialog_email.png
new file mode 100644
index 0000000..1c1eae6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_email.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_focused_holo.png b/core/res/res/drawable-xhdpi/ic_dialog_focused_holo.png
new file mode 100644
index 0000000..000d885
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_focused_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_info.png b/core/res/res/drawable-xhdpi/ic_dialog_info.png
new file mode 100644
index 0000000..478dcc1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_info.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_map.png b/core/res/res/drawable-xhdpi/ic_dialog_map.png
new file mode 100644
index 0000000..e25b819
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_map.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_time.png b/core/res/res/drawable-xhdpi/ic_dialog_time.png
new file mode 100644
index 0000000..10c9d72
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_time.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_usb.png b/core/res/res/drawable-xhdpi/ic_dialog_usb.png
new file mode 100644
index 0000000..5893bff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_dialog_usb.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_emergency.png b/core/res/res/drawable-xhdpi/ic_emergency.png
new file mode 100644
index 0000000..f5df6cd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_go.png b/core/res/res/drawable-xhdpi/ic_go.png
new file mode 100644
index 0000000..1e2dcfa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_go.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_go_search_api_holo_light.png b/core/res/res/drawable-xhdpi/ic_go_search_api_holo_light.png
new file mode 100644
index 0000000..f12eafc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_go_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_input_add.png b/core/res/res/drawable-xhdpi/ic_input_add.png
new file mode 100644
index 0000000..f1242f5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_input_add.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_input_delete.png b/core/res/res/drawable-xhdpi/ic_input_delete.png
new file mode 100644
index 0000000..34c5f39
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_input_get.png b/core/res/res/drawable-xhdpi/ic_input_get.png
new file mode 100644
index 0000000..7f9e9bf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_input_get.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png
new file mode 100644
index 0000000..eedb7fd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png
new file mode 100644
index 0000000..829973e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png
new file mode 100644
index 0000000..e8336d0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png b/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png
new file mode 100644
index 0000000..7cab5f5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png
new file mode 100644
index 0000000..65aa39b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png
new file mode 100644
index 0000000..ce8f3a7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png b/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png
new file mode 100644
index 0000000..5d6fb7b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png
new file mode 100644
index 0000000..6fe8b77
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_launcher_android.png b/core/res/res/drawable-xhdpi/ic_launcher_android.png
new file mode 100644
index 0000000..b1097d6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_launcher_android.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_airplane_mode.png b/core/res/res/drawable-xhdpi/ic_lock_airplane_mode.png
new file mode 100644
index 0000000..dc7a917
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_airplane_mode.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off.png
new file mode 100644
index 0000000..497ca2b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_idle_charging.png b/core/res/res/drawable-xhdpi/ic_lock_idle_charging.png
new file mode 100644
index 0000000..14c8da4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_idle_lock.png b/core/res/res/drawable-xhdpi/ic_lock_idle_lock.png
new file mode 100644
index 0000000..38b6786
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-xhdpi/ic_lock_idle_low_battery.png
new file mode 100644
index 0000000..19af7e9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_lock.png b/core/res/res/drawable-xhdpi/ic_lock_lock.png
new file mode 100644
index 0000000..086a0ca
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_lock.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_power_off.png b/core/res/res/drawable-xhdpi/ic_lock_power_off.png
new file mode 100644
index 0000000..530236c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_power_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_ringer_off.png b/core/res/res/drawable-xhdpi/ic_lock_ringer_off.png
new file mode 100644
index 0000000..dff2c89
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_ringer_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_ringer_on.png b/core/res/res/drawable-xhdpi/ic_lock_ringer_on.png
new file mode 100644
index 0000000..98341b0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_ringer_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_silent_mode.png b/core/res/res/drawable-xhdpi/ic_lock_silent_mode.png
new file mode 100644
index 0000000..1ef944f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_silent_mode.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_silent_mode_off.png b/core/res/res/drawable-xhdpi/ic_lock_silent_mode_off.png
new file mode 100644
index 0000000..8fd4a57
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_silent_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_silent_mode_vibrate.png b/core/res/res/drawable-xhdpi/ic_lock_silent_mode_vibrate.png
new file mode 100644
index 0000000..921f74e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_silent_mode_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position.png b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position.png
new file mode 100644
index 0000000..6e2e6cb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim1.png b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim1.png
new file mode 100644
index 0000000..238a8d9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim2.png b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim2.png
new file mode 100644
index 0000000..e69d878
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim3.png b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim3.png
new file mode 100644
index 0000000..2c362f0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_maps_indicator_current_position_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_embed_play.png b/core/res/res/drawable-xhdpi/ic_media_embed_play.png
new file mode 100644
index 0000000..b26f565
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_embed_play.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_ff.png b/core/res/res/drawable-xhdpi/ic_media_ff.png
new file mode 100644
index 0000000..60f7e92
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_ff.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_fullscreen.png b/core/res/res/drawable-xhdpi/ic_media_fullscreen.png
new file mode 100644
index 0000000..9526218
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_fullscreen.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_next.png b/core/res/res/drawable-xhdpi/ic_media_next.png
new file mode 100644
index 0000000..9835c63
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_pause.png b/core/res/res/drawable-xhdpi/ic_media_pause.png
new file mode 100644
index 0000000..8614bff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_pause.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_play.png b/core/res/res/drawable-xhdpi/ic_media_play.png
new file mode 100644
index 0000000..d93e824
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_play.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_previous.png b/core/res/res/drawable-xhdpi/ic_media_previous.png
new file mode 100644
index 0000000..5df5987
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_rew.png b/core/res/res/drawable-xhdpi/ic_media_rew.png
new file mode 100644
index 0000000..167d10e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_rew.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_stop.png b/core/res/res/drawable-xhdpi/ic_media_stop.png
new file mode 100644
index 0000000..00159aa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_stop.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_video_poster.png b/core/res/res/drawable-xhdpi/ic_media_video_poster.png
new file mode 100644
index 0000000..4aa4904
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_media_video_poster.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_clear_all.png b/core/res/res/drawable-xhdpi/ic_notification_clear_all.png
new file mode 100644
index 0000000..5c553cf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_notification_clear_all.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_ime_default.png b/core/res/res/drawable-xhdpi/ic_notification_ime_default.png
new file mode 100644
index 0000000..7eda69e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_notification_ime_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_overlay.9.png b/core/res/res/drawable-xhdpi/ic_notification_overlay.9.png
new file mode 100644
index 0000000..010852f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_notification_overlay.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_partial_secure.png b/core/res/res/drawable-xhdpi/ic_partial_secure.png
new file mode 100644
index 0000000..2dfbb1e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_partial_secure.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_disk_full.png b/core/res/res/drawable-xhdpi/ic_popup_disk_full.png
new file mode 100644
index 0000000..4313fdc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_reminder.png b/core/res/res/drawable-xhdpi/ic_popup_reminder.png
new file mode 100644
index 0000000..4a03a1b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_reminder.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_1.png b/core/res/res/drawable-xhdpi/ic_popup_sync_1.png
new file mode 100644
index 0000000..48f8d53
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_2.png b/core/res/res/drawable-xhdpi/ic_popup_sync_2.png
new file mode 100644
index 0000000..880c202
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_3.png b/core/res/res/drawable-xhdpi/ic_popup_sync_3.png
new file mode 100644
index 0000000..eb6d03c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_4.png b/core/res/res/drawable-xhdpi/ic_popup_sync_4.png
new file mode 100644
index 0000000..02a4d93
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_5.png b/core/res/res/drawable-xhdpi/ic_popup_sync_5.png
new file mode 100644
index 0000000..caaf598
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_5.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_popup_sync_6.png b/core/res/res/drawable-xhdpi/ic_popup_sync_6.png
new file mode 100644
index 0000000..e662ab2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_popup_sync_6.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_search.png b/core/res/res/drawable-xhdpi/ic_search.png
new file mode 100644
index 0000000..998f91b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_search.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_search_api_holo_light.png b/core/res/res/drawable-xhdpi/ic_search_api_holo_light.png
new file mode 100644
index 0000000..a4cdf1c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_search_category_default.png b/core/res/res/drawable-xhdpi/ic_search_category_default.png
new file mode 100644
index 0000000..7d5170e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_search_category_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_secure.png b/core/res/res/drawable-xhdpi/ic_secure.png
new file mode 100644
index 0000000..9e24028
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_secure.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_text_dot.png b/core/res/res/drawable-xhdpi/ic_text_dot.png
new file mode 100644
index 0000000..d316f9a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_text_dot.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_vibrate.png b/core/res/res/drawable-xhdpi/ic_vibrate.png
new file mode 100644
index 0000000..5d0724a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_vibrate_small.png b/core/res/res/drawable-xhdpi/ic_vibrate_small.png
new file mode 100644
index 0000000..6ee6fd8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_vibrate_small.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_voice_search.png b/core/res/res/drawable-xhdpi/ic_voice_search.png
new file mode 100644
index 0000000..c625a36
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_voice_search.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_voice_search_api_holo_light.png b/core/res/res/drawable-xhdpi/ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000..c332ba0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume.png b/core/res/res/drawable-xhdpi/ic_volume.png
new file mode 100644
index 0000000..f6a457d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume_bluetooth_ad2p.png b/core/res/res/drawable-xhdpi/ic_volume_bluetooth_ad2p.png
new file mode 100644
index 0000000..cbcdf33
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume_bluetooth_ad2p.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume_bluetooth_in_call.png b/core/res/res/drawable-xhdpi/ic_volume_bluetooth_in_call.png
new file mode 100644
index 0000000..9c7e906
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume_bluetooth_in_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume_off.png b/core/res/res/drawable-xhdpi/ic_volume_off.png
new file mode 100644
index 0000000..e094514
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume_off_small.png b/core/res/res/drawable-xhdpi/ic_volume_off_small.png
new file mode 100644
index 0000000..bc29608
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume_off_small.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_volume_small.png b/core/res/res/drawable-xhdpi/ic_volume_small.png
new file mode 100644
index 0000000..9d6d920
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_volume_small.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/icon_highlight_rectangle.9.png b/core/res/res/drawable-xhdpi/icon_highlight_rectangle.9.png
new file mode 100644
index 0000000..b26180d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/icon_highlight_rectangle.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/icon_highlight_square.9.png b/core/res/res/drawable-xhdpi/icon_highlight_square.9.png
new file mode 100644
index 0000000..f45f1c5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/icon_highlight_square.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ime_qwerty.png b/core/res/res/drawable-xhdpi/ime_qwerty.png
new file mode 100644
index 0000000..42c9e5a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ime_qwerty.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up.png
new file mode 100644
index 0000000..a89b8d5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up_holo.png
new file mode 100644
index 0000000..66c1b58
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_green_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 0000000..2d34cf6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up_holo.png
new file mode 100644
index 0000000..b5f807f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png
new file mode 100644
index 0000000..997d6a5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png
new file mode 100644
index 0000000..2eb69f6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_green.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_green.png
new file mode 100644
index 0000000..c106f76
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_green.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_yellow.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_yellow.png
new file mode 100644
index 0000000..7657f74
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_left_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_long_middle_yellow.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_middle_yellow.png
new file mode 100644
index 0000000..a90926d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_middle_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_red.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_red.png
new file mode 100644
index 0000000..3a00c56
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_red.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_yellow.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_yellow.png
new file mode 100644
index 0000000..113daaa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_long_right_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left.png
new file mode 100644
index 0000000..ac62915
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left_and_right.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left_and_right.png
new file mode 100644
index 0000000..0efed7a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_left_and_right.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_arrow_short_right.png b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_right.png
new file mode 100644
index 0000000..859998b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_arrow_short_right.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_bg.png b/core/res/res/drawable-xhdpi/jog_dial_bg.png
new file mode 100644
index 0000000..61fcb46
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_bg.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_dimple.png b/core/res/res/drawable-xhdpi/jog_dial_dimple.png
new file mode 100644
index 0000000..3ab2ab6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_dimple.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/jog_dial_dimple_dim.png b/core/res/res/drawable-xhdpi/jog_dial_dimple_dim.png
new file mode 100644
index 0000000..720ff80
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/jog_dial_dimple_dim.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_accessory_bg_landscape.9.png b/core/res/res/drawable-xhdpi/keyboard_accessory_bg_landscape.9.png
new file mode 100644
index 0000000..e534908
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_accessory_bg_landscape.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_background.9.png b/core/res/res/drawable-xhdpi/keyboard_background.9.png
new file mode 100644
index 0000000..33d8519
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_key_feedback_background.9.png b/core/res/res/drawable-xhdpi/keyboard_key_feedback_background.9.png
new file mode 100644
index 0000000..6e8584b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_key_feedback_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_key_feedback_more_background.9.png b/core/res/res/drawable-xhdpi/keyboard_key_feedback_more_background.9.png
new file mode 100644
index 0000000..d983a95
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_key_feedback_more_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_popup_panel_background.9.png b/core/res/res/drawable-xhdpi/keyboard_popup_panel_background.9.png
new file mode 100644
index 0000000..d9f4819
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_popup_panel_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/keyboard_popup_panel_trans_background.9.png b/core/res/res/drawable-xhdpi/keyboard_popup_panel_trans_background.9.png
new file mode 100644
index 0000000..9a19f78
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/keyboard_popup_panel_trans_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/light_header.9.png b/core/res/res/drawable-xhdpi/light_header.9.png
new file mode 100644
index 0000000..029dd2a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/light_header.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000..a8ad54d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_pressed_holo_dark.9.png
index 80c93da..e4b3393 100644
--- a/core/res/res/drawable-xhdpi/list_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/list_pressed_holo_light.9.png
index 80c93da..e4b3393 100644
--- a/core/res/res/drawable-xhdpi/list_pressed_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_section_divider_holo_dark.9.png
index 76fd13c..942d72e 100644
--- a/core/res/res/drawable-xhdpi/list_section_divider_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-xhdpi/list_section_divider_holo_light.9.png
index d8fd9e3..4ad088f 100644
--- a/core/res/res/drawable-xhdpi/list_section_divider_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_section_header_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_section_header_holo_dark.9.png
new file mode 100644
index 0000000..4412331
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_section_header_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_section_header_holo_light.9.png b/core/res/res/drawable-xhdpi/list_section_header_holo_light.9.png
new file mode 100644
index 0000000..d0cba8d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_section_header_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selected_holo_dark.9.png
index 3e8dac8..4375032 100644
--- a/core/res/res/drawable-xhdpi/list_selected_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selected_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selected_holo_light.9.png
index 3e8dac8..4375032 100644
--- a/core/res/res/drawable-xhdpi/list_selected_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_activated_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selector_activated_holo_dark.9.png
new file mode 100644
index 0000000..f176c7f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_activated_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_activated_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selector_activated_holo_light.9.png
new file mode 100644
index 0000000..b13f340
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_activated_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_default.9.png b/core/res/res/drawable-xhdpi/list_selector_background_default.9.png
new file mode 100644
index 0000000..7261e96
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_default_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_default_light.9.png
new file mode 100644
index 0000000..1fc96e2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_default_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png
new file mode 100644
index 0000000..d599976
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_disabled_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_disabled_light.9.png
new file mode 100644
index 0000000..9b22eff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_disabled_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_focus.9.png b/core/res/res/drawable-xhdpi/list_selector_background_focus.9.png
new file mode 100644
index 0000000..17987f3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_focused.9.png b/core/res/res/drawable-xhdpi/list_selector_background_focused.9.png
new file mode 100644
index 0000000..c8e7681
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_focused_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_focused_light.9.png
new file mode 100644
index 0000000..c8e7681
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_focused_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_focused_selected.9.png b/core/res/res/drawable-xhdpi/list_selector_background_focused_selected.9.png
new file mode 100644
index 0000000..f56a2dc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_focused_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_longpress.9.png b/core/res/res/drawable-xhdpi/list_selector_background_longpress.9.png
new file mode 100644
index 0000000..5a64592
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_longpress.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_longpress_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_longpress_light.9.png
new file mode 100644
index 0000000..ee50a53
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_longpress_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_pressed.9.png b/core/res/res/drawable-xhdpi/list_selector_background_pressed.9.png
new file mode 100644
index 0000000..1593577
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_pressed_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_pressed_light.9.png
new file mode 100644
index 0000000..a9a293c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_pressed_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_selected.9.png b/core/res/res/drawable-xhdpi/list_selector_background_selected.9.png
new file mode 100644
index 0000000..78358fe
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_selected_light.9.png b/core/res/res/drawable-xhdpi/list_selector_background_selected_light.9.png
new file mode 100644
index 0000000..7349da5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_background_selected_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000..88726b6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000..c6a7d4d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selector_focused_holo_dark.9.png
new file mode 100644
index 0000000..d9a26f4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selector_focused_holo_light.9.png
new file mode 100644
index 0000000..7ea2b21
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_dark.9.png
new file mode 100644
index 0000000..7033b0e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_light.9.png
new file mode 100644
index 0000000..e638675
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_multiselect_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png
new file mode 100644
index 0000000..df19701
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/list_selector_pressed_holo_light.9.png
new file mode 100644
index 0000000..6e5a6a9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/list_selector_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/maps_google_logo.png b/core/res/res/drawable-xhdpi/maps_google_logo.png
new file mode 100644
index 0000000..2cd6257
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/maps_google_logo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_background.9.png b/core/res/res/drawable-xhdpi/menu_background.9.png
new file mode 100644
index 0000000..b784f71
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_background_fill_parent_width.9.png b/core/res/res/drawable-xhdpi/menu_background_fill_parent_width.9.png
new file mode 100644
index 0000000..ab43013
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menu_background_fill_parent_width.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_separator.9.png b/core/res/res/drawable-xhdpi/menu_separator.9.png
new file mode 100644
index 0000000..3251f95
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menu_separator.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_submenu_background.9.png b/core/res/res/drawable-xhdpi/menu_submenu_background.9.png
new file mode 100644
index 0000000..54b2be6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menuitem_background_focus.9.png b/core/res/res/drawable-xhdpi/menuitem_background_focus.9.png
new file mode 100644
index 0000000..83e4ae0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menuitem_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menuitem_background_pressed.9.png b/core/res/res/drawable-xhdpi/menuitem_background_pressed.9.png
new file mode 100644
index 0000000..70a000f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menuitem_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menuitem_background_solid_focused.9.png b/core/res/res/drawable-xhdpi/menuitem_background_solid_focused.9.png
new file mode 100644
index 0000000..671e756
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menuitem_background_solid_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menuitem_background_solid_pressed.9.png b/core/res/res/drawable-xhdpi/menuitem_background_solid_pressed.9.png
new file mode 100644
index 0000000..5f334d8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menuitem_background_solid_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menuitem_checkbox_on.png b/core/res/res/drawable-xhdpi/menuitem_checkbox_on.png
new file mode 100644
index 0000000..a7d2ad2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/menuitem_checkbox_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/minitab_lt_focus.9.png b/core/res/res/drawable-xhdpi/minitab_lt_focus.9.png
new file mode 100644
index 0000000..7a0995b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/minitab_lt_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/minitab_lt_press.9.png b/core/res/res/drawable-xhdpi/minitab_lt_press.9.png
new file mode 100644
index 0000000..7602d3e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/minitab_lt_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/minitab_lt_selected.9.png b/core/res/res/drawable-xhdpi/minitab_lt_selected.9.png
new file mode 100644
index 0000000..544fad5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/minitab_lt_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/minitab_lt_unselected.9.png b/core/res/res/drawable-xhdpi/minitab_lt_unselected.9.png
new file mode 100644
index 0000000..bcdb9d7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/minitab_lt_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/minitab_lt_unselected_press.9.png b/core/res/res/drawable-xhdpi/minitab_lt_unselected_press.9.png
new file mode 100644
index 0000000..8aabb89
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/minitab_lt_unselected_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/notify_panel_notification_icon_bg.png b/core/res/res/drawable-xhdpi/notify_panel_notification_icon_bg.png
new file mode 100644
index 0000000..4cc515e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/notify_panel_notification_icon_bg.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_down_disabled.9.png b/core/res/res/drawable-xhdpi/numberpicker_down_disabled.9.png
new file mode 100644
index 0000000..b8220ce
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_down_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_down_disabled_focused.9.png b/core/res/res/drawable-xhdpi/numberpicker_down_disabled_focused.9.png
new file mode 100644
index 0000000..7f4f093
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_down_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_down_normal.9.png b/core/res/res/drawable-xhdpi/numberpicker_down_normal.9.png
new file mode 100644
index 0000000..c10b671
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_down_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_down_pressed.9.png b/core/res/res/drawable-xhdpi/numberpicker_down_pressed.9.png
new file mode 100644
index 0000000..bfae684
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_down_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_down_selected.9.png b/core/res/res/drawable-xhdpi/numberpicker_down_selected.9.png
new file mode 100644
index 0000000..9451630
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_down_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_input_disabled.9.png b/core/res/res/drawable-xhdpi/numberpicker_input_disabled.9.png
new file mode 100644
index 0000000..01cc01a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_input_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_input_normal.9.png b/core/res/res/drawable-xhdpi/numberpicker_input_normal.9.png
new file mode 100644
index 0000000..b4d9c7f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_input_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_input_pressed.9.png b/core/res/res/drawable-xhdpi/numberpicker_input_pressed.9.png
new file mode 100644
index 0000000..5f3d982
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_input_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_input_selected.9.png b/core/res/res/drawable-xhdpi/numberpicker_input_selected.9.png
new file mode 100644
index 0000000..434f05f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_input_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_up_disabled.9.png b/core/res/res/drawable-xhdpi/numberpicker_up_disabled.9.png
new file mode 100644
index 0000000..0c32994
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_up_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_up_disabled_focused.9.png b/core/res/res/drawable-xhdpi/numberpicker_up_disabled_focused.9.png
new file mode 100644
index 0000000..cba1e76
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_up_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_up_normal.9.png b/core/res/res/drawable-xhdpi/numberpicker_up_normal.9.png
new file mode 100644
index 0000000..ee270b4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_up_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_up_pressed.9.png b/core/res/res/drawable-xhdpi/numberpicker_up_pressed.9.png
new file mode 100644
index 0000000..297f77c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_up_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/numberpicker_up_selected.9.png b/core/res/res/drawable-xhdpi/numberpicker_up_selected.9.png
new file mode 100644
index 0000000..e5d5126
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/numberpicker_up_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_background.9.png b/core/res/res/drawable-xhdpi/panel_background.9.png
new file mode 100644
index 0000000..2ceae60
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_bg_holo_dark.9.png b/core/res/res/drawable-xhdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000..0cf7ac8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_bg_holo_light.9.png b/core/res/res/drawable-xhdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000..c171b7c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_picture_frame_bg_focus_blue.9.png b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_focus_blue.9.png
new file mode 100644
index 0000000..8c7b0bd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_focus_blue.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_picture_frame_bg_normal.9.png b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_normal.9.png
new file mode 100644
index 0000000..5477a02
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/panel_picture_frame_bg_pressed_blue.9.png b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_pressed_blue.9.png
new file mode 100644
index 0000000..d79a003
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/panel_picture_frame_bg_pressed_blue.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/password_field_default.9.png b/core/res/res/drawable-xhdpi/password_field_default.9.png
new file mode 100644
index 0000000..cf8329e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/password_field_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/password_keyboard_background_holo.9.png b/core/res/res/drawable-xhdpi/password_keyboard_background_holo.9.png
new file mode 100644
index 0000000..65ea61bc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/password_keyboard_background_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/picture_emergency.png b/core/res/res/drawable-xhdpi/picture_emergency.png
new file mode 100644
index 0000000..08b421e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/picture_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/picture_frame.9.png b/core/res/res/drawable-xhdpi/picture_frame.9.png
new file mode 100644
index 0000000..69ef655
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/picture_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_arrow.png b/core/res/res/drawable-xhdpi/pointer_arrow.png
new file mode 100644
index 0000000..957eb39
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/pointer_arrow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_anchor.png b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
new file mode 100644
index 0000000..ad41c97
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_hover.png b/core/res/res/drawable-xhdpi/pointer_spot_hover.png
new file mode 100644
index 0000000..e9b98f6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/pointer_spot_hover.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_touch.png b/core/res/res/drawable-xhdpi/pointer_spot_touch.png
new file mode 100644
index 0000000..e10d998
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/pointer_spot_touch.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error.9.png b/core/res/res/drawable-xhdpi/popup_inline_error.9.png
new file mode 100644
index 0000000..2784c30
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/popup_inline_error.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_above.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_above.9.png
new file mode 100644
index 0000000..f26be8c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/popup_inline_error_above.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pressed_application_background_static.png b/core/res/res/drawable-xhdpi/pressed_application_background_static.png
new file mode 100644
index 0000000..b70de9e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/pressed_application_background_static.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png
new file mode 100644
index 0000000..345f5d3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png
new file mode 100644
index 0000000..c843ef3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
index dc8711f..097160b 100644
--- a/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
index dc8711f..097160b 100644
--- a/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
index 39a168f..205b66e 100644
--- a/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
index 39a168f..205b66e 100644
--- a/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate1.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate1.png
new file mode 100644
index 0000000..7f01aa4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate2.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate2.png
new file mode 100644
index 0000000..3105385
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progressbar_indeterminate3.png b/core/res/res/drawable-xhdpi/progressbar_indeterminate3.png
new file mode 100644
index 0000000..248b49a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/progressbar_indeterminate3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_dark.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_dark.9.png
new file mode 100644
index 0000000..622095b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png
new file mode 100644
index 0000000..bf8cf4c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_dark.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_dark.9.png
new file mode 100644
index 0000000..3e155de
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png
new file mode 100644
index 0000000..1c1974a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_dark.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_dark.9.png
new file mode 100644
index 0000000..52d95af
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png
new file mode 100644
index 0000000..2613e0d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowup_left_right_holo_dark.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_right_holo_dark.9.png
new file mode 100644
index 0000000..b7986e7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowup_left_right_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png b/core/res/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png
new file mode 100644
index 0000000..e964b39
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
index 8e2eb66..e258284a 100644
--- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
+++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
index 89da95e..5c4bbf5 100644
--- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
+++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/radiobutton_off_background.png b/core/res/res/drawable-xhdpi/radiobutton_off_background.png
new file mode 100644
index 0000000..384442f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/radiobutton_off_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/radiobutton_on_background.png b/core/res/res/drawable-xhdpi/radiobutton_on_background.png
new file mode 100644
index 0000000..c65e4ff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/radiobutton_on_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_big_half.png b/core/res/res/drawable-xhdpi/rate_star_big_half.png
new file mode 100644
index 0000000..68c77a8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_big_half.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_big_off.png b/core/res/res/drawable-xhdpi/rate_star_big_off.png
new file mode 100644
index 0000000..2389fff
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_big_on.png b/core/res/res/drawable-xhdpi/rate_star_big_on.png
new file mode 100644
index 0000000..39467dd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_med_half.png b/core/res/res/drawable-xhdpi/rate_star_med_half.png
new file mode 100644
index 0000000..6c60114
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_med_half.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_med_off.png b/core/res/res/drawable-xhdpi/rate_star_med_off.png
new file mode 100644
index 0000000..3428a3b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_med_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_med_on.png b/core/res/res/drawable-xhdpi/rate_star_med_on.png
new file mode 100644
index 0000000..0acddec
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_med_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_small_half.png b/core/res/res/drawable-xhdpi/rate_star_small_half.png
new file mode 100644
index 0000000..b7a5709
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_small_half.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_small_off.png b/core/res/res/drawable-xhdpi/rate_star_small_off.png
new file mode 100644
index 0000000..2516ccc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_small_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/rate_star_small_on.png b/core/res/res/drawable-xhdpi/rate_star_small_on.png
new file mode 100644
index 0000000..327fd1f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/rate_star_small_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/recent_dialog_background.9.png b/core/res/res/drawable-xhdpi/recent_dialog_background.9.png
new file mode 100644
index 0000000..867e715
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/recent_dialog_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/reticle.png b/core/res/res/drawable-xhdpi/reticle.png
new file mode 100644
index 0000000..c28b70d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/reticle.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
index 328bd1e..073ff4c 100644
--- a/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
index dcc4221..4c7b0aac 100644
--- a/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
index 80e4400..a217a90 100644
--- a/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
index af96c43..551fb0a 100644
--- a/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/search_dropdown_background.9.png b/core/res/res/drawable-xhdpi/search_dropdown_background.9.png
new file mode 100644
index 0000000..52761a7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/search_dropdown_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/search_plate.9.png b/core/res/res/drawable-xhdpi/search_plate.9.png
new file mode 100644
index 0000000..2ad7615d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/search_plate.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/search_plate_global.9.png b/core/res/res/drawable-xhdpi/search_plate_global.9.png
new file mode 100644
index 0000000..2c935ae
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/search_plate_global.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/seek_thumb_normal.png b/core/res/res/drawable-xhdpi/seek_thumb_normal.png
new file mode 100644
index 0000000..fb21fcb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/seek_thumb_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/seek_thumb_pressed.png b/core/res/res/drawable-xhdpi/seek_thumb_pressed.png
new file mode 100644
index 0000000..d3cb25a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/seek_thumb_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/seek_thumb_selected.png b/core/res/res/drawable-xhdpi/seek_thumb_selected.png
new file mode 100644
index 0000000..8227c1f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/seek_thumb_selected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/settings_header_raw.9.png b/core/res/res/drawable-xhdpi/settings_header_raw.9.png
new file mode 100644
index 0000000..41e6c31
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/settings_header_raw.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png
index 074f2d4..5e7551d 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png
index f8c12cf..f4586f8 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png
index cf01901..86d369d 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png
index 71f4f11..1c4983b 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png
index c591620..ed69545 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png
index c591620..ed69545 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png
index 30caa29..9ee1f8c 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png
index 7ee4c7f..e3e8656 100644
--- a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png
index 06b6dc7..fab743d 100644
--- a/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png
index aa32bcf..9987f74 100644
--- a/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
index ba25eb04..6dcd2d4 100644
--- a/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
index 7a015ba..bfddedb 100644
--- a/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_dropdown_background_down.9.png b/core/res/res/drawable-xhdpi/spinner_dropdown_background_down.9.png
new file mode 100644
index 0000000..b435218
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/spinner_dropdown_background_down.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_dropdown_background_up.9.png b/core/res/res/drawable-xhdpi/spinner_dropdown_background_up.9.png
new file mode 100644
index 0000000..a45c761
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/spinner_dropdown_background_up.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
index c6aad24..d80fa37 100644
--- a/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png
index c6aad24..d80fa37 100644
--- a/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_normal.9.png b/core/res/res/drawable-xhdpi/spinner_normal.9.png
new file mode 100644
index 0000000..71b65dd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/spinner_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_press.9.png b/core/res/res/drawable-xhdpi/spinner_press.9.png
new file mode 100644
index 0000000..d7233ba
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/spinner_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
index a0a7867..c279396 100644
--- a/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
index 85a3cae..d75deda 100644
--- a/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_select.9.png b/core/res/res/drawable-xhdpi/spinner_select.9.png
new file mode 100644
index 0000000..a1b11e0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/spinner_select.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/star_big_off.png b/core/res/res/drawable-xhdpi/star_big_off.png
new file mode 100644
index 0000000..8a17843
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/star_big_on.png b/core/res/res/drawable-xhdpi/star_big_on.png
new file mode 100644
index 0000000..84f0596
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/star_off.png b/core/res/res/drawable-xhdpi/star_off.png
new file mode 100644
index 0000000..010ef9b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/star_off.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/star_on.png b/core/res/res/drawable-xhdpi/star_on.png
new file mode 100644
index 0000000..01e077a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/star_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_ecb_mode.png b/core/res/res/drawable-xhdpi/stat_ecb_mode.png
new file mode 100644
index 0000000..ce17494
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_ecb_mode.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_call_mute.png b/core/res/res/drawable-xhdpi/stat_notify_call_mute.png
new file mode 100644
index 0000000..4135fea
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_car_mode.png b/core/res/res/drawable-xhdpi/stat_notify_car_mode.png
new file mode 100644
index 0000000..1f3a9cc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_chat.png b/core/res/res/drawable-xhdpi/stat_notify_chat.png
new file mode 100644
index 0000000..f860fdc1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_disk_full.png b/core/res/res/drawable-xhdpi/stat_notify_disk_full.png
new file mode 100644
index 0000000..3fa330e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_email_generic.png b/core/res/res/drawable-xhdpi/stat_notify_email_generic.png
new file mode 100644
index 0000000..07d297f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_error.png b/core/res/res/drawable-xhdpi/stat_notify_error.png
new file mode 100644
index 0000000..c7ac11f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_gmail.png b/core/res/res/drawable-xhdpi/stat_notify_gmail.png
new file mode 100644
index 0000000..e1efa9b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_missed_call.png b/core/res/res/drawable-xhdpi/stat_notify_missed_call.png
new file mode 100644
index 0000000..4fab796
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_more.png b/core/res/res/drawable-xhdpi/stat_notify_more.png
new file mode 100644
index 0000000..76c2c76
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_more.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sdcard.png b/core/res/res/drawable-xhdpi/stat_notify_sdcard.png
new file mode 100644
index 0000000..7201213
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-xhdpi/stat_notify_sdcard_prepare.png
new file mode 100644
index 0000000..648893b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-xhdpi/stat_notify_sdcard_usb.png
new file mode 100644
index 0000000..abd8b6e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-xhdpi/stat_notify_sim_toolkit.png
new file mode 100644
index 0000000..9e1df72
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sync.png b/core/res/res/drawable-xhdpi/stat_notify_sync.png
new file mode 100644
index 0000000..b3bf21f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-xhdpi/stat_notify_sync_anim0.png
new file mode 100644
index 0000000..b3bf21f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_sync_error.png b/core/res/res/drawable-xhdpi/stat_notify_sync_error.png
new file mode 100644
index 0000000..33582ef
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_voicemail.png b/core/res/res/drawable-xhdpi/stat_notify_voicemail.png
new file mode 100644
index 0000000..fd88ac2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-xhdpi/stat_notify_wifi_in_range.png
new file mode 100644
index 0000000..3a2e070
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_adb.png b/core/res/res/drawable-xhdpi/stat_sys_adb.png
new file mode 100644
index 0000000..01eb61d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_0.png b/core/res/res/drawable-xhdpi/stat_sys_battery_0.png
new file mode 100644
index 0000000..50aa720
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_100.png b/core/res/res/drawable-xhdpi/stat_sys_battery_100.png
new file mode 100644
index 0000000..0aefc68
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_100.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_15.png b/core/res/res/drawable-xhdpi/stat_sys_battery_15.png
new file mode 100644
index 0000000..686ce51
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_15.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_28.png b/core/res/res/drawable-xhdpi/stat_sys_battery_28.png
new file mode 100644
index 0000000..031546b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_28.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_43.png b/core/res/res/drawable-xhdpi/stat_sys_battery_43.png
new file mode 100644
index 0000000..d386987
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_43.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_57.png b/core/res/res/drawable-xhdpi/stat_sys_battery_57.png
new file mode 100644
index 0000000..51115df
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_57.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_71.png b/core/res/res/drawable-xhdpi/stat_sys_battery_71.png
new file mode 100644
index 0000000..ca4fd80
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_71.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_85.png b/core/res/res/drawable-xhdpi/stat_sys_battery_85.png
new file mode 100644
index 0000000..f32e9e1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_85.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim0.png
new file mode 100644
index 0000000..1d9efe7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim100.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim100.png
new file mode 100644
index 0000000..c5debbf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim100.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim15.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim15.png
new file mode 100644
index 0000000..0b11fb1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim15.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim28.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim28.png
new file mode 100644
index 0000000..3d06ee2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim28.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim43.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim43.png
new file mode 100644
index 0000000..ea601e1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim43.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim57.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim57.png
new file mode 100644
index 0000000..843b0b4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim57.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim71.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim71.png
new file mode 100644
index 0000000..213e3f1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim71.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim85.png b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim85.png
new file mode 100644
index 0000000..ca5c415
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_charge_anim85.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_battery_unknown.png b/core/res/res/drawable-xhdpi/stat_sys_battery_unknown.png
new file mode 100644
index 0000000..7f156be
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_battery_unknown.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-xhdpi/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..68cac47
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_usb.png b/core/res/res/drawable-xhdpi/stat_sys_data_usb.png
new file mode 100644
index 0000000..57c1099
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim0.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim0.png
new file mode 100644
index 0000000..73cbc96
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim1.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim1.png
new file mode 100644
index 0000000..3e39abb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim2.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim2.png
new file mode 100644
index 0000000..fc9b0de
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim3.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim3.png
new file mode 100644
index 0000000..94bc012
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim4.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim4.png
new file mode 100644
index 0000000..e6b5857
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_download_anim5.png b/core/res/res/drawable-xhdpi/stat_sys_download_anim5.png
new file mode 100644
index 0000000..f1df0c8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_gps_on.png b/core/res/res/drawable-xhdpi/stat_sys_gps_on.png
new file mode 100644
index 0000000..a7408d4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_headset.png b/core/res/res/drawable-xhdpi/stat_sys_headset.png
new file mode 100644
index 0000000..4d447ab
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_headset.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_phone_call.png b/core/res/res/drawable-xhdpi/stat_sys_phone_call.png
new file mode 100644
index 0000000..5aee387
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_phone_call_forward.png b/core/res/res/drawable-xhdpi/stat_sys_phone_call_forward.png
new file mode 100644
index 0000000..15c8dda
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_phone_call_on_hold.png b/core/res/res/drawable-xhdpi/stat_sys_phone_call_on_hold.png
new file mode 100644
index 0000000..d5a1531
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png
new file mode 100644
index 0000000..99ce378
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png
new file mode 100644
index 0000000..e430114
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png
new file mode 100644
index 0000000..4241896
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png
new file mode 100644
index 0000000..3195fee
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png
new file mode 100644
index 0000000..3cb5463
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png
new file mode 100644
index 0000000..5f9a46b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png
new file mode 100644
index 0000000..da5d09c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png
new file mode 100644
index 0000000..8cd6e08
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png
new file mode 100644
index 0000000..6c68680
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png
new file mode 100644
index 0000000..5cf6e9c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_secure.png b/core/res/res/drawable-xhdpi/stat_sys_secure.png
new file mode 100644
index 0000000..bef2fd7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png
new file mode 100644
index 0000000..28815f1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png
new file mode 100644
index 0000000..1643c10
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png
new file mode 100644
index 0000000..0f5a147
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png
new file mode 100644
index 0000000..d37f761
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png
new file mode 100644
index 0000000..f4b835f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png
new file mode 100644
index 0000000..dc5196c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png
new file mode 100644
index 0000000..5da3b3a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png
new file mode 100644
index 0000000..d17890d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png
new file mode 100644
index 0000000..2dbe7599
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png
new file mode 100644
index 0000000..796f9ed
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png b/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png
new file mode 100644
index 0000000..3ac1b88
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_bluetooth.png b/core/res/res/drawable-xhdpi/stat_sys_tether_bluetooth.png
new file mode 100644
index 0000000..c3e2acf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_tether_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_general.png b/core/res/res/drawable-xhdpi/stat_sys_tether_general.png
new file mode 100644
index 0000000..a1c200e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_tether_general.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_usb.png b/core/res/res/drawable-xhdpi/stat_sys_tether_usb.png
new file mode 100644
index 0000000..a3008b8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_tether_usb.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_wifi.png b/core/res/res/drawable-xhdpi/stat_sys_tether_wifi.png
new file mode 100644
index 0000000..1fd3139
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_tether_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_throttled.png b/core/res/res/drawable-xhdpi/stat_sys_throttled.png
new file mode 100644
index 0000000..043a1e3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim0.png
new file mode 100644
index 0000000..2fbdaf8b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim1.png
new file mode 100644
index 0000000..cd0ca73
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim2.png
new file mode 100644
index 0000000..e443f45
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim3.png
new file mode 100644
index 0000000..8fb42f8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim4.png
new file mode 100644
index 0000000..2fb1802
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-xhdpi/stat_sys_upload_anim5.png
new file mode 100644
index 0000000..c1d9db5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call.png b/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call.png
new file mode 100644
index 0000000..af80481
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call_on_hold.png b/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call_on_hold.png
new file mode 100644
index 0000000..2ba1095
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_vp_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_warning.png b/core/res/res/drawable-xhdpi/stat_sys_warning.png
new file mode 100644
index 0000000..c7ac11f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_background.png b/core/res/res/drawable-xhdpi/status_bar_background.png
new file mode 100644
index 0000000..529904f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_background.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_header_background.9.png b/core/res/res/drawable-xhdpi/status_bar_header_background.9.png
new file mode 100644
index 0000000..d03720f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_item_app_background_normal.9.png b/core/res/res/drawable-xhdpi/status_bar_item_app_background_normal.9.png
new file mode 100644
index 0000000..7f3d9db
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_item_background_focus.9.png b/core/res/res/drawable-xhdpi/status_bar_item_background_focus.9.png
new file mode 100644
index 0000000..5d77613d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_item_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_item_background_normal.9.png b/core/res/res/drawable-xhdpi/status_bar_item_background_normal.9.png
new file mode 100644
index 0000000..3b4959f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_item_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/status_bar_item_background_pressed.9.png b/core/res/res/drawable-xhdpi/status_bar_item_background_pressed.9.png
new file mode 100644
index 0000000..70a000f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/status_bar_item_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/statusbar_background.9.png b/core/res/res/drawable-xhdpi/statusbar_background.9.png
new file mode 100644
index 0000000..e1a3a9b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/statusbar_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/submenu_arrow_nofocus.png b/core/res/res/drawable-xhdpi/submenu_arrow_nofocus.png
new file mode 100644
index 0000000..5e64030
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/submenu_arrow_nofocus.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_action_add.png b/core/res/res/drawable-xhdpi/sym_action_add.png
new file mode 100644
index 0000000..b0562c4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_action_add.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_action_call.png b/core/res/res/drawable-xhdpi/sym_action_call.png
new file mode 100644
index 0000000..e0de1e0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_action_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_action_chat.png b/core/res/res/drawable-xhdpi/sym_action_chat.png
new file mode 100644
index 0000000..c0f2624
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_action_chat.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_action_email.png b/core/res/res/drawable-xhdpi/sym_action_email.png
new file mode 100644
index 0000000..343a9c1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_action_email.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_app_on_sd_unavailable_icon.png b/core/res/res/drawable-xhdpi/sym_app_on_sd_unavailable_icon.png
new file mode 100644
index 0000000..e4e6a5a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_app_on_sd_unavailable_icon.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_call_incoming.png b/core/res/res/drawable-xhdpi/sym_call_incoming.png
new file mode 100644
index 0000000..738390a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_call_incoming.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_call_missed.png b/core/res/res/drawable-xhdpi/sym_call_missed.png
new file mode 100644
index 0000000..2eb7aa4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_call_missed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_call_outgoing.png b/core/res/res/drawable-xhdpi/sym_call_outgoing.png
new file mode 100644
index 0000000..77f21e6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_call_outgoing.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_contact_card.png b/core/res/res/drawable-xhdpi/sym_contact_card.png
new file mode 100644
index 0000000..aa65f1c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_contact_card.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_def_app_icon.png b/core/res/res/drawable-xhdpi/sym_def_app_icon.png
new file mode 100644
index 0000000..f360399
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_def_app_icon.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_delete.png b/core/res/res/drawable-xhdpi/sym_keyboard_delete.png
new file mode 100644
index 0000000..ca936d1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_delete_dim.png b/core/res/res/drawable-xhdpi/sym_keyboard_delete_dim.png
new file mode 100644
index 0000000..2dac874
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_delete_dim.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_delete.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_delete.png
new file mode 100644
index 0000000..843cc82
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_ok.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_ok.png
new file mode 100644
index 0000000..425452e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_ok.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_return.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_return.png
new file mode 100644
index 0000000..d19e4dd
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_return.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift.png
new file mode 100644
index 0000000..22df421
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift_locked.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift_locked.png
new file mode 100644
index 0000000..30f3ead
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_feedback_space.png b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_space.png
new file mode 100644
index 0000000..840da36
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_feedback_space.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png b/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png
new file mode 100644
index 0000000..c477cf1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num1.png b/core/res/res/drawable-xhdpi/sym_keyboard_num1.png
new file mode 100644
index 0000000..decd584
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num2.png b/core/res/res/drawable-xhdpi/sym_keyboard_num2.png
new file mode 100644
index 0000000..37948fb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num3.png b/core/res/res/drawable-xhdpi/sym_keyboard_num3.png
new file mode 100644
index 0000000..0e36ff2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num3.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num4.png b/core/res/res/drawable-xhdpi/sym_keyboard_num4.png
new file mode 100644
index 0000000..f469a4a8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num4.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num5.png b/core/res/res/drawable-xhdpi/sym_keyboard_num5.png
new file mode 100644
index 0000000..941f877
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num5.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num6.png b/core/res/res/drawable-xhdpi/sym_keyboard_num6.png
new file mode 100644
index 0000000..eceec55
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num6.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num7.png b/core/res/res/drawable-xhdpi/sym_keyboard_num7.png
new file mode 100644
index 0000000..5b5d205
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num7.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num8.png b/core/res/res/drawable-xhdpi/sym_keyboard_num8.png
new file mode 100644
index 0000000..ea776eb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num8.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num9.png b/core/res/res/drawable-xhdpi/sym_keyboard_num9.png
new file mode 100644
index 0000000..29047fb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_num9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_ok.png b/core/res/res/drawable-xhdpi/sym_keyboard_ok.png
new file mode 100644
index 0000000..08a5eef
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_ok.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_ok_dim.png b/core/res/res/drawable-xhdpi/sym_keyboard_ok_dim.png
new file mode 100644
index 0000000..6a36618
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_ok_dim.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_return.png b/core/res/res/drawable-xhdpi/sym_keyboard_return.png
new file mode 100644
index 0000000..b1e1ce9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_return.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_shift.png b/core/res/res/drawable-xhdpi/sym_keyboard_shift.png
new file mode 100644
index 0000000..6df4080
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_shift.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_shift_locked.png b/core/res/res/drawable-xhdpi/sym_keyboard_shift_locked.png
new file mode 100644
index 0000000..470196e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_space.png b/core/res/res/drawable-xhdpi/sym_keyboard_space.png
new file mode 100644
index 0000000..cce2845
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/sym_keyboard_space.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_bottom_holo.9.png b/core/res/res/drawable-xhdpi/tab_bottom_holo.9.png
new file mode 100644
index 0000000..712dd22
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_bottom_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_focus.9.png b/core/res/res/drawable-xhdpi/tab_focus.9.png
new file mode 100644
index 0000000..737d2c4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_focus_bar_left.9.png b/core/res/res/drawable-xhdpi/tab_focus_bar_left.9.png
new file mode 100644
index 0000000..e879e37
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_focus_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_focus_bar_right.9.png b/core/res/res/drawable-xhdpi/tab_focus_bar_right.9.png
new file mode 100644
index 0000000..e879e37
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_focus_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_press.9.png b/core/res/res/drawable-xhdpi/tab_press.9.png
new file mode 100644
index 0000000..78b43db
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_press_bar_left.9.png b/core/res/res/drawable-xhdpi/tab_press_bar_left.9.png
new file mode 100644
index 0000000..c5f44f3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_press_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_press_bar_right.9.png b/core/res/res/drawable-xhdpi/tab_press_bar_right.9.png
new file mode 100644
index 0000000..c5f44f3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_press_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_pressed_holo.9.png b/core/res/res/drawable-xhdpi/tab_pressed_holo.9.png
new file mode 100644
index 0000000..c221975
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_pressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected.9.png b/core/res/res/drawable-xhdpi/tab_selected.9.png
new file mode 100644
index 0000000..fba5ee4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected_bar_left.9.png b/core/res/res/drawable-xhdpi/tab_selected_bar_left.9.png
new file mode 100644
index 0000000..53efbb4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected_bar_left_v4.9.png b/core/res/res/drawable-xhdpi/tab_selected_bar_left_v4.9.png
new file mode 100644
index 0000000..eec4ddb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected_bar_left_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected_bar_right.9.png b/core/res/res/drawable-xhdpi/tab_selected_bar_right.9.png
new file mode 100644
index 0000000..53efbb4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected_bar_right_v4.9.png b/core/res/res/drawable-xhdpi/tab_selected_bar_right_v4.9.png
new file mode 100644
index 0000000..eec4ddb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected_bar_right_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_selected_v4.9.png b/core/res/res/drawable-xhdpi/tab_selected_v4.9.png
new file mode 100644
index 0000000..e867f90
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_selected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_unselected.9.png b/core/res/res/drawable-xhdpi/tab_unselected.9.png
new file mode 100644
index 0000000..3171701
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/tab_unselected_v4.9.png b/core/res/res/drawable-xhdpi/tab_unselected_v4.9.png
new file mode 100644
index 0000000..60b98073
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/tab_unselected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_cursor_holo_dark.9.png b/core/res/res/drawable-xhdpi/text_cursor_holo_dark.9.png
new file mode 100644
index 0000000..e7bb0d4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_cursor_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_cursor_holo_light.9.png b/core/res/res/drawable-xhdpi/text_cursor_holo_light.9.png
new file mode 100644
index 0000000..f429785
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_cursor_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_edit_side_paste_window.9.png b/core/res/res/drawable-xhdpi/text_edit_side_paste_window.9.png
new file mode 100644
index 0000000..ac10b3e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_edit_side_paste_window.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_select_handle_left.png b/core/res/res/drawable-xhdpi/text_select_handle_left.png
new file mode 100644
index 0000000..6a10560
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_select_handle_middle.png b/core/res/res/drawable-xhdpi/text_select_handle_middle.png
new file mode 100644
index 0000000..71aaa85
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_select_handle_middle.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_select_handle_right.png b/core/res/res/drawable-xhdpi/text_select_handle_right.png
new file mode 100644
index 0000000..5339adc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_default.9.png b/core/res/res/drawable-xhdpi/textfield_default.9.png
new file mode 100644
index 0000000..20b1a09
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_disabled.9.png b/core/res/res/drawable-xhdpi/textfield_disabled.9.png
new file mode 100644
index 0000000..794dce8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_disabled_selected.9.png b/core/res/res/drawable-xhdpi/textfield_disabled_selected.9.png
new file mode 100644
index 0000000..b708d82
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/textfield_focused_holo_dark.9.png
new file mode 100644
index 0000000..3ed03f3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/textfield_focused_holo_light.9.png
new file mode 100644
index 0000000..3ed03f3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_default.9.png b/core/res/res/drawable-xhdpi/textfield_search_default.9.png
new file mode 100644
index 0000000..0ed71f7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_empty_default.9.png b/core/res/res/drawable-xhdpi/textfield_search_empty_default.9.png
new file mode 100644
index 0000000..290dd38
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_empty_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_empty_pressed.9.png b/core/res/res/drawable-xhdpi/textfield_search_empty_pressed.9.png
new file mode 100644
index 0000000..bf20153
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_empty_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_empty_selected.9.png b/core/res/res/drawable-xhdpi/textfield_search_empty_selected.9.png
new file mode 100644
index 0000000..18406a3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_empty_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_pressed.9.png b/core/res/res/drawable-xhdpi/textfield_search_pressed.9.png
new file mode 100644
index 0000000..0913c23
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_selected.9.png b/core/res/res/drawable-xhdpi/textfield_search_selected.9.png
new file mode 100644
index 0000000..7ba4d61
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_search_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_selected.9.png b/core/res/res/drawable-xhdpi/textfield_selected.9.png
new file mode 100644
index 0000000..275d628
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/textfield_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/title_bar_medium.9.png b/core/res/res/drawable-xhdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..4ef531c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/title_bar_medium.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/title_bar_portrait.9.png b/core/res/res/drawable-xhdpi/title_bar_portrait.9.png
new file mode 100644
index 0000000..eb607c7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/title_bar_portrait.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/title_bar_shadow.9.png b/core/res/res/drawable-xhdpi/title_bar_shadow.9.png
new file mode 100644
index 0000000..45b5456
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/title_bar_tall.9.png b/core/res/res/drawable-xhdpi/title_bar_tall.9.png
new file mode 100644
index 0000000..4beb1d7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/title_bar_tall.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/unknown_image.png b/core/res/res/drawable-xhdpi/unknown_image.png
new file mode 100644
index 0000000..0a9f643
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/unknown_image.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/usb_android.png b/core/res/res/drawable-xhdpi/usb_android.png
new file mode 100644
index 0000000..41fc29d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/usb_android.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/usb_android_connected.png b/core/res/res/drawable-xhdpi/usb_android_connected.png
new file mode 100644
index 0000000..71f2d44
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/usb_android_connected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/vpn_connected.png b/core/res/res/drawable-xhdpi/vpn_connected.png
new file mode 100644
index 0000000..5d37ffc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/vpn_connected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/vpn_disconnected.png b/core/res/res/drawable-xhdpi/vpn_disconnected.png
new file mode 100644
index 0000000..dd9ba92
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/vpn_disconnected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/zoom_plate.9.png b/core/res/res/drawable-xhdpi/zoom_plate.9.png
new file mode 100644
index 0000000..5229b5f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/zoom_plate.9.png
Binary files differ
diff --git a/core/res/res/layout/action_bar_title_item.xml b/core/res/res/layout/action_bar_title_item.xml
index e803b26..0828402 100644
--- a/core/res/res/layout/action_bar_title_item.xml
+++ b/core/res/res/layout/action_bar_title_item.xml
@@ -16,10 +16,10 @@
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="wrap_content"
-              android:layout_height="wrap_content"
+              android:layout_height="match_parent"
               android:orientation="horizontal"
               android:paddingRight="16dip"
-              android:background="?android:attr/selectableItemBackground"
+              android:background="?android:attr/actionBarItemBackground"
               android:enabled="false">
 
     <ImageView android:id="@android:id/up"
diff --git a/core/res/res/layout/search_bar.xml b/core/res/res/layout/search_bar.xml
index 673c96c..c81c716 100644
--- a/core/res/res/layout/search_bar.xml
+++ b/core/res/res/layout/search_bar.xml
@@ -38,7 +38,7 @@
         <LinearLayout
             android:id="@id/closeButton"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_height="48dp"
             android:orientation="horizontal"
             android:focusable="true"
             android:background="?android:attr/selectableItemBackground">
@@ -51,9 +51,10 @@
 
             <ImageView
                 android:id="@+id/search_app_icon"
-                android:layout_height="48dip"
-                android:layout_width="48dip"
+                android:layout_height="32dip"
+                android:layout_width="32dip"
                 android:layout_gravity="center_vertical"
+                android:scaleType="centerInside"
             />
 
         </LinearLayout>
diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml
index 6b70d8d..0ffd571 100644
--- a/core/res/res/layout/search_view.xml
+++ b/core/res/res/layout/search_view.xml
@@ -22,8 +22,6 @@
     android:id="@+id/search_bar"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="8dip"
-    android:paddingRight="8dip"
     android:orientation="horizontal"
     >
 
@@ -48,6 +46,7 @@
         android:background="?android:attr/selectableItemBackground"
         android:src="?android:attr/searchViewSearchIcon"
         style="?android:attr/actionButtonStyle"
+        android:contentDescription="@string/searchview_description_search"
     />
 
     <LinearLayout
@@ -58,6 +57,8 @@
         android:layout_gravity="center_vertical"
         android:layout_marginTop="4dip"
         android:layout_marginBottom="4dip"
+        android:layout_marginLeft="8dip"
+        android:layout_marginRight="8dip"
         android:orientation="horizontal">
 
         <ImageView
@@ -99,11 +100,12 @@
                 android:dropDownAnchor="@id/search_edit_frame"
                 android:dropDownVerticalOffset="0dip"
                 android:dropDownHorizontalOffset="0dip"
+                android:contentDescription="@string/searchview_description_query"
             />
 
             <ImageView
                 android:id="@+id/search_close_btn"
-                android:layout_width="@dimen/dropdownitem_icon_width"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:paddingLeft="8dip"
                 android:paddingRight="8dip"
@@ -111,6 +113,7 @@
                 android:background="?android:attr/selectableItemBackground"
                 android:src="?android:attr/searchViewCloseIcon"
                 android:focusable="true"
+                android:contentDescription="@string/searchview_description_clear"
             />
 
         </LinearLayout>
@@ -133,6 +136,7 @@
                 android:src="?android:attr/searchViewGoIcon"
                 android:visibility="gone"
                 android:focusable="true"
+                android:contentDescription="@string/searchview_description_submit"
             />
 
             <ImageView
@@ -146,6 +150,7 @@
                 android:background="?android:attr/selectableItemBackground"
                 android:visibility="gone"
                 android:focusable="true"
+                android:contentDescription="@string/searchview_description_voice"
             />
         </LinearLayout>
     </LinearLayout>
diff --git a/core/res/res/layout/tab_indicator_holo.xml b/core/res/res/layout/tab_indicator_holo.xml
index d5fc3f4..4410b20 100644
--- a/core/res/res/layout/tab_indicator_holo.xml
+++ b/core/res/res/layout/tab_indicator_holo.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- Copyright (C) 2011 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,27 +14,23 @@
      limitations under the License.
 -->
 
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="58dp"
-    android:layout_weight="0"
-    android:paddingBottom="8dp"
-    android:background="@android:drawable/tab_indicator_holo">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="?android:attr/actionBarSize"
+    android:orientation="horizontal"
+    style="@android:style/Widget.Holo.Tab">
 
-    <ImageView android:id="@+id/icon"
+    <ImageView
+        android:id="@android:id/icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingLeft="3dp"
-        android:paddingRight="3dp"
-        android:layout_centerHorizontal="true" />
+        android:layout_gravity="center_vertical"
+        android:visibility="gone" />
 
-    <TextView android:id="@+id/title"
+    <TextView
+        android:id="@android:id/title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_centerHorizontal="true"
-        android:paddingLeft="3dp"
-        android:paddingRight="3dp"
-        style="?android:attr/tabWidgetStyle" />
-    
-</RelativeLayout>
+        android:layout_gravity="center_vertical"
+        style="@android:style/Widget.Holo.TabText" />
+
+</LinearLayout>
diff --git a/core/res/res/layout/tab_indicator_holo_large.xml b/core/res/res/layout/tab_indicator_holo_large.xml
deleted file mode 100644
index bdd8d11..0000000
--- a/core/res/res/layout/tab_indicator_holo_large.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="56dip"
-    android:layout_weight="0"
-    android:layout_marginLeft="0dip"
-    android:layout_marginRight="0dip"
-    android:background="@android:drawable/tab_indicator_holo">
-
-    <View android:id="@+id/tab_indicator_left_spacer"
-        android:layout_width="16dip"
-        android:layout_height="0dip" />
-
-    <ImageView android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerVertical="true"
-        android:visibility="gone"
-        android:layout_toRightOf="@id/tab_indicator_left_spacer"
-        android:paddingRight="8dip" />
-
-    <TextView android:id="@+id/title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerVertical="true"
-        android:layout_toRightOf="@id/icon"
-        android:paddingLeft="0dip"
-        android:paddingRight="16dip"
-        style="?android:attr/tabWidgetStyle" />
-
-</RelativeLayout>
diff --git a/core/res/res/values-sw600dp/styles.xml b/core/res/res/values-sw600dp/styles.xml
index 645db13..7dea9b8 100644
--- a/core/res/res/values-sw600dp/styles.xml
+++ b/core/res/res/values-sw600dp/styles.xml
@@ -15,20 +15,14 @@
 -->
 
 <resources>
-    <style name="TextAppearance.Holo.Widget.TabWidget">
-        <item name="android:textSize">18sp</item>
-        <item name="android:textStyle">normal</item>
-        <item name="android:textColor">@android:color/tab_indicator_text</item>
-    </style>
-    
     <style name="Widget.Holo.TabWidget" parent="Widget.TabWidget">
-        <item name="android:textAppearance">@style/TextAppearance.Holo.Widget.TabWidget</item>
         <item name="android:tabStripLeft">@null</item>
         <item name="android:tabStripRight">@null</item>
         <item name="android:tabStripEnabled">false</item>
-        <item name="android:divider">@null</item>
-        <item name="android:gravity">left|center_vertical</item>
-        <item name="android:tabLayout">@android:layout/tab_indicator_holo_large</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:showDividers">middle</item>
+        <item name="android:dividerPadding">8dip</item>
+        <item name="android:measureWithLargestChild">true</item>
+        <item name="android:tabLayout">@android:layout/tab_indicator_holo</item>
     </style>
 </resources>
-
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f63eb62..40355e3 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -152,6 +152,18 @@
         <!-- Text color, typeface, size, and style for small text inside of a popup menu. -->
         <attr name="textAppearanceSmallPopupMenu" format="reference" />
 
+        <!-- The underline color and thickness for easy correct suggestion -->
+        <attr name="textAppearanceEasyCorrectSuggestion" format="reference" />
+
+        <!-- The underline color and thickness for misspelled suggestion -->
+        <attr name="textAppearanceMisspelledSuggestion" format="reference" />
+
+        <!--  The underline color -->
+        <attr name="textUnderlineColor" format="reference|color" />
+        <!--  The underline thickness, expressed as a percentage of the default underline thickness
+              (i.e., 100 means default thickness, and 200 means double thickness). -->
+        <attr name="textUnderlineThicknessPercentage" format="reference|integer" />
+
         <!-- EditText text foreground color. -->
         <attr name="editTextColor" format="reference|color" />
         <!-- EditText background drawable. -->
@@ -3136,6 +3148,10 @@
         <!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
         <attr name="textAllCaps" />
     </declare-styleable>
+    <declare-styleable name="SuggestionSpan">
+        <attr name="textUnderlineColor" />
+        <attr name="textUnderlineThicknessPercentage" />
+    </declare-styleable>
     <!-- An <code>input-extras</code> is a container for extra data to supply to
          an input method.  Contains
          one more more {@link #Extra <extra>} tags.  -->
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3f67d1ba..74989e6 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -116,6 +116,7 @@
         <item>"mobile_fota,10,0,2,60000,true"</item>
         <item>"mobile_ims,11,0,2,60000,true"</item>
         <item>"mobile_cbs,12,0,2,60000,true"</item>
+        <item>"wifi_p2p,13,1,0,-1,true"</item>
     </string-array>
 
     <!-- Array of ConnectivityManager.TYPE_xxxx constants for networks that may only
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 9295388..8855645 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -125,6 +125,9 @@
     <!-- Minimum width of the search view text entry area. -->
     <dimen name="search_view_text_min_width">160dip</dimen>
 
+    <!-- Preferred width of the search view. -->
+    <dimen name="search_view_preferred_width">320dip</dimen>
+
     <!-- Dialog title height -->
     <dimen name="alert_dialog_title_height">64dip</dimen>
     <!-- Dialog button bar height -->
@@ -155,12 +158,12 @@
     <dimen name="default_gap">16dip</dimen>
 
     <!-- Text padding for dropdown items -->
-    <dimen name="dropdownitem_text_padding_left">6dip</dimen>
+    <dimen name="dropdownitem_text_padding_left">8dip</dimen>
 
     <!-- Text padding for dropdown items -->
-    <dimen name="dropdownitem_text_padding_right">6dip</dimen>
+    <dimen name="dropdownitem_text_padding_right">8dip</dimen>
 
     <!-- Width of the icon in a dropdown list -->
-    <dimen name="dropdownitem_icon_width">48dip</dimen>
+    <dimen name="dropdownitem_icon_width">32dip</dimen>
 
 </resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 7d6d25c..9c774f8 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -225,7 +225,7 @@
     <!-- Displayed when a web request failed because there was a connection error. -->
     <string name="httpErrorConnect">The connection to the server was unsuccessful.</string>
     <!-- Displayed when a web request failed because there was an input or output error. -->
-    <string name="httpErrorIO">The server failed to communicate. Try again later.</string>
+    <string name="httpErrorIO">The server couldn\'t communicate. Try again later.</string>
     <!-- Displayed when a web request failed because the request timed out -->
     <string name="httpErrorTimeout">The connection to the server timed out.</string>
     <!-- Displayed when a web request failed because the site tried to redirect us one too many times -->
@@ -2181,6 +2181,22 @@
         Browser\'s geolocation permissions. Malicious applications
         can use this to allow sending location information to arbitrary web sites.</string>
 
+    <!-- Title of an application permission which allows the application to verify whether
+         a different package is able to be installed by some internal logic. [CHAR LIMIT=40] -->
+    <string name="permlab_packageVerificationAgent">verify packages</string>
+    <!-- Description of an application permission which allows the application to verify whether
+         a different package is able to be installed by some internal heuristic. [CHAR LIMIT=NONE] -->
+    <string name="permdesc_packageVerificationAgent">Allows the application to verify a package is
+        installable.</string>
+
+    <!-- Title of an application permission which allows the application to verify whether
+         a different package is able to be installed by some internal heuristic. [CHAR LIMIT=40] -->
+    <string name="permlab_bindPackageVerifier">bind to a package verifier</string>
+    <!-- Description of an application permission which allows the application to verify whether
+         a different package is able to be installed by some internal heuristic. [CHAR LIMIT=NONE] -->
+    <string name="permdesc_bindPackageVerifier">Allows the holder to make requests of
+        package verifiers. Should never be needed for normal applications.</string>
+
     <!-- If the user enters a password in a form on a website, a dialog will come up asking if they want to save the password. Text in the save password dialog, asking if the browser should remember a password. -->
     <string name="save_password_message">Do you want the browser to remember this password?</string>
     <!-- If the user enters a password in a form on a website, a dialog will come up asking if they want to save the password. Button in the save password dialog, saying not to remember this password. -->
@@ -2212,6 +2228,16 @@
     <!-- This is the default button label in the system-wide search UI.
          It is also used by the home screen's search "widget". It should be short -->
     <string name="search_go">Search</string>
+    <!-- SearchView accessibility description for search button [CHAR LIMIT=NONE] -->
+    <string name="searchview_description_search">Search</string>
+    <!-- SearchView accessibility description for search text field [CHAR LIMIT=NONE] -->
+    <string name="searchview_description_query">Search query</string>
+    <!-- SearchView accessibility description for clear button [CHAR LIMIT=NONE] -->
+    <string name="searchview_description_clear">Clear query</string>
+    <!-- SearchView accessibility description for submit button [CHAR LIMIT=NONE] -->
+    <string name="searchview_description_submit">Submit query</string>
+    <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
+    <string name="searchview_description_voice">Voice search</string>
 
     <!-- String used to display the date. This is the string to say something happened 1 month ago. -->
     <string name="oneMonthDurationPast">1 month ago</string>
@@ -2474,10 +2500,10 @@
     <!-- Title of the alert when an application has crashed. -->
     <string name="aerr_title"></string>
     <!-- Text of the alert that is displayed when an application has crashed. -->
-    <string name="aerr_application"><xliff:g id="application">%1$s</xliff:g> has stopped by mistake.</string>
+    <string name="aerr_application">Unfortunately, <xliff:g id="application">%1$s</xliff:g> has stopped.</string>
     <!-- Text of the alert that is displayed when an application has crashed. -->
-    <string name="aerr_process">The process <xliff:g id="process">%1$s</xliff:g> has
-        stopped by mistake.</string>
+    <string name="aerr_process">Unfortunately, the process <xliff:g id="process">%1$s</xliff:g> has
+        stopped.</string>
     <!-- Title of the alert when an application is not responding. -->
     <string name="anr_title"></string>
     <!-- Text of the alert that is displayed when an application is not responding. -->
@@ -2603,7 +2629,7 @@
     <!-- Wi-Fi p2p dialog title-->
     <string name="wifi_p2p_dialog_title">Wi-Fi Direct</string>
     <string name="wifi_p2p_turnon_message">Start Wi-Fi Direct operation. This will turn off Wi-Fi client/hotspot operation.</string>
-    <string name="wifi_p2p_failed_message">Failed to start Wi-Fi Direct</string>
+    <string name="wifi_p2p_failed_message">Couldn\'t start Wi-Fi Direct</string>
     <string name="wifi_p2p_pbc_go_negotiation_request_message">Wi-Fi Direct connection setup request from <xliff:g id="p2p_device_address">%1$s</xliff:g>. Click OK to accept. </string>
     <string name="wifi_p2p_pin_go_negotiation_request_message">Wi-Fi Direct connection setup request from <xliff:g id="p2p_device_address">%1$s</xliff:g>. Enter pin to proceed. </string>
     <string name="wifi_p2p_pin_display_message">WPS pin <xliff:g id="p2p_wps_pin">%1$s</xliff:g> needs to be entered on the peer device <xliff:g id="p2p_client_address">%2$s</xliff:g> for connection setup to proceed </string>
@@ -2702,7 +2728,7 @@
     <!-- USB_STORAGE_KILL_STORAGE_USERS dialog message text -->
     <string name="dlg_confirm_kill_storage_users_text">If you turn on USB storage, some applications you are using will stop and may be unavailable until you turn off USB storage.</string>
     <!-- USB_STORAGE_ERROR dialog  dialog-->
-    <string name="dlg_error_title">USB operation failed</string>
+    <string name="dlg_error_title">USB operation unsuccessful</string>
     <!-- USB_STORAGE_ERROR dialog  ok button-->
     <string name="dlg_ok">OK</string>
 
@@ -2956,9 +2982,9 @@
     <!-- Text for progress dialog while erasing SD card [CHAR LIMIT=NONE] -->
     <string name="progress_erasing" product="default">Erasing SD card...</string>
     <!-- Text for message to user that an error happened when formatting USB storage [CHAR LIMIT=NONE] -->
-    <string name="format_error" product="nosdcard">Failed to erase USB storage.</string>
+    <string name="format_error" product="nosdcard">Couldn\'t erase USB storage.</string>
     <!-- Text for message to user that an error happened when formatting SD card [CHAR LIMIT=NONE] -->
-    <string name="format_error" product="default">Failed to erase SD card.</string>
+    <string name="format_error" product="default">Couldn\'t erase SD card.</string>
     <!-- Text for message to user that SD card has been removed while in use [CHAR LIMIT=NONE] -->
     <string name="media_bad_removal">SD card was removed before being unmounted.</string>
     <!-- Text for message to user USB storage is currently being checked [CHAR LIMIT=NONE] -->
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index d20d16c..6f2f1e5 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -243,6 +243,18 @@
         <item name="android:textStyle">bold</item>
     </style>
 
+    <style name="TextAppearance.Suggestion">
+        <item name="android:textUnderlineThicknessPercentage">200</item>
+    </style>
+
+    <style name="TextAppearance.EasyCorrectSuggestion" parent="TextAppearance.Suggestion">
+        <item name="android:textUnderlineColor">@color/holo_blue_dark</item>
+    </style>
+
+    <style name="TextAppearance.MisspelledSuggestion" parent="TextAppearance.Suggestion">
+        <item name="android:textUnderlineColor">@color/holo_red_light</item>
+    </style>
+
     <!-- Widget Styles -->
 
     <style name="Widget">
@@ -1751,19 +1763,27 @@
         <item name="android:button">@android:drawable/btn_star_holo_dark</item>
     </style>
 
-    <!-- The holo style for smaller screens actually uses the non-holo layout,
-         which is more compact.  values-xlarge defines an alternative version
-         for the real holo look on a large screen. -->
     <style name="Widget.Holo.TabWidget" parent="Widget.TabWidget">
-        <item name="android:textAppearance">@style/TextAppearance.Holo.Widget.TabWidget</item>
         <item name="android:tabStripLeft">@null</item>
         <item name="android:tabStripRight">@null</item>
         <item name="android:tabStripEnabled">false</item>
-        <item name="android:divider">@null</item>
-        <item name="android:gravity">left|center_vertical</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:showDividers">middle</item>
+        <item name="android:dividerPadding">8dip</item>
+        <item name="android:measureWithLargestChild">true</item>
         <item name="android:tabLayout">@android:layout/tab_indicator_holo</item>
     </style>
 
+    <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView">
+        <item name="android:layout_width">0dip</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:minWidth">80dip</item>
+    </style>
+
+    <style name="Widget.Holo.TabText" parent="Widget.Holo.ActionBar.TabText">
+        <item name="android:maxWidth">180dip</item>
+    </style>
+
     <style name="Widget.Holo.WebTextView" parent="Widget.WebTextView">
     </style>
 
@@ -1772,6 +1792,8 @@
 
     <style name="Widget.Holo.DropDownItem" parent="Widget.DropDownItem">
         <item name="android:textAppearance">@style/TextAppearance.Holo.Widget.DropDownItem</item>
+        <item name="android:paddingLeft">8dp</item>
+        <item name="android:paddingRight">8dp</item>
     </style>
 
     <style name="Widget.Holo.DropDownItem.Spinner">
@@ -1779,6 +1801,8 @@
 
     <style name="Widget.Holo.TextView.SpinnerItem" parent="Widget.TextView.SpinnerItem">
         <item name="android:textAppearance">@style/TextAppearance.Holo.Widget.TextView.SpinnerItem</item>
+        <item name="android:paddingLeft">8dp</item>
+        <item name="android:paddingRight">8dp</item>
     </style>
 
     <style name="Widget.Holo.KeyboardView" parent="Widget.KeyboardView">
@@ -1843,9 +1867,6 @@
         <item name="android:paddingRight">16dip</item>
     </style>
 
-    <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView">
-    </style>
-
     <style name="Widget.Holo.ActionBar.TabBar" parent="Widget.ActionBar.TabBar">
         <item name="android:divider">?android:attr/actionBarDivider</item>
         <item name="android:showDividers">middle</item>
@@ -1858,6 +1879,8 @@
         <item name="android:textSize">12sp</item>
         <item name="android:textStyle">bold</item>
         <item name="android:textAllCaps">true</item>
+        <item name="android:ellipsize">marquee</item>
+        <item name="android:maxLines">2</item>
     </style>
 
     <style name="Widget.Holo.ActionMode" parent="Widget.ActionMode">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 397278c..786cdb5 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -88,7 +88,10 @@
         <item name="textAppearanceSmallInverse">@android:style/TextAppearance.Small.Inverse</item>
         <item name="textAppearanceSearchResultTitle">@android:style/TextAppearance.SearchResult.Title</item>
         <item name="textAppearanceSearchResultSubtitle">@android:style/TextAppearance.SearchResult.Subtitle</item>
-        
+
+        <item name="textAppearanceEasyCorrectSuggestion">@android:style/TextAppearance.EasyCorrectSuggestion</item>
+        <item name="textAppearanceMisspelledSuggestion">@android:style/TextAppearance.MisspelledSuggestion</item>
+
         <item name="textAppearanceButton">@android:style/TextAppearance.Widget.Button</item>
         
         <item name="editTextColor">?android:attr/textColorPrimaryInverse</item>
@@ -326,7 +329,7 @@
         <item name="searchViewSearchIcon">@android:drawable/ic_search</item>
         <item name="searchViewGoIcon">@android:drawable/ic_go</item>
         <item name="searchViewVoiceIcon">@android:drawable/ic_voice_search</item>
-        <item name="searchViewEditQuery">@android:drawable/ic_commit</item>
+        <item name="searchViewEditQuery">@android:drawable/ic_commit_search_api_holo_dark</item>
         <item name="searchViewEditQueryBackground">?attr/selectableItemBackground</item>
 
         <item name="searchDialogTheme">@style/Theme.SearchBar</item>
diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
index 73c92b0..5ee8fdd 100644
--- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
+++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
@@ -164,7 +164,8 @@
         File snd_stat = new File (root_filepath + "tcp_snd");
         int tx = BandwidthTestUtil.parseIntValueFromFile(snd_stat);
         NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1);
-        stats.addValues(NetworkStats.IFACE_ALL, uid, NetworkStats.TAG_NONE, rx, 0, tx, 0);
+        stats.addValues(NetworkStats.IFACE_ALL, uid, NetworkStats.SET_DEFAULT,
+                NetworkStats.TAG_NONE, rx, 0, tx, 0, 0);
         return stats;
     }
 
diff --git a/core/tests/coretests/src/android/net/NetworkStatsTest.java b/core/tests/coretests/src/android/net/NetworkStatsTest.java
index 69ad0f4..47ba88a 100644
--- a/core/tests/coretests/src/android/net/NetworkStatsTest.java
+++ b/core/tests/coretests/src/android/net/NetworkStatsTest.java
@@ -16,6 +16,7 @@
 
 package android.net;
 
+import static android.net.NetworkStats.SET_DEFAULT;
 import static android.net.NetworkStats.TAG_NONE;
 
 import android.test.suitebuilder.annotation.SmallTest;
@@ -31,14 +32,14 @@
 
     public void testFindIndex() throws Exception {
         final NetworkStats stats = new NetworkStats(TEST_START, 3)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 10)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 11)
-                .addValues(TEST_IFACE, 102, TAG_NONE, 1024L, 8L, 1024L, 8L, 12);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 10)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 11)
+                .addValues(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 12);
 
-        assertEquals(2, stats.findIndex(TEST_IFACE, 102, TAG_NONE));
-        assertEquals(2, stats.findIndex(TEST_IFACE, 102, TAG_NONE));
-        assertEquals(0, stats.findIndex(TEST_IFACE, 100, TAG_NONE));
-        assertEquals(-1, stats.findIndex(TEST_IFACE, 6, TAG_NONE));
+        assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE));
+        assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE));
+        assertEquals(0, stats.findIndex(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE));
+        assertEquals(-1, stats.findIndex(TEST_IFACE, 6, SET_DEFAULT, TAG_NONE));
     }
 
     public void testAddEntryGrow() throws Exception {
@@ -47,98 +48,99 @@
         assertEquals(0, stats.size());
         assertEquals(2, stats.internalSize());
 
-        stats.addValues(TEST_IFACE, TEST_UID, TAG_NONE, 1L, 1L, 2L, 2L, 3);
-        stats.addValues(TEST_IFACE, TEST_UID, TAG_NONE, 2L, 2L, 2L, 2L, 4);
+        stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 1L, 1L, 2L, 2L, 3);
+        stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 2L, 2L, 2L, 2L, 4);
 
         assertEquals(2, stats.size());
         assertEquals(2, stats.internalSize());
 
-        stats.addValues(TEST_IFACE, TEST_UID, TAG_NONE, 3L, 30L, 4L, 40L, 7);
-        stats.addValues(TEST_IFACE, TEST_UID, TAG_NONE, 4L, 40L, 4L, 40L, 8);
-        stats.addValues(TEST_IFACE, TEST_UID, TAG_NONE, 5L, 50L, 5L, 50L, 10);
+        stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 3L, 30L, 4L, 40L, 7);
+        stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 4L, 40L, 4L, 40L, 8);
+        stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 5L, 50L, 5L, 50L, 10);
 
         assertEquals(5, stats.size());
         assertTrue(stats.internalSize() >= 5);
 
-        assertValues(stats, 0, TEST_IFACE, TEST_UID, TAG_NONE, 1L, 1L, 2L, 2L, 3);
-        assertValues(stats, 1, TEST_IFACE, TEST_UID, TAG_NONE, 2L, 2L, 2L, 2L, 4);
-        assertValues(stats, 2, TEST_IFACE, TEST_UID, TAG_NONE, 3L, 30L, 4L, 40L, 7);
-        assertValues(stats, 3, TEST_IFACE, TEST_UID, TAG_NONE, 4L, 40L, 4L, 40L, 8);
-        assertValues(stats, 4, TEST_IFACE, TEST_UID, TAG_NONE, 5L, 50L, 5L, 50L, 10);
+        assertValues(stats, 0, TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 1L, 1L, 2L, 2L, 3);
+        assertValues(stats, 1, TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 2L, 2L, 2L, 2L, 4);
+        assertValues(stats, 2, TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 3L, 30L, 4L, 40L, 7);
+        assertValues(stats, 3, TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 4L, 40L, 4L, 40L, 8);
+        assertValues(stats, 4, TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 5L, 50L, 5L, 50L, 10);
     }
 
     public void testCombineExisting() throws Exception {
         final NetworkStats stats = new NetworkStats(TEST_START, 10);
 
-        stats.addValues(TEST_IFACE, 1001, TAG_NONE, 512L, 4L, 256L, 2L, 10);
-        stats.addValues(TEST_IFACE, 1001, 0xff, 128L, 1L, 128L, 1L, 2);
-        stats.combineValues(TEST_IFACE, 1001, TAG_NONE, -128L, -1L, -128L, -1L, -1);
+        stats.addValues(TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 10);
+        stats.addValues(TEST_IFACE, 1001, SET_DEFAULT, 0xff, 128L, 1L, 128L, 1L, 2);
+        stats.combineValues(TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, -128L, -1L, -128L, -1L, -1);
 
-        assertValues(stats, 0, TEST_IFACE, 1001, TAG_NONE, 384L, 3L, 128L, 1L, 9);
-        assertValues(stats, 1, TEST_IFACE, 1001, 0xff, 128L, 1L, 128L, 1L, 2);
+        assertValues(stats, 0, TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, 384L, 3L, 128L, 1L, 9);
+        assertValues(stats, 1, TEST_IFACE, 1001, SET_DEFAULT, 0xff, 128L, 1L, 128L, 1L, 2);
 
         // now try combining that should create row
-        stats.combineValues(TEST_IFACE, 5005, TAG_NONE, 128L, 1L, 128L, 1L, 3);
-        assertValues(stats, 2, TEST_IFACE, 5005, TAG_NONE, 128L, 1L, 128L, 1L, 3);
-        stats.combineValues(TEST_IFACE, 5005, TAG_NONE, 128L, 1L, 128L, 1L, 3);
-        assertValues(stats, 2, TEST_IFACE, 5005, TAG_NONE, 256L, 2L, 256L, 2L, 6);
+        stats.combineValues(TEST_IFACE, 5005, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 3);
+        assertValues(stats, 2, TEST_IFACE, 5005, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 3);
+        stats.combineValues(TEST_IFACE, 5005, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 3);
+        assertValues(stats, 2, TEST_IFACE, 5005, SET_DEFAULT, TAG_NONE, 256L, 2L, 256L, 2L, 6);
     }
 
     public void testSubtractIdenticalData() throws Exception {
         final NetworkStats before = new NetworkStats(TEST_START, 2)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
 
         final NetworkStats after = new NetworkStats(TEST_START, 2)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
 
         final NetworkStats result = after.subtract(before);
 
         // identical data should result in zero delta
-        assertValues(result, 0, TEST_IFACE, 100, TAG_NONE, 0L, 0L, 0L, 0L, 0);
-        assertValues(result, 1, TEST_IFACE, 101, TAG_NONE, 0L, 0L, 0L, 0L, 0);
+        assertValues(result, 0, TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0);
+        assertValues(result, 1, TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0);
     }
 
     public void testSubtractIdenticalRows() throws Exception {
         final NetworkStats before = new NetworkStats(TEST_START, 2)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
 
         final NetworkStats after = new NetworkStats(TEST_START, 2)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1025L, 9L, 2L, 1L, 15)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 3L, 1L, 1028L, 9L, 20);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1025L, 9L, 2L, 1L, 15)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 3L, 1L, 1028L, 9L, 20);
 
         final NetworkStats result = after.subtract(before);
 
         // expect delta between measurements
-        assertValues(result, 0, TEST_IFACE, 100, TAG_NONE, 1L, 1L, 2L, 1L, 4);
-        assertValues(result, 1, TEST_IFACE, 101, TAG_NONE, 3L, 1L, 4L, 1L, 8);
+        assertValues(result, 0, TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1L, 1L, 2L, 1L, 4);
+        assertValues(result, 1, TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 3L, 1L, 4L, 1L, 8);
     }
 
     public void testSubtractNewRows() throws Exception {
         final NetworkStats before = new NetworkStats(TEST_START, 2)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12);
 
         final NetworkStats after = new NetworkStats(TEST_START, 3)
-                .addValues(TEST_IFACE, 100, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
-                .addValues(TEST_IFACE, 101, TAG_NONE, 0L, 0L, 1024L, 8L, 12)
-                .addValues(TEST_IFACE, 102, TAG_NONE, 1024L, 8L, 1024L, 8L, 20);
+                .addValues(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11)
+                .addValues(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12)
+                .addValues(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 20);
 
         final NetworkStats result = after.subtract(before);
 
         // its okay to have new rows
-        assertValues(result, 0, TEST_IFACE, 100, TAG_NONE, 0L, 0L, 0L, 0L, 0);
-        assertValues(result, 1, TEST_IFACE, 101, TAG_NONE, 0L, 0L, 0L, 0L, 0);
-        assertValues(result, 2, TEST_IFACE, 102, TAG_NONE, 1024L, 8L, 1024L, 8L, 20);
+        assertValues(result, 0, TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0);
+        assertValues(result, 1, TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0);
+        assertValues(result, 2, TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 20);
     }
 
-    private static void assertValues(NetworkStats stats, int index, String iface, int uid, int tag,
-            long rxBytes, long rxPackets, long txBytes, long txPackets, int operations) {
+    private static void assertValues(NetworkStats stats, int index, String iface, int uid, int set,
+            int tag, long rxBytes, long rxPackets, long txBytes, long txPackets, int operations) {
         final NetworkStats.Entry entry = stats.getValues(index, null);
         assertEquals(iface, entry.iface);
         assertEquals(uid, entry.uid);
+        assertEquals(set, entry.set);
         assertEquals(tag, entry.tag);
         assertEquals(rxBytes, entry.rxBytes);
         assertEquals(rxPackets, entry.rxPackets);
diff --git a/data/fonts/Lohit_Hindi.ttf b/data/fonts/Lohit_Hindi.ttf
new file mode 100644
index 0000000..73caae3
--- /dev/null
+++ b/data/fonts/Lohit_Hindi.ttf
Binary files differ
diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml
index 6ac615d..1bee47a 100644
--- a/data/fonts/fallback_fonts.xml
+++ b/data/fonts/fallback_fonts.xml
@@ -46,6 +46,11 @@
     </family>
     <family>
         <fileset>
+            <file>Lohit_Hindi.ttf</file>
+        </fileset>
+    </family>
+    <family>
+        <fileset>
             <file>DroidSansFallback.ttf</file>
         </fileset>
     </family>
diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk
index 73fb111..d8c1fa2 100644
--- a/data/fonts/fonts.mk
+++ b/data/fonts/fonts.mk
@@ -31,6 +31,7 @@
     frameworks/base/data/fonts/DroidSerif-Italic.ttf:system/fonts/DroidSerif-Italic.ttf \
     frameworks/base/data/fonts/DroidSerif-BoldItalic.ttf:system/fonts/DroidSerif-BoldItalic.ttf \
     frameworks/base/data/fonts/DroidSansMono.ttf:system/fonts/DroidSansMono.ttf \
+    frameworks/base/data/fonts/Lohit_Hindi.ttf:system/fonts/Lohit_Hindi.ttf \
     frameworks/base/data/fonts/Clockopia.ttf:system/fonts/Clockopia.ttf \
     frameworks/base/data/fonts/DroidSansFallback.ttf:system/fonts/DroidSansFallback.ttf \
     frameworks/base/data/fonts/AndroidClock.ttf:system/fonts/AndroidClock.ttf \
diff --git a/data/fonts/system_fonts.xml b/data/fonts/system_fonts.xml
index 76a5002..d2fe546 100644
--- a/data/fonts/system_fonts.xml
+++ b/data/fonts/system_fonts.xml
@@ -55,15 +55,15 @@
         </fileset>
     </family>
 
-	<family>
-		<nameset>
-			<name>Droid Sans</name>
-		</nameset>
-		<fileset>
-			<file>DroidSans.ttf</file>
-			<file>DroidSans-Bold.ttf</file>
-		</fileset>
-	</family>
+    <family>
+        <nameset>
+            <name>Droid Sans</name>
+        </nameset>
+        <fileset>
+            <file>DroidSans.ttf</file>
+            <file>DroidSans-Bold.ttf</file>
+        </fileset>
+    </family>
 
     <family>
         <nameset>
diff --git a/docs/html/guide/developing/tools/adt.html b/docs/html/guide/developing/tools/adt.html
deleted file mode 100644
index 5ba2ef5..0000000
--- a/docs/html/guide/developing/tools/adt.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/sdk/eclipse-adt.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/sdk/eclipse-adt.html">click here</a>.</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/html/guide/developing/tools/adt.jd b/docs/html/guide/developing/tools/adt.jd
new file mode 100644
index 0000000..e48a5ae
--- /dev/null
+++ b/docs/html/guide/developing/tools/adt.jd
@@ -0,0 +1,528 @@
+page.title=Android Developer Tools
+@jd:body
+
+  <div id="qv-wrapper">
+    <div id="qv">
+      <h2>In this document</h2>
+
+      <ol>
+        <li><a href="#tools">SDK Tools Integration</a></li>
+
+        <li><a href="#editors">Code Editors</a>
+          <ol>
+            <li><a href="#resource-linking">Resource linking enhancements</a></li>
+          </ol>
+        </li>
+
+        <li><a href="#graphical-editor">Graphical Layout Editor</a>
+          <ol>
+            <li><a href="#canvas">Canvas and outline view</a></li>
+            <li><a href="#palette">Palette</a></li>
+            <li><a href="#config-chooser">Configuration chooser</a></li>
+          </ol>
+        </li>
+
+        <li><a href="#refactoring">Layout Factoring Support</a></li>
+
+      </ol>
+
+      <h2>Related videos</h2>
+
+      <ol>
+        <li><a href="{@docRoot}videos/index.html#v=Oq05KqjXTvs">Android Developer Tools
+            Google I/O Session</a>
+        </li>
+      </ol>
+
+      <h2>See also</h2>
+
+      <ol>
+        <li><a href="http://tools.android.com/recent">Android Tools change blog</a></li>
+      </ol>
+    </div>
+  </div>
+
+  <p>ADT (Android Developer Tools) is a plugin for Eclipse that provides a suite of
+  tools that are integrated with the Eclipse IDE. It offers you access to many features that help
+  you develop Android applications quickly. ADT
+  provides GUI access to many of the command line SDK tools as well as a UI design tool for rapid
+  prototyping, designing, and building of your application's user interface.</p>
+
+  <p>Because ADT is a plugin for Eclipse, you get the functionality of a well-established IDE,
+  along with Android-specific features that are bundled with ADT. The following
+  describes important features of Eclipse and ADT:</p>
+
+  <dl>
+    <dt><strong>Integrated Android project creation, building, packaging, installation, and
+    debugging</strong></dt>
+
+    <dd>ADT integrates many development workflow tasks into Eclipse, making it easy for you to
+    rapidly develop and test your Android applications.</dd>
+
+    <dt><strong>SDK Tools integration</strong></dt>
+
+    <dd>Many of the <a href="#tools">SDK tools</a> are integrated into Eclipse's menus,
+    perspectives, or as a part of background processes ran by ADT.</dd>
+
+    <dt><strong>Java programming language and XML editors</strong></dt>
+
+    <dd>The Java programming language editor contains common IDE features such as compile time
+    syntax checking, auto-completion, and integrated documentation for the Android framework APIs.
+    ADT also provides custom XML editors that let you
+    edit Android-specific XML files in a form-based UI. A graphical layout editor lets you design
+    user interfaces with a drag and drop interface.</dd>
+
+    <dt><strong>Integrated documentation for Android framework APIs</strong></dt>
+    <dd>You can access documentation by hovering over classes, methods, or variables.</dd>
+  </dl>
+
+  <p>You can find the most up-to-date and more detailed information about changes and new features
+on the <a  href="http://tools.android.com/recent">Recent Changes</a> page at the Android  Tools
+Project site.</p>
+
+  <h2 id="tools">SDK Tools Integration</h2>
+
+  <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Need help designing icons?</h2>
+  <p>The <a href="http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html">Android
+      Asset Studio</a> is a web-based tool that lets you generate icons from existing images,
+    clipart, or text. It also generates the icons with different DPIs for different screen sizes and
+    types.</p>
+
+    </div>
+  </div>
+
+  <p>Many of the tools that you can start or run from the command line are integrated into ADT.
+  They include:</p>
+
+  <ul>
+    <li><a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Traceview</a>:
+    Allows you to profile your program's execution
+    (<strong>Window &gt; Open Perspective &gt; Traceview</strong>). </li>
+
+    <li><a href="{@docRoot}guide/developing/tools/android.html">android</a>: Provides access to
+    the Android SDK and AVD Manager. Other <code>android</code> features such as creating or
+    updating projects (application and library) are integrated throughout the Eclipse IDE
+    (<strong>Window &gt; Android SDK and AVD Manager</strong>). </li>
+
+    <li><a href="{@docRoot}guide/developing/debugging/debugging-ui.html#HierarchyViewer">Hierarchy
+    Viewer</a>: Allows you to visualize your application's view hierarchy to find inefficiencies
+    (<strong>Window &gt; Open Perspective &gt; Hierarchy Viewer</strong>).</li>
+
+    <li><a href="{@docRoot}guide/developing/debugging/debugging-ui.html#pixelperfect">Pixel
+    Perfect</a>: Allows you to closely examine your UI to help with designing and building.
+    (<strong>Window &gt; Open Perspective &gt; Pixel Perfect</strong>).</li>
+
+    <li><a href="{@docRoot}guide/developing/debugging/ddms.html">DDMS</a>: Provides
+    debugging features including: screen capturing, thread and heap information, and logcat
+    (<strong>Window &gt; Open Perspective &gt; DDMS</strong>).</li>
+
+    <li><a href="{@docRoot}guide/developing/tools/adb.html">adb</a>: Provides access to
+      a device from your development system. Some features of
+    <code>adb</code> are integrated into ADT such as project installation (Eclipse run menu),
+    file transfer, device enumeration, and logcat (DDMS). You must access the more advanced
+    features of <code>adb</code>, such as shell commands, from the command line.</li>
+
+    <li><a href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a>: Allows code obfuscation,
+    shrinking, and optimization. ADT integrates ProGuard as part of the build, if you <a href=
+    "{@docRoot}guide/developing/tools/proguard.html#enabling">enable it</a>.</li>
+  </ul>
+
+<h2 id="editors">Code Editors</h2>
+
+  <p>In addition to Eclipse's standard editor features, ADT provides custom XML editors to help
+  you create and edit Android manifests, resources, menus, and layouts in a form-based or graphical
+  mode. Double-clicking on an XML file in Eclipse's package explorer opens the
+  appropriate XML editor.
+
+    <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Google I/O Session Video</h2>
+      <p>View the segment on the <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=30m50s">XML editors</a> for more
+      information.</p>
+    </div>
+  </div>
+
+  <p class="note"><strong>Note:</strong> You can edit Android-specific XML files (such as a layout
+or manifest) in both a graphical mode and also an XML markup mode. You can switch between
+these modes with the pair of tabs at the bottom of each custom XML editor.</p>
+
+  <p>In addition, some special file types that don't have custom editors, such as drawables, animations,
+  and color files offer editing enhancements such as XML tag completion.</p>
+
+<p>ADT provides the following custom, form-based XML editors:</p>
+
+  <dl>
+
+    <dt><strong>Graphical Layout Editor</strong></dt>
+
+    <dd>Edit and design your XML layout files with a drag and drop interface. The layout editor
+    renders your interface as well, offering you a preview as you design your layouts. This editor
+    is invoked when you open an XML file with a view declared (usually declared in
+    <code>res/layout</code>. For more information, see <a href="#graphical-editor">Graphical Layout
+    Editor</a>.</dd>
+
+    <dt><strong>Android Manifest Editor</strong></dt>
+
+    <dd>Edit Android manifests with a simple graphical interface. This editor is invoked
+    when you open an <code>AndroidManifest.xml</code> file.</dd>
+
+    <dt><strong>Menu Editor</strong></dt>
+
+    <dd>Edit menu groups and items with a simple graphical interface. This editor is
+    invoked when you open an XML file with a <code>&lt;menu&gt;</code> declared (usually located in
+    the <code>res/menu</code> folder).</dd>
+
+    <dt><strong>Resources Editor</strong></dt>
+
+    <dd>Edit resources with a simple graphical interface. This editor is invoked when
+    you open an XML file with a <code>&lt;resources&gt;</code> tag declared.</dd>
+
+    <dt><strong>XML Resources Editor</strong></dt>
+
+    <dd>Edit XML resources with a simple graphical interface. This editor is invoked
+    when you open an XML file.</dd>
+  </dl>
+
+
+  <h3 id="resource-linking">Resource linking enhancements</h3>
+  <p>In addition to the normal code editing features of Eclipse, ADT provides enhancements to the Android
+  development experience that allow you to quickly jump to declarations of various types of resources such
+  as strings or layout files. You can access these enhancements by holding down the control key and
+  clicking on the following items:
+
+      <ul>
+
+        <li>A resource identifier, such as <code>R.id.button1</code>, jumps
+        to the XML definition of the view.</li>
+
+        <li>A declaration in the <code>R.java</code> file, such as <code>public
+        static final int Button01=0x7f050000"</code>, jumps to the corresponding XML definition.</li>
+
+        <li>An activity or service definition in your manifest, such as
+        <code>&lt;activity android:name=".TestActivity"&gt;</code>, jumps to the corresponding Java class. You can
+        jump from an activity definition (or service definition) into the corresponding Java class.</li>
+
+        <li>You can jump to any value definition (e.g. <code>@string:foo</code>), regardless of
+which XML file
+        "foo" is defined in.</li>
+
+        <li>Any file-based declaration, such as <code>@layout/bar</code>, opens the file.</li>
+
+        <li>Non-XML resources, such as <code>@drawable/icon</code>, launches
+        Eclipse's default application for the given file type, which in this case is an
+        image.</li>
+
+        <li><code>@android</code> namespace resources opens the resources found in
+        the SDK install area.</li>
+
+        <li>Custom views in XML layouts, such as <code>&lt;foo.bar.MyView&gt;&lt;/foo.bar.MyView&gt;</code>,
+        or <code>&lt;view class="foo.bar.MyView"&gt;</code>) jump to the corresponding custom view classes.</li>
+
+        <li>An XML attribute such as <code>@android:string/ok</code> or <code>android.R.string.id</code> in Java code
+        opens the file that declares the strings. The XML tab opens when doing this, not
+        the form-based editor.</li>
+
+      </ul>
+
+  <h2 id="graphical-editor">Graphical Layout Editor</h2>
+
+  <p>ADT provides many features to allow you to design and build your application's user interface.
+  Many of these features are in the graphical layout editor, which you can access by opening one of
+  your application's XML layout files in Eclipse.
+  </p>
+
+  <p>The graphical layout editor is the main screen that you use to visually design and build your
+  UI. It is split up into the following parts:</p>
+
+  <dl>
+    <dt><strong>Canvas</strong></dt>
+
+    <dd>In the middle of the editor is the canvas. It provides the rendered view of your
+    layout and supports dragging and dropping of UI widgets
+    directly from the palette. You can select the platform version used to render the items in
+    the canvas. Each platform version has its own look and feel, which might be the similar to or
+    radically different from another platform version. The canvas renders the appropriate look
+    and feel for the currently selected platform version.
+    This platform version does not need to be the same as the version that your
+    application targets.
+
+    <p>The canvas also provides
+    context-sensitive actions in the layout actions bar, such as adjusting layout margins and
+orientation.
+    The layout actions bar displays available actions depending on the selected UI element in the
+    canvas.</p>
+    </dd>
+
+    <dt><strong>Outline</strong></dt>
+
+    <dd>On the right side of the editor is the outline view. It displays a hierarchical
+    view of your layout where you can do things such as reorder of views. The outline
+    view exposes similar functionality as the canvas but displays your layout in an ordered
+    list instead of a rendered preview.</dd>
+
+    <dt><strong>Palette</strong></dt>
+
+    <dd>On the left side of the editor is the palette. It provides a set of widgets that
+    you can drag onto the canvas. The palette shows rendered previews of the
+    widgets for easy lookup of desired UI widgets.</dd>
+
+    <dt><strong>Configuration Chooser</strong></dt>
+
+    <dd>At the top of the editor is the configuration chooser.
+    It provides options to change a layout's rendering mode or screen type.</dd>
+  </dl>
+
+  <img src="{@docRoot}images/layout_editor.png" alt="graphical layout editor screenshot"
+  height="500" id="layout-editor" name="layout-editor">
+
+  <p class="img-caption"><strong>Figure 1.</strong> Graphical layout editor</p>
+
+  <h3 id="canvas">Canvas and outline view</h3>
+
+  <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Google I/O Session Video</h2>
+
+      <p>View the segment on the <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=7m16s">canvas and outline view</a> and the
+      <a href="http://www.youtube.com/watch?v=Oq05KqjXTvs#t=11m43s">layout actions bar</a>
+      for more information.
+      </p>
+    </div>
+  </div>
+
+  <p>The canvas is the area where you can drag and drop UI widgets from the palette to design your
+  layout. The canvas offers a rendered preview of your layout depending on factors such as the
+  selected platform version, screen orientation, and currently selected theme that you specify in
+  the <a href="#configuration-chooser">configuration chooser</a>. You can also drag and drop
+  items into the outline view, which displays your layout in a hierarchical list. The outline view
+  exposes much of the same functionality as the canvas but offers another method of organization
+  that is beneficial for ordering and quickly selecting items. When you right-click a specific item
+  in the canvas or outline view, you can access a context-sensitive menu that lets you modify the
+  following attributes of the layout or view:</p>
+
+  <dl>
+    <dt><strong>View and layout properties</strong></dt>
+
+    <dd>
+      When you right-click a view or layout in the canvas or outline view, it brings up a
+      context-sensitive menu that lets you set things such as:
+
+      <ul>
+        <li>ID of the view or layout</li>
+
+        <li>Text of the view</li>
+
+        <li>Layout width</li>
+
+        <li>Layout height</li>
+
+        <li>Properties such as alpha or clickable</li>
+      </ul>
+    </dd>
+
+    <dt><strong>Animation preview and creation</strong></dt>
+
+    <dd>
+      If your layout or view is animated, you can preview the animation directly in the canvas
+      (when you select Android 3.0 or later as the platform version in the configuration chooser).
+      Right-click an item in the canvas and select <strong>Play Animation</strong>. If
+      animation is not associated with item, an option is available in the menu to create one.
+
+      <p>View the segment on the <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=28m30s">animation features</a> for more
+      information.</p>
+    </dd>
+
+    <dt><strong>Extract as Include</strong></dt>
+
+    <dd>You can extract parts of a current layout into its own layout file,
+    which you can then include in any layout with a single line of XML. See <a href=
+    "#extract-as-include">Layout Refactoring Support</a> for more information.</dd>
+  </dl>
+
+  <h4>Other canvas features</h4>
+
+  <p>The canvas has additional features not available in the outline view:</p>
+
+  <ul>
+
+    <li>Edit views with the layout actions bar: The context-sensitive layout actions bar allows you to
+    edit how a view is laid out in your UI. The available actions depend on the currently
+    selected view and its parent layout. Some common actions include
+    toggling the fill mode of the view and specifying margins. For instance, if you select a
+    {@link android.widget.Button}
+    in a {@link android.widget.LinearLayout}, you see actions related to the {@link
+android.widget.LinearLayout}, such as a toggle to switch
+    between horizontal and vertical layout, and a toggle to control whether its children are
+    aligned along their text baseline. You will also see toolbar actions to control the individual
+    layout attributes of the child, such as whether the child should stretch out to match its
+    parent's width and height, a dropdown action to set the child's layout gravity, a button to open
+    a margin editor, and a layout weight editor.</li>
+
+    <li>Edit a nested layout in its current context: If you are editing a layout
+    that includes another layout, you can edit the included layout in the layout that included
+    it.</li>
+
+    <li>Preview drag and drop location: When you drag and drop a UI widget onto the canvas, ruler
+    markers appear showing you the approximate location of the UI widget depending on the
+    type of layout, such as {@link android.widget.RelativeLayout} or {@link
+    android.widget.LinearLayout}.</li>
+
+    <li>Preview animations: You can preview view and layout animations when you select Android 2.1
+    or later for the platform version in the configuration bar.</li>
+
+    <li>Render layouts in real-time: Layouts are rendered as accurately as possible according to
+    the platform version, including the appropriate system and action bars.</li>
+
+    <li>Support for fragments: Fragments can be rendered in the same screen as the layout that
+    includes the fragments.</li>
+
+  </ul>
+
+  <img src="{@docRoot}images/canvas.png" alt="screenshot of the canvas" height="553">
+
+  <p class="img-caption"><strong>Figure 2.</strong> Canvas portion of the layout editor showing
+  a rendered preview of an application</p>
+
+  <img src=
+  "{@docRoot}images/layout_outline.png" alt="screenshot of the outline view" height="185">
+
+  <p class="img-caption"><strong>Figure 3.</strong> Outline view showing current layout's structure</p>
+
+  <h3 id="palette">Palette</h3>
+
+  <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Google I/O Session Video</h2>
+
+      <p>View the segment on the <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=7m53s">palette</a> for more information.</p>
+    </div>
+  </div>
+
+  <p>The palette contains the UI widgets that you can drag and drop onto the canvas and add to your
+  layout. The pallete categorizes the widgets and shows rendered previews
+  for easier lookup. The main features of the palette include:</p>
+
+  <ul>
+    <li>Different modes of rendered previews include: icons only, icons and text, tiny previews,
+    small previews, and previews (rendered in real size). Previews are only available for layouts
+    rendered with the latest revisions of Android 2.1 (API Level 7) or later.</li>
+
+    <li>Custom views in your project or library projects are added under custom views
+    category.</li>
+
+    <li>Arrange UI widgets alphabetically or by category.</li>
+  </ul>
+  <img src="{@docRoot}images/palette.png" alt="palette screenshot" height="566">
+
+  <p class="img-caption"><strong>Figure 4.</strong> Palette showing available UI widgets</p>
+
+  <h3 id="config-chooser">Configuration chooser</h3>
+
+  <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Google I/O Session Video</h2>
+
+      <p>View the segment on the <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=12m51s">configuration chooser</a> for more
+      information.</p>
+    </div>
+  </div>
+
+
+  <p>The configuration chooser allows you to create and configure different configurations of
+  a layout for different situations, such as one for landscape and one for portrait mode. You can
+  set the following options for each configuration of a layout:
+  </p>
+      <ul>
+        <li>Screen type combo box: Predefined screen settings for common device configurations. You
+        can also create your own by selecting <strong>Custom...</strong>.</li>
+
+        <li>Screen orientation combo box: Portrait or Landscape screen orientation.</li>
+
+        <li>Theme combo box: Predefined themes or a custom theme that you have created.</li>
+
+        <li>Platform combo box: Platform version used to render the canvas and palette as well as
+        displaying appropriate themes.</li>
+
+        <li>Custom layout combo boxes: The locale, dock, and time of day combo boxes let you select
+        different versions of the same layout depending on the device's current state. You can
+        create a new version of a layout with the <strong>Create</strong> button.</li>
+      </ul>
+
+      <img src="{@docRoot}images/layout_bar.png" alt=
+  "configuration chooser screenshot" height="50" id="configuration-chooser" name="configuration chooser">
+
+  <p class="img-caption"><strong>Figure 5.</strong> Configuration chooser</p>
+
+  <h2 id="refactoring">Layout Refactoring Support</h2>
+
+  <div class="sidebox-wrapper">
+    <div class="sidebox">
+      <h2>Google I/O Session Video</h2>
+
+      <p>View the segment on <a href=
+      "http://www.youtube.com/watch?v=Oq05KqjXTvs#t=18m00s">refactoring features</a> for a rundown
+of the more important refactoring features.</p>
+
+    </div>
+  </div>
+
+  <p>In both the graphical and XML layout editor, there are many features that help you quickly
+  refactor your layouts. The following list describes the major refactoring support:</p>
+
+  <dl>
+
+    <dt><strong>Change layout</strong></dt>
+    <dd>This lets you change the layout on the fly and re-renders the canvas for you.
+    You can apply this refactoring to any layout and the layout is converted to the new type if
+    possible. In many cases, the opening and closing tags of the layout's XML element are changed
+    along with things such as ID attributes and their references. However, for some supported
+    types, ADT attempts to preserve the layout, such as changing a {@link
+    android.widget.LinearLayout} to a {@link android.widget.RelativeLayout}.</dd>
+
+    <dt><strong>Change widget</strong></dt>
+    <dd>This lets you select one or more widgets and converts them to a new widget type. In
+    addition to changing the element name, it also removes any
+    attributes that are not supported by the new widget type and adds in any mandatory attributes
+    required by the new widget type. If the current ID of a widget includes the
+    current widget type in its ID (such as a <code>&lt;Button&gt;</code> widget named
+    <code>"button1"</code>), then the ID is changed to match the new widget type and all
+    references are updated.</dd>
+
+    <dt id="extract-as-include"><strong>Extract as include</strong></dt>
+    <dd>This lets you extract views inside of an existing layout into their own separate layout
+    file. An <code>include</code> tag that points to the newly created layout file is inserted
+    into the existing layout file. Right-click the view or layout and select <strong>Extract as
+    Include...</strong>.</dd>
+
+    <dt><strong>Extract string</strong></dt>
+    <dd>Extract strings from either XML or Java files into their own separate resource file.</dd>
+
+    <dt><strong>Extract style</strong></dt>
+    <dd>Extract style-related attributes from a layout and define them in a new
+    <code>styles.xml</code> file. You can select multiple views and this refactoring extracts all
+    of the same styles into one style and assigns that style to all the views that use it.</dd>
+
+    <dt><strong>Wrap-in container</strong></dt>
+    <dd>This lets you select one or more sibling elements and wrap them in a new container. This
+    can be applied to the root element as well, in which case the namespace declaration attributes
+    will be transferred to the new root. This refactoring also transfers <code>layout_</code>
+    attribute references to the new root, For example, suppose you have a {@link android.widget.RelativeLayout}.
+    If other widgets have layout constraints pointing to your widget, wrapping the widget causes
+    these constraints to point to the parent instead.</dd>
+
+    <dt><strong>Quick Assistant</strong></dt>
+    <dd>Provides refactoring suggestions depending on the current context. Press
+    <strong>Ctrl-1</strong> (or <strong>Cmd-1</strong> on
+    Mac) in an editor, and Eclipse provides a list of possible refactorings depending on the
+    context. The Quick Assistant provides fast access to all of the above refactorings, where applicable.
+    For example, if you are editing an XML value and decide you want to extract it out
+    as a string, place the text cursor in the string and press Ctrl-1 to see the refactoring context
+    menu.</dd>
+  </dl>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index a647cd3..9c3a0be 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -244,7 +244,7 @@
               </a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/graphics/opengl.html">
                 <span class="en">3D with OpenGL</span>
-              </a></li>
+              </a><span class="new">updated</span></li>
           <li><a href="<?cs var:toroot ?>guide/topics/graphics/animation.html">
                 <span class="en">Property Animation</span>
               </a></li>
@@ -569,6 +569,7 @@
           </a></div>
         <ul>
           <li><a href="<?cs var:toroot ?>guide/developing/tools/adb.html">adb</a></li>
+          <li><a href="<?cs var:toroot ?>guide/developing/tools/adt.html">ADT</a> <span class="new">new!</span></li>
           <li><a href="<?cs var:toroot ?>guide/developing/tools/android.html">android</a></li>
           <li><a href="<?cs var:toroot ?>guide/developing/tools/bmgr.html">bmgr</a>
           <li><a href="<?cs var:toroot ?>guide/developing/tools/dmtracedump.html">dmtracedump</a></li>
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index cc467f2..2edc63d 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -8,22 +8,37 @@
     <h2>In this document</h2>
     
     <ol>
-      <li><a href="#basics">The Basics</a></li>
-      <li><a href="#compatibility">OpenGL Versions and Device Compatibility</a>
+      <li><a href="#basics">The Basics</a>
         <ol>
-          <li><a href="#textures">Texture Compression Support</a></li>
-          <li><a href="#declare-compression">Declaring Use of Compressed Textures</a></li>
+           <li><a href="#packages">OpenGL packages</a></li>
+        </ol>
+      <li><a href="#manifest">Declaring OpenGL Requirements</a></li>
+      </li>
+      <li><a href="#coordinate-mapping">Coordinate Mapping for Drawn Objects</a>  
+        <ol>
+          <li><a href="#proj-es1">Projection and camera in ES 1.0</a></li>
+          <li><a href="#proj-es1">Projection and camera in ES 2.0</a></li>
         </ol>
       </li>
+      <li><a href="#compatibility">OpenGL Versions and Device Compatibility</a>
+        <ol>
+          <li><a href="#textures">Texture compression support</a></li>
+          <li><a href="#gl-extension-query">Determining OpenGL Extensions</a></li>
+        </ol>
+      </li>
+      <li><a href="#choosing-version">Choosing an OpenGL API Version</a></li>
     </ol>
     <h2>Key classes</h2>
     <ol>
       <li>{@link android.opengl.GLSurfaceView}</li>
       <li>{@link android.opengl.GLSurfaceView.Renderer}</li>
-      <li>{@link javax.microedition.khronos.opengles}</li>
-      <li>{@link android.opengl}</li>
     </ol>
-    <h2>Related Samples</h2>
+    <h2>Related tutorials</h2>
+    <ol>
+      <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0</a></li>
+      <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0</a></li>
+    </ol>
+    <h2>Related samples</h2>
     <ol>
       <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
 GLSurfaceViewActivity.html">GLSurfaceViewActivity</a></li>
@@ -46,11 +61,11 @@
 </div>
 
 <p>Android includes support for high performance 2D and 3D graphics with the Open Graphics Library
-(OpenGL) API&mdash;specifically, the OpenGL ES API. OpenGL is a cross-platform graphics API that
-specifies a standard software interface for 3D graphics processing hardware. OpenGL ES is a flavor
-of the OpenGL specification intended for embedded devices. The OpenGL ES 1.0 and 1.1 API
-specifications have been supported since Android 1.0. Beginning with Android 2.2 (API
-Level 8), the framework supports the OpenGL ES 2.0 API specification.</p>
+(OpenGL), specifically, the OpenGL ES API. OpenGL is a cross-platform graphics API that specifies a
+standard software interface for 3D graphics processing hardware. OpenGL ES is a flavor of the OpenGL
+specification intended for embedded devices. The OpenGL ES 1.0 and 1.1 API specifications have been
+supported since Android 1.0. Beginning with Android 2.2 (API Level 8), the framework supports the
+OpenGL ES 2.0 API specification.</p>
 
 <p class="note"><b>Note:</b> The specific API provided by the Android framework is similar to the
   J2ME JSR239 OpenGL ES  API, but is not identical. If you are familiar with J2ME JSR239
@@ -71,18 +86,19 @@
 </p>
 
 <dl>
-  <dt>{@link android.opengl.GLSurfaceView}</dt>
-  <dd>This class is a container on which you can draw and manipulate objects using OpenGL API calls.
-    This class is similar in function to a {@link android.view.SurfaceView}, except that it is
-    specifically for use with OpenGL. You can use this class by simply creating an instance of 
-    {@link android.opengl.GLSurfaceView} and adding your 
+  <dt><strong>{@link android.opengl.GLSurfaceView}</strong></dt>
+  <dd>This class is a {@link android.view.View} where you can draw and manipulate objects using
+    OpenGL API calls and is similar in function to a {@link android.view.SurfaceView}. You can use
+    this class by creating an instance of {@link android.opengl.GLSurfaceView} and adding your 
     {@link android.opengl.GLSurfaceView.Renderer Renderer} to it. However, if you want to capture
     touch screen events, you should extend the {@link android.opengl.GLSurfaceView} class to
-    implement the touch listeners, as shown in the <a
+    implement the touch listeners, as shown in OpenGL Tutorials for 
+    <a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#touch">ES 1.0</a>, 
+    <a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#touch">ES 2.0</a> and the <a
 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity
 .html">TouchRotateActivity</a> sample.</dd>
   
-  <dt>{@link android.opengl.GLSurfaceView.Renderer}</dt>
+  <dt><strong>{@link android.opengl.GLSurfaceView.Renderer}</strong></dt>
   <dd>This interface defines the methods required for drawing graphics in an OpenGL {@link
     android.opengl.GLSurfaceView}. You must provide an implementation of this interface as a
     separate class and attach it to your {@link android.opengl.GLSurfaceView} instance using
@@ -119,6 +135,7 @@
     </dd>
 </dl>
 
+<h3 id="packages">OpenGL packages</h3>
 <p>Once you have established a container view for OpenGL using {@link
 android.opengl.GLSurfaceView} and {@link android.opengl.GLSurfaceView.Renderer}, you can begin
 calling OpenGL APIs using the following classes:</p>
@@ -126,8 +143,17 @@
 <ul>
   <li>OpenGL ES 1.0/1.1 API Packages
     <ul>
+        <li>{@link android.opengl} - This package provides a static interface to the OpenGL ES
+1.0/1.1 classes and better performance than the javax.microedition.khronos package interfaces.
+          <ul>
+            <li>{@link android.opengl.GLES10}</li>
+            <li>{@link android.opengl.GLES10Ext}</li>
+            <li>{@link android.opengl.GLES11}</li>
+            <li>{@link android.opengl.GLES10Ext}</li>
+          </ul>
+        </li>
       <li>{@link javax.microedition.khronos.opengles} - This package provides the standard
-implementation of OpenGL ES 1.0 and 1.1.
+implementation of OpenGL ES 1.0/1.1.
           <ul>
             <li>{@link javax.microedition.khronos.opengles.GL10}</li>
             <li>{@link javax.microedition.khronos.opengles.GL10Ext}</li>
@@ -136,42 +162,243 @@
             <li>{@link javax.microedition.khronos.opengles.GL11ExtensionPack}</li>
           </ul>
         </li>
-        <li>{@link android.opengl} - This package provides a static interface to the OpenGL classes
-          above. These interfaces were added with Android 1.6 (API Level 4).
-          <ul>
-            <li>{@link android.opengl.GLES10}</li>
-            <li>{@link android.opengl.GLES10Ext}</li>
-            <li>{@link android.opengl.GLES11}</li>
-            <li>{@link android.opengl.GLES10Ext}</li>
-          </ul>
-        </li>
       </ul>
   </li>
   <li>OpenGL ES 2.0 API Class
     <ul>
-      <li>{@link android.opengl.GLES20 android.opengl.GLES20}</li>
+      <li>{@link android.opengl.GLES20 android.opengl.GLES20} - This package provides the
+interface to OpenGL ES 2.0 and is available starting with Android 2.2 (API Level 8).</li>
     </ul>
   </li>
 </ul>
 
+<p>If you'd like to start building an app with OpenGL right away, have a look at the tutorials for
+<a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0</a> or 
+<a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0</a>!
+</p>
+
+<h2 id="manifest">Declaring OpenGL Requirements</h2>
+<p>If your application uses OpenGL features that are not available on all devices, you must include
+these requirements in your <a 
+href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a></code> file.
+Here are the most common OpenGL manifest declarations:</p>
+
+<ul>
+  <li><strong>OpenGL ES version requirements</strong> - If your application only supports OpenGL ES
+2.0, you must declare that requirement by adding the following settings to your manifest as
+shown below.
+
+<pre>
+    &lt;!-- Tell the system this app requires OpenGL ES 2.0. --&gt;
+    &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
+</pre>
+
+  <p>Adding this declaration causes the Android Market to restrict your application from being
+  installed on devices that do not support OpenGL ES 2.0.</p>
+  </li>
+  <li><strong>Texture compression requirements</strong> - If your application uses texture
+compression formats that are not supported by all devices, you must declare them in your manifest
+file using <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">
+{@code &lt;supports-gl-texture&gt;}</a>. For more information about available texture compression
+formats, see <a href="#textures">Texture compression support</a>. 
+
+<p>Declaring texture compression requirements in your manifest hides your application from users
+with devices that do not support at least one of your declared compression types. For more
+information on how Android Market filtering works for texture compressions, see the <a
+href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html#market-texture-filtering">
+Android Market and texture compression filtering</a> section of the {@code
+&lt;supports-gl-texture&gt;} documentation.</p> 
+  </li>
+</ul>
+
+
+<h2 id="coordinate-mapping">Coordinate Mapping for Drawn Objects</h2>
+
+<p>One of the basic problems in displaying graphics on Android devices is that their screens can
+vary in size and shape. OpenGL assumes a square, uniform coordinate system and, by default, happily
+draws those coordinates onto your typically non-square screen as if it is perfectly square.</p>
+
+<img src="{@docRoot}images/opengl/coordinates.png">
+<p class="img-caption">
+  <strong>Figure 1.</strong> Default OpenGL coordinate system (left) mapped to a typical Android
+device screen (right).
+</p>
+
+<p>The illustration above shows the uniform coordinate system assumed for an OpenGL frame on the
+left, and how these coordinates actually map to a typical device screen in landscape orientation
+on the right. To solve this problem, you can apply OpenGL projection modes and camera views to
+transform coordinates so your graphic objects have the correct proportions on any display.</p>
+
+<p>In order to apply projection and camera views, you create a projection matrix and a camera view
+matrix and apply them to the OpenGL rendering pipeline. The projection matrix recalculates the
+coordinates of your graphics so that they map correctly to Android device screens. The camera view
+matrix creates a transformation that renders objects from a specific eye position.</p>
+
+<h3 id="proj-es1">Projection and camera view in OpenGL ES 1.0</h3>
+<p>In the ES 1.0 API, you apply projection and camera view by creating each matrix and then
+adding them to the OpenGL environment.</p>
+  
+<ol>
+<li><strong>Projection matrix</strong> - Create a projection matrix using the geometry of the
+device screen in order to recalculate object coordinates so they are drawn with correct proportions.
+The following example code demonstrates how to modify the {@code onSurfaceChanged()} method of a
+{@link android.opengl.GLSurfaceView.Renderer} implementation to create a projection matrix based on
+the screen's aspect ratio and apply it to the OpenGL rendering environment.
+
+<pre>
+  public void onSurfaceChanged(GL10 gl, int width, int height) {
+      gl.glViewport(0, 0, width, height);
+      
+      // make adjustments for screen ratio
+      float ratio = (float) width / height;
+      gl.glMatrixMode(GL10.GL_PROJECTION);        // set matrix to projection mode
+      gl.glLoadIdentity();                        // reset the matrix to its default state
+      gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);  // apply the projection matrix
+  }  
+</pre>
+</li>
+
+<li><strong>Camera transformation matrix</strong> - Once you have adjusted the coordinate system
+using a projection matrix, you must also apply a camera view. The following example code shows how
+to modify the {@code onDrawFrame()} method of a {@link android.opengl.GLSurfaceView.Renderer}
+implementation to apply a model view and use the {@link
+android.opengl.GLU#gluLookAt(javax.microedition.khronos.opengles.GL10, float, float, float, float,
+float, float, float, float, float) GLU.gluLookAt()} utility to create a viewing tranformation which
+simulates a camera position.
+
+<pre>
+    public void onDrawFrame(GL10 gl) {
+        ...
+        // Set GL_MODELVIEW transformation mode
+        gl.glMatrixMode(GL10.GL_MODELVIEW);
+        gl.glLoadIdentity();                      // reset the matrix to its default state
+        
+        // When using GL_MODELVIEW, you must set the camera view
+        GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);        
+        ...
+    }
+</pre>   
+</li>
+</ol>
+
+<p>For a complete example of how to apply projection and camera views with OpenGL ES 1.0, see the <a
+href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#projection-and-views">OpenGL ES 1.0
+tutorial</a>.</p>
+
+
+<h3 id="proj-es2">Projection and camera view in OpenGL ES 2.0</h3>
+<p>In the ES 2.0 API, you apply projection and camera view by first adding a matrix member to
+the vertex shaders of your graphics objects. With this matrix member added, you can then
+generate and apply projection and camera viewing matrices to your objects.</p>
+  
+<ol>
+<li><strong>Add matrix to vertex shaders</strong> - Create a variable for the view projection matrix
+and include it as a multiplier of the shader's position. In the following example vertex shader
+code, the included {@code uMVPMatrix} member allows you to apply projection and camera viewing 
+matrices to the coordinates of objects that use this shader.
+
+<pre>
+    private final String vertexShaderCode = 
+        
+        // This matrix member variable provides a hook to manipulate
+        // the coordinates of objects that use this vertex shader
+        "uniform mat4 uMVPMatrix;   \n" +
+        
+        "attribute vec4 vPosition;  \n" +
+        "void main(){               \n" +
+        
+        // the matrix must be included as part of gl_Position
+        " gl_Position = uMVPMatrix * vPosition; \n" +
+        
+        "}  \n";
+</pre>
+  <p class="note"><strong>Note:</strong> The example above defines a single transformation matrix
+member in the vertex shader into which you apply a combined projection matrix and camera view
+matrix. Depending on your application requirements, you may want to define separate projection
+matrix and camera viewing matrix members in your vertex shaders so you can change them
+independently.</p>
+</li>
+<li><strong>Access the shader matrix</strong> - After creating a hook in your vertex shaders to
+apply projection and camera view, you can then access that variable to apply projection and
+camera viewing matrices. The following code shows how to modify the {@code onSurfaceCreated()}
+method of a {@link android.opengl.GLSurfaceView.Renderer} implementation to access the matrix
+variable defined in the vertex shader above.
+
+<pre>
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+        ...
+        muMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
+        ...
+    }
+</pre>
+</li>
+<li><strong>Create projection and camera viewing matrices</strong> - Generate the projection and
+viewing matrices to be applied the graphic objects. The following example code shows how to modify
+the {@code onSurfaceCreated()} and {@code onSurfaceChanged()} methods of a {@link
+android.opengl.GLSurfaceView.Renderer} implementation to create camera view matrix and a projection
+matrix based on the screen aspect ratio of the device.
+
+<pre>
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+        ...
+        // Create a camera view matrix
+        Matrix.setLookAtM(mVMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
+    }    
+    
+    public void onSurfaceChanged(GL10 unused, int width, int height) {
+        GLES20.glViewport(0, 0, width, height);
+        
+        float ratio = (float) width / height;
+        
+        // create a projection matrix from device screen geometry
+        Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
+    }  
+</pre>
+</li>
+
+<li><strong>Apply projection and camera viewing matrices</strong> - To apply the projection and
+camera view transformations, multiply the matrices together and then set them into the vertex
+shader. The following example code shows how modify the {@code onDrawFrame()} method of a {@link
+android.opengl.GLSurfaceView.Renderer} implementation to combine the projection matrix and camera
+view created in the code above and then apply it to the graphic objects to be rendered by OpenGL.
+  
+<pre>
+    public void onDrawFrame(GL10 unused) {
+        ...
+        // Combine the projection and camera view matrices
+        Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
+        
+        // Apply the combined projection and camera view transformations
+        GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
+        
+        // Draw objects
+        ...
+    }
+</pre>
+</li>
+</ol>
+<p>For a complete example of how to apply projection and camera view with OpenGL ES 2.0, see the <a
+href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#projection-and-views">OpenGL ES 2.0
+tutorial</a>.</p>
+
+
 <h2 id="compatibility">OpenGL Versions and Device Compatibility</h2>
 
-<p>
-  The OpenGL ES 1.0 and 1.1 API specifications have been supported since Android 1.0.
+<p>The OpenGL ES 1.0 and 1.1 API specifications have been supported since Android 1.0.
 Beginning with Android 2.2 (API Level 8), the framework supports the OpenGL ES 2.0 API
 specification. OpenGL ES 2.0 is supported by most Android devices and is recommended for new
 applications being developed with OpenGL. For information about the relative number of
 Android-powered devices that support a given version of OpenGL ES, see the <a
 href="{@docRoot}resources/dashboard/opengl.html">OpenGL ES Versions Dashboard</a>.</p>
 
+
 <h3 id="textures">Texture compression support</h3>
 <p>Texture compression can significantly increase the performance of your OpenGL application by
 reducing memory requirements and making more efficient use of memory bandwidth. The Android
 framework provides support for the ETC1 compression format as a standard feature, including a {@link
-android.opengl.ETC1Util} utility class and the {@code etc1tool} compression tool (located in your
-Android SDK at {@code &lt;sdk&gt;/tools/}).</p>
-
-<p>For an example of an Android application that uses texture compression, see the <a
+android.opengl.ETC1Util} utility class and the {@code etc1tool} compression tool (located in the
+Android SDK at {@code &lt;sdk&gt;/tools/}). For an example of an Android application that uses
+texture compression, see the <a
 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
 CompressedTextureActivity.html">CompressedTextureActivity</a> code sample.
 </p>
@@ -184,34 +411,110 @@
 investigate other texture compression formats available on your target devices.</p>
 
 <p>Beyond the ETC1 format, Android devices have varied support for texture compression based on
-their GPU chipsets. You should investigate texture compression support on the the devices you are
-are targeting to determine what compression types your application should support.</p>
+their GPU chipsets and OpenGL implementations. You should investigate texture compression support on
+the the devices you are are targeting to determine what compression types your application should
+support. In order to determine what texture formats are supported on a given device, you must <a
+href="#gl-extension-query">query the device</a> and review the <em>OpenGL extension names</em>,
+which identify what texture compression formats (and other OpenGL features) are supported by the
+device. Some commonly supported texture compression formats are as follows:</p>
 
-<p>To determine if texture compression formats other than ETC1 are supported on a particular
-device:</p>
+<ul>
+  <li><strong>ATITC (ATC)</strong> - ATI texture compression (ATITC or ATC) is available on a
+wide variety of devices and supports fixed rate compression for RGB textures with and without
+an alpha channel. This format may be represented by several OpenGL extension names, for example:
+    <ul>
+      <li>{@code GL_AMD_compressed_ATC_texture}</li>
+      <li>{@code GL_ATI_texture_compression_atitc}</li>
+    </ul>
+  </li>
+  <li><strong>PVRTC</strong> - PowerVR texture compression (PVRTC) is available on a wide
+variety of devices and supports 2-bit and 4-bit per pixel textures with or without an alpha channel.
+This format is represented by the following OpenGL extension name:
+    <ul>
+      <li>{@code GL_IMG_texture_compression_pvrtc}</li>
+    </ul>
+  </li>
+  <li><strong>S3TC (DXT<em>n</em>/DXTC)</strong> - S3 texture compression (S3TC) has several
+format variations (DXT1 to DXT5) and is less widely available. The format supports RGB textures with
+4-bit alpha or 8-bit alpha channels. This format may be represented by several OpenGL extension
+names, for example:
+    <ul>
+      <li>{@code GL_OES_texture_compression_S3TC}</li>
+      <li>{@code GL_EXT_texture_compression_s3tc}</li>
+      <li>{@code GL_EXT_texture_compression_dxt1}</li>
+      <li>{@code GL_EXT_texture_compression_dxt3}</li>
+      <li>{@code GL_EXT_texture_compression_dxt5}</li>
+    </ul>
+  </li>
+  <li><strong>3DC</strong> - 3DC texture compression (3DC) is a less widely available format that
+supports RGB textures with an an alpha channel. This format is represented by the following OpenGL
+extension name:</li>
+    <ul>
+      <li>{@code GL_AMD_compressed_3DC_texture}</li>
+    </ul>
+</ul>
+
+<p class="warning"><strong>Warning:</strong> These texture compression formats are <em>not
+supported</em> on all devices. Support for these formats can vary by manufacturer and device. For
+information on how to determine what texture compression formats are on a particular device, see
+the next section.
+</p>
+
+<p class="note"><strong>Note:</strong> Once you decide which texture compression formats your
+application will support, make sure you declare them in your manifest using <a
+href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">&lt;supports-gl-texture&gt;
+</a>. Using this declaration enables filtering by external services such as Android Market, so that
+your app is installed only on devices that support the formats your app requires. For details, see
+<a
+href="{@docRoot}guide/topics/graphics/opengl.html#manifest">OpenGL manifest declarations</a>.</p>
+
+<h3 id="gl-extension-query">Determining OpenGL extensions</h3>
+<p>Implementations of OpenGL vary by Android device in terms of the extensions to the OpenGL ES API
+that are supported. These extensions include texture compressions, but typically also include other
+extensions to the OpenGL feature set.</p>
+
+<p>To determine what texture compression formats, and other OpenGL extensions, are supported on a
+particular device:</p>
 <ol>
   <li>Run the following code on your target devices to determine what texture compression
 formats are supported:
 <pre>
   String extensions = javax.microedition.khronos.opengles.GL10.glGetString(GL10.GL_EXTENSIONS);
 </pre>
-  <p class="warning"><b>Warning:</b> The results of this call vary by device! You must run this
-call on several target devices to determine what compression types are commonly supported on
-your target devices.</p>
+  <p class="warning"><b>Warning:</b> The results of this call <em>vary by device!</em> You
+must run this call on several target devices to determine what compression types are commonly
+supported.</p>
   </li>
-  <li>Review the output of this method to determine what extensions are supported on the
+  <li>Review the output of this method to determine what OpenGL extensions are supported on the
 device.</li> 
 </ol>
 
 
-<h3 id="declare-compression">Declaring compressed textures</h3>
-<p>Once you have decided which texture compression types your application will support, you
-must declare them in your manifest file using <a
-href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">
-&lt;supports-gl-texture&gt;</a>. Declaring this information in your manifest file hides your
-application from users with devices that do not support at least one of your declared
-compression types. For more information on how Android Market filtering works for texture
-compressions, see the <a
-href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html#market-texture-filtering">
-Android Market and texture compression filtering</a> section of the {@code
-&lt;supports-gl-texture&gt;} documentation.
+<h2 id="choosing-version">Choosing an OpenGL API Version</h2>
+
+<p>OpenGL ES API version 1.0 (and the 1.1 extensions) and version 2.0 both provide high
+performance graphics interfaces for creating 3D games, visualizations and user interfaces. Graphics
+programming for the OpenGL ES 1.0/1.1 API versus ES 2.0 differs significantly, and so developers
+should carefully consider the following factors before starting development with either API:</p>
+
+<ul>
+  <li><strong>Performance</strong> - In general, OpenGL ES 2.0 provides faster graphics performance
+than the ES 1.0/1.1 APIs. However, the performance difference can vary depending on the Android
+device your OpenGL application is running on, due to differences in the implementation of the OpenGL
+graphics pipeline.</li>
+  <li><strong>Device Compatibility</strong> - Developers should consider the types of devices, 
+Android versions and the OpenGL ES versions available to their customers. For more information
+on OpenGL compatibility across devices, see the <a href="#compatibility">OpenGL Versions and Device
+Compatibility</a> section.</li>
+  <li><strong>Coding Convenience</strong> - The OpenGL ES 1.0/1.1 API provides a fixed function
+pipeline and convenience functions which are not available in the ES 2.0 API. Developers who are new
+to OpenGL may find coding for OpenGL ES 1.0/1.1 faster and more convenient.</li>
+  <li><strong>Graphics Control</strong> - The OpenGL ES 2.0 API provides a higher degree
+of control by providing a fully programmable pipeline through the use of shaders. With more
+direct control of the graphics processing pipeline, developers can create effects that would be
+very difficult to generate using the 1.0/1.1 API.</li>
+</ul>
+  
+<p>While performance, compatibility, convenience, control and other factors may influence your
+decision, you should pick an OpenGL API version based on what you think provides the best experience
+for your users.</p>
diff --git a/docs/html/guide/topics/usb/host.jd b/docs/html/guide/topics/usb/host.jd
index 4967033..b561754 100644
--- a/docs/html/guide/topics/usb/host.jd
+++ b/docs/html/guide/topics/usb/host.jd
@@ -135,7 +135,9 @@
       devices that you want to filter. The following list describes the attributes of
       <code>&lt;usb-device&gt;</code>. In general, use vendor and product ID if you want to filter
       for a specific device and use class, subclass, and protocol if you want to filter for a group
-      of USB devices, such as mass storage devices or digital cameras.</p>
+      of USB devices, such as mass storage devices or digital cameras. You can specify none or
+      all of these attributes. Specifying no attributes matches every USB device, so only do this
+      if your application requires it:</p>
 
       <ul>
         <li><code>vendor-id</code></li>
@@ -179,14 +181,13 @@
 </pre>
 
   <p>In this case, the following resource file should be saved in
-  <code>res/xml/device_filter.xml</code> and specifies that any USB device with the corresponding
-  vendor ID and product ID should be filtered. These IDs are specific to the device and are
-  specified by the device's manufacturer:</p>
+  <code>res/xml/device_filter.xml</code> and specifies that any USB device with the specified
+  attributes should be filtered:</p>
   <pre>
 &lt;?xml version="1.0" encoding="utf-8"?&gt;
 
 &lt;resources&gt;
-    &lt;usb-device vendor-id="1234" product-id="5678" /&gt;
+    &lt;usb-device vendor-id="1234" product-id="5678" class="255" subclass="66" protocol="1" /&gt;
 &lt;/resources&gt;
 </pre>
 
diff --git a/docs/html/images/canvas.png b/docs/html/images/canvas.png
new file mode 100644
index 0000000..471657a
--- /dev/null
+++ b/docs/html/images/canvas.png
Binary files differ
diff --git a/docs/html/images/layout_bar.png b/docs/html/images/layout_bar.png
new file mode 100644
index 0000000..9ae677c
--- /dev/null
+++ b/docs/html/images/layout_bar.png
Binary files differ
diff --git a/docs/html/images/layout_editor.png b/docs/html/images/layout_editor.png
new file mode 100644
index 0000000..12cbe07
--- /dev/null
+++ b/docs/html/images/layout_editor.png
Binary files differ
diff --git a/docs/html/images/layout_outline.png b/docs/html/images/layout_outline.png
new file mode 100644
index 0000000..b128cf2
--- /dev/null
+++ b/docs/html/images/layout_outline.png
Binary files differ
diff --git a/docs/html/images/opengl/coordinates.png b/docs/html/images/opengl/coordinates.png
new file mode 100644
index 0000000..7180cd5
--- /dev/null
+++ b/docs/html/images/opengl/coordinates.png
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es10-1.png b/docs/html/images/opengl/helloopengl-es10-1.png
new file mode 100644
index 0000000..9aa2376
--- /dev/null
+++ b/docs/html/images/opengl/helloopengl-es10-1.png
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es10-2.png b/docs/html/images/opengl/helloopengl-es10-2.png
new file mode 100644
index 0000000..cdfd9c705
--- /dev/null
+++ b/docs/html/images/opengl/helloopengl-es10-2.png
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es20-1.png b/docs/html/images/opengl/helloopengl-es20-1.png
new file mode 100644
index 0000000..1f76c22
--- /dev/null
+++ b/docs/html/images/opengl/helloopengl-es20-1.png
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es20-2.png b/docs/html/images/opengl/helloopengl-es20-2.png
new file mode 100644
index 0000000..0fbbe60
--- /dev/null
+++ b/docs/html/images/opengl/helloopengl-es20-2.png
Binary files differ
diff --git a/docs/html/images/palette.png b/docs/html/images/palette.png
new file mode 100644
index 0000000..a892846
--- /dev/null
+++ b/docs/html/images/palette.png
Binary files differ
diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js
index 0fc10bf..720e143 100644
--- a/docs/html/resources/resources-data.js
+++ b/docs/html/resources/resources-data.js
@@ -782,6 +782,26 @@
     }
   },
   {
+    tags: ['tutorial', 'gl', 'new'],
+    path: 'tutorials/opengl/opengl-es10.html',
+    title: {
+      en: 'OpenGL ES 1.0'
+    },
+    description: {
+      en: 'The basics of implementing an application using the OpenGL ES 1.0 APIs.'
+    }
+  },
+  {
+    tags: ['tutorial', 'gl', 'new'],
+    path: 'tutorials/opengl/opengl-es20.html',
+    title: {
+      en: 'OpenGL ES 2.0'
+    },
+    description: {
+      en: 'The basics of implementing an application using the OpenGL ES 2.0 APIs.'
+    }
+  },
+  {
     tags: ['tutorial', 'testing'],
     path: 'tutorials/testing/helloandroid_test.html',
     title: {
diff --git a/docs/html/resources/tutorials/opengl/opengl-es10.jd b/docs/html/resources/tutorials/opengl/opengl-es10.jd
new file mode 100644
index 0000000..40304fd
--- /dev/null
+++ b/docs/html/resources/tutorials/opengl/opengl-es10.jd
@@ -0,0 +1,532 @@
+page.title=OpenGL ES 1.0
+parent.title=Tutorials
+parent.link=../../browser.html?tag=tutorial
+@jd:body
+
+
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    
+    <ol>
+      <li><a href="#creating">Create an Activity with GLSurfaceView</a></li>
+      <li>
+        <a href="#drawing">Draw a Shape on GLSurfaceView</a>
+        <ol>
+          <li><a href="#define-triangle">Define a Triangle</a></li>
+          <li><a href="#draw-triangle">Draw the Triangle</a></li>
+        </ol>
+      </li>
+      <li><a href="#projection-and-views">Apply Projection and Camera Views</a></li>
+      <li><a href="#motion">Add Motion</a></li>
+      <li><a href="#touch">Respond to Touch Events</a></li>
+    </ol>
+    <h2 id="code-samples-list">Related Samples</h2>
+    <ol>
+      <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+index.html">API Demos - graphics</a></li>
+      <li><a
+        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+GLSurfaceViewActivity.html">OpenGL ES 1.0 Sample</a></li>
+      <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+TouchRotateActivity.html">TouchRotateActivity</a></li>
+    </ol>
+    <h2>See also</h2>
+    <ol>
+      <li><a href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a></li>
+      <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL
+ES 2.0</a></li>
+    </ol>
+    </div>
+  </div>
+
+<p>This tutorial shows you how to create a simple Android application that uses the OpenGL ES 1.0
+API to perform some basic graphics operations. You'll learn how to:</p>
+
+<ul>
+  <li>Create an activity using {@link android.opengl.GLSurfaceView} and {@link
+android.opengl.GLSurfaceView.Renderer}</li>
+  <li>Create and draw a graphic object</li>
+  <li>Define a projection to correct for screen geometry</li>
+  <li>Define a camera view</li>
+  <li>Rotate a graphic object</li>
+  <li>Make graphics touch-interactive</li>
+</ul>
+
+<p>The Android framework supports both the OpenGL ES 1.0/1.1 and OpenGL ES 2.0 APIs. You should
+carefully consider which version of the OpenGL ES API (1.0/1.1 or 2.0) is most appropriate for your
+needs. For more information, see
+<a href="{@docRoot}guide/topics/graphics/opengl.html#choosing-version">Choosing an OpenGL API
+Version</a>. If you would prefer to use OpenGL ES 2.0, see the <a
+href="{@docRoot}resources/tutorials/opengl/opengl-es20.jd">OpenGL ES 2.0 tutorial</a>.</p>
+
+<p>Before you start, you should understand how to create a basic Android application. If you do not
+know how to create an app, follow the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello
+World Tutorial</a> to familiarize yourself with the process.</p>
+
+<h2 id="creating">Create an Activity with GLSurfaceView</h2>
+
+<p>To get started using OpenGL, you must implement both a {@link android.opengl.GLSurfaceView} and a
+{@link android.opengl.GLSurfaceView.Renderer}. The {@link android.opengl.GLSurfaceView} is the main
+view type for applications that use OpenGL and the {@link android.opengl.GLSurfaceView.Renderer}
+controls what is drawn within that view. (For more information about these classes, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.)</p>
+
+<p>To create an activity using {@code GLSurfaceView}:</p>
+  
+<ol>
+  <li>Start a new Android project that targets Android 1.6 (API Level 4) or higher.
+  </li>
+  <li>Name the project <strong>HelloOpenGLES10</strong> and make sure it includes an activity called
+{@code HelloOpenGLES10}.
+  </li> 
+  <li>Modify the {@code HelloOpenGLES10} class as follows:
+<pre>
+package com.example.android.apis.graphics;
+
+import android.app.Activity;
+import android.content.Context;
+import android.opengl.GLSurfaceView;
+import android.os.Bundle;
+
+public class HelloOpenGLES10 extends Activity {
+  
+    private GLSurfaceView mGLView;
+  
+    &#64;Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        // Create a GLSurfaceView instance and set it
+        // as the ContentView for this Activity.
+        mGLView = new HelloOpenGLES10SurfaceView(this);
+        setContentView(mGLView);
+    }
+    
+    &#64;Override
+    protected void onPause() {
+        super.onPause();
+        // The following call pauses the rendering thread.
+        // If your OpenGL application is memory intensive,
+        // you should consider de-allocating objects that
+        // consume significant memory here.
+        mGLView.onPause();
+    }
+    
+    &#64;Override
+    protected void onResume() {
+        super.onResume();
+        // The following call resumes a paused rendering thread.
+        // If you de-allocated graphic objects for onPause()
+        // this is a good place to re-allocate them.
+        mGLView.onResume();
+    }
+}
+  
+class HelloOpenGLES10SurfaceView extends GLSurfaceView {
+
+    public HelloOpenGLES10SurfaceView(Context context){
+        super(context);
+        
+        // Set the Renderer for drawing on the GLSurfaceView
+        setRenderer(new HelloOpenGLES10Renderer());
+    }
+}
+</pre>
+  <p class="note"><strong>Note:</strong> You will get a compile error for the {@code
+HelloOpenGLES10Renderer} class reference. That's expected; you will fix this error in the next step.
+  </p>
+  
+  <p>As shown above, this activity uses a single {@link android.opengl.GLSurfaceView} for its
+view. Notice that this activity implements crucial lifecycle callbacks for pausing and resuming its
+work.</p>
+
+  <p>The {@code HelloOpenGLES10SurfaceView} class in this example code above is just a thin wrapper
+for an instance of {@link android.opengl.GLSurfaceView} and is not strictly necessary for this
+example. However, if you want your application to monitor and respond to touch screen
+events&#8212;and we are guessing you do&#8212;you must extend {@link android.opengl.GLSurfaceView}
+to add touch event listeners, which you will learn how to do in the <a href="#touch">Reponding to
+Touch Events</a> section.</p>
+
+  <p>In order to draw graphics in the {@link android.opengl.GLSurfaceView}, you must define an
+implementation of {@link android.opengl.GLSurfaceView.Renderer}. In the next step, you create
+a renderer class to complete this OpenGL application.</p>
+  </li>
+
+  <li>Create a new file for the following class {@code HelloOpenGLES10Renderer}, which implements
+the {@link android.opengl.GLSurfaceView.Renderer} interface:
+
+<pre>
+package com.example.android.apis.graphics;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import android.opengl.GLSurfaceView;
+
+public class HelloOpenGLES10Renderer implements GLSurfaceView.Renderer {
+
+    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
+        // Set the background frame color
+        gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+    }
+    
+    public void onDrawFrame(GL10 gl) {
+        // Redraw background color
+        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
+    }
+    
+    public void onSurfaceChanged(GL10 gl, int width, int height) {
+        gl.glViewport(0, 0, width, height);
+    }
+  
+}
+</pre>
+  <p>This minimal implementation of {@link android.opengl.GLSurfaceView.Renderer} provides the
+code structure needed to use OpenGL drawing methods:
+<ul>
+  <li>{@link
+    android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
+    javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} is called once to set up the
+{@link android.opengl.GLSurfaceView}
+environment.</li>
+  <li>{@link
+        android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
+        onDrawFrame()} is called for each redraw of the {@link
+android.opengl.GLSurfaceView}.</li>
+  <li>{@link
+    android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
+    int, int) onSurfaceChanged()} is called if the geometry of the {@link
+android.opengl.GLSurfaceView} changes, for example when the device's screen orientation
+changes.</li>
+</ul>
+  </p>
+  <p>For more information about these methods, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.
+</p>
+  </li>
+</ol>
+
+<p>The code example above creates a simple Android application that displays a grey screen using
+OpenGL ES 1.0 calls. While this application does not do anything very interesting, by creating these
+classes, you have layed the foundation needed to start drawing graphic elements with OpenGL ES
+1.0.</p>
+
+<p>If you are familiar with the OpenGL ES APIs, these classes should give you enough information
+to use the OpenGL ES 1.0 API and create graphics. However, if you need a bit more help getting
+started with OpenGL, head on to the next sections for a few more hints.</p>
+
+<h2 id="drawing">Draw a Shape on GLSurfaceView</h2>
+
+<p>Once you have implemented a {@link android.opengl.GLSurfaceView.Renderer}, the next step is to
+draw something with it. This section shows you how to define and draw a triangle.</p>
+
+<h3 id="define-triangle">Define a Triangle</h3>
+
+<p>OpenGL allows you to define objects using coordinates in three-dimensional space. So, before you
+  can draw a triangle, you must define its coordinates. In OpenGL, the typical way to do this is to
+  define a vertex array for the coordinates.</p>
+  
+<p>By default, OpenGL ES assumes a coordinate system where [0,0,0] (X,Y,Z) specifies the center of
+  the {@link android.opengl.GLSurfaceView} frame, [1,1,0] is the top right corner of the frame and 
+[-1,-1,0] is  bottom left corner of the frame.</p> 
+
+<p>To define a vertex array for a triangle:</p>
+
+<ol>
+  <li>In your {@code HelloOpenGLES10Renderer} class, add new member variable to contain the
+vertices of a triangle shape:
+<pre>
+    private FloatBuffer triangleVB;
+</pre>
+  </li>
+
+  <li>Create a method, {@code initShapes()} which populates this member variable:
+<pre>
+    private void initShapes(){
+    
+        float triangleCoords[] = {
+            // X, Y, Z
+            -0.5f, -0.25f, 0,
+             0.5f, -0.25f, 0,
+             0.0f,  0.559016994f, 0
+        }; 
+        
+        // initialize vertex Buffer for triangle  
+        ByteBuffer vbb = ByteBuffer.allocateDirect(
+                // (# of coordinate values * 4 bytes per float)
+                triangleCoords.length * 4); 
+        vbb.order(ByteOrder.nativeOrder());// use the device hardware's native byte order
+        triangleVB = vbb.asFloatBuffer();  // create a floating point buffer from the ByteBuffer
+        triangleVB.put(triangleCoords);    // add the coordinates to the FloatBuffer
+        triangleVB.position(0);            // set the buffer to read the first coordinate
+    
+    }
+</pre>
+    <p>This method defines a two-dimensional triangle with three equal sides.</p>
+  </li>
+  <li>Modify your {@code onSurfaceCreated()} method to initialize your triangle: 
+    <pre>
+    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
+    
+        // Set the background frame color
+        gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+        
+        // initialize the triangle vertex array
+        initShapes();
+    }
+</pre>
+  <p class="caution"><strong>Caution:</strong> Shapes and other static objects should be initialized
+    once in your {@code onSurfaceCreated()} method for best performance. Avoid initializing the
+    new objects in {@code onDrawFrame()}, as this causes the system to re-create the objects
+    for every frame redraw and slows down your application.
+  </p>
+  </li>
+
+</ol>
+
+<p>You have now defined a triangle shape, but if you run the application, nothing appears. What?!
+You also have to tell OpenGL to draw the triangle, which you'll do in the next section.
+</p>
+
+
+<h3 id="draw-triangle">Draw the Triangle</h3>
+
+<p>Before you can draw your triangle, you must tell OpenGL that you are using vertex arrays. After
+that setup step, you can call the drawing APIs to display the triangle.</p>
+
+<p>To draw the triangle:</p>
+  
+<ol>
+  <li>Add the {@code glEnableClientState()} method to the end of {@code onSurfaceCreated()} to
+enable vertex arrays.
+<pre>
+        // Enable use of vertex arrays
+        gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
+</pre>
+    <p>At this point, you are ready to draw the triangle object in the OpenGL view.</p>
+  </li>
+  
+  <li>Add the following code to the end of your {@code onDrawFrame()} method to draw the triangle.
+<pre>
+        // Draw the triangle
+        gl.glColor4f(0.63671875f, 0.76953125f, 0.22265625f, 0.0f);
+        gl.glVertexPointer(3, GL10.GL_FLOAT, 0, triangleVB);
+        gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 3);
+</pre>
+  </li>
+  <li id="squashed-triangle">Run the app! Your application should look something like this:
+  </li>
+</ol>
+    
+<img src="{@docRoot}images/opengl/helloopengl-es10-1.png">
+<p class="img-caption">
+  <strong>Figure 1.</strong> Triangle drawn without a projection or camera view.
+</p>
+
+<p>There are a few problems with this example. First of all, it is not going to impress your
+friends. Secondly, the triangle is a bit squashed and changes shape when you change the screen
+orientation of the device. The reason the shape is skewed is due to the fact that the object is
+being rendered in a frame which is not perfectly square. You'll fix that problem using a projection
+and camera view in the next section.</p>
+
+<p>Lastly, because the triangle is stationary, the system is redrawing the object repeatedly in
+exactly the same place, which is not the most efficient use of the OpenGL graphics pipeline. In the
+<a href="#motion">Add Motion</a> section, you'll make this shape rotate and justify
+this use of processing power.</p>
+
+<h2 id="projection-and-views">Apply Projection and Camera View</h2>
+
+<p>One of the basic problems in displaying graphics is that Android device displays are typically
+not square and, by default, OpenGL happily maps a perfectly square, uniform coordinate
+system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
+projection mode and camera view (eye point) to transform the coordinates of your graphic objects
+so they have the correct proportions on any display. For more information about OpenGL coordinate
+mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Coordinate
+Mapping for Drawn Objects</a>.</p>
+
+<p>To apply projection and camera view transformations to your triangle:
+</p>
+<ol>
+  <li>Modify your {@code onSurfaceChanged()} method to enable {@link
+    javax.microedition.khronos.opengles.GL10#GL_PROJECTION GL10.GL_PROJECTION} mode, calculate the
+    screen ratio and apply the ratio as a transformation of the object coordinates.
+<pre>
+  public void onSurfaceChanged(GL10 gl, int width, int height) {
+      gl.glViewport(0, 0, width, height);
+      
+      // make adjustments for screen ratio
+      float ratio = (float) width / height;
+      gl.glMatrixMode(GL10.GL_PROJECTION);        // set matrix to projection mode
+      gl.glLoadIdentity();                        // reset the matrix to its default state
+      gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);  // apply the projection matrix
+  }  
+</pre>
+  </li>
+
+  <li>Next, modify your {@code onDrawFrame()} method to apply the {@link
+javax.microedition.khronos.opengles.GL10#GL_MODELVIEW GL_MODELVIEW} mode and set
+a view point using {@link android.opengl.GLU#gluLookAt(javax.microedition.khronos.opengles.GL10,
+float, float, float, float, float, float, float, float, float) GLU.gluLookAt()}.
+<pre>
+    public void onDrawFrame(GL10 gl) {
+        // Redraw background color
+        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
+        
+        // Set GL_MODELVIEW transformation mode
+        gl.glMatrixMode(GL10.GL_MODELVIEW);
+        gl.glLoadIdentity();   // reset the matrix to its default state
+        
+        // When using GL_MODELVIEW, you must set the view point
+        GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);        
+        
+        // Draw the triangle
+        ...
+    }
+</pre>
+  </li>
+  <li>Run the updated application and you should see something like this:</li>
+</ol>
+
+<img src="{@docRoot}images/opengl/helloopengl-es10-2.png">
+<p class="img-caption">
+  <strong>Figure 2.</strong> Triangle drawn with a projection and camera view applied.
+</p>
+
+<p>Now that you have applied this transformation, the triangle has three equal sides, instead of the
+<a href="#squashed-triangle">squashed triangle</a> in the earlier version.</p>
+
+<h2 id="motion">Add Motion</h2>
+
+<p>While it may be an interesting exercise to create static graphic objects with OpenGL ES, chances
+are you want at least <em>some</em> of your objects to move. In this section, you'll add motion to
+your triangle by rotating it.</p>
+
+<p>To add rotation to your triangle:</p>
+<ol>
+  <li>Modify your {@code onDrawFrame()} method to rotate the triangle object:
+<pre>
+    public void onDrawFrame(GL10 gl) {
+        ...    
+        // When using GL_MODELVIEW, you must set the view point
+        GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);        
+    
+        // Create a rotation for the triangle
+        long time = SystemClock.uptimeMillis() % 4000L;
+        float angle = 0.090f * ((int) time);
+        gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);        
+        
+        // Draw the triangle
+        ...
+    }
+</pre>
+  </li>
+  <li>Run the application and your triangle should rotate around its center.</li>
+</ol>
+
+
+<h2 id="touch">Respond to Touch Events</h2>
+<p>Making objects move according to a preset program like the rotating triangle  is useful for
+getting some attention, but what if you want to have users interact with your OpenGL graphics? In
+this section, you'll learn how listen for touch events to let users interact with objects in your
+{@code HelloOpenGLES10SurfaceView}.</p>
+  
+<p>The key to making your OpenGL application touch interactive is expanding your implementation of
+{@link android.opengl.GLSurfaceView} to override the {@link 
+android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} to listen for touch events.
+Before you do that, however, you'll modify the renderer class to expose the rotation angle of the
+triangle. Afterwards, you'll modify the {@code HelloOpenGLES10SurfaceView} to process touch events
+and pass that data to your renderer.</p>
+
+<p>To make your triangle rotate in response to touch events:</p>
+
+<ol>
+  <li>Modify your {@code HelloOpenGLES10Renderer} class to include a new, public member so that
+your {@code HelloOpenGLES10SurfaceView} class is able to pass new rotation values your renderer:
+<pre>
+    public float mAngle;
+</pre>  
+  </li>
+  <li>In your {@code onDrawFrame()} method, comment out the code that generates an angle and
+replace the {@code angle} variable with {@code mAngle}.
+<pre>
+        // Create a rotation for the triangle (Boring! Comment this out:)
+        // long time = SystemClock.uptimeMillis() % 4000L;
+        // float angle = 0.090f * ((int) time);
+
+        // Use the mAngle member as the rotation value
+        gl.glRotatef(mAngle, 0.0f, 0.0f, 1.0f); 
+</pre>
+  </li>
+  <li>In your {@code HelloOpenGLES10SurfaceView} class, add the following member variables.
+<pre>
+    private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
+    private HelloOpenGLES10Renderer mRenderer;
+    private float mPreviousX;
+    private float mPreviousY;
+</pre>
+  </li>
+  <li>In the constructor method for {@code HelloOpenGLES10SurfaceView}, set the {@code mRenderer}
+member so you have a handle to pass in rotation input and set the render mode to {@link
+android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY}.
+<pre>
+    public HelloOpenGLES10SurfaceView(Context context){
+        super(context);
+        // set the mRenderer member
+        mRenderer = new HelloOpenGLES10Renderer();
+        setRenderer(mRenderer);
+        
+        // Render the view only when there is a change
+        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+    }
+</pre>
+  </li>
+  <li>In your {@code HelloOpenGLES10SurfaceView} class, override the {@link
+android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} method to listen for touch
+events and pass them to your renderer.
+<pre>
+    &#64;Override 
+    public boolean onTouchEvent(MotionEvent e) {
+        // MotionEvent reports input details from the touch screen
+        // and other input controls. In this case, you are only
+        // interested in events where the touch position changed.
+
+        float x = e.getX();
+        float y = e.getY();
+        
+        switch (e.getAction()) {
+            case MotionEvent.ACTION_MOVE:
+    
+                float dx = x - mPreviousX;
+                float dy = y - mPreviousY;
+    
+                // reverse direction of rotation above the mid-line
+                if (y &gt; getHeight() / 2) {
+                  dx = dx * -1 ;
+                }
+    
+                // reverse direction of rotation to left of the mid-line
+                if (x &lt; getWidth() / 2) {
+                  dy = dy * -1 ;
+                }
+              
+                mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR;
+                requestRender();
+        }
+
+        mPreviousX = x;
+        mPreviousY = y;
+        return true;
+    } 
+</pre>
+  <p class="note"><strong>Note:</strong> Touch events return pixel coordinates which <em>are not the
+same</em> as OpenGL coordinates. Touch coordinate [0,0] is the bottom-left of the screen and the
+highest value [max_X, max_Y] is the top-right corner of the screen. To match touch events to OpenGL
+graphic objects, you must translate touch coordinates into OpenGL coordinates.</p>
+  </li>
+  <li>Run the application and drag your finger or cursor around the screen to rotate the
+triangle.</li>
+</ol>
+<p>For another example of OpenGL touch event functionality, see <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+TouchRotateActivity.html">TouchRotateActivity</a>.</p>
\ No newline at end of file
diff --git a/docs/html/resources/tutorials/opengl/opengl-es20.jd b/docs/html/resources/tutorials/opengl/opengl-es20.jd
new file mode 100644
index 0000000..439f7d5
--- /dev/null
+++ b/docs/html/resources/tutorials/opengl/opengl-es20.jd
@@ -0,0 +1,652 @@
+page.title=OpenGL ES 2.0
+parent.title=Tutorials
+parent.link=../../browser.html?tag=tutorial
+@jd:body
+
+
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    
+    <ol>
+      <li><a href="#creating">Create an Activity with GLSurfaceView</a></li>
+      <li>
+        <a href="#drawing">Draw a Shape on GLSurfaceView</a>
+        <ol>
+          <li><a href="#define-triangle">Define a Triangle</a></li>
+          <li><a href="#draw-triangle">Draw the Triangle</a></li>
+        </ol>
+      </li>
+      <li><a href="#projection-and-views">Apply Projection and Camera Views</a></li>
+      <li><a href="#motion">Add Motion</a></li>
+      <li><a href="#touch">Respond to Touch Events</a></li>
+    </ol>
+    <h2 id="code-samples-list">Related Samples</h2>
+    <ol>
+      <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+index.html">API Demos - graphics</a></li>
+      <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+GLES20Activity.html">OpenGL ES 2.0 Sample</a></li>
+      <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+TouchRotateActivity.html">TouchRotateActivity</a></li>
+    </ol>
+    <h2>See also</h2>
+    <ol>
+      <li><a href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a></li>
+      <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL
+ES 1.0</a></li>
+    </ol>
+    </div>
+  </div>
+
+<p>This tutorial shows you how to create a simple Android application that uses the OpenGL ES 2.0
+API to perform some basic graphics operations. You'll learn how to:</p>
+
+<ul>
+  <li>Create an activity using {@link android.opengl.GLSurfaceView} and {@link
+android.opengl.GLSurfaceView.Renderer}</li>
+  <li>Create and draw a graphic object</li>
+  <li>Define a projection to correct for screen geometry</li>
+  <li>Define a camera view</li>
+  <li>Rotate a graphic object</li>
+  <li>Make graphics touch interactive</li>
+</ul>
+
+<p>The Android framework supports both the OpenGL ES 1.0/1.1 and OpenGL ES 2.0 APIs. You should
+carefully consider which version of the OpenGL ES API (1.0/1.1 or 2.0) is most appropriate for your
+needs. For more information, see
+<a href="{@docRoot}guide/topics/graphics/opengl.html#choosing-version">Choosing an OpenGL API
+Version</a>. If you would prefer to use OpenGL ES 1.0, see the <a
+href="{@docRoot}resources/tutorials/opengl/opengl-es10.jd">OpenGL ES 1.0 tutorial</a>.</p>
+
+<p>Before you start, you should understand how to create a basic Android application. If you do not
+know how to create an app, follow the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello
+World Tutorial</a> to familiarize yourself with the process.</p>
+
+<p class="caution"><strong>Caution:</strong> OpenGL ES 2.0 <em>is currently not supported</em> by
+the Android Emulator. You must have a physical test device running Android 2.2 (API Level 8) or
+higher in order to run and test the example code in this tutorial.</p>
+
+<h2 id="creating">Create an Activity with GLSurfaceView</h2>
+
+<p>To get started using OpenGL, you must implement both a {@link android.opengl.GLSurfaceView} and a
+{@link android.opengl.GLSurfaceView.Renderer}. The {@link android.opengl.GLSurfaceView} is the main
+view type for applications that use OpenGL and the {@link android.opengl.GLSurfaceView.Renderer}
+controls what is drawn within that view. (For more information about these classes, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.)</p>
+
+<p>To create an activity using {@code GLSurfaceView}:</p>
+  
+<ol>
+  <li>Start a new Android project that targets Android 2.2 (API Level 8) or higher.
+  </li>
+  <li>Name the project <strong>HelloOpenGLES20</strong> and make sure it includes an activity called
+{@code HelloOpenGLES20}.
+  </li> 
+  <li>Modify the {@code HelloOpenGLES20} class as follows:
+<pre>
+package com.example.android.apis.graphics;
+
+import android.app.Activity;
+import android.content.Context;
+import android.opengl.GLSurfaceView;
+import android.os.Bundle;
+
+public class HelloOpenGLES20 extends Activity {
+  
+    private GLSurfaceView mGLView;
+  
+    &#64;Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        // Create a GLSurfaceView instance and set it
+        // as the ContentView for this Activity
+        mGLView = new HelloOpenGLES20SurfaceView(this);
+        setContentView(mGLView);
+    }
+    
+    &#64;Override
+    protected void onPause() {
+        super.onPause();
+        // The following call pauses the rendering thread.
+        // If your OpenGL application is memory intensive,
+        // you should consider de-allocating objects that
+        // consume significant memory here.
+        mGLView.onPause();
+    }
+    
+    &#64;Override
+    protected void onResume() {
+        super.onResume();
+        // The following call resumes a paused rendering thread.
+        // If you de-allocated graphic objects for onPause()
+        // this is a good place to re-allocate them.
+        mGLView.onResume();
+    }
+}
+  
+class HelloOpenGLES20SurfaceView extends GLSurfaceView {
+
+    public HelloOpenGLES20SurfaceView(Context context){
+        super(context);
+        
+        // Create an OpenGL ES 2.0 context.
+        setEGLContextClientVersion(2);
+        // Set the Renderer for drawing on the GLSurfaceView
+        setRenderer(new HelloOpenGLES20Renderer());
+    }
+}
+</pre>
+  <p class="note"><strong>Note:</strong> You will get a compile error for the {@code
+HelloOpenGLES20Renderer} class reference. That's expected; you will fix this error in the next step.
+  </p>
+  
+  <p>As shown above, this activity uses a single {@link android.opengl.GLSurfaceView} for its
+view. Notice that this activity implements crucial lifecycle callbacks for pausing and resuming its
+work.</p>
+
+  <p>The {@code HelloOpenGLES20SurfaceView} class in this example code above is just a thin wrapper
+for an instance of {@link android.opengl.GLSurfaceView} and is not strictly necessary for this
+example. However, if you want your application to monitor and respond to touch screen
+events&#8212;and we are guessing you do&#8212;you must extend {@link android.opengl.GLSurfaceView}
+to add touch event listeners, which you will learn how to do in the <a href="#touch">Reponding to
+Touch Events</a> section.</p>
+
+  <p>In order to draw graphics in the {@link android.opengl.GLSurfaceView}, you must define an
+implementation of {@link android.opengl.GLSurfaceView.Renderer}. In the next step, you create
+a renderer class to complete this OpenGL application.</p>
+  </li>
+
+  <li>Create a new file for the following class {@code HelloOpenGLES20Renderer}, which implements
+the {@link android.opengl.GLSurfaceView.Renderer} interface:
+
+<pre>
+package com.example.android.apis.graphics;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import android.opengl.GLES20;
+import android.opengl.GLSurfaceView;
+
+public class HelloOpenGLES20Renderer implements GLSurfaceView.Renderer {
+  
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+    
+        // Set the background frame color
+        GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+    }
+    
+    public void onDrawFrame(GL10 unused) {
+    
+        // Redraw background color
+        GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
+    }
+    
+    public void onSurfaceChanged(GL10 unused, int width, int height) {
+        GLES20.glViewport(0, 0, width, height);
+    }
+  
+}
+</pre>
+  <p>This minimal implementation of {@link android.opengl.GLSurfaceView.Renderer} provides the
+code structure needed to use OpenGL drawing methods:
+<ul>
+  <li>{@link
+    android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
+    javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} is called once to set up the
+{@link android.opengl.GLSurfaceView}
+environment.</li>
+  <li>{@link
+        android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
+        onDrawFrame()} is called for each redraw of the {@link
+android.opengl.GLSurfaceView}.</li>
+  <li>{@link
+    android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
+    int, int) onSurfaceChanged()} is called if the geometry of the {@link
+android.opengl.GLSurfaceView} changes, for example when the device's screen orientation
+changes.</li>
+</ul>
+  </p>
+  <p>For more information about these methods, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.
+</p>
+  </li>
+</ol>
+
+<p>The code example above creates a simple Android application that displays a grey screen using
+OpenGL ES 2.0 calls. While this application does not do anything very interesting, by creating these
+classes, you have layed the foundation needed to start drawing graphic elements with OpenGL ES
+2.0.</p>
+
+<p>If you are familiar with the OpenGL ES APIs, these classes should give you enough information
+to use the OpenGL ES 2.0 API and create graphics. However, if you need a bit more help getting
+started with OpenGL, head on to the next sections for a few more hints.</p>
+
+<p class="note"><strong>Note:</strong> If your application requires OpenGL 2.0, make sure you
+declare this in your manifest:</p>
+<pre>
+    &lt;!-- Tell the system this app requires OpenGL ES 2.0. --&gt;
+    &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
+</pre>
+<p>For more information, see <a
+href="{@docRoot}guide/topics/graphics/opengl.html#manifest">OpenGL manifest declarations</a> in the
+<em>3D with OpenGL</em> document.</p>
+
+
+<h2 id="drawing">Draw a Shape on GLSurfaceView</h2>
+
+<p>Once you have implemented a {@link android.opengl.GLSurfaceView.Renderer}, the next step is to
+draw something with it. This section shows you how to define and draw a triangle.</p>
+
+<h3 id="define-triangle">Define a Triangle</h3>
+
+<p>OpenGL allows you to define objects using coordinates in three-dimensional space. So, before you
+  can draw a triangle, you must define its coordinates. In OpenGL, the typical way to do this is to
+  define a vertex array for the coordinates.</p>
+  
+<p>By default, OpenGL ES assumes a coordinate system where [0,0,0] (X,Y,Z) specifies the center of
+  the {@link android.opengl.GLSurfaceView} frame, [1,1,0] is the top-right corner of the frame and 
+[-1,-1,0] is  bottom-left corner of the frame.</p> 
+
+<p>To define a vertex array for a triangle:</p>
+
+<ol>
+  <li>In your {@code HelloOpenGLES20Renderer} class, add new member variable to contain the
+vertices of a triangle shape:
+<pre>
+    private FloatBuffer triangleVB;
+</pre>
+  </li>
+
+  <li>Create a method, {@code initShapes()} which populates this member variable:
+<pre>
+    private void initShapes(){
+    
+        float triangleCoords[] = {
+            // X, Y, Z
+            -0.5f, -0.25f, 0,
+             0.5f, -0.25f, 0,
+             0.0f,  0.559016994f, 0
+        }; 
+        
+        // initialize vertex Buffer for triangle  
+        ByteBuffer vbb = ByteBuffer.allocateDirect(
+                // (# of coordinate values * 4 bytes per float)
+                triangleCoords.length * 4); 
+        vbb.order(ByteOrder.nativeOrder());// use the device hardware's native byte order
+        triangleVB = vbb.asFloatBuffer();  // create a floating point buffer from the ByteBuffer
+        triangleVB.put(triangleCoords);    // add the coordinates to the FloatBuffer
+        triangleVB.position(0);            // set the buffer to read the first coordinate
+    
+    }
+</pre>
+    <p>This method defines a two-dimensional triangle shape with three equal sides.</p>
+  </li>
+  <li>Modify your {@code onSurfaceCreated()} method to initialize your triangle:
+<pre>
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+    
+        // Set the background frame color
+        GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+        
+        // initialize the triangle vertex array
+        initShapes();
+    }
+</pre>
+  <p class="caution"><strong>Caution:</strong> Shapes and other static objects should be initialized
+    once in your {@code onSurfaceCreated()} method for best performance. Avoid initializing the
+    new objects in {@code onDrawFrame()}, as this causes the system to re-create the objects
+    for every frame redraw and slows down your application.
+  </p>
+  </li>
+
+</ol>
+
+<p>You have now defined a triangle shape, but if you run the application, nothing appears. What?!
+You also have to tell OpenGL to draw the triangle, which you'll do in the next section.
+</p>
+
+
+<h3 id="draw-triangle">Draw the Triangle</h3>
+
+<p>The OpenGL ES 2.0 requires a bit more code than OpenGL ES 1.0/1.1 in order to draw objects. In
+this section, you'll create vertex and fragment shaders, a shader loader, apply the shaders, enable
+the use of vertex arrays for your triangle and, finally, draw it on screen.</p>
+
+<p>To draw the triangle:</p>
+  
+<ol>
+  <li>In your {@code HelloOpenGLES20Renderer} class, define a vertex shader and a fragment
+shader. Shader code is defined as a string which is compiled and run by the OpenGL ES 2.0 rendering
+engine.
+<pre>
+    private final String vertexShaderCode = 
+        "attribute vec4 vPosition; \n" +
+        "void main(){              \n" +
+        " gl_Position = vPosition; \n" +
+        "}                         \n";
+    
+    private final String fragmentShaderCode = 
+        "precision mediump float;  \n" +
+        "void main(){              \n" +
+        " gl_FragColor = vec4 (0.63671875, 0.76953125, 0.22265625, 1.0); \n" +
+        "}                         \n";
+</pre>
+    <p>The vertex shader controls how OpenGL positions and draws the vertices of shapes in space.
+The fragment shader controls what OpenGL draws <em>between</em> the vertices of shapes.</p>
+  </li>
+  <li>In your {@code HelloOpenGLES20Renderer} class, create a method for loading the shaders.
+<pre>
+    private int loadShader(int type, String shaderCode){
+    
+        // create a vertex shader type (GLES20.GL_VERTEX_SHADER)
+        // or a fragment shader type (GLES20.GL_FRAGMENT_SHADER)
+        int shader = GLES20.glCreateShader(type); 
+        
+        // add the source code to the shader and compile it
+        GLES20.glShaderSource(shader, shaderCode);
+        GLES20.glCompileShader(shader);
+        
+        return shader;
+    }
+</pre>
+  </li>
+  
+  <li>Add the following members to your {@code HelloOpenGLES20Renderer} class for an OpenGL
+Program and the positioning control for your triangle.
+<pre>
+    private int mProgram;
+    private int maPositionHandle;
+</pre>
+    <p>In OpenGL ES 2.0, you attach vertex and fragment shaders to a <em>Program</em> and then
+apply the program to the OpenGL graphics pipeline.</p>
+  </li>
+  
+  <li>Add the following code to the end of your {@code onSurfaceCreated()} method to load the
+shaders and attach them to an OpenGL Program.
+<pre>
+        int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);
+        int fragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);
+        
+        mProgram = GLES20.glCreateProgram();             // create empty OpenGL Program
+        GLES20.glAttachShader(mProgram, vertexShader);   // add the vertex shader to program
+        GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program
+        GLES20.glLinkProgram(mProgram);                  // creates OpenGL program executables
+        
+        // get handle to the vertex shader's vPosition member
+        maPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
+</pre>
+    <p>At this point, you are ready to draw the triangle object in the OpenGL view.</p>
+  </li>
+  
+  <li>Add the following code to the end of your {@code onDrawFrame()} method apply the OpenGL
+program you created, load the triangle object and draw the triangle.
+<pre>
+        // Add program to OpenGL environment
+        GLES20.glUseProgram(mProgram);
+        
+        // Prepare the triangle data
+        GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, 12, triangleVB);
+        GLES20.glEnableVertexAttribArray(maPositionHandle);
+        
+        // Draw the triangle
+        GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
+</pre>
+  </li>
+  <li id="squashed-triangle">Run the app! Your application should look something like this:
+  </li>
+</ol>
+
+<img src="{@docRoot}images/opengl/helloopengl-es20-1.png">
+<p class="img-caption">
+  <strong>Figure 1.</strong> Triangle drawn without a projection or camera view.
+</p>
+
+<p>There are a few problems with this example. First of all, it is not going to impress your
+friends. Secondly, the triangle is a bit squashed and changes shape when you change the screen
+orientation of the device. The reason the shape is skewed is due to the fact that the object is
+being rendered in a frame which is not perfectly square. You'll fix that problem using a projection
+and camera view in the next section.</p>
+
+<p>Lastly, because the triangle is stationary, the system is redrawing the object repeatedly in
+exactly the same place, which is not the most efficient use of the OpenGL graphics pipeline. In the
+<a href="#motion">Add Motion</a> section, you'll make this shape rotate and justify
+this use of processing power.</p>
+
+<h2 id="projection-and-views">Apply Projection and Camera View</h2>
+
+<p>One of the basic problems in displaying graphics is that Android device displays are typically
+not square and, by default, OpenGL happily maps a perfectly square, uniform coordinate
+system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
+projection mode and camera view (eye point) to transform the coordinates of your graphic objects
+so they have the correct proportions on any display. For more information about OpenGL coordinate
+mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Coordinate
+Mapping for Drawn Objects</a>.</p>
+
+<p>To apply projection and camera view transformations to your triangle:
+</p>
+<ol>
+  <li>Add the following members to your {@code HelloOpenGLES20Renderer} class.
+<pre>
+    private int muMVPMatrixHandle;
+    private float[] mMVPMatrix = new float[16];
+    private float[] mMMatrix = new float[16];
+    private float[] mVMatrix = new float[16];
+    private float[] mProjMatrix = new float[16];
+</pre>
+    </li>
+    <li>Modify your {@code vertexShaderCode} string to add a variable for a model view
+projection matrix.
+<pre>
+    private final String vertexShaderCode = 
+        // This matrix member variable provides a hook to manipulate
+        // the coordinates of the objects that use this vertex shader
+        "uniform mat4 uMVPMatrix;   \n" +
+        
+        "attribute vec4 vPosition;  \n" +
+        "void main(){               \n" +
+        
+        // the matrix must be included as a modifier of gl_Position
+        " gl_Position = uMVPMatrix * vPosition; \n" +
+        
+        "}  \n";
+</pre>
+    </li>
+    <li>Modify the {@code onSurfaceChanged()} method to calculate the device screen ratio and
+create a projection matrix.
+<pre>
+    public void onSurfaceChanged(GL10 unused, int width, int height) {
+        GLES20.glViewport(0, 0, width, height);
+        
+        float ratio = (float) width / height;
+        
+        // this projection matrix is applied to object coodinates
+        // in the onDrawFrame() method
+        Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
+    }  
+</pre>
+    </li>
+    <li>Add the following code to the end of your {@code onSurfaceChanged()} method to
+reference the {@code uMVPMatrix} shader matrix variable you added in step 2.
+<pre>
+        muMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
+</pre>
+    </li>
+    <li>Add the following code to the end of your {@code onSurfaceChanged()} method to define
+a camera view matrix.
+<pre>
+        Matrix.setLookAtM(mVMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
+</pre>
+    </li>
+    <li>Finally, modify your {@code onDrawFrame()} method to combine the projection and
+camera view matrices and then apply the combined transformation to the OpenGL rendering pipeline.
+<pre>
+    public void onDrawFrame(GL10 unused) {
+        ...
+        // Apply a ModelView Projection transformation
+        Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
+        GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
+        
+        // Draw the triangle
+        ...
+    }
+</pre>
+  </li>
+  <li>Run the updated application and you should see something like this:</li>
+</ol>
+
+<img src="{@docRoot}images/opengl/helloopengl-es20-2.png">
+<p class="img-caption">
+  <strong>Figure 2.</strong> Triangle drawn with a projection and camera view applied.
+</p>
+
+<p>Now that you have applied this transformation, the triangle has three equal sides, instead of the
+<a href="#squashed-triangle">squashed triangle</a> in the earlier version.</p>
+
+<h2 id="motion">Add Motion</h2>
+
+<p>While it may be an interesting exercise to create static graphic objects with OpenGL ES, chances
+are you want at least <em>some</em> of your objects to move. In this section, you'll add motion to
+your triangle by rotating it.</p>
+
+<p>To add rotation to your triangle:</p>
+<ol>
+  <li>Add an additional tranformation matrix member to your {@code HelloOpenGLES20Renderer}
+class.
+    <pre>
+      private float[] mMMatrix = new float[16];
+    </pre>
+    </li>
+  <li>Modify your {@code onDrawFrame()} method to rotate the triangle object.
+<pre>
+    public void onDrawFrame(GL10 gl) {
+        ...
+    
+        // Create a rotation for the triangle
+        long time = SystemClock.uptimeMillis() % 4000L;
+        float angle = 0.090f * ((int) time);
+        Matrix.setRotateM(mMMatrix, 0, angle, 0, 0, 1.0f);
+        Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, mMMatrix, 0);
+        Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
+        
+        // Apply a ModelView Projection transformation
+        GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
+        
+        // Draw the triangle
+        ...
+    }
+</pre>
+  </li>
+  <li>Run the application and your triangle should rotate around its center.</li>
+</ol>
+
+
+<h2 id="touch">Respond to Touch Events</h2>
+<p>Making objects move according to a preset program like the rotating triangle  is useful for
+getting some attention, but what if you want to have users interact with your OpenGL graphics? In
+this section, you'll learn how listen for touch events to let users interact with objects in your
+{@code HelloOpenGLES20SurfaceView}.</p>
+  
+<p>The key to making your OpenGL application touch interactive is expanding your implementation of
+{@link android.opengl.GLSurfaceView} to override the {@link 
+android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} to listen for touch events.
+Before you do that, however, you'll modify the renderer class to expose the rotation angle of the
+triangle. Afterwards, you'll modify the {@code HelloOpenGLES20SurfaceView} to process touch events
+and pass that data to your renderer.</p>
+
+<p>To make your triangle rotate in response to touch events:</p>
+
+<ol>
+  <li>Modify your {@code HelloOpenGLES20Renderer} class to include a new, public member so that
+your {@code HelloOpenGLES10SurfaceView} class is able to pass new rotation values your renderer:
+<pre>
+    public float mAngle;
+</pre>  
+  </li>
+  <li>In your {@code onDrawFrame()} method, comment out the code that generates an angle and
+replace the {@code angle} variable with {@code mAngle}.
+<pre>
+        // Create a rotation for the triangle (Boring! Comment this out:)
+        // long time = SystemClock.uptimeMillis() % 4000L;
+        // float angle = 0.090f * ((int) time);
+
+        // Use the mAngle member as the rotation value
+        Matrix.setRotateM(mMMatrix, 0, mAngle, 0, 0, 1.0f);
+</pre>
+  </li>
+  <li>In your {@code HelloOpenGLES20SurfaceView} class, add the following member variables.
+<pre>
+    private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
+    private HelloOpenGLES20Renderer mRenderer;
+    private float mPreviousX;
+    private float mPreviousY;
+</pre>
+  </li>
+  <li>In the constructor method for {@code HelloOpenGLES20SurfaceView}, set the {@code mRenderer}
+member so you have a handle to pass in rotation input and set the render mode to {@link
+android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY}.<pre>
+    public HelloOpenGLES20SurfaceView(Context context){
+        super(context);
+        // Create an OpenGL ES 2.0 context.
+        setEGLContextClientVersion(2);
+            
+        // set the mRenderer member
+        mRenderer = new HelloOpenGLES20Renderer();
+        setRenderer(mRenderer);
+        
+        // Render the view only when there is a change
+        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+    }
+</pre>
+  </li>
+  <li>In your {@code HelloOpenGLES20SurfaceView} class, override the {@link
+android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} method to listen for touch
+events and pass them to your renderer.
+<pre>
+    &#64;Override 
+    public boolean onTouchEvent(MotionEvent e) {
+        // MotionEvent reports input details from the touch screen
+        // and other input controls. In this case, you are only
+        // interested in events where the touch position changed.
+
+        float x = e.getX();
+        float y = e.getY();
+        
+        switch (e.getAction()) {
+            case MotionEvent.ACTION_MOVE:
+    
+                float dx = x - mPreviousX;
+                float dy = y - mPreviousY;
+    
+                // reverse direction of rotation above the mid-line
+                if (y &gt; getHeight() / 2) {
+                  dx = dx * -1 ;
+                }
+    
+                // reverse direction of rotation to left of the mid-line
+                if (x &lt; getWidth() / 2) {
+                  dy = dy * -1 ;
+                }
+              
+                mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR;
+                requestRender();
+        }
+
+        mPreviousX = x;
+        mPreviousY = y;
+        return true;
+    } 
+</pre>
+  <p class="note"><strong>Note:</strong> Touch events return pixel coordinates which <em>are not the
+same</em> as OpenGL coordinates. Touch coordinate [0,0] is the bottom-left of the screen and the
+highest value [max_X, max_Y] is the top-right corner of the screen. To match touch events to OpenGL
+graphic objects, you must translate touch coordinates into OpenGL coordinates.</p>
+  </li>
+  <li>Run the application and drag your finger or cursor around the screen to rotate the
+triangle.</li>
+</ol>
+<p>For another example of OpenGL touch event functionality, see <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
+TouchRotateActivity.html">TouchRotateActivity</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/ndk/overview.jd b/docs/html/sdk/ndk/overview.jd
index 93c664d..85599f7 100644
--- a/docs/html/sdk/ndk/overview.jd
+++ b/docs/html/sdk/ndk/overview.jd
@@ -457,7 +457,8 @@
 
     <li>Mac OS X 10.4.8 or later (x86 only)</li>
 
-    <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
+    <li>Linux (32 or 64-bit; Ubuntu 8.04, or other Linux distributions using GLibc 2.7 or
+later)</li>
   </ul>
 
   <h4>Required development tools</h4>
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index f13e9bb..e965f14 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -36,6 +36,7 @@
         kWhatShutdownCompleted   = 'scom',
         kWhatFlushCompleted      = 'fcom',
         kWhatOutputFormatChanged = 'outC',
+        kWhatError               = 'erro',
     };
 
     ACodec();
@@ -58,7 +59,6 @@
     struct OutputPortSettingsChangedState;
     struct ExecutingToIdleState;
     struct IdleToLoadedState;
-    struct ErrorState;
     struct FlushingState;
 
     enum {
@@ -102,7 +102,6 @@
     sp<OutputPortSettingsChangedState> mOutputPortSettingsChangedState;
     sp<ExecutingToIdleState> mExecutingToIdleState;
     sp<IdleToLoadedState> mIdleToLoadedState;
-    sp<ErrorState> mErrorState;
     sp<FlushingState> mFlushingState;
 
     AString mComponentName;
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index dd75497..a8ae5c6 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -203,6 +203,10 @@
         return texTransform;
     }
 
+    inline mat4& getTransform() {
+        return transform;
+    }
+
     /**
      * Bounds of the layer.
      */
@@ -282,6 +286,11 @@
      */
     mat4 texTransform;
 
+    /**
+     * Optional transform.
+     */
+    mat4 transform;
+
 }; // struct Layer
 
 }; // namespace uirenderer
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 9fc5131..769c99c 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -51,6 +51,7 @@
     data[kTranslateZ]   = 0.0f;
     data[kPerspective2] = 1.0f;
 
+    mIsIdentity = true;
     mSimpleMatrix = true;
 }
 
@@ -71,14 +72,21 @@
     return mSimpleMatrix;
 }
 
+bool Matrix4::isIdentity() {
+    return mIsIdentity;
+}
+
 void Matrix4::load(const float* v) {
     memcpy(data, v, sizeof(data));
+    // TODO: Do something smarter here
     mSimpleMatrix = false;
+    mIsIdentity = false;
 }
 
 void Matrix4::load(const Matrix4& v) {
     memcpy(data, v.data, sizeof(data));
     mSimpleMatrix = v.mSimpleMatrix;
+    mIsIdentity = v.mIsIdentity;
 }
 
 void Matrix4::load(const SkMatrix& v) {
@@ -99,6 +107,7 @@
     data[kScaleZ] = 1.0f;
 
     mSimpleMatrix = (v.getType() <= (SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask));
+    mIsIdentity = v.isIdentity();
 }
 
 void Matrix4::copyTo(SkMatrix& v) const {
@@ -148,6 +157,7 @@
             v.data[kSkewX] * v.data[kSkewY]) * scale;
 
     mSimpleMatrix = v.mSimpleMatrix;
+    mIsIdentity = v.mIsIdentity;
 }
 
 void Matrix4::copyTo(float* v) const {
@@ -166,20 +176,27 @@
     for (int i = 0; i < 16; i++) {
         data[i] *= v;
     }
+    mIsIdentity = false;
 }
 
 void Matrix4::loadTranslate(float x, float y, float z) {
     loadIdentity();
+
     data[kTranslateX] = x;
     data[kTranslateY] = y;
     data[kTranslateZ] = z;
+
+    mIsIdentity = false;
 }
 
 void Matrix4::loadScale(float sx, float sy, float sz) {
     loadIdentity();
+
     data[kScaleX] = sx;
     data[kScaleY] = sy;
     data[kScaleZ] = sz;
+
+    mIsIdentity = false;
 }
 
 void Matrix4::loadSkew(float sx, float sy) {
@@ -198,6 +215,7 @@
     data[kPerspective2] = 1.0f;
 
     mSimpleMatrix = false;
+    mIsIdentity = false;
 }
 
 void Matrix4::loadRotate(float angle, float x, float y, float z) {
@@ -238,6 +256,7 @@
     data[kScaleZ] = z * z * nc +  c;
 
     mSimpleMatrix = false;
+    mIsIdentity = false;
 }
 
 void Matrix4::loadMultiply(const Matrix4& u, const Matrix4& v) {
@@ -262,16 +281,20 @@
     }
 
     mSimpleMatrix = u.mSimpleMatrix && v.mSimpleMatrix;
+    mIsIdentity = false;
 }
 
 void Matrix4::loadOrtho(float left, float right, float bottom, float top, float near, float far) {
     loadIdentity();
+
     data[kScaleX] = 2.0f / (right - left);
     data[kScaleY] = 2.0f / (top - bottom);
     data[kScaleZ] = -2.0f / (far - near);
     data[kTranslateX] = -(right + left) / (right - left);
     data[kTranslateY] = -(top + bottom) / (top - bottom);
     data[kTranslateZ] = -(far + near) / (far - near);
+
+    mIsIdentity = false;
 }
 
 #define MUL_ADD_STORE(a, b, c) a = (a) * (b) + (c)
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index 2fa6ab7..56fd37d 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -112,6 +112,7 @@
 
     bool isPureTranslate();
     bool isSimple();
+    bool isIdentity();
 
     bool changesBounds();
 
@@ -128,6 +129,7 @@
 
 private:
     bool mSimpleMatrix;
+    bool mIsIdentity;
 
     inline float get(int i, int j) const {
         return data[i * 4 + j];
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 4864cff..a0f806a 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -627,6 +627,12 @@
 void OpenGLRenderer::drawTextureLayer(Layer* layer, const Rect& rect) {
     float alpha = layer->getAlpha() / 255.0f;
 
+    mat4& transform = layer->getTransform();
+    if (!transform.isIdentity()) {
+        save(0);
+        mSnapshot->transform->multiply(transform);
+    }
+
     setupDraw();
     if (layer->getRenderTarget() == GL_TEXTURE_2D) {
         setupDrawWithTexture();
@@ -663,6 +669,10 @@
     glDrawArrays(GL_TRIANGLE_STRIP, 0, gMeshCount);
 
     finishDrawTexture();
+
+    if (!transform.isIdentity()) {
+        restore();
+    }
 }
 
 void OpenGLRenderer::composeLayerRect(Layer* layer, const Rect& rect, bool swap) {
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index 0dea971..f277582 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -127,6 +127,7 @@
 	}
 
 ElementCreate {
+        direct
 	param RsDataType mType
 	param RsDataKind mKind
 	param bool mNormalized
@@ -135,6 +136,7 @@
 	}
 
 ElementCreate2 {
+        direct
 	param const RsElement * elements
 	param const char ** names
 	param const uint32_t * arraySize
@@ -226,6 +228,7 @@
 	}
 
 SamplerCreate {
+    direct
     param RsSamplerValue magFilter
     param RsSamplerValue minFilter
     param RsSamplerValue wrapS
@@ -311,6 +314,7 @@
 
 
 ProgramStoreCreate {
+	direct
 	param bool colorMaskR
 	param bool colorMaskG
 	param bool colorMaskB
@@ -324,6 +328,7 @@
 	}
 
 ProgramRasterCreate {
+	direct
 	param bool pointSmooth
 	param bool lineSmooth
 	param bool pointSprite
@@ -352,12 +357,14 @@
 	}
 
 ProgramFragmentCreate {
+	direct
 	param const char * shaderText
 	param const uint32_t * params
 	ret RsProgramFragment
 	}
 
 ProgramVertexCreate {
+	direct
 	param const char * shaderText
 	param const uint32_t * params
 	ret RsProgramVertex
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index b59ade8..a366d49 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -252,6 +252,7 @@
 
     Allocation *alloc = Allocation::createAllocation(rsc, type, RS_ALLOCATION_USAGE_SCRIPT);
     alloc->setName(name.string(), name.size());
+    type->decUserRef();
 
     uint32_t count = dataSize / type->getElementSizeBytes();
 
@@ -307,12 +308,12 @@
         return;
     }
 
-    Type *t = mHal.state.type->cloneAndResize1D(rsc, dimX);
+    ObjectBaseRef<Type> t = mHal.state.type->cloneAndResize1D(rsc, dimX);
     if (dimX < oldDimX) {
         decRefs(getPtr(), oldDimX - dimX, dimX);
     }
-    rsc->mHal.funcs.allocation.resize(rsc, this, t, mHal.state.hasReferences);
-    mHal.state.type.set(t);
+    rsc->mHal.funcs.allocation.resize(rsc, this, t.get(), mHal.state.hasReferences);
+    mHal.state.type.set(t.get());
     updateCache();
 }
 
diff --git a/libs/rs/rsComponent.cpp b/libs/rs/rsComponent.cpp
index e65febb..ce06306 100644
--- a/libs/rs/rsComponent.cpp
+++ b/libs/rs/rsComponent.cpp
@@ -176,36 +176,6 @@
     return (mType >= RS_TYPE_ELEMENT);
 }
 
-String8 Component::getGLSLType() const {
-    if (mType == RS_TYPE_SIGNED_32) {
-        switch (mVectorSize) {
-        case 1: return String8("int");
-        case 2: return String8("ivec2");
-        case 3: return String8("ivec3");
-        case 4: return String8("ivec4");
-        }
-    }
-    if (mType == RS_TYPE_FLOAT_32) {
-        switch (mVectorSize) {
-        case 1: return String8("float");
-        case 2: return String8("vec2");
-        case 3: return String8("vec3");
-        case 4: return String8("vec4");
-        }
-    }
-    if ((mType == RS_TYPE_MATRIX_4X4) && (mVectorSize == 1)) {
-        return String8("mat4");
-    }
-    if ((mType == RS_TYPE_MATRIX_3X3) && (mVectorSize == 1)) {
-        return String8("mat3");
-    }
-    if ((mType == RS_TYPE_MATRIX_2X2) && (mVectorSize == 1)) {
-        return String8("mat2");
-    }
-    return String8();
-}
-
-
 static const char * gTypeBasicStrings[] = {
     "NONE",
     "F16",
diff --git a/libs/rs/rsComponent.h b/libs/rs/rsComponent.h
index a448f0e..6ddc990 100644
--- a/libs/rs/rsComponent.h
+++ b/libs/rs/rsComponent.h
@@ -32,10 +32,8 @@
 
     void set(RsDataType dt, RsDataKind dk, bool norm, uint32_t vecSize=1);
 
-    String8 getGLSLType() const;
     void dumpLOGV(const char *prefix) const;
 
-
     RsDataType getType() const {return mType;}
     RsDataKind getKind() const {return mKind;}
     bool getIsNormalized() const {return mNormalized;}
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index bffe3c0..f65dd472 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -240,6 +240,7 @@
         rsc->setProgramStore(NULL);
         rsc->mStateFont.init(rsc);
         rsc->setFont(NULL);
+        rsc->mStateSampler.init(rsc);
         rsc->mFBOCache.init(rsc);
     }
 
@@ -307,6 +308,7 @@
          mStateFragment.deinit(this);
          mStateFragmentStore.deinit(this);
          mStateFont.deinit(this);
+         mStateSampler.deinit(this);
          mFBOCache.deinit(this);
     }
     //LOGV("destroyWorkerThreadResources 2");
diff --git a/libs/rs/rsElement.cpp b/libs/rs/rsElement.cpp
index b77b18a..36bbdf0 100644
--- a/libs/rs/rsElement.cpp
+++ b/libs/rs/rsElement.cpp
@@ -29,13 +29,16 @@
 }
 
 Element::~Element() {
+    clear();
+}
+
+void Element::preDestroy() const {
     for (uint32_t ct = 0; ct < mRSC->mStateElement.mElements.size(); ct++) {
         if (mRSC->mStateElement.mElements[ct] == this) {
             mRSC->mStateElement.mElements.removeAt(ct);
             break;
         }
     }
-    clear();
 }
 
 void Element::clear() {
@@ -60,6 +63,7 @@
 void Element::dumpLOGV(const char *prefix) const {
     ObjectBase::dumpLOGV(prefix);
     LOGV("%s Element: fieldCount: %zu,  size bytes: %zu", prefix, mFieldCount, getSizeBytes());
+    mComponent.dumpLOGV(prefix);
     for (uint32_t ct = 0; ct < mFieldCount; ct++) {
         LOGV("%s Element field index: %u ------------------", prefix, ct);
         LOGV("%s name: %s, offsetBits: %u, arraySize: %u",
@@ -97,60 +101,46 @@
     String8 name;
     stream->loadString(&name);
 
-    Element *elem = new Element(rsc);
-    elem->mComponent.loadFromStream(stream);
+    Component component;
+    component.loadFromStream(stream);
 
-    elem->mFieldCount = stream->loadU32();
-    if (elem->mFieldCount) {
-        elem->mFields = new ElementField_t [elem->mFieldCount];
-        for (uint32_t ct = 0; ct < elem->mFieldCount; ct ++) {
-            stream->loadString(&elem->mFields[ct].name);
-            elem->mFields[ct].arraySize = stream->loadU32();
-            Element *fieldElem = Element::createFromStream(rsc, stream);
-            elem->mFields[ct].e.set(fieldElem);
-        }
+    uint32_t fieldCount = stream->loadU32();
+    if (!fieldCount) {
+        return (Element *)Element::create(rsc,
+                                          component.getType(),
+                                          component.getKind(),
+                                          component.getIsNormalized(),
+                                          component.getVectorSize());;
     }
 
-    // We need to check if this already exists
-    for (uint32_t ct=0; ct < rsc->mStateElement.mElements.size(); ct++) {
-        Element *ee = rsc->mStateElement.mElements[ct];
-        if (ee->isEqual(elem)) {
-            ObjectBase::checkDelete(elem);
-            ee->incUserRef();
-            return ee;
-        }
+    const Element **subElems = new const Element *[fieldCount];
+    const char **subElemNames = new const char *[fieldCount];
+    size_t *subElemNamesLengths = new size_t[fieldCount];
+    uint32_t *arraySizes = new uint32_t[fieldCount];
+
+    String8 elemName;
+    for (uint32_t ct = 0; ct < fieldCount; ct ++) {
+        stream->loadString(&elemName);
+        subElemNamesLengths[ct] = elemName.length();
+        char *tmpName = new char[subElemNamesLengths[ct]];
+        memcpy(tmpName, elemName.string(), subElemNamesLengths[ct]);
+        subElemNames[ct] = tmpName;
+        arraySizes[ct] = stream->loadU32();
+        subElems[ct] = Element::createFromStream(rsc, stream);
     }
 
-    elem->compute();
-    rsc->mStateElement.mElements.push(elem);
-    return elem;
-}
+    const Element *elem = Element::create(rsc, fieldCount, subElems, subElemNames,
+                                          subElemNamesLengths, arraySizes);
+    for (uint32_t ct = 0; ct < fieldCount; ct ++) {
+        delete [] subElemNames[ct];
+        subElems[ct]->decUserRef();
+    }
+    delete[] subElems;
+    delete[] subElemNames;
+    delete[] subElemNamesLengths;
+    delete[] arraySizes;
 
-bool Element::isEqual(const Element *other) const {
-    if (other == NULL) {
-        return false;
-    }
-    if (!other->getFieldCount() && !mFieldCount) {
-        if ((other->getType() == getType()) &&
-           (other->getKind() == getKind()) &&
-           (other->getComponent().getIsNormalized() == getComponent().getIsNormalized()) &&
-           (other->getComponent().getVectorSize() == getComponent().getVectorSize())) {
-            return true;
-        }
-        return false;
-    }
-    if (other->getFieldCount() == mFieldCount) {
-        for (uint32_t i=0; i < mFieldCount; i++) {
-            if ((!other->mFields[i].e->isEqual(mFields[i].e.get())) ||
-                (other->mFields[i].name.length() != mFields[i].name.length()) ||
-                (other->mFields[i].name != mFields[i].name) ||
-                (other->mFields[i].arraySize != mFields[i].arraySize)) {
-                return false;
-            }
-        }
-        return true;
-    }
-    return false;
+    return (Element *)elem;
 }
 
 void Element::compute() {
@@ -172,9 +162,11 @@
 
 }
 
-const Element * Element::create(Context *rsc, RsDataType dt, RsDataKind dk,
+ObjectBaseRef<const Element> Element::createRef(Context *rsc, RsDataType dt, RsDataKind dk,
                                 bool isNorm, uint32_t vecSize) {
+    ObjectBaseRef<const Element> returnRef;
     // Look for an existing match.
+    ObjectBase::asyncLock();
     for (uint32_t ct=0; ct < rsc->mStateElement.mElements.size(); ct++) {
         const Element *ee = rsc->mStateElement.mElements[ct];
         if (!ee->getFieldCount() &&
@@ -183,21 +175,31 @@
             (ee->getComponent().getIsNormalized() == isNorm) &&
             (ee->getComponent().getVectorSize() == vecSize)) {
             // Match
-            ee->incUserRef();
+            returnRef.set(ee);
+            ObjectBase::asyncUnlock();
             return ee;
         }
     }
+    ObjectBase::asyncUnlock();
 
     Element *e = new Element(rsc);
+    returnRef.set(e);
     e->mComponent.set(dt, dk, isNorm, vecSize);
     e->compute();
+
+    ObjectBase::asyncLock();
     rsc->mStateElement.mElements.push(e);
-    return e;
+    ObjectBase::asyncUnlock();
+
+    return returnRef;
 }
 
-const Element * Element::create(Context *rsc, size_t count, const Element **ein,
+ObjectBaseRef<const Element> Element::createRef(Context *rsc, size_t count, const Element **ein,
                             const char **nin, const size_t * lengths, const uint32_t *asin) {
+
+    ObjectBaseRef<const Element> returnRef;
     // Look for an existing match.
+    ObjectBase::asyncLock();
     for (uint32_t ct=0; ct < rsc->mStateElement.mElements.size(); ct++) {
         const Element *ee = rsc->mStateElement.mElements[ct];
         if (ee->getFieldCount() == count) {
@@ -212,13 +214,16 @@
                 }
             }
             if (match) {
-                ee->incUserRef();
-                return ee;
+                returnRef.set(ee);
+                ObjectBase::asyncUnlock();
+                return returnRef;
             }
         }
     }
+    ObjectBase::asyncUnlock();
 
     Element *e = new Element(rsc);
+    returnRef.set(e);
     e->mFields = new ElementField_t [count];
     e->mFieldCount = count;
     for (size_t ct=0; ct < count; ct++) {
@@ -228,26 +233,11 @@
     }
     e->compute();
 
+    ObjectBase::asyncLock();
     rsc->mStateElement.mElements.push(e);
-    return e;
-}
+    ObjectBase::asyncUnlock();
 
-String8 Element::getGLSLType(uint32_t indent) const {
-    String8 s;
-    for (uint32_t ct=0; ct < indent; ct++) {
-        s.append(" ");
-    }
-
-    if (!mFieldCount) {
-        // Basic component.
-        s.append(mComponent.getGLSLType());
-    } else {
-        rsAssert(0);
-        //s.append("struct ");
-        //s.append(getCStructBody(indent));
-    }
-
-    return s;
+    return returnRef;
 }
 
 void Element::incRefs(const void *ptr) const {
@@ -294,6 +284,23 @@
     }
 }
 
+void Element::Builder::add(const Element *e, const char *nameStr, uint32_t arraySize) {
+    mBuilderElementRefs.push(ObjectBaseRef<const Element>(e));
+    mBuilderElements.push(e);
+    mBuilderNameStrings.push(nameStr);
+    mBuilderNameLengths.push(strlen(nameStr));
+    mBuilderArrays.push(arraySize);
+
+}
+
+ObjectBaseRef<const Element> Element::Builder::create(Context *rsc) {
+    return Element::createRef(rsc, mBuilderElements.size(),
+                              &(mBuilderElements.editArray()[0]),
+                              &(mBuilderNameStrings.editArray()[0]),
+                              mBuilderNameLengths.editArray(),
+                              mBuilderArrays.editArray());
+}
+
 
 ElementState::ElementState() {
     const uint32_t initialCapacity = 32;
@@ -324,10 +331,10 @@
 
 const Element *ElementState::elementBuilderCreate(Context *rsc) {
     return Element::create(rsc, mBuilderElements.size(),
-                                &(mBuilderElements.editArray()[0]),
-                                &(mBuilderNameStrings.editArray()[0]),
-                                mBuilderNameLengths.editArray(),
-                                mBuilderArrays.editArray());
+                           &(mBuilderElements.editArray()[0]),
+                           &(mBuilderNameStrings.editArray()[0]),
+                           mBuilderNameLengths.editArray(),
+                           mBuilderArrays.editArray());
 }
 
 
@@ -342,9 +349,7 @@
                             RsDataKind dk,
                             bool norm,
                             uint32_t vecSize) {
-    const Element *e = Element::create(rsc, dt, dk, norm, vecSize);
-    e->incUserRef();
-    return (RsElement)e;
+    return (RsElement)Element::create(rsc, dt, dk, norm, vecSize);
 }
 
 
@@ -358,15 +363,15 @@
 
                              const uint32_t * arraySizes,
                              size_t arraySizes_length) {
-    const Element *e = Element::create(rsc, ein_length, (const Element **)ein, names, nameLengths, arraySizes);
-    e->incUserRef();
-    return (RsElement)e;
+    return (RsElement)Element::create(rsc, ein_length, (const Element **)ein,
+                                      names, nameLengths, arraySizes);
 }
 
 }
 }
 
-void rsaElementGetNativeData(RsContext con, RsElement elem, uint32_t *elemData, uint32_t elemDataSize) {
+void rsaElementGetNativeData(RsContext con, RsElement elem,
+                             uint32_t *elemData, uint32_t elemDataSize) {
     rsAssert(elemDataSize == 5);
     // we will pack mType; mKind; mNormalized; mVectorSize; NumSubElements
     Element *e = static_cast<Element *>(elem);
@@ -378,7 +383,8 @@
     (*elemData++) = e->getFieldCount();
 }
 
-void rsaElementGetSubElements(RsContext con, RsElement elem, uint32_t *ids, const char **names, uint32_t dataSize) {
+void rsaElementGetSubElements(RsContext con, RsElement elem, uint32_t *ids,
+                              const char **names, uint32_t dataSize) {
     Element *e = static_cast<Element *>(elem);
     rsAssert(e->getFieldCount() == dataSize);
 
diff --git a/libs/rs/rsElement.h b/libs/rs/rsElement.h
index 26e2760..c3ef250 100644
--- a/libs/rs/rsElement.h
+++ b/libs/rs/rsElement.h
@@ -28,8 +28,17 @@
 // An element is a group of Components that occupies one cell in a structure.
 class Element : public ObjectBase {
 public:
-    ~Element();
-
+    class Builder {
+    public:
+        void add(const Element *e, const char *nameStr, uint32_t arraySize);
+        ObjectBaseRef<const Element> create(Context *rsc);
+    private:
+        Vector<ObjectBaseRef<const Element> > mBuilderElementRefs;
+        Vector<const Element *> mBuilderElements;
+        Vector<const char*> mBuilderNameStrings;
+        Vector<size_t> mBuilderNameLengths;
+        Vector<uint32_t> mBuilderArrays;
+    };
     uint32_t getGLType() const;
     uint32_t getGLFormat() const;
 
@@ -55,24 +64,45 @@
     RsDataKind getKind() const {return mComponent.getKind();}
     uint32_t getBits() const {return mBits;}
 
-    String8 getGLSLType(uint32_t indent=0) const;
-
     void dumpLOGV(const char *prefix) const;
     virtual void serialize(OStream *stream) const;
     virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_ELEMENT; }
     static Element *createFromStream(Context *rsc, IStream *stream);
 
-    static const Element * create(Context *rsc, RsDataType dt, RsDataKind dk,
-                            bool isNorm, uint32_t vecSize);
-    static const Element * create(Context *rsc, size_t count, const Element **,
-                            const char **, const size_t * lengths, const uint32_t *asin);
+    static ObjectBaseRef<const Element> createRef(Context *rsc,
+                                                  RsDataType dt,
+                                                  RsDataKind dk,
+                                                  bool isNorm,
+                                                  uint32_t vecSize);
+    static ObjectBaseRef<const Element> createRef(Context *rsc, size_t count,
+                                                  const Element **,
+                                                  const char **,
+                                                  const size_t * lengths,
+                                                  const uint32_t *asin);
+
+    static const Element* create(Context *rsc,
+                                 RsDataType dt,
+                                 RsDataKind dk,
+                                 bool isNorm,
+                                 uint32_t vecSize) {
+        ObjectBaseRef<const Element> elem = createRef(rsc, dt, dk, isNorm, vecSize);
+        elem->incUserRef();
+        return elem.get();
+    }
+    static const Element* create(Context *rsc, size_t count,
+                                 const Element **ein,
+                                 const char **nin,
+                                 const size_t * lengths,
+                                 const uint32_t *asin) {
+        ObjectBaseRef<const Element> elem = createRef(rsc, count, ein, nin, lengths, asin);
+        elem->incUserRef();
+        return elem.get();
+    }
 
     void incRefs(const void *) const;
     void decRefs(const void *) const;
     bool getHasReferences() const {return mHasReference;}
 
-    bool isEqual(const Element *other) const;
-
 protected:
     // deallocate any components that are part of this element.
     void clear();
@@ -88,12 +118,15 @@
     bool mHasReference;
 
 
+    virtual ~Element();
     Element(Context *);
 
     Component mComponent;
     uint32_t mBits;
 
     void compute();
+
+    virtual void preDestroy() const;
 };
 
 
diff --git a/libs/rs/rsFileA3D.cpp b/libs/rs/rsFileA3D.cpp
index cd02c24..df5dc12 100644
--- a/libs/rs/rsFileA3D.cpp
+++ b/libs/rs/rsFileA3D.cpp
@@ -68,7 +68,7 @@
     for (uint32_t i = 0; i < numIndexEntries; i ++) {
         A3DIndexEntry *entry = new A3DIndexEntry();
         headerStream->loadString(&entry->mObjectName);
-        LOGV("Header data, entry name = %s", entry->mObjectName.string());
+        //LOGV("Header data, entry name = %s", entry->mObjectName.string());
         entry->mType = (RsA3DClassID)headerStream->loadU32();
         if (mUse64BitOffsets){
             entry->mOffset = headerStream->loadOffset();
@@ -369,7 +369,7 @@
     }
 
     ObjectBase *obj = fa3d->initializeFromEntry(index);
-    LOGV("Returning object with name %s", obj->getName());
+    //LOGV("Returning object with name %s", obj->getName());
 
     return obj;
 }
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 3917ca1..7efed9d 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -490,49 +490,47 @@
     shaderString.append("  gl_FragColor = col;\n");
     shaderString.append("}\n");
 
-    const Element *colorElem = Element::create(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
-    const Element *gammaElem = Element::create(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 1);
-    mRSC->mStateElement.elementBuilderBegin();
-    mRSC->mStateElement.elementBuilderAdd(colorElem, "Color", 1);
-    mRSC->mStateElement.elementBuilderAdd(gammaElem, "Gamma", 1);
-    const Element *constInput = mRSC->mStateElement.elementBuilderCreate(mRSC);
+    ObjectBaseRef<const Element> colorElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
+    ObjectBaseRef<const Element> gammaElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 1);
+    Element::Builder builder;
+    builder.add(colorElem.get(), "Color", 1);
+    builder.add(gammaElem.get(), "Gamma", 1);
+    ObjectBaseRef<const Element> constInput = builder.create(mRSC);
 
-    Type *inputType = Type::getType(mRSC, constInput, 1, 0, 0, false, false);
+    ObjectBaseRef<Type> inputType = Type::getTypeRef(mRSC, constInput.get(), 1, 0, 0, false, false);
 
     uint32_t tmp[4];
     tmp[0] = RS_PROGRAM_PARAM_CONSTANT;
-    tmp[1] = (uint32_t)inputType;
+    tmp[1] = (uint32_t)inputType.get();
     tmp[2] = RS_PROGRAM_PARAM_TEXTURE_TYPE;
     tmp[3] = RS_TEXTURE_2D;
 
-    mFontShaderFConstant.set(Allocation::createAllocation(mRSC, inputType,
+    mFontShaderFConstant.set(Allocation::createAllocation(mRSC, inputType.get(),
                                             RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS));
     ProgramFragment *pf = new ProgramFragment(mRSC, shaderString.string(),
                                               shaderString.length(), tmp, 4);
     mFontShaderF.set(pf);
     mFontShaderF->bindAllocation(mRSC, mFontShaderFConstant.get(), 0);
 
-    Sampler *sampler = new Sampler(mRSC, RS_SAMPLER_NEAREST, RS_SAMPLER_NEAREST,
-                                      RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP);
-    mFontSampler.set(sampler);
-    mFontShaderF->bindSampler(mRSC, 0, sampler);
+    mFontSampler.set(Sampler::getSampler(mRSC, RS_SAMPLER_NEAREST, RS_SAMPLER_NEAREST,
+                                         RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP).get());
+    mFontShaderF->bindSampler(mRSC, 0, mFontSampler.get());
 
-    ProgramStore *fontStore = new ProgramStore(mRSC, true, true, true, true,
-                                               false, false,
-                                               RS_BLEND_SRC_SRC_ALPHA,
-                                               RS_BLEND_DST_ONE_MINUS_SRC_ALPHA,
-                                               RS_DEPTH_FUNC_ALWAYS);
-    mFontProgramStore.set(fontStore);
+    mFontProgramStore.set(ProgramStore::getProgramStore(mRSC, true, true, true, true,
+                                                        false, false,
+                                                        RS_BLEND_SRC_SRC_ALPHA,
+                                                        RS_BLEND_DST_ONE_MINUS_SRC_ALPHA,
+                                                        RS_DEPTH_FUNC_ALWAYS).get());
     mFontProgramStore->init();
 }
 
 void FontState::initTextTexture() {
-    const Element *alphaElem = Element::create(mRSC, RS_TYPE_UNSIGNED_8, RS_KIND_PIXEL_A, true, 1);
+    ObjectBaseRef<const Element> alphaElem = Element::createRef(mRSC, RS_TYPE_UNSIGNED_8, RS_KIND_PIXEL_A, true, 1);
 
     // We will allocate a texture to initially hold 32 character bitmaps
-    Type *texType = Type::getType(mRSC, alphaElem, 1024, 256, 0, false, false);
+    ObjectBaseRef<Type> texType = Type::getTypeRef(mRSC, alphaElem.get(), 1024, 256, 0, false, false);
 
-    Allocation *cacheAlloc = Allocation::createAllocation(mRSC, texType,
+    Allocation *cacheAlloc = Allocation::createAllocation(mRSC, texType.get(),
                                 RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE);
     mTextTexture.set(cacheAlloc);
     mTextTexture->syncAll(mRSC, RS_ALLOCATION_USAGE_SCRIPT);
@@ -557,11 +555,11 @@
 // Avoid having to reallocate memory and render quad by quad
 void FontState::initVertexArrayBuffers() {
     // Now lets write index data
-    const Element *indexElem = Element::create(mRSC, RS_TYPE_UNSIGNED_16, RS_KIND_USER, false, 1);
+    ObjectBaseRef<const Element> indexElem = Element::createRef(mRSC, RS_TYPE_UNSIGNED_16, RS_KIND_USER, false, 1);
     uint32_t numIndicies = mMaxNumberOfQuads * 6;
-    Type *indexType = Type::getType(mRSC, indexElem, numIndicies, 0, 0, false, false);
+    ObjectBaseRef<Type> indexType = Type::getTypeRef(mRSC, indexElem.get(), numIndicies, 0, 0, false, false);
 
-    Allocation *indexAlloc = Allocation::createAllocation(mRSC, indexType,
+    Allocation *indexAlloc = Allocation::createAllocation(mRSC, indexType.get(),
                                                           RS_ALLOCATION_USAGE_SCRIPT |
                                                           RS_ALLOCATION_USAGE_GRAPHICS_VERTEX);
     uint16_t *indexPtr = (uint16_t*)indexAlloc->getPtr();
@@ -582,19 +580,19 @@
 
     indexAlloc->sendDirty(mRSC);
 
-    const Element *posElem = Element::create(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 3);
-    const Element *texElem = Element::create(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 2);
+    ObjectBaseRef<const Element> posElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 3);
+    ObjectBaseRef<const Element> texElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 2);
 
-    mRSC->mStateElement.elementBuilderBegin();
-    mRSC->mStateElement.elementBuilderAdd(posElem, "position", 1);
-    mRSC->mStateElement.elementBuilderAdd(texElem, "texture0", 1);
-    const Element *vertexDataElem = mRSC->mStateElement.elementBuilderCreate(mRSC);
+    Element::Builder builder;
+    builder.add(posElem.get(), "position", 1);
+    builder.add(texElem.get(), "texture0", 1);
+    ObjectBaseRef<const Element> vertexDataElem = builder.create(mRSC);
 
-    Type *vertexDataType = Type::getType(mRSC, vertexDataElem,
-                                         mMaxNumberOfQuads * 4,
-                                         0, 0, false, false);
+    ObjectBaseRef<Type> vertexDataType = Type::getTypeRef(mRSC, vertexDataElem.get(),
+                                                          mMaxNumberOfQuads * 4,
+                                                          0, 0, false, false);
 
-    Allocation *vertexAlloc = Allocation::createAllocation(mRSC, vertexDataType,
+    Allocation *vertexAlloc = Allocation::createAllocation(mRSC, vertexDataType.get(),
                                                            RS_ALLOCATION_USAGE_SCRIPT);
     mTextMeshPtr = (float*)vertexAlloc->getPtr();
 
diff --git a/libs/rs/rsFont.h b/libs/rs/rsFont.h
index b0e1430..679591c 100644
--- a/libs/rs/rsFont.h
+++ b/libs/rs/rsFont.h
@@ -146,7 +146,6 @@
     void deinit(Context *rsc);
 
     ObjectBaseRef<Font> mDefault;
-    ObjectBaseRef<Font> mLast;
 
     void renderText(const char *text, uint32_t len, int32_t x, int32_t y,
                     uint32_t startIndex = 0, int numGlyphs = -1,
diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h
index 01850f1..c7cfb0e 100644
--- a/libs/rs/rsObjectBase.h
+++ b/libs/rs/rsObjectBase.h
@@ -114,7 +114,10 @@
     }
 
     ObjectBaseRef & operator= (const ObjectBaseRef &ref) {
-        return ObjectBaseRef(ref);
+        if (&ref != this) {
+            set(ref);
+        }
+        return *this;
     }
 
     ~ObjectBaseRef() {
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index b1d8f48..33eb422e 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -116,7 +116,7 @@
             rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind allocation");
             return;
         }
-        if (!alloc->getType()->isEqual(mHal.state.constantTypes[slot].get())) {
+        if (alloc->getType() != mHal.state.constantTypes[slot].get()) {
             LOGE("Attempt to bind alloc at slot %u, on shader id %u, but types mismatch",
                  slot, (uint32_t)this);
             rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind allocation");
diff --git a/libs/rs/rsProgramFragment.cpp b/libs/rs/rsProgramFragment.cpp
index 356ff77..ff29520 100644
--- a/libs/rs/rsProgramFragment.cpp
+++ b/libs/rs/rsProgramFragment.cpp
@@ -97,18 +97,18 @@
     shaderString.append("  gl_FragColor = col;\n");
     shaderString.append("}\n");
 
-    const Element *colorElem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
-    rsc->mStateElement.elementBuilderBegin();
-    rsc->mStateElement.elementBuilderAdd(colorElem, "Color", 1);
-    const Element *constInput = rsc->mStateElement.elementBuilderCreate(rsc);
+    ObjectBaseRef<const Element> colorElem = Element::createRef(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
+    Element::Builder builder;
+    builder.add(colorElem.get(), "Color", 1);
+    ObjectBaseRef<const Element> constInput = builder.create(rsc);
 
-    Type *inputType = Type::getType(rsc, constInput, 1, 0, 0, false, false);
+    ObjectBaseRef<Type> inputType = Type::getTypeRef(rsc, constInput.get(), 1, 0, 0, false, false);
 
     uint32_t tmp[2];
     tmp[0] = RS_PROGRAM_PARAM_CONSTANT;
-    tmp[1] = (uint32_t)inputType;
+    tmp[1] = (uint32_t)inputType.get();
 
-    Allocation *constAlloc = Allocation::createAllocation(rsc, inputType,
+    Allocation *constAlloc = Allocation::createAllocation(rsc, inputType.get(),
                               RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS);
     ProgramFragment *pf = new ProgramFragment(rsc, shaderString.string(),
                                               shaderString.length(), tmp, 2);
diff --git a/libs/rs/rsProgramRaster.cpp b/libs/rs/rsProgramRaster.cpp
index 435561d..945b5ec 100644
--- a/libs/rs/rsProgramRaster.cpp
+++ b/libs/rs/rsProgramRaster.cpp
@@ -37,6 +37,15 @@
     rsc->mHal.funcs.raster.init(rsc, this);
 }
 
+void ProgramRaster::preDestroy() const {
+    for (uint32_t ct = 0; ct < mRSC->mStateRaster.mRasterPrograms.size(); ct++) {
+        if (mRSC->mStateRaster.mRasterPrograms[ct] == this) {
+            mRSC->mStateRaster.mRasterPrograms.removeAt(ct);
+            break;
+        }
+    }
+}
+
 ProgramRaster::~ProgramRaster() {
     mRSC->mHal.funcs.raster.destroy(mRSC, this);
 }
@@ -65,8 +74,8 @@
 }
 
 void ProgramRasterState::init(Context *rsc) {
-    ProgramRaster *pr = new ProgramRaster(rsc, false, false, false, 1.f, RS_CULL_BACK);
-    mDefault.set(pr);
+    mDefault.set(ProgramRaster::getProgramRaster(rsc, false, false,
+                                                 false, 1.f, RS_CULL_BACK).get());
 }
 
 void ProgramRasterState::deinit(Context *rsc) {
@@ -74,19 +83,47 @@
     mLast.clear();
 }
 
+ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc,
+                                                             bool pointSmooth,
+                                                             bool lineSmooth,
+                                                             bool pointSprite,
+                                                             float lineWidth,
+                                                             RsCullMode cull) {
+    ObjectBaseRef<ProgramRaster> returnRef;
+    ObjectBase::asyncLock();
+    for (uint32_t ct = 0; ct < rsc->mStateRaster.mRasterPrograms.size(); ct++) {
+        ProgramRaster *existing = rsc->mStateRaster.mRasterPrograms[ct];
+        if (existing->mHal.state.pointSmooth != pointSmooth) continue;
+        if (existing->mHal.state.lineSmooth != lineSmooth) continue;
+        if (existing->mHal.state.pointSprite != pointSprite) continue;
+        if (existing->mHal.state.lineWidth != lineWidth) continue;
+        if (existing->mHal.state.cull != cull) continue;
+        returnRef.set(existing);
+        ObjectBase::asyncUnlock();
+        return returnRef;
+    }
+    ObjectBase::asyncUnlock();
+
+    ProgramRaster *pr = new ProgramRaster(rsc, pointSmooth,
+                                          lineSmooth, pointSprite, lineWidth, cull);
+    returnRef.set(pr);
+
+    ObjectBase::asyncLock();
+    rsc->mStateRaster.mRasterPrograms.push(pr);
+    ObjectBase::asyncUnlock();
+
+    return returnRef;
+}
+
 namespace android {
 namespace renderscript {
 
-RsProgramRaster rsi_ProgramRasterCreate(Context * rsc,
-                                      bool pointSmooth,
-                                      bool lineSmooth,
-                                      bool pointSprite,
-                                      float lineWidth,
-                                      RsCullMode cull) {
-    ProgramRaster *pr = new ProgramRaster(rsc, pointSmooth,
-                                          lineSmooth, pointSprite, lineWidth, cull);
+RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSmooth, bool lineSmooth,
+                                        bool pointSprite, float lineWidth, RsCullMode cull) {
+    ObjectBaseRef<ProgramRaster> pr = ProgramRaster::getProgramRaster(rsc, pointSmooth, lineSmooth,
+                                                                      pointSprite, lineWidth, cull);
     pr->incUserRef();
-    return pr;
+    return pr.get();
 }
 
 }
diff --git a/libs/rs/rsProgramRaster.h b/libs/rs/rsProgramRaster.h
index efdb948..09d7d54 100644
--- a/libs/rs/rsProgramRaster.h
+++ b/libs/rs/rsProgramRaster.h
@@ -27,19 +27,17 @@
 
 class ProgramRaster : public ProgramBase {
 public:
-    ProgramRaster(Context *rsc,
-                  bool pointSmooth,
-                  bool lineSmooth,
-                  bool pointSprite,
-                  float lineWidth,
-                  RsCullMode cull);
-    virtual ~ProgramRaster();
-
     virtual void setup(const Context *, ProgramRasterState *);
     virtual void serialize(OStream *stream) const;
     virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; }
     static ProgramRaster *createFromStream(Context *rsc, IStream *stream);
 
+    static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc,
+                                                         bool pointSmooth,
+                                                         bool lineSmooth,
+                                                         bool pointSprite,
+                                                         float lineWidth,
+                                                         RsCullMode cull);
     struct Hal {
         mutable void *drv;
 
@@ -55,6 +53,17 @@
     Hal mHal;
 
 protected:
+    virtual void preDestroy() const;
+    virtual ~ProgramRaster();
+
+private:
+    ProgramRaster(Context *rsc,
+                  bool pointSmooth,
+                  bool lineSmooth,
+                  bool pointSprite,
+                  float lineWidth,
+                  RsCullMode cull);
+
 };
 
 class ProgramRasterState {
@@ -66,6 +75,9 @@
 
     ObjectBaseRef<ProgramRaster> mDefault;
     ObjectBaseRef<ProgramRaster> mLast;
+
+    // Cache of all existing raster programs.
+    Vector<ProgramRaster *> mRasterPrograms;
 };
 
 
diff --git a/libs/rs/rsProgramStore.cpp b/libs/rs/rsProgramStore.cpp
index 8fe890b..7e25a22 100644
--- a/libs/rs/rsProgramStore.cpp
+++ b/libs/rs/rsProgramStore.cpp
@@ -41,6 +41,15 @@
     mHal.state.depthFunc = depthFunc;
 }
 
+void ProgramStore::preDestroy() const {
+    for (uint32_t ct = 0; ct < mRSC->mStateFragmentStore.mStorePrograms.size(); ct++) {
+        if (mRSC->mStateFragmentStore.mStorePrograms[ct] == this) {
+            mRSC->mStateFragmentStore.mStorePrograms.removeAt(ct);
+            break;
+        }
+    }
+}
+
 ProgramStore::~ProgramStore() {
     mRSC->mHal.funcs.store.destroy(mRSC, this);
 }
@@ -71,14 +80,58 @@
 ProgramStoreState::~ProgramStoreState() {
 }
 
+ObjectBaseRef<ProgramStore> ProgramStore::getProgramStore(Context *rsc,
+                                                          bool colorMaskR,
+                                                          bool colorMaskG,
+                                                          bool colorMaskB,
+                                                          bool colorMaskA,
+                                                          bool depthMask, bool ditherEnable,
+                                                          RsBlendSrcFunc srcFunc,
+                                                          RsBlendDstFunc destFunc,
+                                                          RsDepthFunc depthFunc) {
+    ObjectBaseRef<ProgramStore> returnRef;
+    ObjectBase::asyncLock();
+    for (uint32_t ct = 0; ct < rsc->mStateFragmentStore.mStorePrograms.size(); ct++) {
+        ProgramStore *existing = rsc->mStateFragmentStore.mStorePrograms[ct];
+        if (existing->mHal.state.ditherEnable != ditherEnable) continue;
+        if (existing->mHal.state.colorRWriteEnable != colorMaskR) continue;
+        if (existing->mHal.state.colorGWriteEnable != colorMaskG) continue;
+        if (existing->mHal.state.colorBWriteEnable != colorMaskB) continue;
+        if (existing->mHal.state.colorAWriteEnable != colorMaskA) continue;
+        if (existing->mHal.state.blendSrc != srcFunc) continue;
+        if (existing->mHal.state.blendDst != destFunc) continue;
+        if (existing->mHal.state.depthWriteEnable != depthMask) continue;
+        if (existing->mHal.state.depthFunc != depthFunc) continue;
+
+        returnRef.set(existing);
+        ObjectBase::asyncUnlock();
+        return returnRef;
+    }
+    ObjectBase::asyncUnlock();
+
+    ProgramStore *pfs = new ProgramStore(rsc,
+                                         colorMaskR, colorMaskG, colorMaskB, colorMaskA,
+                                         depthMask, ditherEnable,
+                                         srcFunc, destFunc, depthFunc);
+    returnRef.set(pfs);
+
+    pfs->init();
+
+    ObjectBase::asyncLock();
+    rsc->mStateFragmentStore.mStorePrograms.push(pfs);
+    ObjectBase::asyncUnlock();
+
+    return returnRef;
+}
+
+
+
 void ProgramStoreState::init(Context *rsc) {
-    ProgramStore *ps = new ProgramStore(rsc,
-                                        true, true, true, true,
-                                        true, true,
-                                        RS_BLEND_SRC_ONE, RS_BLEND_DST_ZERO,
-                                        RS_DEPTH_FUNC_LESS);
-    ps->init();
-    mDefault.set(ps);
+    mDefault.set(ProgramStore::getProgramStore(rsc,
+                                               true, true, true, true,
+                                               true, true,
+                                               RS_BLEND_SRC_ONE, RS_BLEND_DST_ZERO,
+                                               RS_DEPTH_FUNC_LESS).get());
 }
 
 void ProgramStoreState::deinit(Context *rsc) {
@@ -96,13 +149,14 @@
                                       RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc,
                                       RsDepthFunc depthFunc) {
 
-    ProgramStore *pfs = new ProgramStore(rsc,
-                                         colorMaskR, colorMaskG, colorMaskB, colorMaskA,
-                                         depthMask, ditherEnable,
-                                         srcFunc, destFunc, depthFunc);
-    pfs->init();
-    pfs->incUserRef();
-    return pfs;
+
+    ObjectBaseRef<ProgramStore> ps = ProgramStore::getProgramStore(rsc,
+                                                                   colorMaskR, colorMaskG,
+                                                                   colorMaskB, colorMaskA,
+                                                                   depthMask, ditherEnable,
+                                                                   srcFunc, destFunc, depthFunc);
+    ps->incUserRef();
+    return ps.get();
 }
 
 }
diff --git a/libs/rs/rsProgramStore.h b/libs/rs/rsProgramStore.h
index 77b3881..e21f039 100644
--- a/libs/rs/rsProgramStore.h
+++ b/libs/rs/rsProgramStore.h
@@ -28,18 +28,17 @@
 
 class ProgramStore : public ProgramBase {
 public:
-    ProgramStore(Context *,
-                 bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA,
-                 bool depthMask, bool ditherEnable,
-                 RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc,
-                 RsDepthFunc depthFunc);
-    virtual ~ProgramStore();
-
     virtual void setup(const Context *, ProgramStoreState *);
 
     virtual void serialize(OStream *stream) const;
     virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_STORE; }
     static ProgramStore *createFromStream(Context *rsc, IStream *stream);
+    static ObjectBaseRef<ProgramStore> getProgramStore(Context *,
+                                                       bool colorMaskR, bool colorMaskG,
+                                                       bool colorMaskB, bool colorMaskA,
+                                                       bool depthMask, bool ditherEnable,
+                                                       RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc,
+                                                       RsDepthFunc depthFunc);
 
     void init();
 
@@ -66,6 +65,15 @@
     Hal mHal;
 
 protected:
+    virtual void preDestroy() const;
+    virtual ~ProgramStore();
+
+private:
+    ProgramStore(Context *,
+                 bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA,
+                 bool depthMask, bool ditherEnable,
+                 RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc,
+                 RsDepthFunc depthFunc);
 };
 
 class ProgramStoreState {
@@ -77,6 +85,9 @@
 
     ObjectBaseRef<ProgramStore> mDefault;
     ObjectBaseRef<ProgramStore> mLast;
+
+    // Cache of all existing store programs.
+    Vector<ProgramStore *> mStorePrograms;
 };
 
 }
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index 058a456..51cb2a8a 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -150,26 +150,30 @@
 }
 
 void ProgramVertexState::init(Context *rsc) {
-    const Element *matrixElem = Element::create(rsc, RS_TYPE_MATRIX_4X4, RS_KIND_USER, false, 1);
-    const Element *f2Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 2);
-    const Element *f3Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 3);
-    const Element *f4Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
+    ObjectBaseRef<const Element> matrixElem = Element::createRef(rsc, RS_TYPE_MATRIX_4X4,
+                                                                 RS_KIND_USER, false, 1);
+    ObjectBaseRef<const Element> f2Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32,
+                                                             RS_KIND_USER, false, 2);
+    ObjectBaseRef<const Element> f3Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32,
+                                                             RS_KIND_USER, false, 3);
+    ObjectBaseRef<const Element> f4Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32,
+                                                             RS_KIND_USER, false, 4);
 
-    rsc->mStateElement.elementBuilderBegin();
-    rsc->mStateElement.elementBuilderAdd(matrixElem, "MV", 1);
-    rsc->mStateElement.elementBuilderAdd(matrixElem, "P", 1);
-    rsc->mStateElement.elementBuilderAdd(matrixElem, "TexMatrix", 1);
-    rsc->mStateElement.elementBuilderAdd(matrixElem, "MVP", 1);
-    const Element *constInput = rsc->mStateElement.elementBuilderCreate(rsc);
+    Element::Builder constBuilder;
+    constBuilder.add(matrixElem.get(), "MV", 1);
+    constBuilder.add(matrixElem.get(), "P", 1);
+    constBuilder.add(matrixElem.get(), "TexMatrix", 1);
+    constBuilder.add(matrixElem.get(), "MVP", 1);
+    ObjectBaseRef<const Element> constInput = constBuilder.create(rsc);
 
-    rsc->mStateElement.elementBuilderBegin();
-    rsc->mStateElement.elementBuilderAdd(f4Elem, "position", 1);
-    rsc->mStateElement.elementBuilderAdd(f4Elem, "color", 1);
-    rsc->mStateElement.elementBuilderAdd(f3Elem, "normal", 1);
-    rsc->mStateElement.elementBuilderAdd(f2Elem, "texture0", 1);
-    const Element *attrElem = rsc->mStateElement.elementBuilderCreate(rsc);
+    Element::Builder inputBuilder;
+    inputBuilder.add(f4Elem.get(), "position", 1);
+    inputBuilder.add(f4Elem.get(), "color", 1);
+    inputBuilder.add(f3Elem.get(), "normal", 1);
+    inputBuilder.add(f2Elem.get(), "texture0", 1);
+    ObjectBaseRef<const Element> attrElem = inputBuilder.create(rsc);
 
-    Type *inputType = Type::getType(rsc, constInput, 1, 0, 0, false, false);
+    ObjectBaseRef<Type> inputType = Type::getTypeRef(rsc, constInput.get(), 1, 0, 0, false, false);
 
     String8 shaderString(RS_SHADER_INTERNAL);
     shaderString.append("varying vec4 varColor;\n");
@@ -183,13 +187,13 @@
 
     uint32_t tmp[4];
     tmp[0] = RS_PROGRAM_PARAM_CONSTANT;
-    tmp[1] = (uint32_t)inputType;
+    tmp[1] = (uint32_t)inputType.get();
     tmp[2] = RS_PROGRAM_PARAM_INPUT;
-    tmp[3] = (uint32_t)attrElem;
+    tmp[3] = (uint32_t)attrElem.get();
 
     ProgramVertex *pv = new ProgramVertex(rsc, shaderString.string(),
                                           shaderString.length(), tmp, 4);
-    Allocation *alloc = Allocation::createAllocation(rsc, inputType,
+    Allocation *alloc = Allocation::createAllocation(rsc, inputType.get(),
                               RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS);
     pv->bindAllocation(rsc, alloc, 0);
 
diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp
index 2a05d16..5fc64a4 100644
--- a/libs/rs/rsSampler.cpp
+++ b/libs/rs/rsSampler.cpp
@@ -48,6 +48,15 @@
     mRSC->mHal.funcs.sampler.destroy(mRSC, this);
 }
 
+void Sampler::preDestroy() const {
+    for (uint32_t ct = 0; ct < mRSC->mStateSampler.mAllSamplers.size(); ct++) {
+        if (mRSC->mStateSampler.mAllSamplers[ct] == this) {
+            mRSC->mStateSampler.mAllSamplers.removeAt(ct);
+            break;
+        }
+    }
+}
+
 void Sampler::bindToContext(SamplerState *ss, uint32_t slot) {
     ss->mSamplers[slot].set(this);
     mBoundSlot = slot;
@@ -66,6 +75,39 @@
     return NULL;
 }
 
+ObjectBaseRef<Sampler> Sampler::getSampler(Context *rsc,
+                                           RsSamplerValue magFilter,
+                                           RsSamplerValue minFilter,
+                                           RsSamplerValue wrapS,
+                                           RsSamplerValue wrapT,
+                                           RsSamplerValue wrapR,
+                                           float aniso) {
+    ObjectBaseRef<Sampler> returnRef;
+    ObjectBase::asyncLock();
+    for (uint32_t ct = 0; ct < rsc->mStateSampler.mAllSamplers.size(); ct++) {
+        Sampler *existing = rsc->mStateSampler.mAllSamplers[ct];
+        if (existing->mHal.state.magFilter != magFilter) continue;
+        if (existing->mHal.state.minFilter != minFilter ) continue;
+        if (existing->mHal.state.wrapS != wrapS) continue;
+        if (existing->mHal.state.wrapT != wrapT) continue;
+        if (existing->mHal.state.wrapR != wrapR) continue;
+        if (existing->mHal.state.aniso != aniso) continue;
+        returnRef.set(existing);
+        ObjectBase::asyncUnlock();
+        return returnRef;
+    }
+    ObjectBase::asyncUnlock();
+
+    Sampler *s = new Sampler(rsc, magFilter, minFilter, wrapS, wrapT, wrapR, aniso);
+    returnRef.set(s);
+
+    ObjectBase::asyncLock();
+    rsc->mStateSampler.mAllSamplers.push(s);
+    ObjectBase::asyncUnlock();
+
+    return returnRef;
+}
+
 ////////////////////////////////
 
 namespace android {
@@ -78,9 +120,10 @@
                             RsSamplerValue wrapT,
                             RsSamplerValue wrapR,
                             float aniso) {
-    Sampler * s = new Sampler(rsc, magFilter, minFilter, wrapS, wrapT, wrapR, aniso);
+    ObjectBaseRef<Sampler> s = Sampler::getSampler(rsc, magFilter, minFilter,
+                                                   wrapS, wrapT, wrapR, aniso);
     s->incUserRef();
-    return s;
+    return s.get();
 }
 
 }}
diff --git a/libs/rs/rsSampler.h b/libs/rs/rsSampler.h
index 90b6082..e698132 100644
--- a/libs/rs/rsSampler.h
+++ b/libs/rs/rsSampler.h
@@ -30,16 +30,13 @@
 
 class Sampler : public ObjectBase {
 public:
-    Sampler(Context *,
-            RsSamplerValue magFilter,
-            RsSamplerValue minFilter,
-            RsSamplerValue wrapS,
-            RsSamplerValue wrapT,
-            RsSamplerValue wrapR,
-            float aniso = 1.0f);
-
-    virtual ~Sampler();
-
+    static ObjectBaseRef<Sampler> getSampler(Context *,
+                                             RsSamplerValue magFilter,
+                                             RsSamplerValue minFilter,
+                                             RsSamplerValue wrapS,
+                                             RsSamplerValue wrapT,
+                                             RsSamplerValue wrapR,
+                                             float aniso = 1.0f);
     void bindToContext(SamplerState *, uint32_t slot);
     void unbindFromContext(SamplerState *);
 
@@ -65,14 +62,33 @@
 protected:
     int32_t mBoundSlot;
 
+    virtual void preDestroy() const;
+    virtual ~Sampler();
+
 private:
     Sampler(Context *);
+    Sampler(Context *,
+            RsSamplerValue magFilter,
+            RsSamplerValue minFilter,
+            RsSamplerValue wrapS,
+            RsSamplerValue wrapT,
+            RsSamplerValue wrapR,
+            float aniso = 1.0f);
 };
 
 
 class SamplerState {
 public:
     ObjectBaseRef<Sampler> mSamplers[RS_MAX_SAMPLER_SLOT];
+    void init(Context *rsc) {
+    }
+    void deinit(Context *rsc) {
+        for (uint32_t i = 0; i < RS_MAX_SAMPLER_SLOT; i ++) {
+            mSamplers[i].clear();
+        }
+    }
+    // Cache of all existing raster programs.
+    Vector<Sampler *> mAllSamplers;
 };
 
 }
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp
index 10e3182..9a6a31b 100644
--- a/libs/rs/rsType.cpp
+++ b/libs/rs/rsType.cpp
@@ -25,7 +25,7 @@
     clear();
 }
 
-void Type::preDestroy() {
+void Type::preDestroy() const {
     for (uint32_t ct = 0; ct < mRSC->mStateType.mTypes.size(); ct++) {
         if (mRSC->mStateType.mTypes[ct] == this) {
             mRSC->mStateType.mTypes.removeAt(ct);
@@ -58,6 +58,7 @@
 }
 
 TypeState::~TypeState() {
+    rsAssert(!mTypes.size());
 }
 
 size_t Type::getOffsetForFace(uint32_t face) const {
@@ -183,7 +184,9 @@
     uint32_t z = stream->loadU32();
     uint8_t lod = stream->loadU8();
     uint8_t faces = stream->loadU8();
-    return Type::getType(rsc, elem, x, y, z, lod != 0, faces !=0 );
+    Type *type = Type::getType(rsc, elem, x, y, z, lod != 0, faces !=0 );
+    elem->decUserRef();
+    return type;
 }
 
 bool Type::getIsNp2() const {
@@ -203,24 +206,11 @@
     return false;
 }
 
-bool Type::isEqual(const Type *other) const {
-    if (other == NULL) {
-        return false;
-    }
-    if (other->getElement()->isEqual(getElement()) &&
-        other->getDimX() == mDimX &&
-        other->getDimY() == mDimY &&
-        other->getDimZ() == mDimZ &&
-        other->getDimLOD() == mDimLOD &&
-        other->getDimFaces() == mFaces) {
-        return true;
-    }
-    return false;
-}
+ObjectBaseRef<Type> Type::getTypeRef(Context *rsc, const Element *e,
+                                     uint32_t dimX, uint32_t dimY, uint32_t dimZ,
+                                     bool dimLOD, bool dimFaces) {
+    ObjectBaseRef<Type> returnRef;
 
-Type * Type::getType(Context *rsc, const Element *e,
-                     uint32_t dimX, uint32_t dimY, uint32_t dimZ,
-                     bool dimLOD, bool dimFaces) {
     TypeState * stc = &rsc->mStateType;
 
     ObjectBase::asyncLock();
@@ -232,14 +222,15 @@
         if (t->getDimZ() != dimZ) continue;
         if (t->getDimLOD() != dimLOD) continue;
         if (t->getDimFaces() != dimFaces) continue;
-        t->incUserRef();
+        returnRef.set(t);
         ObjectBase::asyncUnlock();
-        return t;
+        return returnRef;
     }
     ObjectBase::asyncUnlock();
 
 
     Type *nt = new Type(rsc);
+    returnRef.set(nt);
     nt->mElement.set(e);
     nt->mDimX = dimX;
     nt->mDimY = dimY;
@@ -247,25 +238,24 @@
     nt->mDimLOD = dimLOD;
     nt->mFaces = dimFaces;
     nt->compute();
-    nt->incUserRef();
 
     ObjectBase::asyncLock();
     stc->mTypes.push(nt);
     ObjectBase::asyncUnlock();
 
-    return nt;
+    return returnRef;
 }
 
-Type * Type::cloneAndResize1D(Context *rsc, uint32_t dimX) const {
-    return getType(rsc, mElement.get(), dimX,
-                   mDimY, mDimZ, mDimLOD, mFaces);
+ObjectBaseRef<Type> Type::cloneAndResize1D(Context *rsc, uint32_t dimX) const {
+    return getTypeRef(rsc, mElement.get(), dimX,
+                      mDimY, mDimZ, mDimLOD, mFaces);
 }
 
-Type * Type::cloneAndResize2D(Context *rsc,
+ObjectBaseRef<Type> Type::cloneAndResize2D(Context *rsc,
                               uint32_t dimX,
                               uint32_t dimY) const {
-    return getType(rsc, mElement.get(), dimX, dimY,
-                   mDimZ, mDimLOD, mFaces);
+    return getTypeRef(rsc, mElement.get(), dimX, dimY,
+                      mDimZ, mDimLOD, mFaces);
 }
 
 
diff --git a/libs/rs/rsType.h b/libs/rs/rsType.h
index 086db33..bc0d9ff 100644
--- a/libs/rs/rsType.h
+++ b/libs/rs/rsType.h
@@ -62,14 +62,20 @@
     virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_TYPE; }
     static Type *createFromStream(Context *rsc, IStream *stream);
 
-    bool isEqual(const Type *other) const;
+    ObjectBaseRef<Type> cloneAndResize1D(Context *rsc, uint32_t dimX) const;
+    ObjectBaseRef<Type> cloneAndResize2D(Context *rsc, uint32_t dimX, uint32_t dimY) const;
 
-    Type * cloneAndResize1D(Context *rsc, uint32_t dimX) const;
-    Type * cloneAndResize2D(Context *rsc, uint32_t dimX, uint32_t dimY) const;
+    static ObjectBaseRef<Type> getTypeRef(Context *rsc, const Element *e,
+                                          uint32_t dimX, uint32_t dimY, uint32_t dimZ,
+                                          bool dimLOD, bool dimFaces);
 
-    static Type * getType(Context *rsc, const Element *e,
-                      uint32_t dimX, uint32_t dimY, uint32_t dimZ,
-                      bool dimLOD, bool dimFaces);
+    static Type* getType(Context *rsc, const Element *e,
+                         uint32_t dimX, uint32_t dimY, uint32_t dimZ,
+                         bool dimLOD, bool dimFaces) {
+        ObjectBaseRef<Type> type = getTypeRef(rsc, e, dimX, dimY, dimZ, dimLOD, dimFaces);
+        type->incUserRef();
+        return type.get();
+    }
 
 protected:
     struct LOD {
@@ -105,7 +111,7 @@
     uint32_t mLODCount;
 
 protected:
-    virtual void preDestroy();
+    virtual void preDestroy() const;
     virtual ~Type();
 
 private:
diff --git a/libs/ui/EGLUtils.cpp b/libs/ui/EGLUtils.cpp
index 020646b..f24a71d 100644
--- a/libs/ui/EGLUtils.cpp
+++ b/libs/ui/EGLUtils.cpp
@@ -24,8 +24,6 @@
 
 #include <EGL/egl.h>
 
-#include <system/graphics.h>
-
 #include <private/ui/android_natives_priv.h>
 
 // ----------------------------------------------------------------------------
@@ -69,49 +67,31 @@
         return BAD_VALUE;
     
     // Get all the "potential match" configs...
-    if (eglChooseConfig(dpy, attrs, 0, 0, &numConfigs) == EGL_FALSE)
+    if (eglGetConfigs(dpy, NULL, 0, &numConfigs) == EGL_FALSE)
         return BAD_VALUE;
 
-    if (numConfigs) {
-        EGLConfig* const configs = new EGLConfig[numConfigs];
-        if (eglChooseConfig(dpy, attrs, configs, numConfigs, &n) == EGL_FALSE) {
-            delete [] configs;
-            return BAD_VALUE;
-        }
-
-        bool hasAlpha = false;
-        switch (format) {
-            case HAL_PIXEL_FORMAT_RGBA_8888:
-            case HAL_PIXEL_FORMAT_BGRA_8888:
-            case HAL_PIXEL_FORMAT_RGBA_5551:
-            case HAL_PIXEL_FORMAT_RGBA_4444:
-                hasAlpha = true;
-                break;
-        }
-
-        // The first config is guaranteed to over-satisfy the constraints
-        EGLConfig config = configs[0];
-
-        // go through the list and skip configs that over-satisfy our needs
-        int i;
-        for (i=0 ; i<n ; i++) {
-            if (!hasAlpha) {
-                EGLint alphaSize;
-                eglGetConfigAttrib(dpy, configs[i], EGL_ALPHA_SIZE, &alphaSize);
-                if (alphaSize > 0) {
-                    continue;
-                }
-            }
+    EGLConfig* const configs = (EGLConfig*)malloc(sizeof(EGLConfig)*numConfigs);
+    if (eglChooseConfig(dpy, attrs, configs, numConfigs, &n) == EGL_FALSE) {
+        free(configs);
+        return BAD_VALUE;
+    }
+    
+    int i;
+    EGLConfig config = NULL;
+    for (i=0 ; i<n ; i++) {
+        EGLint nativeVisualId = 0;
+        eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &nativeVisualId);
+        if (nativeVisualId>0 && format == nativeVisualId) {
             config = configs[i];
             break;
         }
+    }
 
-        delete [] configs;
-
-        if (i<n) {
-            *outConfig = config;
-            return NO_ERROR;
-        }
+    free(configs);
+    
+    if (i<n) {
+        *outConfig = config;
+        return NO_ERROR;
     }
 
     return NAME_NOT_FOUND;
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 56a9933..7a92b35 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -1743,7 +1743,13 @@
 
     /**
      * @hide
-     * @param eventReceiver
+     * Unregisters the remote control client that was providing information to display on the
+     * remotes.
+     * @param eventReceiver identifier of a {@link android.content.BroadcastReceiver}
+     *      that receives the media button intent, and associated with the remote control
+     *      client.
+     * @see #registerRemoteControlClient(ComponentName)
+
      */
     public void unregisterRemoteControlClient(ComponentName eventReceiver) {
         if (eventReceiver == null) {
@@ -1783,27 +1789,152 @@
      * Definitions of constants to be used in {@link android.media.IRemoteControlClient}.
      */
     public final class RemoteControlParameters {
+        /**
+         * Playback state of an IRemoteControlClient which is stopped.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_STOPPED            = 1;
+        /**
+         * Playback state of an IRemoteControlClient which is paused.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_PAUSED             = 2;
+        /**
+         * Playback state of an IRemoteControlClient which is playing media.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_PLAYING            = 3;
+        /**
+         * Playback state of an IRemoteControlClient which is fast forwarding in the media
+         *    it is currently playing.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_FAST_FORWARDING    = 4;
+        /**
+         * Playback state of an IRemoteControlClient which is fast rewinding in the media
+         *    it is currently playing.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_REWINDING          = 5;
+        /**
+         * Playback state of an IRemoteControlClient which is skipping to the next
+         *    logical chapter (such as a song in a playlist) in the media it is currently playing.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_SKIPPING_FORWARDS  = 6;
+        /**
+         * Playback state of an IRemoteControlClient which is skipping back to the previous
+         *    logical chapter (such as a song in a playlist) in the media it is currently playing.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_SKIPPING_BACKWARDS = 7;
+        /**
+         * Playback state of an IRemoteControlClient which is buffering data to play before it can
+         *    start or resume playback.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
         public final static int PLAYSTATE_BUFFERING          = 8;
+        /**
+         * Playback state of an IRemoteControlClient which cannot perform any playback related
+         *    operation because of an internal error. Examples of such situations are no network
+         *    connectivity when attempting to stream data from a server, or expired user credentials
+         *    when trying to play subscription-based content.
+         *
+         * @see android.media.IRemoteControlClient#getPlaybackState()
+         */
+        public final static int PLAYSTATE_ERROR              = 9;
 
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "previous" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_PREVIOUS
+         */
         public final static int FLAG_KEY_MEDIA_PREVIOUS = 1 << 0;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "rewing" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_REWIND
+         */
         public final static int FLAG_KEY_MEDIA_REWIND = 1 << 1;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "play" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_PLAY
+         */
         public final static int FLAG_KEY_MEDIA_PLAY = 1 << 2;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "play/pause" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_PLAY_PAUSE
+         */
         public final static int FLAG_KEY_MEDIA_PLAY_PAUSE = 1 << 3;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "pause" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_PAUSE
+         */
         public final static int FLAG_KEY_MEDIA_PAUSE = 1 << 4;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "stop" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_STOP
+         */
         public final static int FLAG_KEY_MEDIA_STOP = 1 << 5;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "fast forward" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_FAST_FORWARD
+         */
         public final static int FLAG_KEY_MEDIA_FAST_FORWARD = 1 << 6;
+        /**
+         * Flag indicating an IRemoteControlClient makes use of the "next" media key.
+         *
+         * @see android.media.IRemoteControlClient#getTransportControlFlags()
+         * @see android.view.KeyEvent#KEYCODE_MEDIA_NEXT
+         */
         public final static int FLAG_KEY_MEDIA_NEXT = 1 << 7;
 
+        /**
+         * Flag used to signal that the metadata exposed by the IRemoteControlClient has changed.
+         *
+         * @see #notifyRemoteControlInformationChanged(ComponentName, int)
+         */
         public final static int FLAG_INFORMATION_CHANGED_METADATA = 1 << 0;
+        /**
+         * Flag used to signal that the transport control buttons supported by the
+         * IRemoteControlClient have changed.
+         * This can for instance happen when playback is at the end of a playlist, and the "next"
+         * operation is not supported anymore.
+         *
+         * @see #notifyRemoteControlInformationChanged(ComponentName, int)
+         */
         public final static int FLAG_INFORMATION_CHANGED_KEY_MEDIA = 1 << 1;
+        /**
+         * Flag used to signal that the playback state of the IRemoteControlClient has changed.
+         *
+         * @see #notifyRemoteControlInformationChanged(ComponentName, int)
+         */
         public final static int FLAG_INFORMATION_CHANGED_PLAYSTATE = 1 << 2;
+        /**
+         * Flag used to signal that the album art for the IRemoteControlClient has changed.
+         *
+         * @see #notifyRemoteControlInformationChanged(ComponentName, int)
+         */
         public final static int FLAG_INFORMATION_CHANGED_ALBUM_ART = 1 << 3;
     }
 
@@ -1830,6 +1961,17 @@
 
     /**
      * @hide
+     * The media button event receiver associated with the IRemoteControlClient.
+     * The {@link android.content.ComponentName} value of the event receiver can be retrieved with
+     * {@link android.content.ComponentName#unflattenFromString(String)}
+     *
+     * @see #REMOTE_CONTROL_CLIENT_CHANGED_ACTION
+     */
+    public static final String EXTRA_REMOTE_CONTROL_EVENT_RECEIVER =
+            "android.media.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER";
+
+    /**
+     * @hide
      * The flags describing what information has changed in the current remote control client.
      *
      * @see #REMOTE_CONTROL_CLIENT_CHANGED_ACTION
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 5951229..179b8a4 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -17,6 +17,7 @@
 package android.media;
 
 import android.app.ActivityManagerNative;
+import android.app.KeyguardManager;
 import android.bluetooth.BluetoothA2dp;
 import android.bluetooth.BluetoothAdapter;
 import android.bluetooth.BluetoothClass;
@@ -309,6 +310,8 @@
     private static final int NOTIFICATION_VOLUME_DELAY_MS = 5000;
     // previous volume adjustment direction received by checkForRingerModeChange()
     private int mPrevVolDirection = AudioManager.ADJUST_SAME;
+    // Keyguard manager proxy
+    private KeyguardManager mKeyguardManager;
 
     ///////////////////////////////////////////////////////////////////////////
     // Construction
@@ -492,8 +495,10 @@
             streamType = getActiveStreamType(suggestedStreamType);
         }
 
-        // Don't play sound on other streams
-        if (streamType != AudioSystem.STREAM_RING && (flags & AudioManager.FLAG_PLAY_SOUND) != 0) {
+        // Play sounds on STREAM_RING only and if lock screen is not on.
+        if ((flags & AudioManager.FLAG_PLAY_SOUND) != 0 &&
+                ((STREAM_VOLUME_ALIAS[streamType] != AudioSystem.STREAM_RING) ||
+                 (mKeyguardManager != null && mKeyguardManager.isKeyguardLocked()))) {
             flags &= ~AudioManager.FLAG_PLAY_SOUND;
         }
 
@@ -1547,14 +1552,17 @@
         int newRingerMode = mRingerMode;
 
         if (mRingerMode == AudioManager.RINGER_MODE_NORMAL) {
-            // audible mode, at the bottom of the scale
-            if ((direction == AudioManager.ADJUST_LOWER &&
-                 mPrevVolDirection != AudioManager.ADJUST_LOWER) &&
-                ((oldIndex + 5) / 10 == 0)) {
-                // "silent mode", but which one?
-                newRingerMode = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1
-                    ? AudioManager.RINGER_MODE_VIBRATE
-                    : AudioManager.RINGER_MODE_SILENT;
+            if ((direction == AudioManager.ADJUST_LOWER) && ((oldIndex + 5) / 10 <= 1)) {
+                // enter silent mode if current index is the last audible one and not repeating a
+                // volume key down
+                if (mPrevVolDirection != AudioManager.ADJUST_LOWER) {
+                    // "silent mode", but which one?
+                    newRingerMode = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1
+                        ? AudioManager.RINGER_MODE_VIBRATE
+                        : AudioManager.RINGER_MODE_SILENT;
+                } else {
+                    adjustVolumeIndex = false;
+                }
             }
         } else {
             if (direction == AudioManager.ADJUST_RAISE) {
@@ -2167,8 +2175,10 @@
 
                 case MSG_RCDISPLAY_UPDATE:
                     synchronized(mCurrentRcLock) {
+                        // msg.obj is guaranteed to be non null
+                        RemoteControlStackEntry rcse = (RemoteControlStackEntry)msg.obj;
                         if ((mCurrentRcClient == null) ||
-                                (!mCurrentRcClient.equals((IRemoteControlClient)msg.obj))) {
+                                (!mCurrentRcClient.equals(rcse.mRcClient))) {
                             // the remote control display owner has changed between the
                             // the message to update the display was sent, and the time it
                             // gets to be processed (now)
@@ -2183,6 +2193,9 @@
                             rcClientIntent.putExtra(
                                     AudioManager.EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED,
                                     msg.arg1);
+                            rcClientIntent.putExtra(
+                                    AudioManager.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER,
+                                    rcse.mReceiverComponent.flattenToString());
                             rcClientIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                             mContext.sendBroadcast(rcClientIntent);
                         }
@@ -2508,6 +2521,8 @@
                 sendMsg(mAudioHandler, MSG_LOAD_SOUND_EFFECTS, SHARED_MSG, SENDMSG_NOOP,
                         0, 0, null, 0);
 
+                mKeyguardManager =
+                    (KeyguardManager)mContext.getSystemService(Context.KEYGUARD_SERVICE);
                 mScoConnectionState = AudioManager.SCO_AUDIO_STATE_ERROR;
                 resetBluetoothSco();
                 getBluetoothHeadset();
@@ -3131,7 +3146,7 @@
             mCurrentRcClient = rcse.mRcClient;
         }
         mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_UPDATE,
-                infoFlagsAboutToBeUsed /* arg1 */, 0, rcse.mRcClient /* obj */) );
+                infoFlagsAboutToBeUsed /* arg1 */, 0, rcse /* obj, != null */) );
     }
 
     /**
diff --git a/media/java/android/media/IRemoteControlClient.aidl b/media/java/android/media/IRemoteControlClient.aidl
index a49371c..76d178c 100644
--- a/media/java/android/media/IRemoteControlClient.aidl
+++ b/media/java/android/media/IRemoteControlClient.aidl
@@ -19,7 +19,12 @@
 import android.graphics.Bitmap;
 
 /**
- * {@hide}
+ * @hide
+ * Interface for an object that exposes information meant to be consumed by remote controls
+ * capable of displaying metadata, album art and media transport control buttons.
+ * Such a remote control client object is associated with a media button event receiver
+ * when registered through
+ * {@link AudioManager#registerRemoteControlClient(ComponentName, IRemoteControlClient)}.
  */
 interface IRemoteControlClient
 {
@@ -41,36 +46,49 @@
      *      {@link android.media.MediaMetadataRetriever#METADATA_KEY_TITLE},
      *      {@link android.media.MediaMetadataRetriever#METADATA_KEY_WRITER},
      *      {@link android.media.MediaMetadataRetriever#METADATA_KEY_YEAR}.
-     * @return null if the given field is not supported, or the String matching the metadata field.
+     * @return null if the requested field is not supported, or the String matching the
+     *       metadata field.
      */
     String getMetadataString(int field);
 
     /**
-     * Returns the current playback state.
+     * Called by a remote control to retrieve the current playback state.
      * @return one of the following values:
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_STOPPED},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_PAUSED},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_PLAYING},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_FAST_FORWARDING},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_REWINDING},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_SKIPPING_FORWARDS},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_SKIPPING_BACKWARDS},
-     *       {@link android.media.AudioManager.RemoteControl#PLAYSTATE_BUFFERING}.
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_STOPPED},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_PAUSED},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_PLAYING},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_FAST_FORWARDING},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_REWINDING},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_SKIPPING_FORWARDS},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_SKIPPING_BACKWARDS},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_BUFFERING},
+     *       {@link android.media.AudioManager.RemoteControlParameters#PLAYSTATE_ERROR}.
      */
     int getPlaybackState();
 
     /**
-     * Returns the flags for the media transport control buttons this client supports.
-     * @see {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_PREVIOUS},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_REWIND},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_PLAY},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_PLAY_PAUSE},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_PAUSE},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_STOP},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_FAST_FORWARD},
-     *      {@link android.media.AudioManager.RemoteControl#FLAG_KEY_MEDIA_NEXT}
+     * Called by a remote control to retrieve the flags for the media transport control buttons
+     * that this client supports.
+     * @see {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_PREVIOUS},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_REWIND},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_PLAY},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_PLAY_PAUSE},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_PAUSE},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_STOP},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_FAST_FORWARD},
+     *      {@link android.media.AudioManager.RemoteControlParameters#FLAG_KEY_MEDIA_NEXT}
      */
     int getTransportControlFlags();
 
-    Bitmap getAlbumArt(int width, int height);
+    /**
+     * Called by a remote control to retrieve the album art picture at the requested size.
+     * Note that returning a bitmap smaller than the maximum requested dimension is accepted
+     * and it will be scaled as needed, but exceeding the maximum dimensions may produce
+     * unspecified results, such as the image being cropped or simply not being displayed.
+     * @param maxWidth the maximum width of the requested bitmap expressed in pixels.
+     * @param maxHeight the maximum height of the requested bitmap expressed in pixels.
+     * @return the bitmap for the album art, or null if there isn't any.
+     * @see android.graphics.Bitmap
+     */
+    Bitmap getAlbumArt(int maxWidth, int maxHeight);
 }
diff --git a/media/java/android/media/audiofx/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java
index 3ac0104..673f9f4 100644
--- a/media/java/android/media/audiofx/AudioEffect.java
+++ b/media/java/android/media/audiofx/AudioEffect.java
@@ -40,13 +40,11 @@
  *   <li> {@link android.media.audiofx.PresetReverb}</li>
  *   <li> {@link android.media.audiofx.EnvironmentalReverb}</li>
  * </ul>
- * <p>If the audio effect is to be applied to a specific AudioTrack or MediaPlayer instance,
+ * <p>To apply the audio effect to a specific AudioTrack or MediaPlayer instance,
  * the application must specify the audio session ID of that instance when creating the AudioEffect.
  * (see {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions).
- * To apply an effect to the global audio output mix, session 0 must be specified when creating the
- * AudioEffect.
- * <p>Creating an effect on the output mix (audio session 0) requires permission
- * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS}
+ * <p>NOTE: attaching insert effects (equalizer, bass boost, virtualizer) to the global audio output
+ * mix by use of session 0 is deprecated.
  * <p>Creating an AudioEffect object will create the corresponding effect engine in the audio
  * framework if no instance of the same effect type exists in the specified audio session.
  * If one exists, this instance will be used.
@@ -356,10 +354,9 @@
      *            how much the requesting application needs control of effect
      *            parameters. The normal priority is 0, above normal is a
      *            positive number, below normal a negative number.
-     * @param audioSession system wide unique audio session identifier. If audioSession
-     *            is not 0, the effect will be attached to the MediaPlayer or
-     *            AudioTrack in the same audio session. Otherwise, the effect
-     *            will apply to the output mix.
+     * @param audioSession system wide unique audio session identifier.
+     *            The effect will be attached to the MediaPlayer or AudioTrack in
+     *            the same audio session.
      *
      * @throws java.lang.IllegalArgumentException
      * @throws java.lang.UnsupportedOperationException
diff --git a/media/java/android/media/audiofx/BassBoost.java b/media/java/android/media/audiofx/BassBoost.java
index ca55f0f..91459ed 100644
--- a/media/java/android/media/audiofx/BassBoost.java
+++ b/media/java/android/media/audiofx/BassBoost.java
@@ -39,9 +39,7 @@
  * for the SLBassBoostItf interface. Please refer to this specification for more details.
  * <p>To attach the BassBoost to a particular AudioTrack or MediaPlayer, specify the audio session
  * ID of this AudioTrack or MediaPlayer when constructing the BassBoost.
- * If the audio session ID 0 is specified, the BassBoost applies to the main audio output mix.
- * <p>Creating a BassBoost on the output mix (audio session 0) requires permission
- * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS}
+ * <p>NOTE: attaching a BassBoost to the global audio output mix by use of session 0 is deprecated.
  * <p>See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions.
  * <p>See {@link android.media.audiofx.AudioEffect} class for more details on
  * controlling audio effects.
@@ -89,9 +87,8 @@
      * engine. As the same engine can be shared by several applications, this parameter indicates
      * how much the requesting application needs control of effect parameters. The normal priority
      * is 0, above normal is a positive number, below normal a negative number.
-     * @param audioSession system wide unique audio session identifier. If audioSession
-     *  is not 0, the BassBoost will be attached to the MediaPlayer or AudioTrack in the
-     *  same audio session. Otherwise, the BassBoost will apply to the output mix.
+     * @param audioSession system wide unique audio session identifier. The BassBoost will be
+     * attached to the MediaPlayer or AudioTrack in the same audio session.
      *
      * @throws java.lang.IllegalStateException
      * @throws java.lang.IllegalArgumentException
@@ -103,6 +100,10 @@
            UnsupportedOperationException, RuntimeException {
         super(EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_NULL, priority, audioSession);
 
+        if (audioSession == 0) {
+            Log.w(TAG, "WARNING: attaching a BassBoost to global output mix is deprecated!");
+        }
+
         int[] value = new int[1];
         checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
         mStrengthSupported = (value[0] != 0);
diff --git a/media/java/android/media/audiofx/Equalizer.java b/media/java/android/media/audiofx/Equalizer.java
index b3bafa9..7f38955 100644
--- a/media/java/android/media/audiofx/Equalizer.java
+++ b/media/java/android/media/audiofx/Equalizer.java
@@ -39,10 +39,8 @@
  * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/)
  * for the SLEqualizerItf interface. Please refer to this specification for more details.
  * <p>To attach the Equalizer to a particular AudioTrack or MediaPlayer, specify the audio session
- * ID of this AudioTrack or MediaPlayer when constructing the Equalizer. If the audio session ID 0
- * is specified, the Equalizer applies to the main audio output mix.
- * <p>Creating an Equalizer on the output mix (audio session 0) requires permission
- * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS}
+ * ID of this AudioTrack or MediaPlayer when constructing the Equalizer.
+ * <p>NOTE: attaching an Equalizer to the global audio output mix by use of session 0 is deprecated.
  * <p>See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions.
  * <p>See {@link android.media.audiofx.AudioEffect} class for more details on controlling audio
  * effects.
@@ -134,9 +132,8 @@
      * engine. As the same engine can be shared by several applications, this parameter indicates
      * how much the requesting application needs control of effect parameters. The normal priority
      * is 0, above normal is a positive number, below normal a negative number.
-     * @param audioSession  system wide unique audio session identifier. If audioSession
-     *  is not 0, the Equalizer will be attached to the MediaPlayer or AudioTrack in the
-     *  same audio session. Otherwise, the Equalizer will apply to the output mix.
+     * @param audioSession  system wide unique audio session identifier. The Equalizer will be
+     * attached to the MediaPlayer or AudioTrack in the same audio session.
      *
      * @throws java.lang.IllegalStateException
      * @throws java.lang.IllegalArgumentException
@@ -148,6 +145,10 @@
            UnsupportedOperationException, RuntimeException {
         super(EFFECT_TYPE_EQUALIZER, EFFECT_TYPE_NULL, priority, audioSession);
 
+        if (audioSession == 0) {
+            Log.w(TAG, "WARNING: attaching an Equalizer to global output mix is deprecated!");
+        }
+
         getNumberOfBands();
 
         mNumPresets = (int)getNumberOfPresets();
diff --git a/media/java/android/media/audiofx/Virtualizer.java b/media/java/android/media/audiofx/Virtualizer.java
index a682a45..68a7b88 100644
--- a/media/java/android/media/audiofx/Virtualizer.java
+++ b/media/java/android/media/audiofx/Virtualizer.java
@@ -40,10 +40,9 @@
  * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/)
  * for the SLVirtualizerItf interface. Please refer to this specification for more details.
  * <p>To attach the Virtualizer to a particular AudioTrack or MediaPlayer, specify the audio session
- * ID of this AudioTrack or MediaPlayer when constructing the Virtualizer. If the audio session ID 0
- * is specified, the Virtualizer applies to the main audio output mix.
- * <p>Creating a Virtualizer on the output mix (audio session 0) requires permission
- * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS}
+ * ID of this AudioTrack or MediaPlayer when constructing the Virtualizer.
+ * <p>NOTE: attaching a Virtualizer to the global audio output mix by use of session 0 is
+ * deprecated.
  * <p>See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions.
  * <p>See {@link android.media.audiofx.AudioEffect} class for more details on controlling
  * audio effects.
@@ -90,9 +89,8 @@
      * engine. As the same engine can be shared by several applications, this parameter indicates
      * how much the requesting application needs control of effect parameters. The normal priority
      * is 0, above normal is a positive number, below normal a negative number.
-     * @param audioSession  system wide unique audio session identifier. If audioSession
-     *  is not 0, the Virtualizer will be attached to the MediaPlayer or AudioTrack in the
-     *  same audio session. Otherwise, the Virtualizer will apply to the output mix.
+     * @param audioSession  system wide unique audio session identifier. The Virtualizer will
+     * be attached to the MediaPlayer or AudioTrack in the same audio session.
      *
      * @throws java.lang.IllegalStateException
      * @throws java.lang.IllegalArgumentException
@@ -104,6 +102,10 @@
            UnsupportedOperationException, RuntimeException {
         super(EFFECT_TYPE_VIRTUALIZER, EFFECT_TYPE_NULL, priority, audioSession);
 
+        if (audioSession == 0) {
+            Log.w(TAG, "WARNING: attaching a Virtualizer to global output mix is deprecated!");
+        }
+
         int[] value = new int[1];
         checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
         mStrengthSupported = (value[0] != 0);
diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
index 5bfdcdb..8caa04c 100644
--- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
+++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
@@ -3781,72 +3781,62 @@
      * @param startMs The starting time in ms
      * @param endMs The end time in ms
      * @param thumbnailCount The number of frames to be extracted
+     * @param indices The indices of thumbnails wanted
+     * @param callback The callback used to pass back the bitmaps
      * from startMs to endMs
      *
      * @return The frames as bitmaps in bitmap array
      **/
-    Bitmap[] getPixelsList(String filename, int width, int height, long startMs, long endMs,
-            int thumbnailCount) {
-        int[] rgb888 = null;
-        int thumbnailSize = 0;
-        Bitmap tempBitmap = null;
-
+    void getPixelsList(String filename, final int width, final int height,
+            long startMs, long endMs, int thumbnailCount, int[] indices,
+            final MediaItem.GetThumbnailListCallback callback) {
         /* Make width and height as even */
         final int newWidth = (width + 1) & 0xFFFFFFFE;
         final int newHeight = (height + 1) & 0xFFFFFFFE;
-        thumbnailSize = newWidth * newHeight * 4;
+        final int thumbnailSize = newWidth * newHeight;
 
         /* Create a temp bitmap for resized thumbnails */
-        if ((newWidth != width) || (newHeight != height)) {
-            tempBitmap = Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888);
-        }
-        int i = 0;
-        int deltaTime = (int)(endMs - startMs) / thumbnailCount;
-        Bitmap[] bitmaps = null;
+        final Bitmap tempBitmap =
+                (newWidth != width || newHeight != height)
+                ? Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888)
+                : null;
 
-        try {
-            // This may result in out of Memory Error
-            rgb888 = new int[thumbnailSize * thumbnailCount];
-            bitmaps = new Bitmap[thumbnailCount];
-        } catch (Throwable e) {
-            // Allocating to new size with Fixed count
-            try {
-                rgb888 = new int[thumbnailSize * MAX_THUMBNAIL_PERMITTED];
-                bitmaps = new Bitmap[MAX_THUMBNAIL_PERMITTED];
-                thumbnailCount = MAX_THUMBNAIL_PERMITTED;
-            } catch (Throwable ex) {
-                throw new RuntimeException("Memory allocation fails, thumbnail count too large: "
-                        + thumbnailCount);
+        final int[] rgb888 = new int[thumbnailSize];
+        final IntBuffer tmpBuffer = IntBuffer.allocate(thumbnailSize);
+        nativeGetPixelsList(filename, rgb888, newWidth, newHeight,
+                thumbnailCount, startMs, endMs, indices,
+                new NativeGetPixelsListCallback() {
+            public void onThumbnail(int index) {
+                Bitmap bitmap = Bitmap.createBitmap(
+                        width, height, Bitmap.Config.ARGB_8888);
+                tmpBuffer.put(rgb888, 0, thumbnailSize);
+                tmpBuffer.rewind();
+
+                if ((newWidth == width) && (newHeight == height)) {
+                    bitmap.copyPixelsFromBuffer(tmpBuffer);
+                } else {
+                    /* Copy the out rgb buffer to temp bitmap */
+                    tempBitmap.copyPixelsFromBuffer(tmpBuffer);
+
+                    /* Create a canvas to resize */
+                    final Canvas canvas = new Canvas(bitmap);
+                    canvas.drawBitmap(tempBitmap,
+                            new Rect(0, 0, newWidth, newHeight),
+                            new Rect(0, 0, width, height), sResizePaint);
+
+                    canvas.setBitmap(null);
+                }
+                callback.onThumbnail(bitmap, index);
             }
-        }
-        IntBuffer tmpBuffer = IntBuffer.allocate(thumbnailSize);
-        nativeGetPixelsList(filename, rgb888, newWidth, newHeight, deltaTime, thumbnailCount,
-                startMs, endMs);
-
-        for (; i < thumbnailCount; i++) {
-            bitmaps[i] = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
-            tmpBuffer.put(rgb888, (i * thumbnailSize), thumbnailSize);
-            tmpBuffer.rewind();
-
-            if ((newWidth == width) && (newHeight == height)) {
-                bitmaps[i].copyPixelsFromBuffer(tmpBuffer);
-            } else {
-                /* Copy the out rgb buffer to temp bitmap */
-                tempBitmap.copyPixelsFromBuffer(tmpBuffer);
-
-                /* Create a canvas to resize */
-                final Canvas canvas = new Canvas(bitmaps[i]);
-                canvas.drawBitmap(tempBitmap, new Rect(0, 0, newWidth, newHeight),
-                                              new Rect(0, 0, width, height), sResizePaint);
-                canvas.setBitmap(null);
-            }
-        }
+        });
 
         if (tempBitmap != null) {
             tempBitmap.recycle();
         }
+    }
 
-        return bitmaps;
+    interface NativeGetPixelsListCallback {
+        public void onThumbnail(int index);
     }
 
     /**
@@ -3957,8 +3947,9 @@
     private native int nativeGetPixels(String fileName, int[] pixelArray, int width, int height,
             long timeMS);
 
-    private native int nativeGetPixelsList(String fileName, int[] pixelArray, int width, int height,
-            int timeMS, int nosofTN, long startTimeMs, long endTimeMs);
+    private native int nativeGetPixelsList(String fileName, int[] pixelArray,
+            int width, int height, int nosofTN, long startTimeMs, long endTimeMs,
+            int[] indices, NativeGetPixelsListCallback callback);
 
     /**
      * Releases the JNI and cleans up the core native module.. Should be called
diff --git a/media/java/android/media/videoeditor/MediaImageItem.java b/media/java/android/media/videoeditor/MediaImageItem.java
index f0cc1fe..4ca6fad 100755
--- a/media/java/android/media/videoeditor/MediaImageItem.java
+++ b/media/java/android/media/videoeditor/MediaImageItem.java
@@ -616,17 +616,18 @@
      * {@inheritDoc}
      */
     @Override
-    public Bitmap[] getThumbnailList(int width, int height, long startMs, long endMs,
-        int thumbnailCount) throws IOException {
+    public void getThumbnailList(int width, int height,
+                                 long startMs, long endMs,
+                                 int thumbnailCount,
+                                 int[] indices,
+                                 GetThumbnailListCallback callback)
+                                 throws IOException {
         //KenBurns was not applied on this.
         if (getGeneratedImageClip() == null) {
             final Bitmap thumbnail = scaleImage(mFilename, width, height);
-            final Bitmap[] thumbnailArray = new Bitmap[thumbnailCount];
-            for (int i = 0; i < thumbnailCount; i++) {
-                thumbnailArray[i] = thumbnail;
+            for (int i = 0; i < indices.length; i++) {
+                callback.onThumbnail(thumbnail, i);
             }
-
-            return thumbnailArray;
         } else {
             if (startMs > endMs) {
                 throw new IllegalArgumentException("Start time is greater than end time");
@@ -636,15 +637,8 @@
                 throw new IllegalArgumentException("End time is greater than file duration");
             }
 
-            if (startMs == endMs) {
-                Bitmap[] bitmap = new Bitmap[1];
-                bitmap[0] = mMANativeHelper.getPixels(getGeneratedImageClip(),
-                    width, height,startMs);
-                return bitmap;
-            }
-
-            return mMANativeHelper.getPixelsList(getGeneratedImageClip(), width,
-                height,startMs,endMs,thumbnailCount);
+            mMANativeHelper.getPixelsList(getGeneratedImageClip(), width,
+                height, startMs, endMs, thumbnailCount, indices, callback);
         }
     }
 
diff --git a/media/java/android/media/videoeditor/MediaItem.java b/media/java/android/media/videoeditor/MediaItem.java
index 8c4841f..4e9ea75 100755
--- a/media/java/android/media/videoeditor/MediaItem.java
+++ b/media/java/android/media/videoeditor/MediaItem.java
@@ -564,15 +564,41 @@
      * @param startMs The start of time range in milliseconds
      * @param endMs The end of the time range in milliseconds
      * @param thumbnailCount The thumbnail count
-     *
-     * @return The array of Bitmaps
+     * @param indices The indices of the thumbnails wanted
+     * @param callback The callback used to pass back the bitmaps
      *
      * @throws IOException if a file error occurs
      */
-    public abstract Bitmap[] getThumbnailList(int width, int height,
-                                              long startMs, long endMs,
-                                              int thumbnailCount)
-                                              throws IOException;
+    public abstract void getThumbnailList(int width, int height,
+                                          long startMs, long endMs,
+                                          int thumbnailCount,
+                                          int[] indices,
+                                          GetThumbnailListCallback callback)
+                                          throws IOException;
+
+    public interface GetThumbnailListCallback {
+        public void onThumbnail(Bitmap bitmap, int index);
+    }
+
+    // This is for compatibility, only used in tests.
+    public Bitmap[] getThumbnailList(int width, int height,
+                                     long startMs, long endMs,
+                                     int thumbnailCount)
+                                     throws IOException {
+        final Bitmap[] bitmaps = new Bitmap[thumbnailCount];
+        int[] indices = new int[thumbnailCount];
+        for (int i = 0; i < thumbnailCount; i++) {
+            indices[i] = i;
+        }
+        getThumbnailList(width, height, startMs, endMs,
+                thumbnailCount, indices, new GetThumbnailListCallback() {
+            public void onThumbnail(Bitmap bitmap, int index) {
+                bitmaps[index] = bitmap;
+            }
+        });
+
+        return bitmaps;
+    }
 
     /*
      * {@inheritDoc}
diff --git a/media/java/android/media/videoeditor/MediaVideoItem.java b/media/java/android/media/videoeditor/MediaVideoItem.java
index 6248651..0ac354b 100755
--- a/media/java/android/media/videoeditor/MediaVideoItem.java
+++ b/media/java/android/media/videoeditor/MediaVideoItem.java
@@ -293,8 +293,12 @@
      * {@inheritDoc}
      */
     @Override
-    public Bitmap[] getThumbnailList(int width, int height, long startMs,
-            long endMs, int thumbnailCount) throws IOException {
+    public void getThumbnailList(int width, int height,
+                                 long startMs, long endMs,
+                                 int thumbnailCount,
+                                 int[] indices,
+                                 GetThumbnailListCallback callback)
+                                 throws IOException {
         if (startMs > endMs) {
             throw new IllegalArgumentException("Start time is greater than end time");
         }
@@ -307,14 +311,8 @@
             throw new IllegalArgumentException("Invalid dimension");
         }
 
-        if (startMs == endMs) {
-            final Bitmap[] bitmap = new Bitmap[1];
-            bitmap[0] = mMANativeHelper.getPixels(super.getFilename(), width, height,startMs);
-            return bitmap;
-        }
-
-        return mMANativeHelper.getPixelsList(super.getFilename(), width,
-                height,startMs,endMs,thumbnailCount);
+        mMANativeHelper.getPixelsList(super.getFilename(), width,
+                height, startMs, endMs, thumbnailCount, indices, callback);
     }
 
     /*
diff --git a/media/jni/mediaeditor/VideoBrowserInternal.h b/media/jni/mediaeditor/VideoBrowserInternal.h
index 3cfb6b9..f4eaab8 100755
--- a/media/jni/mediaeditor/VideoBrowserInternal.h
+++ b/media/jni/mediaeditor/VideoBrowserInternal.h
@@ -26,9 +26,6 @@
 
 #define VIDEO_BROWSER_BGR565
 
-
-#define VIDEO_BROWSER_PREDECODE_TIME 2000    /* In miliseconds */
-
 /*---------------------------- MACROS ----------------------------*/
 #define CHECK_PTR(fct, p, err, errValue) \
 { \
diff --git a/media/jni/mediaeditor/VideoBrowserMain.c b/media/jni/mediaeditor/VideoBrowserMain.c
index 2de55e3..c6c6000 100755
--- a/media/jni/mediaeditor/VideoBrowserMain.c
+++ b/media/jni/mediaeditor/VideoBrowserMain.c
@@ -447,13 +447,9 @@
     VideoBrowserContext* pC = (VideoBrowserContext*)pContext;
     M4OSA_ERR err = M4NO_ERROR;
     M4OSA_UInt32 targetTime = 0;
-    M4OSA_UInt32 jumpTime = 0;
     M4_MediaTime timeMS = 0;
-    M4OSA_Int32 rapTime = 0;
-    M4OSA_Bool isBackward = M4OSA_FALSE;
     M4OSA_Bool bJumpNeeded = M4OSA_FALSE;
 
-
     /*--- Sanity checks ---*/
     CHECK_PTR(videoBrowserPrepareFrame, pContext, err, M4ERR_PARAMETER);
     CHECK_PTR(videoBrowserPrepareFrame, pTime,  err, M4ERR_PARAMETER);
@@ -472,16 +468,11 @@
         goto videoBrowserPrepareFrame_cleanUp;
     }
 
-    /*--- Check the duration ---*/
-    /*--- If we jump backward, we need to jump ---*/
-    if (targetTime < pC->m_currentCTS)
-    {
-        isBackward = M4OSA_TRUE;
-        bJumpNeeded = M4OSA_TRUE;
-    }
-    /*--- If we jumpt to a time greater than "currentTime" + "predecodeTime"
-          we need to jump ---*/
-    else if (targetTime > (pC->m_currentCTS + VIDEO_BROWSER_PREDECODE_TIME))
+    // If we jump backward or forward to a time greater than current position by
+    // 85ms (~ 2 frames), we want to jump.
+    if (pC->m_currentCTS == 0 ||
+        targetTime < pC->m_currentCTS ||
+        targetTime > (pC->m_currentCTS + 85))
     {
         bJumpNeeded = M4OSA_TRUE;
     }
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 14972a2..7d0f56f 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -182,10 +182,11 @@
                                      jintArray                pixelArray,
                                      M4OSA_UInt32             width,
                                      M4OSA_UInt32             height,
-                                     M4OSA_UInt32             deltatimeMS,
                                      M4OSA_UInt32             noOfThumbnails,
-                                     M4OSA_UInt32             startTime,
-                                     M4OSA_UInt32             endTime);
+                                     jlong                    startTime,
+                                     jlong                    endTime,
+                                     jintArray                indexArray,
+                                     jobject                  callback);
 
 static void
 videoEditor_startPreview(
@@ -288,7 +289,7 @@
                                 (void *)videoEditor_release            },
     {"nativeGetPixels",         "(Ljava/lang/String;[IIIJ)I",
                                 (void*)videoEditor_getPixels               },
-    {"nativeGetPixelsList",     "(Ljava/lang/String;[IIIIIJJ)I",
+    {"nativeGetPixelsList",     "(Ljava/lang/String;[IIIIJJ[ILandroid/media/videoeditor/MediaArtistNativeHelper$NativeGetPixelsListCallback;)I",
                                 (void*)videoEditor_getPixelsList           },
     {"getMediaProperties",
     "(Ljava/lang/String;)Landroid/media/videoeditor/MediaArtistNativeHelper$Properties;",
@@ -2150,75 +2151,72 @@
 }
 
 static int videoEditor_getPixelsList(
-                JNIEnv*                     env,
-                jobject                     thiz,
-                jstring                     path,
-                jintArray                 pixelArray,
-                M4OSA_UInt32             width,
-                M4OSA_UInt32             height,
-                M4OSA_UInt32             deltatimeMS,
+                JNIEnv*                 env,
+                jobject                 thiz,
+                jstring                 path,
+                jintArray               pixelArray,
+                M4OSA_UInt32            width,
+                M4OSA_UInt32            height,
                 M4OSA_UInt32            noOfThumbnails,
-                M4OSA_UInt32                startTime,
-                M4OSA_UInt32                endTime)
+                jlong                   startTime,
+                jlong                   endTime,
+                jintArray               indexArray,
+                jobject                 callback)
 {
 
-    M4OSA_ERR           err;
+    M4OSA_ERR           err = M4NO_ERROR;
     M4OSA_Context       mContext = M4OSA_NULL;
-    jint*               m_dst32;
-    M4OSA_UInt32        timeMS = startTime;
-    int                 arrayOffset = 0;
-
-
-
-    // Add a text marker (the condition must always be true).
-    ADD_TEXT_MARKER_FUN(NULL != env)
 
     const char *pString = env->GetStringUTFChars(path, NULL);
     if (pString == M4OSA_NULL) {
-        if (env != NULL) {
-            jniThrowException(env, "java/lang/RuntimeException", "Input string null");
-        }
+        jniThrowException(env, "java/lang/RuntimeException", "Input string null");
         return M4ERR_ALLOC;
     }
 
     err = ThumbnailOpen(&mContext,(const M4OSA_Char*)pString, M4OSA_FALSE);
     if (err != M4NO_ERROR || mContext == M4OSA_NULL) {
-        if (env != NULL) {
-            jniThrowException(env, "java/lang/RuntimeException", "ThumbnailOpen failed");
-        }
+        jniThrowException(env, "java/lang/RuntimeException", "ThumbnailOpen failed");
         if (pString != NULL) {
             env->ReleaseStringUTFChars(path, pString);
         }
         return err;
     }
 
-    m_dst32 = env->GetIntArrayElements(pixelArray, NULL);
+    jlong duration = (endTime - startTime);
+    M4OSA_UInt32 tolerance = duration / (2 * noOfThumbnails);
+    jint* m_dst32 = env->GetIntArrayElements(pixelArray, NULL);
+    jint* indices = env->GetIntArrayElements(indexArray, NULL);
+    jsize len = env->GetArrayLength(indexArray);
 
-    M4OSA_UInt32 tolerance = deltatimeMS / 2;
-    do {
-        err = ThumbnailGetPixels32(mContext, ((M4OSA_Int32 *)m_dst32 + arrayOffset),
-            width,height,&timeMS, tolerance);
-        if (err != M4NO_ERROR ) {
-            if (env != NULL) {
-                jniThrowException(env, "java/lang/RuntimeException",\
-                    "ThumbnailGetPixels32 failed");
-            }
-            return err;
+    jclass cls = env->GetObjectClass(callback);
+    jmethodID mid = env->GetMethodID(cls, "onThumbnail", "(I)V");
+
+    for (int i = 0; i < len; i++) {
+        int k = indices[i];
+        M4OSA_UInt32 timeMS = startTime;
+        timeMS += (2 * k + 1) * duration / (2 * noOfThumbnails);
+        err = ThumbnailGetPixels32(mContext, ((M4OSA_Int32 *)m_dst32),
+            width, height, &timeMS, tolerance);
+        if (err != M4NO_ERROR) {
+            break;
         }
-        timeMS += deltatimeMS;
-        arrayOffset += (width * height * 4);
-        noOfThumbnails--;
-    } while(noOfThumbnails > 0);
+        env->CallVoidMethod(callback, mid, (jint)k);
+    }
 
     env->ReleaseIntArrayElements(pixelArray, m_dst32, 0);
+    env->ReleaseIntArrayElements(indexArray, indices, 0);
 
     ThumbnailClose(mContext);
     if (pString != NULL) {
         env->ReleaseStringUTFChars(path, pString);
     }
 
-    return err;
+    if (err != M4NO_ERROR) {
+        jniThrowException(env, "java/lang/RuntimeException",\
+                "ThumbnailGetPixels32 failed");
+    }
 
+    return err;
 }
 
 static M4OSA_ERR
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index b06f20d..7fb141a 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -340,6 +340,11 @@
                 }
 
                 finishFlushIfPossible();
+            } else if (what == ACodec::kWhatError) {
+                LOGE("Received error from %s decoder, aborting playback.",
+                     audio ? "audio" : "video");
+
+                mRenderer->queueEOS(audio, UNKNOWN_ERROR);
             } else {
                 CHECK_EQ((int)what, (int)ACodec::kWhatDrainThisBuffer);
 
@@ -358,13 +363,24 @@
                 int32_t audio;
                 CHECK(msg->findInt32("audio", &audio));
 
+                int32_t finalResult;
+                CHECK(msg->findInt32("finalResult", &finalResult));
+
                 if (audio) {
                     mAudioEOS = true;
                 } else {
                     mVideoEOS = true;
                 }
 
-                LOGV("reached %s EOS", audio ? "audio" : "video");
+                if (finalResult == ERROR_END_OF_STREAM) {
+                    LOGV("reached %s EOS", audio ? "audio" : "video");
+                } else {
+                    LOGE("%s track encountered an error (0x%08x)",
+                         audio ? "audio" : "video", finalResult);
+
+                    notifyListener(
+                            MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, finalResult);
+                }
 
                 if ((mAudioEOS || mAudioDecoder == NULL)
                         && (mVideoEOS || mVideoDecoder == NULL)) {
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
index 828e008..35ed43f 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
@@ -200,6 +200,22 @@
 void NuPlayer::Renderer::onDrainAudioQueue() {
 
     for (;;) {
+        if (mAudioQueue.empty()) {
+            break;
+        }
+
+        QueueEntry *entry = &*mAudioQueue.begin();
+
+        if (entry->mBuffer == NULL) {
+            // EOS
+
+            notifyEOS(true /* audio */, entry->mFinalResult);
+
+            mAudioQueue.erase(mAudioQueue.begin());
+            entry = NULL;
+            return;
+        }
+
         uint32_t numFramesPlayed;
         CHECK_EQ(mAudioSink->getPosition(&numFramesPlayed), (status_t)OK);
 
@@ -213,22 +229,6 @@
             break;
         }
 
-        if (mAudioQueue.empty()) {
-            break;
-        }
-
-        QueueEntry *entry = &*mAudioQueue.begin();
-
-        if (entry->mBuffer == NULL) {
-            // EOS
-
-            notifyEOS(true /* audio */);
-
-            mAudioQueue.erase(mAudioQueue.begin());
-            entry = NULL;
-            return;
-        }
-
         if (entry->mOffset == 0) {
             int64_t mediaTimeUs;
             CHECK(entry->mBuffer->meta()->findInt64("timeUs", &mediaTimeUs));
@@ -330,7 +330,7 @@
     if (entry->mBuffer == NULL) {
         // EOS
 
-        notifyEOS(false /* audio */);
+        notifyEOS(false /* audio */, entry->mFinalResult);
 
         mVideoQueue.erase(mVideoQueue.begin());
         entry = NULL;
@@ -352,10 +352,11 @@
     notifyPosition();
 }
 
-void NuPlayer::Renderer::notifyEOS(bool audio) {
+void NuPlayer::Renderer::notifyEOS(bool audio, status_t finalResult) {
     sp<AMessage> notify = mNotify->dup();
     notify->setInt32("what", kWhatEOS);
     notify->setInt32("audio", static_cast<int32_t>(audio));
+    notify->setInt32("finalResult", finalResult);
     notify->post();
 }
 
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h
index 703e971..2713031 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h
@@ -111,7 +111,7 @@
     void onPause();
     void onResume();
 
-    void notifyEOS(bool audio);
+    void notifyEOS(bool audio, status_t finalResult);
     void notifyFlushComplete(bool audio);
     void notifyPosition();
 
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 174ec92..5d91f6a 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -285,21 +285,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-struct ACodec::ErrorState : public ACodec::BaseState {
-    ErrorState(ACodec *codec);
-
-protected:
-    virtual bool onMessageReceived(const sp<AMessage> &msg);
-    virtual void stateEntered();
-
-    virtual bool onOMXEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2);
-
-private:
-    DISALLOW_EVIL_CONSTRUCTORS(ErrorState);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
 struct ACodec::FlushingState : public ACodec::BaseState {
     FlushingState(ACodec *codec);
 
@@ -335,7 +320,6 @@
 
     mExecutingToIdleState = new ExecutingToIdleState(this);
     mIdleToLoadedState = new IdleToLoadedState(this);
-    mErrorState = new ErrorState(this);
     mFlushingState = new FlushingState(this);
 
     mPortEOS[kPortIndexInput] = mPortEOS[kPortIndexOutput] = false;
@@ -594,7 +578,10 @@
 
 ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() {
     ANativeWindowBuffer *buf;
-    CHECK_EQ(mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf), 0);
+    if (mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf) != 0) {
+        LOGE("dequeueBuffer failed.");
+        return NULL;
+    }
 
     for (size_t i = mBuffers[kPortIndexOutput].size(); i-- > 0;) {
         BufferInfo *info =
@@ -1263,10 +1250,12 @@
         return false;
     }
 
-    LOGE("[%s] ERROR(0x%08lx, 0x%08lx)",
-         mCodec->mComponentName.c_str(), data1, data2);
+    LOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1);
 
-    mCodec->changeState(mCodec->mErrorState);
+    sp<AMessage> notify = mCodec->mNotify->dup();
+    notify->setInt32("what", ACodec::kWhatError);
+    notify->setInt32("omx-error", data1);
+    notify->post();
 
     return true;
 }
@@ -1595,13 +1584,15 @@
                     info = mCodec->dequeueBufferFromNativeWindow();
                 }
 
-                LOGV("[%s] calling fillBuffer %p",
-                     mCodec->mComponentName.c_str(), info->mBufferID);
+                if (info != NULL) {
+                    LOGV("[%s] calling fillBuffer %p",
+                         mCodec->mComponentName.c_str(), info->mBufferID);
 
-                CHECK_EQ(mCodec->mOMX->fillBuffer(mCodec->mNode, info->mBufferID),
-                         (status_t)OK);
+                    CHECK_EQ(mCodec->mOMX->fillBuffer(mCodec->mNode, info->mBufferID),
+                             (status_t)OK);
 
-                info->mStatus = BufferInfo::OWNED_BY_COMPONENT;
+                    info->mStatus = BufferInfo::OWNED_BY_COMPONENT;
+                }
             }
             break;
         }
@@ -1642,6 +1633,7 @@
             notify->post();
 
             handled = true;
+            break;
         }
 
         case ACodec::kWhatFlush:
@@ -1651,6 +1643,7 @@
             notify->post();
 
             handled = true;
+            break;
         }
 
         default:
@@ -1696,7 +1689,16 @@
         node = NULL;
     }
 
-    CHECK(node != NULL);
+    if (node == NULL) {
+        LOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str());
+
+        sp<AMessage> notify = mCodec->mNotify->dup();
+        notify->setInt32("what", ACodec::kWhatError);
+        notify->setInt32("omx-error", OMX_ErrorComponentNotFound);
+        notify->post();
+
+        return;
+    }
 
     sp<AMessage> notify = new AMessage(kWhatOMXMessage, mCodec->id());
     observer->setNotificationMessage(notify);
@@ -2236,26 +2238,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-ACodec::ErrorState::ErrorState(ACodec *codec)
-    : BaseState(codec) {
-}
-
-bool ACodec::ErrorState::onMessageReceived(const sp<AMessage> &msg) {
-    return BaseState::onMessageReceived(msg);
-}
-
-void ACodec::ErrorState::stateEntered() {
-    LOGV("[%s] Now in ErrorState", mCodec->mComponentName.c_str());
-}
-
-bool ACodec::ErrorState::onOMXEvent(
-        OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {
-    LOGV("EVENT(%d, 0x%08lx, 0x%08lx)", event, data1, data2);
-    return true;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
 ACodec::FlushingState::FlushingState(ACodec *codec)
     : BaseState(codec) {
 }
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index b9e4f9f..0b1a2af 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -131,11 +131,9 @@
         libdl            \
 
 LOCAL_STATIC_LIBRARIES += \
-        libstagefright_chromium_http \
-        libwebcore              \
-        libchromium_net \
+        libstagefright_chromium_http
 
-LOCAL_SHARED_LIBRARIES += libstlport
+LOCAL_SHARED_LIBRARIES += libstlport libchromium_net
 include external/stlport/libstlport.mk
 
 LOCAL_CPPFLAGS += -DCHROMIUM_AVAILABLE=1
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 0ea880b..99242ab 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -574,6 +574,8 @@
         mStats.mTracks.clear();
     }
 
+    mWatchForAudioSeekComplete = false;
+    mWatchForAudioEOS = false;
 }
 
 void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 73a05a5c..3b79f06 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1687,6 +1687,11 @@
         }
     }
 
+    if (!track->sampleTable->isValid()) {
+        // Make sure we have all the metadata we need.
+        return ERROR_MALFORMED;
+    }
+
     return OK;
 }
 
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 644c413..27dfeab 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -3199,9 +3199,16 @@
 }
 
 status_t OMXCodec::waitForBufferFilled_l() {
+
+    if (mIsEncoder) {
+        // For timelapse video recording, the timelapse video recording may
+        // not send an input frame for a _long_ time. Do not use timeout
+        // for video encoding.
+        return mBufferFilled.wait(mLock);
+    }
     status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutUs);
     if (err != OK) {
-        LOGE("Timed out waiting for buffers from video encoder: %d/%d",
+        CODEC_LOGE("Timed out waiting for output buffers: %d/%d",
             countBuffersWeOwn(mPortBuffers[kPortIndexInput]),
             countBuffersWeOwn(mPortBuffers[kPortIndexOutput]));
     }
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp
index a8a094e..2b9d99b 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -84,6 +84,13 @@
     mSampleIterator = NULL;
 }
 
+bool SampleTable::isValid() const {
+    return mChunkOffsetOffset >= 0
+        && mSampleToChunkOffset >= 0
+        && mSampleSizeOffset >= 0
+        && mTimeToSample != NULL;
+}
+
 status_t SampleTable::setChunkOffsetParams(
         uint32_t type, off64_t data_offset, size_t data_size) {
     if (mChunkOffsetOffset >= 0) {
diff --git a/media/libstagefright/include/SampleTable.h b/media/libstagefright/include/SampleTable.h
index f44e0a2..a6a6524 100644
--- a/media/libstagefright/include/SampleTable.h
+++ b/media/libstagefright/include/SampleTable.h
@@ -34,6 +34,8 @@
 public:
     SampleTable(const sp<DataSource> &source);
 
+    bool isValid() const;
+
     // type can be 'stco' or 'co64'.
     status_t setChunkOffsetParams(
             uint32_t type, off64_t data_offset, size_t data_size);
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
index 369a067..e5ecd5c 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
@@ -16,8 +16,7 @@
 
 package com.android.mediaframeworktest;
 
-import android.media.EncoderCapabilities.AudioEncoderCap;
-import android.media.EncoderCapabilities.VideoEncoderCap;
+import android.media.CamcorderProfile;
 import android.media.MediaRecorder;
 import android.os.Bundle;
 import android.test.InstrumentationTestRunner;
@@ -29,20 +28,21 @@
 
 public class MediaRecorderStressTestRunner extends InstrumentationTestRunner {
 
-    public static List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
-    public static  List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
-
-    //Get the first capability as the default
-    public static VideoEncoderCap videoEncoder = videoEncoders.get(0);
-    public static AudioEncoderCap audioEncoder = audioEncoders.get(0);
+    // MediaRecorder stress test sets one of the cameras as the video source. As
+    // a result, we should make sure that the encoding parameters as input to
+    // the test must be supported by the corresponding camera.
+    public static int mCameraId = 0;
+    public static int mProfileQuality = CamcorderProfile.QUALITY_HIGH;
+    public static CamcorderProfile profile =
+                        CamcorderProfile.get(mCameraId, mProfileQuality);
 
     public static int mIterations = 100;
-    public static int mVideoEncoder = videoEncoder.mCodec;
-    public static int mAudioEncdoer = audioEncoder.mCodec;
-    public static int mFrameRate = videoEncoder.mMaxFrameRate;
-    public static int mVideoWidth = videoEncoder.mMaxFrameWidth;
-    public static int mVideoHeight = videoEncoder.mMaxFrameHeight;
-    public static int mBitRate = audioEncoder.mMaxBitRate;
+    public static int mVideoEncoder = profile.videoCodec;
+    public static int mAudioEncdoer = profile.audioCodec;
+    public static int mFrameRate = profile.videoFrameRate;
+    public static int mVideoWidth = profile.videoFrameWidth;
+    public static int mVideoHeight = profile.videoFrameHeight;
+    public static int mBitRate = profile.videoBitRate;
     public static boolean mRemoveVideo = true;
     public static int mDuration = 10000;
 
diff --git a/opengl/tests/swapinterval/swapinterval.cpp b/opengl/tests/swapinterval/swapinterval.cpp
index df53b62..8ca031b 100644
--- a/opengl/tests/swapinterval/swapinterval.cpp
+++ b/opengl/tests/swapinterval/swapinterval.cpp
@@ -48,31 +48,35 @@
     EGLNativeWindowType window = android_createDisplaySurface();
 
     dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-    eglInitialize(dpy, 0 ,0) ;//&majorVersion, &minorVersion);
+    eglInitialize(dpy, &majorVersion, &minorVersion);
     eglGetConfigs(dpy, NULL, 0, &numConfigs);
     printf("# configs = %d\n", numConfigs);
 
     status_t err = EGLUtils::selectConfigForNativeWindow(
             dpy, configAttribs, window, &config);
     if (err) {
-        fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
+        fprintf(stderr, "error: %s", EGLUtils::strerror(eglGetError()));
+        eglTerminate(dpy);
         return 0;
     }
 
-    EGLint r,g,b,a;
+    EGLint r,g,b,a, vid;
     eglGetConfigAttrib(dpy, config, EGL_RED_SIZE,   &r);
     eglGetConfigAttrib(dpy, config, EGL_GREEN_SIZE, &g);
     eglGetConfigAttrib(dpy, config, EGL_BLUE_SIZE,  &b);
     eglGetConfigAttrib(dpy, config, EGL_ALPHA_SIZE, &a);
+    eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &vid);
 
     surface = eglCreateWindowSurface(dpy, config, window, NULL);
     if (surface == EGL_NO_SURFACE) {
         EGLint err = eglGetError();
-        fprintf(stderr, "%s, config=%p, format = %d-%d-%d-%d\n",
-                EGLUtils::strerror(err), config, r,g,b,a);
+        fprintf(stderr, "error: %s, config=%p, format = %d-%d-%d-%d, visual-id = %d\n",
+                EGLUtils::strerror(err), config, r,g,b,a, vid);
+        eglTerminate(dpy);
         return 0;
     } else {
-        printf("config=%p, format = %d-%d-%d-%d\n", config, r,g,b,a);
+        printf("config=%p, format = %d-%d-%d-%d, visual-id = %d\n",
+                config, r,g,b,a, vid);
     }
 
     context = eglCreateContext(dpy, config, NULL, NULL);
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index 8c57595..6e5f856 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -541,9 +541,9 @@
 
         final int availSdMb;
         if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
-            StatFs sdStats = new StatFs(Environment.getExternalStorageDirectory().getPath());
-            long availSdSize = (long) (sdStats.getAvailableBlocks() * sdStats.getBlockSize());
-            availSdMb = (int) (availSdSize >> 20);
+            final StatFs sdStats = new StatFs(Environment.getExternalStorageDirectory().getPath());
+            final int blocksToMb = (1 << 20) / sdStats.getBlockSize();
+            availSdMb = sdStats.getAvailableBlocks() * blocksToMb;
         } else {
             availSdMb = -1;
         }
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
index 955d8ae..d235859 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
@@ -130,6 +130,7 @@
                 android:id="@+id/battery"
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
+                android:paddingLeft="6dip"
                 />
         </LinearLayout>
     </LinearLayout>
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index 6732fee..d1919ca 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -66,6 +66,7 @@
                 android:layout_height="match_parent"
                 android:src="@drawable/ic_sysbar_home"
                 systemui:keyCode="3"
+                systemui:keyRepeat="false"
                 android:layout_weight="0"
                 systemui:glowBackground="@drawable/ic_sysbar_highlight"
                 android:contentDescription="@string/accessibility_home"
@@ -148,6 +149,7 @@
                 android:layout_width="match_parent"
                 android:src="@drawable/ic_sysbar_home_land"
                 systemui:keyCode="3"
+                systemui:keyRepeat="false"
                 android:layout_weight="0"
                 android:contentDescription="@string/accessibility_home"
                 systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index b2b6d50..56d1295 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -16,7 +16,11 @@
 
 <resources>
     <declare-styleable name="KeyButtonView">
+        <!-- key code to send when pressed; if absent or 0, no key is sent -->
         <attr name="keyCode" format="integer" />
+        <!-- does this button generate longpress / repeat events? -->
+        <attr name="keyRepeat" format="boolean" />
+        <!-- drawable to use for a swelling, glowing background on press -->
         <attr name="glowBackground" format="reference" />
     </declare-styleable>
     <declare-styleable name="ToggleSlider">
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 325a605..65b022a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.util.AttributeSet;
+import android.util.Slog;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageView;
@@ -32,8 +33,16 @@
         extends LinearLayout 
         implements NetworkController.SignalCluster {
 
+    static final boolean DEBUG = false;
+    static final String TAG = "SignalClusterView";
+    
     NetworkController mNC;
 
+    private boolean mWifiVisible = false;
+    private int mWifiStrengthId = 0, mWifiActivityId = 0;
+    private boolean mMobileVisible = false;
+    private int mMobileStrengthId = 0, mMobileActivityId = 0, mMobileTypeId = 0;
+
     ViewGroup mWifiGroup, mMobileGroup;
     ImageView mWifi, mMobile, mWifiActivity, mMobileActivity, mMobileType;
 
@@ -50,6 +59,7 @@
     }
 
     public void setNetworkController(NetworkController nc) {
+        if (DEBUG) Slog.d(TAG, "NetworkController=" + nc);
         mNC = nc;
     }
 
@@ -64,37 +74,74 @@
         mMobile         = (ImageView) findViewById(R.id.mobile_signal);
         mMobileActivity = (ImageView) findViewById(R.id.mobile_inout);
         mMobileType     = (ImageView) findViewById(R.id.mobile_type);
+
+        apply();
     }
 
     @Override
     protected void onDetachedFromWindow() {
+        mWifiGroup      = null;
+        mWifi           = null;
+        mWifiActivity   = null;
+        mMobileGroup    = null;
+        mMobile         = null;
+        mMobileActivity = null;
+        mMobileType     = null;
+
         super.onDetachedFromWindow();
     }
 
     public void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon) {
-        if (mWifiGroup == null) return;
+        mWifiVisible = visible;
+        mWifiStrengthId = strengthIcon;
+        mWifiActivityId = activityIcon;
 
-        if (visible) {
-            mWifiGroup.setVisibility(View.VISIBLE);
-            mWifi.setImageResource(strengthIcon);
-            mWifiActivity.setImageResource(activityIcon);
-        } else {
-            mWifiGroup.setVisibility(View.GONE);
-        }
+        apply();
     }
 
     public void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
             int typeIcon) {
-        if (mMobileGroup == null) return;
+        mMobileVisible = visible;
+        mMobileStrengthId = strengthIcon;
+        mMobileActivityId = activityIcon;
+        mMobileTypeId = typeIcon;
 
-        if (visible) {
+        apply();
+    }
+
+    // Run after each indicator change.
+    private void apply() {
+        if (mWifiGroup == null) return;
+
+        if (mWifiVisible) {
+            mWifiGroup.setVisibility(View.VISIBLE);
+            mWifi.setImageResource(mWifiStrengthId);
+            mWifiActivity.setImageResource(mWifiActivityId);
+        } else {
+            mWifiGroup.setVisibility(View.GONE);
+        }
+
+        if (DEBUG) Slog.d(TAG,
+                String.format("wifi: %s sig=%d act=%d",
+                    (mWifiVisible ? "VISIBLE" : "GONE"),
+                    mWifiStrengthId, mWifiActivityId));
+
+        if (mMobileVisible) {
             mMobileGroup.setVisibility(View.VISIBLE);
-            mMobile.setImageResource(strengthIcon);
-            mMobileActivity.setImageResource(activityIcon);
-            mMobileType.setImageResource(typeIcon);
+            mMobile.setImageResource(mMobileStrengthId);
+            mMobileActivity.setImageResource(mMobileActivityId);
+            mMobileType.setImageResource(mMobileTypeId);
         } else {
             mMobileGroup.setVisibility(View.GONE);
         }
+
+        if (DEBUG) Slog.d(TAG,
+                String.format("mobile: %s sig=%d act=%d typ=%d",
+                    (mMobileVisible ? "VISIBLE" : "GONE"),
+                    mMobileStrengthId, mMobileActivityId, mMobileTypeId));
+
+        mMobileType.setVisibility(
+                !mWifiVisible ? View.VISIBLE : View.GONE);
     }
 }
 
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 81c25e0..2e14bef 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -348,6 +348,7 @@
         final SignalClusterView signalCluster = 
                 (SignalClusterView)sb.findViewById(R.id.signal_cluster);
         mNetworkController.addSignalCluster(signalCluster);
+        signalCluster.setNetworkController(mNetworkController);
 
         // Recents Panel
         updateRecentsPanel();
@@ -467,7 +468,7 @@
                     | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                     | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
                     | WindowManager.LayoutParams.FLAG_SLIPPERY,
-                PixelFormat.TRANSLUCENT);
+                PixelFormat.OPAQUE);
 
         lp.setTitle("NavigationBar");
         switch (rotation) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 38a1029..fc18eef 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -57,11 +57,12 @@
     int mTouchSlop;
     Drawable mGlowBG;
     float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f;
+    boolean mSupportsLongpress = true;
 
     Runnable mCheckLongPress = new Runnable() {
         public void run() {
             if (isPressed()) {
-
+                // Slog.d("KeyButtonView", "longpressed: " + this);
                 if (mCode != 0) {
                     mRepeat++;
                     sendEvent(KeyEvent.ACTION_DOWN,
@@ -89,6 +90,8 @@
                 defStyle, 0);
 
         mCode = a.getInteger(R.styleable.KeyButtonView_keyCode, 0);
+        
+        mSupportsLongpress = a.getBoolean(R.styleable.KeyButtonView_keyRepeat, true);
 
         mGlowBG = a.getDrawable(R.styleable.KeyButtonView_glowBackground);
         if (mGlowBG != null) {
@@ -207,11 +210,19 @@
                 mDownTime = SystemClock.uptimeMillis();
                 mRepeat = 0;
                 mSending = true;
+                setPressed(true);
                 sendEvent(KeyEvent.ACTION_DOWN,
                         KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, mDownTime);
-                setPressed(true);
-                removeCallbacks(mCheckLongPress);
-                postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
+                if (mSupportsLongpress) {
+                    removeCallbacks(mCheckLongPress);
+                    postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
+                } else {
+                    mSending = false;
+                    sendEvent(KeyEvent.ACTION_UP,
+                            KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, mDownTime);
+                    sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
+                    playSoundEffect(SoundEffectConstants.CLICK);
+                }
                 break;
             case MotionEvent.ACTION_MOVE:
                 if (mSending) {
@@ -230,7 +241,9 @@
                     sendEvent(KeyEvent.ACTION_UP,
                             KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY
                                 | KeyEvent.FLAG_CANCELED);
-                    removeCallbacks(mCheckLongPress);
+                    if (mSupportsLongpress) {
+                        removeCallbacks(mCheckLongPress);
+                    }
                 }
                 break;
             case MotionEvent.ACTION_UP:
@@ -239,15 +252,15 @@
                 if (mSending) {
                     mSending = false;
                     final int flags = KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY;
-                    removeCallbacks(mCheckLongPress);
+                    if (mSupportsLongpress) {
+                        removeCallbacks(mCheckLongPress);
+                    }
 
                     if (mCode != 0) {
                         if (doIt) {
                             sendEvent(KeyEvent.ACTION_UP, flags);
                             sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
                             playSoundEffect(SoundEffectConstants.CLICK);
-                        } else {
-                            sendEvent(KeyEvent.ACTION_UP, flags | KeyEvent.FLAG_CANCELED);
                         }
                     } else {
                         // no key code, just a regular ImageView
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 1a24d05..16db1d7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -79,11 +79,11 @@
     String mNetworkNameDefault;
     String mNetworkNameSeparator;
     int mPhoneSignalIconId;
-    int mDataDirectionIconId;
-    int mDataDirectionOverlayIconId;
+    int mDataDirectionIconId; // data + data direction on phones
     int mDataSignalIconId;
     int mDataTypeIconId;
     boolean mDataActive;
+    int mMobileActivityIconId; // overlay arrows for data direction
 
     String mContentDescriptionPhoneSignal;
     String mContentDescriptionWifi;
@@ -97,6 +97,7 @@
     int mWifiLevel;
     String mWifiSsid;
     int mWifiIconId = 0;
+    int mWifiActivityIconId = 0; // overlay arrows for wifi direction
     int mWifiActivity = WifiManager.DATA_ACTIVITY_NONE;
 
     // bluetooth
@@ -221,8 +222,17 @@
         mLabelViews.add(v);
     }
 
-    public void addSignalCluster(SignalCluster v) {
-        mSignalClusters.add(v);
+    public void addSignalCluster(SignalCluster cluster) {
+        mSignalClusters.add(cluster);
+        cluster.setWifiIndicators(
+                mWifiEnabled,
+                mWifiIconId,
+                mWifiActivityIconId);
+        cluster.setMobileDataIndicators(
+                hasMobileDataFeature(),
+                mPhoneSignalIconId,
+                mMobileActivityIconId,
+                mDataTypeIconId);
     }
 
     public void setStackedMode(boolean stacked) {
@@ -670,7 +680,7 @@
             if (mDataAndWifiStacked) {
                 mWifiIconId = 0;
             } else {
-                mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[0][0];
+                mWifiIconId = mWifiEnabled ? WifiIcons.WIFI_SIGNAL_STRENGTH[0][0] : 0;
             }
             mContentDescriptionWifi = mContext.getString(R.string.accessibility_no_wifi);
         }
@@ -735,85 +745,93 @@
 
     // ===== Update the views =======================================================
 
-    // figure out what to show- there should be one connected network or nothing
-    // General order of preference is: wifi, 3G than bluetooth. This might vary by product.
     void refreshViews() {
         Context context = mContext;
 
-        int combinedSignalIconId;
-        int dataDirectionOverlayIconId = 0,
-            wifiActivityIconId = 0,
-            mobileActivityIconId = 0;
-        int dataTypeIconId;
-        String label;
+        int combinedSignalIconId = 0;
+        int combinedActivityIconId = 0;
+        String label = "";
         int N;
 
-        if (mWifiConnected) {
-            if (mWifiSsid == null) {
-                label = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid);
-            } else {
-                label = mWifiSsid;
-                switch (mWifiActivity) {
-                    case WifiManager.DATA_ACTIVITY_IN:
-                        dataDirectionOverlayIconId = R.drawable.stat_sys_wifi_in;
-                        break;
-                    case WifiManager.DATA_ACTIVITY_OUT:
-                        dataDirectionOverlayIconId = R.drawable.stat_sys_wifi_out;
-                        break;
-                    case WifiManager.DATA_ACTIVITY_INOUT:
-                        dataDirectionOverlayIconId = R.drawable.stat_sys_wifi_inout;
-                        break;
-                    case WifiManager.DATA_ACTIVITY_NONE:
-                        break;
-                }
-                wifiActivityIconId = dataDirectionOverlayIconId;
-            }
-            combinedSignalIconId = mWifiIconId;
-            mContentDescriptionCombinedSignal = mContentDescriptionWifi;
-            dataTypeIconId = 0;
-        } else if (mDataConnected) {
+        if (mDataConnected) {
             label = mNetworkName;
             combinedSignalIconId = mDataSignalIconId;
             switch (mDataActivity) {
                 case TelephonyManager.DATA_ACTIVITY_IN:
-                    dataDirectionOverlayIconId = R.drawable.stat_sys_signal_in;
+                    mMobileActivityIconId = R.drawable.stat_sys_signal_in;
                     break;
                 case TelephonyManager.DATA_ACTIVITY_OUT:
-                    dataDirectionOverlayIconId = R.drawable.stat_sys_signal_out;
+                    mMobileActivityIconId = R.drawable.stat_sys_signal_out;
                     break;
                 case TelephonyManager.DATA_ACTIVITY_INOUT:
-                    dataDirectionOverlayIconId = R.drawable.stat_sys_signal_inout;
+                    mMobileActivityIconId = R.drawable.stat_sys_signal_inout;
                     break;
                 default:
-                    dataDirectionOverlayIconId = 0;
+                    mMobileActivityIconId = 0;
                     break;
             }
-            mobileActivityIconId = dataDirectionOverlayIconId;
-            combinedSignalIconId = mDataSignalIconId;
+
+            combinedActivityIconId = mMobileActivityIconId;
+            combinedSignalIconId = mDataSignalIconId; // set by updateDataIcon()
             mContentDescriptionCombinedSignal = mContentDescriptionDataType;
-            dataTypeIconId = mDataTypeIconId;
-        } else if (mBluetoothTethered) {
+        }
+        
+        if (mWifiConnected) {
+            if (mWifiSsid == null) {
+                label = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid);
+                mWifiActivityIconId = 0; // no wifis, no bits
+            } else {
+                label = mWifiSsid;
+                switch (mWifiActivity) {
+                    case WifiManager.DATA_ACTIVITY_IN:
+                        mWifiActivityIconId = R.drawable.stat_sys_wifi_in;
+                        break;
+                    case WifiManager.DATA_ACTIVITY_OUT:
+                        mWifiActivityIconId = R.drawable.stat_sys_wifi_out;
+                        break;
+                    case WifiManager.DATA_ACTIVITY_INOUT:
+                        mWifiActivityIconId = R.drawable.stat_sys_wifi_inout;
+                        break;
+                    case WifiManager.DATA_ACTIVITY_NONE:
+                        break;
+                }
+            }
+
+            combinedActivityIconId = mWifiActivityIconId;
+            combinedSignalIconId = mWifiIconId; // set by updateWifiIcons()
+            mContentDescriptionCombinedSignal = mContentDescriptionWifi;
+        }
+
+        if (mBluetoothTethered) {
             label = mContext.getString(R.string.bluetooth_tethered);
             combinedSignalIconId = mBluetoothTetherIconId;
             mContentDescriptionCombinedSignal = mContext.getString(
                     R.string.accessibility_bluetooth_tether);
-            dataTypeIconId = 0;
-        } else if (mAirplaneMode &&
+        }
+        
+        if (mAirplaneMode &&
                 (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly()))) {
             // Only display the flight-mode icon if not in "emergency calls only" mode.
             label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
-            combinedSignalIconId = R.drawable.stat_sys_signal_flightmode;
             mContentDescriptionCombinedSignal = mContext.getString(
                     R.string.accessibility_airplane_mode);
-            dataTypeIconId = R.drawable.stat_sys_signal_flightmode; // was 0;
-        } else {
+            
+            // look again; your radios are now airplanes
+            mPhoneSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_flightmode;
+            mDataTypeIconId = 0;
+
+            combinedSignalIconId = mDataSignalIconId;
+        }
+        else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered) {
+            // pretty much totally disconnected
+
             label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
             // On devices without mobile radios, we want to show the wifi icon
             combinedSignalIconId =
                 hasMobileDataFeature() ? mDataSignalIconId : mWifiIconId;
             mContentDescriptionCombinedSignal = hasMobileDataFeature()
                 ? mContentDescriptionDataType : mContentDescriptionWifi;
-            dataTypeIconId = 0;
+            mDataTypeIconId = 0;
         }
 
         if (DEBUG) {
@@ -825,7 +843,7 @@
                     + " combinedSignalIconId=0x"
                     + Integer.toHexString(combinedSignalIconId)
                     + "/" + getResourceName(combinedSignalIconId)
-                    + " dataDirectionOverlayIconId=0x" + Integer.toHexString(dataDirectionOverlayIconId)
+                    + " combinedActivityIconId=0x" + Integer.toHexString(combinedActivityIconId)
                     + " mAirplaneMode=" + mAirplaneMode
                     + " mDataActivity=" + mDataActivity
                     + " mPhoneSignalIconId=0x" + Integer.toHexString(mPhoneSignalIconId)
@@ -837,21 +855,21 @@
         }
 
         if (mLastPhoneSignalIconId          != mPhoneSignalIconId
-         || mLastDataDirectionOverlayIconId != dataDirectionOverlayIconId
+         || mLastDataDirectionOverlayIconId != combinedActivityIconId
          || mLastWifiIconId                 != mWifiIconId
-         || mLastDataTypeIconId             != dataTypeIconId)
+         || mLastDataTypeIconId             != mDataTypeIconId)
         {
             // NB: the mLast*s will be updated later
             for (SignalCluster cluster : mSignalClusters) {
                 cluster.setWifiIndicators(
                         mWifiEnabled,
                         mWifiIconId,
-                        wifiActivityIconId);
+                        mWifiActivityIconId);
                 cluster.setMobileDataIndicators(
                         hasMobileDataFeature(),
                         mPhoneSignalIconId,
-                        mobileActivityIconId,
-                        dataTypeIconId);
+                        mMobileActivityIconId,
+                        mDataTypeIconId);
             }
         }
 
@@ -905,35 +923,35 @@
         }
 
         // the data network type overlay
-        if (mLastDataTypeIconId != dataTypeIconId) {
-            mLastDataTypeIconId = dataTypeIconId;
+        if (mLastDataTypeIconId != mDataTypeIconId) {
+            mLastDataTypeIconId = mDataTypeIconId;
             N = mDataTypeIconViews.size();
             for (int i=0; i<N; i++) {
                 final ImageView v = mDataTypeIconViews.get(i);
-                if (dataTypeIconId == 0) {
+                if (mDataTypeIconId == 0) {
                     v.setVisibility(View.INVISIBLE);
                 } else {
                     v.setVisibility(View.VISIBLE);
-                    v.setImageResource(dataTypeIconId);
+                    v.setImageResource(mDataTypeIconId);
                     v.setContentDescription(mContentDescriptionDataType);
                 }
             }
         }
 
         // the data direction overlay
-        if (mLastDataDirectionOverlayIconId != dataDirectionOverlayIconId) {
+        if (mLastDataDirectionOverlayIconId != combinedActivityIconId) {
             if (DEBUG) {
-                Slog.d(TAG, "changing data overlay icon id to " + dataDirectionOverlayIconId);
+                Slog.d(TAG, "changing data overlay icon id to " + combinedActivityIconId);
             }
-            mLastDataDirectionOverlayIconId = dataDirectionOverlayIconId;
+            mLastDataDirectionOverlayIconId = combinedActivityIconId;
             N = mDataDirectionOverlayIconViews.size();
             for (int i=0; i<N; i++) {
                 final ImageView v = mDataDirectionOverlayIconViews.get(i);
-                if (dataDirectionOverlayIconId == 0) {
+                if (combinedActivityIconId == 0) {
                     v.setVisibility(View.INVISIBLE);
                 } else {
                     v.setVisibility(View.VISIBLE);
-                    v.setImageResource(dataDirectionOverlayIconId);
+                    v.setImageResource(combinedActivityIconId);
                     v.setContentDescription(mContentDescriptionDataType);
                 }
             }
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 3dcc297..0ee6488 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -235,6 +235,11 @@
     }
 
     @Override
+    public void setUiOptions(int uiOptions, int mask) {
+        mUiOptions = (mUiOptions & ~mask) | (uiOptions & mask);
+    }
+
+    @Override
     public void setContentView(int layoutResID) {
         if (mContentParent == null) {
             installDecor();
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index ff8dc92..b60a038 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2850,7 +2850,7 @@
             // or orientation sensor disabled
             //or case.unspecified
             if (mHdmiPlugged) {
-                return Surface.ROTATION_0;
+                return mLandscapeRotation;
             } else if (mLidOpen == LID_OPEN) {
                 return mLidOpenRotation;
             } else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR && mCarDockRotation >= 0) {
@@ -3229,7 +3229,8 @@
                         int result = ActivityManagerNative.getDefault()
                                 .startActivity(null, dock,
                                         dock.resolveTypeIfNeeded(mContext.getContentResolver()),
-                                        null, 0, null, null, 0, true /* onlyIfNeeded*/, false);
+                                        null, 0, null, null, 0, true /* onlyIfNeeded*/, false,
+                                        null, null, false);
                         if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
                             return false;
                         }
@@ -3238,7 +3239,8 @@
                 int result = ActivityManagerNative.getDefault()
                         .startActivity(null, mHomeIntent,
                                 mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
-                                null, 0, null, null, 0, true /* onlyIfNeeded*/, false);
+                                null, 0, null, null, 0, true /* onlyIfNeeded*/, false,
+                                null, null, false);
                 if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
                     return false;
                 }
diff --git a/preloaded-classes b/preloaded-classes
index 1eabe14..8136f8e 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -975,7 +975,7 @@
 com.google.android.gles_jni.EGLImpl
 com.google.android.gles_jni.EGLSurfaceImpl
 com.google.android.gles_jni.GLImpl
-com.google.i18n.phonenumbers.PhoneNumberUtil
+com.android.i18n.phonenumbers.PhoneNumberUtil
 dalvik.system.BlockGuard
 dalvik.system.BlockGuard$1
 dalvik.system.BlockGuard$2
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 22372cf1..3cd3ac3 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -666,6 +666,9 @@
 #endif
         setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
     }
+    if (entry == mNextUnblockedEvent) {
+        mNextUnblockedEvent = NULL;
+    }
     entry->release();
 }
 
@@ -3193,10 +3196,12 @@
                 LOGD("Focus left window: %s",
                         mFocusedWindowHandle->name.string());
 #endif
-                CancelationOptions options(CancelationOptions::CANCEL_NON_POINTER_EVENTS,
-                        "focus left window");
-                synthesizeCancelationEventsForInputChannelLocked(
-                        mFocusedWindowHandle->inputChannel, options);
+                if (mFocusedWindowHandle->inputChannel != NULL) {
+                    CancelationOptions options(CancelationOptions::CANCEL_NON_POINTER_EVENTS,
+                            "focus left window");
+                    synthesizeCancelationEventsForInputChannelLocked(
+                            mFocusedWindowHandle->inputChannel, options);
+                }
             }
             if (newFocusedWindowHandle != NULL) {
 #if DEBUG_FOCUS
@@ -3213,10 +3218,12 @@
 #if DEBUG_FOCUS
                 LOGD("Touched window was removed: %s", touchedWindow.windowHandle->name.string());
 #endif
-                CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS,
-                        "touched window was removed");
-                synthesizeCancelationEventsForInputChannelLocked(
-                        touchedWindow.windowHandle->inputChannel, options);
+                if (touchedWindow.windowHandle->inputChannel != NULL) {
+                    CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS,
+                            "touched window was removed");
+                    synthesizeCancelationEventsForInputChannelLocked(
+                            touchedWindow.windowHandle->inputChannel, options);
+                }
                 mTouchState.windows.removeAt(i--);
             }
         }
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index a679ca7..f5fd6bd 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -817,11 +817,10 @@
     }
 
     Provider lookupProviderLocked(ComponentName provider) {
-        final String className = provider.getClassName();
         final int N = mInstalledProviders.size();
         for (int i=0; i<N; i++) {
             Provider p = mInstalledProviders.get(i);
-            if (p.info.provider.equals(provider) || className.equals(p.info.oldName)) {
+            if (p.info.provider.equals(provider)) {
                 return p;
             }
         }
@@ -1006,11 +1005,6 @@
 
             p = new Provider();
             AppWidgetProviderInfo info = p.info = new AppWidgetProviderInfo();
-            // If metaData was null, we would have returned earlier when getting
-            // the parser No need to do the check here
-            info.oldName = activityInfo.metaData.getString(
-                    AppWidgetManager.META_DATA_APPWIDGET_OLD_NAME);
-
             info.provider = component;
             p.uid = activityInfo.applicationInfo.uid;
 
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index 1c06636..b3309e5 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -3312,6 +3312,8 @@
                 }
             } catch (NumberFormatException e) {
                 Slog.w(TAG, "Corrupt restore manifest for package " + info.packageName);
+            } catch (IllegalArgumentException e) {
+                Slog.w(TAG, e.getMessage());
             }
 
             return policy;
diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java
index 1aff9a2..ab9ae69 100644
--- a/services/java/com/android/server/BatteryService.java
+++ b/services/java/com/android/server/BatteryService.java
@@ -498,7 +498,7 @@
             return;
         }
 
-        if (args == null || args.length == 0) {
+        if (args == null || args.length == 0 || "-a".equals(args[0])) {
             synchronized (this) {
                 pw.println("Current Battery Service state:");
                 pw.println("  AC powered: " + mAcOnline);
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index acfc7a4..22ce484 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -468,14 +468,10 @@
         for (int netType : mPriorityList) {
             switch (mNetConfigs[netType].radio) {
             case ConnectivityManager.TYPE_WIFI:
-                if (DBG) log("Starting Wifi Service.");
-                WifiStateTracker wst = new WifiStateTracker();
-                WifiService wifiService = new WifiService(context);
-                ServiceManager.addService(Context.WIFI_SERVICE, wifiService);
-                wifiService.checkAndStartWifi();
-                mNetTrackers[ConnectivityManager.TYPE_WIFI] = wst;
-                wst.startMonitoring(context, mHandler);
-                break;
+                mNetTrackers[netType] = new WifiStateTracker(netType,
+                        mNetConfigs[netType].name);
+                mNetTrackers[netType].startMonitoring(context, mHandler);
+               break;
             case ConnectivityManager.TYPE_MOBILE:
                 mNetTrackers[netType] = new MobileDataStateTracker(netType,
                         mNetConfigs[netType].name);
@@ -882,15 +878,8 @@
 
         FeatureUser f = new FeatureUser(networkType, feature, binder);
 
-        // TODO - move this into the MobileDataStateTracker
-        int usedNetworkType = networkType;
-        if(networkType == ConnectivityManager.TYPE_MOBILE) {
-            usedNetworkType = convertFeatureToNetworkType(feature);
-            if (usedNetworkType < 0) {
-                loge("Can't match any netTracker!");
-                usedNetworkType = networkType;
-            }
-        }
+        // TODO - move this into individual networktrackers
+        int usedNetworkType = convertFeatureToNetworkType(networkType, feature);
 
         if (mProtectedNetworks.contains(usedNetworkType)) {
             enforceConnectivityInternalPermission();
@@ -900,7 +889,6 @@
         if (network != null) {
             Integer currentPid = new Integer(getCallingPid());
             if (usedNetworkType != networkType) {
-                NetworkStateTracker radio = mNetTrackers[networkType];
                 NetworkInfo ni = network.getNetworkInfo();
 
                 if (ni.isAvailable() == false) {
@@ -1046,14 +1034,9 @@
                 }
             }
 
-            // TODO - move to MobileDataStateTracker
-            int usedNetworkType = networkType;
-            if (networkType == ConnectivityManager.TYPE_MOBILE) {
-                usedNetworkType = convertFeatureToNetworkType(feature);
-                if (usedNetworkType < 0) {
-                    usedNetworkType = networkType;
-                }
-            }
+            // TODO - move to individual network trackers
+            int usedNetworkType = convertFeatureToNetworkType(networkType, feature);
+
             tracker =  mNetTrackers[usedNetworkType];
             if (tracker == null) {
                 if (DBG) log("ignoring - no known tracker for net type " + usedNetworkType);
@@ -1778,15 +1761,32 @@
             }
         }
         mCurrentLinkProperties[netType] = newLp;
-        updateRoutes(newLp, curLp, mNetConfigs[netType].isDefault());
+        boolean resetDns = updateRoutes(newLp, curLp, mNetConfigs[netType].isDefault());
 
-        if (doReset || resetMask != 0) {
+        if (resetMask != 0 || resetDns) {
             LinkProperties linkProperties = mNetTrackers[netType].getLinkProperties();
             if (linkProperties != null) {
                 String iface = linkProperties.getInterfaceName();
                 if (TextUtils.isEmpty(iface) == false) {
-                    if (DBG) log("resetConnections(" + iface + ", " + resetMask + ")");
-                    NetworkUtils.resetConnections(iface, resetMask);
+                    if (resetMask != 0) {
+                        if (DBG) log("resetConnections(" + iface + ", " + resetMask + ")");
+                        NetworkUtils.resetConnections(iface, resetMask);
+
+                        // Tell VPN the interface is down. It is a temporary
+                        // but effective fix to make VPN aware of the change.
+                        if ((resetMask & NetworkUtils.RESET_IPV4_ADDRESSES) != 0) {
+                            mVpn.interfaceStatusChanged(iface, false);
+                        }
+                    }
+                    if (resetDns) {
+                        if (DBG) log("resetting DNS cache for " + iface);
+                        try {
+                            mNetd.flushInterfaceDnsCache(iface);
+                        } catch (Exception e) {
+                            // never crash - catch them all
+                            loge("Exception resetting dns cache: " + e);
+                        }
+                    }
                 }
             }
         }
@@ -1808,8 +1808,10 @@
      * is a noop.
      * Uses isLinkDefault to determine if default routes should be set or conversely if
      * host routes should be set to the dns servers
+     * returns a boolean indicating the routes changed
      */
-    private void updateRoutes(LinkProperties newLp, LinkProperties curLp, boolean isLinkDefault) {
+    private boolean updateRoutes(LinkProperties newLp, LinkProperties curLp,
+            boolean isLinkDefault) {
         Collection<RouteInfo> routesToAdd = null;
         CompareResult<InetAddress> dnsDiff = new CompareResult<InetAddress>();
         CompareResult<RouteInfo> routeDiff = new CompareResult<RouteInfo>();
@@ -1822,6 +1824,8 @@
             dnsDiff.added = newLp.getDnses();
         }
 
+        boolean routesChanged = (routeDiff.removed.size() != 0 || routeDiff.added.size() != 0);
+
         for (RouteInfo r : routeDiff.removed) {
             if (isLinkDefault || ! r.isDefaultRoute()) {
                 removeRoute(curLp, r);
@@ -1849,15 +1853,7 @@
 
         if (!isLinkDefault) {
             // handle DNS routes
-            if (routeDiff.removed.size() == 0 && routeDiff.added.size() == 0) {
-                // no change in routes, check for change in dns themselves
-                for (InetAddress oldDns : dnsDiff.removed) {
-                    removeRouteToAddress(curLp, oldDns);
-                }
-                for (InetAddress newDns : dnsDiff.added) {
-                    addRouteToAddress(newLp, newDns);
-                }
-            } else {
+            if (routesChanged) {
                 // routes changed - remove all old dns entries and add new
                 if (curLp != null) {
                     for (InetAddress oldDns : curLp.getDnses()) {
@@ -1869,8 +1865,17 @@
                         addRouteToAddress(newLp, newDns);
                     }
                 }
+            } else {
+                // no change in routes, check for change in dns themselves
+                for (InetAddress oldDns : dnsDiff.removed) {
+                    removeRouteToAddress(curLp, oldDns);
+                }
+                for (InetAddress newDns : dnsDiff.added) {
+                    addRouteToAddress(newLp, newDns);
+                }
             }
         }
+        return routesChanged;
     }
 
 
@@ -2650,25 +2655,38 @@
         Slog.e(TAG, s);
     }
 
-    int convertFeatureToNetworkType(String feature){
-        int networkType = -1;
-        if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_MMS;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_SUPL;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
-                TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_DUN;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_FOTA)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_FOTA;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_IMS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_IMS;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_CBS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_CBS;
+    int convertFeatureToNetworkType(int networkType, String feature) {
+        int usedNetworkType = networkType;
+
+        if(networkType == ConnectivityManager.TYPE_MOBILE) {
+            if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
+                    TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_FOTA)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_FOTA;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_IMS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_IMS;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_CBS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_CBS;
+            } else {
+                Slog.e(TAG, "Can't match any mobile netTracker!");
+            }
+        } else if (networkType == ConnectivityManager.TYPE_WIFI) {
+            if (TextUtils.equals(feature, "p2p")) {
+                usedNetworkType = ConnectivityManager.TYPE_WIFI_P2P;
+            } else {
+                Slog.e(TAG, "Can't match any wifi netTracker!");
+            }
+        } else {
+            Slog.e(TAG, "Unexpected network type");
         }
-        return networkType;
+        return usedNetworkType;
     }
 
     private static <T> T checkNotNull(T value, String message) {
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 7f61c635..fd03201 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -89,7 +89,8 @@
  * @hide - Applications should use android.os.storage.StorageManager
  * to access the MountService.
  */
-class MountService extends IMountService.Stub implements INativeDaemonConnectorCallbacks {
+class MountService extends IMountService.Stub
+        implements INativeDaemonConnectorCallbacks, Watchdog.Monitor {
 
     private static final boolean LOCAL_LOGD = false;
     private static final boolean DEBUG_UNMOUNT = false;
@@ -474,7 +475,8 @@
                             // it is not safe to call vold with mVolumeStates locked
                             // so we make a copy of the paths and states and process them
                             // outside the lock
-                            String[] paths, states;
+                            String[] paths;
+                            String[] states;
                             int count;
                             synchronized (mVolumeStates) {
                                 Set<String> keys = mVolumeStates.keySet();
@@ -1179,6 +1181,9 @@
         mReady = false;
         Thread thread = new Thread(mConnector, VOLD_TAG);
         thread.start();
+
+        // Add ourself to the Watchdog monitors.
+        Watchdog.getInstance().addMonitor(this);
     }
 
     /**
@@ -2379,5 +2384,11 @@
             }
         }
     }
-}
 
+    /** {@inheritDoc} */
+    public void monitor() {
+        if (mConnector != null) {
+            mConnector.monitor();
+        }
+    }
+}
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index fed554c..43d938c 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -16,24 +16,18 @@
 
 package com.android.server;
 
-import android.net.LocalSocketAddress;
 import android.net.LocalSocket;
-import android.os.Environment;
+import android.net.LocalSocketAddress;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Message;
 import android.os.SystemClock;
-import android.os.SystemProperties;
 import android.util.Slog;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.net.Socket;
-
-import java.util.List;
 import java.util.ArrayList;
-import java.util.ListIterator;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 
@@ -42,7 +36,7 @@
  * daemon which uses the libsysutils FrameworkListener
  * protocol.
  */
-final class NativeDaemonConnector implements Runnable, Handler.Callback {
+final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdog.Monitor {
     private static final boolean LOCAL_LOGD = false;
 
     private BlockingQueue<String> mResponseQueue;
@@ -52,6 +46,9 @@
     private INativeDaemonConnectorCallbacks mCallbacks;
     private Handler               mCallbackHandler;
 
+    /** Lock held whenever communicating with native daemon. */
+    private Object mDaemonLock = new Object();
+
     private final int BUFFER_SIZE = 4096;
 
     class ResponseCode {
@@ -177,7 +174,7 @@
             Slog.e(TAG, "Communications error", ex);
             throw ex;
         } finally {
-            synchronized (this) {
+            synchronized (mDaemonLock) {
                 if (mOutputStream != null) {
                     try {
                         mOutputStream.close();
@@ -198,9 +195,8 @@
         }
     }
 
-    private void sendCommand(String command)
-            throws NativeDaemonConnectorException  {
-        sendCommand(command, null);
+    private void sendCommandLocked(String command) throws NativeDaemonConnectorException {
+        sendCommandLocked(command, null);
     }
 
     /**
@@ -209,25 +205,23 @@
      * @param command  The command to send to the daemon
      * @param argument The argument to send with the command (or null)
      */
-    private void sendCommand(String command, String argument)
-            throws NativeDaemonConnectorException  {
-        synchronized (this) {
-            if (LOCAL_LOGD) Slog.d(TAG, String.format("SND -> {%s} {%s}", command, argument));
-            if (mOutputStream == null) {
-                Slog.e(TAG, "No connection to daemon", new IllegalStateException());
-                throw new NativeDaemonConnectorException("No output stream!");
-            } else {
-                StringBuilder builder = new StringBuilder(command);
-                if (argument != null) {
-                    builder.append(argument);
-                }
-                builder.append('\0');
+    private void sendCommandLocked(String command, String argument)
+            throws NativeDaemonConnectorException {
+        if (LOCAL_LOGD) Slog.d(TAG, String.format("SND -> {%s} {%s}", command, argument));
+        if (mOutputStream == null) {
+            Slog.e(TAG, "No connection to daemon", new IllegalStateException());
+            throw new NativeDaemonConnectorException("No output stream!");
+        } else {
+            StringBuilder builder = new StringBuilder(command);
+            if (argument != null) {
+                builder.append(argument);
+            }
+            builder.append('\0');
 
-                try {
-                    mOutputStream.write(builder.toString().getBytes());
-                } catch (IOException ex) {
-                    Slog.e(TAG, "IOException in sendCommand", ex);
-                }
+            try {
+                mOutputStream.write(builder.toString().getBytes());
+            } catch (IOException ex) {
+                Slog.e(TAG, "IOException in sendCommand", ex);
             }
         }
     }
@@ -235,10 +229,15 @@
     /**
      * Issue a command to the native daemon and return the responses
      */
-    public synchronized ArrayList<String> doCommand(String cmd)
-            throws NativeDaemonConnectorException  {
+    public ArrayList<String> doCommand(String cmd) throws NativeDaemonConnectorException {
+        synchronized (mDaemonLock) {
+            return doCommandLocked(cmd);
+        }
+    }
+
+    private ArrayList<String> doCommandLocked(String cmd) throws NativeDaemonConnectorException {
         mResponseQueue.clear();
-        sendCommand(cmd);
+        sendCommandLocked(cmd);
 
         ArrayList<String> response = new ArrayList<String>();
         boolean complete = false;
@@ -278,7 +277,7 @@
         return response;
     }
 
-    /*
+    /**
      * Issues a list command and returns the cooked list
      */
     public String[] doListCommand(String cmd, int expectedResponseCode)
@@ -317,4 +316,9 @@
         }
         throw new NativeDaemonConnectorException("Got an empty response");
     }
+
+    /** {@inheritDoc} */
+    public void monitor() {
+        synchronized (mDaemonLock) { }
+    }
 }
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 782e7d7..06077dd 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -18,6 +18,7 @@
 
 import static android.Manifest.permission.MANAGE_NETWORK_POLICY;
 import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.SET_DEFAULT;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.provider.Settings.Secure.NETSTATS_ENABLED;
@@ -68,7 +69,7 @@
 /**
  * @hide
  */
-class NetworkManagementService extends INetworkManagementService.Stub {
+class NetworkManagementService extends INetworkManagementService.Stub implements Watchdog.Monitor {
     private static final String TAG = "NetworkManagementService";
     private static final boolean DBG = false;
     private static final String NETD_TAG = "NetdConnector";
@@ -88,8 +89,9 @@
 
     /** {@link #mStatsXtUid} headers. */
     private static final String KEY_IFACE = "iface";
-    private static final String KEY_TAG_HEX = "acct_tag_hex";
     private static final String KEY_UID = "uid_tag_int";
+    private static final String KEY_COUNTER_SET = "cnt_set";
+    private static final String KEY_TAG_HEX = "acct_tag_hex";
     private static final String KEY_RX_BYTES = "rx_bytes";
     private static final String KEY_RX_PACKETS = "rx_packets";
     private static final String KEY_TX_BYTES = "tx_bytes";
@@ -139,7 +141,7 @@
     /** Set of UIDs with active reject rules. */
     private SparseBooleanArray mUidRejectOnQuota = new SparseBooleanArray();
 
-    private boolean mBandwidthControlEnabled;
+    private volatile boolean mBandwidthControlEnabled;
 
     /**
      * Constructs a new NetworkManagementService instance
@@ -162,6 +164,9 @@
         mConnector = new NativeDaemonConnector(
                 new NetdCallbackReceiver(), "netd", 10, NETD_TAG);
         mThread = new Thread(mConnector, NETD_TAG);
+
+        // Add ourself to the Watchdog monitors.
+        Watchdog.getInstance().addMonitor(this);
     }
 
     public static NetworkManagementService create(Context context) throws InterruptedException {
@@ -185,14 +190,12 @@
     }
 
     public void systemReady() {
-
         // only enable bandwidth control when support exists, and requested by
         // system setting.
         final boolean hasKernelSupport = new File("/proc/net/xt_qtaguid/ctrl").exists();
         final boolean shouldEnable =
                 Settings.Secure.getInt(mContext.getContentResolver(), NETSTATS_ENABLED, 1) != 0;
 
-        mBandwidthControlEnabled = false;
         if (hasKernelSupport && shouldEnable) {
             Slog.d(TAG, "enabling bandwidth control");
             try {
@@ -288,7 +291,7 @@
     /**
      * Let us know the daemon is connected
      */
-    protected void onConnected() {
+    protected void onDaemonConnected() {
         if (DBG) Slog.d(TAG, "onConnected");
         mConnectedSignal.countDown();
     }
@@ -299,13 +302,12 @@
     //
 
     class NetdCallbackReceiver implements INativeDaemonConnectorCallbacks {
+        /** {@inheritDoc} */
         public void onDaemonConnected() {
-            NetworkManagementService.this.onConnected();
-            new Thread() {
-                public void run() {
-                }
-            }.start();
+            NetworkManagementService.this.onDaemonConnected();
         }
+
+        /** {@inheritDoc} */
         public boolean onEvent(int code, String raw, String[] cooked) {
             switch (code) {
             case NetdResponseCode.InterfaceChange:
@@ -1041,6 +1043,7 @@
                 try {
                     entry.iface = values.get(0);
                     entry.uid = UID_ALL;
+                    entry.set = SET_DEFAULT;
                     entry.tag = TAG_NONE;
                     entry.rxBytes = Long.parseLong(values.get(1));
                     entry.rxPackets = Long.parseLong(values.get(2));
@@ -1071,6 +1074,7 @@
 
                 entry.iface = iface;
                 entry.uid = UID_ALL;
+                entry.set = SET_DEFAULT;
                 entry.tag = TAG_NONE;
                 entry.rxBytes = readSingleLongFromFile(new File(ifacePath, "rx_bytes"));
                 entry.rxPackets = readSingleLongFromFile(new File(ifacePath, "rx_packets"));
@@ -1319,8 +1323,9 @@
 
                 try {
                     entry.iface = parsed.get(KEY_IFACE);
-                    entry.tag = kernelToTag(parsed.get(KEY_TAG_HEX));
                     entry.uid = getParsedInt(parsed, KEY_UID);
+                    entry.set = getParsedInt(parsed, KEY_COUNTER_SET);
+                    entry.tag = kernelToTag(parsed.get(KEY_TAG_HEX));
                     entry.rxBytes = getParsedLong(parsed, KEY_RX_BYTES);
                     entry.rxPackets = getParsedLong(parsed, KEY_RX_PACKETS);
                     entry.txBytes = getParsedLong(parsed, KEY_TX_BYTES);
@@ -1556,4 +1561,11 @@
                     "Error communicating with native daemon to flush interface " + iface, e);
         }
     }
+
+    /** {@inheritDoc} */
+    public void monitor() {
+        if (mConnector != null) {
+            mConnector.monitor();
+        }
+    }
 }
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 77d0457..5dd3c5b 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -110,6 +110,7 @@
         NetworkPolicyManagerService networkPolicy = null;
         ConnectivityService connectivity = null;
         WifiP2pService wifiP2p = null;
+        WifiService wifi = null;
         IPackageManager pm = null;
         Context context = null;
         WindowManagerService wm = null;
@@ -309,6 +310,15 @@
                 Slog.e(TAG, "Failure starting Wi-Fi P2pService", e);
             }
 
+           try {
+                Slog.i(TAG, "Wi-Fi Service");
+                wifi = new WifiService(context);
+                ServiceManager.addService(Context.WIFI_SERVICE, wifi);
+                wifi.checkAndStartWifi();
+            } catch (Throwable e) {
+                Slog.e(TAG, "Failure starting Wi-Fi Service", e);
+            }
+
             try {
                 Slog.i(TAG, "Connectivity Service");
                 connectivity = new ConnectivityService(context, networkManagement, networkPolicy);
diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java
index cd649ce..24b6ac3 100644
--- a/services/java/com/android/server/ThrottleService.java
+++ b/services/java/com/android/server/ThrottleService.java
@@ -512,8 +512,8 @@
             long incWrite = 0;
             try {
                 final NetworkStats stats = mNMService.getNetworkStatsSummary();
-                final int index = stats.findIndex(
-                        mIface, NetworkStats.UID_ALL, NetworkStats.TAG_NONE);
+                final int index = stats.findIndex(mIface, NetworkStats.UID_ALL,
+                        NetworkStats.SET_DEFAULT, NetworkStats.TAG_NONE);
 
                 if (index != -1) {
                     final NetworkStats.Entry entry = stats.getValues(index, null);
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index d5a1b8f..e9c91e6 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -738,6 +738,12 @@
     boolean mOrigWaitForDebugger = false;
     boolean mAlwaysFinishActivities = false;
     IActivityController mController = null;
+    String mProfileApp = null;
+    ProcessRecord mProfileProc = null;
+    String mProfileFile;
+    ParcelFileDescriptor mProfileFd;
+    int mProfileType = 0;
+    boolean mAutoStopProfiler = false;
 
     final RemoteCallbackList<IActivityWatcher> mWatchers
             = new RemoteCallbackList<IActivityWatcher>();
@@ -2090,22 +2096,24 @@
     public final int startActivity(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo,
-            String resultWho, int requestCode, boolean onlyIfNeeded,
-            boolean debug) {
+            String resultWho, int requestCode, boolean onlyIfNeeded, boolean debug,
+            String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
         return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
-                requestCode, onlyIfNeeded, debug, null, null);
+                requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler,
+                null, null);
     }
 
     public final WaitResult startActivityAndWait(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo,
-            String resultWho, int requestCode, boolean onlyIfNeeded,
-            boolean debug) {
+            String resultWho, int requestCode, boolean onlyIfNeeded, boolean debug,
+            String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
         WaitResult res = new WaitResult();
         mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
-                requestCode, onlyIfNeeded, debug, res, null);
+                requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler,
+                res, null);
         return res;
     }
     
@@ -2116,7 +2124,7 @@
             boolean debug, Configuration config) {
         return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
-                requestCode, onlyIfNeeded, debug, null, config);
+                requestCode, onlyIfNeeded, debug, null, null, false, null, config);
     }
 
     public int startActivityIntentSender(IApplicationThread caller,
@@ -2255,7 +2263,8 @@
         }
 
         return mMainStack.startActivityMayWait(null, uid, intent, resolvedType,
-                null, 0, resultTo, resultWho, requestCode, onlyIfNeeded, false, null, null);
+                null, 0, resultTo, resultWho, requestCode, onlyIfNeeded, false,
+                null, null, false, null, null);
     }
 
     public final int startActivities(IApplicationThread caller,
@@ -2543,6 +2552,10 @@
             mLruProcesses.remove(app);
         }
 
+        if (mProfileProc == app) {
+            clearProfilerLocked();
+        }
+
         // Just in case...
         if (mMainStack.mPausingActivity != null && mMainStack.mPausingActivity.app == app) {
             if (DEBUG_PAUSE) Slog.v(TAG, "App died while pausing: " +mMainStack.mPausingActivity);
@@ -3549,7 +3562,16 @@
                     mWaitForDebugger = mOrigWaitForDebugger;
                 }
             }
-            
+            String profileFile = app.instrumentationProfileFile;
+            ParcelFileDescriptor profileFd = null;
+            boolean profileAutoStop = false;
+            if (mProfileApp != null && mProfileApp.equals(processName)) {
+                mProfileProc = app;
+                profileFile = mProfileFile;
+                profileFd = mProfileFd;
+                profileAutoStop = mAutoStopProfiler;
+            }
+
             // If the app is being launched for restore or full backup, set it up specially
             boolean isRestrictedBackupMode = false;
             if (mBackupTarget != null && mBackupAppName.equals(processName)) {
@@ -3569,8 +3591,11 @@
             ApplicationInfo appInfo = app.instrumentationInfo != null
                     ? app.instrumentationInfo : app.info;
             app.compat = compatibilityInfoForPackageLocked(appInfo);
+            if (profileFd != null) {
+                profileFd = profileFd.dup();
+            }
             thread.bindApplication(processName, appInfo, providers,
-                    app.instrumentationClass, app.instrumentationProfileFile,
+                    app.instrumentationClass, profileFile, profileFd, profileAutoStop,
                     app.instrumentationArguments, app.instrumentationWatcher, testMode, 
                     isRestrictedBackupMode || !normalMode,
                     mConfiguration, app.compat, getCommonServicesLocked(),
@@ -3697,9 +3722,22 @@
         }
     }
 
-    public final void activityIdle(IBinder token, Configuration config) {
+    public final void activityIdle(IBinder token, Configuration config, boolean stopProfiling) {
         final long origId = Binder.clearCallingIdentity();
-        mMainStack.activityIdleInternal(token, false, config);
+        ActivityRecord r = mMainStack.activityIdleInternal(token, false, config);
+        if (stopProfiling) {
+            synchronized (this) {
+                if (mProfileProc == r.app) {
+                    if (mProfileFd != null) {
+                        try {
+                            mProfileFd.close();
+                        } catch (IOException e) {
+                        }
+                        clearProfilerLocked();
+                    }
+                }
+            }
+        }
         Binder.restoreCallingIdentity(origId);
     }
 
@@ -6147,6 +6185,30 @@
         }
     }
 
+    void setProfileApp(ApplicationInfo app, String processName, String profileFile,
+            ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
+        synchronized (this) {
+            boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
+            if (!isDebuggable) {
+                if ((app.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
+                    throw new SecurityException("Process not debuggable: " + app.packageName);
+                }
+            }
+            mProfileApp = processName;
+            mProfileFile = profileFile;
+            if (mProfileFd != null) {
+                try {
+                    mProfileFd.close();
+                } catch (IOException e) {
+                }
+                mProfileFd = null;
+            }
+            mProfileFd = profileFd;
+            mProfileType = 0;
+            mAutoStopProfiler = autoStopProfiler;
+        }
+    }
+
     public void setAlwaysFinish(boolean enabled) {
         enforceCallingPermission(android.Manifest.permission.SET_ALWAYS_FINISH,
                 "setAlwaysFinish()");
@@ -7886,6 +7948,13 @@
                     + " mDebugTransient=" + mDebugTransient
                     + " mOrigWaitForDebugger=" + mOrigWaitForDebugger);
         }
+        if (mProfileApp != null || mProfileProc != null || mProfileFile != null
+                || mProfileFd != null) {
+            pw.println("  mProfileApp=" + mProfileApp + " mProfileProc=" + mProfileProc);
+            pw.println("  mProfileFile=" + mProfileFile + " mProfileFd=" + mProfileFd);
+            pw.println("  mProfileType=" + mProfileType + " mAutoStopProfiler="
+                    + mAutoStopProfiler);
+        }
         if (mAlwaysFinishActivities || mController != null) {
             pw.println("  mAlwaysFinishActivities=" + mAlwaysFinishActivities
                     + " mController=" + mController);
@@ -10663,8 +10732,10 @@
                 if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
                         + " at " + b + ": apps="
                         + (b != null ? b.apps.size() : 0));
+
+                boolean inStopping = mStoppingServices.contains(r);
                 if (b != null) {
-                    if (b.apps.size() > 0) {
+                    if (b.apps.size() > 0 && !inStopping) {
                         // Applications have already bound since the last
                         // unbind, so just rebind right here.
                         requestServiceBindingLocked(r, b, true);
@@ -10675,7 +10746,7 @@
                     }
                 }
 
-                serviceDoneExecutingLocked(r, mStoppingServices.contains(r));
+                serviceDoneExecutingLocked(r, inStopping);
 
                 Binder.restoreCallingIdentity(origId);
             }
@@ -13577,6 +13648,37 @@
         }
     }
 
+    private void stopProfilerLocked(ProcessRecord proc, String path, int profileType) {
+        if (proc == null || proc == mProfileProc) {
+            proc = mProfileProc;
+            path = mProfileFile;
+            profileType = mProfileType;
+            clearProfilerLocked();
+        }
+        if (proc == null) {
+            return;
+        }
+        try {
+            proc.thread.profilerControl(false, path, null, profileType);
+        } catch (RemoteException e) {
+            throw new IllegalStateException("Process disappeared");
+        }
+    }
+
+    private void clearProfilerLocked() {
+        if (mProfileFd != null) {
+            try {
+                mProfileFd.close();
+            } catch (IOException e) {
+            }
+        }
+        mProfileApp = null;
+        mProfileProc = null;
+        mProfileFile = null;
+        mProfileType = 0;
+        mAutoStopProfiler = false;
+    }
+
     public boolean profileControl(String process, boolean start,
             String path, ParcelFileDescriptor fd, int profileType) throws RemoteException {
 
@@ -13589,42 +13691,58 @@
                     throw new SecurityException("Requires permission "
                             + android.Manifest.permission.SET_ACTIVITY_WATCHER);
                 }
-                
+
                 if (start && fd == null) {
                     throw new IllegalArgumentException("null fd");
                 }
-                
+
                 ProcessRecord proc = null;
-                try {
-                    int pid = Integer.parseInt(process);
-                    synchronized (mPidsSelfLocked) {
-                        proc = mPidsSelfLocked.get(pid);
+                if (process != null) {
+                    try {
+                        int pid = Integer.parseInt(process);
+                        synchronized (mPidsSelfLocked) {
+                            proc = mPidsSelfLocked.get(pid);
+                        }
+                    } catch (NumberFormatException e) {
                     }
-                } catch (NumberFormatException e) {
-                }
-                
-                if (proc == null) {
-                    HashMap<String, SparseArray<ProcessRecord>> all
-                            = mProcessNames.getMap();
-                    SparseArray<ProcessRecord> procs = all.get(process);
-                    if (procs != null && procs.size() > 0) {
-                        proc = procs.valueAt(0);
+
+                    if (proc == null) {
+                        HashMap<String, SparseArray<ProcessRecord>> all
+                                = mProcessNames.getMap();
+                        SparseArray<ProcessRecord> procs = all.get(process);
+                        if (procs != null && procs.size() > 0) {
+                            proc = procs.valueAt(0);
+                        }
                     }
                 }
-                
-                if (proc == null || proc.thread == null) {
+
+                if (start && (proc == null || proc.thread == null)) {
                     throw new IllegalArgumentException("Unknown process: " + process);
                 }
-                
-                boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
-                if (!isDebuggable) {
-                    if ((proc.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
-                        throw new SecurityException("Process not debuggable: " + proc);
+
+                if (start) {
+                    stopProfilerLocked(null, null, 0);
+                    setProfileApp(proc.info, proc.processName, path, fd, false);
+                    mProfileProc = proc;
+                    mProfileType = profileType;
+                    try {
+                        fd = fd.dup();
+                    } catch (IOException e) {
+                        fd = null;
+                    }
+                    proc.thread.profilerControl(start, path, fd, profileType);
+                    fd = null;
+                    mProfileFd = null;
+                } else {
+                    stopProfilerLocked(proc, path, profileType);
+                    if (fd != null) {
+                        try {
+                            fd.close();
+                        } catch (IOException e) {
+                        }
                     }
                 }
-            
-                proc.thread.profilerControl(start, path, fd, profileType);
-                fd = null;
+
                 return true;
             }
         } catch (RemoteException e) {
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index ee0937d..6f0779f 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -56,6 +56,7 @@
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Message;
+import android.os.ParcelFileDescriptor;
 import android.os.PowerManager;
 import android.os.RemoteException;
 import android.os.SystemClock;
@@ -64,6 +65,7 @@
 import android.util.Slog;
 import android.view.WindowManagerPolicy;
 
+import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -561,12 +563,31 @@
             r.forceNewConfig = false;
             showAskCompatModeDialogLocked(r);
             r.compat = mService.compatibilityInfoForPackageLocked(r.info.applicationInfo);
+            String profileFile = null;
+            ParcelFileDescriptor profileFd = null;
+            boolean profileAutoStop = false;
+            if (mService.mProfileApp != null && mService.mProfileApp.equals(app.processName)) {
+                if (mService.mProfileProc == null || mService.mProfileProc == app) {
+                    mService.mProfileProc = app;
+                    profileFile = mService.mProfileFile;
+                    profileFd = mService.mProfileFd;
+                    profileAutoStop = mService.mAutoStopProfiler;
+                }
+            }
             app.hasShownUi = true;
             app.pendingUiClean = true;
+            if (profileFd != null) {
+                try {
+                    profileFd = profileFd.dup();
+                } catch (IOException e) {
+                    profileFd = null;
+                }
+            }
             app.thread.scheduleLaunchActivity(new Intent(r.intent), r,
                     System.identityHashCode(r),
                     r.info, r.compat, r.icicle, results, newIntents, !andResume,
-                    mService.isNextTransitionForward());
+                    mService.isNextTransitionForward(), profileFile, profileFd,
+                    profileAutoStop);
             
             if ((app.info.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
                 // This may be a heavy-weight process!  Note that the package
@@ -2669,7 +2690,8 @@
         return START_SUCCESS;
     }
 
-    ActivityInfo resolveActivity(Intent intent, String resolvedType, boolean debug) {
+    ActivityInfo resolveActivity(Intent intent, String resolvedType, boolean debug,
+            String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
         // Collect information about the target of the Intent.
         ActivityInfo aInfo;
         try {
@@ -2697,6 +2719,13 @@
                     mService.setDebugApp(aInfo.processName, true, false);
                 }
             }
+
+            if (profileFile != null) {
+                if (!aInfo.processName.equals("system")) {
+                    mService.setProfileApp(aInfo.applicationInfo, aInfo.processName,
+                            profileFile, profileFd, autoStopProfiler);
+                }
+            }
         }
         return aInfo;
     }
@@ -2705,7 +2734,8 @@
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo,
             String resultWho, int requestCode, boolean onlyIfNeeded,
-            boolean debug, WaitResult outResult, Configuration config) {
+            boolean debug, String profileFile, ParcelFileDescriptor profileFd,
+            boolean autoStopProfiler, WaitResult outResult, Configuration config) {
         // Refuse possible leaked file descriptors
         if (intent != null && intent.hasFileDescriptors()) {
             throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -2717,7 +2747,8 @@
         intent = new Intent(intent);
 
         // Collect information about the target of the Intent.
-        ActivityInfo aInfo = resolveActivity(intent, resolvedType, debug);
+        ActivityInfo aInfo = resolveActivity(intent, resolvedType, debug,
+                profileFile, profileFd, autoStopProfiler);
 
         synchronized (mService) {
             int callingPid;
@@ -2903,7 +2934,8 @@
                     intent = new Intent(intent);
 
                     // Collect information about the target of the Intent.
-                    ActivityInfo aInfo = resolveActivity(intent, resolvedTypes[i], false);
+                    ActivityInfo aInfo = resolveActivity(intent, resolvedTypes[i], false,
+                            null, null, false);
 
                     if (mMainStack && aInfo != null && (aInfo.applicationInfo.flags
                             & ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
@@ -3069,10 +3101,12 @@
         return stops;
     }
 
-    final void activityIdleInternal(IBinder token, boolean fromTimeout,
+    final ActivityRecord activityIdleInternal(IBinder token, boolean fromTimeout,
             Configuration config) {
         if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
 
+        ActivityRecord res = null;
+
         ArrayList<ActivityRecord> stops = null;
         ArrayList<ActivityRecord> finishes = null;
         ArrayList<ActivityRecord> thumbnails = null;
@@ -3092,6 +3126,7 @@
             int index = indexOfTokenLocked(token);
             if (index >= 0) {
                 ActivityRecord r = mHistory.get(index);
+                res = r;
 
                 if (fromTimeout) {
                     reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
@@ -3207,6 +3242,8 @@
         if (enableScreen) {
             mService.enableScreenAfterBoot();
         }
+
+        return res;
     }
 
     /**
diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java
index 293702d..226723f 100644
--- a/services/java/com/android/server/am/BatteryStatsService.java
+++ b/services/java/com/android/server/am/BatteryStatsService.java
@@ -478,6 +478,8 @@
                 } else if ("-h".equals(arg)) {
                     dumpHelp(pw);
                     return;
+                } else if ("-a".equals(arg)) {
+                    // fall through
                 } else {
                     pw.println("Unknown option: " + arg);
                     dumpHelp(pw);
diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java
index d9da92c..6b65e07 100644
--- a/services/java/com/android/server/connectivity/Vpn.java
+++ b/services/java/com/android/server/connectivity/Vpn.java
@@ -265,7 +265,6 @@
     // INetworkManagementEventObserver.Stub
     @Override
     public void interfaceLinkStateChanged(String interfaze, boolean up) {
-        interfaceStatusChanged(interfaze, up);
     }
 
     // INetworkManagementEventObserver.Stub
@@ -280,6 +279,9 @@
             if (mConnection != null) {
                 mContext.unbindService(mConnection);
                 mConnection = null;
+            } else if (mLegacyVpnRunner != null) {
+                mLegacyVpnRunner.exit();
+                mLegacyVpnRunner = null;
             }
         }
     }
diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java
index a075255..9c3d166 100644
--- a/services/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -1313,6 +1313,13 @@
 
         // dispatch changed rule to existing listeners
         mHandler.obtainMessage(MSG_RULES_CHANGED, uid, uidRules).sendToTarget();
+
+        try {
+            // adjust stats accounting based on foreground status
+            mNetworkStats.setUidForeground(uid, uidForeground);
+        } catch (RemoteException e) {
+            Slog.w(TAG, "problem dispatching foreground change");
+        }
     }
 
     private Handler.Callback mHandlerCallback = new Handler.Callback() {
diff --git a/services/java/com/android/server/net/NetworkStatsService.java b/services/java/com/android/server/net/NetworkStatsService.java
index deca7a9..c911687 100644
--- a/services/java/com/android/server/net/NetworkStatsService.java
+++ b/services/java/com/android/server/net/NetworkStatsService.java
@@ -26,6 +26,9 @@
 import static android.content.Intent.EXTRA_UID;
 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
 import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.SET_ALL;
+import static android.net.NetworkStats.SET_DEFAULT;
+import static android.net.NetworkStats.SET_FOREGROUND;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.TrafficStats.UID_REMOVED;
@@ -40,6 +43,8 @@
 import static android.text.format.DateUtils.HOUR_IN_MILLIS;
 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
 import static com.android.internal.util.Preconditions.checkNotNull;
+import static com.android.server.NetworkManagementSocketTagger.resetKernelUidStats;
+import static com.android.server.NetworkManagementSocketTagger.setKernelCounterSet;
 
 import android.app.AlarmManager;
 import android.app.IAlarmManager;
@@ -63,17 +68,20 @@
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.INetworkManagementService;
+import android.os.Message;
 import android.os.PowerManager;
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.provider.Settings;
 import android.telephony.TelephonyManager;
-import android.util.LongSparseArray;
 import android.util.NtpTrustedTime;
 import android.util.Slog;
+import android.util.SparseIntArray;
 import android.util.TrustedTime;
 
 import com.android.internal.os.AtomicFile;
+import com.android.internal.util.Objects;
+import com.google.android.collect.Lists;
 import com.google.android.collect.Maps;
 import com.google.android.collect.Sets;
 
@@ -88,6 +96,8 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.ProtocolException;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -109,6 +119,9 @@
     private static final int VERSION_UID_INIT = 1;
     private static final int VERSION_UID_WITH_IDENT = 2;
     private static final int VERSION_UID_WITH_TAG = 3;
+    private static final int VERSION_UID_WITH_SET = 4;
+
+    private static final int MSG_FORCE_UPDATE = 0x1;
 
     private final Context mContext;
     private final INetworkManagementService mNetworkManager;
@@ -156,8 +169,7 @@
     /** Set of historical network layer stats for known networks. */
     private HashMap<NetworkIdentitySet, NetworkStatsHistory> mNetworkStats = Maps.newHashMap();
     /** Set of historical network layer stats for known UIDs. */
-    private HashMap<NetworkIdentitySet, LongSparseArray<NetworkStatsHistory>> mUidStats =
-            Maps.newHashMap();
+    private HashMap<UidStatsKey, NetworkStatsHistory> mUidStats = Maps.newHashMap();
 
     /** Flag if {@link #mUidStats} have been loaded from disk. */
     private boolean mUidStatsLoaded = false;
@@ -167,6 +179,9 @@
 
     private NetworkStats mLastUidSnapshot;
 
+    /** Current counter sets for each UID. */
+    private SparseIntArray mActiveUidCounterSet = new SparseIntArray();
+
     /** Data layer operation counters for splicing into other structures. */
     private NetworkStats mOperations = new NetworkStats(0L, 10);
     private NetworkStats mLastOperationsSnapshot;
@@ -177,11 +192,6 @@
     private final AtomicFile mNetworkFile;
     private final AtomicFile mUidFile;
 
-    // TODO: collect detailed uid stats, storing tag-granularity data until next
-    // dropbox, and uid summary for a specific bucket count.
-
-    // TODO: periodically compile statistics and send to dropbox.
-
     public NetworkStatsService(
             Context context, INetworkManagementService networkManager, IAlarmManager alarmManager) {
         this(context, networkManager, alarmManager, NtpTrustedTime.getInstance(context),
@@ -207,7 +217,7 @@
 
         mHandlerThread = new HandlerThread(TAG);
         mHandlerThread.start();
-        mHandler = new Handler(mHandlerThread.getLooper());
+        mHandler = new Handler(mHandlerThread.getLooper(), mHandlerCallback);
 
         mNetworkFile = new AtomicFile(new File(systemDir, "netstats.bin"));
         mUidFile = new AtomicFile(new File(systemDir, "netstats_uid.bin"));
@@ -246,6 +256,9 @@
         } catch (RemoteException e) {
             Slog.w(TAG, "unable to register poll alarm");
         }
+
+        // kick off background poll to bootstrap deltas
+        mHandler.obtainMessage(MSG_FORCE_UPDATE).sendToTarget();
     }
 
     private void shutdownLocked() {
@@ -302,24 +315,24 @@
 
     @Override
     public NetworkStatsHistory getHistoryForUid(
-            NetworkTemplate template, int uid, int tag, int fields) {
+            NetworkTemplate template, int uid, int set, int tag, int fields) {
         mContext.enforceCallingOrSelfPermission(READ_NETWORK_USAGE_HISTORY, TAG);
 
         synchronized (mStatsLock) {
             ensureUidStatsLoadedLocked();
-            final long packed = packUidAndTag(uid, tag);
 
             // combine all interfaces that match template
             final NetworkStatsHistory combined = new NetworkStatsHistory(
                     mSettings.getUidBucketDuration(), estimateUidBuckets(), fields);
-            for (NetworkIdentitySet ident : mUidStats.keySet()) {
-                if (templateMatches(template, ident)) {
-                    final NetworkStatsHistory history = mUidStats.get(ident).get(packed);
-                    if (history != null) {
-                        combined.recordEntireHistory(history);
-                    }
+            for (UidStatsKey key : mUidStats.keySet()) {
+                final boolean setMatches = set == SET_ALL || key.set == set;
+                if (templateMatches(template, key.ident) && key.uid == uid && setMatches
+                        && key.tag == tag) {
+                    final NetworkStatsHistory history = mUidStats.get(key);
+                    combined.recordEntireHistory(history);
                 }
             }
+
             return combined;
         }
     }
@@ -371,33 +384,27 @@
             final NetworkStats.Entry entry = new NetworkStats.Entry();
             NetworkStatsHistory.Entry historyEntry = null;
 
-            for (NetworkIdentitySet ident : mUidStats.keySet()) {
-                if (templateMatches(template, ident)) {
-                    final LongSparseArray<NetworkStatsHistory> uidStats = mUidStats.get(ident);
-                    for (int i = 0; i < uidStats.size(); i++) {
-                        final long packed = uidStats.keyAt(i);
-                        final int uid = unpackUid(packed);
-                        final int tag = unpackTag(packed);
+            for (UidStatsKey key : mUidStats.keySet()) {
+                if (templateMatches(template, key.ident)) {
+                    // always include summary under TAG_NONE, and include
+                    // other tags when requested.
+                    if (key.tag == TAG_NONE || includeTags) {
+                        final NetworkStatsHistory history = mUidStats.get(key);
+                        historyEntry = history.getValues(start, end, now, historyEntry);
 
-                        // always include summary under TAG_NONE, and include
-                        // other tags when requested.
-                        if (tag == TAG_NONE || includeTags) {
-                            final NetworkStatsHistory history = uidStats.valueAt(i);
-                            historyEntry = history.getValues(start, end, now, historyEntry);
+                        entry.iface = IFACE_ALL;
+                        entry.uid = key.uid;
+                        entry.set = key.set;
+                        entry.tag = key.tag;
+                        entry.rxBytes = historyEntry.rxBytes;
+                        entry.rxPackets = historyEntry.rxPackets;
+                        entry.txBytes = historyEntry.txBytes;
+                        entry.txPackets = historyEntry.txPackets;
+                        entry.operations = historyEntry.operations;
 
-                            entry.iface = IFACE_ALL;
-                            entry.uid = uid;
-                            entry.tag = tag;
-                            entry.rxBytes = historyEntry.rxBytes;
-                            entry.rxPackets = historyEntry.rxPackets;
-                            entry.txBytes = historyEntry.txBytes;
-                            entry.txPackets = historyEntry.txPackets;
-                            entry.operations = historyEntry.operations;
-
-                            if (entry.rxBytes > 0 || entry.rxPackets > 0 || entry.txBytes > 0
-                                    || entry.txPackets > 0 || entry.operations > 0) {
-                                stats.combineValues(entry);
-                            }
+                        if (entry.rxBytes > 0 || entry.rxPackets > 0 || entry.txBytes > 0
+                                || entry.txPackets > 0 || entry.operations > 0) {
+                            stats.combineValues(entry);
                         }
                     }
                 }
@@ -437,8 +444,31 @@
             mContext.enforceCallingOrSelfPermission(MODIFY_NETWORK_ACCOUNTING, TAG);
         }
 
+        if (operationCount < 0) {
+            throw new IllegalArgumentException("operation count can only be incremented");
+        }
+        if (tag == TAG_NONE) {
+            throw new IllegalArgumentException("operation count must have specific tag");
+        }
+
         synchronized (mStatsLock) {
-            mOperations.combineValues(IFACE_ALL, uid, tag, 0L, 0L, 0L, 0L, operationCount);
+            final int set = mActiveUidCounterSet.get(uid, SET_DEFAULT);
+            mOperations.combineValues(IFACE_ALL, uid, set, tag, 0L, 0L, 0L, 0L, operationCount);
+            mOperations.combineValues(IFACE_ALL, uid, set, TAG_NONE, 0L, 0L, 0L, 0L, operationCount);
+        }
+    }
+
+    @Override
+    public void setUidForeground(int uid, boolean uidForeground) {
+        mContext.enforceCallingOrSelfPermission(MODIFY_NETWORK_ACCOUNTING, TAG);
+
+        synchronized (mStatsLock) {
+            final int set = uidForeground ? SET_FOREGROUND : SET_DEFAULT;
+            final int oldSet = mActiveUidCounterSet.get(uid, SET_DEFAULT);
+            if (oldSet != set) {
+                mActiveUidCounterSet.put(uid, set);
+                setKernelCounterSet(uid, set);
+            }
         }
     }
 
@@ -601,7 +631,7 @@
 
         NetworkStats.Entry entry = null;
         for (String iface : persistDelta.getUniqueIfaces()) {
-            final int index = persistDelta.findIndex(iface, UID_ALL, TAG_NONE);
+            final int index = persistDelta.findIndex(iface, UID_ALL, SET_DEFAULT, TAG_NONE);
             entry = persistDelta.getValues(index, entry);
             if (forcePersist || entry.rxBytes > persistThreshold
                     || entry.txBytes > persistThreshold) {
@@ -676,31 +706,28 @@
             }
 
             // splice in operation counts since last poll
-            final int j = operationsDelta.findIndex(IFACE_ALL, entry.uid, entry.tag);
+            final int j = operationsDelta.findIndex(IFACE_ALL, entry.uid, entry.set, entry.tag);
             if (j != -1) {
                 operationsEntry = operationsDelta.getValues(j, operationsEntry);
                 entry.operations = operationsEntry.operations;
             }
 
             final NetworkStatsHistory history = findOrCreateUidStatsLocked(
-                    ident, entry.uid, entry.tag);
+                    ident, entry.uid, entry.set, entry.tag);
             history.recordData(timeStart, currentTime, entry);
         }
 
         // trim any history beyond max
         final long maxUidHistory = mSettings.getUidMaxHistory();
         final long maxTagHistory = mSettings.getTagMaxHistory();
-        for (LongSparseArray<NetworkStatsHistory> uidStats : mUidStats.values()) {
-            for (int i = 0; i < uidStats.size(); i++) {
-                final long packed = uidStats.keyAt(i);
-                final NetworkStatsHistory history = uidStats.valueAt(i);
+        for (UidStatsKey key : mUidStats.keySet()) {
+            final NetworkStatsHistory history = mUidStats.get(key);
 
-                // detailed tags are trimmed sooner than summary in TAG_NONE
-                if (unpackTag(packed) == TAG_NONE) {
-                    history.removeBucketsBefore(currentTime - maxUidHistory);
-                } else {
-                    history.removeBucketsBefore(currentTime - maxTagHistory);
-                }
+            // detailed tags are trimmed sooner than summary in TAG_NONE
+            if (key.tag == TAG_NONE) {
+                history.removeBucketsBefore(currentTime - maxUidHistory);
+            } else {
+                history.removeBucketsBefore(currentTime - maxTagHistory);
             }
         }
 
@@ -715,26 +742,25 @@
     private void removeUidLocked(int uid) {
         ensureUidStatsLoadedLocked();
 
+        final ArrayList<UidStatsKey> knownKeys = Lists.newArrayList();
+        knownKeys.addAll(mUidStats.keySet());
+
         // migrate all UID stats into special "removed" bucket
-        for (NetworkIdentitySet ident : mUidStats.keySet()) {
-            final LongSparseArray<NetworkStatsHistory> uidStats = mUidStats.get(ident);
-            for (int i = 0; i < uidStats.size(); i++) {
-                final long packed = uidStats.keyAt(i);
-                if (unpackUid(packed) == uid) {
-                    // only migrate combined TAG_NONE history
-                    if (unpackTag(packed) == TAG_NONE) {
-                        final NetworkStatsHistory uidHistory = uidStats.valueAt(i);
-                        final NetworkStatsHistory removedHistory = findOrCreateUidStatsLocked(
-                                ident, UID_REMOVED, TAG_NONE);
-                        removedHistory.recordEntireHistory(uidHistory);
-                    }
-                    uidStats.remove(packed);
+        for (UidStatsKey key : knownKeys) {
+            if (key.uid == uid) {
+                // only migrate combined TAG_NONE history
+                if (key.tag == TAG_NONE) {
+                    final NetworkStatsHistory uidHistory = mUidStats.get(key);
+                    final NetworkStatsHistory removedHistory = findOrCreateUidStatsLocked(
+                            key.ident, UID_REMOVED, SET_DEFAULT, TAG_NONE);
+                    removedHistory.recordEntireHistory(uidHistory);
                 }
+                mUidStats.remove(key);
             }
         }
 
-        // TODO: push kernel event to wipe stats for UID, otherwise we risk
-        // picking them up again during next poll.
+        // clear kernel stats associated with UID
+        resetKernelUidStats(uid);
 
         // since this was radical rewrite, push to disk
         writeUidStatsLocked();
@@ -763,17 +789,11 @@
     }
 
     private NetworkStatsHistory findOrCreateUidStatsLocked(
-            NetworkIdentitySet ident, int uid, int tag) {
+            NetworkIdentitySet ident, int uid, int set, int tag) {
         ensureUidStatsLoadedLocked();
 
-        LongSparseArray<NetworkStatsHistory> uidStats = mUidStats.get(ident);
-        if (uidStats == null) {
-            uidStats = new LongSparseArray<NetworkStatsHistory>();
-            mUidStats.put(ident, uidStats);
-        }
-
-        final long packed = packUidAndTag(uid, tag);
-        final NetworkStatsHistory existing = uidStats.get(packed);
+        final UidStatsKey key = new UidStatsKey(ident, uid, set, tag);
+        final NetworkStatsHistory existing = mUidStats.get(key);
 
         // update when no existing, or when bucket duration changed
         final long bucketDuration = mSettings.getUidBucketDuration();
@@ -787,7 +807,7 @@
         }
 
         if (updated != null) {
-            uidStats.put(packed, updated);
+            mUidStats.put(key, updated);
             return updated;
         } else {
             return existing;
@@ -874,25 +894,24 @@
                     // for a short time.
                     break;
                 }
-                case VERSION_UID_WITH_TAG: {
-                    // uid := size *(NetworkIdentitySet size *(UID tag NetworkStatsHistory))
-                    final int ifaceSize = in.readInt();
-                    for (int i = 0; i < ifaceSize; i++) {
+                case VERSION_UID_WITH_TAG:
+                case VERSION_UID_WITH_SET: {
+                    // uid := size *(NetworkIdentitySet size *(uid set tag NetworkStatsHistory))
+                    final int identSize = in.readInt();
+                    for (int i = 0; i < identSize; i++) {
                         final NetworkIdentitySet ident = new NetworkIdentitySet(in);
 
-                        final int childSize = in.readInt();
-                        final LongSparseArray<NetworkStatsHistory> uidStats = new LongSparseArray<
-                                NetworkStatsHistory>(childSize);
-                        for (int j = 0; j < childSize; j++) {
+                        final int size = in.readInt();
+                        for (int j = 0; j < size; j++) {
                             final int uid = in.readInt();
+                            final int set = (version >= VERSION_UID_WITH_SET) ? in.readInt()
+                                    : SET_DEFAULT;
                             final int tag = in.readInt();
-                            final long packed = packUidAndTag(uid, tag);
 
+                            final UidStatsKey key = new UidStatsKey(ident, uid, set, tag);
                             final NetworkStatsHistory history = new NetworkStatsHistory(in);
-                            uidStats.put(packed, history);
+                            mUidStats.put(key, history);
                         }
-
-                        mUidStats.put(ident, uidStats);
                     }
                     break;
                 }
@@ -949,29 +968,36 @@
 
         // TODO: consider duplicating stats and releasing lock while writing
 
+        // build UidStatsKey lists grouped by ident
+        final HashMap<NetworkIdentitySet, ArrayList<UidStatsKey>> keysByIdent = Maps.newHashMap();
+        for (UidStatsKey key : mUidStats.keySet()) {
+            ArrayList<UidStatsKey> keys = keysByIdent.get(key.ident);
+            if (keys == null) {
+                keys = Lists.newArrayList();
+                keysByIdent.put(key.ident, keys);
+            }
+            keys.add(key);
+        }
+
         FileOutputStream fos = null;
         try {
             fos = mUidFile.startWrite();
             final DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fos));
 
             out.writeInt(FILE_MAGIC);
-            out.writeInt(VERSION_UID_WITH_TAG);
+            out.writeInt(VERSION_UID_WITH_SET);
 
-            final int size = mUidStats.size();
-            out.writeInt(size);
-            for (NetworkIdentitySet ident : mUidStats.keySet()) {
-                final LongSparseArray<NetworkStatsHistory> uidStats = mUidStats.get(ident);
+            out.writeInt(keysByIdent.size());
+            for (NetworkIdentitySet ident : keysByIdent.keySet()) {
+                final ArrayList<UidStatsKey> keys = keysByIdent.get(ident);
                 ident.writeToStream(out);
 
-                final int childSize = uidStats.size();
-                out.writeInt(childSize);
-                for (int i = 0; i < childSize; i++) {
-                    final long packed = uidStats.keyAt(i);
-                    final int uid = unpackUid(packed);
-                    final int tag = unpackTag(packed);
-                    final NetworkStatsHistory history = uidStats.valueAt(i);
-                    out.writeInt(uid);
-                    out.writeInt(tag);
+                out.writeInt(keys.size());
+                for (UidStatsKey key : keys) {
+                    final NetworkStatsHistory history = mUidStats.get(key);
+                    out.writeInt(key.uid);
+                    out.writeInt(key.set);
+                    out.writeInt(key.tag);
                     history.writeToStream(out);
                 }
             }
@@ -1030,20 +1056,19 @@
                 // from disk if not already in memory.
                 ensureUidStatsLoadedLocked();
 
-                pw.println("Detailed UID stats:");
-                for (NetworkIdentitySet ident : mUidStats.keySet()) {
-                    pw.print("  ident="); pw.println(ident.toString());
+                final ArrayList<UidStatsKey> keys = Lists.newArrayList();
+                keys.addAll(mUidStats.keySet());
+                Collections.sort(keys);
 
-                    final LongSparseArray<NetworkStatsHistory> uidStats = mUidStats.get(ident);
-                    for (int i = 0; i < uidStats.size(); i++) {
-                        final long packed = uidStats.keyAt(i);
-                        final int uid = unpackUid(packed);
-                        final int tag = unpackTag(packed);
-                        final NetworkStatsHistory history = uidStats.valueAt(i);
-                        pw.print("    UID="); pw.print(uid);
-                        pw.print(" tag=0x"); pw.println(Integer.toHexString(tag));
-                        history.dump("    ", pw, fullHistory);
-                    }
+                pw.println("Detailed UID stats:");
+                for (UidStatsKey key : keys) {
+                    pw.print("  ident="); pw.print(key.ident.toString());
+                    pw.print(" uid="); pw.print(key.uid);
+                    pw.print(" set="); pw.print(NetworkStats.setToString(key.set));
+                    pw.print(" tag="); pw.println(NetworkStats.tagToString(key.tag));
+
+                    final NetworkStatsHistory history = mUidStats.get(key);
+                    history.dump("    ", pw, fullHistory);
                 }
             }
         }
@@ -1080,8 +1105,12 @@
 
             for (ApplicationInfo info : installedApps) {
                 final int uid = info.uid;
-                findOrCreateUidStatsLocked(ident, uid, TAG_NONE).generateRandom(UID_START, UID_END,
-                        UID_RX_BYTES, UID_RX_PACKETS, UID_TX_BYTES, UID_TX_PACKETS, UID_OPERATIONS);
+                findOrCreateUidStatsLocked(ident, uid, SET_DEFAULT, TAG_NONE).generateRandom(
+                        UID_START, UID_END, UID_RX_BYTES, UID_RX_PACKETS, UID_TX_BYTES,
+                        UID_TX_PACKETS, UID_OPERATIONS);
+                findOrCreateUidStatsLocked(ident, uid, SET_FOREGROUND, TAG_NONE).generateRandom(
+                        UID_START, UID_END, UID_RX_BYTES, UID_RX_PACKETS, UID_TX_BYTES,
+                        UID_TX_PACKETS, UID_OPERATIONS);
             }
         }
     }
@@ -1116,23 +1145,6 @@
         return (int) (existing.size() * existing.getBucketDuration() / newBucketDuration);
     }
 
-    // @VisibleForTesting
-    public static long packUidAndTag(int uid, int tag) {
-        final long uidLong = uid;
-        final long tagLong = tag;
-        return (uidLong << 32) | (tagLong & 0xFFFFFFFFL);
-    }
-
-    // @VisibleForTesting
-    public static int unpackUid(long packed) {
-        return (int) (packed >> 32);
-    }
-
-    // @VisibleForTesting
-    public static int unpackTag(long packed) {
-        return (int) (packed & 0xFFFFFFFFL);
-    }
-
     /**
      * Test if given {@link NetworkTemplate} matches any {@link NetworkIdentity}
      * in the given {@link NetworkIdentitySet}.
@@ -1146,6 +1158,58 @@
         return false;
     }
 
+    private Handler.Callback mHandlerCallback = new Handler.Callback() {
+        /** {@inheritDoc} */
+        public boolean handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_FORCE_UPDATE: {
+                    forceUpdate();
+                    return true;
+                }
+                default: {
+                    return false;
+                }
+            }
+        }
+    };
+
+    /**
+     * Key uniquely identifying a {@link NetworkStatsHistory} for a UID.
+     */
+    private static class UidStatsKey implements Comparable<UidStatsKey> {
+        public final NetworkIdentitySet ident;
+        public final int uid;
+        public final int set;
+        public final int tag;
+
+        public UidStatsKey(NetworkIdentitySet ident, int uid, int set, int tag) {
+            this.ident = ident;
+            this.uid = uid;
+            this.set = set;
+            this.tag = tag;
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hashCode(ident, uid, set, tag);
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (obj instanceof UidStatsKey) {
+                final UidStatsKey key = (UidStatsKey) obj;
+                return Objects.equal(ident, key.ident) && uid == key.uid && set == key.set
+                        && tag == key.tag;
+            }
+            return false;
+        }
+
+        /** {@inheritDoc} */
+        public int compareTo(UidStatsKey another) {
+            return Integer.compare(uid, another.uid);
+        }
+    }
+
     /**
      * Default external settings that read from {@link Settings.Secure}.
      */
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 177cf41..abb62de 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -38,6 +38,7 @@
 import android.app.IActivityManager;
 import android.app.admin.IDevicePolicyManager;
 import android.app.backup.IBackupManager;
+import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.IIntentReceiver;
@@ -69,6 +70,7 @@
 import android.content.pm.ServiceInfo;
 import android.content.pm.Signature;
 import android.content.pm.UserInfo;
+import android.content.pm.ManifestDigest;
 import android.net.Uri;
 import android.os.Binder;
 import android.os.Build;
@@ -188,6 +190,17 @@
 
     static final int REMOVE_CHATTY = 1<<16;
 
+    /**
+     * Whether verification is enabled by default.
+     */
+    private static final boolean DEFAULT_VERIFY_ENABLE = true;
+
+    /**
+     * The default maximum time to wait for the verification agent to return in
+     * milliseconds.
+     */
+    private static final long DEFAULT_VERIFICATION_TIMEOUT = 60 * 1000;
+
     static final String DEFAULT_CONTAINER_PACKAGE = "com.android.defcontainer";
 
     static final ComponentName DEFAULT_CONTAINER_COMPONENT = new ComponentName(
@@ -333,6 +346,12 @@
     // Broadcast actions that are only available to the system.
     final HashSet<String> mProtectedBroadcasts = new HashSet<String>();
 
+    /** List of packages waiting for verification. */
+    final SparseArray<InstallArgs> mPendingVerification = new SparseArray<InstallArgs>();
+
+    /** Token for keys in mPendingVerification. */
+    private int mPendingVerificationToken = 0;
+
     boolean mSystemReady;
     boolean mSafeMode;
     boolean mHasSystemUidErrors;
@@ -364,6 +383,8 @@
     static final int UPDATED_MEDIA_STATUS = 12;
     static final int WRITE_SETTINGS = 13;
     static final int WRITE_STOPPED_PACKAGES = 14;
+    static final int PACKAGE_VERIFIED = 15;
+    static final int CHECK_PENDING_VERIFICATION = 16;
 
     static final int WRITE_SETTINGS_DELAY = 10*1000;  // 10 seconds
 
@@ -444,10 +465,10 @@
         void doHandleMessage(Message msg) {
             switch (msg.what) {
                 case INIT_COPY: {
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "init_copy");
+                    if (DEBUG_INSTALL) Slog.i(TAG, "init_copy");
                     HandlerParams params = (HandlerParams) msg.obj;
                     int idx = mPendingInstalls.size();
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "idx=" + idx);
+                    if (DEBUG_INSTALL) Slog.i(TAG, "idx=" + idx);
                     // If a bind was already initiated we dont really
                     // need to do anything. The pending install
                     // will be processed later on.
@@ -474,7 +495,7 @@
                     break;
                 }
                 case MCS_BOUND: {
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "mcs_bound");
+                    if (DEBUG_INSTALL) Slog.i(TAG, "mcs_bound");
                     if (msg.obj != null) {
                         mContainerService = (IMediaContainerService) msg.obj;
                     }
@@ -525,8 +546,8 @@
                     }
                     break;
                 }
-                case MCS_RECONNECT : {
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "mcs_reconnect");
+                case MCS_RECONNECT: {
+                    if (DEBUG_INSTALL) Slog.i(TAG, "mcs_reconnect");
                     if (mPendingInstalls.size() > 0) {
                         if (mBound) {
                             disconnectService();
@@ -543,27 +564,31 @@
                     }
                     break;
                 }
-                case MCS_UNBIND : {
+                case MCS_UNBIND: {
                     // If there is no actual work left, then time to unbind.
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "mcs_unbind");
-                    if (mPendingInstalls.size() == 0) {
+                    if (DEBUG_INSTALL) Slog.i(TAG, "mcs_unbind");
+
+                    if (mPendingInstalls.size() == 0 && mPendingVerification.size() == 0) {
                         if (mBound) {
+                            if (DEBUG_INSTALL) Slog.i(TAG, "calling disconnectService()");
+
                             disconnectService();
                         }
-                    } else {
+                    } else if (mPendingInstalls.size() > 0) {
                         // There are more pending requests in queue.
                         // Just post MCS_BOUND message to trigger processing
                         // of next pending install.
                         mHandler.sendEmptyMessage(MCS_BOUND);
                     }
+
                     break;
                 }
                 case MCS_GIVE_UP: {
-                    if (DEBUG_SD_INSTALL) Log.i(TAG, "mcs_giveup too many retries");
+                    if (DEBUG_INSTALL) Slog.i(TAG, "mcs_giveup too many retries");
                     mPendingInstalls.remove(0);
                     break;
                 }
-                case SEND_PENDING_BROADCAST : {
+                case SEND_PENDING_BROADCAST: {
                     String packages[];
                     ArrayList<String> components[];
                     int size = 0;
@@ -707,6 +732,52 @@
                     }
                     Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
                 } break;
+                case CHECK_PENDING_VERIFICATION: {
+                    final int verificationId = msg.arg1;
+                    final InstallArgs args = mPendingVerification.get(verificationId);
+
+                    if (args != null) {
+                        Slog.i(TAG, "Validation timed out for " + args.packageURI.toString());
+                        mPendingVerification.remove(verificationId);
+
+                        int ret = PackageManager.INSTALL_FAILED_VERIFICATION_TIMEOUT;
+                        processPendingInstall(args, ret);
+
+                        mHandler.sendEmptyMessage(MCS_UNBIND);
+                    }
+
+                    break;
+                }
+                case PACKAGE_VERIFIED: {
+                    final int verificationId = msg.arg1;
+                    final boolean verified = msg.arg2 == 1 ? true : false;
+
+                    final InstallArgs args = mPendingVerification.get(verificationId);
+                    if (args == null) {
+                        Slog.w(TAG, "Invalid validation token " + verificationId + " received");
+                        break;
+                    }
+
+                    mPendingVerification.remove(verificationId);
+
+                    int ret;
+                    if (verified) {
+                        ret = PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
+                        try {
+                            ret = args.copyApk(mContainerService, true);
+                        } catch (RemoteException e) {
+                            Slog.e(TAG, "Could not contact the ContainerService");
+                        }
+                    } else {
+                        ret = PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE;
+                    }
+
+                    processPendingInstall(args, ret);
+
+                    mHandler.sendEmptyMessage(MCS_UNBIND);
+
+                    break;
+                }
             }
         }
     }
@@ -4693,12 +4764,45 @@
     public void installPackage(
             final Uri packageURI, final IPackageInstallObserver observer, final int flags,
             final String installerPackageName) {
-        mContext.enforceCallingOrSelfPermission(
-                android.Manifest.permission.INSTALL_PACKAGES, null);
+        installPackageWithVerification(packageURI, observer, flags, installerPackageName, null,
+                null);
+    }
 
-        Message msg = mHandler.obtainMessage(INIT_COPY);
-        msg.obj = new InstallParams(packageURI, observer, flags,
-                installerPackageName);
+    @Override
+    public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer,
+            int flags, String installerPackageName, Uri verificationURI,
+            ManifestDigest manifestDigest) {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.INSTALL_PACKAGES, null);
+
+        final int uid = Binder.getCallingUid();
+
+        final int filteredFlags;
+
+        if (uid == Process.SHELL_UID || uid == 0) {
+            if (DEBUG_INSTALL) {
+                Slog.v(TAG, "Install from ADB");
+            }
+            filteredFlags = flags | PackageManager.INSTALL_FROM_ADB;
+        } else {
+            filteredFlags = flags & ~PackageManager.INSTALL_FROM_ADB;
+        }
+
+        final Message msg = mHandler.obtainMessage(INIT_COPY);
+        msg.obj = new InstallParams(packageURI, observer, filteredFlags, installerPackageName,
+                verificationURI, manifestDigest);
+        mHandler.sendMessage(msg);
+    }
+
+    @Override
+    public void verifyPendingInstall(int id, boolean verified, String message)
+            throws RemoteException {
+        mContext.enforceCallingOrSelfPermission(
+                android.Manifest.permission.PACKAGE_VERIFICATION_AGENT, null);
+
+        final Message msg = mHandler.obtainMessage(PACKAGE_VERIFIED);
+        msg.arg1 = id;
+        msg.arg2 = verified ? 1 : 0;
+        msg.obj = message;
         mHandler.sendMessage(msg);
     }
 
@@ -4713,6 +4817,28 @@
         mHandler.sendMessage(msg);
     }
 
+    /**
+     * Get the verification agent timeout.
+     *
+     * @return verification timeout in milliseconds
+     */
+    private long getVerificationTimeout() {
+        return android.provider.Settings.Secure.getLong(mContext.getContentResolver(),
+                android.provider.Settings.Secure.PACKAGE_VERIFIER_TIMEOUT,
+                DEFAULT_VERIFICATION_TIMEOUT);
+    }
+
+    /**
+     * Check whether or not package verification has been enabled.
+     *
+     * @return true if verification should be performed
+     */
+    private boolean isVerificationEnabled() {
+        return android.provider.Settings.Secure.getInt(mContext.getContentResolver(),
+                android.provider.Settings.Secure.PACKAGE_VERIFIER_ENABLE,
+                DEFAULT_VERIFY_ENABLE ? 1 : 0) == 1 ? true : false;
+    }
+
     public void setInstallerPackageName(String targetPackage, String installerPackageName) {
         final int uid = Binder.getCallingUid();
         // writer
@@ -4856,15 +4982,21 @@
         });
     }
 
-    abstract class HandlerParams {
-        final static int MAX_RETRIES = 4;
-        int retry = 0;
+    private abstract class HandlerParams {
+        private static final int MAX_RETRIES = 4;
+
+        /**
+         * Number of times startCopy() has been attempted and had a non-fatal
+         * error.
+         */
+        private int mRetries = 0;
+
         final boolean startCopy() {
             boolean res;
             try {
-                if (DEBUG_SD_INSTALL) Log.i(TAG, "startCopy");
-                retry++;
-                if (retry > MAX_RETRIES) {
+                if (DEBUG_INSTALL) Slog.i(TAG, "startCopy");
+
+                if (++mRetries > MAX_RETRIES) {
                     Slog.w(TAG, "Failed to invoke remote methods on default container service. Giving up");
                     mHandler.sendEmptyMessage(MCS_GIVE_UP);
                     handleServiceError();
@@ -4874,7 +5006,7 @@
                     res = true;
                 }
             } catch (RemoteException e) {
-                if (DEBUG_SD_INSTALL) Log.i(TAG, "Posting install MCS_RECONNECT");
+                if (DEBUG_INSTALL) Slog.i(TAG, "Posting install MCS_RECONNECT");
                 mHandler.sendEmptyMessage(MCS_RECONNECT);
                 res = false;
             }
@@ -4883,10 +5015,11 @@
         }
 
         final void serviceError() {
-            if (DEBUG_SD_INSTALL) Log.i(TAG, "serviceError");
+            if (DEBUG_INSTALL) Slog.i(TAG, "serviceError");
             handleServiceError();
             handleReturnCode();
         }
+
         abstract void handleStartCopy() throws RemoteException;
         abstract void handleServiceError();
         abstract void handleReturnCode();
@@ -4969,15 +5102,20 @@
         int flags;
         final Uri packageURI;
         final String installerPackageName;
+        final Uri verificationURI;
+        final ManifestDigest manifestDigest;
         private InstallArgs mArgs;
         private int mRet;
+
         InstallParams(Uri packageURI,
                 IPackageInstallObserver observer, int flags,
-                String installerPackageName) {
+                String installerPackageName, Uri verificationURI, ManifestDigest manifestDigest) {
             this.packageURI = packageURI;
             this.flags = flags;
             this.observer = observer;
             this.installerPackageName = installerPackageName;
+            this.verificationURI = verificationURI;
+            this.manifestDigest = manifestDigest;
         }
 
         private int installLocationPolicy(PackageInfoLite pkgLite, int flags) {
@@ -5102,13 +5240,70 @@
                     }
                 }
             }
-            // Create the file args now.
-            mArgs = createInstallArgs(this);
+
+            final InstallArgs args = createInstallArgs(this);
             if (ret == PackageManager.INSTALL_SUCCEEDED) {
-                // Create copy only if we are not in an erroneous state.
-                // Remote call to initiate copy using temporary file
-                ret = mArgs.copyApk(mContainerService, true);
+                /*
+                 * Determine if we have any installed package verifiers. If we
+                 * do, then we'll defer to them to verify the packages.
+                 */
+                final Intent verification = new Intent(Intent.ACTION_PACKAGE_NEEDS_VERIFICATION,
+                        packageURI);
+                verification.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+                final List<ResolveInfo> receivers = queryIntentReceivers(verification, null,
+                        PackageManager.GET_DISABLED_COMPONENTS);
+                if (isVerificationEnabled() && receivers.size() > 0) {
+                    if (DEBUG_INSTALL) {
+                        Slog.d(TAG, "Found " + receivers.size() + " verifiers for intent "
+                                + verification.toString());
+                    }
+
+                    final int verificationId = mPendingVerificationToken++;
+
+                    verification.putExtra(PackageManager.EXTRA_VERIFICATION_ID, verificationId);
+
+                    verification.putExtra(PackageManager.EXTRA_VERIFICATION_INSTALLER_PACKAGE,
+                            installerPackageName);
+
+                    verification.putExtra(PackageManager.EXTRA_VERIFICATION_INSTALL_FLAGS, flags);
+
+                    if (verificationURI != null) {
+                        verification.putExtra(PackageManager.EXTRA_VERIFICATION_URI,
+                                verificationURI);
+                    }
+
+                    mPendingVerification.append(verificationId, args);
+
+                    /*
+                     * Send the intent to the registered verification agents,
+                     * but only start the verification timeout after the target
+                     * BroadcastReceivers have run.
+                     */
+                    mContext.sendOrderedBroadcast(verification,
+                            android.Manifest.permission.PACKAGE_VERIFICATION_AGENT,
+                            new BroadcastReceiver() {
+                                @Override
+                                public void onReceive(Context context, Intent intent) {
+                                    final Message msg = mHandler
+                                            .obtainMessage(CHECK_PENDING_VERIFICATION);
+                                    msg.arg1 = verificationId;
+                                    mHandler.sendMessageDelayed(msg, getVerificationTimeout());
+                                }
+                            },
+                            null, 0, null, null);
+                } else {
+                    // Create copy only if we are not in an erroneous state.
+                    // Remote call to initiate copy using temporary file
+                    mArgs = args;
+                    ret = args.copyApk(mContainerService, true);
+                }
+            } else {
+                // There was an error, so let the processPendingInstall() break
+                // the bad news... uh, through a call in handleReturnCode()
+                mArgs = args;
             }
+
             mRet = ret;
         }
 
@@ -5233,14 +5428,15 @@
         final int flags;
         final Uri packageURI;
         final String installerPackageName;
+        final ManifestDigest manifestDigest;
 
-        InstallArgs(Uri packageURI,
-                IPackageInstallObserver observer, int flags,
-                String installerPackageName) {
+        InstallArgs(Uri packageURI, IPackageInstallObserver observer, int flags,
+                String installerPackageName, ManifestDigest manifestDigest) {
             this.packageURI = packageURI;
             this.flags = flags;
             this.observer = observer;
             this.installerPackageName = installerPackageName;
+            this.manifestDigest = manifestDigest;
         }
 
         abstract void createCopyFile();
@@ -5265,12 +5461,12 @@
         boolean created = false;
 
         FileInstallArgs(InstallParams params) {
-            super(params.packageURI, params.observer,
-                    params.flags, params.installerPackageName);
+            super(params.packageURI, params.observer, params.flags, params.installerPackageName,
+                    params.manifestDigest);
         }
 
         FileInstallArgs(String fullCodePath, String fullResourcePath, String nativeLibraryPath) {
-            super(null, null, 0, null);
+            super(null, null, 0, null, null);
             File codeFile = new File(fullCodePath);
             installDir = codeFile.getParentFile();
             codeFileName = fullCodePath;
@@ -5279,7 +5475,7 @@
         }
 
         FileInstallArgs(Uri packageURI, String pkgName, String dataDir) {
-            super(packageURI, null, 0, null);
+            super(packageURI, null, 0, null, null);
             installDir = isFwdLocked() ? mDrmAppPrivateInstallDir : mAppInstallDir;
             String apkName = getNextCodePath(null, pkgName, ".apk");
             codeFileName = new File(installDir, apkName + ".apk").getPath();
@@ -5509,12 +5705,12 @@
         String libraryPath;
 
         SdInstallArgs(InstallParams params) {
-            super(params.packageURI, params.observer,
-                    params.flags, params.installerPackageName);
+            super(params.packageURI, params.observer, params.flags, params.installerPackageName,
+                    params.manifestDigest);
         }
 
         SdInstallArgs(String fullCodePath, String fullResourcePath, String nativeLibraryPath) {
-            super(null, null, PackageManager.INSTALL_EXTERNAL, null);
+            super(null, null, PackageManager.INSTALL_EXTERNAL, null, null);
             // Extract cid from fullCodePath
             int eidx = fullCodePath.lastIndexOf("/");
             String subStr1 = fullCodePath.substring(0, eidx);
@@ -5524,13 +5720,13 @@
         }
 
         SdInstallArgs(String cid) {
-            super(null, null, PackageManager.INSTALL_EXTERNAL, null);
+            super(null, null, PackageManager.INSTALL_EXTERNAL, null, null);
             this.cid = cid;
             setCachePath(PackageHelper.getSdDir(cid));
         }
 
         SdInstallArgs(Uri packageURI, String cid) {
-            super(packageURI, null, PackageManager.INSTALL_EXTERNAL, null);
+            super(packageURI, null, PackageManager.INSTALL_EXTERNAL, null, null);
             this.cid = cid;
         }
 
@@ -6152,6 +6348,26 @@
             res.returnCode = pp.getParseError();
             return;
         }
+
+        /* If the installer passed in a manifest digest, compare it now. */
+        if (args.manifestDigest != null) {
+            if (DEBUG_INSTALL) {
+                final String parsedManifest = pkg.manifestDigest == null ? "null"
+                        : pkg.manifestDigest.toString();
+                Slog.d(TAG, "Comparing manifests: " + args.manifestDigest.toString() + " vs. "
+                        + parsedManifest);
+            }
+
+            if (!args.manifestDigest.equals(pkg.manifestDigest)) {
+                res.returnCode = PackageManager.INSTALL_FAILED_PACKAGE_CHANGED;
+                return;
+            }
+        } else if (DEBUG_INSTALL) {
+            final String parsedManifest = pkg.manifestDigest == null
+                    ? "null" : pkg.manifestDigest.toString();
+            Slog.d(TAG, "manifestDigest was not present, but parser got: " + parsedManifest);
+        }
+
         // Get rid of all references to package scan path via parser.
         pp = null;
         String oldCodePath = null;
diff --git a/services/java/com/android/server/pm/PackageSignatures.java b/services/java/com/android/server/pm/PackageSignatures.java
index a25ec6c..9a20be7 100644
--- a/services/java/com/android/server/pm/PackageSignatures.java
+++ b/services/java/com/android/server/pm/PackageSignatures.java
@@ -138,6 +138,12 @@
                                     "Error in package manager settings: <cert> "
                                        + "index " + index + " is not a number at "
                                        + parser.getPositionDescription());
+                        } catch (IllegalArgumentException e) {
+                            PackageManagerService.reportSettingsProblem(Log.WARN,
+                                    "Error in package manager settings: <cert> "
+                                       + "index " + index + " has an invalid signature at "
+                                       + parser.getPositionDescription() + ": "
+                                       + e.getMessage());
                         }
                     } else {
                         PackageManagerService.reportSettingsProblem(Log.WARN,
diff --git a/services/java/com/android/server/usb/UsbDeviceManager.java b/services/java/com/android/server/usb/UsbDeviceManager.java
index 91c5e33..a01c975 100644
--- a/services/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/java/com/android/server/usb/UsbDeviceManager.java
@@ -253,13 +253,6 @@
             }
         };
 
-        private static final int NOTIFICATION_NONE = 0;
-        private static final int NOTIFICATION_MTP = 1;
-        private static final int NOTIFICATION_PTP = 2;
-        private static final int NOTIFICATION_INSTALLER = 3;
-        private static final int NOTIFICATION_ACCESSORY = 4;
-        private static final int NOTIFICATION_ADB = 5;
-
         public UsbHandler(Looper looper) {
             super(looper);
             try {
@@ -536,27 +529,18 @@
 
         private void updateUsbNotification() {
             if (mNotificationManager == null || !mUseUsbNotification) return;
-            int id = NOTIFICATION_NONE;
+            int id = 0;
             Resources r = mContext.getResources();
-            CharSequence title = null;
             if (mConnected) {
                 if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_MTP)) {
-                    title = r.getText(
-                        com.android.internal.R.string.usb_mtp_notification_title);
-                    id = NOTIFICATION_MTP;
+                    id = com.android.internal.R.string.usb_mtp_notification_title;
                 } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_PTP)) {
-                    title = r.getText(
-                        com.android.internal.R.string.usb_ptp_notification_title);
-                    id = NOTIFICATION_PTP;
+                    id = com.android.internal.R.string.usb_ptp_notification_title;
                 } else if (containsFunction(mCurrentFunctions,
                         UsbManager.USB_FUNCTION_MASS_STORAGE)) {
-                    title = r.getText(
-                        com.android.internal.R.string.usb_cd_installer_notification_title);
-                    id = NOTIFICATION_INSTALLER;
+                    id = com.android.internal.R.string.usb_cd_installer_notification_title;
                 } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_ACCESSORY)) {
-                    title = r.getText(
-                        com.android.internal.R.string.usb_accessory_notification_title);
-                    id = NOTIFICATION_ACCESSORY;
+                    id = com.android.internal.R.string.usb_accessory_notification_title;
                 } else {
                     // There is a different notification for USB tethering so we don't need one here
                     if (!containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_RNDIS)) {
@@ -566,13 +550,14 @@
             }
             if (id != mUsbNotificationId) {
                 // clear notification if title needs changing
-                if (mUsbNotificationId != NOTIFICATION_NONE) {
+                if (mUsbNotificationId != 0) {
                     mNotificationManager.cancel(mUsbNotificationId);
-                    mUsbNotificationId = NOTIFICATION_NONE;
+                    mUsbNotificationId = 0;
                 }
-                if (id != NOTIFICATION_NONE) {
+                if (id != 0) {
                     CharSequence message = r.getText(
                             com.android.internal.R.string.usb_notification_message);
+                    CharSequence title = r.getText(id);
 
                     Notification notification = new Notification();
                     notification.icon = com.android.internal.R.drawable.stat_sys_data_usb;
@@ -600,13 +585,13 @@
 
         private void updateAdbNotification() {
             if (mNotificationManager == null) return;
+            final int id = com.android.internal.R.string.adb_active_notification_title;
             if (mAdbEnabled && mConnected) {
                 if ("0".equals(SystemProperties.get("persist.adb.notify"))) return;
 
                 if (!mAdbNotificationShown) {
                     Resources r = mContext.getResources();
-                    CharSequence title = r.getText(
-                            com.android.internal.R.string.adb_active_notification_title);
+                    CharSequence title = r.getText(id);
                     CharSequence message = r.getText(
                             com.android.internal.R.string.adb_active_notification_message);
 
@@ -629,11 +614,11 @@
                             intent, 0);
                     notification.setLatestEventInfo(mContext, title, message, pi);
                     mAdbNotificationShown = true;
-                    mNotificationManager.notify(NOTIFICATION_ADB, notification);
+                    mNotificationManager.notify(id, notification);
                 }
             } else if (mAdbNotificationShown) {
                 mAdbNotificationShown = false;
-                mNotificationManager.cancel(NOTIFICATION_ADB);
+                mNotificationManager.cancel(id);
             }
         }
 
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 5967428..8fd4f95 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -6573,8 +6573,10 @@
                     }
                     synchronized (mWindowMap) {
                         // !!! TODO: ANR the drag-receiving app
-                        mDragState.mDragResult = false;
-                        mDragState.endDragLw();
+                        if (mDragState != null) {
+                            mDragState.mDragResult = false;
+                            mDragState.endDragLw();
+                        }
                     }
                     break;
                 }
diff --git a/services/sensorservice/tests/sensorservicetest.cpp b/services/sensorservice/tests/sensorservicetest.cpp
index aea1062..54bce09 100644
--- a/services/sensorservice/tests/sensorservicetest.cpp
+++ b/services/sensorservice/tests/sensorservicetest.cpp
@@ -22,6 +22,9 @@
 
 using namespace android;
 
+static nsecs_t sStartTime = 0;
+
+
 int receiver(int fd, int events, void* data)
 {
     sp<SensorEventQueue> q((SensorEventQueue*)data);
@@ -32,7 +35,7 @@
 
     while ((n = q->read(buffer, 8)) > 0) {
         for (int i=0 ; i<n ; i++) {
-            if (buffer[i].type == Sensor::TYPE_GYROSCOPE) {
+            if (buffer[i].type == Sensor::TYPE_ACCELEROMETER) {
                 printf("time=%lld, value=<%5.1f,%5.1f,%5.1f>\n",
                         buffer[i].timestamp,
                         buffer[i].acceleration.x,
@@ -43,9 +46,11 @@
             if (oldTimeStamp) {
                 float t = float(buffer[i].timestamp - oldTimeStamp) / s2ns(1);
                 printf("%f ms (%f Hz)\n", t*1000, 1.0/t);
+            } else {
+                float t = float(buffer[i].timestamp - sStartTime) / s2ns(1);
+                printf("first event: %f ms\n", t*1000);
             }
             oldTimeStamp = buffer[i].timestamp;
-
         }
     }
     if (n<0 && n != -EAGAIN) {
@@ -66,12 +71,15 @@
     sp<SensorEventQueue> q = mgr.createEventQueue();
     printf("queue=%p\n", q.get());
 
-    Sensor const* accelerometer = mgr.getDefaultSensor(Sensor::TYPE_GYROSCOPE);
+    Sensor const* accelerometer = mgr.getDefaultSensor(Sensor::TYPE_ACCELEROMETER);
     printf("accelerometer=%p (%s)\n",
             accelerometer, accelerometer->getName().string());
+
+    sStartTime = systemTime();
+
     q->enableSensor(accelerometer);
 
-    q->setEventRate(accelerometer, ms2ns(10));
+    q->setEventRate(accelerometer, ms2ns(200));
 
     sp<Looper> loop = new Looper(false);
     loop->addFd(q->getFd(), 0, ALOOPER_EVENT_INPUT, receiver, q.get());
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index b178e49..51eb0a3 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -5,6 +5,7 @@
     Layer.cpp 								\
     LayerBase.cpp 							\
     LayerDim.cpp 							\
+    DdmConnection.cpp						\
     DisplayHardware/DisplayHardware.cpp 	\
     DisplayHardware/DisplayHardwareBase.cpp \
     DisplayHardware/HWComposer.cpp 			\
@@ -36,6 +37,9 @@
 	libui \
 	libgui
 
+# this is only needed for DDMS debugging
+LOCAL_SHARED_LIBRARIES += libdvm libandroid_runtime
+
 LOCAL_C_INCLUDES := \
 	$(call include-path-for, corecg graphics)
 
diff --git a/services/surfaceflinger/DdmConnection.cpp b/services/surfaceflinger/DdmConnection.cpp
new file mode 100644
index 0000000..467a915
--- /dev/null
+++ b/services/surfaceflinger/DdmConnection.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <android_runtime/AndroidRuntime.h>
+
+#include "jni.h"
+#include "DdmConnection.h"
+
+extern "C" jint Java_com_android_internal_util_WithFramework_registerNatives(
+        JNIEnv* env, jclass clazz);
+
+namespace android {
+
+void DdmConnection::start(const char* name) {
+    JavaVM* vm;
+    JNIEnv* env;
+
+    // start a VM
+    JavaVMInitArgs args;
+    JavaVMOption opt;
+
+    opt.optionString =
+        "-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y";
+
+    args.version = JNI_VERSION_1_4;
+    args.options = &opt;
+    args.nOptions = 1;
+    args.ignoreUnrecognized = JNI_FALSE;
+
+    if (JNI_CreateJavaVM(&vm, &env, &args) == 0) {
+        jclass startClass;
+        jmethodID startMeth;
+
+        // register native code
+        if (Java_com_android_internal_util_WithFramework_registerNatives(env, 0) == 0) {
+            // set our name by calling DdmHandleAppName.setAppName()
+            startClass = env->FindClass("android/ddm/DdmHandleAppName");
+            if (startClass) {
+                startMeth = env->GetStaticMethodID(startClass,
+                        "setAppName", "(Ljava/lang/String;)V");
+                if (startMeth) {
+                    jstring str = env->NewStringUTF(name);
+                    env->CallStaticVoidMethod(startClass, startMeth, str);
+                    env->DeleteLocalRef(str);
+                }
+            }
+
+            // initialize DDMS communication by calling
+            // DdmRegister.registerHandlers()
+            startClass = env->FindClass("android/ddm/DdmRegister");
+            if (startClass) {
+                startMeth = env->GetStaticMethodID(startClass,
+                        "registerHandlers", "()V");
+                if (startMeth) {
+                    env->CallStaticVoidMethod(startClass, startMeth);
+                }
+            }
+        }
+    }
+}
+
+}; // namespace android
diff --git a/services/surfaceflinger/DdmConnection.h b/services/surfaceflinger/DdmConnection.h
new file mode 100644
index 0000000..91b737c
--- /dev/null
+++ b/services/surfaceflinger/DdmConnection.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SF_DDM_CONNECTION
+#define ANDROID_SF_DDM_CONNECTION
+
+namespace android {
+
+class DdmConnection {
+public:
+    static void start(const char* name);
+};
+
+}; // namespace android
+
+#endif /* ANDROID_SF_DDM_CONNECTION */
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 082effe..a68ab30 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -47,6 +47,7 @@
 
 #include "clz.h"
 #include "GLExtensions.h"
+#include "DdmConnection.h"
 #include "Layer.h"
 #include "LayerDim.h"
 #include "SurfaceFlinger.h"
@@ -90,6 +91,7 @@
         mFreezeDisplayTime(0),
         mDebugRegion(0),
         mDebugBackground(0),
+        mDebugDDMS(0),
         mDebugDisableHWC(0),
         mDebugInSwapBuffers(0),
         mLastSwapBufferTime(0),
@@ -108,13 +110,22 @@
 
     // debugging stuff...
     char value[PROPERTY_VALUE_MAX];
+
     property_get("debug.sf.showupdates", value, "0");
     mDebugRegion = atoi(value);
+
     property_get("debug.sf.showbackground", value, "0");
     mDebugBackground = atoi(value);
 
+    property_get("debug.sf.ddms", value, "0");
+    mDebugDDMS = atoi(value);
+    if (mDebugDDMS) {
+        DdmConnection::start(getServiceName());
+    }
+
     LOGI_IF(mDebugRegion,       "showupdates enabled");
     LOGI_IF(mDebugBackground,   "showbackground enabled");
+    LOGI_IF(mDebugDDMS,         "DDMS debugging enabled");
 }
 
 SurfaceFlinger::~SurfaceFlinger()
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 6f93f5b..89df0de 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -371,6 +371,7 @@
                 // don't use a lock for these, we don't care
                 int                         mDebugRegion;
                 int                         mDebugBackground;
+                int                         mDebugDDMS;
                 int                         mDebugDisableHWC;
                 volatile nsecs_t            mDebugInSwapBuffers;
                 nsecs_t                     mLastSwapBufferTime;
diff --git a/services/tests/servicestests/res/raw/xt_qtaguid_typical_with_set b/services/tests/servicestests/res/raw/xt_qtaguid_typical_with_set
new file mode 100644
index 0000000..3678b10
--- /dev/null
+++ b/services/tests/servicestests/res/raw/xt_qtaguid_typical_with_set
@@ -0,0 +1,13 @@
+idx iface acct_tag_hex uid_tag_int cnt_set rx_bytes rx_packets tx_bytes tx_packets rx_tcp_packets rx_tcp_bytes rx_udp_packets rx_udp_bytes rx_other_packets rx_other_bytes tx_tcp_packets tx_tcp_bytes tx_udp_packets tx_udp_bytes tx_other_packets tx_other_bytes

+1 rmnet0 0x0 0 0 14855 82 2804 47 2000 45 12799 35 56 2 676 13 2128 34 0 0

+1 rmnet0 0x0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

+2 rmnet0 0x0 1000 0 278102 253 10487 182 277342 243 760 10 0 0 9727 172 760 10 0 0

+2 rmnet0 0x0 1000 1 26033 30 1401 26 25881 28 152 2 0 0 1249 24 152 2 0 0

+3 rmnet0 0x0 10012 0 40524 272 134138 293 40524 272 0 0 0 0 134138 293 0 0 0 0

+3 rmnet0 0x0 10012 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

+4 rmnet0 0x0 10034 0 15791 59 9905 69 15791 59 0 0 0 0 9905 69 0 0 0 0

+4 rmnet0 0x0 10034 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

+5 rmnet0 0x0 10055 0 3602 29 7739 59 3602 29 0 0 0 0 7739 59 0 0 0 0

+5 rmnet0 0x0 10055 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

+6 rmnet0 0x7fff000300000000 1000 0 483 4 1931 6 483 4 0 0 0 0 1931 6 0 0 0 0

+6 rmnet0 0x7fff000300000000 1000 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

diff --git a/services/tests/servicestests/src/com/android/server/BroadcastInterceptingContext.java b/services/tests/servicestests/src/com/android/server/BroadcastInterceptingContext.java
index fe88793..f14569c 100644
--- a/services/tests/servicestests/src/com/android/server/BroadcastInterceptingContext.java
+++ b/services/tests/servicestests/src/com/android/server/BroadcastInterceptingContext.java
@@ -28,7 +28,10 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 /**
  * {@link ContextWrapper} that can attach listeners for upcoming
@@ -62,6 +65,15 @@
                 return false;
             }
         }
+
+        @Override
+        public Intent get() throws InterruptedException, ExecutionException {
+            try {
+                return get(5, TimeUnit.SECONDS);
+            } catch (TimeoutException e) {
+                throw new RuntimeException(e);
+            }
+        }
     }
 
     public BroadcastInterceptingContext(Context base) {
@@ -126,6 +138,11 @@
     }
 
     @Override
+    public void sendBroadcast(Intent intent, String receiverPermission) {
+        sendBroadcast(intent);
+    }
+
+    @Override
     public void removeStickyBroadcast(Intent intent) {
         // ignored
     }
diff --git a/services/tests/servicestests/src/com/android/server/NetworkManagementServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkManagementServiceTest.java
index f628977..5f35697 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkManagementServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkManagementServiceTest.java
@@ -16,6 +16,8 @@
 
 package com.android.server;
 
+import static android.net.NetworkStats.SET_DEFAULT;
+import static android.net.NetworkStats.SET_FOREGROUND;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static com.android.server.NetworkManagementSocketTagger.kernelToTag;
@@ -27,7 +29,6 @@
 import android.test.suitebuilder.annotation.LargeTest;
 
 import com.android.frameworks.servicestests.R;
-import com.google.common.io.Files;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -74,11 +75,11 @@
 
         final NetworkStats stats = mService.getNetworkStatsDetail();
         assertEquals(31, stats.size());
-        assertStatsEntry(stats, "wlan0", 0, 0, 14615L, 4270L);
-        assertStatsEntry(stats, "wlan0", 10004, 0, 333821L, 53558L);
-        assertStatsEntry(stats, "wlan0", 10004, 1947740890, 18725L, 1066L);
-        assertStatsEntry(stats, "rmnet0", 10037, 0, 31184994L, 684122L);
-        assertStatsEntry(stats, "rmnet0", 10037, 1947740890, 28507378L, 437004L);
+        assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0, 14615L, 4270L);
+        assertStatsEntry(stats, "wlan0", 10004, SET_DEFAULT, 0, 333821L, 53558L);
+        assertStatsEntry(stats, "wlan0", 10004, SET_DEFAULT, 1947740890, 18725L, 1066L);
+        assertStatsEntry(stats, "rmnet0", 10037, SET_DEFAULT, 0, 31184994L, 684122L);
+        assertStatsEntry(stats, "rmnet0", 10037, SET_DEFAULT, 1947740890, 28507378L, 437004L);
     }
 
     public void testNetworkStatsDetailExtended() throws Exception {
@@ -86,8 +87,8 @@
 
         final NetworkStats stats = mService.getNetworkStatsDetail();
         assertEquals(2, stats.size());
-        assertStatsEntry(stats, "test0", 1000, 0, 1024L, 2048L);
-        assertStatsEntry(stats, "test0", 1000, 0xF00D, 512L, 512L);
+        assertStatsEntry(stats, "test0", 1000, SET_DEFAULT, 0, 1024L, 2048L);
+        assertStatsEntry(stats, "test0", 1000, SET_DEFAULT, 0xF00D, 512L, 512L);
     }
 
     public void testNetworkStatsSummary() throws Exception {
@@ -95,12 +96,12 @@
 
         final NetworkStats stats = mService.getNetworkStatsSummary();
         assertEquals(6, stats.size());
-        assertStatsEntry(stats, "lo", UID_ALL, TAG_NONE, 8308L, 8308L);
-        assertStatsEntry(stats, "rmnet0", UID_ALL, TAG_NONE, 1507570L, 489339L);
-        assertStatsEntry(stats, "ifb0", UID_ALL, TAG_NONE, 52454L, 0L);
-        assertStatsEntry(stats, "ifb1", UID_ALL, TAG_NONE, 52454L, 0L);
-        assertStatsEntry(stats, "sit0", UID_ALL, TAG_NONE, 0L, 0L);
-        assertStatsEntry(stats, "ip6tnl0", UID_ALL, TAG_NONE, 0L, 0L);
+        assertStatsEntry(stats, "lo", UID_ALL, SET_DEFAULT, TAG_NONE, 8308L, 8308L);
+        assertStatsEntry(stats, "rmnet0", UID_ALL, SET_DEFAULT, TAG_NONE, 1507570L, 489339L);
+        assertStatsEntry(stats, "ifb0", UID_ALL, SET_DEFAULT, TAG_NONE, 52454L, 0L);
+        assertStatsEntry(stats, "ifb1", UID_ALL, SET_DEFAULT, TAG_NONE, 52454L, 0L);
+        assertStatsEntry(stats, "sit0", UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L);
+        assertStatsEntry(stats, "ip6tnl0", UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L);
     }
 
     public void testNetworkStatsSummaryDown() throws Exception {
@@ -112,8 +113,8 @@
 
         final NetworkStats stats = mService.getNetworkStatsSummary();
         assertEquals(7, stats.size());
-        assertStatsEntry(stats, "rmnet0", UID_ALL, TAG_NONE, 1507570L, 489339L);
-        assertStatsEntry(stats, "wlan0", UID_ALL, TAG_NONE, 1024L, 2048L);
+        assertStatsEntry(stats, "rmnet0", UID_ALL, SET_DEFAULT, TAG_NONE, 1507570L, 489339L);
+        assertStatsEntry(stats, "wlan0", UID_ALL, SET_DEFAULT, TAG_NONE, 1024L, 2048L);
     }
 
     public void testKernelTags() throws Exception {
@@ -130,6 +131,15 @@
         assertEquals(2147483136, kernelToTag("0x7FFFFE0000000000"));
     }
 
+    public void testNetworkStatsWithSet() throws Exception {
+        stageFile(R.raw.xt_qtaguid_typical_with_set, new File(mTestProc, "net/xt_qtaguid/stats"));
+
+        final NetworkStats stats = mService.getNetworkStatsDetail();
+        assertEquals(12, stats.size());
+        assertStatsEntry(stats, "rmnet0", 1000, SET_DEFAULT, 0, 278102L, 253L, 10487L, 182L);
+        assertStatsEntry(stats, "rmnet0", 1000, SET_FOREGROUND, 0, 26033L, 30L, 1401L, 26L);
+    }
+
     /**
      * Copy a {@link Resources#openRawResource(int)} into {@link File} for
      * testing purposes.
@@ -159,12 +169,22 @@
         }
     }
 
-    private static void assertStatsEntry(
-            NetworkStats stats, String iface, int uid, int tag, long rxBytes, long txBytes) {
-        final int i = stats.findIndex(iface, uid, tag);
+    private static void assertStatsEntry(NetworkStats stats, String iface, int uid, int set,
+            int tag, long rxBytes, long txBytes) {
+        final int i = stats.findIndex(iface, uid, set, tag);
         final NetworkStats.Entry entry = stats.getValues(i, null);
-        assertEquals(rxBytes, entry.rxBytes);
-        assertEquals(txBytes, entry.txBytes);
+        assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes);
+        assertEquals("unexpected txBytes", txBytes, entry.txBytes);
+    }
+
+    private static void assertStatsEntry(NetworkStats stats, String iface, int uid, int set,
+            int tag, long rxBytes, long rxPackets, long txBytes, long txPackets) {
+        final int i = stats.findIndex(iface, uid, set, tag);
+        final NetworkStats.Entry entry = stats.getValues(i, null);
+        assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes);
+        assertEquals("unexpected rxPackets", rxPackets, entry.rxPackets);
+        assertEquals("unexpected txBytes", txBytes, entry.txBytes);
+        assertEquals("unexpected txPackets", txPackets, entry.txPackets);
     }
 
 }
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
index 09f8ff3..845aa3f 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
@@ -29,8 +29,6 @@
 import static android.net.NetworkPolicyManager.RULE_REJECT_METERED;
 import static android.net.NetworkPolicyManager.computeLastCycleBoundary;
 import static android.net.NetworkPolicyManager.computeNextCycleBoundary;
-import static android.net.NetworkStats.TAG_NONE;
-import static android.net.NetworkStats.UID_ALL;
 import static android.text.format.DateUtils.DAY_IN_MILLIS;
 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
 import static com.android.server.net.NetworkPolicyManagerService.TYPE_LIMIT;
@@ -282,6 +280,7 @@
         Future<Void> future;
 
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, true);
@@ -290,6 +289,7 @@
 
         // push strict policy for foreground uid, verify ALLOW rule
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -299,6 +299,7 @@
         // now turn screen off and verify REJECT rule
         expect(mPowerManager.isScreenOn()).andReturn(false).atLeastOnce();
         expectSetUidNetworkRules(UID_A, true);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_REJECT_METERED);
         replay();
         mServiceContext.sendBroadcast(new Intent(Intent.ACTION_SCREEN_OFF));
@@ -308,6 +309,7 @@
         // and turn screen back on, verify ALLOW rule restored
         expect(mPowerManager.isScreenOn()).andReturn(true).atLeastOnce();
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mServiceContext.sendBroadcast(new Intent(Intent.ACTION_SCREEN_ON));
@@ -319,6 +321,7 @@
         Future<Void> future;
 
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, true);
@@ -327,6 +330,7 @@
 
         // POLICY_NONE should RULE_ALLOW in foreground
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mService.setUidPolicy(UID_A, POLICY_NONE);
@@ -335,6 +339,7 @@
 
         // POLICY_NONE should RULE_ALLOW in background
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, false);
@@ -347,6 +352,7 @@
 
         // POLICY_REJECT should RULE_ALLOW in background
         expectSetUidNetworkRules(UID_A, true);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_REJECT_METERED);
         replay();
         mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -355,6 +361,7 @@
 
         // POLICY_REJECT should RULE_ALLOW in foreground
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, true);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, true);
@@ -363,6 +370,7 @@
 
         // POLICY_REJECT should RULE_REJECT in background
         expectSetUidNetworkRules(UID_A, true);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_REJECT_METERED);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, false);
@@ -375,6 +383,7 @@
 
         // POLICY_NONE should have RULE_ALLOW in background
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, false);
@@ -384,6 +393,7 @@
 
         // adding POLICY_REJECT should cause RULE_REJECT
         expectSetUidNetworkRules(UID_A, true);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_REJECT_METERED);
         replay();
         mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -392,6 +402,7 @@
 
         // removing POLICY_REJECT should return us to RULE_ALLOW
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         mService.setUidPolicy(UID_A, POLICY_NONE);
@@ -503,7 +514,7 @@
 
         // pretend that 512 bytes total have happened
         stats = new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 256L, 2L, 256L, 2L, 11);
+                .addIfaceValues(TEST_IFACE, 256L, 2L, 256L, 2L);
         expect(mStatsService.getSummaryForNetwork(sTemplateWifi, TIME_FEB_15, TIME_MAR_10))
                 .andReturn(stats).atLeastOnce();
 
@@ -527,6 +538,7 @@
 
         // POLICY_REJECT should RULE_REJECT in background
         expectSetUidNetworkRules(UID_A, true);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_REJECT_METERED);
         replay();
         mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -535,6 +547,7 @@
 
         // uninstall should clear RULE_REJECT
         expectSetUidNetworkRules(UID_A, false);
+        expectSetUidForeground(UID_A, false);
         future = expectRulesChanged(UID_A, RULE_ALLOW_ALL);
         replay();
         final Intent intent = new Intent(ACTION_UID_REMOVED);
@@ -579,7 +592,7 @@
         elapsedRealtime += MINUTE_IN_MILLIS;
         currentTime = TIME_MAR_10 + elapsedRealtime;
         stats = new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 0L, 0L, 0L, 0L, 0);
+                .addIfaceValues(TEST_IFACE, 0L, 0L, 0L, 0L);
         state = new NetworkState[] { buildWifi() };
 
         {
@@ -606,7 +619,7 @@
         elapsedRealtime += MINUTE_IN_MILLIS;
         currentTime = TIME_MAR_10 + elapsedRealtime;
         stats = new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 1536L, 15L, 0L, 0L, 11);
+                .addIfaceValues(TEST_IFACE, 1536L, 15L, 0L, 0L);
 
         {
             expectTime(currentTime);
@@ -627,7 +640,7 @@
         elapsedRealtime += MINUTE_IN_MILLIS;
         currentTime = TIME_MAR_10 + elapsedRealtime;
         stats = new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 5120L, 512L, 0L, 0L, 22);
+                .addIfaceValues(TEST_IFACE, 5120L, 512L, 0L, 0L);
 
         {
             expectTime(currentTime);
@@ -738,6 +751,11 @@
         expectLastCall().atLeastOnce();
     }
 
+    private void expectSetUidForeground(int uid, boolean uidForeground) throws Exception {
+        mStatsService.setUidForeground(uid, uidForeground);
+        expectLastCall().atLeastOnce();
+    }
+
     private Future<Void> expectRulesChanged(int uid, int policy) throws Exception {
         final FutureAnswer future = new FutureAnswer();
         mPolicyListener.onUidRulesChanged(eq(uid), eq(policy));
diff --git a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
index 8eb9cc3..6138490 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
@@ -23,6 +23,9 @@
 import static android.net.ConnectivityManager.TYPE_WIFI;
 import static android.net.ConnectivityManager.TYPE_WIMAX;
 import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.SET_ALL;
+import static android.net.NetworkStats.SET_DEFAULT;
+import static android.net.NetworkStats.SET_FOREGROUND;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.NetworkStatsHistory.FIELD_ALL;
@@ -34,9 +37,6 @@
 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
 import static android.text.format.DateUtils.WEEK_IN_MILLIS;
 import static com.android.server.net.NetworkStatsService.ACTION_NETWORK_STATS_POLL;
-import static com.android.server.net.NetworkStatsService.packUidAndTag;
-import static com.android.server.net.NetworkStatsService.unpackTag;
-import static com.android.server.net.NetworkStatsService.unpackUid;
 import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.eq;
@@ -68,6 +68,9 @@
 import org.easymock.EasyMock;
 
 import java.io.File;
+import java.util.concurrent.Future;
+
+import libcore.io.IoUtils;
 
 /**
  * Tests for {@link NetworkStatsService}.
@@ -90,6 +93,8 @@
     private static final int UID_BLUE = 1002;
     private static final int UID_GREEN = 1003;
 
+    private long mElapsedRealtime;
+
     private BroadcastInterceptingContext mServiceContext;
     private File mStatsDir;
 
@@ -107,6 +112,9 @@
 
         mServiceContext = new BroadcastInterceptingContext(getContext());
         mStatsDir = getContext().getFilesDir();
+        if (mStatsDir.exists()) {
+            IoUtils.deleteContents(mStatsDir);
+        }
 
         mNetManager = createMock(INetworkManagementService.class);
         mAlarmManager = createMock(IAlarmManager.class);
@@ -118,11 +126,17 @@
                 mServiceContext, mNetManager, mAlarmManager, mTime, mStatsDir, mSettings);
         mService.bindConnectivityManager(mConnManager);
 
+        mElapsedRealtime = 0L;
+
+        expectCurrentTime();
         expectDefaultSettings();
-        expectSystemReady();
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(buildEmptyStats());
+        final Future<?> firstPoll = expectSystemReady();
 
         replay();
         mService.systemReady();
+        firstPoll.get();
         verifyAndReset();
 
     }
@@ -148,14 +162,12 @@
     }
 
     public void testNetworkStatsWifi() throws Exception {
-        long elapsedRealtime = 0;
-
         // pretend that wifi network comes online; service should ask about full
         // network state, and poll any existing interfaces before updating.
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildWifiState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
@@ -164,16 +176,13 @@
         assertNetworkTotal(sTemplateWifi, 0L, 0L, 0L, 0L, 0);
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // modify some number on wifi, and trigger poll event
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 1024L, 1L, 2048L, 2L));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 1024L, 1L, 2048L, 2L));
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -184,12 +193,12 @@
 
         // and bump forward again, with counters going higher. this is
         // important, since polling should correctly subtract last snapshot.
-        elapsedRealtime += DAY_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(DAY_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 4096L, 4L, 8192L, 8L));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 4096L, 4L, 8192L, 8L));
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -201,15 +210,14 @@
     }
 
     public void testStatsRebootPersist() throws Exception {
-        long elapsedRealtime = 0;
         assertStatsFilesExist(false);
 
         // pretend that wifi network comes online; service should ask about full
         // network state, and poll any existing interfaces before updating.
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildWifiState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
@@ -218,29 +226,33 @@
         assertNetworkTotal(sTemplateWifi, 0L, 0L, 0L, 0L, 0);
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // modify some number on wifi, and trigger poll event
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 1024L, 8L, 2048L, 16L));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 2)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 512L, 4L, 256L, 2L)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 128L, 1L, 128L, 1L));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 1024L, 8L, 2048L, 16L));
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 2)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 256L, 2L, 128L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 512L, 4L, 256L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 256L, 2L, 128L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 20);
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 10);
+        mService.setUidForeground(UID_RED, false);
+        mService.incrementOperationCount(UID_RED, 0xFAAD, 4);
+        mService.setUidForeground(UID_RED, true);
+        mService.incrementOperationCount(UID_RED, 0xFAAD, 6);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
 
         // verify service recorded history
         assertNetworkTotal(sTemplateWifi, 1024L, 8L, 2048L, 16L, 0);
-        assertUidTotal(sTemplateWifi, UID_RED, 512L, 4L, 256L, 2L, 20);
-        assertUidTotal(sTemplateWifi, UID_BLUE, 128L, 1L, 128L, 1L, 10);
+        assertUidTotal(sTemplateWifi, UID_RED, 1024L, 8L, 512L, 4L, 10);
+        assertUidTotal(sTemplateWifi, UID_RED, SET_DEFAULT, 512L, 4L, 256L, 2L, 4);
+        assertUidTotal(sTemplateWifi, UID_RED, SET_FOREGROUND, 512L, 4L, 256L, 2L, 6);
+        assertUidTotal(sTemplateWifi, UID_BLUE, 128L, 1L, 128L, 1L, 0);
         verifyAndReset();
 
         // graceful shutdown system, which should trigger persist of stats, and
@@ -257,47 +269,49 @@
         assertStatsFilesExist(true);
 
         // boot through serviceReady() again
+        expectCurrentTime();
         expectDefaultSettings();
-        expectSystemReady();
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(buildEmptyStats());
+        final Future<?> firstPoll = expectSystemReady();
 
         replay();
         mService.systemReady();
+        firstPoll.get();
 
         // after systemReady(), we should have historical stats loaded again
         assertNetworkTotal(sTemplateWifi, 1024L, 8L, 2048L, 16L, 0);
-        assertUidTotal(sTemplateWifi, UID_RED, 512L, 4L, 256L, 2L, 20);
-        assertUidTotal(sTemplateWifi, UID_BLUE, 128L, 1L, 128L, 1L, 10);
+        assertUidTotal(sTemplateWifi, UID_RED, 1024L, 8L, 512L, 4L, 10);
+        assertUidTotal(sTemplateWifi, UID_RED, SET_DEFAULT, 512L, 4L, 256L, 2L, 4);
+        assertUidTotal(sTemplateWifi, UID_RED, SET_FOREGROUND, 512L, 4L, 256L, 2L, 6);
+        assertUidTotal(sTemplateWifi, UID_BLUE, 128L, 1L, 128L, 1L, 0);
         verifyAndReset();
 
     }
 
     public void testStatsBucketResize() throws Exception {
-        long elapsedRealtime = 0;
         NetworkStatsHistory history = null;
 
         assertStatsFilesExist(false);
 
         // pretend that wifi network comes online; service should ask about full
         // network state, and poll any existing interfaces before updating.
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectSettings(0L, HOUR_IN_MILLIS, WEEK_IN_MILLIS);
         expectNetworkState(buildWifiState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // modify some number on wifi, and trigger poll event
-        elapsedRealtime += 2 * HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(2 * HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectSettings(0L, HOUR_IN_MILLIS, WEEK_IN_MILLIS);
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 512L, 4L, 512L, 4L));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 512L, 4L, 512L, 4L));
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -311,10 +325,10 @@
 
         // now change bucket duration setting and trigger another poll with
         // exact same values, which should resize existing buckets.
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectSettings(0L, 30 * MINUTE_IN_MILLIS, WEEK_IN_MILLIS);
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -329,35 +343,28 @@
     }
 
     public void testUidStatsAcrossNetworks() throws Exception {
-        long elapsedRealtime = 0;
-
         // pretend first mobile network comes online
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildMobile3gState(IMSI_1));
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // create some traffic on first network
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 2048L, 16L, 512L, 4L));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 3)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 1536L, 12L, 512L, 4L)
-                .addValues(TEST_IFACE, UID_RED, 0xF00D, 512L, 4L, 512L, 4L)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 512L, 4L, 0L, 0L));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 2048L, 16L, 512L, 4L));
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 15);
         mService.incrementOperationCount(UID_RED, 0xF00D, 10);
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 5);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -365,18 +372,18 @@
         // verify service recorded history
         assertNetworkTotal(sTemplateImsi1, 2048L, 16L, 512L, 4L, 0);
         assertNetworkTotal(sTemplateWifi, 0L, 0L, 0L, 0L, 0);
-        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 512L, 4L, 15);
-        assertUidTotal(sTemplateImsi1, UID_BLUE, 512L, 4L, 0L, 0L, 5);
+        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 512L, 4L, 10);
+        assertUidTotal(sTemplateImsi1, UID_BLUE, 512L, 4L, 0L, 0L, 0);
         verifyAndReset();
 
         // now switch networks; this also tests that we're okay with interfaces
         // disappearing, to verify we don't count backwards.
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildMobile3gState(IMSI_2));
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
@@ -384,23 +391,24 @@
         verifyAndReset();
 
         // create traffic on second network
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 128L, 1L, 1024L, 8L));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 128L, 1L, 1024L, 8L));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 128L, 1L, 1024L, 8L));
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 128L, 1L, 1024L, 8L, 0L)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, 0xFAAD, 128L, 1L, 1024L, 8L, 0L));
 
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 10);
+        mService.incrementOperationCount(UID_BLUE, 0xFAAD, 10);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
 
         // verify original history still intact
         assertNetworkTotal(sTemplateImsi1, 2048L, 16L, 512L, 4L, 0);
-        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 512L, 4L, 15);
-        assertUidTotal(sTemplateImsi1, UID_BLUE, 512L, 4L, 0L, 0L, 5);
+        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 512L, 4L, 10);
+        assertUidTotal(sTemplateImsi1, UID_BLUE, 512L, 4L, 0L, 0L, 0);
 
         // and verify new history also recorded under different template, which
         // verifies that we didn't cross the streams.
@@ -412,35 +420,29 @@
     }
 
     public void testUidRemovedIsMoved() throws Exception {
-        long elapsedRealtime = 0;
-
         // pretend that network comes online
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildWifiState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // create some traffic
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_ALL, TAG_NONE, 4128L, 258L, 544L, 34L));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 16L, 1L, 16L, 1L)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 4096L, 258L, 512L, 32L)
-                .addValues(TEST_IFACE, UID_GREEN, TAG_NONE, 16L, 1L, 16L, 1L));
+        expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1)
+                .addIfaceValues(TEST_IFACE, 4128L, 258L, 544L, 34L));
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 16L, 1L, 16L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 4096L, 258L, 512L, 32L, 0L)
+                .addValues(TEST_IFACE, UID_GREEN, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 10);
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 15);
-        mService.incrementOperationCount(UID_GREEN, TAG_NONE, 5);
+        mService.incrementOperationCount(UID_RED, 0xFAAD, 10);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -448,8 +450,8 @@
         // verify service recorded history
         assertNetworkTotal(sTemplateWifi, 4128L, 258L, 544L, 34L, 0);
         assertUidTotal(sTemplateWifi, UID_RED, 16L, 1L, 16L, 1L, 10);
-        assertUidTotal(sTemplateWifi, UID_BLUE, 4096L, 258L, 512L, 32L, 15);
-        assertUidTotal(sTemplateWifi, UID_GREEN, 16L, 1L, 16L, 1L, 5);
+        assertUidTotal(sTemplateWifi, UID_BLUE, 4096L, 258L, 512L, 32L, 0);
+        assertUidTotal(sTemplateWifi, UID_GREEN, 16L, 1L, 16L, 1L, 0);
         verifyAndReset();
 
         // now pretend two UIDs are uninstalled, which should migrate stats to
@@ -467,54 +469,48 @@
         assertNetworkTotal(sTemplateWifi, 4128L, 258L, 544L, 34L, 0);
         assertUidTotal(sTemplateWifi, UID_RED, 0L, 0L, 0L, 0L, 0);
         assertUidTotal(sTemplateWifi, UID_BLUE, 0L, 0L, 0L, 0L, 0);
-        assertUidTotal(sTemplateWifi, UID_GREEN, 16L, 1L, 16L, 1L, 5);
-        assertUidTotal(sTemplateWifi, UID_REMOVED, 4112L, 259L, 528L, 33L, 25);
+        assertUidTotal(sTemplateWifi, UID_GREEN, 16L, 1L, 16L, 1L, 0);
+        assertUidTotal(sTemplateWifi, UID_REMOVED, 4112L, 259L, 528L, 33L, 10);
         verifyAndReset();
 
     }
 
     public void testUid3g4gCombinedByTemplate() throws Exception {
-        long elapsedRealtime = 0;
-
         // pretend that network comes online
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildMobile3gState(IMSI_1));
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // create some traffic
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 1024L, 8L, 1024L, 8L)
-                .addValues(TEST_IFACE, UID_RED, 0xF00D, 512L, 4L, 512L, 4L));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 10);
         mService.incrementOperationCount(UID_RED, 0xF00D, 5);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
 
         // verify service recorded history
-        assertUidTotal(sTemplateImsi1, UID_RED, 1024L, 8L, 1024L, 8L, 10);
+        assertUidTotal(sTemplateImsi1, UID_RED, 1024L, 8L, 1024L, 8L, 5);
         verifyAndReset();
 
         // now switch over to 4g network
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildMobile4gState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
@@ -522,92 +518,64 @@
         verifyAndReset();
 
         // create traffic on second network
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 512L, 4L, 256L, 2L));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 512L, 4L, 256L, 2L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 5);
+        mService.incrementOperationCount(UID_RED, 0xFAAD, 5);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
 
         // verify that ALL_MOBILE template combines both
-        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 1280L, 10L, 15);
+        assertUidTotal(sTemplateImsi1, UID_RED, 1536L, 12L, 1280L, 10L, 10);
 
         verifyAndReset();
 
     }
-    
-    public void testPackedUidAndTag() throws Exception {
-        assertEquals(0x0000000000000000L, packUidAndTag(0, 0x0));
-        assertEquals(0x000003E900000000L, packUidAndTag(1001, 0x0));
-        assertEquals(0x000003E90000F00DL, packUidAndTag(1001, 0xF00D));
-
-        long packed;
-        packed = packUidAndTag(Integer.MAX_VALUE, Integer.MIN_VALUE);
-        assertEquals(Integer.MAX_VALUE, unpackUid(packed));
-        assertEquals(Integer.MIN_VALUE, unpackTag(packed));
-
-        packed = packUidAndTag(Integer.MIN_VALUE, Integer.MAX_VALUE);
-        assertEquals(Integer.MIN_VALUE, unpackUid(packed));
-        assertEquals(Integer.MAX_VALUE, unpackTag(packed));
-
-        packed = packUidAndTag(10005, 0xFFFFFFFF);
-        assertEquals(10005, unpackUid(packed));
-        assertEquals(0xFFFFFFFF, unpackTag(packed));
-        
-    }
 
     public void testSummaryForAllUid() throws Exception {
-        long elapsedRealtime = 0;
-
         // pretend that network comes online
-        expectTime(TEST_START + elapsedRealtime);
+        expectCurrentTime();
         expectDefaultSettings();
         expectNetworkState(buildWifiState());
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
+        expectNetworkStatsSummary(buildEmptyStats());
 
         replay();
         mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
         verifyAndReset();
 
-        // bootstrap with full polling event to prime stats
-        performBootstrapPoll(TEST_START, elapsedRealtime);
-
         // create some traffic for two apps
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_RED, TAG_NONE, 50L, 5L, 50L, 5L)
-                .addValues(TEST_IFACE, UID_RED, 0xF00D, 10L, 1L, 10L, 1L)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 1024L, 8L, 512L, 4L));
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0L));
 
-        mService.incrementOperationCount(UID_RED, TAG_NONE, 5);
         mService.incrementOperationCount(UID_RED, 0xF00D, 1);
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 10);
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
 
         // verify service recorded history
-        assertUidTotal(sTemplateWifi, UID_RED, 50L, 5L, 50L, 5L, 5);
-        assertUidTotal(sTemplateWifi, UID_BLUE, 1024L, 8L, 512L, 4L, 10);
+        assertUidTotal(sTemplateWifi, UID_RED, 50L, 5L, 50L, 5L, 1);
+        assertUidTotal(sTemplateWifi, UID_BLUE, 1024L, 8L, 512L, 4L, 0);
         verifyAndReset();
 
         // now create more traffic in next hour, but only for one app
-        elapsedRealtime += HOUR_IN_MILLIS;
-        expectTime(TEST_START + elapsedRealtime);
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
         expectDefaultSettings();
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(new NetworkStats(elapsedRealtime, 1)
-                .addValues(TEST_IFACE, UID_BLUE, TAG_NONE, 2048L, 16L, 1024L, 8L));
-
-        mService.incrementOperationCount(UID_BLUE, TAG_NONE, 15);
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 2048L, 16L, 1024L, 8L, 0L));
 
         replay();
         mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
@@ -616,16 +584,77 @@
         NetworkStats stats = mService.getSummaryForAllUid(
                 sTemplateWifi, Long.MIN_VALUE, Long.MAX_VALUE, true);
         assertEquals(3, stats.size());
-        assertValues(stats, 0, IFACE_ALL, UID_RED, TAG_NONE, 50L, 5L, 50L, 5L, 5);
-        assertValues(stats, 1, IFACE_ALL, UID_RED, 0xF00D, 10L, 1L, 10L, 1L, 1);
-        assertValues(stats, 2, IFACE_ALL, UID_BLUE, TAG_NONE, 2048L, 16L, 1024L, 8L, 15);
+        assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 1);
+        assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 1);
+        assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 2048L, 16L, 1024L, 8L, 0);
 
         // now verify that recent history only contains one uid
-        final long currentTime = TEST_START + elapsedRealtime;
+        final long currentTime = currentTimeMillis();
         stats = mService.getSummaryForAllUid(
                 sTemplateWifi, currentTime - HOUR_IN_MILLIS, currentTime, true);
         assertEquals(1, stats.size());
-        assertValues(stats, 0, IFACE_ALL, UID_BLUE, TAG_NONE, 1024L, 8L, 512L, 4L, 5);
+        assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0);
+
+        verifyAndReset();
+    }
+
+    public void testForegroundBackground() throws Exception {
+        // pretend that network comes online
+        expectCurrentTime();
+        expectDefaultSettings();
+        expectNetworkState(buildWifiState());
+        expectNetworkStatsSummary(buildEmptyStats());
+
+        replay();
+        mServiceContext.sendBroadcast(new Intent(CONNECTIVITY_ACTION));
+        verifyAndReset();
+
+        // create some initial traffic
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
+        expectDefaultSettings();
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L));
+
+        mService.incrementOperationCount(UID_RED, 0xF00D, 1);
+
+        replay();
+        mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
+
+        // verify service recorded history
+        assertUidTotal(sTemplateWifi, UID_RED, 128L, 2L, 128L, 2L, 1);
+        verifyAndReset();
+
+        // now switch to foreground
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectCurrentTime();
+        expectDefaultSettings();
+        expectNetworkStatsSummary(buildEmptyStats());
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 32L, 2L, 32L, 2L, 0L)
+                .addValues(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 1L, 1L, 1L, 1L, 0L));
+
+        mService.setUidForeground(UID_RED, true);
+        mService.incrementOperationCount(UID_RED, 0xFAAD, 1);
+
+        replay();
+        mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
+
+        // test that we combined correctly
+        assertUidTotal(sTemplateWifi, UID_RED, 160L, 4L, 160L, 4L, 2);
+
+        // verify entire history present
+        final NetworkStats stats = mService.getSummaryForAllUid(
+                sTemplateWifi, Long.MIN_VALUE, Long.MAX_VALUE, true);
+        assertEquals(4, stats.size());
+        assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 1);
+        assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 1);
+        assertValues(stats, IFACE_ALL, UID_RED, SET_FOREGROUND, TAG_NONE, 32L, 2L, 32L, 2L, 1);
+        assertValues(stats, IFACE_ALL, UID_RED, SET_FOREGROUND, 0xFAAD, 1L, 1L, 1L, 1L, 1);
 
         verifyAndReset();
     }
@@ -639,19 +668,27 @@
 
     private void assertUidTotal(NetworkTemplate template, int uid, long rxBytes, long rxPackets,
             long txBytes, long txPackets, int operations) {
+        assertUidTotal(template, uid, SET_ALL, rxBytes, rxPackets, txBytes, txPackets, operations);
+    }
+
+    private void assertUidTotal(NetworkTemplate template, int uid, int set, long rxBytes,
+            long rxPackets, long txBytes, long txPackets, int operations) {
         final NetworkStatsHistory history = mService.getHistoryForUid(
-                template, uid, TAG_NONE, FIELD_ALL);
+                template, uid, set, TAG_NONE, FIELD_ALL);
         assertValues(history, Long.MIN_VALUE, Long.MAX_VALUE, rxBytes, rxPackets, txBytes,
                 txPackets, operations);
     }
 
-    private void expectSystemReady() throws Exception {
+    private Future<?> expectSystemReady() throws Exception {
         mAlarmManager.remove(isA(PendingIntent.class));
         expectLastCall().anyTimes();
 
         mAlarmManager.setInexactRepeating(
                 eq(AlarmManager.ELAPSED_REALTIME), anyLong(), anyLong(), isA(PendingIntent.class));
         expectLastCall().atLeastOnce();
+
+        return mServiceContext.nextBroadcastIntent(
+                NetworkStatsService.ACTION_NETWORK_STATS_UPDATED);
     }
 
     private void expectNetworkState(NetworkState... state) throws Exception {
@@ -682,25 +719,14 @@
         expect(mSettings.getTimeCacheMaxAge()).andReturn(DAY_IN_MILLIS).anyTimes();
     }
 
-    private void expectTime(long currentTime) throws Exception {
+    private void expectCurrentTime() throws Exception {
         expect(mTime.forceRefresh()).andReturn(false).anyTimes();
         expect(mTime.hasCache()).andReturn(true).anyTimes();
-        expect(mTime.currentTimeMillis()).andReturn(currentTime).anyTimes();
+        expect(mTime.currentTimeMillis()).andReturn(currentTimeMillis()).anyTimes();
         expect(mTime.getCacheAge()).andReturn(0L).anyTimes();
         expect(mTime.getCacheCertainty()).andReturn(0L).anyTimes();
     }
 
-    private void performBootstrapPoll(long testStart, long elapsedRealtime) throws Exception {
-        expectTime(testStart + elapsedRealtime);
-        expectDefaultSettings();
-        expectNetworkStatsSummary(buildEmptyStats(elapsedRealtime));
-        expectNetworkStatsUidDetail(buildEmptyStats(elapsedRealtime));
-
-        replay();
-        mServiceContext.sendBroadcast(new Intent(ACTION_NETWORK_STATS_POLL));
-        verifyAndReset();
-    }
-
     private void assertStatsFilesExist(boolean exist) {
         final File networkFile = new File(mStatsDir, "netstats.bin");
         final File uidFile = new File(mStatsDir, "netstats_uid.bin");
@@ -713,12 +739,10 @@
         }
     }
 
-    private static void assertValues(NetworkStats stats, int i, String iface, int uid, int tag,
-            long rxBytes, long rxPackets, long txBytes, long txPackets, int operations) {
+    private static void assertValues(NetworkStats stats, String iface, int uid, int set,
+            int tag, long rxBytes, long rxPackets, long txBytes, long txPackets, int operations) {
+        final int i = stats.findIndex(iface, uid, set, tag);
         final NetworkStats.Entry entry = stats.getValues(i, null);
-        assertEquals("unexpected iface", iface, entry.iface);
-        assertEquals("unexpected uid", uid, entry.uid);
-        assertEquals("unexpected tag", tag, entry.tag);
         assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes);
         assertEquals("unexpected rxPackets", rxPackets, entry.rxPackets);
         assertEquals("unexpected txBytes", txBytes, entry.txBytes);
@@ -761,8 +785,24 @@
         return new NetworkState(info, prop, null);
     }
 
-    private static NetworkStats buildEmptyStats(long elapsedRealtime) {
-        return new NetworkStats(elapsedRealtime, 0);
+    private NetworkStats buildEmptyStats() {
+        return new NetworkStats(getElapsedRealtime(), 0);
+    }
+
+    private long getElapsedRealtime() {
+        return mElapsedRealtime;
+    }
+
+    private long startTimeMillis() {
+        return TEST_START;
+    }
+
+    private long currentTimeMillis() {
+        return startTimeMillis() + mElapsedRealtime;
+    }
+
+    private void incrementCurrentTime(long duration) {
+        mElapsedRealtime += duration;
     }
 
     private void replay() {
diff --git a/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java b/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java
index c0870c7..6a9778e 100644
--- a/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java
@@ -16,6 +16,9 @@
 
 package com.android.server;
 
+import static android.net.NetworkStats.SET_DEFAULT;
+import static android.net.NetworkStats.TAG_NONE;
+import static android.net.NetworkStats.UID_ALL;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
@@ -289,7 +292,7 @@
     public void expectGetInterfaceCounter(long rx, long tx) throws Exception {
         // TODO: provide elapsedRealtime mock to match TimeAuthority
         final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1);
-        stats.addValues(TEST_IFACE, NetworkStats.UID_ALL, NetworkStats.TAG_NONE, rx, 0L, tx, 0L, 0);
+        stats.addValues(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, rx, 0L, tx, 0L, 0);
 
         expect(mMockNMService.getNetworkStatsSummary()).andReturn(stats).atLeastOnce();
     }
diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
index ffabb7b..6f85c7d 100644
--- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
+++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
@@ -16,8 +16,8 @@
 
 package android.telephony;
 
-import com.google.i18n.phonenumbers.AsYouTypeFormatter;
-import com.google.i18n.phonenumbers.PhoneNumberUtil;
+import com.android.i18n.phonenumbers.AsYouTypeFormatter;
+import com.android.i18n.phonenumbers.PhoneNumberUtil;
 
 import android.telephony.PhoneNumberUtils;
 import android.text.Editable;
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index ad2a887..51922da 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -16,10 +16,10 @@
 
 package android.telephony;
 
-import com.google.i18n.phonenumbers.NumberParseException;
-import com.google.i18n.phonenumbers.PhoneNumberUtil;
-import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
-import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
+import com.android.i18n.phonenumbers.NumberParseException;
+import com.android.i18n.phonenumbers.PhoneNumberUtil;
+import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
+import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber;
 
 import android.content.Context;
 import android.content.Intent;
@@ -122,6 +122,17 @@
         return c == PAUSE || c == WAIT;
     }
 
+    private static boolean
+    isPause (char c){
+        return c == 'p'||c == 'P';
+    }
+
+    private static boolean
+    isToneWait (char c){
+        return c == 'w'||c == 'W';
+    }
+
+
     /** Returns true if ch is not dialable or alpha char */
     private static boolean isSeparator(char ch) {
         return !isDialable(ch) && !(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z'));
@@ -278,6 +289,32 @@
         return ret.toString();
     }
 
+    /**
+     * Converts pause and tonewait pause characters
+     * to Android representation.
+     * RFC 3601 says pause is 'p' and tonewait is 'w'.
+     * @hide
+     */
+    public static String convertPreDial(String phoneNumber) {
+        if (phoneNumber == null) {
+            return null;
+        }
+        int len = phoneNumber.length();
+        StringBuilder ret = new StringBuilder(len);
+
+        for (int i = 0; i < len; i++) {
+            char c = phoneNumber.charAt(i);
+
+            if (isPause(c)) {
+                c = PAUSE;
+            } else if (isToneWait(c)) {
+                c = WAIT;
+            }
+            ret.append(c);
+        }
+        return ret.toString();
+    }
+
     /** or -1 if both are negative */
     static private int
     minPositive (int a, int b) {
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index 68e0045..25f8c8b 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -30,10 +30,10 @@
 import android.text.TextUtils;
 import android.util.Log;
 
-import com.google.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder;
-import com.google.i18n.phonenumbers.NumberParseException;
-import com.google.i18n.phonenumbers.PhoneNumberUtil;
-import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
+import com.android.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder;
+import com.android.i18n.phonenumbers.NumberParseException;
+import com.android.i18n.phonenumbers.PhoneNumberUtil;
+import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber;
 
 import java.util.Locale;
 
@@ -502,7 +502,7 @@
 
     /**
      * @return a geographical description string for the specified number.
-     * @see com.google.i18n.phonenumbers.PhoneNumberOfflineGeocoder
+     * @see com.android.i18n.phonenumbers.PhoneNumberOfflineGeocoder
      */
     private static String getGeoDescription(Context context, String number) {
         if (VDBG) Log.v(TAG, "getGeoDescription('" + number + "')...");
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index d84f1e5..501c219 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -37,6 +37,7 @@
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.pm.UserInfo;
+import android.content.pm.ManifestDigest;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
 import android.graphics.drawable.Drawable;
@@ -533,4 +534,22 @@
     public void updateUserFlags(int id, int flags) {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * @hide
+     */
+    @Override
+    public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer,
+            int flags, String installerPackageName, Uri verificationURI,
+            ManifestDigest manifestDigest) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @hide
+     */
+    @Override
+    public void verifyPendingInstall(int id, boolean verified, String failureMessage) {
+        throw new UnsupportedOperationException();
+    }
 }
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
index 97e2108..fcb57d9 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
@@ -17,6 +17,7 @@
 package com.android.test.hwui;
 
 import android.app.Activity;
+import android.graphics.Matrix;
 import android.graphics.SurfaceTexture;
 import android.hardware.Camera;
 import android.os.Bundle;
@@ -33,6 +34,7 @@
     private Camera mCamera;
     private TextureView mTextureView;
     private FrameLayout mContent;
+    private Matrix mMatrix = new Matrix();
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -82,8 +84,6 @@
         }
 
         mCamera.startPreview();
-
-        mTextureView.setCameraDistance(5000);
     }
 
     @Override
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 338cb4d..c20c716 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -27,6 +27,7 @@
 import android.net.NetworkInfo;
 import android.net.LinkProperties;
 import android.net.NetworkStateTracker;
+import android.net.wifi.p2p.WifiP2pManager;
 import android.os.Handler;
 import android.os.Message;
 
@@ -58,8 +59,8 @@
     private BroadcastReceiver mWifiStateReceiver;
     private WifiManager mWifiManager;
 
-    public WifiStateTracker() {
-        mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, NETWORKTYPE, "");
+    public WifiStateTracker(int netType, String networkName) {
+        mNetworkInfo = new NetworkInfo(netType, 0, networkName, "");
         mLinkProperties = new LinkProperties();
         mLinkCapabilities = new LinkCapabilities();
 
@@ -87,6 +88,7 @@
         IntentFilter filter = new IntentFilter();
         filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
         filter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION);
+        filter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
 
         mWifiStateReceiver = new WifiStateReceiver();
         mContext.registerReceiver(mWifiStateReceiver, filter);
@@ -104,7 +106,6 @@
 
     /**
      * Re-enable connectivity to a network after a {@link #teardown()}.
-     * TODO: do away with return value after making MobileDataStateTracker async
      */
     public boolean reconnect() {
         mTeardownRequested.set(false);
@@ -115,7 +116,6 @@
     /**
      * Turn the wireless radio off for a network.
      * @param turnOn {@code true} to turn the radio on, {@code false}
-     * TODO: do away with return value after making MobileDataStateTracker async
      */
     public boolean setRadio(boolean turnOn) {
         mWifiManager.setWifiEnabled(turnOn);
@@ -205,7 +205,21 @@
     private class WifiStateReceiver extends BroadcastReceiver {
         @Override
         public void onReceive(Context context, Intent intent) {
-           if (intent.getAction().equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
+
+            if (intent.getAction().equals(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION)) {
+                    mNetworkInfo = (NetworkInfo) intent.getParcelableExtra(
+                            WifiP2pManager.EXTRA_NETWORK_INFO);
+                    mLinkProperties = intent.getParcelableExtra(
+                            WifiP2pManager.EXTRA_LINK_PROPERTIES);
+                    if (mLinkProperties == null) {
+                        mLinkProperties = new LinkProperties();
+                    }
+                    mLinkCapabilities = intent.getParcelableExtra(
+                        WifiP2pManager.EXTRA_LINK_CAPABILITIES);
+                    if (mLinkCapabilities == null) {
+                        mLinkCapabilities = new LinkCapabilities();
+                    }
+             } else if (intent.getAction().equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
                 mNetworkInfo = (NetworkInfo) intent.getParcelableExtra(
                         WifiManager.EXTRA_NETWORK_INFO);
                 mLinkProperties = intent.getParcelableExtra(
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
index ea212ac..cc1f062 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
@@ -19,13 +19,17 @@
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
 import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.IConnectivityManager;
 import android.os.Binder;
 import android.os.IBinder;
 import android.os.Handler;
 import android.os.Message;
 import android.os.RemoteException;
+import android.os.ServiceManager;
 import android.os.WorkSource;
 import android.os.Messenger;
+import android.util.Log;
 
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.Protocol;
@@ -98,6 +102,22 @@
     public static final String EXTRA_NETWORK_INFO = "networkInfo";
 
     /**
+     * The lookup key for a {@link android.net.LinkProperties} object associated with the
+     * network. Retrieve with
+     * {@link android.content.Intent#getParcelableExtra(String)}.
+     * @hide
+     */
+    public static final String EXTRA_LINK_PROPERTIES = "linkProperties";
+
+    /**
+     * The lookup key for a {@link android.net.LinkCapabilities} object associated with the
+     * network. Retrieve with
+     * {@link android.content.Intent#getParcelableExtra(String)}.
+     * @hide
+     */
+    public static final String EXTRA_LINK_CAPABILITIES = "linkCapabilities";
+
+    /**
      * Broadcast intent action indicating that the available peer list has changed
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
@@ -115,9 +135,6 @@
 
     IWifiP2pManager mService;
 
-    /* For communication with WifiP2pService */
-    private AsyncChannel mAsyncChannel = new AsyncChannel();
-
     /* AsyncChannel notifications to apps */
     public static final int HANDLER_CONNECTION = AsyncChannel.CMD_CHANNEL_HALF_CONNECTED;
     public static final int HANDLER_DISCONNECTION = AsyncChannel.CMD_CHANNEL_DISCONNECTED;
@@ -194,18 +211,35 @@
     }
 
     /**
-     * Registers the application handler with the Wi-Fi framework.
-     * This function must be the first to be called before any p2p control
-     * or query operations can be performed.
+     * A channel that connects the application handler to the Wifi framework.
+     * All p2p operations are performed on a channel.
+     */
+    public class Channel {
+        Channel(AsyncChannel c) {
+            mAsyncChannel = c;
+        }
+        AsyncChannel mAsyncChannel;
+    }
+
+    /**
+     * Registers the application handler with the Wi-Fi framework. This function
+     * must be the first to be called before any p2p control or query operations can be performed.
      * @param srcContext is the context of the source
      * @param srcHandler is the handler on which the source receives messages
-     * @return {@code true} if the operation succeeded
+     * @return Channel instance that is necessary for performing p2p operations
      */
-    public boolean connectHandler(Context srcContext, Handler srcHandler) {
+    public Channel initialize(Context srcContext, Handler srcHandler) {
         Messenger messenger = getMessenger();
-        if (messenger == null) return false;
-        return mAsyncChannel.connectSync(srcContext, srcHandler, messenger)
-                == AsyncChannel.STATUS_SUCCESSFUL;
+        if (messenger == null) return null;
+
+        AsyncChannel asyncChannel = new AsyncChannel();
+        Channel c = new Channel(asyncChannel);
+        if (asyncChannel.connectSync(srcContext, srcHandler, messenger)
+                == AsyncChannel.STATUS_SUCCESSFUL) {
+            return c;
+        } else {
+            return null;
+        }
     }
 
     public boolean isP2pSupported() {
@@ -220,16 +254,18 @@
      * Sends in a request to the system to enable p2p. This will pop up a dialog
      * to the user and upon authorization will enable p2p.
      */
-    public void enableP2p() {
-        mAsyncChannel.sendMessage(ENABLE_P2P);
+    public void enableP2p(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(ENABLE_P2P);
     }
 
     /**
      * Sends in a request to the system to disable p2p. This will pop up a dialog
      * to the user and upon authorization will enable p2p.
      */
-    public void disableP2p() {
-        mAsyncChannel.sendMessage(DISABLE_P2P);
+    public void disableP2p(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(DISABLE_P2P);
     }
 
     /**
@@ -238,29 +274,33 @@
      * A dialog to the user is thrown to request his permission since it can
      * have a significant impact on power consumption
      */
-     public void setListenState(int timeout) {
-        mAsyncChannel.sendMessage(START_LISTEN_MODE, timeout);
+     public void setListenState(Channel c, int timeout) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(START_LISTEN_MODE, timeout);
      }
 
     /**
      * Initiates peer discovery
      */
-    public void discoverPeers() {
-        mAsyncChannel.sendMessage(DISCOVER_PEERS);
+    public void discoverPeers(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(DISCOVER_PEERS);
     }
 
     /**
      * Initiates peer discovery with a timeout
      */
-    public void discoverPeers(int timeout) {
-        mAsyncChannel.sendMessage(DISCOVER_PEERS, timeout);
+    public void discoverPeers(Channel c, int timeout) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(DISCOVER_PEERS, timeout);
     }
 
     /**
      * Cancel any existing peer discovery operation
      */
-    public void cancelPeerDiscovery() {
-        mAsyncChannel.sendMessage(CANCEL_DISCOVER_PEERS);
+    public void cancelPeerDiscovery(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(CANCEL_DISCOVER_PEERS);
     }
 
     /**
@@ -268,47 +308,53 @@
      *
      * @param peer Configuration described in a {@link WifiP2pConfig} object.
      */
-    public void connect(WifiP2pConfig config) {
-        mAsyncChannel.sendMessage(CONNECT, config);
+    public void connect(Channel c, WifiP2pConfig config) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(CONNECT, config);
     }
 
     /**
      * Cancel any ongoing negotiation or disconnect from an existing group
      */
-    public void disconnect() {
-        mAsyncChannel.sendMessage(CANCEL_CONNECT);
+    public void disconnect(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(CANCEL_CONNECT);
     }
 
     /**
      * Create a p2p group. This is essentially an access point that can accept
      * client connections.
      */
-    public void createGroup() {
-        mAsyncChannel.sendMessage(CREATE_GROUP);
+    public void createGroup(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(CREATE_GROUP);
     }
 
     /**
      * Remove the current group. This also removes the p2p interface created
      * during group formation.
      */
-    public void removeGroup() {
-        mAsyncChannel.sendMessage(REMOVE_GROUP);
+    public void removeGroup(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(REMOVE_GROUP);
     }
 
     /**
      * Request current p2p settings. This returns a RESPONSE_SETTINGS on the source
      * handler.
      */
-    public void requestP2pSettings() {
-        mAsyncChannel.sendMessage(REQUEST_SETTINGS);
+    public void requestP2pSettings(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(REQUEST_SETTINGS);
     }
 
     /**
      * Request the list of peers. This returns a RESPONSE_PEERS on the source
      * handler.
      */
-    public void requestPeers() {
-        mAsyncChannel.sendMessage(REQUEST_PEERS);
+    public void requestPeers(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(REQUEST_PEERS);
     }
 
     /**
@@ -322,8 +368,9 @@
      * Request device connection status. This returns a RESPONSE_CONNECTION_STATUS on
      * the source handler.
      */
-    public void requestConnectionStatus() {
-        mAsyncChannel.sendMessage(REQUEST_CONNECTION_STATUS);
+    public void requestConnectionStatus(Channel c) {
+        if (c == null) return;
+        c.mAsyncChannel.sendMessage(REQUEST_CONNECTION_STATUS);
     }
 
 
@@ -341,4 +388,38 @@
             return null;
         }
     }
+
+
+    /**
+     * Setup DNS connectivity on the current process to the connected Wi-Fi p2p peers
+     *
+     * @return -1 on failure
+     * @hide
+     */
+    public int startPeerCommunication() {
+        IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
+        IConnectivityManager cm = IConnectivityManager.Stub.asInterface(b);
+        try {
+            return cm.startUsingNetworkFeature(ConnectivityManager.TYPE_WIFI, "p2p", new Binder());
+        } catch (RemoteException e) {
+            return -1;
+        }
+    }
+
+    /**
+     * Tear down connectivity to the connected Wi-Fi p2p peers
+     *
+     * @return -1 on failure
+     * @hide
+     */
+    public int stopPeerCommunication() {
+        IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
+        IConnectivityManager cm = IConnectivityManager.Stub.asInterface(b);
+        try {
+            return cm.stopUsingNetworkFeature(ConnectivityManager.TYPE_WIFI, "p2p");
+        } catch (RemoteException e) {
+            return -1;
+        }
+    }
+
 }
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index 3678cfc..176191e 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -25,6 +25,15 @@
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
+import android.net.IConnectivityManager;
+import android.net.ConnectivityManager;
+import android.net.DhcpInfoInternal;
+import android.net.DhcpStateMachine;
+import android.net.InterfaceConfiguration;
+import android.net.LinkAddress;
+import android.net.LinkProperties;
+import android.net.NetworkInfo;
+import android.net.NetworkUtils;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiMonitor;
 import android.net.wifi.WifiNative;
@@ -47,16 +56,16 @@
 import android.view.WindowManager;
 import android.widget.EditText;
 
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.Collection;
-
 import com.android.internal.R;
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.Protocol;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
 
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.Collection;
+
 /**
  * WifiP2pService inclues a state machine to perform Wi-Fi p2p operations. Applications
  * communicate with this service to issue device discovery and connectivity requests
@@ -70,14 +79,16 @@
 public class WifiP2pService extends IWifiP2pManager.Stub {
     private static final String TAG = "WifiP2pService";
     private static final boolean DBG = true;
+    private static final String NETWORKTYPE = "WIFI_P2P";
 
     private Context mContext;
     private String mInterface;
 
     INetworkManagementService mNwService;
+    private DhcpStateMachine mDhcpStateMachine;
 
-    // Tracked to notify the user about wifi client/hotspot being shut down
-    // during p2p bring up
+    //Tracked to notify the user about wifi client/hotspot being shut down
+    //during p2p bring up
     private int mWifiState = WifiManager.WIFI_STATE_DISABLED;
     private int mWifiApState = WifiManager.WIFI_AP_STATE_DISABLED;
 
@@ -85,6 +96,9 @@
     private AsyncChannel mReplyChannel = new AsyncChannel();;
     private AsyncChannel mWifiChannel;
 
+    private static final int GROUP_NEGOTIATION_WAIT_TIME_MS = 60 * 1000;
+    private static int mGroupNegotiationTimeoutIndex = 0;
+
     private static final int BASE = Protocol.BASE_WIFI_P2P_SERVICE;
 
     /* Message sent to WifiStateMachine to indicate p2p enable is pending */
@@ -92,15 +106,24 @@
     /* Message sent to WifiStateMachine to indicate Wi-Fi client/hotspot operation can proceed */
     public static final int WIFI_ENABLE_PROCEED             =   BASE + 2;
 
+    /* Delayed message to timeout of group negotiation */
+    public static final int GROUP_NEGOTIATION_TIMED_OUT     =   BASE + 3;
+
     /* User accepted to disable Wi-Fi in order to enable p2p */
     private static final int WIFI_DISABLE_USER_ACCEPT       =   BASE + 11;
 
     private final boolean mP2pSupported;
 
+    private NetworkInfo mNetworkInfo;
+    private LinkProperties mLinkProperties;
+
     public WifiP2pService(Context context) {
         mContext = context;
 
         mInterface = SystemProperties.get("wifi.interface", "wlan0");
+        mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI_P2P, 0, NETWORKTYPE, "");
+        mLinkProperties = new LinkProperties();
+
         mP2pSupported = mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_wifi_p2p_support);
 
@@ -113,7 +136,7 @@
         filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
         mContext.registerReceiver(new WifiStateReceiver(), filter);
 
-   }
+    }
 
     public void connectivityServiceReady() {
         IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
@@ -300,6 +323,7 @@
                     break;
                 // Ignore
                 case WIFI_DISABLE_USER_ACCEPT:
+                case GROUP_NEGOTIATION_TIMED_OUT:
                     break;
                 default:
                     Slog.e(TAG, "Unhandled message " + message);
@@ -459,6 +483,10 @@
                             WifiP2pManager.ENABLE_P2P_SUCCEEDED);
                     transitionTo(mInactiveState);
                     break;
+                case WifiP2pManager.DISABLE_P2P:
+                    //TODO: fix
+                    WifiNative.killSupplicant();
+                    transitionTo(mP2pDisabledState);
                 default:
                     return NOT_HANDLED;
             }
@@ -471,6 +499,7 @@
         public void enter() {
             if (DBG) Slog.d(TAG, getName());
             sendP2pStateChangedBroadcast(true);
+            mNetworkInfo.setIsAvailable(true);
         }
 
         @Override
@@ -526,6 +555,7 @@
         @Override
         public void exit() {
             sendP2pStateChangedBroadcast(false);
+            mNetworkInfo.setIsAvailable(false);
         }
     }
 
@@ -550,6 +580,8 @@
                     WifiP2pGroup group = (WifiP2pGroup) message.obj;
                     notifyP2pInvitationReceived(group);
                     break;
+                case WifiP2pManager.REQUEST_PEERS:
+                    return NOT_HANDLED;
                default:
                     return NOT_HANDLED;
             }
@@ -558,8 +590,11 @@
     }
 
     class GroupNegotiationState extends State {
-        @Override public void enter() {
+        @Override
+        public void enter() {
             if (DBG) Slog.d(TAG, getName());
+            sendMessageDelayed(obtainMessage(GROUP_NEGOTIATION_TIMED_OUT,
+                    ++mGroupNegotiationTimeoutIndex, 0), GROUP_NEGOTIATION_WAIT_TIME_MS);
         }
 
         @Override
@@ -582,18 +617,29 @@
                 case WifiMonitor.P2P_GROUP_STARTED_EVENT:
                     mGroup = (WifiP2pGroup) message.obj;
                     if (DBG) Slog.d(TAG, getName() + " group started");
-                    // If this device is GO, do nothing since there is a follow up
-                    // AP_STA_CONNECTED event
-                    if (!mGroup.isGroupOwner()) {
+                    if (mGroup.isGroupOwner()) {
+                        startDhcpServer(mGroup.getInterface());
+                    } else {
+                        mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(mContext,
+                                P2pStateMachine.this, mGroup.getInterface());
+                        mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);
                         WifiP2pDevice groupOwner = mGroup.getOwner();
                         updateDeviceStatus(groupOwner.deviceAddress, Status.CONNECTED);
                         sendP2pPeersChangedBroadcast();
                     }
                     transitionTo(mGroupCreatedState);
                     break;
-               case WifiP2pManager.CANCEL_CONNECT:
+                case WifiP2pManager.CANCEL_CONNECT:
                     // TODO: fix
                     break;
+                case GROUP_NEGOTIATION_TIMED_OUT:
+                    if (mGroupNegotiationTimeoutIndex == message.arg1) {
+                        if (DBG) Slog.d(TAG, "Group negotiation timed out");
+                        updateDeviceStatus(mSavedConnectConfig.deviceAddress, Status.FAILED);
+                        mSavedConnectConfig = null;
+                        transitionTo(mInactiveState);
+                    }
+                    break;
                 default:
                     return NOT_HANDLED;
             }
@@ -605,6 +651,11 @@
         @Override
         public void enter() {
             if (DBG) Slog.d(TAG, getName());
+            mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, null, null);
+
+            if (mGroup.isGroupOwner()) {
+                sendP2pConnectionChangedBroadcast();
+            }
         }
 
         @Override
@@ -638,7 +689,16 @@
                     }
                     if (DBG) Slog.e(TAG, getName() + " ap sta disconnected");
                     break;
-                // Disconnect & remove group have same effect when connected
+                case DhcpStateMachine.CMD_POST_DHCP_ACTION:
+                    DhcpInfoInternal dhcpInfo = (DhcpInfoInternal) message.obj;
+                    if (DBG) Slog.d(TAG, "DhcpInfo: " + dhcpInfo);
+                    if (dhcpInfo != null) {
+                        mLinkProperties = dhcpInfo.makeLinkProperties();
+                        mLinkProperties.setInterfaceName(mGroup.getInterface());
+                        sendP2pConnectionChangedBroadcast();
+                    }
+                    break;
+                //disconnect & remove group have same effect when connected
                 case WifiP2pManager.CANCEL_CONNECT:
                 case WifiP2pManager.REMOVE_GROUP:
                     if (DBG) Slog.e(TAG, getName() + " remove group");
@@ -655,6 +715,16 @@
                             changed = true;
                         }
                     }
+
+                    if (mGroup.isGroupOwner()) {
+                        stopDhcpServer();
+                    } else {
+                        if (DBG) Slog.d(TAG, "stop DHCP client");
+                        mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_STOP_DHCP);
+                        mDhcpStateMachine.quit();
+                        mDhcpStateMachine = null;
+                    }
+
                     mGroup = null;
                     if (changed) sendP2pPeersChangedBroadcast();
                     transitionTo(mInactiveState);
@@ -663,10 +733,12 @@
                     WifiP2pDevice device = (WifiP2pDevice) message.obj;
                     if (device.equals(mGroup.getOwner())) {
                         Slog.d(TAG, "Lost the group owner, killing p2p connection");
-                        sendMessage(WifiP2pManager.REMOVE_GROUP);
+                        WifiNative.p2pFlush();
+                        WifiNative.p2pGroupRemove(mGroup.getInterface());
                     } else if (mGroup.removeClient(device) && mGroup.isClientListEmpty()) {
                         Slog.d(TAG, "Client list empty, killing p2p connection");
-                        sendMessage(WifiP2pManager.REMOVE_GROUP);
+                        WifiNative.p2pFlush();
+                        WifiNative.p2pGroupRemove(mGroup.getInterface());
                     }
                     return NOT_HANDLED; // Do the regular device lost handling
                 case WifiP2pManager.DISABLE_P2P:
@@ -705,6 +777,10 @@
             }
             return HANDLED;
         }
+
+        public void exit() {
+            mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
+        }
     }
 
     private void sendP2pStateChangedBroadcast(boolean enabled) {
@@ -726,6 +802,55 @@
         mContext.sendBroadcast(intent);
     }
 
+    private void sendP2pConnectionChangedBroadcast() {
+        if (DBG) Slog.d(TAG, "sending p2p connection changed broadcast");
+        Intent intent = new Intent(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
+        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
+                | Intent.FLAG_RECEIVER_REPLACE_PENDING);
+        intent.putExtra(WifiP2pManager.EXTRA_NETWORK_INFO, new NetworkInfo(mNetworkInfo));
+        intent.putExtra(WifiP2pManager.EXTRA_LINK_PROPERTIES,
+                new LinkProperties (mLinkProperties));
+        mContext.sendStickyBroadcast(intent);
+    }
+
+    private void startDhcpServer(String intf) {
+        /* Is chosen as a unique range to avoid conflict with
+           the range defined in Tethering.java */
+        String[] dhcp_range = {"192.168.49.2", "192.168.49.254"};
+        String serverAddress = "192.168.49.1";
+
+        mLinkProperties.clear();
+        mLinkProperties.setInterfaceName(mGroup.getInterface());
+
+        InterfaceConfiguration ifcg = null;
+        try {
+            ifcg = mNwService.getInterfaceConfig(intf);
+            ifcg.addr = new LinkAddress(NetworkUtils.numericToInetAddress(
+                        serverAddress), 24);
+            ifcg.interfaceFlags = "[up]";
+            mNwService.setInterfaceConfig(intf, ifcg);
+            /* This starts the dnsmasq server */
+            mNwService.startTethering(dhcp_range);
+        } catch (Exception e) {
+            Slog.e(TAG, "Error configuring interface " + intf + ", :" + e);
+            return;
+        }
+
+        mLinkProperties.addDns(NetworkUtils.numericToInetAddress(serverAddress));
+        Slog.d(TAG, "Started Dhcp server on " + intf);
+    }
+
+    private void stopDhcpServer() {
+        try {
+            mNwService.stopTethering();
+        } catch (Exception e) {
+            Slog.e(TAG, "Error stopping Dhcp server" + e);
+            return;
+        }
+
+        Slog.d(TAG, "Stopped Dhcp server");
+    }
+
     private void notifyP2pEnableFailure() {
         Resources r = Resources.getSystem();
         AlertDialog dialog = new AlertDialog.Builder(mContext)
@@ -760,11 +885,16 @@
             .setView(textEntryView)
             .setPositiveButton(r.getString(R.string.ok), new OnClickListener() {
                         public void onClick(DialogInterface dialog, int which) {
-                                if (DBG) Slog.d(TAG, getName() + " connect " + pin.getText());
+                            if (DBG) Slog.d(TAG, getName() + " connect " + pin.getText());
+
+                            if (pin.getVisibility() == View.GONE) {
+                                mSavedGoNegotiationConfig.wpsConfig.setup = Setup.PBC;
+                            } else {
                                 mSavedGoNegotiationConfig.wpsConfig.setup = Setup.KEYPAD;
                                 mSavedGoNegotiationConfig.wpsConfig.pin = pin.getText().toString();
-                                sendMessage(WifiP2pManager.CONNECT, mSavedGoNegotiationConfig);
-                                mSavedGoNegotiationConfig = null;
+                            }
+                            sendMessage(WifiP2pManager.CONNECT, mSavedGoNegotiationConfig);
+                            mSavedGoNegotiationConfig = null;
                         }
                     })
             .setNegativeButton(r.getString(R.string.cancel), new OnClickListener() {