@@ -31,15 +31,15 @@ import it.leddaz.revancedupdater.utils.json.UpdaterReleaseJSONObject
3131import it.leddaz.revancedupdater.utils.misc.AppInstaller
3232import it.leddaz.revancedupdater.utils.misc.CommonStuff.APP_VERSION
3333import it.leddaz.revancedupdater.utils.misc.CommonStuff.GMSCORE_PACKAGE
34+ import it.leddaz.revancedupdater.utils.misc.CommonStuff.GMS_PACKAGE
35+ import it.leddaz.revancedupdater.utils.misc.CommonStuff.HMS_PACKAGE
3436import it.leddaz.revancedupdater.utils.misc.CommonStuff.IS_DEBUG
3537import it.leddaz.revancedupdater.utils.misc.CommonStuff.LOG_TAG
3638import it.leddaz.revancedupdater.utils.misc.CommonStuff.MUSIC_PACKAGE
3739import it.leddaz.revancedupdater.utils.misc.CommonStuff.REVANCED_PACKAGE
3840import it.leddaz.revancedupdater.utils.misc.CommonStuff.UPDATER_PACKAGE
3941import it.leddaz.revancedupdater.utils.misc.CommonStuff.X_PACKAGE
40- import it.leddaz.revancedupdater.utils.misc.CommonStuff.isGmsCoreInstalled
41- import it.leddaz.revancedupdater.utils.misc.CommonStuff.isGmsInstalled
42- import it.leddaz.revancedupdater.utils.misc.CommonStuff.isHmsInstalled
42+ import it.leddaz.revancedupdater.utils.misc.CommonStuff.isAppInstalled
4343import it.leddaz.revancedupdater.utils.misc.CommonStuff.openLink
4444import it.leddaz.revancedupdater.utils.misc.CommonStuff.requestInstallPermission
4545import it.leddaz.revancedupdater.utils.misc.Version
@@ -200,7 +200,7 @@ class MainActivity : AppCompatActivity() {
200200 findViewById(R .id.x_download_button)
201201 )
202202
203- if (isGmsCoreInstalled (this )) {
203+ if (isAppInstalled (this , GMSCORE_PACKAGE )) {
204204 getAppVersion(
205205 REVANCED_PACKAGE ,
206206 findViewById(R .id.installed_revanced_version),
@@ -282,7 +282,8 @@ class MainActivity : AppCompatActivity() {
282282 gmsCoreReply =
283283 Gson ().fromJson(response, object : TypeToken <GmsCoreJSONObject >() {}.type)
284284 latestGmsCoreVersion = Version (gmsCoreReply.latestGmsCoreVersion.substring(1 ))
285- gmsCoreDownloadUrl = if (isHmsInstalled(this ) && ! isGmsInstalled(this ))
285+ gmsCoreDownloadUrl =
286+ if (isAppInstalled(this , HMS_PACKAGE ) && ! isAppInstalled(this , GMS_PACKAGE ))
286287 gmsCoreReply.assets[0 ].latestGmsCoreUrl
287288 else
288289 gmsCoreReply.assets[1 ].latestGmsCoreUrl
@@ -314,7 +315,7 @@ class MainActivity : AppCompatActivity() {
314315 findViewById(R .id.x_download_button)
315316 )
316317
317- if (isGmsCoreInstalled (this )) {
318+ if (isAppInstalled (this , GMSCORE_PACKAGE )) {
318319 compareAppVersion(
319320 REVANCED_PACKAGE , installedReVancedVersion,
320321 latestReVancedVersion, findViewById(R .id.revanced_update_status),
@@ -435,7 +436,7 @@ class MainActivity : AppCompatActivity() {
435436 getString(R .string.installed_app_version, APP_VERSION )
436437 }
437438 } else if (packageName == GMSCORE_PACKAGE ) {
438- if (isHmsInstalled (this ) && ! isGmsInstalled (this ))
439+ if (isAppInstalled (this , HMS_PACKAGE ) && ! isAppInstalled (this , GMS_PACKAGE ))
439440 installedVersion.version =
440441 pInfo.versionName?.substring(0 , pInfo.versionName!! .length - 3 )
441442 else
0 commit comments