mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-24 03:35:50 +01:00
Fix notification and increase min sdk
This commit is contained in:
parent
d3a6ffb057
commit
088f6d4290
@ -29,7 +29,7 @@ buildscript {
|
||||
|
||||
ext.androidBuildVersionTools = "29.0.3"
|
||||
|
||||
ext.androidMinSdk = 21
|
||||
ext.androidMinSdk = 23
|
||||
ext.androidTargetSdk = 29
|
||||
ext.androidCompileSdk = 29
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class ForegroundServiceContext extends ContextWrapper {
|
||||
public ComponentName startService(Intent service) {
|
||||
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||
|
||||
if (!powerManager.isPowerSaveMode() && !isAppOnForeground()) {
|
||||
if (!powerManager.isIgnoringBatteryOptimizations(this.getPackageName()) && !isAppOnForeground()) {
|
||||
Log.d(TAG, "Starting in foreground mode.");
|
||||
service.putExtra(EXTRA_FOREGROUND, true);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
Loading…
Reference in New Issue
Block a user