From c8747ea957505221f96d4aff002c3505946c6c18 Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Wed, 13 Jul 2022 15:18:31 +0300 Subject: [PATCH] fix --- app/src/main/java/ru/vtosters/lite/utils/Globals.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/ru/vtosters/lite/utils/Globals.java b/app/src/main/java/ru/vtosters/lite/utils/Globals.java index dada17e44..6509e4078 100644 --- a/app/src/main/java/ru/vtosters/lite/utils/Globals.java +++ b/app/src/main/java/ru/vtosters/lite/utils/Globals.java @@ -362,7 +362,7 @@ public class Globals{ var info = cm.getActiveNetworkInfo(); if (info.getType() == ConnectivityManager.TYPE_MOBILE) { - switch (info.getSubtype()) { + switch(info.getSubtype()) { case TelephonyManager.NETWORK_TYPE_1xRTT: case TelephonyManager.NETWORK_TYPE_EDGE: case TelephonyManager.NETWORK_TYPE_CDMA: @@ -373,16 +373,17 @@ public class Globals{ case TelephonyManager.NETWORK_TYPE_UMTS: case TelephonyManager.NETWORK_TYPE_EHRPD: return true; + } } - + if (downSpeed < 2500) { isConnectionSucks = true; } return isConnectionSucks; - } // Network check + } - public static void fixGapps(){ + public static void fixGapps() { if (Build.VERSION.SDK_INT >= 26 && !isGmsInstalled()) { NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);