File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
core/src/main/java/com/topjohnwu/magisk/core
shared/src/main/java/com/topjohnwu/magisk Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ object Info {
4747 private set
4848 private var crypto = " "
4949
50- var hasGMS = true
5150 val isEmulator =
5251 Build .DEVICE .contains(" vsoc" )
5352 || getProperty(" ro.kernel.qemu" , " 0" ) == " 1"
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import com.squareup.moshi.Moshi
55import com.topjohnwu.magisk.ProviderInstaller
66import com.topjohnwu.magisk.core.BuildConfig
77import com.topjohnwu.magisk.core.Config
8- import com.topjohnwu.magisk.core.Info
98import com.topjohnwu.magisk.core.utils.LocaleSetting
109import okhttp3.Cache
1110import okhttp3.ConnectionSpec
@@ -72,9 +71,7 @@ fun createOkHttpClient(context: Context): OkHttpClient {
7271 chain.proceed(request.build())
7372 }
7473
75- if (! ProviderInstaller .install(context)) {
76- Info .hasGMS = false
77- }
74+ ProviderInstaller .install(context)
7875
7976 return builder.build()
8077}
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ public class ProviderInstaller {
77
88 private static final String GMS_PACKAGE_NAME = "com.google.android.gms" ;
99
10- public static boolean install (Context context ) {
10+ public static void install (Context context ) {
1111 try {
1212 // Check if gms is a system app
1313 ApplicationInfo appInfo = context .getPackageManager ().getApplicationInfo (GMS_PACKAGE_NAME , 0 );
1414 if ((appInfo .flags & ApplicationInfo .FLAG_SYSTEM ) == 0 ) {
15- return false ;
15+ return ;
1616 }
1717
1818 // Try installing new SSL provider from Google Play Service
@@ -22,9 +22,7 @@ public static boolean install(Context context) {
2222 .loadClass ("com.google.android.gms.common.security.ProviderInstallerImpl" )
2323 .getMethod ("insertProvider" , Context .class )
2424 .invoke (null , gms );
25- } catch (Exception e ) {
26- return false ;
25+ } catch (Exception ignored ) {
2726 }
28- return true ;
2927 }
3028}
You can’t perform that action at this time.
0 commit comments