1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

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

@@ -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);

View File

@@ -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;
}