am e8e74e50: am a96723cb: am e5d819c0: am ba5406e0: Merge "Fix ad mode for two pane layout" into ub-gmail-ur14-dev
* commit 'e8e74e50756e9e14cbce0fd8843818a4a196a735':
Fix ad mode for two pane layout
diff --git a/src/com/android/mail/ui/TwoPaneController.java b/src/com/android/mail/ui/TwoPaneController.java
index 9678bc0..525324e 100644
--- a/src/com/android/mail/ui/TwoPaneController.java
+++ b/src/com/android/mail/ui/TwoPaneController.java
@@ -98,8 +98,9 @@
return mCurrentConversationJustPeeking;
}
- private boolean isConversationOnlyMode() {
- return mViewMode.isConversationMode() && !mLayout.shouldShowPreviewPanel();
+ private boolean isHidingConversationList() {
+ return (mViewMode.isConversationMode() || mViewMode.isAdMode()) &&
+ !mLayout.shouldShowPreviewPanel();
}
/**
@@ -351,7 +352,7 @@
public void resetActionBarIcon() {
final ActionBar ab = mActivity.getSupportActionBar();
final boolean isChildFolder = getFolder() != null && !Utils.isEmpty(getFolder().parent);
- if (isConversationOnlyMode() || isChildFolder) {
+ if (isHidingConversationList() || isChildFolder) {
ab.setHomeAsUpIndicator(R.drawable.ic_arrow_back_wht_24dp_with_rtl);
ab.setHomeActionContentDescription(0 /* system default */);
} else {
@@ -519,7 +520,7 @@
*/
@Override
public boolean handleUpPress() {
- if (isConversationOnlyMode()) {
+ if (isHidingConversationList()) {
handleBackPress();
} else {
toggleDrawerState();
diff --git a/src/com/android/mail/ui/TwoPaneLayout.java b/src/com/android/mail/ui/TwoPaneLayout.java
index 6cb674f..0fb882f 100644
--- a/src/com/android/mail/ui/TwoPaneLayout.java
+++ b/src/com/android/mail/ui/TwoPaneLayout.java
@@ -289,7 +289,7 @@
// the conversation is currently not set but this layout/position occurs, throwing off
// this app's view and controller synergy and resulting in an awkward state such as a
// non-responsive TL or an empty grey screen.
- if (ViewMode.isConversationMode(mCurrentMode)) {
+ if (ViewMode.isConversationMode(mCurrentMode) || ViewMode.isAdMode(mCurrentMode)) {
// CV mode
if (isRtl) {
convX = 0;