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

Commit 1fe9bec2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I50927036,I7154058a

* changes:
  internal change
  Add suggestion reason ACCOUNT
parents f765d94d 974fc290
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ public class CallingAccountSelector implements PreCallAction {
          hints.add(context.getString(R.string.pre_call_select_phone_account_hint_frequent));
          break;
        default:
          throw Assert.createAssertionFailException("unexpected reason " + suggestion.reason);
          LogUtil.w("CallingAccountSelector.buildHint", "unhandled reason " + suggestion.reason);
      }
    }
    return hints;
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ public interface SuggestionProvider {
    // The user has select the SIM for this category of calls (contacts from certain accounts,
    // etc.).
    USER_SET,
    // The user has selected the SIM for all contacts on the account.
    ACCOUNT,
  }

  /** The suggestion. */
+0 −7
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.compat.ActivityCompat;
import com.android.dialer.configprovider.ConfigProviderBindings;
import com.android.dialer.feedback.FeedbackComponent;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.multimedia.MultimediaData;
@@ -154,11 +153,6 @@ public class CallCardPresenter
    return !TextUtils.isEmpty(call.getCallSubject());
  }

  private void addCallFeedbackListener(Context context) {
    LogUtil.d("CallCardPresenter.addCallFeedbackListener", "Adding call feedback listener");
    CallList.getInstance().addListener(FeedbackComponent.get(context).getCallFeedbackListener());
  }

  @Override
  public void onInCallScreenDelegateInit(InCallScreen inCallScreen) {
    Assert.isNotNull(inCallScreen);
@@ -173,7 +167,6 @@ public class CallCardPresenter
        this.inCallScreen.showNoteSentToast();
      }
      call.addListener(this);
      addCallFeedbackListener(context);
      // start processing lookups right away.
      if (!call.isConferenceCall()) {
        startContactInfoSearch(call, true, call.getState() == DialerCall.State.INCOMING);
+8 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.telecom.Call;
import android.telecom.CallAudioState;
import android.telecom.InCallService;
import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler;
import com.android.dialer.feedback.FeedbackComponent;
import com.android.incallui.audiomode.AudioModeProvider;
import com.android.incallui.call.CallList;
import com.android.incallui.call.ExternalCallList;
@@ -39,6 +40,7 @@ public class InCallServiceImpl extends InCallService {

  private ReturnToCallController returnToCallController;
  private NewReturnToCallController newReturnToCallController;
  private CallList.Listener feedbackListener;

  @Override
  public void onCallAudioStateChanged(CallAudioState audioState) {
@@ -102,6 +104,8 @@ public class InCallServiceImpl extends InCallService {
      newReturnToCallController =
          new NewReturnToCallController(this, ContactInfoCache.getInstance(context));
    }
    feedbackListener = FeedbackComponent.get(context).getCallFeedbackListener();
    CallList.getInstance().addListener(feedbackListener);

    IBinder iBinder = super.onBind(intent);
    Trace.endSection();
@@ -134,6 +138,10 @@ public class InCallServiceImpl extends InCallService {
      newReturnToCallController.tearDown();
      newReturnToCallController = null;
    }
    if (feedbackListener != null) {
      CallList.getInstance().removeListener(feedbackListener);
      feedbackListener = null;
    }
    Trace.endSection();
  }
}
+11 −1
Original line number Diff line number Diff line
@@ -173,6 +173,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
  private List<PhoneAccountHandle> callCapableAccounts;
  private String countryIso;

  private volatile boolean feedbackRequested = false;

  public static String getNumberFromHandle(Uri handle) {
    return handle == null ? "" : handle.getSchemeSpecificPart();
  }
@@ -1450,6 +1452,14 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
    return selectedAvailableVideoTechType;
  }

  public void markFeedbackRequested() {
    feedbackRequested = true;
  }

  public boolean isFeedbackRequested() {
    return feedbackRequested;
  }

  /**
   * Specifies whether a number is in the call history or not. {@link #CALL_HISTORY_STATUS_UNKNOWN}
   * means there is no result.
Loading