Files
firefox/mobile/android/base/java/org/mozilla/gecko/GeckoLoadLibsService.java
T
Petru Lingurar cc99920054 Bug 1467840 - Migrate GeckoService to JobIntentService; r=snorp
This simple Service needed to be migrated to JobIntentService because it could
be started from background and we don't want it as a foreground service
(with a notification).
(For example: when the app is updated org.mozilla.gecko.PackageReplacedReceiver
would try and start this service. If in background, the app would crash)

Had to break the initial Service into separate JobIntentServices because in the
event that there are concurrent calls (even with different Intent actions)
JobScheduler would assume they are for the same already running service.

INTENT_ACTION_UPDATE_ADDONS was removed as it was being unused.

MozReview-Commit-ID: 2GiWFZdAVvp
2018-06-26 18:41:38 +03:00

23 lines
905 B
Java

/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
* 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;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
public class GeckoLoadLibsService extends GeckoService {
@Override
protected void onHandleWork(@NonNull Intent intent) {
// Intentionally not initialize Gecko when only loading libs.
// All work this service does is in onCreate()
}
public static void enqueueWork(@NonNull final Context context, @NonNull final Intent workIntent) {
enqueueWork(context, GeckoLoadLibsService.class, JobIdsConstants.getIdForGeckoLibsLoader(), workIntent);
}
}