Merge "Respect orientation of attachment previews." into jb-ub-mail-ur10
diff --git a/src/com/android/mail/browse/SelectedConversationsActionMenu.java b/src/com/android/mail/browse/SelectedConversationsActionMenu.java
index 291beb0..a2dccaf 100644
--- a/src/com/android/mail/browse/SelectedConversationsActionMenu.java
+++ b/src/com/android/mail/browse/SelectedConversationsActionMenu.java
@@ -28,7 +28,6 @@
import com.android.mail.R;
import com.android.mail.analytics.Analytics;
-import com.android.mail.analytics.AnalyticsUtils;
import com.android.mail.providers.Account;
import com.android.mail.providers.AccountObserver;
import com.android.mail.providers.Conversation;
@@ -540,6 +539,8 @@
* the selection conversation set, and internally updates state as necessary.
*/
public void deactivate() {
+ mListController.onCabModeExited();
+
if (mActionMode != null) {
mActivated = false;
mActionMode.finish();
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 72b28e4..43bcd74 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -2447,6 +2447,14 @@
}
@Override
+ public final void onCabModeExited() {
+ final ConversationListFragment convListFragment = getConversationListFragment();
+ if (convListFragment != null && convListFragment.getAnimatedAdapter() != null) {
+ convListFragment.getAnimatedAdapter().onCabModeExited();
+ }
+ }
+
+ @Override
public Conversation getCurrentConversation() {
return mCurrentConversation;
}
diff --git a/src/com/android/mail/ui/AnimatedAdapter.java b/src/com/android/mail/ui/AnimatedAdapter.java
index 97c1467..b083e0b 100644
--- a/src/com/android/mail/ui/AnimatedAdapter.java
+++ b/src/com/android/mail/ui/AnimatedAdapter.java
@@ -1119,6 +1119,12 @@
}
}
+ public void onCabModeExited() {
+ for (final ConversationSpecialItemView specialView : mFleetingViews) {
+ specialView.onCabModeExited();
+ }
+ }
+
public void onScrollStateChanged(final int scrollState) {
final boolean scrolling = scrollState != OnScrollListener.SCROLL_STATE_IDLE;
mBitmapCache.setBlocking(scrolling);
diff --git a/src/com/android/mail/ui/ConversationListCallbacks.java b/src/com/android/mail/ui/ConversationListCallbacks.java
index 370a265..ff3f83c 100644
--- a/src/com/android/mail/ui/ConversationListCallbacks.java
+++ b/src/com/android/mail/ui/ConversationListCallbacks.java
@@ -38,11 +38,15 @@
void onConversationSelected(Conversation conversation, boolean inLoaderCallbacks);
/**
- * Called whenever CAB mode has been entered via
- * long press or selecting a sender image.
+ * Called whenever CAB mode has been entered via long press or selecting a sender image.
*/
void onCabModeEntered();
+ /**
+ * Called whenever CAB mode has been exited.
+ */
+ void onCabModeExited();
+
ConversationCursor getConversationListCursor();
Conversation getCurrentConversation();
diff --git a/src/com/android/mail/ui/ConversationLongPressTipView.java b/src/com/android/mail/ui/ConversationLongPressTipView.java
index e9097f4..a6f5f7b 100644
--- a/src/com/android/mail/ui/ConversationLongPressTipView.java
+++ b/src/com/android/mail/ui/ConversationLongPressTipView.java
@@ -139,6 +139,10 @@
dismiss();
}
+ @Override
+ public void onCabModeExited() {
+ // Do nothing
+ }
@Override
public boolean acceptsUserTaps() {
diff --git a/src/com/android/mail/ui/ConversationPhotoTeaserView.java b/src/com/android/mail/ui/ConversationPhotoTeaserView.java
index 7f371c2..84e6bc1 100644
--- a/src/com/android/mail/ui/ConversationPhotoTeaserView.java
+++ b/src/com/android/mail/ui/ConversationPhotoTeaserView.java
@@ -151,6 +151,10 @@
dismiss();
}
+ @Override
+ public void onCabModeExited() {
+ // Do nothing
+ }
@Override
public boolean acceptsUserTaps() {
diff --git a/src/com/android/mail/ui/ConversationSpecialItemView.java b/src/com/android/mail/ui/ConversationSpecialItemView.java
index c84e4c6..92fc7ac 100644
--- a/src/com/android/mail/ui/ConversationSpecialItemView.java
+++ b/src/com/android/mail/ui/ConversationSpecialItemView.java
@@ -72,6 +72,11 @@
*/
void onCabModeEntered();
+ /**
+ * Called whenever Cab Mode has been exited.
+ */
+ void onCabModeExited();
+
/** Returns whether this special view is enabled (= accepts user taps). */
boolean acceptsUserTaps();
}
diff --git a/src/com/android/mail/ui/ConversationSyncDisabledTipView.java b/src/com/android/mail/ui/ConversationSyncDisabledTipView.java
index f2782d3..f462b06 100644
--- a/src/com/android/mail/ui/ConversationSyncDisabledTipView.java
+++ b/src/com/android/mail/ui/ConversationSyncDisabledTipView.java
@@ -24,7 +24,6 @@
import android.content.res.Resources;
import android.provider.Settings;
import android.text.SpannableString;
-import android.text.SpannableStringBuilder;
import android.text.style.TextAppearanceSpan;
import android.util.AttributeSet;
import android.view.View;
@@ -296,6 +295,11 @@
}
@Override
+ public void onCabModeExited() {
+ // Do nothing
+ }
+
+ @Override
public boolean acceptsUserTaps() {
return true;
}
diff --git a/src/com/android/mail/ui/NestedFolderView.java b/src/com/android/mail/ui/NestedFolderView.java
index dd4d280..856179a 100644
--- a/src/com/android/mail/ui/NestedFolderView.java
+++ b/src/com/android/mail/ui/NestedFolderView.java
@@ -138,6 +138,11 @@
}
@Override
+ public void onCabModeExited() {
+ // Do nothing
+ }
+
+ @Override
public boolean acceptsUserTaps() {
return true;
}