Bug 1256401 - Part 2: Remove references to b2gdroid. r=fabrice
authorNick Alexander <nalexander@mozilla.com>
Fri, 18 Mar 2016 14:41:51 -0700
changeset 289606 a85b572e0d8cb461253363dc8ac9bfc2f60d953d
parent 289605 315db5f647123174c75253dfd01b5b079789d3f2
child 289607 f7311cafabcba0b9317772633b31e77bcfe1c590
push id30107
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 10:00:23 +0000
treeherdermozilla-central@3587b25bae30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1256401
milestone48.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 1256401 - Part 2: Remove references to b2gdroid. r=fabrice MozReview-Commit-ID: 63yJGdgPbhe
b2g/chrome/content/settings.js
b2g/chrome/content/shell.js
b2g/components/B2GComponents.manifest
b2g/components/moz.build
b2g/gaia/Makefile.in
b2g/gaia/moz.build
build/Makefile.in
devtools/server/actors/webapps.js
dom/activities/ActivitiesService.jsm
dom/apps/AndroidUtils.jsm
dom/apps/AppsUtils.jsm
dom/apps/Webapps.jsm
dom/apps/moz.build
dom/devicestorage/DeviceStorageStatics.cpp
js/xpconnect/loader/mozJSComponentLoader.cpp
layout/style/nsCSSRuleProcessor.cpp
mobile/android/base/resources/values/styles.xml
mobile/android/components/DirectoryProvider.js
mobile/android/components/MobileComponents.manifest
mobile/android/components/moz.build
mobile/android/modules/moz.build
mobile/android/tests/browser/moz.build
old-configure.in
services/common/moz.build
services/moz.build
testing/testsuite-targets.mk
toolkit/modules/AppConstants.jsm
toolkit/mozapps/installer/upload-files-APK.mk
widget/android/nsWindow.cpp
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -118,25 +118,17 @@ SettingsListener.observe('language.curre
   if (!((new RegExp('^' + value + '[^a-z-_] *[,;]?', 'i')).test(intl))) {
     value = value + ', ' + intl;
   } else {
     value = intl;
   }
   Services.prefs.setCharPref(prefName, value);
 
   if (shell.hasStarted() == false) {
-    // On b2gdroid at first run we need to synchronize our wallpaper with
-    // Android one's before bootstrapping.
-    if (AppConstants.MOZ_B2GDROID) {
-      Cc["@mozilla.org/b2g/b2gdroid-setup;1"]
-        .getService().wrappedJSObject.setWallpaper()
-        .then(() => { shell.bootstrap(); });
-    } else {
-      shell.bootstrap();
-    }
+    shell.bootstrap();
   }
 });
 
 // =================== RIL ====================
 (function RILSettingsToPrefs() {
   // DSDS default service IDs
   ['mms', 'sms', 'telephony', 'voicemail'].forEach(function(key) {
     SettingsListener.observe('ril.' + key + '.defaultServiceId', 0,
@@ -354,18 +346,17 @@ setUpdateTrackingId();
         navigator.mozSettings.createLock().set(defaultSetting);
         return;
       }
       // Here we will overwrite the pref with the setting value.
       defaultBranch.setCharPref(prefName, value);
     });
   }
 
-  syncPrefDefault(AppConstants.MOZ_B2GDROID ? 'app.update.url.android'
-                                            : 'app.update.url');
+  syncPrefDefault('app.update.url');
   syncPrefDefault('app.update.channel');
 })();
 
 // ================ Debug ================
 (function Composer2DSettingToPref() {
   //layers.composer.enabled can be enabled in three ways
   //In order of precedence they are:
   //
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -257,21 +257,16 @@ var shell = {
   },
 
   _started: false,
   hasStarted: function shell_hasStarted() {
     return this._started;
   },
 
   bootstrap: function() {
-    if (AppConstants.MOZ_B2GDROID) {
-      Cc["@mozilla.org/b2g/b2gdroid-setup;1"]
-        .getService(Ci.nsIObserver).observe(window, "shell-startup", null);
-    }
-
     window.performance.mark('gecko-shell-bootstrap');
 
     // Before anything, check if we want to start in safe mode.
     SafeMode.check(window).then(() => {
       let startManifestURL =
         Cc['@mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap']
           .getService(Ci.nsISupports).wrappedJSObject.startManifestURL;
 
@@ -734,17 +729,17 @@ var shell = {
       window.fullScreen = true;
     }
 
     shell.handleCmdLine();
   },
 
   handleCmdLine: function() {
     // This isn't supported on devices.
-    if (!isGonk && !AppConstants.MOZ_B2GDROID) {
+    if (!isGonk) {
       let b2gcmds = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"]
                       .getService(Ci.nsISupports);
       let args = b2gcmds.wrappedJSObject.cmdLine;
       try {
         // Returns null if -url is not present.
         let url = args.handleFlagWithParam("url", false);
         if (url) {
           this.sendChromeEvent({type: "mozbrowseropenwindow", url});
--- a/b2g/components/B2GComponents.manifest
+++ b/b2g/components/B2GComponents.manifest
@@ -11,25 +11,22 @@ contract @mozilla.org/content-permission
 
 #ifdef MOZ_UPDATER
 # UpdatePrompt.js
 component {88b3eb21-d072-4e3b-886d-f89d8c49fe59} UpdatePrompt.js
 contract @mozilla.org/updates/update-prompt;1 {88b3eb21-d072-4e3b-886d-f89d8c49fe59}
 category system-update-provider MozillaProvider @mozilla.org/updates/update-prompt;1,{88b3eb21-d072-4e3b-886d-f89d8c49fe59}
 #endif
 
-# On b2gdroid we want to use the android implementation of the directory service.
-#ifndef MOZ_B2GDROID
 #ifdef MOZ_B2G
 # DirectoryProvider.js
 component {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5} DirectoryProvider.js
 contract @mozilla.org/b2g/directory-provider;1 {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5}
 category xpcom-directory-providers b2g-directory-provider @mozilla.org/b2g/directory-provider;1
 #endif
-#endif
 
 # ActivitiesGlue.js
 component {3a54788b-48cc-4ab4-93d6-0d6a8ef74f8e} ActivitiesGlue.js
 contract @mozilla.org/dom/activities/ui-glue;1 {3a54788b-48cc-4ab4-93d6-0d6a8ef74f8e}
 
 # InterAppCommUIGlue.js
 component {879ee66c-e246-11e3-9910-74d02b97e723} InterAppCommUIGlue.js
 contract @mozilla.org/dom/apps/inter-app-comm-ui-glue;1 {879ee66c-e246-11e3-9910-74d02b97e723}
@@ -89,31 +86,29 @@ category update-timer WebappsUpdateTimer
 # FxAccountsUIGlue.js
 component {51875c14-91d7-4b8c-b65d-3549e101228c} FxAccountsUIGlue.js
 contract @mozilla.org/fxaccounts/fxaccounts-ui-glue;1 {51875c14-91d7-4b8c-b65d-3549e101228c}
 
 # HelperAppDialog.js
 component {710322af-e6ae-4b0c-b2c9-1474a87b077e} HelperAppDialog.js
 contract @mozilla.org/helperapplauncherdialog;1 {710322af-e6ae-4b0c-b2c9-1474a87b077e}
 
-#ifndef MOZ_B2GDROID
 #ifndef MOZ_WIDGET_GONK
 component {c83c02c0-5d43-4e3e-987f-9173b313e880} SimulatorScreen.js
 contract @mozilla.org/simulator-screen;1 {c83c02c0-5d43-4e3e-987f-9173b313e880}
 category profile-after-change SimulatorScreen @mozilla.org/simulator-screen;1
 
 component {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e} OopCommandLine.js
 contract @mozilla.org/commandlinehandler/general-startup;1?type=b2goop {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e}
 category command-line-handler m-b2goop @mozilla.org/commandlinehandler/general-startup;1?type=b2goop
 
 component {385993fe-8710-4621-9fb1-00a09d8bec37} CommandLine.js
 contract @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds {385993fe-8710-4621-9fb1-00a09d8bec37}
 category command-line-handler m-b2gcmds @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds
 #endif
-#endif
 
 # BootstrapCommandLine.js
 component {fd663ec8-cf3f-4c2b-aacb-17a6915ccb44} BootstrapCommandLine.js
 contract @mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap {fd663ec8-cf3f-4c2b-aacb-17a6915ccb44}
 category command-line-handler m-b2gbootstrap @mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap
 
 # MobileIdentityUIGlue.js
 component {83dbe26a-81f3-4a75-9541-3d0b7ca496b5} MobileIdentityUIGlue.js
--- a/b2g/components/moz.build
+++ b/b2g/components/moz.build
@@ -38,17 +38,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk
       'OopCommandLine.js',
       'SimulatorScreen.js'
     ]
 
 EXTRA_PP_COMPONENTS += [
     'B2GComponents.manifest',
 ]
 
-if CONFIG['MOZ_B2G'] and not CONFIG['MOZ_B2GDROID']:
+if CONFIG['MOZ_B2G']:
     EXTRA_COMPONENTS += [
         'DirectoryProvider.js',
         'RecoveryService.js',
     ]
 
 if CONFIG['MOZ_UPDATER']:
     EXTRA_COMPONENTS += [
         'UpdatePrompt.js',
--- a/b2g/gaia/Makefile.in
+++ b/b2g/gaia/Makefile.in
@@ -1,22 +1,14 @@
 # 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/.
 
-# For b2gdroid, gaia ends up in the assets/gaia folder in the APK.
-GAIA_PATH := $(if MOZ_B2GDROID,gaia/assets/gaia,gaia/profile)
-
-# For b2gdroid, we disable the screen timeout since this is managed by android.
-# We also limit the app set to the production ones.
-GAIA_OPTIONS := $(if MOZ_B2GDROID, \
-	GAIA_DISTRIBUTION_DIR=distros/b2gdroid \
-	NO_LOCK_SCREEN=1 \
-)
+GAIA_PATH := gaia/profile
 
 GENERATED_DIRS += $(DIST)/bin/$(GAIA_PATH)
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	+$(MAKE) -j1 -C $(GAIADIR) clean
-	+$(GAIA_OPTIONS) $(MAKE) -j1 -C $(GAIADIR) profile
+	+$(MAKE) -j1 -C $(GAIADIR) profile
 	(cd $(GAIADIR)/profile && tar $(TAR_CREATE_FLAGS) - .) | (cd $(ABS_DIST)/bin/$(GAIA_PATH) && tar -xf -)
--- a/b2g/gaia/moz.build
+++ b/b2g/gaia/moz.build
@@ -1,22 +1,20 @@
 # -*- 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 not CONFIG['MOZ_B2GDROID']:
-    # b2gdroid does not build a runner executable, but it does build gaia; see Makefile.in.
-    Program(CONFIG['MOZ_APP_NAME'])
+Program(CONFIG['MOZ_APP_NAME'])
 
-    if CONFIG['OS_ARCH'] == 'WINNT':
-        SOURCES += [
-            'run-b2g.cpp',
-        ]
-        DEFINES['B2G_NAME'] = 'L"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
-        DEFINES['GAIA_PATH'] = 'L"gaia\\\\profile"'
-    else:
-        SOURCES += [
-            'run-b2g.c',
-        ]
-        DEFINES['B2G_NAME'] = '"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
-        DEFINES['GAIA_PATH'] = '"gaia/profile"'
+if CONFIG['OS_ARCH'] == 'WINNT':
+    SOURCES += [
+        'run-b2g.cpp',
+    ]
+    DEFINES['B2G_NAME'] = 'L"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
+    DEFINES['GAIA_PATH'] = 'L"gaia\\\\profile"'
+else:
+    SOURCES += [
+        'run-b2g.c',
+    ]
+    DEFINES['B2G_NAME'] = '"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
+    DEFINES['GAIA_PATH'] = '"gaia/profile"'
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -37,19 +37,16 @@ YCM_FILES := $(topsrcdir)/.ycm_extra_con
 YCM_DEST := $(topobjdir)
 YCM_TARGET := export
 INSTALL_TARGETS += YCM
 
 ifdef MOZTTDIR
 # Install the Firefox OS fonts.
 include $(MOZTTDIR)/fonts.mk
 MOZTT_DEST = $(FINAL_TARGET)/fonts
-ifdef MOZ_B2GDROID
-MOZTT_DEST = $(FINAL_TARGET)/res/fonts
-endif
 MOZTT_FILES = $(patsubst external/moztt/%,$(MOZTTDIR)/%,$(filter external/moztt/%,$(subst :, ,$(PRODUCT_COPY_FILES))))
 INSTALL_TARGETS += MOZTT
 endif
 
 ifdef MOZ_VALGRIND
 _VALGRIND_DIR = $(DEPTH)/_valgrind
 GARBAGE_DIRS += $(_VALGRIND_DIR)
 
--- a/devtools/server/actors/webapps.js
+++ b/devtools/server/actors/webapps.js
@@ -227,17 +227,17 @@ function WebappsActor(aConnection) {
   this._actorPool = new ActorPool(this.conn);
   this.conn.addActorPool(this._actorPool);
 }
 
 WebappsActor.prototype = {
   actorPrefix: "webapps",
 
   // For now, launch and close requests are only supported on B2G products
-  // like devices, mulet/simulators, graphene and b2gdroid.
+  // like devices, mulet/simulators, and graphene.
   // We set that attribute on the prototype in order to allow test
   // to enable this feature.
   supportsLaunch: require("devtools/shared/system").constants.MOZ_B2G,
 
   disconnect: function () {
     try {
       this.unwatchApps();
     } catch(e) {}
--- a/dom/activities/ActivitiesService.jsm
+++ b/dom/activities/ActivitiesService.jsm
@@ -280,27 +280,20 @@ var Activities = {
           }
           case Ci.nsIActivityUIGlueCallback.WEBAPPS_ACTIVITY: {
             debug("Activity choice: " + aResult);
 
             // We have no matching activity registered, let's fire an error.
             // Don't do this check until we have passed to UIGlue so the glue
             // can choose to launch its own activity if needed.
             if (aResults.options.length === 0) {
-              if (AppConstants.MOZ_B2GDROID) {
-                // Fallback on the Android Intent mapper.
-                let glue = Cc["@mozilla.org/dom/activities/android-ui-glue;1"]
-                             .createInstance(Ci.nsIActivityUIGlue);
-                glue.chooseActivity(aMsg.options, aResults.options, getActivityChoice);
-              } else {
                 self.trySendAndCleanup(aMsg.id, "Activity:FireError", {
                   "id": aMsg.id,
                   "error": "NO_PROVIDER"
                 });
-              }
               return;
             }
 
             // The user has cancelled the choice, fire an error.
             if (aResult === -1) {
               self.trySendAndCleanup(aMsg.id, "Activity:FireError", {
                 "id": aMsg.id,
                 "error": "ActivityCanceled"
deleted file mode 100644
--- a/dom/apps/AndroidUtils.jsm
+++ /dev/null
@@ -1,124 +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/. */
-
-const { interfaces: Ci, utils: Cu } = Components;
-
-this.EXPORTED_SYMBOLS = ["AndroidUtils"];
-
-Cu.import("resource://gre/modules/AppsUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Messaging",
-                                  "resource://gre/modules/Messaging.jsm");
-
-var appsRegistry = null;
-
-function debug() {
-  //dump("-*- AndroidUtils " + Array.slice(arguments) + "\n");
-}
-
-// Helper functions to manage Android native apps. We keep them in the
-// registry with a `kind` equals to "android-native" and we also store
-// the package name and class name in the registry.
-// Communication with the android side happens through json messages.
-
-this.AndroidUtils = {
-  init: function(aRegistry) {
-    appsRegistry = aRegistry;
-    Services.obs.addObserver(this, "Android:Apps:Installed", false);
-    Services.obs.addObserver(this, "Android:Apps:Uninstalled", false);
-  },
-
-  uninit: function() {
-    Services.obs.removeObserver(this, "Android:Apps:Installed");
-    Services.obs.removeObserver(this, "Android:Apps:Uninstalled");
-  },
-
-  getOriginAndManifestURL: function(aPackageName) {
-    let origin = "android://" + aPackageName.toLowerCase();
-    let manifestURL = origin + "/manifest.webapp";
-    return [origin, manifestURL];
-  },
-
-  getPackageAndClassFromManifestURL: function(aManifestURL) {
-    debug("getPackageAndClassFromManifestURL " + aManifestURL);
-    let app = appsRegistry.getAppByManifestURL(aManifestURL);
-    if (!app) {
-      debug("No app for " + aManifestURL);
-      return [];
-    }
-    return [app.android_packagename, app.android_classname];
-  },
-
-  buildAndroidAppData: function(aApp) {
-    // Use the package and class name to get a unique origin.
-    // We put the version with the normal case as part of the manifest url.
-    let [origin, manifestURL] =
-      this.getOriginAndManifestURL(aApp.packagename);
-    // We choose 96 as an arbitrary size since we can only get one icon
-    // from Android.
-    let manifest = {
-      name: aApp.name,
-      icons: { "96": aApp.icon }
-    }
-    debug("Origin is " + origin);
-    let appData = {
-      app: {
-        installOrigin: origin,
-        origin: origin,
-        manifest: manifest,
-        manifestURL: manifestURL,
-        manifestHash: AppsUtils.computeHash(JSON.stringify(manifest)),
-        appStatus: Ci.nsIPrincipal.APP_STATUS_INSTALLED,
-        removable: aApp.removable,
-        android_packagename: aApp.packagename,
-        android_classname: aApp.classname
-      },
-      isBrowser: false,
-      isPackage: false
-    };
-
-    return appData;
-  },
-
-  installAndroidApps: function() {
-    return Messaging.sendRequestForResult({ type: "Apps:GetList" }).then(
-      aApps => {
-        debug("Got " + aApps.apps.length + " android apps.");
-        let promises = [];
-        aApps.apps.forEach(app => {
-          debug("App is " + app.name + " removable? " + app.removable);
-          let p = new Promise((aResolveInstall, aRejectInstall) => {
-            let appData = this.buildAndroidAppData(app);
-            appsRegistry.confirmInstall(appData, null, aResolveInstall);
-          });
-          promises.push(p);
-        });
-
-        // Wait for all apps to be installed.
-        return Promise.all(promises);
-      }
-    ).then(appsRegistry._saveApps.bind(appsRegistry));
-  },
-
-  observe: function(aSubject, aTopic, aData) {
-    let data;
-    try {
-      data = JSON.parse(aData);
-    } catch(e) {
-      debug(e);
-      return;
-    }
-
-    if (aTopic == "Android:Apps:Installed") {
-      let appData = this.buildAndroidAppData(data);
-      appsRegistry.confirmInstall(appData);
-    } else if (aTopic == "Android:Apps:Uninstalled") {
-      let [origin, manifestURL] =
-        this.getOriginAndManifestURL(data.packagename);
-      appsRegistry.uninstall(manifestURL);
-    }
-  },
-}
--- a/dom/apps/AppsUtils.jsm
+++ b/dom/apps/AppsUtils.jsm
@@ -127,20 +127,16 @@ function _setAppProperties(aObj, aApp) {
   aObj.kind = aApp.kind;
   aObj.enabled = aApp.enabled !== undefined ? aApp.enabled : true;
   aObj.sideloaded = aApp.sideloaded;
   aObj.extensionVersion = aApp.extensionVersion;
   aObj.blockedStatus =
     aApp.blockedStatus !== undefined ? aApp.blockedStatus
                                      : Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
   aObj.blocklistId = aApp.blocklistId;
-#ifdef MOZ_B2GDROID
-  aObj.android_packagename = aApp.android_packagename;
-  aObj.android_classname = aApp.android_classname;
-#endif
 }
 
 this.AppsUtils = {
   // Clones a app, without the manifest.
   cloneAppObject: function(aApp) {
     let obj = {};
     _setAppProperties(obj, aApp);
     return obj;
--- a/dom/apps/Webapps.jsm
+++ b/dom/apps/Webapps.jsm
@@ -249,21 +249,16 @@ this.DOMApplicationRegistry = {
 
     this.loadAndUpdateApps();
 
     Langpacks.registerRegistryFunctions(MessageBroadcaster.broadcastMessage.bind(MessageBroadcaster),
                                         this._appIdForManifestURL.bind(this),
                                         this.getFullAppByManifestURL.bind(this));
 
     MessageBroadcaster.init(this.getAppByManifestURL);
-
-    if (AppConstants.MOZ_B2GDROID) {
-      Cu.import("resource://gre/modules/AndroidUtils.jsm");
-      AndroidUtils.init(this);
-    }
   },
 
   // loads the current registry, that could be empty on first run.
   loadCurrentRegistry: function() {
     return AppsUtils.loadJSONAsync(this.appsFile).then((aData) => {
       if (!aData) {
         return;
       }
@@ -523,17 +518,17 @@ this.DOMApplicationRegistry = {
           appcache_path: fullAppcachePath
         });
       }
     });
   },
 
   // Installs a 3rd party app.
   installPreinstalledApp: function installPreinstalledApp(aId) {
-    if (!AppConstants.MOZ_B2GDROID && AppConstants.platform !== "gonk") {
+    if (AppConstants.platform !== "gonk") {
       return false;
     }
 
     // In some cases, the app might be already installed under a different ID but
     // with the same manifestURL. In that case, the only content of the webapp will
     // be the id of the old version, which is the one we'll keep.
     let destId  = this.webapps[aId].oldId || aId;
     // We don't need the oldId anymore
@@ -792,24 +787,20 @@ this.DOMApplicationRegistry = {
               appMigrator.observe(null, "webapps-before-update-merge", null);
           } catch(e) {
             debug("Exception running app migration: ");
             debug(e.name + " " + e.message);
             debug("Skipping app migration.");
           }
         }
 
-        if (AppConstants.MOZ_B2GDROID || AppConstants.MOZ_B2G) {
+        if (AppConstants.MOZ_B2G) {
           yield this.installSystemApps();
         }
 
-        if (AppConstants.MOZ_B2GDROID) {
-          yield AndroidUtils.installAndroidApps();
-        }
-
         // At first run, install preloaded apps and set up their permissions.
         for (let id in this.webapps) {
           let isPreinstalled = this.installPreinstalledApp(id);
           this.removeIfHttpsDuplicate(id);
           if (!this.webapps[id]) {
             continue;
           }
           this.updateOfflineCacheForApp(id);
@@ -1204,19 +1195,16 @@ this.DOMApplicationRegistry = {
     if (aTopic == "xpcom-shutdown") {
       this.messages.forEach((function(msgName) {
         ppmm.removeMessageListener(msgName, this);
       }).bind(this));
       Services.obs.removeObserver(this, "xpcom-shutdown");
       Services.obs.removeObserver(this, "memory-pressure");
       cpmm = null;
       ppmm = null;
-      if (AppConstants.MOZ_B2GDROID) {
-        AndroidUtils.uninit();
-      }
     } else if (aTopic == "memory-pressure") {
       // Clear the manifest cache on memory pressure.
       this._manifestCache = {};
     }
   },
 
   // Check extensions to be blocked.
   blockExtensions: function(aExtensions) {
@@ -1360,28 +1348,28 @@ this.DOMApplicationRegistry = {
       return;
     }
 
     // For all the rest (asynchronous), we wait till the registry is ready
     // before processing the message.
     this.registryReady.then( () => {
       switch (aMessage.name) {
         case "Webapps:Install": {
-          if (AppConstants.platform == "android" && !AppConstants.MOZ_B2GDROID) {
+          if (AppConstants.platform == "android") {
             Services.obs.notifyObservers(mm, "webapps-runtime-install", JSON.stringify(msg));
           } else {
             this.doInstall(msg, mm);
           }
           break;
         }
         case "Webapps:GetSelf":
           this.getSelf(msg, mm);
           break;
         case "Webapps:Uninstall":
-          if (AppConstants.platform == "android" && !AppConstants.MOZ_B2GDROID) {
+          if (AppConstants.platform == "android") {
             Services.obs.notifyObservers(mm, "webapps-runtime-uninstall", JSON.stringify(msg));
           } else {
             this.doUninstall(msg, mm);
           }
           break;
         case "Webapps:Launch":
           this.doLaunch(msg, mm);
           break;
@@ -1390,17 +1378,17 @@ this.DOMApplicationRegistry = {
           break;
         case "Webapps:CheckInstalled":
           this.checkInstalled(msg, mm);
           break;
         case "Webapps:GetInstalled":
           this.getInstalled(msg, mm);
           break;
         case "Webapps:InstallPackage": {
-          if (AppConstants.platform == "android" && !AppConstants.MOZ_B2GDROID) {
+          if (AppConstants.platform == "android") {
             Services.obs.notifyObservers(mm, "webapps-runtime-install-package", JSON.stringify(msg));
           } else {
             this.doInstallPackage(msg, mm);
           }
           break;
         }
         case "Webapps:Download":
           this.startDownload(msg.manifestURL);
--- a/dom/apps/moz.build
+++ b/dom/apps/moz.build
@@ -40,21 +40,16 @@ EXTRA_JS_MODULES += [
     'MessageBroadcaster.jsm',
     'OfflineCacheInstaller.jsm',
     'PermissionsInstaller.jsm',
     'PermissionsTable.jsm',
     'StoreTrustAnchor.jsm',
     'UserCustomizations.jsm',
 ]
 
-if CONFIG['MOZ_B2GDROID']:
-    EXTRA_JS_MODULES += [
-        'AndroidUtils.jsm',
-    ]
-
 EXTRA_PP_JS_MODULES += [
     'AppsUtils.jsm',
     'ImportExport.jsm',
     'InterAppCommService.jsm',
     'OperatorApps.jsm',
     'ScriptPreloader.jsm',
     'Webapps.jsm',
 ]
--- a/dom/devicestorage/DeviceStorageStatics.cpp
+++ b/dom/devicestorage/DeviceStorageStatics.cpp
@@ -193,23 +193,16 @@ DeviceStorageStatics::InitDirs()
     NS_NewLocalFile(path, /* aFollowLinks */ true,
                     getter_AddRefs(mDirs[TYPE_MUSIC]));
   }
   if (NS_SUCCEEDED(mozilla::AndroidBridge::GetExternalPublicDirectory(
       NS_LITERAL_STRING(DEVICESTORAGE_SDCARD), path))) {
     NS_NewLocalFile(path, /* aFollowLinks */ true,
                     getter_AddRefs(mDirs[TYPE_SDCARD]));
   }
-#ifdef MOZ_B2GDROID
-  if (NS_SUCCEEDED(mozilla::AndroidBridge::GetExternalPublicDirectory(
-      NS_LITERAL_STRING(DEVICESTORAGE_APPS), path))) {
-    NS_NewLocalFile(path, /* aFollowLinks */ true,
-                    getter_AddRefs(mDirs[TYPE_APPS]));
-  }
-#endif
 
 #elif defined (XP_UNIX)
   dirService->Get(NS_UNIX_XDG_PICTURES_DIR,
                   NS_GET_IID(nsIFile),
                   getter_AddRefs(mDirs[TYPE_PICTURES]));
   dirService->Get(NS_UNIX_XDG_VIDEOS_DIR,
                   NS_GET_IID(nsIFile),
                   getter_AddRefs(mDirs[TYPE_VIDEOS]));
@@ -234,20 +227,18 @@ DeviceStorageStatics::InitDirs()
   // detect when an sdcard is inserted, and use that instead of this.
   dirService->Get(NS_APP_USER_PROFILE_50_DIR, NS_GET_IID(nsIFile),
                   getter_AddRefs(mDirs[TYPE_SDCARD]));
   if (mDirs[TYPE_SDCARD]) {
     mDirs[TYPE_SDCARD]->AppendRelativeNativePath(NS_LITERAL_CSTRING("fake-sdcard"));
   }
 #endif // !MOZ_WIDGET_ANDROID
 
-#ifndef MOZ_B2GDROID
   dirService->Get(NS_APP_USER_PROFILE_50_DIR, NS_GET_IID(nsIFile),
                   getter_AddRefs(mDirs[TYPE_APPS]));
-#endif
 
   if (mDirs[TYPE_APPS]) {
     mDirs[TYPE_APPS]->AppendRelativeNativePath(NS_LITERAL_CSTRING("webapps"));
   }
 #endif // !MOZ_WIDGET_GONK
 
 #ifdef MOZ_WIDGET_GONK
   NS_NewLocalFile(NS_LITERAL_STRING("/data"),
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -293,17 +293,17 @@ mozJSComponentLoader::ReallyInit()
     nsresult rv;
 
     mReuseLoaderGlobal = Preferences::GetBool("jsloader.reuseGlobal");
 
     // XXXkhuey B2G child processes have some sort of preferences race that
     // results in getting the wrong value.
     // But we don't want that on Firefox Mulet as it break most Firefox JSMs...
     // Also disable on debug builds to break js components that rely on this.
-#if defined(MOZ_B2G) && !defined(MOZ_MULET) && !defined(MOZ_B2GDROID) && !defined(DEBUG)
+#if defined(MOZ_B2G) && !defined(MOZ_MULET) && !defined(DEBUG)
     mReuseLoaderGlobal = true;
 #endif
 
     nsCOMPtr<nsIScriptSecurityManager> secman =
         do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID);
     if (!secman)
         return NS_ERROR_FAILURE;
 
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1159,27 +1159,21 @@ InitSystemMetrics()
   }
  
   rv = LookAndFeel::GetInt(LookAndFeel::eIntID_SwipeAnimationEnabled,
                            &metricResult);
   if (NS_SUCCEEDED(rv) && metricResult) {
     sSystemMetrics->AppendElement(nsGkAtoms::swipe_animation_enabled);
   }
 
-// On b2gdroid, make it so that we always have a physical home button from
-// gecko's point of view, event if it's just the Android home button remapped.
-#ifdef MOZ_B2GDROID
-  sSystemMetrics->AppendElement(nsGkAtoms::physical_home_button);
-#else
   rv = LookAndFeel::GetInt(LookAndFeel::eIntID_PhysicalHomeButton,
                            &metricResult);
   if (NS_SUCCEEDED(rv) && metricResult) {
     sSystemMetrics->AppendElement(nsGkAtoms::physical_home_button);
   }
-#endif
 
 #ifdef XP_WIN
   if (NS_SUCCEEDED(
         LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsThemeIdentifier,
                             &metricResult))) {
     nsCSSRuleProcessor::SetWindowsThemeIdentifier(static_cast<uint8_t>(metricResult));
     switch(metricResult) {
       case LookAndFeel::eWindowsTheme_Aero:
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -294,21 +294,17 @@
         <item name="android:minHeight">48dp</item>
         <item name="android:textSize">14sp</item>
     </style>
 
     <!--
         We are overriding the snackbar message style to guarantee a consistent style across Android versions (bug 1217416).
     -->
     <style name="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance" tools:override="true">
-        <!--
-            This is the value of "design_snackbar_text_size". As long as B2Gdroid does not include the
-            Android Design Support Library we cannot reference it here directly.
-        -->
-        <item name="android:textSize">14sp</item>
+        <item name="android:textSize">@dimen/design_snackbar_text_size</item>
         <item name="android:textColor">@android:color/white</item>
     </style>
 
     <!--
         TextAppearance
         Note: Gecko uses light theme as default, while Android uses dark.
         If Android convention has to be followd, the list of colors specified 
         in themes.xml would be inverse, and things would get confusing.
--- a/mobile/android/components/DirectoryProvider.js
+++ b/mobile/android/components/DirectoryProvider.js
@@ -70,19 +70,16 @@ DirectoryProvider.prototype = {
       }
       return new FileUtils.File(env.get("DOWNLOADS_DIRECTORY"));
     } else if (prop == DOWNLOAD_DIR) {
       // Downloads.getSystemDownloadsDirectory is asynchronous, but getFile is
       // synchronous, so just return what the getSystemDownloadsDirectory
       // implementation would have returned.
       let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
       return new FileUtils.File(env.get("DOWNLOADS_DIRECTORY"));
-    } else if (AppConstants.MOZ_B2GDROID && prop === "coreAppsDir") {
-      let dirsvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
-      return dirsvc.get("DefRt", Ci.nsIFile);
     }
 
     // We are retuning null to show failure instead for throwing an error. The
     // interface is called quite a bit and throwing an error is noisy. Returning
     // null works with the way the interface is called [see bug 529077]
     return null;
   },
 
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -23,33 +23,31 @@ contract @mozilla.org/network/protocol/a
 # DirectoryProvider.js
 component {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b} DirectoryProvider.js
 contract @mozilla.org/browser/directory-provider;1 {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b}
 category xpcom-directory-providers browser-directory-provider @mozilla.org/browser/directory-provider;1
 
 # stylesheets
 category agent-style-sheets browser-content-stylesheet chrome://browser/skin/content.css
 
-#ifndef MOZ_B2GDROID
 # SessionStore.js
 component {8c1f07d6-cba3-4226-a315-8bd43d67d032} SessionStore.js
 contract @mozilla.org/browser/sessionstore;1 {8c1f07d6-cba3-4226-a315-8bd43d67d032}
 category app-startup SessionStore service,@mozilla.org/browser/sessionstore;1
 
 # ContentPermissionPrompt.js
 component {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5} ContentPermissionPrompt.js
 contract @mozilla.org/content-permission/prompt;1 {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}
 
 # PromptService.js
 component {9a61149b-2276-4a0a-b79c-be994ad106cf} PromptService.js
 contract @mozilla.org/prompter;1 {9a61149b-2276-4a0a-b79c-be994ad106cf}
 contract @mozilla.org/embedcomp/prompt-service;1 {9a61149b-2276-4a0a-b79c-be994ad106cf}
 component {80dae1e9-e0d2-4974-915f-f97050fa8068} PromptService.js
 contract @mozilla.org/network/authprompt-adapter-factory;1 {80dae1e9-e0d2-4974-915f-f97050fa8068}
-#endif
 
 # ImageBlockingPolicy.js
 component {f55f77f9-d33d-4759-82fc-60db3ee0bb91} ImageBlockingPolicy.js
 contract @mozilla.org/browser/blockimages-policy;1 {f55f77f9-d33d-4759-82fc-60db3ee0bb91}
 category content-policy ImageBlockingPolicy @mozilla.org/browser/blockimages-policy;1
 
 # XPIDialogService.js
 component {c1242012-27d8-477e-a0f1-0b098ffc329b} XPIDialogService.js
@@ -108,13 +106,9 @@ category browser-delayed-startup-finishe
 category update-timer Snippets @mozilla.org/snippets;1,getService,snippets-update-timer,browser.snippets.updateInterval,86400
 
 # ColorPicker.js
 component {430b987f-bb9f-46a3-99a5-241749220b29} ColorPicker.js
 contract @mozilla.org/colorpicker;1 {430b987f-bb9f-46a3-99a5-241749220b29}
 
 # AndroidActivitiesGlue.js
 component {e4deb5f6-d5e3-4fce-bc53-901dd9951c48} AndroidActivitiesGlue.js
-#ifdef MOZ_B2GDROID
-contract @mozilla.org/dom/activities/android-ui-glue;1 {e4deb5f6-d5e3-4fce-bc53-901dd9951c48}
-#else
 contract @mozilla.org/dom/activities/ui-glue;1 {e4deb5f6-d5e3-4fce-bc53-901dd9951c48}
-#endif
--- a/mobile/android/components/moz.build
+++ b/mobile/android/components/moz.build
@@ -13,34 +13,30 @@ XPIDL_MODULE = 'MobileComponents'
 EXTRA_COMPONENTS += [
     'AboutRedirector.js',
     'AddonUpdateService.js',
     'AndroidActivitiesGlue.js',
     'BlocklistPrompt.js',
     'BrowserCLH.js',
     'ColorPicker.js',
     'ContentDispatchChooser.js',
+    'ContentPermissionPrompt.js',
     'DirectoryProvider.js',
+    'FilePicker.js',
+    'HelperAppDialog.js',
     'ImageBlockingPolicy.js',
     'LoginManagerPrompter.js',
     'NSSDialogService.js',
+    'PromptService.js',
+    'SessionStore.js',
+    'SiteSpecificUserAgent.js',
     'Snippets.js',
     'TabSource.js',
     'XPIDialogService.js',
 ]
 
-if not CONFIG['MOZ_B2GDROID']:
-    EXTRA_COMPONENTS += [
-        'ContentPermissionPrompt.js',
-        'FilePicker.js',
-        'HelperAppDialog.js',
-        'PromptService.js',
-        'SessionStore.js',
-        'SiteSpecificUserAgent.js',
-    ]
-
 # Keep it this way if at all possible.  If you need preprocessing,
 # consider adding fields to AppConstants.jsm.
 EXTRA_PP_COMPONENTS += [
     'MobileComponents.manifest',
 ]
 
 DIRS += ['build']
--- a/mobile/android/modules/moz.build
+++ b/mobile/android/modules/moz.build
@@ -6,16 +6,17 @@
 
 EXTRA_JS_MODULES += [
     'Accounts.jsm',
     'AndroidLog.jsm',
     'ContactService.jsm',
     'dbg-browser-actors.js',
     'DelayedInit.jsm',
     'DownloadNotifications.jsm',
+    'FxAccountsWebChannel.jsm',
     'HelperApps.jsm',
     'Home.jsm',
     'HomeProvider.jsm',
     'JavaAddonManager.jsm',
     'JNI.jsm',
     'LightweightThemeConsumer.jsm',
     'MediaPlayerApp.jsm',
     'Messaging.jsm',
@@ -26,13 +27,8 @@ EXTRA_JS_MODULES += [
     'Prompt.jsm',
     'RuntimePermissions.jsm',
     'Sanitizer.jsm',
     'SharedPreferences.jsm',
     'Snackbars.jsm',
     'SSLExceptions.jsm',
     'TabMirror.jsm',
 ]
-
-if not CONFIG['MOZ_B2GDROID']:
-    EXTRA_JS_MODULES += [
-        'FxAccountsWebChannel.jsm',
-    ]
--- a/mobile/android/tests/browser/moz.build
+++ b/mobile/android/tests/browser/moz.build
@@ -4,14 +4,10 @@
 # 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/.
 
 MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
 
 TEST_DIRS += [
     'junit3',
     'robocop/roboextender',
+    'robocop',
 ]
-
-if not CONFIG['MOZ_B2GDROID']:
-    TEST_DIRS += [
-        'robocop',
-    ]
--- a/old-configure.in
+++ b/old-configure.in
@@ -3149,51 +3149,46 @@ fi
 if test -n "$MOZ_GRAPHENE"; then
     AC_DEFINE(MOZ_GRAPHENE)
 fi
 
 if test -n "$MOZ_MULET"; then
     AC_DEFINE(MOZ_MULET)
 fi
 
-if test -n "$MOZ_B2GDROID"; then
-    AC_DEFINE(MOZ_B2GDROID)
-fi
-
 # Propagate feature switches for code written in rust from confvars.sh
 if test -n "$MOZ_RUST"; then
     if test -n "$MOZ_RUST_MP4PARSE"; then
         AC_DEFINE(MOZ_RUST_MP4PARSE)
     fi
 fi
 
 AC_SUBST(MOZ_BUILD_APP)
 AC_SUBST(MOZ_PHOENIX)
 AC_SUBST(MOZ_XULRUNNER)
 AC_SUBST(MOZ_B2G)
 AC_SUBST(MOZ_MULET)
 AC_SUBST(MOZ_B2G_VERSION)
-AC_SUBST(MOZ_B2GDROID)
 
 AC_DEFINE_UNQUOTED(MOZ_BUILD_APP,$MOZ_BUILD_APP)
 
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 if test -z "$gonkdir" ; then
     case "$MOZ_BUILD_APP" in
-    mobile/android | mobile/android/b2gdroid)
+    mobile/android)
         case "$target" in
         *-android*|*-linuxandroid*)
             :
             ;;
         *)
-            AC_MSG_ERROR([You must specify --target=arm-linux-androideabi (or some other valid android target) when building with --enable-application=mobile/android or --enable-application=mobile/android/b2gdroid.
+            AC_MSG_ERROR([You must specify --target=arm-linux-androideabi (or some other valid android target) when building with --enable-application=mobile/android.
              See https://wiki.mozilla.org/Mobile/Fennec/Android#Setup_Fennec_mozconfig for more information about the necessary options])
             ;;
         esac
 
         MOZ_ANDROID_SDK(23, 23.0.1)
         ;;
     esac
 fi
@@ -6283,37 +6278,33 @@ dnl bug 988880: disable startup cache on
 if test -n "$MOZ_B2G"; then
   MOZ_DISABLE_STARTUPCACHE=1
 fi
 if test -n "$MOZ_DISABLE_STARTUPCACHE"; then
   AC_DEFINE(MOZ_DISABLE_STARTUPCACHE)
 fi
 AC_SUBST(MOZ_DISABLE_STARTUPCACHE)
 
-dnl ========================================================
-dnl = Enable packaging Gaia with B2G desktop and b2gdroid
-dnl ========================================================
+dnl =========================================
+dnl = Enable packaging Gaia with B2G desktop
+dnl =========================================
 if test x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
     if test -n "$GAIADIR" -a ! -d "$GAIADIR" ; then
         AC_MSG_ERROR([GAIADIR '$GAIADIR' isn't a valid directory])
     fi
 
     AC_SUBST(GAIADIR)
     if test -n "$GAIADIR" ; then
         AC_DEFINE(PACKAGE_GAIA)
     fi
 
     if test -n "$FXOS_SIMULATOR" -a -z "$GAIADIR" ; then
         AC_MSG_ERROR([FXOS_SIMULATOR=1 requires GAIADIR to be defined])
     fi
 
-    if test "$MOZ_BUILD_APP" = "mobile/android/b2gdroid" -a -z "$GAIADIR"; then
-        AC_MSG_ERROR([GAIADIR needs to be set in b2gdroid builds])
-    fi
-
     if test -n "$FXOS_SIMULATOR" ; then
         AC_DEFINE(FXOS_SIMULATOR)
         AC_SUBST(FXOS_SIMULATOR)
     fi
 fi
 
 dnl ========================================================
 dnl = Enable Radio Interface for B2G (Gonk usually)
--- a/services/common/moz.build
+++ b/services/common/moz.build
@@ -20,17 +20,17 @@ EXTRA_JS_MODULES['services-common'] += [
     'logmanager.js',
     'moz-kinto-client.js',
     'observers.js',
     'rest.js',
     'stringbundle.js',
     'utils.js',
 ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' or CONFIG['MOZ_B2GDROID']:
+if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     EXTRA_JS_MODULES['services-common'] += [
         'hawkclient.js',
         'hawkrequest.js',
         'tokenserverclient.js',
     ]
 
     TESTING_JS_MODULES.services.common += [
         'modules-testing/storageserver.js',
--- a/services/moz.build
+++ b/services/moz.build
@@ -4,19 +4,19 @@
 # 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/.
 
 DIRS += [
     'common',
     'crypto',
 ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' or CONFIG['MOZ_B2GDROID']:
+if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     DIRS += ['fxaccounts']
 
 if CONFIG['MOZ_SERVICES_SYNC']:
     DIRS += ['sync']
 
-if CONFIG['MOZ_B2G'] or CONFIG['MOZ_B2GDROID']:
+if CONFIG['MOZ_B2G']:
     DIRS += ['mobileid']
 
 if CONFIG['MOZ_SERVICES_CLOUDSYNC']:
     DIRS += ['cloudsync']
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -234,20 +234,16 @@ endef
 
 $(foreach name,$(TEST_PKGS),$(eval $(call package_archive,$(name))))
 
 ifeq ($(MOZ_BUILD_APP),mobile/android)
 stage-all: stage-android
 stage-all: stage-instrumentation-tests
 endif
 
-ifeq ($(MOZ_BUILD_APP),mobile/android/b2gdroid)
-stage-all: stage-android
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
 stage-all: stage-b2g
 endif
 
 make-stage-dir:
 	rm -rf $(PKG_STAGE)
 	$(NSINSTALL) -D $(PKG_STAGE)
 	$(NSINSTALL) -D $(PKG_STAGE)/bin
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -215,23 +215,16 @@ this.AppConstants = Object.freeze({
 
   MOZ_B2G_RIL:
 #ifdef MOZ_B2G_RIL
   true,
 #else
   false,
 #endif
 
-  MOZ_B2GDROID:
-#ifdef MOZ_B2GDROID
-  true,
-#else
-  false,
-#endif
-
   MOZ_GRAPHENE:
 #ifdef MOZ_GRAPHENE
   true,
 #else
   false,
 #endif
 
   MOZ_SYSTEM_NSS:
--- a/toolkit/mozapps/installer/upload-files-APK.mk
+++ b/toolkit/mozapps/installer/upload-files-APK.mk
@@ -267,24 +267,16 @@ INNER_MAKE_PACKAGE = \
   $(INNER_CHECK_R_TXT) && \
   $(INNER_MAKE_APK) && \
   $(INNER_ROBOCOP_PACKAGE) && \
   $(INNER_INSTALL_BOUNCER_PACKAGE) && \
   $(INNER_MAKE_GECKOLIBS_AAR) && \
   $(INNER_MAKE_GECKOVIEW_LIBRARY)
 endif
 
-ifeq ($(MOZ_BUILD_APP),mobile/android/b2gdroid)
-INNER_MAKE_PACKAGE = \
-  $(INNER_SZIP_LIBRARIES) && \
-  cp $(topobjdir)/mobile/android/b2gdroid/app/classes.dex $(ABS_DIST)/classes.dex && \
-  cp $(topobjdir)/mobile/android/b2gdroid/app/b2gdroid-unsigned-unaligned.apk $(ABS_DIST)/gecko.ap_ && \
-  $(INNER_MAKE_APK)
-endif
-
 # Language repacks root the resources contained in assets/omni.ja
 # under assets/, but the repacks expect them to be rooted at /.
 # Therefore, we we move the omnijar back to / so the resources are
 # under the root here, in INNER_UNMAKE_PACKAGE. See comments about
 # OMNIJAR_NAME earlier in this file and in configure.in.
 
 INNER_UNMAKE_PACKAGE	= \
   mkdir $(MOZ_PKG_DIR) && \
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -3293,21 +3293,16 @@ nsWindow::NotifyIMEInternal(const IMENot
     }
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP_(void)
 nsWindow::SetInputContext(const InputContext& aContext,
                           const InputContextAction& aAction)
 {
-#ifdef MOZ_B2GDROID
-    // Disable the Android keyboard on b2gdroid.
-    return;
-#endif
-
     nsWindow* top = FindTopLevel();
     MOZ_ASSERT(top);
 
     if (!top->mGeckoViewSupport) {
         // Non-GeckoView windows don't support IME operations.
         return;
     }