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

Commit 241f73a4 authored by erfanian's avatar erfanian Committed by android-build-merger
Browse files

Merge changes If1ae5505,I65e9c6ac,I1a72ca86,I417b46ed,I60f97924

am: 9f14cd7e

Change-Id: I6d7daa3977a09dc37c2720485f1f0e28b60a0004
parents 98d72fae 9f14cd7e
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.dialer.calllog.ui.menu;

import android.content.Context;
import android.provider.CallLog.Calls;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.text.TextUtils;
import com.android.dialer.blockreportspam.BlockReportSpamDialogInfo;
@@ -123,11 +124,22 @@ final class Modules {
      return Collections.emptyList();
    }

    List<HistoryItemActionModule> modules = new ArrayList<>();
    boolean isDuoCall =
        DuoConstants.PHONE_ACCOUNT_COMPONENT_NAME
            .flattenToString()
            .equals(row.getPhoneAccountComponentName());

    // Obtain a PhoneAccountHandle that will be used to start carrier voice/video calls.
    // If the row is for a Duo call, we should use the default phone account as the one included in
    // the row is for Duo only.
    PhoneAccountHandle phoneAccountHandle =
        TelecomUtil.composePhoneAccountHandle(
        isDuoCall
            ? TelecomUtil.getDefaultOutgoingPhoneAccount(context, PhoneAccount.SCHEME_TEL)
            : TelecomUtil.composePhoneAccountHandle(
                row.getPhoneAccountComponentName(), row.getPhoneAccountId());

    List<HistoryItemActionModule> modules = new ArrayList<>();

    // Add an audio call item
    modules.add(
        IntentModule.newCallModule(
@@ -136,10 +148,6 @@ final class Modules {
    // Add a video item if (1) the call log entry is for a video call, and (2) the call is not spam.
    if ((row.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
        && !row.getNumberAttributes().getIsSpam()) {
      boolean isDuoCall =
          DuoConstants.PHONE_ACCOUNT_COMPONENT_NAME
              .flattenToString()
              .equals(row.getPhoneAccountComponentName());
      modules.add(
          isDuoCall
              ? new DuoCallModule(context, normalizedNumber, CallInitiationType.Type.CALL_LOG)
+30 −0
Original line number Diff line number Diff line
syntax = "proto2";

option java_package = "com.android.dialer.rtt";
option java_multiple_files = true;
option optimize_for = LITE_RUNTIME;


package com.android.dialer.rtt;

// RTT transcript which contains chat history of a RTT call.
message RttTranscript {
  // Unique ID used for database.
  optional string id = 1;
  // Phone number of RTT call.
  optional string number = 2;
  // Timestamp when the RTT call is created.
  optional int64 timestamp = 3;
  // Chat messages.
  repeated RttTranscriptMessage messages = 4;
}

// Single chat message inside a RTT call.
message RttTranscriptMessage {
  optional string content = 1;
  optional int64 timestamp = 2;
  // Whether this message is sent from local device or received from remote
  // party.
  optional bool is_remote = 3;
  optional bool is_finished = 4;
}
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -86,12 +86,15 @@ public final class ContactPhotoView extends FrameLayout {
  private void setBadge(PhotoInfo photoInfo) {
    // No badge for spam numbers.
    if (photoInfo.getIsSpam()) {
      hideBadge();
      return;
    }

    if (photoInfo.getIsVideo()) {
      contactBadgeContainer.setVisibility(View.VISIBLE);
      videoCallBadge.setVisibility(View.VISIBLE);
    } else {
      hideBadge();
    }
  }
}
+3 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import com.android.incallui.audiomode.AudioModeProvider.AudioModeListener;
import com.android.incallui.call.CallList;
import com.android.incallui.call.DialerCall;
import com.android.incallui.call.DialerCall.CameraDirection;
import com.android.incallui.call.DialerCall.State;
import com.android.incallui.call.TelecomAdapter;
import com.android.incallui.incall.protocol.InCallButtonIds;
import com.android.incallui.incall.protocol.InCallButtonUi;
@@ -480,6 +481,7 @@ public class CallButtonPresenter
            && InCallPresenter.getInstance().getCallList().getAllCalls().size() == 1;

    boolean showUpgradeToRtt = call.canUpgradeToRttCall();
    boolean enableUpgradeToRtt = showUpgradeToRtt && call.getState() == State.ACTIVE;

    inCallButtonUi.showButton(InCallButtonIds.BUTTON_AUDIO, true);
    inCallButtonUi.showButton(InCallButtonIds.BUTTON_SWAP, showSwap);
@@ -491,6 +493,7 @@ public class CallButtonPresenter
    inCallButtonUi.enableButton(InCallButtonIds.BUTTON_ADD_CALL, showAddCall);
    inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo);
    inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_RTT, showUpgradeToRtt);
    inCallButtonUi.enableButton(InCallButtonIds.BUTTON_UPGRADE_TO_RTT, enableUpgradeToRtt);
    inCallButtonUi.showButton(InCallButtonIds.BUTTON_DOWNGRADE_TO_AUDIO, showDowngradeToAudio);
    inCallButtonUi.showButton(
        InCallButtonIds.BUTTON_SWITCH_CAMERA,
+6 −2
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
  private boolean didShowVideoCallScreen;
  private boolean didShowRttCallScreen;
  private boolean didShowSpeakEasyScreen;
  private String lastShownSpeakEasyScreenUniqueCallid = "";
  private boolean dismissKeyguard;
  private boolean isInShowMainInCallFragment;
  private boolean isRecreating; // whether the activity is going to be recreated
@@ -1353,15 +1354,18 @@ public class InCallActivity extends TransactionSafeFragmentActivity

  private boolean showSpeakEasyFragment(FragmentTransaction transaction, DialerCall call) {

    // TODO(erfanian): Support multiple speakeasy screens.
    if (didShowSpeakEasyScreen) {
      if (lastShownSpeakEasyScreenUniqueCallid.equals(call.getUniqueCallId())) {
        return false;
      }
      hideSpeakEasyFragment(transaction);
    }

    Optional<Fragment> speakEasyFragment = speakEasyCallManager.getSpeakEasyFragment(call);
    if (speakEasyFragment.isPresent()) {
      transaction.add(R.id.main, speakEasyFragment.get(), Tags.SPEAK_EASY_SCREEN);
      didShowSpeakEasyScreen = true;
      lastShownSpeakEasyScreenUniqueCallid = call.getUniqueCallId();
      return true;
    }
    return false;
Loading