Keymint/secureclock: Add Rust derives to some of the types.

This adds rust derive stanzas to TimeStamp, TimeStampToken, and
HardwareAuthToken.

Also removes an unused import from IKeyMintDevice.

Test: Compiles.
Change-Id: If41248f5cda8015ecb07bec5d1bc75317b803492
This commit is contained in:
Janis Danisevskis
2021-01-12 10:29:57 -08:00
parent 1f00c21c28
commit 6bb888fecf
7 changed files with 6 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.keymint;
@VintfStability
@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable HardwareAuthToken {
long challenge;
long userId;

View File

@@ -29,6 +29,7 @@ import android.hardware.security.keymint.HardwareAuthenticatorType;
* appropriate for a given key operation.
*/
@VintfStability
@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable HardwareAuthToken {
/**
* challenge is a value that's used to enable authentication tokens to authorize specific

View File

@@ -26,7 +26,6 @@ import android.hardware.security.keymint.KeyParameter;
import android.hardware.security.keymint.KeyMintHardwareInfo;
import android.hardware.security.keymint.KeyPurpose;
import android.hardware.security.keymint.SecurityLevel;
import android.hardware.security.secureclock.TimeStampToken;
/**
* KeyMint device definition.

View File

@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.secureclock;
@VintfStability
@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable TimeStampToken {
long challenge;
android.hardware.security.secureclock.Timestamp timestamp;

View File

@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.secureclock;
@VintfStability
@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable Timestamp {
long milliSeconds;
}

View File

@@ -23,6 +23,7 @@ import android.hardware.security.secureclock.Timestamp;
*/
@VintfStability
@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable TimeStampToken {
/**
* The challenge that was provided as argument to ISecureClock.generateTimeStamp by the client.

View File

@@ -23,6 +23,7 @@ package android.hardware.security.secureclock;
* by setting the clock to zero during each boot, and then counting time accurately).
*/
@VintfStability
@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable Timestamp {
long milliSeconds;
}