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
3838import android .app .NotificationChannel ;
3939import android .net .wifi .WifiManager ;
4040import android .net .wifi .WifiManager .WifiLock ;
41- import android .Manifest ;
41+ import android .content . pm . ServiceInfo ;
4242
4343import org .json .JSONObject ;
4444
@@ -133,8 +133,8 @@ private void keepAwake()
133133
134134 if (!isSilent ) {
135135 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 );
138138 }
139139 else
140140 startForeground (NOTIFICATION_ID , makeNotification ());
You can’t perform that action at this time.
0 commit comments