diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-26 17:44:24 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-08-27 17:13:29 -0700 |
commit | 3f6442749cd9e483e26d03537bd6098d83001629 (patch) | |
tree | 46efb24d0873fe998c46082c71865458eef7d5d7 | |
parent | ba0f101d90cbcc60a37fa8ef5e1d4e0f205b558a (diff) |
Only show loading text when downloading VM.
In other cases (eg. buffering), just load without showing the text,
since it will likely appear only for a very short time, and give
the appearance of flickering.
Bug: 22333980
Change-Id: Ic2bbba7a2127654aaf12546b177c465c9311ddc1
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 6 |
3 files changed, 3 insertions, 12 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index c1eec8eb3..1ce6ab65c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -111,9 +111,6 @@ <!-- Message to show when there is an error playing back the voicemail. [CHAR LIMIT=40] --> <string name="voicemail_playback_error">Couldn\'t play voicemail</string> - <!-- Message to display before we have prepared the media player, i.e. before we know duration. [CHAR LIMIT=40] --> - <string name="voicemail_buffering">Buffering\u2026</string> - <!-- Message to display whilst we are waiting for the content to be fetched. [CHAR LIMIT=40] --> <string name="voicemail_fetching_content">Loading voicemail\u2026</string> diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java index 4a41c0e33..69c075f80 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java @@ -354,12 +354,6 @@ public class VoicemailPlaybackLayout extends LinearLayout } @Override - public void setIsBuffering() { - disableUiElements(); - mStateText.setText(getString(R.string.voicemail_buffering)); - } - - @Override public void setIsFetchingContent() { disableUiElements(); mStateText.setText(getString(R.string.voicemail_fetching_content)); diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 3479dce90..3f5a489ce 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -85,7 +85,6 @@ public class VoicemailPlaybackPresenter void onSpeakerphoneOn(boolean on); void setClipPosition(int clipPositionInMillis, int clipLengthInMillis); void setFetchContentTimeout(); - void setIsBuffering(); void setIsFetchingContent(); void setPresenter(VoicemailPlaybackPresenter presenter, Uri voicemailUri); } @@ -346,7 +345,6 @@ public class VoicemailPlaybackPresenter * a request to fetch the content asynchronously via {@link #requestContent()}. */ private void checkForContent() { - mView.setIsFetchingContent(); mAsyncTaskExecutor.submit(Tasks.CHECK_FOR_CONTENT, new AsyncTask<Void, Void, Boolean>() { @Override public Boolean doInBackground(Void... params) { @@ -403,6 +401,8 @@ public class VoicemailPlaybackPresenter mFetchResultHandler = new FetchResultHandler(new Handler(), mVoicemailUri); + mView.setIsFetchingContent(); + // Send voicemail fetch request. Intent intent = new Intent(VoicemailContract.ACTION_FETCH_VOICEMAIL, mVoicemailUri); mContext.sendBroadcast(intent); @@ -485,7 +485,7 @@ public class VoicemailPlaybackPresenter mMediaPlayer = null; } - mView.setIsBuffering(); + mView.disableUiElements(); mIsPrepared = false; try { |