diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-08-27 13:52:40 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-08-27 14:10:30 +0200 |
commit | ce60217894271dc2a354d21089e8c846f8a57915 (patch) | |
tree | 94238833374a45fe29b9e5c0d4495430c343b9e0 /platform/android/java/patches/com.google.android.vending.licensing.patch | |
parent | 6f0367052a3450d732aa197f20251b168e1094b4 (diff) |
Android: Reapply changes to Google licensing lib from #24145
But document them better this time.
Diffstat (limited to 'platform/android/java/patches/com.google.android.vending.licensing.patch')
-rw-r--r-- | platform/android/java/patches/com.google.android.vending.licensing.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/platform/android/java/patches/com.google.android.vending.licensing.patch b/platform/android/java/patches/com.google.android.vending.licensing.patch new file mode 100644 index 0000000000..9f8e5b8eab --- /dev/null +++ b/platform/android/java/patches/com.google.android.vending.licensing.patch @@ -0,0 +1,42 @@ +diff --git a/platform/android/java/src/com/google/android/vending/licensing/PreferenceObfuscator.java b/platform/android/java/src/com/google/android/vending/licensing/PreferenceObfuscator.java +index 7c42bfc28..feb579af0 100644 +--- a/platform/android/java/src/com/google/android/vending/licensing/PreferenceObfuscator.java ++++ b/platform/android/java/src/com/google/android/vending/licensing/PreferenceObfuscator.java +@@ -45,6 +45,9 @@ public class PreferenceObfuscator { + public void putString(String key, String value) { + if (mEditor == null) { + mEditor = mPreferences.edit(); ++ // -- GODOT start -- ++ mEditor.apply(); ++ // -- GODOT end -- + } + String obfuscatedValue = mObfuscator.obfuscate(value, key); + mEditor.putString(key, obfuscatedValue); +diff --git a/platform/android/java/src/com/google/android/vending/licensing/util/Base64.java b/platform/android/java/src/com/google/android/vending/licensing/util/Base64.java +index a0d2779af..a8bf65f9c 100644 +--- a/platform/android/java/src/com/google/android/vending/licensing/util/Base64.java ++++ b/platform/android/java/src/com/google/android/vending/licensing/util/Base64.java +@@ -31,6 +31,10 @@ package com.google.android.vending.licensing.util; + * @version 1.3 + */ + ++// -- GODOT start -- ++import com.godot.game.BuildConfig; ++// -- GODOT end -- ++ + /** + * Base64 converter class. This code is not a full-blown MIME encoder; + * it simply converts binary data to base64 data and back. +@@ -341,7 +345,11 @@ public class Base64 { + e += 4; + } + +- assert (e == outBuff.length); ++ // -- GODOT start -- ++ //assert (e == outBuff.length); ++ if (BuildConfig.DEBUG && e != outBuff.length) ++ throw new RuntimeException(); ++ // -- GODOT end -- + return outBuff; + } + |