From 58eaabcc31e23fd4c071ad911b96da6eea4abc28 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 26 May 2015 16:14:31 -0700 Subject: Refactor Voicemail Playback into standalone view. + Substitutes the existing playback widget in CallDetailActivity, although the plan is to move this to the call log shortly. + Convert the widget from a fragment into a layout. This allows us to more easily create multiple instances of the voicemail widget in the same view, as we intend to do in the call log. + Shift UI-related logic from Presenter to the Layout. + Fix janky seeking, so that it now works correctly consistently rather than sporadically, and doesn't need to buffer again. - Remove the VariableSpeed player formerly used in the Presenter. We don't use this functionality anymore, and this allows us to directly used the framework MediaPlayer (instead of a custom legacy proxy). Bug: 21170557 Bug: 20693172 Change-Id: Ia34f459df10e43763b32fdb0954f83e882664231 --- Android.mk | 3 - res/layout/call_detail.xml | 6 + src/com/android/dialer/CallDetailActivity.java | 74 +- .../android/dialer/calllog/CallLogFragment.java | 2 - .../voicemail/VoicemailPlaybackFragment.java | 378 ----------- .../dialer/voicemail/VoicemailPlaybackLayout.java | 350 ++++++++++ .../voicemail/VoicemailPlaybackPresenter.java | 741 ++++++++------------- .../com/android/dialer/CallDetailActivityTest.java | 6 +- 8 files changed, 682 insertions(+), 878 deletions(-) delete mode 100644 src/com/android/dialer/voicemail/VoicemailPlaybackFragment.java create mode 100644 src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java diff --git a/Android.mk b/Android.mk index 0a93c32b0..1440fcc3f 100644 --- a/Android.mk +++ b/Android.mk @@ -32,7 +32,6 @@ LOCAL_AAPT_FLAGS := \ LOCAL_JAVA_LIBRARIES := telephony-common LOCAL_STATIC_JAVA_LIBRARIES := \ android-common \ - android-ex-variablespeed \ android-support-v13 \ android-support-v4 \ android-support-v7-cardview \ @@ -42,8 +41,6 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ guava \ libphonenumber -LOCAL_REQUIRED_MODULES := libvariablespeed - LOCAL_PACKAGE_NAME := Dialer LOCAL_CERTIFICATE := shared LOCAL_PRIVILEGED_MODULE := true diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml index c07785159..5d1607edf 100644 --- a/res/layout/call_detail.xml +++ b/res/layout/call_detail.xml @@ -87,6 +87,12 @@ + +