mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 23:32:16 +00:00
Payment protocol: fix broken reflection code for Android.
This commit is contained in:
parent
b3bf4aadb7
commit
7c9651a801
@ -512,10 +512,9 @@ public class PaymentSession {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// Check if we are on Android.
|
// Check if we are on Android.
|
||||||
Class Build = Class.forName("android.os.Build");
|
Class version = Class.forName("android.os.Build$VERSION");
|
||||||
Object version = Build.getDeclaredField("VERSION").get(Build);
|
|
||||||
// Build.VERSION_CODES.ICE_CREAM_SANDWICH is 14.
|
// Build.VERSION_CODES.ICE_CREAM_SANDWICH is 14.
|
||||||
if (version.getClass().getDeclaredField("SDK_INT").getInt(version) >= 14) {
|
if (version.getDeclaredField("SDK_INT").getInt(version) >= 14) {
|
||||||
// After ICS, Android provided this nice method for loading the keystore,
|
// After ICS, Android provided this nice method for loading the keystore,
|
||||||
// so we don't have to specify the location explicitly.
|
// so we don't have to specify the location explicitly.
|
||||||
KeyStore keystore = KeyStore.getInstance("AndroidCAStore");
|
KeyStore keystore = KeyStore.getInstance("AndroidCAStore");
|
||||||
|
Loading…
Reference in New Issue
Block a user