Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acc17cdc authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '0000-a15-do-not-try-to-refresh' into 'main'

Only refresh token for anonymous mode

See merge request !590
parents 6b2649fa 631bebdb
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -150,7 +150,8 @@ class PlayStoreRepository @Inject constructor(
            var appDetails: GplayApp
            appDetails = getAppDetailsHelper().getAppByPackageName(packageName)

            if (!isEmulator() && appDetails.versionCode == 0) {
            if (!isEmulator() && appDetails.versionCode == 0
                && authenticatorRepository.getGPlayAuthOrThrow().isAnonymous) {
                // Google Play returns limited result ( i.e. version code being 0) with a stale token,
                // so we need to refresh authentication to get a new token.
                Timber.i("Version code is 0 for ${appDetails.packageName}.")