mirror of https://github.com/YTVanced/VancedMicroG
Minor fix and cleanup
This commit is contained in:
parent
16d499cb2a
commit
a632b004f5
|
@ -4,10 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.nlpVersion = '2.0-alpha1'
|
|
||||||
ext.remoteDroidGuardVersion = '0.1.1'
|
|
||||||
ext.safeParcelVersion = '1.6.0'
|
ext.safeParcelVersion = '1.6.0'
|
||||||
ext.wearableVersion = '0.1.1'
|
|
||||||
|
|
||||||
ext.kotlinVersion = '1.3.72'
|
ext.kotlinVersion = '1.3.72'
|
||||||
ext.coroutineVersion = '1.3.7'
|
ext.coroutineVersion = '1.3.7'
|
||||||
|
@ -17,7 +14,6 @@ buildscript {
|
||||||
ext.fragmentVersion = '1.2.5'
|
ext.fragmentVersion = '1.2.5'
|
||||||
ext.lifecycleVersion = '2.2.0'
|
ext.lifecycleVersion = '2.2.0'
|
||||||
ext.mediarouterVersion = '1.1.0'
|
ext.mediarouterVersion = '1.1.0'
|
||||||
ext.multidexVersion = '2.0.1'
|
|
||||||
ext.navigationVersion = '2.3.0'
|
ext.navigationVersion = '2.3.0'
|
||||||
ext.preferenceVersion = '1.1.1'
|
ext.preferenceVersion = '1.1.1'
|
||||||
ext.recyclerviewVersion = '1.1.0'
|
ext.recyclerviewVersion = '1.1.0'
|
||||||
|
@ -30,8 +26,8 @@ buildscript {
|
||||||
ext.androidBuildVersionTools = "29.0.3"
|
ext.androidBuildVersionTools = "29.0.3"
|
||||||
|
|
||||||
ext.androidMinSdk = 21
|
ext.androidMinSdk = 21
|
||||||
ext.androidTargetSdk = 29
|
ext.androidTargetSdk = 30
|
||||||
ext.androidCompileSdk = 29
|
ext.androidCompileSdk = 30
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.os.PowerManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
|
import androidx.core.app.NotificationManagerCompat;
|
||||||
|
|
||||||
import com.mgoogle.android.gms.R;
|
import com.mgoogle.android.gms.R;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ public class StatusNotification {
|
||||||
public static boolean Notify(Context context) {
|
public static boolean Notify(Context context) {
|
||||||
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && NotificationManagerCompat.from(context).areNotificationsEnabled()) {
|
||||||
if (!powerManager.isIgnoringBatteryOptimizations(context.getPackageName())) {
|
if (!powerManager.isIgnoringBatteryOptimizations(context.getPackageName())) {
|
||||||
if (notificationExists) {
|
if (notificationExists) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue