mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
b2d0bb64d7
commit
43be502f2d
|
@ -169,6 +169,8 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
|
|
||||||
private static String getChallenge(Context context) throws NoSuchAlgorithmException {
|
private static String getChallenge(Context context) throws NoSuchAlgorithmException {
|
||||||
String android_id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
|
String android_id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
|
||||||
|
if (android_id == null)
|
||||||
|
android_id = Long.toHexString(System.currentTimeMillis() % (24 * 3600 * 1000L));
|
||||||
return Helper.sha256(android_id);
|
return Helper.sha256(android_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue