Skip to content

Commit

Permalink
avoid unnecessary Date objects
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Sep 30, 2024
1 parent 1198dfc commit eb6cfd1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ private static VerificationResult verify(final Context context, final byte[] fin
editor.putInt(KEY_PINNED_APP_VERSION, verified.appVersion);
editor.putInt(KEY_PINNED_APP_VARIANT, verified.appVariant);
editor.putInt(KEY_PINNED_SECURITY_LEVEL, verified.securityLevel); // new field
editor.putLong(KEY_VERIFIED_TIME_LAST, new Date().getTime());
editor.putLong(KEY_VERIFIED_TIME_LAST, System.currentTimeMillis());
editor.apply();
} else {
verifySignature(attestationCertificates[0].getPublicKey(), signedMessage, signature);
Expand All @@ -1078,7 +1078,7 @@ private static VerificationResult verify(final Context context, final byte[] fin
editor.putInt(KEY_PINNED_APP_VARIANT, verified.appVariant);
editor.putInt(KEY_PINNED_SECURITY_LEVEL, verified.securityLevel);

final long now = new Date().getTime();
final long now = System.currentTimeMillis();
editor.putLong(KEY_VERIFIED_TIME_FIRST, now);
editor.putLong(KEY_VERIFIED_TIME_LAST, now);

Expand Down

0 comments on commit eb6cfd1

Please sign in to comment.