From 5fed5c8a59a5042817e4abbb1fb1855e809ab958 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Mon, 10 Jan 2011 16:24:46 -0800 Subject: [PATCH] Don't show "Stop" for loaded attachments There's a case where we show both the "stop" and "view" buttons at the same time. Bug 3138021 Change-Id: Ib12f5dc1e522a04b1cc175626d084ed8bc5c8065 --- src/com/android/email/activity/MessageViewFragmentBase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java index 7bc30c1aa..6d3eade2e 100644 --- a/src/com/android/email/activity/MessageViewFragmentBase.java +++ b/src/com/android/email/activity/MessageViewFragmentBase.java @@ -736,7 +736,10 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O } @Override protected void onPostExecute(Void result) { - if (attachment.cancelButton.getVisibility() != View.VISIBLE) { + // If the load buttons is shown, it's already loaded -- don't show the stop + // button. + if (attachment.cancelButton.getVisibility() != View.VISIBLE + && attachment.loadButton.getVisibility() != View.VISIBLE) { attachment.cancelButton.setVisibility(View.VISIBLE); } }