Merge changes Ieab3ee3f,I4b917d8a

* changes:
  Remove bubble "new" prefix.
  Dismiss keyboard when opening overflow menu in RTT call.
diff --git a/java/com/android/newbubble/NewBubble.java b/java/com/android/bubble/Bubble.java
similarity index 81%
rename from java/com/android/newbubble/NewBubble.java
rename to java/com/android/bubble/Bubble.java
index 785593c..e192e06 100644
--- a/java/com/android/newbubble/NewBubble.java
+++ b/java/com/android/bubble/Bubble.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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,19 +14,18 @@
  * limitations under the License
  */
 
-package com.android.newbubble;
+package com.android.bubble;
 
 import android.graphics.drawable.Drawable;
 import android.support.annotation.NonNull;
-import com.android.newbubble.NewBubbleInfo.Action;
 import java.util.List;
 
 /**
- * Creates and manages a bubble window from information in a {@link NewBubbleInfo}. Before creating,
- * be sure to check whether bubbles may be shown using {@code Settings.canDrawOverlays(context)} and
+ * Creates and manages a bubble window from information in a {@link BubbleInfo}. Before creating, be
+ * sure to check whether bubbles may be shown using {@code Settings.canDrawOverlays(context)} and
  * request permission if necessary
  */
-public interface NewBubble {
+public interface Bubble {
 
   /**
    * Make the bubble visible. Will show a short entrance animation as it enters. If the bubble is
@@ -45,14 +44,14 @@
    *
    * @param bubbleInfo the BubbleInfo to display in this Bubble.
    */
-  void setBubbleInfo(@NonNull NewBubbleInfo bubbleInfo);
+  void setBubbleInfo(@NonNull BubbleInfo bubbleInfo);
 
   /**
    * Update the state and behavior of actions.
    *
    * @param actions the new state of the bubble's actions
    */
-  void updateActions(@NonNull List<Action> actions);
+  void updateActions(@NonNull List<BubbleInfo.Action> actions);
 
   /**
    * Update the avatar from photo.
diff --git a/java/com/android/newbubble/NewBubbleComponent.java b/java/com/android/bubble/BubbleComponent.java
similarity index 75%
rename from java/com/android/newbubble/NewBubbleComponent.java
rename to java/com/android/bubble/BubbleComponent.java
index e7edba6..7a4665e 100644
--- a/java/com/android/newbubble/NewBubbleComponent.java
+++ b/java/com/android/bubble/BubbleComponent.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.newbubble;
+package com.android.bubble;
 
 import android.content.Context;
 import android.support.annotation.NonNull;
@@ -22,18 +22,18 @@
 import dagger.Subcomponent;
 
 @Subcomponent
-public abstract class NewBubbleComponent {
+public abstract class BubbleComponent {
 
   @NonNull
-  public abstract NewBubble getNewBubble();
+  public abstract Bubble getBubble();
 
-  public static NewBubbleComponent get(Context context) {
+  public static BubbleComponent get(Context context) {
     return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component())
-        .newBubbleComponent();
+        .bubbleComponent();
   }
 
   /** Used to refer to the root application component. */
   public interface HasComponent {
-    NewBubbleComponent newBubbleComponent();
+    BubbleComponent bubbleComponent();
   }
 }
diff --git a/java/com/android/newbubble/NewBubbleInfo.java b/java/com/android/bubble/BubbleInfo.java
similarity index 86%
rename from java/com/android/newbubble/NewBubbleInfo.java
rename to java/com/android/bubble/BubbleInfo.java
index d9232a5..28793a7 100644
--- a/java/com/android/newbubble/NewBubbleInfo.java
+++ b/java/com/android/bubble/BubbleInfo.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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,7 +14,7 @@
  * limitations under the License
  */
 
-package com.android.newbubble;
+package com.android.bubble;
 
 import android.app.PendingIntent;
 import android.graphics.drawable.Drawable;
@@ -27,9 +27,9 @@
 import java.util.Collections;
 import java.util.List;
 
-/** Info for displaying a {@link NewBubble} */
+/** Info for displaying a {@link Bubble} */
 @AutoValue
-public abstract class NewBubbleInfo {
+public abstract class BubbleInfo {
   @ColorInt
   public abstract int getPrimaryColor();
 
@@ -45,10 +45,10 @@
   public abstract List<Action> getActions();
 
   public static Builder builder() {
-    return new AutoValue_NewBubbleInfo.Builder().setActions(Collections.emptyList());
+    return new AutoValue_BubbleInfo.Builder().setActions(Collections.emptyList());
   }
 
-  public static Builder from(@NonNull NewBubbleInfo bubbleInfo) {
+  public static Builder from(@NonNull BubbleInfo bubbleInfo) {
     return builder()
         .setPrimaryColor(bubbleInfo.getPrimaryColor())
         .setPrimaryIcon(bubbleInfo.getPrimaryIcon())
@@ -57,7 +57,7 @@
         .setAvatar(bubbleInfo.getAvatar());
   }
 
-  /** Builder for {@link NewBubbleInfo} */
+  /** Builder for {@link BubbleInfo} */
   @AutoValue.Builder
   public abstract static class Builder {
 
@@ -71,7 +71,7 @@
 
     public abstract Builder setActions(List<Action> actions);
 
-    public abstract NewBubbleInfo build();
+    public abstract BubbleInfo build();
   }
 
   /** Represents actions to be shown in the bubble when expanded */
@@ -94,7 +94,7 @@
     public abstract boolean isChecked();
 
     public static Builder builder() {
-      return new AutoValue_NewBubbleInfo_Action.Builder().setCheckable(true).setChecked(false);
+      return new AutoValue_BubbleInfo_Action.Builder().setCheckable(true).setChecked(false);
     }
 
     public static Builder from(@NonNull Action action) {
diff --git a/java/com/android/newbubble/stub/NewBubbleStub.java b/java/com/android/bubble/stub/BubbleStub.java
similarity index 71%
rename from java/com/android/newbubble/stub/NewBubbleStub.java
rename to java/com/android/bubble/stub/BubbleStub.java
index f5121cf..267f33f 100644
--- a/java/com/android/newbubble/stub/NewBubbleStub.java
+++ b/java/com/android/bubble/stub/BubbleStub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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,20 +14,19 @@
  * limitations under the License
  */
 
-package com.android.newbubble.stub;
+package com.android.bubble.stub;
 
 import android.graphics.drawable.Drawable;
 import android.support.annotation.NonNull;
-import com.android.newbubble.NewBubble;
-import com.android.newbubble.NewBubbleInfo;
-import com.android.newbubble.NewBubbleInfo.Action;
+import com.android.bubble.Bubble;
+import com.android.bubble.BubbleInfo;
 import java.util.List;
 import javax.inject.Inject;
 
-public class NewBubbleStub implements NewBubble {
+public class BubbleStub implements Bubble {
 
   @Inject
-  public NewBubbleStub() {}
+  public BubbleStub() {}
 
   @Override
   public void show() {}
@@ -41,10 +40,10 @@
   }
 
   @Override
-  public void setBubbleInfo(@NonNull NewBubbleInfo bubbleInfo) {}
+  public void setBubbleInfo(@NonNull BubbleInfo bubbleInfo) {}
 
   @Override
-  public void updateActions(@NonNull List<Action> actions) {}
+  public void updateActions(@NonNull List<BubbleInfo.Action> actions) {}
 
   @Override
   public void updatePhotoAvatar(@NonNull Drawable avatar) {}
diff --git a/java/com/android/newbubble/stub/StubNewBubbleModule.java b/java/com/android/bubble/stub/StubBubbleModule.java
similarity index 73%
rename from java/com/android/newbubble/stub/StubNewBubbleModule.java
rename to java/com/android/bubble/stub/StubBubbleModule.java
index 227ba5e..783983f 100644
--- a/java/com/android/newbubble/stub/StubNewBubbleModule.java
+++ b/java/com/android/bubble/stub/StubBubbleModule.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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,17 +14,17 @@
  * limitations under the License.
  */
 
-package com.android.newbubble.stub;
+package com.android.bubble.stub;
 
-import com.android.newbubble.NewBubble;
+import com.android.bubble.Bubble;
 import dagger.Binds;
 import dagger.Module;
 import javax.inject.Singleton;
 
 @Module
-public abstract class StubNewBubbleModule {
+public abstract class StubBubbleModule {
 
   @Binds
   @Singleton
-  public abstract NewBubble bindsNewBubble(NewBubbleStub newBubbleStub);
+  public abstract Bubble bindsBubble(BubbleStub bubbleStub);
 }
diff --git a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
index 35f8540..969172b 100644
--- a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
+++ b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
@@ -16,6 +16,7 @@
 
 package com.android.dialer.binary.aosp;
 
+import com.android.bubble.stub.StubBubbleModule;
 import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
 import com.android.dialer.calllog.CallLogModule;
 import com.android.dialer.commandline.CommandLineModule;
@@ -39,7 +40,6 @@
 import com.android.incallui.calllocation.stub.StubCallLocationModule;
 import com.android.incallui.maps.stub.StubMapsModule;
 import com.android.incallui.speakeasy.StubSpeakEasyModule;
-import com.android.newbubble.stub.StubNewBubbleModule;
 import com.android.voicemail.impl.VoicemailModule;
 import dagger.Component;
 import javax.inject.Singleton;
@@ -63,7 +63,7 @@
     StubCallLocationModule.class,
     StubDuoModule.class,
     StubEnrichedCallModule.class,
-    StubNewBubbleModule.class,
+    StubBubbleModule.class,
     StubMetricsModule.class,
     StubFeedbackModule.class,
     StubMapsModule.class,
diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
index cd95c3e..0495ba6 100644
--- a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
+++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
@@ -16,6 +16,7 @@
 
 package com.android.dialer.binary.basecomponent;
 
+import com.android.bubble.BubbleComponent;
 import com.android.dialer.calllog.CallLogComponent;
 import com.android.dialer.calllog.database.CallLogDatabaseComponent;
 import com.android.dialer.calllog.ui.CallLogUiComponent;
@@ -39,7 +40,6 @@
 import com.android.incallui.calllocation.CallLocationComponent;
 import com.android.incallui.maps.MapsComponent;
 import com.android.incallui.speakeasy.SpeakEasyComponent;
-import com.android.newbubble.NewBubbleComponent;
 import com.android.voicemail.VoicemailComponent;
 
 /**
@@ -61,7 +61,7 @@
         MainComponent.HasComponent,
         MapsComponent.HasComponent,
         MetricsComponent.HasComponent,
-        NewBubbleComponent.HasComponent,
+        BubbleComponent.HasComponent,
         PhoneLookupComponent.HasComponent,
         PhoneNumberGeoUtilComponent.HasComponent,
         PreCallComponent.HasComponent,
diff --git a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
index 497d977..f9f561a 100644
--- a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
+++ b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
@@ -16,6 +16,7 @@
 
 package com.android.dialer.binary.google;
 
+import com.android.bubble.stub.StubBubbleModule;
 import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
 import com.android.dialer.calllog.CallLogModule;
 import com.android.dialer.commandline.CommandLineModule;
@@ -39,7 +40,6 @@
 import com.android.incallui.calllocation.impl.CallLocationModule;
 import com.android.incallui.maps.impl.MapsModule;
 import com.android.incallui.speakeasy.StubSpeakEasyModule;
-import com.android.newbubble.stub.StubNewBubbleModule;
 import com.android.voicemail.impl.VoicemailModule;
 import dagger.Component;
 import javax.inject.Singleton;
@@ -69,7 +69,7 @@
     StubEnrichedCallModule.class,
     StubFeedbackModule.class,
     StubMetricsModule.class,
-    StubNewBubbleModule.class,
+    StubBubbleModule.class,
     StubSimSuggestionModule.class,
     StubSpamModule.class,
     StubSpeakEasyModule.class,
diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml
index a45330b..1b5f099 100644
--- a/java/com/android/incallui/AndroidManifest.xml
+++ b/java/com/android/incallui/AndroidManifest.xml
@@ -115,7 +115,7 @@
 
     <receiver
         android:exported="false"
-        android:name=".NewReturnToCallActionReceiver"/>
+        android:name=".ReturnToCallActionReceiver"/>
 
   </application>
 
diff --git a/java/com/android/incallui/InCallServiceImpl.java b/java/com/android/incallui/InCallServiceImpl.java
index a7095f8..959f13f 100644
--- a/java/com/android/incallui/InCallServiceImpl.java
+++ b/java/com/android/incallui/InCallServiceImpl.java
@@ -40,7 +40,7 @@
  */
 public class InCallServiceImpl extends InCallService {
 
-  private NewReturnToCallController newReturnToCallController;
+  private ReturnToCallController returnToCallController;
   private CallList.Listener feedbackListener;
   // We only expect there to be one speakEasyCallManager to be instantiated at a time.
   // We did not use a singleton SpeakEasyCallManager to avoid holding on to state beyond the
@@ -111,9 +111,9 @@
     InCallPresenter.getInstance().onServiceBind();
     InCallPresenter.getInstance().maybeStartRevealAnimation(intent);
     TelecomAdapter.getInstance().setInCallService(this);
-    if (NewReturnToCallController.isEnabled(this)) {
-      newReturnToCallController =
-          new NewReturnToCallController(this, ContactInfoCache.getInstance(context));
+    if (ReturnToCallController.isEnabled(this)) {
+      returnToCallController =
+          new ReturnToCallController(this, ContactInfoCache.getInstance(context));
     }
     feedbackListener = FeedbackComponent.get(context).getCallFeedbackListener();
     CallList.getInstance().addListener(feedbackListener);
@@ -141,9 +141,9 @@
     // Tear down the InCall system
     InCallPresenter.getInstance().tearDown();
     TelecomAdapter.getInstance().clearInCallService();
-    if (newReturnToCallController != null) {
-      newReturnToCallController.tearDown();
-      newReturnToCallController = null;
+    if (returnToCallController != null) {
+      returnToCallController.tearDown();
+      returnToCallController = null;
     }
     if (feedbackListener != null) {
       CallList.getInstance().removeListener(feedbackListener);
diff --git a/java/com/android/incallui/NewReturnToCallActionReceiver.java b/java/com/android/incallui/ReturnToCallActionReceiver.java
similarity index 98%
rename from java/com/android/incallui/NewReturnToCallActionReceiver.java
rename to java/com/android/incallui/ReturnToCallActionReceiver.java
index 527a79b..d6014aa 100644
--- a/java/com/android/incallui/NewReturnToCallActionReceiver.java
+++ b/java/com/android/incallui/ReturnToCallActionReceiver.java
@@ -30,7 +30,7 @@
 import com.android.incallui.call.TelecomAdapter;
 
 /** Handles clicks on the return-to-call bubble */
-public class NewReturnToCallActionReceiver extends BroadcastReceiver {
+public class ReturnToCallActionReceiver extends BroadcastReceiver {
 
   public static final String ACTION_RETURN_TO_CALL = "returnToCallV2";
   public static final String ACTION_TOGGLE_SPEAKER = "toggleSpeakerV2";
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java
similarity index 82%
rename from java/com/android/incallui/NewReturnToCallController.java
rename to java/com/android/incallui/ReturnToCallController.java
index e779205..6227c77 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/ReturnToCallController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 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.
@@ -26,6 +26,10 @@
 import android.support.annotation.VisibleForTesting;
 import android.telecom.CallAudioState;
 import android.text.TextUtils;
+import com.android.bubble.Bubble;
+import com.android.bubble.BubbleComponent;
+import com.android.bubble.BubbleInfo;
+import com.android.bubble.BubbleInfo.Action;
 import com.android.contacts.common.util.ContactDisplayUtils;
 import com.android.dialer.common.LogUtil;
 import com.android.dialer.configprovider.ConfigProviderBindings;
@@ -41,10 +45,6 @@
 import com.android.incallui.call.DialerCall;
 import com.android.incallui.speakerbuttonlogic.SpeakerButtonInfo;
 import com.android.incallui.speakerbuttonlogic.SpeakerButtonInfo.IconSize;
-import com.android.newbubble.NewBubble;
-import com.android.newbubble.NewBubbleComponent;
-import com.android.newbubble.NewBubbleInfo;
-import com.android.newbubble.NewBubbleInfo.Action;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.List;
@@ -59,12 +59,12 @@
  * <p>Bubble hides when one of following happens: 1. a call disconnect and there is no more
  * outgoing/ongoing call 2. show in-call UI
  */
-public class NewReturnToCallController implements InCallUiListener, Listener, AudioModeListener {
+public class ReturnToCallController implements InCallUiListener, Listener, AudioModeListener {
 
   private final Context context;
 
   @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
-  NewBubble bubble;
+  Bubble bubble;
 
   private static Boolean canShowBubblesForTesting = null;
 
@@ -82,16 +82,16 @@
     return ConfigProviderBindings.get(context).getBoolean("enable_return_to_call_bubble_v2", false);
   }
 
-  public NewReturnToCallController(Context context, ContactInfoCache contactInfoCache) {
+  public ReturnToCallController(Context context, ContactInfoCache contactInfoCache) {
     this.context = context;
     this.contactInfoCache = contactInfoCache;
 
-    toggleSpeaker = createActionIntent(NewReturnToCallActionReceiver.ACTION_TOGGLE_SPEAKER);
+    toggleSpeaker = createActionIntent(ReturnToCallActionReceiver.ACTION_TOGGLE_SPEAKER);
     showSpeakerSelect =
-        createActionIntent(NewReturnToCallActionReceiver.ACTION_SHOW_AUDIO_ROUTE_SELECTOR);
-    toggleMute = createActionIntent(NewReturnToCallActionReceiver.ACTION_TOGGLE_MUTE);
-    endCall = createActionIntent(NewReturnToCallActionReceiver.ACTION_END_CALL);
-    fullScreen = createActionIntent(NewReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);
+        createActionIntent(ReturnToCallActionReceiver.ACTION_SHOW_AUDIO_ROUTE_SELECTOR);
+    toggleMute = createActionIntent(ReturnToCallActionReceiver.ACTION_TOGGLE_MUTE);
+    endCall = createActionIntent(ReturnToCallActionReceiver.ACTION_END_CALL);
+    fullScreen = createActionIntent(ReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);
 
     InCallPresenter.getInstance().addInCallUiListener(this);
     CallList.getInstance().addListener(this);
@@ -156,12 +156,12 @@
   }
 
   @VisibleForTesting
-  public NewBubble startBubble() {
+  public Bubble startBubble() {
     if (!canShowBubbles(context)) {
-      LogUtil.i("ReturnToCallController.startNewBubble", "can't show bubble, no permission");
+      LogUtil.i("ReturnToCallController.startBubble", "can't show bubble, no permission");
       return null;
     }
-    NewBubble returnToCallBubble = NewBubbleComponent.get(context).getNewBubble();
+    Bubble returnToCallBubble = BubbleComponent.get(context).getBubble();
     returnToCallBubble.setBubbleInfo(generateBubbleInfo());
     returnToCallBubble.show();
     return returnToCallBubble;
@@ -181,7 +181,7 @@
     if ((bubble == null || !bubble.isVisible())
         && getCall() != null
         && !InCallPresenter.getInstance().isShowingInCallUi()) {
-      LogUtil.i("NewReturnToCallController.onCallListChange", "going to show bubble");
+      LogUtil.i("ReturnToCallController.onCallListChange", "going to show bubble");
       show();
     }
   }
@@ -248,8 +248,8 @@
     }
   }
 
-  private NewBubbleInfo generateBubbleInfo() {
-    return NewBubbleInfo.builder()
+  private BubbleInfo generateBubbleInfo() {
+    return BubbleInfo.builder()
         .setPrimaryColor(context.getResources().getColor(R.color.dialer_theme_color, null))
         .setPrimaryIcon(Icon.createWithResource(context, R.drawable.on_going_call))
         .setStartingYPosition(
@@ -306,7 +306,7 @@
 
   @NonNull
   private PendingIntent createActionIntent(String action) {
-    Intent intent = new Intent(context, NewReturnToCallActionReceiver.class);
+    Intent intent = new Intent(context, ReturnToCallActionReceiver.class);
     intent.setAction(action);
     return PendingIntent.getBroadcast(context, 0, intent, 0);
   }
@@ -339,45 +339,42 @@
 
   private static class ReturnToCallContactInfoCacheCallback implements ContactInfoCacheCallback {
 
-    private final WeakReference<NewReturnToCallController> newReturnToCallControllerWeakReference;
+    private final WeakReference<ReturnToCallController> returnToCallControllerWeakReference;
 
-    private ReturnToCallContactInfoCacheCallback(
-        NewReturnToCallController newReturnToCallController) {
-      newReturnToCallControllerWeakReference = new WeakReference<>(newReturnToCallController);
+    private ReturnToCallContactInfoCacheCallback(ReturnToCallController returnToCallController) {
+      returnToCallControllerWeakReference = new WeakReference<>(returnToCallController);
     }
 
     @Override
     public void onContactInfoComplete(String callId, ContactCacheEntry entry) {
-      NewReturnToCallController newReturnToCallController =
-          newReturnToCallControllerWeakReference.get();
-      if (newReturnToCallController == null) {
+      ReturnToCallController returnToCallController = returnToCallControllerWeakReference.get();
+      if (returnToCallController == null) {
         return;
       }
       if (entry.photo != null) {
-        newReturnToCallController.onPhotoAvatarReceived(entry.photo);
+        returnToCallController.onPhotoAvatarReceived(entry.photo);
       } else {
         DialerCall dialerCall = CallList.getInstance().getCallById(callId);
         if (dialerCall != null) {
-          newReturnToCallController.onLetterTileAvatarReceived(
-              newReturnToCallController.createLettleTileDrawable(dialerCall, entry));
+          returnToCallController.onLetterTileAvatarReceived(
+              returnToCallController.createLettleTileDrawable(dialerCall, entry));
         }
       }
     }
 
     @Override
     public void onImageLoadComplete(String callId, ContactCacheEntry entry) {
-      NewReturnToCallController newReturnToCallController =
-          newReturnToCallControllerWeakReference.get();
-      if (newReturnToCallController == null) {
+      ReturnToCallController returnToCallController = returnToCallControllerWeakReference.get();
+      if (returnToCallController == null) {
         return;
       }
       if (entry.photo != null) {
-        newReturnToCallController.onPhotoAvatarReceived(entry.photo);
+        returnToCallController.onPhotoAvatarReceived(entry.photo);
       } else {
         DialerCall dialerCall = CallList.getInstance().getCallById(callId);
         if (dialerCall != null) {
-          newReturnToCallController.onLetterTileAvatarReceived(
-              newReturnToCallController.createLettleTileDrawable(dialerCall, entry));
+          returnToCallController.onLetterTileAvatarReceived(
+              returnToCallController.createLettleTileDrawable(dialerCall, entry));
         }
       }
     }
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 87f332a..e2340b5 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -657,8 +657,8 @@
     } else if (call.hasProperty(Details.PROPERTY_HAS_CDMA_VOICE_PRIVACY)) {
       return R.drawable.quantum_ic_phone_locked_vd_theme_24;
     }
-    // If NewReturnToCall is enabled, use the static icon. The animated one will show in the bubble.
-    if (NewReturnToCallController.isEnabled(context)) {
+    // If ReturnToCall is enabled, use the static icon. The animated one will show in the bubble.
+    if (ReturnToCallController.isEnabled(context)) {
       return R.drawable.quantum_ic_call_vd_theme_24;
     } else {
       return R.drawable.on_going_call;
diff --git a/java/com/android/incallui/rtt/impl/RttChatFragment.java b/java/com/android/incallui/rtt/impl/RttChatFragment.java
index 9e8a24a..e35ff4d 100644
--- a/java/com/android/incallui/rtt/impl/RttChatFragment.java
+++ b/java/com/android/incallui/rtt/impl/RttChatFragment.java
@@ -37,7 +37,6 @@
 import android.view.Window;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputMethodManager;
 import android.widget.Chronometer;
 import android.widget.EditText;
 import android.widget.ImageButton;
@@ -46,6 +45,7 @@
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.FragmentUtils;
 import com.android.dialer.common.LogUtil;
+import com.android.dialer.common.UiUtil;
 import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment;
 import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.AudioRouteSelectorPresenter;
 import com.android.incallui.call.DialerCall.State;
@@ -87,7 +87,7 @@
         @Override
         public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
           if (dy < 0) {
-            hideKeyboard();
+            UiUtil.hideKeyboardFrom(getContext(), editText);
           }
         }
       };
@@ -182,7 +182,13 @@
 
     overflowMenu = new RttOverflowMenu(getContext(), inCallButtonUiDelegate);
     view.findViewById(R.id.rtt_overflow_button)
-        .setOnClickListener(v -> overflowMenu.showAtLocation(v, Gravity.TOP | Gravity.RIGHT, 0, 0));
+        .setOnClickListener(
+            v -> {
+              // Hide keyboard when opening overflow menu. This is alternative solution since hiding
+              // keyboard after the menu is open or dialpad is shown doesn't work.
+              UiUtil.hideKeyboardFrom(getContext(), editText);
+              overflowMenu.showAtLocation(v, Gravity.TOP | Gravity.RIGHT, 0, 0);
+            });
 
     nameTextView = view.findViewById(R.id.rtt_name_or_number);
     chronometer = view.findViewById(R.id.rtt_timer);
@@ -265,14 +271,6 @@
     onRttScreenStop();
   }
 
-  private void hideKeyboard() {
-    InputMethodManager inputMethodManager = getContext().getSystemService(InputMethodManager.class);
-    if (inputMethodManager.isAcceptingText()) {
-      inputMethodManager.hideSoftInputFromWindow(
-          getActivity().getCurrentFocus().getWindowToken(), 0);
-    }
-  }
-
   @Override
   public void onRttScreenStart() {
     rttCallScreenDelegate.onRttCallScreenUiReady();