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

Commit ecc4791e authored by calderwoodra's avatar calderwoodra Committed by android-build-merger
Browse files

Merge changes I1c9fd942,Ib1b4baee

am: f068a1d5

Change-Id: If97f5df8e43eff7d6a7b8dd9d19758d38bde8e0c
parents be8126d3 f068a1d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.Toast;
import com.android.contacts.common.dialog.ClearFrequentsDialog;
import com.android.dialer.app.calllog.CallLogActivity;
import com.android.dialer.app.settings.DialerSettingsActivity;
import com.android.dialer.callintent.CallInitiationType;
import com.android.dialer.common.Assert;
@@ -402,6 +403,9 @@ public class MainSearchController implements SearchBarListener {
      ClearFrequentsDialog.show(mainActivity.getFragmentManager());
      Logger.get(mainActivity).logScreenView(ScreenEvent.Type.CLEAR_FREQUENTS, mainActivity);
      return true;
    } else if (menuItem.getItemId() == R.id.menu_call_history) {
      final Intent intent = new Intent(mainActivity, CallLogActivity.class);
      mainActivity.startActivity(intent);
    }
    return false;
  }
+9 −6
Original line number Diff line number Diff line
@@ -17,14 +17,17 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

  <item
      android:id="@+id/menu_call_history"
      android:title="@string/main_menu_call_history"
      app:showAsAction="collapseActionView"/>

  <item
      android:id="@+id/clear_frequents"
      android:title="@string/main_menu_clear_frequents"
      app:showAsAction="collapseActionView"
      android:visible="false"/>

  <!-- TODO(calderwoodra): add clear call log -->

  <item
      android:id="@+id/settings"
      android:title="@string/settings"
+4 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@
  <!-- Show users their settings [CHAR LIMIT=20] -->
  <string name="settings">Settings</string>

  <!-- Content description for the fake action menu button that brings up the call history
       activity [CHAR LIMIT=20] -->
  <string name="main_menu_call_history">Call history</string>

  <!--  The menu item to clear frequents [CHAR LIMIT=30] -->
  <string name="main_menu_clear_frequents">Clear frequents</string>

+34 −29
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ public class CallCardPresenter
      callState = this.primary.getState();
      updatePrimaryCallState();
    } else {
      getUi().setCallState(PrimaryCallState.createEmptyPrimaryCallState());
      getUi().setCallState(PrimaryCallState.empty());
    }

    maybeShowManageConferenceCallButton();
@@ -472,34 +472,39 @@ public class CallCardPresenter
          !VideoCallPresenter.showIncomingVideo(primary.getVideoState(), primary.getState());
      getUi()
          .setCallState(
              new PrimaryCallState(
                  primary.getState(),
                  primary.isVideoCall(),
                  primary.getVideoTech().getSessionModificationState(),
                  primary.getDisconnectCause(),
                  getConnectionLabel(),
                  getCallStateIcon(),
                  getGatewayNumber(),
                  shouldShowCallSubject(primary) ? primary.getCallSubject() : null,
              PrimaryCallState.builder()
                  .setState(primary.getState())
                  .setIsVideoCall(primary.isVideoCall())
                  .setSessionModificationState(primary.getVideoTech().getSessionModificationState())
                  .setDisconnectCause(primary.getDisconnectCause())
                  .setConnectionLabel(getConnectionLabel())
                  .setConnectionIcon(getCallStateIcon())
                  .setGatewayNumber(getGatewayNumber())
                  .setCallSubject(shouldShowCallSubject(primary) ? primary.getCallSubject() : null)
                  .setCallbackNumber(
                      PhoneNumberHelper.formatNumber(
                      primary.getCallbackNumber(), primary.getSimCountryIso()),
                  primary.hasProperty(Details.PROPERTY_WIFI),
                          primary.getCallbackNumber(), primary.getSimCountryIso()))
                  .setIsWifi(primary.hasProperty(Details.PROPERTY_WIFI))
                  .setIsConference(
                      primary.isConferenceCall()
                      && !primary.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE),
                  isWorkCall,
                  isAttemptingHdAudioCall,
                  isHdAudioCall,
                  !TextUtils.isEmpty(primary.getLastForwardedNumber()) || primary.isCallForwarded(),
                  shouldShowContactPhoto,
                  primary.getConnectTimeMillis(),
                  primary.isVoiceMailNumber(),
                  primary.isRemotelyHeld(),
                  isBusiness,
                  supports2ndCallOnHold(),
                  getSwapToSecondaryButtonState(),
                  primary.isAssistedDialed(),
                  null,
                  primary.getAssistedDialingExtras()));
                          && !primary.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE))
                  .setIsWorkCall(isWorkCall)
                  .setIsHdAttempting(isAttemptingHdAudioCall)
                  .setIsHdAudioCall(isHdAudioCall)
                  .setIsForwardedNumber(
                      !TextUtils.isEmpty(primary.getLastForwardedNumber())
                          || primary.isCallForwarded())
                  .setShouldShowContactPhoto(shouldShowContactPhoto)
                  .setConnectTimeMillis(primary.getConnectTimeMillis())
                  .setIsVoiceMailNumber(primary.isVoiceMailNumber())
                  .setIsRemotelyHeld(primary.isRemotelyHeld())
                  .setIsBusinessNumber(isBusiness)
                  .setSupportsCallOnHold(supports2ndCallOnHold())
                  .setSwapToSecondaryButtonState(getSwapToSecondaryButtonState())
                  .setIsAssistedDialed(primary.isAssistedDialed())
                  .setCustomLabel(null)
                  .setAssistedDialingExtras(primary.getAssistedDialingExtras())
                  .build());

      InCallActivity activity =
          (InCallActivity) (inCallScreen.getInCallScreenFragment().getActivity());
+5 −5
Original line number Diff line number Diff line
@@ -858,7 +858,7 @@ public class AnswerFragment extends Fragment
  public void onAnswerProgressUpdate(@FloatRange(from = -1f, to = 1f) float answerProgress) {
    // Don't fade the window background for call waiting or video upgrades. Fading the background
    // shows the system wallpaper which looks bad because on reject we switch to another call.
    if (primaryCallState.state == State.INCOMING && !isVideoCall()) {
    if (primaryCallState.state() == State.INCOMING && !isVideoCall()) {
      answerScreenDelegate.updateWindowBackgroundColor(answerProgress);
    }

@@ -969,7 +969,7 @@ public class AnswerFragment extends Fragment
        if (hasCallOnHold()) {
          getAnswerMethod()
              .setHintText(getText(R.string.call_incoming_default_label_answer_and_release_third));
        } else if (primaryCallState.supportsCallOnHold) {
        } else if (primaryCallState.supportsCallOnHold()) {
          getAnswerMethod()
              .setHintText(getText(R.string.call_incoming_default_label_answer_and_release_second));
        }
@@ -1048,9 +1048,9 @@ public class AnswerFragment extends Fragment

  private boolean canRejectCallWithSms() {
    return primaryCallState != null
        && !(primaryCallState.state == State.DISCONNECTED
            || primaryCallState.state == State.DISCONNECTING
            || primaryCallState.state == State.IDLE);
        && !(primaryCallState.state() == State.DISCONNECTED
            || primaryCallState.state() == State.DISCONNECTING
            || primaryCallState.state() == State.IDLE);
  }

  private void createInCallScreenDelegate() {
Loading