This commit is contained in:
Oizaro 2020-09-07 17:13:37 +02:00
parent 088f6d4290
commit 4f2fa9041d
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ buildscript {
ext.androidBuildVersionTools = "29.0.3"
ext.androidMinSdk = 23
ext.androidMinSdk = 21
ext.androidTargetSdk = 29
ext.androidCompileSdk = 29

View File

@ -15,6 +15,7 @@ import android.os.PowerManager;
import android.provider.Settings;
import android.util.Log;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
import com.mgoogle.android.gms.R;
@ -29,6 +30,7 @@ public class ForegroundServiceContext extends ContextWrapper {
super(base);
}
@RequiresApi(23)
@Override
public ComponentName startService(Intent service) {
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);