From 4b9f28f9f3cc5b580ddb021ebeeb824ca97080ba Mon Sep 17 00:00:00 2001 From: yueg Date: Tue, 6 Feb 2018 17:32:47 -0800 Subject: Bubble layout change. - Flip back-to-call button icon. - Use different button height for portrait and landscape. In order to make it work, we also create new ViewHolder object when bubble shows and remove reset() when bubble hides. Bug: 67605985 Test: NewBubbleImplIntegrationTest, NewBubbleImplTest, NewReturnToCallControllerTest PiperOrigin-RevId: 184768224 Change-Id: If4e613b12e39c647c34f4cb63a7f934043d42ec7 --- .../quantum_ic_exit_to_app_flip_vd_theme_24.xml | 29 ++++++++++++++++++++++ .../quantum_ic_exit_to_app_vd_theme_24.xml | 25 ------------------- .../incallui/NewReturnToCallController.java | 13 +++------- java/com/android/newbubble/NewBubble.java | 3 --- java/com/android/newbubble/stub/NewBubbleStub.java | 3 --- 5 files changed, 32 insertions(+), 41 deletions(-) create mode 100644 assets/quantum/res/drawable/quantum_ic_exit_to_app_flip_vd_theme_24.xml delete mode 100644 assets/quantum/res/drawable/quantum_ic_exit_to_app_vd_theme_24.xml diff --git a/assets/quantum/res/drawable/quantum_ic_exit_to_app_flip_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_exit_to_app_flip_vd_theme_24.xml new file mode 100644 index 000000000..3dfbf2b0e --- /dev/null +++ b/assets/quantum/res/drawable/quantum_ic_exit_to_app_flip_vd_theme_24.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/assets/quantum/res/drawable/quantum_ic_exit_to_app_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_exit_to_app_vd_theme_24.xml deleted file mode 100644 index 5279f0483..000000000 --- a/assets/quantum/res/drawable/quantum_ic_exit_to_app_vd_theme_24.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - \ No newline at end of file diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java index e37b14734..c588dc4e1 100644 --- a/java/com/android/incallui/NewReturnToCallController.java +++ b/java/com/android/incallui/NewReturnToCallController.java @@ -119,14 +119,6 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au } } - private void hideAndReset() { - if (bubble != null) { - bubble.hideAndReset(); - } else { - LogUtil.i("ReturnToCallController.reset", "reset() called without calling show()"); - } - } - private void show() { if (bubble == null) { bubble = startBubble(); @@ -189,7 +181,7 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au if (!TelecomUtil.isInCall(context) || CallList.getInstance().getIncomingCall() != null) { bubble.showText(context.getText(R.string.incall_call_ended)); } - hideAndReset(); + hide(); } else { startContactInfoSearch(); } @@ -258,7 +250,8 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au // Return to call actions.add( Action.builder() - .setIconDrawable(context.getDrawable(R.drawable.quantum_ic_exit_to_app_vd_theme_24)) + .setIconDrawable( + context.getDrawable(R.drawable.quantum_ic_exit_to_app_flip_vd_theme_24)) .setIntent(fullScreen) .setName(context.getText(R.string.bubble_return_to_call)) .setCheckable(false) diff --git a/java/com/android/newbubble/NewBubble.java b/java/com/android/newbubble/NewBubble.java index 8f1be6458..785593c5c 100644 --- a/java/com/android/newbubble/NewBubble.java +++ b/java/com/android/newbubble/NewBubble.java @@ -37,9 +37,6 @@ public interface NewBubble { /** Hide the bubble. */ void hide(); - /** Hide the bubble and reset to initial state */ - void hideAndReset(); - /** Returns whether the bubble is currently visible */ boolean isVisible(); diff --git a/java/com/android/newbubble/stub/NewBubbleStub.java b/java/com/android/newbubble/stub/NewBubbleStub.java index 4079aaaba..f5121cff9 100644 --- a/java/com/android/newbubble/stub/NewBubbleStub.java +++ b/java/com/android/newbubble/stub/NewBubbleStub.java @@ -35,9 +35,6 @@ public class NewBubbleStub implements NewBubble { @Override public void hide() {} - @Override - public void hideAndReset() {} - @Override public boolean isVisible() { return false; -- cgit v1.2.3