Snap for 8303596 from 80eadbe32cc506c1992af0cee28321a7de8f221e to mainline-sdkext-release

Change-Id: Ia1bfc3a723d2d8f2cc21df685c59065208dc2117
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index d78bce9..5743e0d 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -50,8 +50,8 @@
     <string name="outgoing_call_not_allowed_no_permission" msgid="8590468836581488679">"このアプリは、電話権限がないため発信できません。"</string>
     <string name="outgoing_call_error_no_phone_number_supplied" msgid="7665135102566099778">"発信するには、有効な番号を入力してください。"</string>
     <string name="duplicate_video_call_not_allowed" msgid="5754746140185781159">"通話は現在追加できません。"</string>
-    <string name="no_vm_number" msgid="2179959110602180844">"ボイスメール番号がありません"</string>
-    <string name="no_vm_number_msg" msgid="1339245731058529388">"SIMカードにボイスメールの番号がありません。"</string>
+    <string name="no_vm_number" msgid="2179959110602180844">"留守番電話の番号がありません"</string>
+    <string name="no_vm_number_msg" msgid="1339245731058529388">"SIMカードに留守番電話の番号がありません。"</string>
     <string name="add_vm_number_str" msgid="5179510133063168998">"番号を追加"</string>
     <string name="change_default_dialer_dialog_title" msgid="5861469279421508060">"<xliff:g id="NEW_APP">%s</xliff:g> をデフォルトの電話アプリにしますか?"</string>
     <string name="change_default_dialer_dialog_affirmative" msgid="8604665314757739550">"デフォルトに設定"</string>
diff --git a/src/com/android/server/telecom/ServiceBinder.java b/src/com/android/server/telecom/ServiceBinder.java
index aa2e2a2..7274993 100644
--- a/src/com/android/server/telecom/ServiceBinder.java
+++ b/src/com/android/server/telecom/ServiceBinder.java
@@ -150,7 +150,6 @@
                     Log.i(this, "Service bound %s", componentName);
 
                     Log.addEvent(mCall, LogUtils.Events.CS_BOUND, componentName);
-                    mCall = null;
 
                     // Unbind request was queued so unbind immediately.
                     if (mIsBindingAborted) {
@@ -192,6 +191,30 @@
                 Log.endSession();
             }
         }
+
+        /**
+         * Handles the case where the {@link ConnectionService} we bound to returned a null binding.
+         * We want to unbind from the service and cleanup and call resources at this time.
+         * @param componentName The component of the {@link ConnectionService}.
+         */
+        @Override
+        public void onNullBinding(ComponentName componentName) {
+            try {
+                Log.startSession("SBC.oNB");
+                synchronized (mLock) {
+                    Log.w(this, "Null binding %s", componentName);
+                    Log.addEvent(mCall, "NULL_BINDING", componentName);
+                    String componentStr = componentName == null ? "null" : componentName.toString();
+                    android.util.EventLog.writeEvent(0x534e4554, "211114016", -1, componentStr);
+                    logServiceDisconnected("onNullBinding");
+                    mContext.unbindService(this);
+                    clearAbort();
+                    handleFailedConnection();
+                }
+            } finally {
+                Log.endSession();
+            }
+        }
     }
 
     private void handleDisconnect() {