diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-05-15 19:31:05 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-15 19:31:05 +0000 |
commit | 47636a2531e2a1d6c51b1cd3fb6e242f457b2f71 (patch) | |
tree | 2de3818a7fa2c123be648ee01d9e551596f09ae2 /java/com/android/dialer/simulator/impl/SimulatorRttCall.java | |
parent | 21f2f3e1d5eba2cc436b0f1c78d9e354f209287d (diff) | |
parent | 3e2c6b8c22b238c3f3b1d9786a045f0a20615fa0 (diff) |
Merge changes Id53c298a,I7df0ece7,I9f41b1a7,Iffbfa408,I2aac0df1, ...
* changes:
Don't use LoaderManager.getInstance() in dialer.
Implement PhoneNumberCacheLookup
Fix add call button behavior.
Use component for iconography
Move SpamStub to separate package.
Initialize dialpadFragment and searchFragment with FragmentManager when MainSearchController is created
Compress all of dialer's png files.
Delete unused check__SpamStatus methods
Refactor simulator menu and add portal package for adding simulator service later.
Add simulator component in generated root component.
Update DialerCall to use SpamStatus instead of booleans
Added contacts permission screen to speed dial fragment.
Don't crash when cp2 returns a null label.
Register system call log content observer if user enables Phone permission.
Exit multiselect mode when opening the dialpad.
Support missing phone permission in new call log.
Diffstat (limited to 'java/com/android/dialer/simulator/impl/SimulatorRttCall.java')
-rw-r--r-- | java/com/android/dialer/simulator/impl/SimulatorRttCall.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/java/com/android/dialer/simulator/impl/SimulatorRttCall.java b/java/com/android/dialer/simulator/impl/SimulatorRttCall.java index 352b9e4ef..afd897775 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorRttCall.java +++ b/java/com/android/dialer/simulator/impl/SimulatorRttCall.java @@ -21,7 +21,6 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.telecom.Connection; import android.telecom.DisconnectCause; -import android.view.ActionProvider; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.ThreadUtil; @@ -29,28 +28,21 @@ import com.android.dialer.simulator.Simulator; import com.android.dialer.simulator.Simulator.Event; /** Entry point in the simulator to create voice calls. */ -final class SimulatorRttCall +public final class SimulatorRttCall implements SimulatorConnectionService.Listener, SimulatorConnection.Listener { @NonNull private final Context context; @Nullable private String connectionTag; private RttChatBot rttChatBot; - static ActionProvider getActionProvider(@NonNull Context context) { - return new SimulatorSubMenu(context) - .addItem("Incoming call", () -> new SimulatorRttCall(context).addNewIncomingCall(false)) - .addItem("Outgoing call", () -> new SimulatorRttCall(context).addNewOutgoingCall()) - .addItem("Emergency call", () -> new SimulatorRttCall(context).addNewEmergencyCall()); - } - - private SimulatorRttCall(@NonNull Context context) { + public SimulatorRttCall(@NonNull Context context) { this.context = Assert.isNotNull(context); SimulatorConnectionService.addListener(this); SimulatorConnectionService.addListener( new SimulatorConferenceCreator(context, Simulator.CONFERENCE_TYPE_GSM)); } - private void addNewIncomingCall(boolean isSpam) { + public void addNewIncomingCall(boolean isSpam) { String callerId = isSpam ? "+1-661-778-3020" /* Blacklisted custom spam number */ @@ -60,14 +52,14 @@ final class SimulatorRttCall context, callerId, SimulatorSimCallManager.CALL_TYPE_RTT); } - private void addNewOutgoingCall() { + public void addNewOutgoingCall() { String callerId = "+55-31-2128-6800"; // Brazil office. connectionTag = SimulatorSimCallManager.addNewOutgoingCall( context, callerId, SimulatorSimCallManager.CALL_TYPE_RTT); } - private void addNewEmergencyCall() { + public void addNewEmergencyCall() { String callerId = "911"; connectionTag = SimulatorSimCallManager.addNewIncomingCall( |