Merge "Import translations. DO NOT MERGE" into nyc-dev
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 2f835fe..d74558f 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -288,9 +288,15 @@
             Intent intent = PhoneAccountSettingsFragment.buildPhoneAccountConfigureIntent(
                     this, simCallManager);
             if (intent != null) {
-                wifiCallingSettings.setTitle(R.string.wifi_calling);
-                wifiCallingSettings.setSummary(null);
-                wifiCallingSettings.setIntent(intent);
+                PackageManager pm = mPhone.getContext().getPackageManager();
+                List<ResolveInfo> resolutions = pm.queryIntentActivities(intent, 0);
+                if (!resolutions.isEmpty()) {
+                    wifiCallingSettings.setTitle(resolutions.get(0).loadLabel(pm));
+                    wifiCallingSettings.setSummary(null);
+                    wifiCallingSettings.setIntent(intent);
+                } else {
+                    prefSet.removePreference(wifiCallingSettings);
+                }
             } else {
                 prefSet.removePreference(wifiCallingSettings);
             }
diff --git a/src/com/android/phone/common/mail/store/ImapFolder.java b/src/com/android/phone/common/mail/store/ImapFolder.java
index 90c552d..13c7424 100644
--- a/src/com/android/phone/common/mail/store/ImapFolder.java
+++ b/src/com/android/phone/common/mail/store/ImapFolder.java
@@ -15,6 +15,7 @@
  */
 package com.android.phone.common.mail.store;
 
+import android.annotation.Nullable;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
@@ -213,7 +214,7 @@
         }
     }
 
-
+    @Nullable
     public Message getMessage(String uid) throws MessagingException {
         checkOpen();
 
@@ -223,6 +224,7 @@
                 return new ImapMessage(uid, this);
             }
         }
+        LogUtils.e(TAG, "UID " + uid + " not found on server");
         return null;
     }
 
diff --git a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java b/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
index b7abb18..2c10377 100644
--- a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
+++ b/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
@@ -291,14 +291,16 @@
     }
 
     public boolean fetchVoicemailPayload(VoicemailFetchedCallback callback, final String uid) {
-        Message message;
         try {
             mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
             if (mFolder == null) {
                 // This means we were unable to successfully open the folder.
                 return false;
             }
-            message = mFolder.getMessage(uid);
+            Message message = mFolder.getMessage(uid);
+            if (message == null) {
+                return false;
+            }
             VoicemailPayload voicemailPayload = fetchVoicemailPayload(message);
 
             if (voicemailPayload == null) {
@@ -341,6 +343,9 @@
             }
 
             Message message = mFolder.getMessage(uid);
+            if (message == null) {
+                return false;
+            }
 
             MessageStructureWrapper messageStructureWrapper = fetchMessageStructure(message);
             if (messageStructureWrapper != null) {
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 9a5d708..0cc5d27 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -506,6 +506,22 @@
         }
     }
 
+    /**
+     * Handles requests to pull an external call.
+     */
+    @Override
+    public void onPullExternalCall() {
+        if ((getConnectionProperties() & Connection.PROPERTY_IS_EXTERNAL_CALL) !=
+                Connection.PROPERTY_IS_EXTERNAL_CALL) {
+            Log.w(this, "onPullExternalCall - cannot pull non-external call");
+            return;
+        }
+
+        if (mOriginalConnection != null) {
+            mOriginalConnection.pullExternalCall();
+        }
+    }
+
     public void performHold() {
         Log.v(this, "performHold");
         // TODO: Can dialing calls be put on hold as well since they take up the