Merge "Import translations. DO NOT MERGE" into jb-ub-mail
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 2295374..096fcb1 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -61,7 +61,4 @@
     <style name="AccountSpinnerAnchorTextPrimary" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
     </style>
 
-    <style name="AccountSpinnerStyle">
-        <item name="android:layout_width">@dimen/spinner_frame_width</item>
-    </style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 297b3bc..951f43d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -452,6 +452,6 @@
     </style>
 
     <style name="AccountSpinnerStyle">
-        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_width">@dimen/spinner_frame_width</item>
     </style>
 </resources>
diff --git a/src/com/android/mail/providers/MailAppProvider.java b/src/com/android/mail/providers/MailAppProvider.java
index 0dcbfd6..479cea0 100644
--- a/src/com/android/mail/providers/MailAppProvider.java
+++ b/src/com/android/mail/providers/MailAppProvider.java
@@ -318,7 +318,7 @@
     }
 
     /**
-     * Asynchronously ads all of the accounts that are specified by the result set returned by
+     * Asynchronously adds all of the accounts that are specified by the result set returned by
      * {@link ContentProvider#query()} for the specified uri.  The content provider handling the
      * query needs to handle the {@link UIProvider.ACCOUNTS_PROJECTION}
      * Any changes to the underlying provider will automatically be reflected.
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index f90d92a..8d52b26 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -55,8 +55,6 @@
 import android.view.MenuItem;
 import android.view.MotionEvent;
 import android.view.View;
-import android.widget.AbsListView;
-import android.widget.AbsListView.OnScrollListener;
 import android.widget.Toast;
 
 import com.android.mail.ConversationListContext;
@@ -236,8 +234,6 @@
 
     /** The pending destructive action to be carried out before swapping the conversation cursor.*/
     private DestructiveAction mPendingDestruction;
-    /** Indicates if a conversation view is visible. */
-    private boolean mIsConversationVisible;
     protected AsyncRefreshTask mFolderSyncTask;
     // Task for setting any share intents for the account to enabled.
     // This gets cancelled if the user kills the app before it finishes, and
@@ -602,7 +598,6 @@
      */
     @Override
     public void onConversationVisibilityChanged(boolean visible) {
-        mIsConversationVisible = visible;
         return;
     }
 
@@ -1641,7 +1636,6 @@
                                 // Dismiss waiting mode
                                 hideWaitForInitialization();
                             }
-                            initializeShareIntents();
                         } else if (!updatedAccount.isAccountIntialized() && inWaitingMode) {
                             // Update the WaitFragment's account object
                             updateWaitMode();
@@ -1716,33 +1710,6 @@
         }
     }
 
-    private void initializeShareIntents() {
-        Resources res = mContext.getResources();
-        String composeName = res.getString(R.string.compose_component_name);
-        initializeComponent(composeName);
-        String autoSendName = res.getString(R.string.autosend_component_name);
-        initializeComponent(autoSendName);
-    }
-
-    private void initializeComponent(String name) {
-        if (!TextUtils.isEmpty(name)) {
-            final PackageManager pm = mContext.getPackageManager();
-            final ComponentName component = new ComponentName(mContext, name);
-            if (pm.getComponentEnabledSetting(component)
-                    != PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
-                mEnableShareIntents = new AsyncTask<String, Void, Void>() {
-                    @Override
-                    protected Void doInBackground(String... args) {
-                        pm.setComponentEnabledSetting(component,
-                                PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
-                                PackageManager.DONT_KILL_APP);
-                        return null;
-                    }
-                }.execute(name);
-            }
-        }
-    }
-
     /**
      * Destructive actions on Conversations. This class should only be created by controllers, and
      * clients should only require {@link DestructiveAction}s, not specific implementations of the.
@@ -1787,8 +1754,8 @@
 
             // Are we destroying the currently shown conversation? Show the next one.
             if (LogUtils.isLoggable(LOG_TAG, LogUtils.DEBUG)){
-                LogUtils.d(LOG_TAG, "ConversationAction.performAction(): mIsConversationVisible=%b"
-                        + "\nmTarget=%s\nCurrent=%s", mIsConversationVisible,
+                LogUtils.d(LOG_TAG, "ConversationAction.performAction():"
+                        + "\nmTarget=%s\nCurrent=%s",
                         Conversation.toString(mTarget), mCurrentConversation);
             }
 
diff --git a/src/com/android/mail/ui/TwoPaneController.java b/src/com/android/mail/ui/TwoPaneController.java
index 96a3096..8004c1e 100644
--- a/src/com/android/mail/ui/TwoPaneController.java
+++ b/src/com/android/mail/ui/TwoPaneController.java
@@ -141,8 +141,6 @@
 
         // The tablet layout needs to refer to mode changes.
         mViewMode.addListener(mLayout);
-        // The activity controller needs to listen to layout changes.
-        mLayout.setListener(this);
         final boolean isParentInitialized = super.onCreate(savedState);
         return isParentInitialized;
     }
@@ -230,11 +228,6 @@
     }
 
     @Override
-    public void onConversationListVisibilityChanged(boolean visible) {
-        super.onConversationListVisibilityChanged(visible);
-    }
-
-    @Override
     public void resetActionBarIcon() {
         if (mViewMode.isListMode()) {
             mActionBarView.removeBackButton();
diff --git a/src/com/android/mail/ui/TwoPaneLayout.java b/src/com/android/mail/ui/TwoPaneLayout.java
index 7ed1ff5..8d935d2 100644
--- a/src/com/android/mail/ui/TwoPaneLayout.java
+++ b/src/com/android/mail/ui/TwoPaneLayout.java
@@ -511,6 +511,7 @@
             boolean isSearchResult) {
         mContext = context;
         mController = controller;
+        mListener = mController;
         mIsSearchResult = isSearchResult;
 
         Resources res = getResources();
@@ -733,13 +734,6 @@
     }
 
     /**
-     * Sets the {@link LayoutListener} for this object.
-     */
-    public void setListener(LayoutListener listener) {
-        mListener = listener;
-    }
-
-    /**
      * Sets the left position of the conversation list. Used by animators. Not to be used
      * externally.
      * @hide