Skip to content

Commit

Permalink
suppress NewApi lint for setIsStrongBoxBacked
Browse files Browse the repository at this point in the history
The linter cannot understand that this is only being used if the
existing key is already a StrongBox key or the device supports it.

Rather than adding a useless API level check, suppress this for the
function. The scope for the suppression can be reduced later.
  • Loading branch information
thestinger committed May 6, 2019
1 parent 19e77d5 commit 89f44b5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package app.attestation.auditor;

import android.annotation.SuppressLint;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
Expand Down Expand Up @@ -893,6 +894,7 @@ static class AttestationResult {
}
}

@SuppressLint("NewApi")
static AttestationResult generateSerialized(final Context context, final byte[] challengeMessage,
String index, final String statePrefix) throws GeneralSecurityException, IOException {
if (challengeMessage.length < CHALLENGE_MESSAGE_LENGTH) {
Expand Down

0 comments on commit 89f44b5

Please sign in to comment.