Android: Reapply changes to Google licensing lib from #24145

But document them better this time.
This commit is contained in:
Rémi Verschelde
2019-08-27 13:52:40 +02:00
parent 6f0367052a
commit ce60217894
4 changed files with 61 additions and 33 deletions

View File

@@ -3,41 +3,16 @@
This file list third-party libraries used in the Android source folder,
with their provenance and, when relevant, modifications made to those files.
## Google's vending library
## Google's licensing library
- Upstream: https://github.com/google/play-licensing/tree/master/lvl_library/src/main/java/com/google/android/vending
- Upstream: https://github.com/google/play-licensing/tree/master/lvl_library/
- Version: git (eb57657, 2018) with modifications
- License: Apache 2.0
Overwrite all files under `com/google/android/vending`.
Overwrite all files under:
Modify those files to avoid compile error and lint warning:
- `aidl/com/android/vending/licensing`
- `src/com/google/android/vending/licensing`
- `com/google/android/vending/licensing/util/Base64.java`
```diff
@@ -338,7 +338,8 @@ public class Base64 {
e += 4;
}
- assert (e == outBuff.length);
+ if (BuildConfig.DEBUG && e != outBuff.length)
+ throw new RuntimeException();
return outBuff;
}
```
- `com/google/android/vending/licensing/LicenseChecker.java`
```diff
@@ -29,8 +29,8 @@ import android.os.RemoteException;
import android.provider.Settings.Secure;
import android.util.Log;
-import com.android.vending.licensing.ILicenseResultListener;
-import com.android.vending.licensing.ILicensingService;
+import com.google.android.vending.licensing.ILicenseResultListener;
+import com.google.android.vending.licensing.ILicensingService;
import com.google.android.vending.licensing.util.Base64;
import com.google.android.vending.licensing.util.Base64DecoderException;
```
Some files have been modified to silence linter errors or fix downstream issues.
See the `patches/com.google.android.vending.licensing.patch` file.