-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display Driving Privileges in a human-friendly format.
This required refactoring the way we store the display data for mdoc attributes. Now, instead of mapping from human-readable name to a value string, we map from attribute name to a AttributeDisplayInfo object that includes the attribute's human-readable name and information about how to display the value. Tested by: - Manual testing. - ./gradlew check - ./gradlew connectedCheck Signed-off-by: Kevin Deus <[email protected]>
- Loading branch information
Showing
7 changed files
with
181 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
wallet/src/main/java/com/android/identity_credential/wallet/AttributeDisplayInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.android.identity_credential.wallet | ||
|
||
import android.graphics.Bitmap | ||
|
||
sealed class AttributeDisplayInfo | ||
|
||
data class AttributeDisplayInfoPlainText(val name: String, val value: String) : AttributeDisplayInfo() | ||
data class AttributeDisplayInfoHtml(val name: String, val value: String) : AttributeDisplayInfo() | ||
data class AttributeDisplayInfoImage(val name: String, val image: Bitmap) : AttributeDisplayInfo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.