Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d657bd3 authored by yueg's avatar yueg Committed by android-build-merger
Browse files

Merge changes I845855d0,Id1518174 am: 189fe2dd

am: 1238bdca

Change-Id: I3c889496bffee89c04e480ebcd290d02fbf664a3
parents 84bb3917 1238bdca
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ 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.
  ~ 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
  -->

<resources>
  <!-- Flag to control whether to disable phone number formatting -->
  <bool name="motorola_disable_phone_number_formatting">true</bool>
</resources>
+2 −4
Original line number Diff line number Diff line
@@ -111,10 +111,8 @@ public class InCallServiceImpl extends InCallService {
    InCallPresenter.getInstance().onServiceBind();
    InCallPresenter.getInstance().maybeStartRevealAnimation(intent);
    TelecomAdapter.getInstance().setInCallService(this);
    if (ReturnToCallController.isEnabled(this)) {
    returnToCallController =
        new ReturnToCallController(this, ContactInfoCache.getInstance(context));
    }
    feedbackListener = FeedbackComponent.get(context).getCallFeedbackListener();
    CallList.getInstance().addListener(feedbackListener);

+21 −2
Original line number Diff line number Diff line
@@ -108,6 +108,11 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio

  @Override
  public void onUiShowing(boolean showing) {
    if (!isEnabled(context)) {
      hide();
      return;
    }

    LogUtil.i("ReturnToCallController.onUiShowing", "showing: " + showing);
    if (showing) {
      LogUtil.i("ReturnToCallController.onUiShowing", "going to hide");
@@ -155,8 +160,7 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio
    canShowBubblesForTesting = canShowBubbles;
  }

  @VisibleForTesting
  public Bubble startBubble() {
  private Bubble startBubble() {
    if (!canShowBubbles(context)) {
      LogUtil.i("ReturnToCallController.startBubble", "can't show bubble, no permission");
      return null;
@@ -178,6 +182,11 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio

  @Override
  public void onCallListChange(CallList callList) {
    if (!isEnabled(context)) {
      hide();
      return;
    }

    if ((bubble == null || !bubble.isVisible())
        && getCall() != null
        && !InCallPresenter.getInstance().isShowingInCallUi()) {
@@ -188,6 +197,11 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio

  @Override
  public void onDisconnect(DialerCall call) {
    if (!isEnabled(context)) {
      hide();
      return;
    }

    LogUtil.enterBlock("ReturnToCallController.onDisconnect");
    if (bubble != null && bubble.isVisible() && (getCall() == null)) {
      // Show "Call ended" and hide bubble when there is no outgoing, active or background call
@@ -214,6 +228,11 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio

  @Override
  public void onAudioStateChanged(CallAudioState audioState) {
    if (!isEnabled(context)) {
      hide();
      return;
    }

    this.audioState = audioState;
    if (bubble != null) {
      bubble.updateActions(generateActions());