Merge "Adding additional details to ssl_certificate view"
diff --git a/Android.mk b/Android.mk
index c2d4abc..9fbdde7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -450,7 +450,9 @@
 		-samplecode $(sample_dir)/VoicemailProviderDemo \
 		            resources/samples/VoicemailProviderDemo "Voicemail Provider Demo" \
 		-samplecode $(sample_dir)/XmlAdapters \
-		            resources/samples/XmlAdapters "XML Adapters"
+		            resources/samples/XmlAdapters "XML Adapters" \
+		-samplecode $(sample_dir)/TtsEngine \
+		            resources/samples/TtsEngine "Text To Speech Engine"
 
 ## SDK version identifiers used in the published docs
   # major[.minor] version for current SDK. (full releases only)
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 3bc1348..f799af3 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -275,6 +275,14 @@
          * @hide
          */
         public static final String MEDIA_SCANNER_NEW_OBJECT_ID = "media_scanner_new_object_id";
+
+        /**
+         * Non-zero if the media file is drm-protected
+         * <P>Type: INTEGER (boolean)</P>
+         * @hide
+         */
+        public static final String IS_DRM = "is_drm";
+
      }
 
     /**
@@ -1124,19 +1132,19 @@
             public static final String IS_PODCAST = "is_podcast";
 
             /**
-             * Non-zero id the audio file may be a ringtone
+             * Non-zero if the audio file may be a ringtone
              * <P>Type: INTEGER (boolean)</P>
              */
             public static final String IS_RINGTONE = "is_ringtone";
 
             /**
-             * Non-zero id the audio file may be an alarm
+             * Non-zero if the audio file may be an alarm
              * <P>Type: INTEGER (boolean)</P>
              */
             public static final String IS_ALARM = "is_alarm";
 
             /**
-             * Non-zero id the audio file may be a notification sound
+             * Non-zero if the audio file may be a notification sound
              * <P>Type: INTEGER (boolean)</P>
              */
             public static final String IS_NOTIFICATION = "is_notification";
diff --git a/core/java/android/speech/tts/AudioPlaybackHandler.java b/core/java/android/speech/tts/AudioPlaybackHandler.java
index a3686b7..c7603ee 100644
--- a/core/java/android/speech/tts/AudioPlaybackHandler.java
+++ b/core/java/android/speech/tts/AudioPlaybackHandler.java
@@ -74,6 +74,12 @@
         removeMessages(token);
 
         if (token.getType() == MessageParams.TYPE_SYNTHESIS) {
+            AudioTrack current = ((SynthesisMessageParams) token).getAudioTrack();
+            if (current != null) {
+                // Stop the current audio track if it's still playing.
+                // The audio track is thread safe in this regard.
+                current.stop();
+            }
             mQueue.add(new ListEntry(SYNTHESIS_DONE, token, HIGH_PRIORITY));
         } else  {
             final MessageParams current = getCurrentParams();
@@ -393,9 +399,10 @@
 
         try {
             if (audioTrack != null) {
-                audioTrack.flush();
-                audioTrack.stop();
                 if (DBG) Log.d(TAG, "Releasing audio track [" + audioTrack.hashCode() + "]");
+                // The last call to AudioTrack.write( ) will return only after
+                // all data from the audioTrack has been sent to the mixer, so
+                // it's safe to release at this point.
                 audioTrack.release();
             }
         } finally {
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index 79a5aff..5aa60f4 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -50,8 +50,10 @@
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Map;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.harmony.security.provider.cert.X509CertImpl;
 
@@ -86,7 +88,8 @@
     private boolean mIsMainFrame;
 
     // Attached Javascript interfaces
-    private Map<String, Object> mJSInterfaceMap;
+    private Map<String, Object> mJavaScriptObjects;
+    private Set<Object> mRemovedJavaScriptObjects;
 
     // Key store handler when Chromium HTTP stack is used.
     private KeyStoreHandler mKeyStoreHandler = null;
@@ -229,10 +232,11 @@
         }
         sConfigCallback.addHandler(this);
 
-        mJSInterfaceMap = javascriptInterfaces;
-        if (mJSInterfaceMap == null) {
-            mJSInterfaceMap = new HashMap<String, Object>();
+        mJavaScriptObjects = javascriptInterfaces;
+        if (mJavaScriptObjects == null) {
+            mJavaScriptObjects = new HashMap<String, Object>();
         }
+        mRemovedJavaScriptObjects = new HashSet<Object>();
 
         mSettings = settings;
         mContext = context;
@@ -241,7 +245,7 @@
         mWebViewCore = w;
 
         mSearchBox = new SearchBoxImpl(mWebViewCore, mCallbackProxy);
-        mJSInterfaceMap.put(SearchBoxImpl.JS_INTERFACE_NAME, mSearchBox);
+        mJavaScriptObjects.put(SearchBoxImpl.JS_INTERFACE_NAME, mSearchBox);
 
         AssetManager am = context.getAssets();
         nativeCreateFrame(w, am, proxy.getBackForwardList());
@@ -598,15 +602,16 @@
      * We should re-attach any attached js interfaces.
      */
     private void windowObjectCleared(int nativeFramePointer) {
-        Iterator<String> iter = mJSInterfaceMap.keySet().iterator();
+        Iterator<String> iter = mJavaScriptObjects.keySet().iterator();
         while (iter.hasNext())  {
             String interfaceName = iter.next();
-            Object object = mJSInterfaceMap.get(interfaceName);
+            Object object = mJavaScriptObjects.get(interfaceName);
             if (object != null) {
                 nativeAddJavascriptInterface(nativeFramePointer,
-                        mJSInterfaceMap.get(interfaceName), interfaceName);
+                        mJavaScriptObjects.get(interfaceName), interfaceName);
             }
         }
+        mRemovedJavaScriptObjects.clear();
 
         stringByEvaluatingJavaScriptFromString(SearchBoxImpl.JS_BRIDGE);
     }
@@ -632,12 +637,15 @@
         assert obj != null;
         removeJavascriptInterface(interfaceName);
 
-        mJSInterfaceMap.put(interfaceName, obj);
+        mJavaScriptObjects.put(interfaceName, obj);
     }
 
     public void removeJavascriptInterface(String interfaceName) {
-        if (mJSInterfaceMap.containsKey(interfaceName)) {
-            mJSInterfaceMap.remove(interfaceName);
+        // We keep a reference to the removed object because the native side holds only a weak
+        // reference and we need to allow the object to continue to be used until the page has been
+        // navigated.
+        if (mJavaScriptObjects.containsKey(interfaceName)) {
+            mRemovedJavaScriptObjects.add(mJavaScriptObjects.remove(interfaceName));
         }
     }
 
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 2fda7de..7ba86a5 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2013,13 +2013,18 @@
      * Note that content specified in this way can access local device files
      * (via 'file' scheme URLs) only if baseUrl specifies a scheme other than
      * 'http', 'https', 'ftp', 'ftps', 'about' or 'javascript'.
+     * <p>
+     * If the base URL uses the data scheme, this method is equivalent to
+     * calling {@link #loadData(String,String,String) loadData()} and the
+     * historyUrl is ignored.
      * @param baseUrl URL to use as the page's base URL. If null defaults to
-     *            "about:blank"
+     *            'about:blank'
      * @param data A String of data in the given encoding.
-     * @param mimeType The MIMEType of the data. i.e. text/html. If null,
-     *            defaults to "text/html"
-     * @param encoding The encoding of the data. i.e. utf-8, us-ascii
-     * @param historyUrl URL to use as the history entry.  Can be null.
+     * @param mimeType The MIMEType of the data, e.g. 'text/html'. If null,
+     *            defaults to 'text/html'.
+     * @param encoding The encoding of the data.
+     * @param historyUrl URL to use as the history entry, if null defaults to
+     *            'about:blank'.
      */
     public void loadDataWithBaseURL(String baseUrl, String data,
             String mimeType, String encoding, String historyUrl) {
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
index 7855cda..897a1c1 100644
--- a/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
index c062773..0c89f71 100644
--- a/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy.png b/core/res/res/drawable-hdpi/ic_menu_copy.png
new file mode 100644
index 0000000..5dcc3a3
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_menu_copy.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
index 852f146..d1e1337 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
index ad09b37..5d02660 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut.png b/core/res/res/drawable-hdpi/ic_menu_cut.png
new file mode 100644
index 0000000..03fac98
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_menu_cut.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
index 7716a94..bd28a859 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
index bea6db1..037c362 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_find_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_find_holo_dark.png
index b888202..b981a4d 100644
--- a/core/res/res/drawable-hdpi/ic_menu_find_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_find_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_find_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_find_holo_light.png
index b888202..efee6df 100644
--- a/core/res/res/drawable-hdpi/ic_menu_find_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_find_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow.png
new file mode 100644
index 0000000..33bb5e76
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
index 8563c1a8d..1e69eac 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
index 1cd2384..2f6accc 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste.png b/core/res/res/drawable-hdpi/ic_menu_paste.png
new file mode 100644
index 0000000..c24fd86
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_menu_paste.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
index 5579443..e9514b8 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
index 6674914..b02aa09 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_share_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_share_holo_dark.png
index 2837615..db011be 100644
--- a/core/res/res/drawable-hdpi/ic_menu_share_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_share_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_share_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_share_holo_light.png
index 2837615..d9a9a73 100644
--- a/core/res/res/drawable-hdpi/ic_menu_share_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_share_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
index ae3e6bf..df2d3d1 100644
--- a/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
index c61e3fa..b2aa9c2 100644
--- a/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy.png b/core/res/res/drawable-mdpi/ic_menu_copy.png
new file mode 100644
index 0000000..eee5540
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_menu_copy.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
index 35c3318..cb19fea 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
index 3b179d8..e353d46 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut.png b/core/res/res/drawable-mdpi/ic_menu_cut.png
new file mode 100644
index 0000000..865d1e0
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_menu_cut.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
index dfe8b4a..66a750d 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
index 748dc9b..e7e8c54 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_find_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_find_holo_dark.png
index 82dcba7..45f8fd3 100644
--- a/core/res/res/drawable-mdpi/ic_menu_find_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_find_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_find_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_find_holo_light.png
index 82dcba7..9033f1e 100644
--- a/core/res/res/drawable-mdpi/ic_menu_find_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_find_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow.png
new file mode 100644
index 0000000..e478922
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
index c369e6f..48d6c78 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
index a4df2bf..50ff8fc 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
index a7389c9..135ca6e 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
index 87e41ac..ccbf143 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste.png b/core/res/res/drawable-mdpi/ic_menu_paste.png
new file mode 100644
index 0000000..8c9916c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_menu_paste.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
index caec299..23f3a32 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
index 434f5d1..c9d571c 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_share_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_share_holo_dark.png
old mode 100755
new mode 100644
index d89ca5f..306cac8
--- a/core/res/res/drawable-mdpi/ic_menu_share_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_share_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_share_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_share_holo_light.png
old mode 100755
new mode 100644
index d89ca5f..cc081ad
--- a/core/res/res/drawable-mdpi/ic_menu_share_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_share_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-xhdpi/ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..8ded62f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_ab_back_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-xhdpi/ic_ab_back_holo_light.png
new file mode 100644
index 0000000..517e9f7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_ab_back_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_account_list.png b/core/res/res/drawable-xhdpi/ic_menu_account_list.png
new file mode 100644
index 0000000..ebe29b96
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_account_list.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_add.png b/core/res/res/drawable-xhdpi/ic_menu_add.png
new file mode 100644
index 0000000..7d498a9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_add.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_agenda.png b/core/res/res/drawable-xhdpi/ic_menu_agenda.png
new file mode 100644
index 0000000..25e9f11
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_agenda.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_allfriends.png b/core/res/res/drawable-xhdpi/ic_menu_allfriends.png
new file mode 100644
index 0000000..20994ed
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_allfriends.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_always_landscape_portrait.png b/core/res/res/drawable-xhdpi/ic_menu_always_landscape_portrait.png
new file mode 100644
index 0000000..96606de
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_always_landscape_portrait.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_archive.png b/core/res/res/drawable-xhdpi/ic_menu_archive.png
new file mode 100644
index 0000000..b1be9d5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_archive.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_attachment.png b/core/res/res/drawable-xhdpi/ic_menu_attachment.png
new file mode 100644
index 0000000..aa41bd6
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_attachment.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_back.png b/core/res/res/drawable-xhdpi/ic_menu_back.png
new file mode 100644
index 0000000..8ac4f64
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_back.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_block.png b/core/res/res/drawable-xhdpi/ic_menu_block.png
new file mode 100644
index 0000000..e672395
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_block.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_blocked_user.png b/core/res/res/drawable-xhdpi/ic_menu_blocked_user.png
new file mode 100644
index 0000000..53a279e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_blocked_user.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_btn_add.png b/core/res/res/drawable-xhdpi/ic_menu_btn_add.png
new file mode 100644
index 0000000..7d498a9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_btn_add.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_call.png b/core/res/res/drawable-xhdpi/ic_menu_call.png
new file mode 100644
index 0000000..703a76b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_call.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_camera.png b/core/res/res/drawable-xhdpi/ic_menu_camera.png
new file mode 100644
index 0000000..7875aa3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_camera.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cc.png b/core/res/res/drawable-xhdpi/ic_menu_cc.png
new file mode 100644
index 0000000..50d686a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_cc.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_chat_dashboard.png b/core/res/res/drawable-xhdpi/ic_menu_chat_dashboard.png
new file mode 100644
index 0000000..c0b238c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_chat_dashboard.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_clear_playlist.png b/core/res/res/drawable-xhdpi/ic_menu_clear_playlist.png
new file mode 100644
index 0000000..8981d6f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_close_clear_cancel.png b/core/res/res/drawable-xhdpi/ic_menu_close_clear_cancel.png
new file mode 100644
index 0000000..d743d75
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_close_clear_cancel.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_compass.png b/core/res/res/drawable-xhdpi/ic_menu_compass.png
new file mode 100644
index 0000000..1c2ad89
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_compass.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_compose.png b/core/res/res/drawable-xhdpi/ic_menu_compose.png
new file mode 100644
index 0000000..bef190e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_compose.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy.png b/core/res/res/drawable-xhdpi/ic_menu_copy.png
new file mode 100644
index 0000000..22761fc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
new file mode 100644
index 0000000..8014345
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
new file mode 100644
index 0000000..b5359a1
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_crop.png b/core/res/res/drawable-xhdpi/ic_menu_crop.png
new file mode 100644
index 0000000..d32daae
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_crop.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut.png b/core/res/res/drawable-xhdpi/ic_menu_cut.png
new file mode 100644
index 0000000..efefcde
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
new file mode 100644
index 0000000..180365f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
new file mode 100644
index 0000000..a31a06f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_day.png b/core/res/res/drawable-xhdpi/ic_menu_day.png
new file mode 100644
index 0000000..9eed1b2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_day.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_delete.png b/core/res/res/drawable-xhdpi/ic_menu_delete.png
new file mode 100644
index 0000000..65b9cae
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_directions.png b/core/res/res/drawable-xhdpi/ic_menu_directions.png
new file mode 100644
index 0000000..bdc0088
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_directions.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_edit.png b/core/res/res/drawable-xhdpi/ic_menu_edit.png
new file mode 100644
index 0000000..fcdd71e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_edit.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_emoticons.png b/core/res/res/drawable-xhdpi/ic_menu_emoticons.png
new file mode 100644
index 0000000..af730fa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_end_conversation.png b/core/res/res/drawable-xhdpi/ic_menu_end_conversation.png
new file mode 100644
index 0000000..ac76f3b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_end_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_find.png b/core/res/res/drawable-xhdpi/ic_menu_find.png
new file mode 100644
index 0000000..ccf2aab
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_find.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_find_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_find_holo_dark.png
new file mode 100644
index 0000000..3ede9e2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_find_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_find_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_find_holo_light.png
new file mode 100644
index 0000000..de20fa0
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_find_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_forward.png b/core/res/res/drawable-xhdpi/ic_menu_forward.png
new file mode 100644
index 0000000..6463e7a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_forward.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_friendslist.png b/core/res/res/drawable-xhdpi/ic_menu_friendslist.png
new file mode 100644
index 0000000..9200f87
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_friendslist.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_gallery.png b/core/res/res/drawable-xhdpi/ic_menu_gallery.png
new file mode 100644
index 0000000..6b21e22
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_gallery.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_goto.png b/core/res/res/drawable-xhdpi/ic_menu_goto.png
new file mode 100644
index 0000000..b925e69
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_goto.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_help.png b/core/res/res/drawable-xhdpi/ic_menu_help.png
new file mode 100644
index 0000000..128c7e8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_help.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_help_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_help_holo_light.png
new file mode 100644
index 0000000..b961de9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_help_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_home.png b/core/res/res/drawable-xhdpi/ic_menu_home.png
new file mode 100644
index 0000000..689f372
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_home.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_info_details.png b/core/res/res/drawable-xhdpi/ic_menu_info_details.png
new file mode 100644
index 0000000..24ea543
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_info_details.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_invite.png b/core/res/res/drawable-xhdpi/ic_menu_invite.png
new file mode 100644
index 0000000..d594607
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_invite.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_login.png b/core/res/res/drawable-xhdpi/ic_menu_login.png
new file mode 100644
index 0000000..5095ed9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_login.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_manage.png b/core/res/res/drawable-xhdpi/ic_menu_manage.png
new file mode 100644
index 0000000..d7436244
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_manage.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_mapmode.png b/core/res/res/drawable-xhdpi/ic_menu_mapmode.png
new file mode 100644
index 0000000..0b62d08
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_mark.png b/core/res/res/drawable-xhdpi/ic_menu_mark.png
new file mode 100644
index 0000000..a5de6fb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_mark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_month.png b/core/res/res/drawable-xhdpi/ic_menu_month.png
new file mode 100644
index 0000000..099263b
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_month.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_more.png b/core/res/res/drawable-xhdpi/ic_menu_more.png
new file mode 100644
index 0000000..c7a6538
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_more.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow.png
new file mode 100644
index 0000000..2998d65
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png
new file mode 100644
index 0000000..62659fa
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png
new file mode 100644
index 0000000..341edaf
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000..81306ca
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..1f46e7a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_my_calendar.png b/core/res/res/drawable-xhdpi/ic_menu_my_calendar.png
new file mode 100644
index 0000000..ca95b92
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_my_calendar.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_mylocation.png b/core/res/res/drawable-xhdpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..b0a76a2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_myplaces.png b/core/res/res/drawable-xhdpi/ic_menu_myplaces.png
new file mode 100644
index 0000000..205848e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_notifications.png b/core/res/res/drawable-xhdpi/ic_menu_notifications.png
new file mode 100644
index 0000000..db80b57
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_notifications.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste.png b/core/res/res/drawable-xhdpi/ic_menu_paste.png
new file mode 100644
index 0000000..a69f0eb
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
new file mode 100644
index 0000000..6e7273f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
new file mode 100644
index 0000000..b7eedd9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_play_clip.png b/core/res/res/drawable-xhdpi/ic_menu_play_clip.png
new file mode 100644
index 0000000..f680fce
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_play_clip.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_preferences.png b/core/res/res/drawable-xhdpi/ic_menu_preferences.png
new file mode 100644
index 0000000..02cfbad
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_preferences.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_recent_history.png b/core/res/res/drawable-xhdpi/ic_menu_recent_history.png
new file mode 100644
index 0000000..fc5e1fc
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_refresh.png b/core/res/res/drawable-xhdpi/ic_menu_refresh.png
new file mode 100644
index 0000000..9e9f10e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_refresh.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_report_image.png b/core/res/res/drawable-xhdpi/ic_menu_report_image.png
new file mode 100644
index 0000000..26f7ff4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_report_image.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_revert.png b/core/res/res/drawable-xhdpi/ic_menu_revert.png
new file mode 100644
index 0000000..19c580f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_revert.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_rotate.png b/core/res/res/drawable-xhdpi/ic_menu_rotate.png
new file mode 100644
index 0000000..98e19fe
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_rotate.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_save.png b/core/res/res/drawable-xhdpi/ic_menu_save.png
new file mode 100644
index 0000000..62a66d8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_save.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_search.png b/core/res/res/drawable-xhdpi/ic_menu_search.png
new file mode 100644
index 0000000..5c18f9e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_search.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_search_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_search_holo_dark.png
new file mode 100644
index 0000000..d49c7e2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_search_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_search_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_search_holo_light.png
new file mode 100644
index 0000000..578cb24
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_search_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
new file mode 100644
index 0000000..7125557
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
new file mode 100644
index 0000000..c7728d4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_send.png b/core/res/res/drawable-xhdpi/ic_menu_send.png
new file mode 100644
index 0000000..6e5ec78
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_send.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_set_as.png b/core/res/res/drawable-xhdpi/ic_menu_set_as.png
new file mode 100644
index 0000000..8689766
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_set_as.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_settings_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_settings_holo_light.png
new file mode 100644
index 0000000..aa33c38
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_settings_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_share.png b/core/res/res/drawable-xhdpi/ic_menu_share.png
new file mode 100644
index 0000000..fce1d35
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_share.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_share_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_share_holo_dark.png
new file mode 100644
index 0000000..af72732
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_share_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_share_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_share_holo_light.png
new file mode 100644
index 0000000..79c162f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_share_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_slideshow.png b/core/res/res/drawable-xhdpi/ic_menu_slideshow.png
new file mode 100644
index 0000000..8740f37
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_slideshow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_sort_alphabetically.png b/core/res/res/drawable-xhdpi/ic_menu_sort_alphabetically.png
new file mode 100644
index 0000000..5736ff8
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_sort_by_size.png b/core/res/res/drawable-xhdpi/ic_menu_sort_by_size.png
new file mode 100644
index 0000000..fe3836c
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_sort_by_size.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_star.png b/core/res/res/drawable-xhdpi/ic_menu_star.png
new file mode 100644
index 0000000..c051020
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_star.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_start_conversation.png b/core/res/res/drawable-xhdpi/ic_menu_start_conversation.png
new file mode 100644
index 0000000..d71ed174
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_stop.png b/core/res/res/drawable-xhdpi/ic_menu_stop.png
new file mode 100644
index 0000000..855af11
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_stop.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_today.png b/core/res/res/drawable-xhdpi/ic_menu_today.png
new file mode 100644
index 0000000..e9ebc5e
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_today.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_upload.png b/core/res/res/drawable-xhdpi/ic_menu_upload.png
new file mode 100644
index 0000000..94d1478
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_upload.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_upload_you_tube.png b/core/res/res/drawable-xhdpi/ic_menu_upload_you_tube.png
new file mode 100644
index 0000000..508c354
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_upload_you_tube.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_view.png b/core/res/res/drawable-xhdpi/ic_menu_view.png
new file mode 100644
index 0000000..e97c30df
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_view.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_week.png b/core/res/res/drawable-xhdpi/ic_menu_week.png
new file mode 100644
index 0000000..2c3e761
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_week.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_zoom.png b/core/res/res/drawable-xhdpi/ic_menu_zoom.png
new file mode 100644
index 0000000..858aef5
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_menu_zoom.png
Binary files differ
diff --git a/docs/html/guide/topics/usb/adk.jd b/docs/html/guide/topics/usb/adk.jd
index 2e172f5..b5a3f30 100644
--- a/docs/html/guide/topics/usb/adk.jd
+++ b/docs/html/guide/topics/usb/adk.jd
@@ -326,7 +326,7 @@
     <li>To open the firmware code (a sketch), click <strong>File &gt; Open</strong> and select
     <code>firmware/demokit/demokit.pde</code>.</li>
 
-    <li>Click <strong>Sketch &gt; Compile/Verify</strong> to ensure that the sketch has no
+    <li>Click <strong>Sketch &gt; Verify/Compile</strong> to ensure that the sketch has no
     errors.</li>
 
     <li>Select <strong>File &gt; Upload to I/O Board</strong>. When Arduino outputs <strong>Done
@@ -356,7 +356,8 @@
     <li>In the <strong>Project name:</strong> field, type DemoKit.</li>
 
     <li>Choose <strong>Create project from existing source</strong>, click <strong>Browse</strong>,
-    select the <code>app</code> directory, and click <strong>Finish</strong>.</li>
+    select the <code>app</code> directory, click <strong>Open</strong> to close that dialog and then
+    click <strong>Finish</strong>.</li>
 
     <li>For Build Target, select <strong>Google APIs</strong> (Platform 2.3.3, API Level 10).
 
diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js
index e8c9ae7..0fc10bf 100644
--- a/docs/html/resources/resources-data.js
+++ b/docs/html/resources/resources-data.js
@@ -726,6 +726,16 @@
       en: 'Binding data to views using XML Adapters examples.'
     }
   },
+  {
+    tags: ['sample', 'new', 'accessibility'],
+    path: 'samples/TtsEngine/index.html',
+    title: {
+      en: 'Text To Speech Engine'
+    },
+    description: {
+      en: 'An example Text To Speech engine written using the android text to speech engine API.'
+    }
+  },
 
 /////////////////
 /// TUTORIALS ///
diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h
index 28f305d..9aa6700 100644
--- a/include/media/mediametadataretriever.h
+++ b/include/media/mediametadataretriever.h
@@ -53,6 +53,7 @@
     METADATA_KEY_VIDEO_HEIGHT    = 19,
     METADATA_KEY_BITRATE         = 20,
     METADATA_KEY_TIMED_TEXT_LANGUAGES      = 21,
+    METADATA_KEY_IS_DRM          = 22,
 
     // Add more here...
 };
diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h
index a82106e..eb45237 100644
--- a/include/media/stagefright/MediaExtractor.h
+++ b/include/media/stagefright/MediaExtractor.h
@@ -56,7 +56,12 @@
     virtual uint32_t flags() const;
 
     // for DRM
-    virtual void setDrmFlag(bool flag) {};
+    virtual void setDrmFlag(bool flag) {
+        mIsDrm = flag;
+    };
+    virtual bool getDrmFlag() {
+        return mIsDrm;
+    }
     virtual char* getDrmTrackInfo(size_t trackID, int *len) {
         return NULL;
     }
@@ -66,6 +71,8 @@
     virtual ~MediaExtractor() {}
 
 private:
+    bool mIsDrm;
+
     MediaExtractor(const MediaExtractor &);
     MediaExtractor &operator=(const MediaExtractor &);
 };
diff --git a/include/surfaceflinger/IGraphicBufferAlloc.h b/include/surfaceflinger/IGraphicBufferAlloc.h
index e1b6b57..d3b2062 100644
--- a/include/surfaceflinger/IGraphicBufferAlloc.h
+++ b/include/surfaceflinger/IGraphicBufferAlloc.h
@@ -37,7 +37,7 @@
     /* Create a new GraphicBuffer for the client to use.
      */
     virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
-            PixelFormat format, uint32_t usage) = 0;
+            PixelFormat format, uint32_t usage, status_t* error) = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 0bd69cf..c8e9c04 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -133,13 +133,13 @@
 // Change the scheduling group of a particular thread.  The group
 // should be one of the ANDROID_TGROUP constants.  Returns BAD_VALUE if
 // grp is out of range, else another non-zero value with errno set if
-// the operation failed.
+// the operation failed.  Thread ID zero means current thread.
 extern int androidSetThreadSchedulingGroup(pid_t tid, int grp);
 
 // Change the priority AND scheduling group of a particular thread.  The priority
 // should be one of the ANDROID_PRIORITY constants.  Returns INVALID_OPERATION
 // if the priority set failed, else another value if just the group set failed;
-// in either case errno is set.
+// in either case errno is set.  Thread ID zero means current thread.
 extern int androidSetThreadPriority(pid_t tid, int prio);
 
 #ifdef __cplusplus
@@ -510,6 +510,10 @@
     // that case.
             status_t    requestExitAndWait();
 
+    // Wait until this object's thread exits. Returns immediately if not yet running.
+    // Do not call from this object's thread; will return WOULD_BLOCK in that case.
+            status_t    join();
+
 protected:
     // exitPending() returns true if requestExit() has been called.
             bool        exitPending() const;
diff --git a/libs/gui/IGraphicBufferAlloc.cpp b/libs/gui/IGraphicBufferAlloc.cpp
index 0cd51da..30f8d00 100644
--- a/libs/gui/IGraphicBufferAlloc.cpp
+++ b/libs/gui/IGraphicBufferAlloc.cpp
@@ -43,7 +43,7 @@
     }
 
     virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
-            PixelFormat format, uint32_t usage) {
+            PixelFormat format, uint32_t usage, status_t* error) {
         Parcel data, reply;
         data.writeInterfaceToken(IGraphicBufferAlloc::getInterfaceDescriptor());
         data.writeInt32(w);
@@ -52,14 +52,15 @@
         data.writeInt32(usage);
         remote()->transact(CREATE_GRAPHIC_BUFFER, data, &reply);
         sp<GraphicBuffer> graphicBuffer;
-        bool nonNull = (bool)reply.readInt32();
-        if (nonNull) {
+        status_t result = reply.readInt32();
+        if (result == NO_ERROR) {
             graphicBuffer = new GraphicBuffer();
             reply.read(*graphicBuffer);
             // reply.readStrongBinder();
             // here we don't even have to read the BufferReference from
             // the parcel, it'll die with the parcel.
         }
+        *error = result;
         return graphicBuffer;
     }
 };
@@ -91,8 +92,10 @@
             uint32_t h = data.readInt32();
             PixelFormat format = data.readInt32();
             uint32_t usage = data.readInt32();
-            sp<GraphicBuffer> result(createGraphicBuffer(w, h, format, usage));
-            reply->writeInt32(result != 0);
+            status_t error;
+            sp<GraphicBuffer> result =
+                    createGraphicBuffer(w, h, format, usage, &error);
+            reply->writeInt32(error);
             if (result != 0) {
                 reply->write(*result);
                 // We add a BufferReference to this parcel to make sure the
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 3bf6477..886a3fb 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -352,11 +352,13 @@
         ((uint32_t(buffer->usage) & usage) != usage))
     {
         usage |= GraphicBuffer::USAGE_HW_TEXTURE;
+        status_t error;
         sp<GraphicBuffer> graphicBuffer(
-                mGraphicBufferAlloc->createGraphicBuffer(w, h, format, usage));
+                mGraphicBufferAlloc->createGraphicBuffer(
+                        w, h, format, usage, &error));
         if (graphicBuffer == 0) {
             LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
-            return NO_MEMORY;
+            return error;
         }
         if (updateFormat) {
             mPixelFormat = format;
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index 450cdf1..ce587b3 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -31,13 +31,13 @@
         ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
 
         mSurfaceControl = mComposerClient->createSurface(
-                String8("Test Surface"), 0, 32, 32, PIXEL_FORMAT_RGB_888, 0);
+                String8("Test Surface"), 0, 32, 32, PIXEL_FORMAT_RGBA_8888, 0);
 
         ASSERT_TRUE(mSurfaceControl != NULL);
         ASSERT_TRUE(mSurfaceControl->isValid());
 
         SurfaceComposerClient::openGlobalTransaction();
-        ASSERT_EQ(NO_ERROR, mSurfaceControl->setLayer(30000));
+        ASSERT_EQ(NO_ERROR, mSurfaceControl->setLayer(0x7fffffff));
         ASSERT_EQ(NO_ERROR, mSurfaceControl->show());
         SurfaceComposerClient::closeGlobalTransaction();
 
@@ -84,7 +84,7 @@
     PixelFormat fmt=0;
     sp<ISurfaceComposer> sf(ComposerService::getComposerService());
     ASSERT_EQ(NO_ERROR, sf->captureScreen(0, &heap, &w, &h, &fmt, 64, 64, 0,
-            40000));
+            0x7fffffff));
     ASSERT_TRUE(heap != NULL);
 
     // Set the PROTECTED usage bit and verify that the screenshot fails.  Note
@@ -94,6 +94,18 @@
             GRALLOC_USAGE_PROTECTED));
     ASSERT_EQ(NO_ERROR, native_window_set_buffer_count(anw.get(), 3));
     ANativeWindowBuffer* buf = 0;
+
+    status_t err = anw->dequeueBuffer(anw.get(), &buf);
+    if (err) {
+        // we could fail if GRALLOC_USAGE_PROTECTED is not supported.
+        // that's okay as long as this is the reason for the failure.
+        // try again without the GRALLOC_USAGE_PROTECTED bit.
+        ASSERT_EQ(NO_ERROR, native_window_set_usage(anw.get(), 0));
+        ASSERT_EQ(NO_ERROR, anw->dequeueBuffer(anw.get(), &buf));
+        return;
+    }
+    ASSERT_EQ(NO_ERROR, anw->cancelBuffer(anw.get(), buf));
+
     for (int i = 0; i < 4; i++) {
         // Loop to make sure SurfaceFlinger has retired a protected buffer.
         ASSERT_EQ(NO_ERROR, anw->dequeueBuffer(anw.get(), &buf));
@@ -103,7 +115,7 @@
     heap = 0;
     w = h = fmt = 0;
     ASSERT_EQ(INVALID_OPERATION, sf->captureScreen(0, &heap, &w, &h, &fmt,
-            64, 64, 0, 40000));
+            64, 64, 0, 0x7fffffff));
     ASSERT_TRUE(heap == NULL);
 
     // XXX: This should not be needed, but it seems that the new buffers don't
@@ -126,7 +138,7 @@
     heap = 0;
     w = h = fmt = 0;
     ASSERT_EQ(NO_ERROR, sf->captureScreen(0, &heap, &w, &h, &fmt, 64, 64, 0,
-            40000));
+            0x7fffffff));
     ASSERT_TRUE(heap != NULL);
 }
 
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index 15bb1d2..50312e7 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -316,6 +316,10 @@
 #if defined(HAVE_PTHREADS)
     pthread_once(&gDoSchedulingGroupOnce, checkDoSchedulingGroup);
     if (gDoSchedulingGroup) {
+        // set_sched_policy does not support tid == 0
+        if (tid == 0) {
+            tid = androidGetTid();
+        }
         if (set_sched_policy(tid, (grp == ANDROID_TGROUP_BG_NONINTERACT) ?
                                           SP_BACKGROUND : SP_FOREGROUND)) {
             return PERMISSION_DENIED;
@@ -842,6 +846,25 @@
     return mStatus;
 }
 
+status_t Thread::join()
+{
+    Mutex::Autolock _l(mLock);
+    if (mThread == getThreadId()) {
+        LOGW(
+        "Thread (this=%p): don't call join() from this "
+        "Thread object's thread. It's a guaranteed deadlock!",
+        this);
+
+        return WOULD_BLOCK;
+    }
+
+    while (mRunning == true) {
+        mThreadExitedCondition.wait(mLock);
+    }
+
+    return mStatus;
+}
+
 bool Thread::exitPending() const
 {
     Mutex::Autolock _l(mLock);
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 7634c6c..6df2f73 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -214,7 +214,7 @@
         addFileType("PNG", FILE_TYPE_PNG, "image/png", MtpConstants.FORMAT_PNG);
         addFileType("BMP", FILE_TYPE_BMP, "image/x-ms-bmp", MtpConstants.FORMAT_BMP);
         addFileType("WBMP", FILE_TYPE_WBMP, "image/vnd.wap.wbmp");
-        addFileType("WEBP", FILE_TYPE_WBMP, "image/webp");
+        addFileType("WEBP", FILE_TYPE_WEBP, "image/webp");
  
         addFileType("M3U", FILE_TYPE_M3U, "audio/x-mpegurl", MtpConstants.FORMAT_M3U_PLAYLIST);
         addFileType("M3U", FILE_TYPE_M3U, "application/x-mpegurl", MtpConstants.FORMAT_M3U_PLAYLIST);
diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java
index 7ebedaf..10694c3 100644
--- a/media/java/android/media/MediaMetadataRetriever.java
+++ b/media/java/android/media/MediaMetadataRetriever.java
@@ -453,5 +453,10 @@
      * @hide
      */
     public static final int METADATA_KEY_TIMED_TEXT_LANGUAGES      = 21;
+    /**
+     * If this key exists the media is drm-protected.
+     * @hide
+     */
+    public static final int METADATA_KEY_IS_DRM          = 22;
     // Add more here...
 }
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 790eaa3..c55338a 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -422,6 +422,7 @@
         private long mFileSize;
         private String mWriter;
         private int mCompilation;
+        private boolean mIsDrm;
         private boolean mNoMedia;   // flag to suppress file from appearing in media tables
 
         public FileCacheEntry beginFile(String path, String mimeType, long lastModified,
@@ -497,6 +498,7 @@
             mLastModified = lastModified;
             mWriter = null;
             mCompilation = 0;
+            mIsDrm = false;
 
             return entry;
         }
@@ -599,6 +601,8 @@
                 mWriter = value.trim();
             } else if (name.equalsIgnoreCase("compilation")) {
                 mCompilation = parseSubstring(value, 0, 0);
+            } else if (name.equalsIgnoreCase("isdrm")) {
+                mIsDrm = (parseSubstring(value, 0, 0) == 1);
             }
         }
 
@@ -671,6 +675,7 @@
             map.put(MediaStore.MediaColumns.DATE_MODIFIED, mLastModified);
             map.put(MediaStore.MediaColumns.SIZE, mFileSize);
             map.put(MediaStore.MediaColumns.MIME_TYPE, mMimeType);
+            map.put(MediaStore.MediaColumns.IS_DRM, mIsDrm);
 
             if (!mNoMedia) {
                 if (MediaFile.isVideoFileType(mFileType)) {
diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java
index 8481410..9c0819f 100644
--- a/media/java/android/media/RingtoneManager.java
+++ b/media/java/android/media/RingtoneManager.java
@@ -487,7 +487,7 @@
     private Cursor getInternalRingtones() {
         return query(
                 MediaStore.Audio.Media.INTERNAL_CONTENT_URI, INTERNAL_COLUMNS,
-                constructBooleanTrueWhereClause(mFilterColumns),
+                constructBooleanTrueWhereClause(mFilterColumns, mIncludeDrm),
                 null, MediaStore.Audio.Media.DEFAULT_SORT_ORDER);
     }
     
@@ -506,7 +506,7 @@
                     status.equals(Environment.MEDIA_MOUNTED_READ_ONLY))
                 ? query(
                     MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, MEDIA_COLUMNS,
-                    constructBooleanTrueWhereClause(mFilterColumns), null,
+                    constructBooleanTrueWhereClause(mFilterColumns, mIncludeDrm), null,
                     MediaStore.Audio.Media.DEFAULT_SORT_ORDER)
                 : null;
     }
@@ -536,11 +536,13 @@
      * @param columns The columns that must be true.
      * @return The where clause.
      */
-    private static String constructBooleanTrueWhereClause(List<String> columns) {
+    private static String constructBooleanTrueWhereClause(List<String> columns, boolean includeDrm) {
         
         if (columns == null) return null;
         
         StringBuilder sb = new StringBuilder();
+        sb.append("(");
+
         for (int i = columns.size() - 1; i >= 0; i--) {
             sb.append(columns.get(i)).append("=1 or ");
         }
@@ -549,7 +551,18 @@
             // Remove last ' or '
             sb.setLength(sb.length() - 4);
         }
-        
+
+        sb.append(")");
+
+        if (!includeDrm) {
+            // If not DRM files should be shown, the where clause
+            // will be something like "(is_notification=1) and is_drm=0"
+            sb.append(" and ");
+            sb.append(MediaStore.MediaColumns.IS_DRM);
+            sb.append("=0");
+        }
+
+
         return sb.toString();
     }
     
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 5582f92..73a05a5 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -387,10 +387,6 @@
     return mInitCheck;
 }
 
-void MPEG4Extractor::setDrmFlag(bool flag) {
-    mIsDrm = flag;
-}
-
 char* MPEG4Extractor::getDrmTrackInfo(size_t trackID, int *len) {
     if (mFirstSINF == NULL) {
         return NULL;
diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index af0131e..a8023df 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -116,8 +116,13 @@
     } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC_ADTS)) {
         ret = new AACExtractor(source);
     }
-    if (ret != NULL && isDrm) {
-        ret->getMetaData()->setInt32(kKeyIsDRM, 1);
+
+    if (ret != NULL) {
+       if (isDrm) {
+           ret->setDrmFlag(true);
+       } else {
+           ret->setDrmFlag(false);
+       }
     }
 
     return ret;
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index f82ff32..89faff7 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -158,6 +158,7 @@
                 { "duration", METADATA_KEY_DURATION },
                 { "writer", METADATA_KEY_WRITER },
                 { "compilation", METADATA_KEY_COMPILATION },
+                { "isdrm", METADATA_KEY_IS_DRM },
             };
             static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
 
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index de3957b..778c0b5 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -530,6 +530,11 @@
             }
         }
     }
+
+    // To check whether the media file is drm-protected
+    if (mExtractor->getDrmFlag()) {
+        mMetaData.add(METADATA_KEY_IS_DRM, String8("1"));
+    }
 }
 
 }  // namespace android
diff --git a/media/libstagefright/include/MPEG4Extractor.h b/media/libstagefright/include/MPEG4Extractor.h
index 3bd4c7e..eae62c6 100644
--- a/media/libstagefright/include/MPEG4Extractor.h
+++ b/media/libstagefright/include/MPEG4Extractor.h
@@ -40,7 +40,6 @@
     virtual sp<MetaData> getMetaData();
 
     // for DRM
-    virtual void setDrmFlag(bool flag);
     virtual char* getDrmTrackInfo(size_t trackID, int *len);
 
 protected:
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index f42cbbf..26ea225 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -30,10 +30,6 @@
         <service android:name=".screenshot.TakeScreenshotService"
             android:exported="false" />
 
-        <activity android:name=".usb.UsbPreferenceActivity"
-             android:theme="@*android:style/Theme.Holo.Dialog.Alert"
-             android:excludeFromRecents="true">
-        </activity>
         <activity android:name=".usb.UsbStorageActivity"
                 android:excludeFromRecents="true">
         </activity>
diff --git a/packages/SystemUI/res/layout/usb_preference_buttons.xml b/packages/SystemUI/res/layout/usb_preference_buttons.xml
deleted file mode 100644
index babe07e..0000000
--- a/packages/SystemUI/res/layout/usb_preference_buttons.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<!-- Check box that is displayed in the activity resolver UI for the user
-     to make their selection the preferred activity. -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingLeft="14dip"
-    android:paddingRight="15dip"
-    android:orientation="vertical">
-
-    <Button
-        android:id="@+id/mtp_ptp_button"
-        android:text="@string/use_ptp_button_title"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:focusable="true"
-        android:clickable="true" />
-
-    <Button
-        android:id="@+id/installer_cd_button"
-        android:text="@string/installer_cd_button_title"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:focusable="true"
-        android:clickable="true" />
-
-</LinearLayout>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 70f9b75..882455e 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -157,15 +157,6 @@
     <!-- Compatibility mode help screen: body text. [CHAR LIMIT=150] -->
     <string name="compat_mode_help_body">When an app was designed for a smaller screen, a zoom control will appear by the clock.</string>
 
-    <!-- Title for the USB function chooser in UsbPreferenceActivity. [CHAR LIMIT=30] -->
-    <string name="usb_preference_title">USB file transfer options</string>
-    <!-- Label for the MTP USB function in UsbPreferenceActivity. [CHAR LIMIT=50] -->
-    <string name="use_mtp_button_title">Mount as a media player (MTP)</string>
-    <!-- Label for the PTP USB function in UsbPreferenceActivity. [CHAR LIMIT=50] -->
-    <string name="use_ptp_button_title">Mount as a camera (PTP)</string>
-    <!-- Label for the installer CD image option in UsbPreferenceActivity. [CHAR LIMIT=50] -->
-    <string name="installer_cd_button_title">Install Android File Transfer application for Mac</string>
-
     <!-- toast message displayed when a screenshot is saved to the Gallery. -->
     <string name="screenshot_saving_toast">Screenshot saved to Gallery</string>
     <!-- toast message displayed when we fail to take a screenshot. -->
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java
deleted file mode 100644
index 60906a1..0000000
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.systemui.usb;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.hardware.usb.UsbManager;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.util.Log;
-import android.widget.Button;
-
-import java.io.File;
-
-import com.android.systemui.R;
-
-public class UsbPreferenceActivity extends Activity implements View.OnClickListener  {
-
-    private static final String TAG = "UsbPreferenceActivity";
-
-    private UsbManager mUsbManager;
-    private String mCurrentFunction;
-    private String[] mFunctions;
-    private String mInstallerImagePath;
-    private AlertDialog mDialog;
-    private Button mMtpPtpButton;
-    private Button mInstallerCdButton;
-    private boolean mPtpActive;
-
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE);
-
-        AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
-        dialogBuilder.setTitle(getString(R.string.usb_preference_title));
-
-        LayoutInflater inflater = (LayoutInflater)getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        View buttonView = inflater.inflate(R.layout.usb_preference_buttons, null);
-        dialogBuilder.setView(buttonView);
-        mMtpPtpButton = (Button)buttonView.findViewById(R.id.mtp_ptp_button);
-        mInstallerCdButton = (Button)buttonView.findViewById(R.id.installer_cd_button);
-        mMtpPtpButton.setOnClickListener(this);
-        mInstallerCdButton.setOnClickListener(this);
-
-        mPtpActive = mUsbManager.isFunctionEnabled(UsbManager.USB_FUNCTION_PTP);
-        if (mPtpActive) {
-            mMtpPtpButton.setText(R.string.use_mtp_button_title);
-        }
-
-        mInstallerImagePath = getString(com.android.internal.R.string.config_isoImagePath);
-        if (!(new File(mInstallerImagePath)).exists()) {
-            mInstallerCdButton.setVisibility(View.GONE);
-        }
-
-        mDialog = dialogBuilder.show();
-    }
-
-    public void onClick(View v) {
-        if (v.equals(mMtpPtpButton)) {
-            if (mPtpActive) {
-                mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MTP, true);
-            } else {
-                mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_PTP, true);
-            }
-        } else if (v.equals(mInstallerCdButton)) {
-            // installer CD is never default
-            mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MASS_STORAGE, false);
-            mUsbManager.setMassStorageBackingFile(mInstallerImagePath);
-        }
-
-        if (mDialog != null) {
-            mDialog.dismiss();
-        }
-        finish();

-    }
-}
diff --git a/services/java/com/android/server/usb/UsbDeviceManager.java b/services/java/com/android/server/usb/UsbDeviceManager.java
index 13a76b3..c157cf1 100644
--- a/services/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/java/com/android/server/usb/UsbDeviceManager.java
@@ -530,11 +530,12 @@
                     notification.sound = null;
                     notification.vibrate = null;
 
-                    Intent intent = new Intent();
+                    Intent intent = new Intent(
+                            Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
                     intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
                             Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
-                    intent.setClassName("com.android.systemui",
-                            "com.android.systemui.usb.UsbPreferenceActivity");
+                    intent.setComponent(new ComponentName("com.android.settings",
+                            "com.android.settings.UsbSettings"));
                     PendingIntent pi = PendingIntent.getActivity(mContext, 0,
                             intent, 0);
                     notification.setLatestEventInfo(mContext, title, message, pi);
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index a774841..33125c4 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -103,6 +103,11 @@
 {
     mNativeWindow = new FramebufferNativeWindow();
     framebuffer_device_t const * fbDev = mNativeWindow->getDevice();
+    if (!fbDev) {
+        LOGE("Display subsystem failed to initialize. check logs. exiting...");
+        exit(0);
+    }
+
     mDpiX = mNativeWindow->xdpi;
     mDpiY = mNativeWindow->ydpi;
     mRefreshRate = fbDev->fps;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 685613e..cccab4a 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -163,9 +163,34 @@
     const nsecs_t duration = now - mBootTime;
     LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );
     mBootFinished = true;
+
+    // wait patiently for the window manager death
+    const String16 name("window");
+    sp<IBinder> window(defaultServiceManager()->getService(name));
+    if (window != 0) {
+        window->linkToDeath(this);
+    }
+
+    // stop boot animation
     property_set("ctl.stop", "bootanim");
 }
 
+void SurfaceFlinger::binderDied(const wp<IBinder>& who)
+{
+    // the window manager died on us. prepare its eulogy.
+
+    // unfreeze the screen in case it was... frozen
+    mFreezeDisplayTime = 0;
+    mFreezeCount = 0;
+    mFreezeDisplay = false;
+
+    // reset screen orientation
+    setOrientation(0, eOrientationDefault, 0);
+
+    // restart the boot-animation
+    property_set("ctl.start", "bootanim");
+}
+
 void SurfaceFlinger::onFirstRef()
 {
     run("SurfaceFlinger", PRIORITY_URGENT_DISPLAY);
@@ -2470,11 +2495,14 @@
 GraphicBufferAlloc::~GraphicBufferAlloc() {}
 
 sp<GraphicBuffer> GraphicBufferAlloc::createGraphicBuffer(uint32_t w, uint32_t h,
-        PixelFormat format, uint32_t usage) {
+        PixelFormat format, uint32_t usage, status_t* error) {
     sp<GraphicBuffer> graphicBuffer(new GraphicBuffer(w, h, format, usage));
     status_t err = graphicBuffer->initCheck();
+    *error = err;
     if (err != 0 || graphicBuffer->handle == 0) {
-        GraphicBuffer::dumpAllocationsToSystemLog();
+        if (err == NO_MEMORY) {
+            GraphicBuffer::dumpAllocationsToSystemLog();
+        }
         LOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) "
              "failed (%s), handle=%p",
                 w, h, strerror(-err), graphicBuffer->handle);
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index b49fa36..15661f0 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -96,7 +96,7 @@
     GraphicBufferAlloc();
     virtual ~GraphicBufferAlloc();
     virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
-        PixelFormat format, uint32_t usage);
+        PixelFormat format, uint32_t usage, status_t* error);
 };
 
 // ---------------------------------------------------------------------------
@@ -147,6 +147,7 @@
 class SurfaceFlinger :
         public BinderService<SurfaceFlinger>,
         public BnSurfaceComposer,
+        public IBinder::DeathRecipient,
         protected Thread
 {
 public:
@@ -193,6 +194,10 @@
     sp<Layer> getLayer(const sp<ISurface>& sur) const;
 
 private:
+    // DeathRecipient interface
+    virtual void binderDied(const wp<IBinder>& who);
+
+private:
     friend class Client;
     friend class LayerBase;
     friend class LayerBaseClient;