File tree Expand file tree Collapse file tree
vending-app/src/main/java/com/android/vending/licensing Expand file tree Collapse file tree Original file line number Diff line number Diff 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' )
Original file line number Diff line number Diff 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' )
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments