Skip to content

Commit f0e61d3

Browse files
author
Alex Ames
committed
Minor fixes to RegistrationIntentService
1 parent 226de09 commit f0e61d3

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

messaging/src/android/java/com/google/firebase/messaging/cpp/RegistrationIntentService.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import android.content.Context;
1818
import android.content.Intent;
19+
import androidx.core.app.JobIntentService;
1920
import com.google.firebase.iid.FirebaseInstanceId;
2021
import com.google.flatbuffers.FlatBufferBuilder;
2122
import java.io.FileOutputStream;
@@ -30,24 +31,9 @@
3031
public class RegistrationIntentService extends JobIntentService {
3132
private static final String TAG = "FirebaseRegService";
3233

33-
public RegistrationIntentService() {
34-
// The tag here is used only to name the worker thread; it's important only for debugging.
35-
// http://developer.android.com/reference/android/app/IntentService.html#IntentService(java.lang.String)
36-
super(TAG);
37-
}
38-
39-
/**
40-
* Convenience wrapper over enqueueWork to either directly start the service (when running on
41-
* pre-O platforms) or enqueue work for it as a job (when running on Android O and later).
42-
*/
43-
public static void enqueueWork(Context context, Intent intent) {
44-
enqueueWork(
45-
context, RegistrationIntentService.class, JobIds.REGISTRATION_INTENT_SERVICE, intent);
46-
}
47-
4834
// Fetch the latest registration token and notify the C++ layer.
4935
@Override
50-
protected void onHandleWork(@NonNull Intent intent) {
36+
protected void onHandleWork(Intent intent) {
5137
String token = FirebaseInstanceId.getInstance().getToken();
5238
DebugLogging.log(TAG, String.format("onHandleWork token=%s", token));
5339
if (token != null) {

0 commit comments

Comments
 (0)