Skip to content

Commit df52651

Browse files
authored
Merge branch 'master' into fix_translate_practice
2 parents 51a5c55 + 352f2d7 commit df52651

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

gradle/publish-android.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ afterEvaluate {
4646
repositories {
4747
maven {
4848
name = 'sonatype'
49-
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
49+
url = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
5050
credentials {
5151
username project.getProperty('sonatype.username')
5252
password project.getProperty('sonatype.password')

gradle/publish-java.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ afterEvaluate {
5959
repositories {
6060
maven {
6161
name = 'sonatype'
62-
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
62+
url = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
6363
credentials {
6464
username project.getProperty('sonatype.username')
6565
password project.getProperty('sonatype.password')

vending-app/src/main/java/com/android/vending/licensing/LicenseChecker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ suspend fun HttpClient.makeLicenseV2Request(
155155
url = "https://play-fe.googleapis.com/fdfe/apps/checkLicenseServerFallback?pkgn=$packageName&vc=$versionCode",
156156
headers = buildRequestHeaders(auth, androidId),
157157
adapter = GoogleApiResponse.ADAPTER
158-
).payload?.licenseV2Response?.license?.jwt?.let {
159-
// Field present ←→ user has license
158+
).payload?.licenseV2Response?.license?.jwt?.takeIf { it.isNotEmpty() }?.let {
159+
// Field present and non-empty ←→ user has license
160160
V2Response(LICENSED, it)
161161
}

vending-app/src/main/java/com/android/vending/licensing/LicensingService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class LicensingService : Service() {
7575
*/
7676
if (response?.result == LICENSED && response is V2Response) {
7777
val bundle = Bundle()
78+
Log.e(TAG, "checkLicenseV2 jwt: ${response.jwt}")
7879
bundle.putString(KEY_V2_RESULT_JWT, response.jwt)
7980

8081
try {
@@ -143,6 +144,7 @@ class LicensingService : Service() {
143144

144145
// Attempt to acquire license if app is free ("auto-purchase")
145146
if (isLicensingPurchaseFreeAppsEnabled(this@LicensingService)) {
147+
Log.d(TAG, "Attempting to acquire license for free app $packageName")
146148
val firstAccount = accounts[0]
147149
if (httpClient.acquireFreeAppLicense(
148150
this@LicensingService,

0 commit comments

Comments
 (0)