merge in jb-mr1.1-release history after reset to jb-mr1.1-dev
diff --git a/src/com/android/email/activity/ActionBarController.java b/src/com/android/email/activity/ActionBarController.java
index 4a5df7c..ce5888a 100644
--- a/src/com/android/email/activity/ActionBarController.java
+++ b/src/com/android/email/activity/ActionBarController.java
@@ -194,6 +194,8 @@
          * Called when the search box is closed.
          */
         public void onSearchExit();
+
+        public void onUpPressed();
     }
 
     public ActionBarController(Context context, LoaderManager loaderManager,
@@ -235,6 +237,16 @@
                 }
             }
         });
+        // this other click listener handles clicks that ought to be aliased to "up"
+        // only one or the other listener should be active at any time
+        mActionBarCustomView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mCallback.onUpPressed();
+            }
+        });
+        // pick a sane default. later enabled in updateTitle().
+        mActionBarCustomView.setClickable(false);
     }
 
     private void initSearchViews() {
@@ -500,6 +512,8 @@
         }
 
         mAccountSpinner.setEnabled(enabled);
+        mAccountSpinner.setClickable(enabled);
+        mActionBarCustomView.setClickable(!enabled);
         if (enabled) {
             mAccountSpinner.setBackgroundDrawable(mAccountSpinnerDefaultBackground);
         } else {
diff --git a/src/com/android/email/activity/UIControllerOnePane.java b/src/com/android/email/activity/UIControllerOnePane.java
index 2ce9357..05f8e53 100644
--- a/src/com/android/email/activity/UIControllerOnePane.java
+++ b/src/com/android/email/activity/UIControllerOnePane.java
@@ -253,6 +253,11 @@
         public void onSearchExit() {
             UIControllerOnePane.this.onSearchExit();
         }
+
+        @Override
+        public void onUpPressed() {
+            onBackPressed(false);
+        }
     }
 
     public UIControllerOnePane(EmailActivity activity) {
diff --git a/src/com/android/email/activity/UIControllerTwoPane.java b/src/com/android/email/activity/UIControllerTwoPane.java
index b73229f..58914e7 100644
--- a/src/com/android/email/activity/UIControllerTwoPane.java
+++ b/src/com/android/email/activity/UIControllerTwoPane.java
@@ -739,5 +739,10 @@
         public void onSearchExit() {
             UIControllerTwoPane.this.onSearchExit();
         }
+
+        @Override
+        public void onUpPressed() {
+            onBackPressed(false);
+        }
     }
 }