File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Licensed to the Apache Software Foundation (ASF) under one
38
38
import android .app .NotificationChannel ;
39
39
import android .net .wifi .WifiManager ;
40
40
import android .net .wifi .WifiManager .WifiLock ;
41
- import android .Manifest ;
41
+ import android .content . pm . ServiceInfo ;
42
42
43
43
import org .json .JSONObject ;
44
44
@@ -133,8 +133,8 @@ private void keepAwake()
133
133
134
134
if (!isSilent ) {
135
135
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .Q ) {
136
- String permission = Manifest . permission . FOREGROUND_SERVICE_REMOTE_MESSAGING ;
137
- startForeground (NOTIFICATION_ID , makeNotification (), permission );
136
+ int serviceType = ServiceInfo . FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING ;
137
+ startForeground (NOTIFICATION_ID , makeNotification (), serviceType );
138
138
}
139
139
else
140
140
startForeground (NOTIFICATION_ID , makeNotification ());
You can’t perform that action at this time.
0 commit comments