Bug 1148028 - Remove MOZ_ANDROID_SHARE_OVERLAY. r=vivek,nalexander
authorKalpesh Krishna <kalpeshk2011@gmail.com>
Fri, 27 Nov 2015 12:51:02 -0800
changeset 308621 a39eb15b6fd41717dc962d1f66cec6d2220e26c8
parent 308620 85bf0c3e44fd07810cfcc948cd55ef0b300ea5f8
child 308622 e0a029b6cddea7b1ba91c9ceb5ae3c1636cdf261
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvivek, nalexander
bugs1148028
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1148028 - Remove MOZ_ANDROID_SHARE_OVERLAY. r=vivek,nalexander Fennec ships the Share Overlay everywhere.
configure.in
mobile/android/b2gdroid/confvars.sh
mobile/android/base/AndroidManifest.xml.in
mobile/android/base/android-services.mozbuild
mobile/android/base/locales/moz.build
mobile/android/base/moz.build
mobile/android/base/sync/CommandProcessor.java
mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java
mobile/android/base/sync/setup/activities/SendTabActivity.java
mobile/android/confvars.sh
mobile/android/services/manifests/SyncAndroidManifest_activities.xml.in
--- a/configure.in
+++ b/configure.in
@@ -3756,17 +3756,16 @@ MOZ_ANDROID_HISTORY=
 MOZ_WEBSMS_BACKEND=
 MOZ_ANDROID_BEAM=
 MOZ_LOCALE_SWITCHER=
 MOZ_ANDROID_READING_LIST_SERVICE=
 MOZ_ANDROID_SEARCH_ACTIVITY=
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=
 MOZ_ANDROID_GCM=
 MOZ_ANDROID_MLS_STUMBLER=
-MOZ_ANDROID_SHARE_OVERLAY=
 MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
 MOZ_INSTALL_TRACKING=
 MOZ_SWITCHBOARD=
 ACCESSIBILITY=1
 MOZ_TIME_MANAGER=
 MOZ_SIMPLEPUSH=
 MOZ_PAY=
 MOZ_AUDIO_CHANNEL_MANAGER=
@@ -4858,23 +4857,16 @@ fi
 
 dnl ========================================================
 dnl = Include Mozilla Location Service Stumbler on Android
 dnl ========================================================
 if test -n "$MOZ_ANDROID_MLS_STUMBLER"; then
     AC_DEFINE(MOZ_ANDROID_MLS_STUMBLER)
 fi
 
-dnl ========================================================
-dnl = Include share overlay on Android
-dnl ========================================================
-if test -n "$MOZ_ANDROID_SHARE_OVERLAY"; then
-    AC_DEFINE(MOZ_ANDROID_SHARE_OVERLAY)
-fi
-
 dnl = Include Tab Queue on Android
 dnl = Temporary build flag to allow development in Nightly
 dnl ========================================================
 if test -n "$MOZ_ANDROID_TAB_QUEUE"; then
     AC_DEFINE(MOZ_ANDROID_TAB_QUEUE)
 fi
 
 dnl =========================================================
@@ -8588,17 +8580,16 @@ AC_SUBST(MOZ_ANDROID_HISTORY)
 AC_SUBST(MOZ_WEBSMS_BACKEND)
 AC_SUBST(MOZ_ANDROID_BEAM)
 AC_SUBST(MOZ_LOCALE_SWITCHER)
 AC_SUBST(MOZ_DISABLE_GECKOVIEW)
 AC_SUBST(MOZ_ANDROID_GCM)
 AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
 AC_SUBST(MOZ_ANDROID_READING_LIST_SERVICE)
 AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
-AC_SUBST(MOZ_ANDROID_SHARE_OVERLAY)
 AC_SUBST(MOZ_ANDROID_TAB_QUEUE)
 AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
 AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
 AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
 AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
 AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)
 AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
 AC_SUBST(MOZ_INSTALL_TRACKING)
--- a/mobile/android/b2gdroid/confvars.sh
+++ b/mobile/android/b2gdroid/confvars.sh
@@ -86,19 +86,16 @@ if test "$RELEASE_BUILD"; then
 if test "$MOZ_NATIVE_DEVICES"; then
   MOZ_INSTALL_TRACKING=1
 fi
 fi
 
 # Mark as WebGL conformant
 MOZ_WEBGL_CONFORMANT=1
 
-# Enable the share handler.
-MOZ_ANDROID_SHARE_OVERLAY=1
-
 # Enable Tab Queue
 if test "$NIGHTLY_BUILD"; then
   MOZ_ANDROID_TAB_QUEUE=1
 fi
 
 # Use the low-memory GC tuning.
 export JS_GC_SMALL_CHUNK_SIZE=1
 
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -418,17 +418,16 @@
                   android:theme="@style/Gecko.Preferences"
                   android:configChanges="orientation|screenSize|locale|layoutDirection"
                   android:excludeFromRecents="true"/>
 
         <provider android:name="org.mozilla.gecko.db.BrowserProvider"
                   android:authorities="@ANDROID_PACKAGE_NAME@.db.browser"
                   android:permission="@ANDROID_PACKAGE_NAME@.permissions.BROWSER_PROVIDER"/>
 
-#ifdef MOZ_ANDROID_SHARE_OVERLAY
         <!-- Share overlay activity
 
              Setting launchMode="singleTop" ensures onNewIntent is called when the Activity is
              reused. Ideally we create a new instance but Android L breaks this (bug 1137928). -->
         <activity android:name="org.mozilla.gecko.overlays.ui.ShareDialog"
                   android:label="@string/overlay_share_label"
                   android:theme="@style/OverlayActivity"
                   android:configChanges="keyboard|keyboardHidden|mcc|mnc|locale|layoutDirection"
@@ -440,17 +439,17 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:mimeType="text/plain" />
             </intent-filter>
 
         </activity>
 
         <!-- Service to handle requests from overlays. -->
         <service android:name="org.mozilla.gecko.overlays.service.OverlayActionService" />
-#endif
+
         <!--
           Ensure that passwords provider runs in its own process. (Bug 718760.)
           Process name is per-application to avoid loading CPs from multiple
           Fennec versions into the same process. (Bug 749727.)
           Process name is a mangled version to avoid a Talos bug. (Bug 750548.)
           -->
         <provider android:name="org.mozilla.gecko.db.PasswordsProvider"
                   android:label="@string/sync_configure_engines_title_passwords"
--- a/mobile/android/base/android-services.mozbuild
+++ b/mobile/android/base/android-services.mozbuild
@@ -1092,19 +1092,17 @@ sync_java_files = [
     'sync/repositories/Server11RepositorySession.java',
     'sync/repositories/StoreFailedException.java',
     'sync/repositories/StoreTracker.java',
     'sync/repositories/StoreTrackingRepositorySession.java',
     'sync/Server11PreviousPostFailedException.java',
     'sync/Server11RecordPostFailedException.java',
     'sync/setup/activities/AccountActivity.java',
     'sync/setup/activities/ActivityUtils.java',
-    'sync/setup/activities/ClientRecordArrayAdapter.java',
     'sync/setup/activities/RedirectToSetupActivity.java',
-    'sync/setup/activities/SendTabActivity.java',
     'sync/setup/activities/SendTabData.java',
     'sync/setup/activities/SetupFailureActivity.java',
     'sync/setup/activities/SetupSuccessActivity.java',
     'sync/setup/activities/SetupSyncActivity.java',
     'sync/setup/activities/SyncActivity.java',
     'sync/setup/activities/WebURLFinder.java',
     'sync/setup/activities/WebViewActivity.java',
     'sync/setup/auth/AccountAuthenticator.java',
--- a/mobile/android/base/locales/moz.build
+++ b/mobile/android/base/locales/moz.build
@@ -1,11 +1,8 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']:
     DEFINES['MOZ_ANDROID_SEARCH_ACTIVITY'] = 1
-
-if CONFIG['MOZ_ANDROID_SHARE_OVERLAY']:
-    DEFINES['MOZ_ANDROID_SHARE_OVERLAY'] = 1
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -431,16 +431,28 @@ gbjar.sources += [
     'menu/QuickShareBarActionView.java',
     'MotionEventInterceptor.java',
     'NotificationClient.java',
     'NotificationHandler.java',
     'NotificationHelper.java',
     'NotificationService.java',
     'NSSBridge.java',
     'OrderedBroadcastHelper.java',
+    'overlays/OverlayConstants.java',
+    'overlays/service/OverlayActionService.java',
+    'overlays/service/ShareData.java',
+    'overlays/service/sharemethods/AddBookmark.java',
+    'overlays/service/sharemethods/AddToReadingList.java',
+    'overlays/service/sharemethods/SendTab.java',
+    'overlays/service/sharemethods/ShareMethod.java',
+    'overlays/ui/OverlayDialogButton.java',
+    'overlays/ui/SendTabDeviceListArrayAdapter.java',
+    'overlays/ui/SendTabList.java',
+    'overlays/ui/SendTabTargetSelectedListener.java',
+    'overlays/ui/ShareDialog.java',
     'preferences/AlignRightLinkPreference.java',
     'preferences/AndroidImport.java',
     'preferences/AndroidImportPreference.java',
     'preferences/ClearOnShutdownPref.java',
     'preferences/CustomCheckBoxPreference.java',
     'preferences/CustomListCategory.java',
     'preferences/CustomListPreference.java',
     'preferences/DistroSharedPrefsImport.java',
@@ -627,32 +639,16 @@ gbjar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     'constants.jar'
 ]
 if CONFIG['MOZ_CRASHREPORTER']:
     gbjar.sources += [ 'CrashReporter.java' ]
     ANDROID_RES_DIRS += [ 'crashreporter/res' ]
 
-if CONFIG['MOZ_ANDROID_SHARE_OVERLAY']:
-    gbjar.sources += [
-        'overlays/OverlayConstants.java',
-        'overlays/service/OverlayActionService.java',
-        'overlays/service/ShareData.java',
-        'overlays/service/sharemethods/AddBookmark.java',
-        'overlays/service/sharemethods/AddToReadingList.java',
-        'overlays/service/sharemethods/SendTab.java',
-        'overlays/service/sharemethods/ShareMethod.java',
-        'overlays/ui/OverlayDialogButton.java',
-        'overlays/ui/SendTabDeviceListArrayAdapter.java',
-        'overlays/ui/SendTabList.java',
-        'overlays/ui/SendTabTargetSelectedListener.java',
-        'overlays/ui/ShareDialog.java',
-    ]
-
 if (CONFIG['MOZ_ANDROID_MAX_SDK_VERSION']):
     max_sdk_version = int(CONFIG['MOZ_ANDROID_MAX_SDK_VERSION'])
 else:
     max_sdk_version = 999
 
 # Only bother to include new tablet code if we're building for tablet-capable
 # OS releases.
 if max_sdk_version >= 11:
@@ -875,17 +871,17 @@ ANDROID_ASSETS_DIRS += [
     '/mobile/android/app/assets',
 ]
 
 # We do not expose MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN here because that
 # would leak the value to build logs.  Instead we expose the token quietly where
 # appropriate in Makefile.in.
 for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZ_DEBUG',
             'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
-            'MOZ_ANDROID_SHARE_OVERLAY', 'MOZ_ANDROID_DOWNLOADS_INTEGRATION', 'MOZ_INSTALL_TRACKING',
+            'MOZ_ANDROID_DOWNLOADS_INTEGRATION', 'MOZ_INSTALL_TRACKING',
             'MOZ_ANDROID_GCM', 'MOZ_ANDROID_TAB_QUEUE'):
     if CONFIG[var]:
         DEFINES[var] = 1
 
 for var in ('MOZ_UPDATER', 'MOZ_PKG_SPECIAL', 'MOZ_ANDROID_GCM_SENDERID'):
     if CONFIG[var]:
         DEFINES[var] = CONFIG[var]
 
--- a/mobile/android/base/sync/CommandProcessor.java
+++ b/mobile/android/base/sync/CommandProcessor.java
@@ -25,18 +25,17 @@ import java.util.concurrent.atomic.Atomi
 /**
  * Process commands received from Sync clients.
  * <p>
  * We need a command processor at two different times:
  * <ol>
  * <li>We execute commands during the "clients" engine stage of a Sync. Each
  * command takes a <code>GlobalSession</code> instance as a parameter.</li>
  * <li>We queue commands to be executed or propagated to other Sync clients
- * during an activity completely unrelated to a sync (such as
- * <code>SendTabActivity</code>.)</li>
+ * during an activity completely unrelated to a sync</li>
  * </ol>
  * To provide a processor for both these time frames, we maintain a static
  * long-lived singleton.
  */
 public class CommandProcessor {
   private static final String LOG_TAG = "Command";
   private static final AtomicInteger currentId = new AtomicInteger();
   protected ConcurrentHashMap<String, CommandRunner> commands = new ConcurrentHashMap<String, CommandRunner>();
deleted file mode 100644
--- a/mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.setup.activities;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
-
-import android.content.Context;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.CheckBox;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-public class ClientRecordArrayAdapter extends ArrayAdapter<ClientRecord> {
-  public static final String LOG_TAG = "ClientRecArrayAdapter";
-
-  private boolean[] checkedItems;
-  private final SendTabActivity sendTabActivity;
-
-  public ClientRecordArrayAdapter(Context context,
-                                  int textViewResourceId) {
-    super(context, textViewResourceId, new ArrayList<ClientRecord>());
-    this.checkedItems = new boolean[0];
-    this.sendTabActivity = (SendTabActivity) context;
-  }
-
-  public synchronized void setClientRecordList(final Collection<ClientRecord> clientRecordList) {
-    this.clear();
-    this.checkedItems = new boolean[clientRecordList.size()];
-    for (ClientRecord clientRecord : clientRecordList) {
-      this.add(clientRecord);
-    }
-    this.notifyDataSetChanged();
-  }
-
-  /**
-   * If we have only a single client record in the list, mark it as checked.
-   */
-  public synchronized void checkItem(final int position, boolean checked) throws ArrayIndexOutOfBoundsException {
-    if (position < 0 ||
-        position >= checkedItems.length) {
-      throw new ArrayIndexOutOfBoundsException(position);
-    }
-
-    if (setRowChecked(position, true)) {
-      this.notifyDataSetChanged();
-    }
-  }
-
-  /**
-   * Set the specified row to the specified checked state.
-   * @param position an index.
-   * @param checked whether the checkbox should be checked.
-   * @return <code>true</code> if the state changed, <code>false</code> if the
-   *         box was already in the requested state.
-   */
-  protected synchronized boolean setRowChecked(int position, boolean checked) {
-    boolean current = checkedItems[position];
-    if (current == checked) {
-      return false;
-    }
-
-    checkedItems[position] = checked;
-    sendTabActivity.enableSend(getNumCheckedGUIDs() > 0);
-
-    return true;
-  }
-
-  @Override
-  public View getView(final int position, View convertView, ViewGroup parent) {
-    final Context context = this.getContext();
-
-    // Reuse View objects if they exist.
-    View row = convertView;
-    if (row == null) {
-      row = View.inflate(context, R.layout.sync_list_item, null);
-      setSelectable(row, true);
-      row.setBackgroundResource(android.R.drawable.menuitem_background);
-    }
-
-    final ClientRecord clientRecord = this.getItem(position);
-    ImageView clientType = (ImageView) row.findViewById(R.id.img);
-    TextView clientName = (TextView) row.findViewById(R.id.client_name);
-
-    // Set up checkbox and restore stored state.
-    CheckBox checkbox = (CheckBox) row.findViewById(R.id.check);
-    checkbox.setChecked(checkedItems[position]);
-    setSelectable(checkbox, false);
-
-    clientName.setText(clientRecord.name);
-    clientType.setImageResource(getImage(clientRecord));
-
-    row.setOnClickListener(new OnClickListener() {
-      @Override
-      public void onClick(View view) {
-        final CheckBox item = (CheckBox) view.findViewById(R.id.check);
-
-        // Update the checked item, both in the UI and in our internal state.
-        final boolean checked = !item.isChecked();    // Because it hasn't happened yet.
-        item.setChecked(checked);
-        setRowChecked(position, checked);
-      }
-    });
-
-    return row;
-  }
-
-  /**
-   * Get list of checked GUIDs.
-   *
-   * @return non-null list.
-   */
-  public synchronized List<String> getCheckedGUIDs() {
-    final List<String> guids = new ArrayList<String>();
-    for (int i = 0; i < checkedItems.length; i++) {
-      if (checkedItems[i]) {
-        guids.add(this.getItem(i).guid);
-      }
-    }
-    return guids;
-  }
-
-  /**
-   * Get number of checked GUIDs.
-   *
-   * @return non-negative integer.
-   */
-  public synchronized int getNumCheckedGUIDs() {
-    int numCheckedGUIDs = 0;
-    for (int i = 0; i < checkedItems.length; i++) {
-      if (checkedItems[i]) {
-        numCheckedGUIDs += 1;
-      }
-    }
-    return numCheckedGUIDs;
-  }
-
-  private int getImage(ClientRecord record) {
-    if ("mobile".equals(record.type)) {
-      return R.drawable.sync_mobile;
-    }
-    return R.drawable.sync_desktop;
-  }
-
-  private void setSelectable(View view, boolean selectable) {
-    view.setClickable(selectable);
-    view.setFocusable(selectable);
-  }
-}
deleted file mode 100644
--- a/mobile/android/base/sync/setup/activities/SendTabActivity.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.setup.activities;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.background.common.log.Logger;
-import org.mozilla.gecko.fxa.FirefoxAccounts;
-import org.mozilla.gecko.fxa.FxAccountConstants;
-import org.mozilla.gecko.fxa.activities.FxAccountGetStartedActivity;
-import org.mozilla.gecko.fxa.activities.FxAccountStatusActivity;
-import org.mozilla.gecko.fxa.activities.FxAccountWebFlowActivity;
-import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount;
-import org.mozilla.gecko.fxa.login.State.Action;
-import org.mozilla.gecko.sync.CommandProcessor;
-import org.mozilla.gecko.sync.CommandRunner;
-import org.mozilla.gecko.sync.GlobalSession;
-import org.mozilla.gecko.sync.SyncConfiguration;
-import org.mozilla.gecko.sync.SyncConstants;
-import org.mozilla.gecko.sync.repositories.NullCursorException;
-import org.mozilla.gecko.sync.repositories.android.ClientsDatabaseAccessor;
-import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
-import org.mozilla.gecko.sync.setup.SyncAccounts;
-import org.mozilla.gecko.Locales.LocaleAwareActivity;
-import org.mozilla.gecko.sync.syncadapter.SyncAdapter;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class SendTabActivity extends LocaleAwareActivity {
-  private interface TabSender {
-    public static final String[] STAGES_TO_SYNC = new String[] { "clients", "tabs" };
-
-    /**
-     * @return Return null if the account isn't correctly initialized. Return
-     *         the account GUID otherwise.
-     */
-    String getAccountGUID();
-
-    /**
-     * Sync this account, specifying only clients and tabs as the engines to sync.
-     */
-    void sync();
-  }
-
-  private static class FxAccountTabSender implements TabSender {
-    private final AndroidFxAccount fxAccount;
-
-    public FxAccountTabSender(Context context, AndroidFxAccount fxAccount) {
-      this.fxAccount = fxAccount;
-    }
-
-    @Override
-    public String getAccountGUID() {
-      try {
-        final SharedPreferences prefs = this.fxAccount.getSyncPrefs();
-        return prefs.getString(SyncConfiguration.PREF_ACCOUNT_GUID, null);
-      } catch (Exception e) {
-        Logger.warn(LOG_TAG, "Could not get Firefox Account parameters or preferences; aborting.");
-        return null;
-      }
-    }
-
-    @Override
-    public void sync() {
-      fxAccount.requestSync(FirefoxAccounts.FORCE, STAGES_TO_SYNC, null);
-    }
-  }
-
-  private static class Sync11TabSender implements TabSender {
-    private final Account account;
-    private final AccountManager accountManager;
-    private final Context context;
-
-    private Sync11TabSender(Context context, Account syncAccount, AccountManager accountManager) {
-      this.context = context;
-      this.account = syncAccount;
-      this.accountManager = accountManager;
-    }
-
-    @Override
-    public String getAccountGUID() {
-      try {
-        final SharedPreferences prefs = SyncAccounts.blockingPrefsFromDefaultProfileV0(this.context, this.accountManager, this.account);
-        return prefs.getString(SyncConfiguration.PREF_ACCOUNT_GUID, null);
-      } catch (Exception e) {
-        Logger.warn(LOG_TAG, "Could not get Sync account parameters or preferences; aborting.");
-        return null;
-      }
-    }
-
-    @Override
-    public void sync() {
-      SyncAdapter.requestImmediateSync(this.account, STAGES_TO_SYNC);
-    }
-  }
-
-  public static final String LOG_TAG = "SendTabActivity";
-  private ClientRecordArrayAdapter arrayAdapter;
-
-  private TabSender tabSender;
-  private SendTabData sendTabData;
-
-  @Override
-  public void onCreate(Bundle savedInstanceState) {
-    super.onCreate(savedInstanceState);
-
-    try {
-      sendTabData = getSendTabData(getIntent());
-    } catch (IllegalArgumentException e) {
-      notifyAndFinish(false);
-      return;
-    }
-
-    setContentView(R.layout.sync_send_tab);
-
-    final ListView listview = (ListView) findViewById(R.id.device_list);
-    listview.setItemsCanFocus(true);
-    listview.setTextFilterEnabled(true);
-    listview.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
-
-    arrayAdapter = new ClientRecordArrayAdapter(this, R.layout.sync_list_item);
-    listview.setAdapter(arrayAdapter);
-
-    TextView textView = (TextView) findViewById(R.id.title);
-    textView.setText(sendTabData.title);
-
-    textView = (TextView) findViewById(R.id.uri);
-    textView.setText(sendTabData.uri);
-
-    enableSend(false);
-
-    // Sending will be enabled in onResume, if appropriate.
-  }
-
-  protected static SendTabData getSendTabData(Intent intent) throws IllegalArgumentException {
-    if (intent == null) {
-      Logger.warn(LOG_TAG, "intent was null; aborting without sending tab.");
-      throw new IllegalArgumentException();
-    }
-
-    Bundle extras = intent.getExtras();
-    if (extras == null) {
-      Logger.warn(LOG_TAG, "extras was null; aborting without sending tab.");
-      throw new IllegalArgumentException();
-    }
-
-    SendTabData sendTabData = SendTabData.fromBundle(extras);
-    if (sendTabData == null) {
-      Logger.warn(LOG_TAG, "send tab data was null; aborting without sending tab.");
-      throw new IllegalArgumentException();
-    }
-
-    if (sendTabData.uri == null) {
-      Logger.warn(LOG_TAG, "uri was null; aborting without sending tab.");
-      throw new IllegalArgumentException();
-    }
-
-    if (sendTabData.title == null) {
-      Logger.warn(LOG_TAG, "title was null; ignoring and sending tab anyway.");
-    }
-
-    return sendTabData;
-  }
-
-  /**
-   * Ensure that the view's list of clients is backed by a recently populated
-   * array adapter.
-   */
-  protected synchronized void updateClientList(final TabSender sender, final ClientRecordArrayAdapter adapter) {
-    // Fetching the client list hits the clients database, so we spin this onto
-    // a background task.
-    new AsyncTask<Void, Void, Collection<ClientRecord>>() {
-
-      @Override
-      protected Collection<ClientRecord> doInBackground(Void... params) {
-        return getOtherClients(sender);
-      }
-
-      @Override
-      protected void onPostExecute(final Collection<ClientRecord> clientArray) {
-        // We're allowed to update the UI from here.
-
-        Logger.debug(LOG_TAG, "Got " + clientArray.size() + " clients.");
-        adapter.setClientRecordList(clientArray);
-        if (clientArray.size() == 1) {
-          adapter.checkItem(0, true);
-        }
-
-        enableSend(adapter.getNumCheckedGUIDs() > 0);
-      }
-    }.execute();
-  }
-
-  @Override
-  public void onResume() {
-    ActivityUtils.prepareLogging();
-    Logger.info(LOG_TAG, "Called SendTabActivity.onResume.");
-    super.onResume();
-
-    /*
-     * First, decide if we are able to send anything.
-     */
-    final Context applicationContext = getApplicationContext();
-    final AccountManager accountManager = AccountManager.get(applicationContext);
-
-    final Account[] fxAccounts = accountManager.getAccountsByType(FxAccountConstants.ACCOUNT_TYPE);
-    if (fxAccounts.length > 0) {
-      final AndroidFxAccount fxAccount = new AndroidFxAccount(applicationContext, fxAccounts[0]);
-      if (fxAccount.getState().getNeededAction() != Action.None) {
-        // We have a Firefox Account, but it's definitely not able to send a tab
-        // right now. Redirect to the status activity.
-        Logger.warn(LOG_TAG, "Firefox Account named like " + fxAccount.getObfuscatedEmail() +
-            " needs action before it can send a tab; redirecting to status activity.");
-        redirectToNewTask(FxAccountStatusActivity.class, false);
-        return;
-      }
-
-      this.tabSender = new FxAccountTabSender(applicationContext, fxAccount);
-
-      // will enableSend if appropriate.
-      updateClientList(tabSender, this.arrayAdapter);
-
-      Logger.info(LOG_TAG, "Allowing tab send for Firefox Account.");
-      registerDisplayURICommand();
-      return;
-    }
-
-    final Account[] syncAccounts = accountManager.getAccountsByType(SyncConstants.ACCOUNTTYPE_SYNC);
-    if (syncAccounts.length > 0) {
-      this.tabSender = new Sync11TabSender(applicationContext, syncAccounts[0], accountManager);
-
-      // will enableSend if appropriate.
-      updateClientList(tabSender, this.arrayAdapter);
-
-      Logger.info(LOG_TAG, "Allowing tab send for Sync account.");
-      registerDisplayURICommand();
-      return;
-    }
-
-    // Offer to set up a Firefox Account, and finish this activity.
-    final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_GET_STARTED);
-    intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
-    startActivity(intent);
-    notifyAndFinish(false);
-  }
-
-  private static void registerDisplayURICommand() {
-    final CommandProcessor processor = CommandProcessor.getProcessor();
-    processor.registerCommand("displayURI", new CommandRunner(3) {
-      @Override
-      public void executeCommand(final GlobalSession session, List<String> args) {
-        CommandProcessor.displayURI(args, session.getContext());
-      }
-    });
-  }
-
-  public void sendClickHandler(View view) {
-    Logger.info(LOG_TAG, "Send was clicked.");
-    final List<String> remoteClientGuids = arrayAdapter.getCheckedGUIDs();
-
-    if (remoteClientGuids == null) {
-      // Should never happen.
-      Logger.warn(LOG_TAG, "guids was null; aborting without sending tab.");
-      notifyAndFinish(false);
-      return;
-    }
-
-    final TabSender sender = this.tabSender;
-    if (sender == null) {
-      // This should never happen.
-      Logger.warn(LOG_TAG, "tabSender was null; aborting without sending tab.");
-      notifyAndFinish(false);
-      return;
-    }
-
-    // Fetching local client GUID hits the DB, and we want to update the UI
-    // afterward, so we perform the tab sending on another thread.
-    new AsyncTask<Void, Void, Boolean>() {
-
-      @Override
-      protected Boolean doInBackground(Void... params) {
-        final CommandProcessor processor = CommandProcessor.getProcessor();
-
-        final String accountGUID = sender.getAccountGUID();
-        Logger.debug(LOG_TAG, "Retrieved local account GUID '" + accountGUID + "'.");
-        if (accountGUID == null) {
-          return false;
-        }
-
-        for (String remoteClientGuid : remoteClientGuids) {
-          processor.sendURIToClientForDisplay(sendTabData.uri, remoteClientGuid, sendTabData.title, accountGUID, getApplicationContext());
-        }
-
-        Logger.info(LOG_TAG, "Requesting immediate clients stage sync.");
-        sender.sync();
-
-        return true;
-      }
-
-      @Override
-      protected void onPostExecute(final Boolean success) {
-        // We're allowed to update the UI from here.
-        notifyAndFinish(success);
-      }
-    }.execute();
-  }
-
-  /**
-   * Notify the user about sent tabs status and then finish the activity.
-   * <p>
-   * "Success" is a bit of a misnomer: we wrote "displayURI" commands to the local
-   * command database, and they will be sent on next sync. There is no way to
-   * verify that the commands were successfully received by the intended remote
-   * client, so we lie and say they were sent.
-   *
-   * @param success true if tab was sent successfully; false otherwise.
-   */
-  protected void notifyAndFinish(final boolean success) {
-    int textId;
-    if (success) {
-      textId = R.string.sync_text_tab_sent;
-    } else {
-      textId = R.string.sync_text_tab_not_sent;
-    }
-
-    Toast.makeText(this, textId, Toast.LENGTH_LONG).show();
-    finish();
-  }
-
-  public void enableSend(boolean shouldEnable) {
-    View sendButton = findViewById(R.id.send_button);
-    sendButton.setEnabled(shouldEnable);
-    sendButton.setClickable(shouldEnable);
-  }
-
-  /**
-   * @return a map from GUID to client record, including our own.
-   */
-  protected Map<String, ClientRecord> getAllClients() {
-    ClientsDatabaseAccessor db = new ClientsDatabaseAccessor(this.getApplicationContext());
-    try {
-      return db.fetchAllClients();
-    } catch (NullCursorException e) {
-      Logger.warn(LOG_TAG, "NullCursorException while populating device list.", e);
-      return null;
-    } finally {
-      db.close();
-    }
-  }
-
-  /**
-   * @return a collection of client records, excluding our own.
-   */
-  protected Collection<ClientRecord> getOtherClients(final TabSender sender) {
-    if (sender == null) {
-      Logger.warn(LOG_TAG, "No tab sender when fetching other client IDs.");
-      return new ArrayList<ClientRecord>(0);
-    }
-
-    final Map<String, ClientRecord> all = getAllClients();
-    if (all == null) {
-      return new ArrayList<ClientRecord>(0);
-    }
-
-    final String ourGUID = sender.getAccountGUID();
-    if (ourGUID == null) {
-      return all.values();
-    }
-
-    final ArrayList<ClientRecord> out = new ArrayList<ClientRecord>(all.size());
-    for (Entry<String, ClientRecord> entry : all.entrySet()) {
-      if (ourGUID.equals(entry.getKey())) {
-        continue;
-      }
-      out.add(entry.getValue());
-    }
-    return out;
-  }
-
-  // Adapted from FxAccountAbstractActivity.
-  protected void redirectToNewTask(Class<? extends Activity> activityClass, boolean success) {
-    Intent intent = new Intent(this, activityClass);
-    // Per http://stackoverflow.com/a/8992365, this triggers a known bug with
-    // the soft keyboard not being shown for the started activity. Why, Android, why?
-    intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
-    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-    startActivity(intent);
-    notifyAndFinish(success);
-  }
-}
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -82,19 +82,16 @@ fi
 fi
 
 # Mark as WebGL conformant
 MOZ_WEBGL_CONFORMANT=1
 
 # Enable the Search Activity.
 MOZ_ANDROID_SEARCH_ACTIVITY=1
 
-# Enable the share handler.
-MOZ_ANDROID_SHARE_OVERLAY=1
-
 # Enable the Mozilla Location Service stumbler.
 MOZ_ANDROID_MLS_STUMBLER=1
 
 # Enable adding to the system downloads list.
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=1
 
 # Enable Tab Queue
 MOZ_ANDROID_TAB_QUEUE=1
--- a/mobile/android/services/manifests/SyncAndroidManifest_activities.xml.in
+++ b/mobile/android/services/manifests/SyncAndroidManifest_activities.xml.in
@@ -68,27 +68,8 @@
 
         <receiver
             android:name="org.mozilla.gecko.sync.receivers.SyncAccountDeletedReceiver"
             android:permission="@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.permission.PER_ACCOUNT_TYPE">
             <intent-filter>
                 <action android:name="@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.accounts.SYNC_ACCOUNT_DELETED_ACTION"/>
             </intent-filter>
         </receiver>
-
-#ifndef MOZ_ANDROID_SHARE_OVERLAY
-        <activity
-            android:theme="@style/SyncTheme"
-            android:excludeFromRecents="true"
-            android:icon="@drawable/icon"
-            android:label="@string/sync_title_send_tab"
-            android:configChanges="keyboardHidden|orientation|screenSize|locale|layoutDirection"
-            android:windowSoftInputMode="adjustResize|stateHidden"
-            android:taskAffinity="org.mozilla.gecko.sync.setup"
-            android:name="org.mozilla.gecko.sync.setup.activities.SendTabActivity" >
-
-            <intent-filter>
-                <action android:name="android.intent.action.SEND" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="text/plain" />
-            </intent-filter>
-        </activity>
-#endif