Merge "Fix ratingBarStyleSmall style in Holo theme."
diff --git a/core/java/android/nfc/NdefTag.java b/core/java/android/nfc/NdefTag.java
index d8681dc..0626edb 100644
--- a/core/java/android/nfc/NdefTag.java
+++ b/core/java/android/nfc/NdefTag.java
@@ -205,6 +205,7 @@
         dest.writeStringArray(mNdefTargets);
         dest.writeInt(mMessages.length);
         for (NdefMessage[] ms : mMessages) {
+            dest.writeInt(ms.length);
             dest.writeTypedArray(ms, flags);
         }
     }
diff --git a/core/java/android/nfc/RawTagConnection.java b/core/java/android/nfc/RawTagConnection.java
index cf8283b..8442893 100644
--- a/core/java/android/nfc/RawTagConnection.java
+++ b/core/java/android/nfc/RawTagConnection.java
@@ -60,7 +60,6 @@
 
         mService = service;
         mTagService = service.getNfcTagInterface();
-        mService.openTagConnection(tag);  // TODO(nxp): don't connect until connect()
         mTag = tag;
         mSelectedTarget = target;
     }
diff --git a/core/java/android/nfc/Tag.java b/core/java/android/nfc/Tag.java
index f9205a6..dc6e798 100644
--- a/core/java/android/nfc/Tag.java
+++ b/core/java/android/nfc/Tag.java
@@ -197,7 +197,7 @@
     /*package*/ static byte[] readBytesWithNull(Parcel in) {
         int len = in.readInt();
         byte[] result = null;
-        if (len > 0) {
+        if (len >= 0) {
             result = new byte[len];
             in.readByteArray(result);
         }
diff --git a/core/res/res/menu/webview_copy.xml b/core/res/res/menu/webview_copy.xml
index ed223e7..b28c1c1 100644
--- a/core/res/res/menu/webview_copy.xml
+++ b/core/res/res/menu/webview_copy.xml
@@ -17,19 +17,22 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:id="@+id/copy"
         android:icon="?android:attr/actionModeCopyDrawable"
-        android:showAsAction="always"
+        android:title="@string/copy"
+        android:showAsAction="always|withText"
         />
     <item android:id="@+id/share"
         android:icon="@drawable/ic_menu_share"
-        android:showAsAction="always"
+        android:title="@string/share"
+        android:showAsAction="always|withText"
         />
     <item android:id="@+id/select_all"
-        android:icon="@drawable/ic_menu_select_all"
-        android:showAsAction="always"
+        android:title="@string/selectAll"
+        android:showAsAction="always|withText"
         />
     <item android:id="@+id/find"
         android:icon="@drawable/ic_menu_find"
-        android:showAsAction="always"
+        android:title="@string/find"
+        android:showAsAction="always|withText"
         />
 </menu>
 
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index edb0819..d5ea09e 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2415,4 +2415,10 @@
     <!-- Text for message for an unknown external media state [CHAR LIMIT=NONE] -->
     <string name="media_unknown_state">External media in unknown state.</string>
 
+    <!-- Text for WebView's text selection Action Mode -->
+    <!-- ActionBar action to share the current selection [CHAR LIMIT=10] -->
+    <string name="share">Share</string>
+    <!-- ActionBar action to use the current selection to open the Find on page functionality [CHAR LIMIT=10]-->
+    <string name="find">Find</string>
+
 </resources>