Bug 1253876 - Back out PushService integration to not burn aurora. r=me

Sadly, this needs to be conditional to not burn builds where
MOZ_ANDROID_GCM is not defined -- such as aurora.  As uplift is soon,
this will have to be relanded behind a conditional abstraction (just
like Adjust).

MozReview-Commit-ID: 80gBojadDic
This commit is contained in:
Nick Alexander 2016-03-06 20:43:22 -08:00
parent 314e3634c5
commit 44ff8285f6

View File

@ -13,7 +13,6 @@ import org.mozilla.gecko.dlc.DownloadContentService;
import org.mozilla.gecko.home.HomePanelsManager;
import org.mozilla.gecko.lwt.LightweightTheme;
import org.mozilla.gecko.mdns.MulticastDNSManager;
import org.mozilla.gecko.push.PushService;
import org.mozilla.gecko.util.Clipboard;
import org.mozilla.gecko.util.HardwareUtils;
import org.mozilla.gecko.util.ThreadUtils;
@ -166,27 +165,6 @@ public class GeckoApplication extends Application
super.onCreate();
if (AppConstants.MOZ_ANDROID_GCM) {
// TODO: only run in main process.
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
// It's fine to throw GCM initialization onto a background thread; the registration process requires
// network access, so is naturally asynchronous. This, of course, races against Gecko page load of
// content requiring GCM-backed services, like Web Push. There's nothing to be done here.
PushService.createInstance(context);
PushService.registerGeckoEventListener();
try {
PushService.getInstance().onStartup();
} catch (Exception e) {
Log.e(LOG_TAG, "Got exception during startup; ignoring.", e);
return;
}
}
});
}
if (AppConstants.MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE) {
DownloadContentService.startStudy(this);
}