diff options
author | twyen <twyen@google.com> | 2017-10-10 12:15:08 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-11 07:06:24 -0700 |
commit | 00623aa60a7908b0709df38632cfa576cb15e33e (patch) | |
tree | 35bbae5a10d673a11eec6f20954305bc2eb9aa4f /java/com/android/incallui/incall/protocol | |
parent | 7b96fb1690255f13591edba01770d2d82c197194 (diff) |
Implement SIM swapping
When the call is still ringing, a new button is added to allow to user to call with the other SIM. A background worker will be created to hang up the phone and redial with the other SIM. The in call UI will be prevented from ending during the process.
Video: https://drive.google.com/a/google.com/file/d/0B2eYBUUznfyTSl9MdXQ0V1ZzQkE/view?usp=sharing
UX has not been finalized, the icon and position are just placeholder.
Bug: 64215256
Test: SwapSimWorkerTest
PiperOrigin-RevId: 171715715
Change-Id: Idb3f486e9fc9a45d4c5e244af2d7d91b075bf0f2
Diffstat (limited to 'java/com/android/incallui/incall/protocol')
3 files changed, 7 insertions, 1 deletions
diff --git a/java/com/android/incallui/incall/protocol/InCallButtonIds.java b/java/com/android/incallui/incall/protocol/InCallButtonIds.java index 50ebc6413..3de533519 100644 --- a/java/com/android/incallui/incall/protocol/InCallButtonIds.java +++ b/java/com/android/incallui/incall/protocol/InCallButtonIds.java @@ -37,6 +37,7 @@ import java.lang.annotation.RetentionPolicy; InCallButtonIds.BUTTON_MANAGE_VIDEO_CONFERENCE, InCallButtonIds.BUTTON_MANAGE_VOICE_CONFERENCE, InCallButtonIds.BUTTON_SWITCH_TO_SECONDARY, + InCallButtonIds.BUTTON_SWAP_SIM, InCallButtonIds.BUTTON_COUNT, }) public @interface InCallButtonIds { @@ -55,5 +56,6 @@ public @interface InCallButtonIds { int BUTTON_MANAGE_VIDEO_CONFERENCE = 11; int BUTTON_MANAGE_VOICE_CONFERENCE = 12; int BUTTON_SWITCH_TO_SECONDARY = 13; - int BUTTON_COUNT = 14; + int BUTTON_SWAP_SIM = 14; + int BUTTON_COUNT = 15; } diff --git a/java/com/android/incallui/incall/protocol/InCallButtonIdsExtension.java b/java/com/android/incallui/incall/protocol/InCallButtonIdsExtension.java index 6d802e346..db6e9009c 100644 --- a/java/com/android/incallui/incall/protocol/InCallButtonIdsExtension.java +++ b/java/com/android/incallui/incall/protocol/InCallButtonIdsExtension.java @@ -54,6 +54,8 @@ public class InCallButtonIdsExtension { return "MANAGE_VOICE_CONFERENCE"; } else if (id == InCallButtonIds.BUTTON_SWITCH_TO_SECONDARY) { return "SWITCH_TO_SECONDARY"; + } else if (id == InCallButtonIds.BUTTON_SWAP_SIM) { + return "SWAP_SIM"; } else { return "INVALID_BUTTON: " + id; } diff --git a/java/com/android/incallui/incall/protocol/InCallButtonUiDelegate.java b/java/com/android/incallui/incall/protocol/InCallButtonUiDelegate.java index e02ada96d..9f9c5fb03 100644 --- a/java/com/android/incallui/incall/protocol/InCallButtonUiDelegate.java +++ b/java/com/android/incallui/incall/protocol/InCallButtonUiDelegate.java @@ -63,5 +63,7 @@ public interface InCallButtonUiDelegate { void showAudioRouteSelector(); + void swapSimClicked(); + Context getContext(); } |