From 0a47c45b067e27e6784db5c543db3729bceb3200 Mon Sep 17 00:00:00 2001 From: Jovche Mitrejchevski Date: Wed, 4 Oct 2023 22:10:20 +0200 Subject: [PATCH] Introduce IC Wallet and IC Purse Flavors for Holder (#378) --- appholder/build.gradle | 16 ++- .../1.json | 112 ------------------ .../{mdl/app => identity/wallet}/HolderApp.kt | 4 +- .../app => identity/wallet}/MainActivity.kt | 14 +-- .../wallet}/adapter/BindingAdapters.kt | 2 +- .../wallet}/adapter/DocumentAdapter.kt | 10 +- .../AuthConfirmationFragment.kt | 16 +-- .../authconfirmation/ConfirmationSheet.kt | 8 +- .../authconfirmation/ConfirmationSheetData.kt | 2 +- .../authconfirmation/PassphraseAuthResult.kt | 2 +- .../authconfirmation/PassphrasePrompt.kt | 8 +- .../PassphrasePromptViewModel.kt | 2 +- .../authconfirmation/RequestedDocumentData.kt | 2 +- .../authconfirmation/RequestedElement.kt | 2 +- .../authconfirmation/SignedDocumentData.kt | 2 +- .../SignedElementsCollection.kt | 2 +- .../authprompt/BiometricUserAuthPrompt.kt | 2 +- .../authprompt/UserAuthPromptBuilder.kt | 4 +- .../wallet}/composables/DocumentValues.kt | 16 +-- .../wallet}/composables/LoadingIndicator.kt | 4 +- .../wallet}/composables/Preview.kt | 2 +- .../wallet}/composables/Toast.kt | 2 +- .../wallet}/document/DocumentColor.kt | 2 +- .../wallet}/document/DocumentInformation.kt | 2 +- .../wallet}/document/DocumentManager.kt | 24 ++-- .../wallet}/document/DocumentType.kt | 4 +- .../wallet}/document/KeysAndCertificates.kt | 4 +- .../document/SecureAreaImplementationState.kt | 2 +- .../documentdata/DocumentDataReader.kt | 14 +-- .../wallet}/documentdata/DocumentElements.kt | 2 +- .../wallet}/documentdata/RequestDocument.kt | 2 +- .../wallet}/documentdata/RequestEuPid.kt | 4 +- .../wallet}/documentdata/RequestMdl.kt | 4 +- .../wallet}/documentdata/RequestMicovAtt.kt | 4 +- .../wallet}/documentdata/RequestMicovVtr.kt | 4 +- .../wallet}/documentdata/RequestMvr.kt | 4 +- .../documentdata/ShowDocumentDataFragment.kt | 6 +- .../documentinfo/DocumentInfoScreen.kt | 14 +-- .../documentinfo/DocumentInfoScreenState.kt | 6 +- .../documentinfo/DocumentInfoViewModel.kt | 10 +- .../fragment/DocumentDetailFragment.kt | 10 +- .../fragment/ReverseEngagementFragment.kt | 10 +- .../fragment/SelfSignedDetailsFragment.kt | 22 ++-- .../wallet}/fragment/ShareDocumentFragment.kt | 8 +- .../fragment/TransferDocumentFragment.kt | 24 ++-- .../wallet}/readerauth/ReaderTrustStore.java | 2 +- .../readerauth/SimpleReaderTrustStore.java | 2 +- .../selfsigned/AddSelfSignedDocumentScreen.kt | 20 ++-- .../selfsigned/AddSelfSignedFragment.kt | 4 +- .../selfsigned/AddSelfSignedScreenState.kt | 8 +- .../selfsigned/AddSelfSignedViewModel.kt | 24 ++-- .../selfsigned/SelfSignedDocumentData.kt | 8 +- .../wallet}/settings/SettingsFragment.kt | 4 +- .../wallet}/settings/SettingsScreen.kt | 4 +- .../wallet}/settings/SettingsScreenState.kt | 2 +- .../wallet}/settings/SettingsViewModel.kt | 4 +- .../app => identity/wallet}/theme/Color.kt | 2 +- .../app => identity/wallet}/theme/Shape.kt | 2 +- .../app => identity/wallet}/theme/Theme.kt | 2 +- .../app => identity/wallet}/theme/Type.kt | 2 +- .../transfer/AddDocumentToResponseResult.kt | 2 +- .../wallet}/transfer/Communication.kt | 6 +- .../wallet}/transfer/ConnectionSetup.kt | 4 +- .../wallet}/transfer/CredentialStore.kt | 4 +- .../wallet}/transfer/QrCommunicationSetup.kt | 6 +- .../transfer/ReverseQrCommunicationSetup.kt | 6 +- .../wallet}/transfer/SessionSetup.kt | 2 +- .../wallet}/transfer/TransferManager.kt | 12 +- .../wallet}/util/BindingAdapters.kt | 2 +- .../wallet}/util/ContextExtensions.kt | 2 +- .../wallet}/util/DocumentData.kt | 2 +- .../wallet}/util/FormatUtil.kt | 2 +- .../wallet}/util/LogginExtensions.kt | 2 +- .../wallet}/util/NfcDataTransferHandler.kt | 4 +- .../wallet}/util/NfcEngagementHandler.kt | 20 ++-- .../wallet}/util/Preconditions.kt | 2 +- .../wallet}/util/PreferencesHelper.kt | 2 +- .../wallet}/util/ProvisioningUtil.kt | 16 +-- .../util/SavedStateHandleExtensions.kt | 2 +- .../wallet}/util/TransferStatus.kt | 2 +- .../wallet}/util/ViewHelper.kt | 2 +- .../wallet}/viewmodel/SelfSignedViewModel.kt | 20 ++-- .../viewmodel/ShareDocumentViewModel.kt | 6 +- .../viewmodel/TransferDocumentViewModel.kt | 24 ++-- .../wallet}/wallet/DocumentPageTransformer.kt | 4 +- .../wallet/DocumentPagerItemDecoration.kt | 2 +- .../wallet}/wallet/SelectDocumentFragment.kt | 18 +-- .../layout-land/fragment_share_document.xml | 4 +- .../res/layout/fragment_select_document.xml | 2 +- .../layout/fragment_self_signed_details.xml | 2 +- .../res/layout/fragment_share_document.xml | 4 +- .../res/layout/fragment_transfer_document.xml | 4 +- .../main/res/layout/list_item_document.xml | 2 +- .../main/res/navigation/navigation_graph.xml | 24 ++-- appholder/src/main/res/values/strings.xml | 1 - .../res/values/ic_launcher_background.xml | 4 + appholder/src/purse/res/values/strings.xml | 4 + .../wallet}/ExampleUnitTest.kt | 2 +- .../PassphraseValidationTest.kt | 2 +- .../selfsigned/SelfSignedScreenStateTest.kt | 14 +-- .../res/values/ic_launcher_background.xml | 0 appholder/src/wallet/res/values/strings.xml | 4 + 102 files changed, 334 insertions(+), 425 deletions(-) delete mode 100644 appholder/mdoc-document-database/com.android.mdl.app.document.DocumentDatabase/1.json rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/HolderApp.kt (82%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/MainActivity.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/adapter/BindingAdapters.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/adapter/DocumentAdapter.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/AuthConfirmationFragment.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/ConfirmationSheet.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/ConfirmationSheetData.kt (86%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/PassphraseAuthResult.kt (74%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/PassphrasePrompt.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/PassphrasePromptViewModel.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/RequestedDocumentData.kt (84%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/RequestedElement.kt (60%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/SignedDocumentData.kt (90%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authconfirmation/SignedElementsCollection.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authprompt/BiometricUserAuthPrompt.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/authprompt/UserAuthPromptBuilder.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/composables/DocumentValues.kt (66%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/composables/LoadingIndicator.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/composables/Preview.kt (84%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/composables/Toast.kt (84%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/DocumentColor.kt (86%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/DocumentInformation.kt (93%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/DocumentManager.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/DocumentType.kt (79%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/KeysAndCertificates.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/document/SecureAreaImplementationState.kt (88%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/DocumentDataReader.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/DocumentElements.kt (85%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestDocument.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestEuPid.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestMdl.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestMicovAtt.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestMicovVtr.kt (90%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/RequestMvr.kt (88%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentdata/ShowDocumentDataFragment.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentinfo/DocumentInfoScreen.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentinfo/DocumentInfoScreenState.kt (85%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/documentinfo/DocumentInfoViewModel.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/fragment/DocumentDetailFragment.kt (83%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/fragment/ReverseEngagementFragment.kt (94%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/fragment/SelfSignedDetailsFragment.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/fragment/ShareDocumentFragment.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/fragment/TransferDocumentFragment.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/readerauth/ReaderTrustStore.java (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/readerauth/SimpleReaderTrustStore.java (99%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/selfsigned/AddSelfSignedDocumentScreen.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/selfsigned/AddSelfSignedFragment.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/selfsigned/AddSelfSignedScreenState.kt (94%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/selfsigned/AddSelfSignedViewModel.kt (88%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/selfsigned/SelfSignedDocumentData.kt (83%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/settings/SettingsFragment.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/settings/SettingsScreen.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/settings/SettingsScreenState.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/settings/SettingsViewModel.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/theme/Color.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/theme/Shape.kt (86%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/theme/Theme.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/theme/Type.kt (92%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/AddDocumentToResponseResult.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/Communication.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/ConnectionSetup.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/CredentialStore.kt (87%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/QrCommunicationSetup.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/ReverseQrCommunicationSetup.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/SessionSetup.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/transfer/TransferManager.kt (97%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/BindingAdapters.kt (93%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/ContextExtensions.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/DocumentData.kt (95%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/FormatUtil.kt (98%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/LogginExtensions.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/NfcDataTransferHandler.kt (93%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/NfcEngagementHandler.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/Preconditions.kt (91%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/PreferencesHelper.kt (99%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/ProvisioningUtil.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/SavedStateHandleExtensions.kt (87%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/TransferStatus.kt (80%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/util/ViewHelper.kt (82%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/viewmodel/SelfSignedViewModel.kt (96%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/viewmodel/ShareDocumentViewModel.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/viewmodel/TransferDocumentViewModel.kt (89%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/wallet/DocumentPageTransformer.kt (90%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/wallet/DocumentPagerItemDecoration.kt (93%) rename appholder/src/main/java/com/android/{mdl/app => identity/wallet}/wallet/SelectDocumentFragment.kt (92%) create mode 100644 appholder/src/purse/res/values/ic_launcher_background.xml create mode 100644 appholder/src/purse/res/values/strings.xml rename appholder/src/test/java/com/android/{mdl/app => identity/wallet}/ExampleUnitTest.kt (90%) rename appholder/src/test/java/com/android/{mdl/app => identity/wallet}/authconfirmation/PassphraseValidationTest.kt (94%) rename appholder/src/test/java/com/android/{mdl/app => identity/wallet}/selfsigned/SelfSignedScreenStateTest.kt (94%) rename appholder/src/{main => wallet}/res/values/ic_launcher_background.xml (100%) create mode 100644 appholder/src/wallet/res/values/strings.xml diff --git a/appholder/build.gradle b/appholder/build.gradle index 2752353d6..6dbdd1d3c 100644 --- a/appholder/build.gradle +++ b/appholder/build.gradle @@ -8,10 +8,11 @@ plugins { } android { + namespace "com.android.identity.wallet" compileSdk libs.versions.compile.sdk.get() as int defaultConfig { - applicationId "com.android.mdl.app" + applicationId "com.android.identity.wallet" minSdkVersion libs.versions.min.sdk.get() as int targetSdkVersion libs.versions.compile.sdk.get() as int versionCode 1 @@ -27,6 +28,17 @@ android { } } + flavorDimensions.addAll("standard") + productFlavors { + wallet { + dimension "standard" + } + purse { + dimension "standard" + applicationIdSuffix ".purse" + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -46,7 +58,6 @@ android { kotlinCompilerExtensionVersion libs.versions.kotlin.compiler.extension.get() } - testOptions.unitTests.all { useJUnitPlatform() testLogging { @@ -54,7 +65,6 @@ android { } } - namespace 'com.android.mdl.app' lint { lintConfig file('lint.xml') } diff --git a/appholder/mdoc-document-database/com.android.mdl.app.document.DocumentDatabase/1.json b/appholder/mdoc-document-database/com.android.mdl.app.document.DocumentDatabase/1.json deleted file mode 100644 index f76b24dbe..000000000 --- a/appholder/mdoc-document-database/com.android.mdl.app.document.DocumentDatabase/1.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 1, - "identityHash": "7770e684841520e10d9255d5e596c6bb", - "entities": [ - { - "tableName": "document", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`doc_type` TEXT NOT NULL, `identity_credential_name` TEXT NOT NULL, `user_visible_name` TEXT NOT NULL, `user_visible_document_background` BLOB, `hardware_backed` INTEGER NOT NULL, `self_signed` INTEGER NOT NULL, `user_authentication` INTEGER NOT NULL, `number_mso` INTEGER NOT NULL, `max_use_mso` INTEGER NOT NULL, `server_url` TEXT, `provisioning_code` TEXT, `date_provisioned` INTEGER NOT NULL, `date_check_for_update` INTEGER, `date_refresh_auth_keys` INTEGER, PRIMARY KEY(`identity_credential_name`))", - "fields": [ - { - "fieldPath": "docType", - "columnName": "doc_type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "identityCredentialName", - "columnName": "identity_credential_name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "userVisibleName", - "columnName": "user_visible_name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "userVisibleDocumentBackground", - "columnName": "user_visible_document_background", - "affinity": "BLOB", - "notNull": false - }, - { - "fieldPath": "hardwareBacked", - "columnName": "hardware_backed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "selfSigned", - "columnName": "self_signed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userAuthentication", - "columnName": "user_authentication", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "numberMso", - "columnName": "number_mso", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "maxUseMso", - "columnName": "max_use_mso", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "serverUrl", - "columnName": "server_url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "provisioningCode", - "columnName": "provisioning_code", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "dateProvisioned", - "columnName": "date_provisioned", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCheckForUpdate", - "columnName": "date_check_for_update", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "dateRefreshAuthKeys", - "columnName": "date_refresh_auth_keys", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "identity_credential_name" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7770e684841520e10d9255d5e596c6bb')" - ] - } -} \ No newline at end of file diff --git a/appholder/src/main/java/com/android/mdl/app/HolderApp.kt b/appholder/src/main/java/com/android/identity/wallet/HolderApp.kt similarity index 82% rename from appholder/src/main/java/com/android/mdl/app/HolderApp.kt rename to appholder/src/main/java/com/android/identity/wallet/HolderApp.kt index 50382b8b8..570872356 100644 --- a/appholder/src/main/java/com/android/mdl/app/HolderApp.kt +++ b/appholder/src/main/java/com/android/identity/wallet/HolderApp.kt @@ -1,9 +1,9 @@ -package com.android.mdl.app +package com.android.identity.wallet import android.app.Application import com.android.identity.android.util.AndroidLogPrinter import com.android.identity.util.Logger -import com.android.mdl.app.util.PreferencesHelper +import com.android.identity.wallet.util.PreferencesHelper import com.google.android.material.color.DynamicColors class HolderApp: Application() { diff --git a/appholder/src/main/java/com/android/mdl/app/MainActivity.kt b/appholder/src/main/java/com/android/identity/wallet/MainActivity.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/MainActivity.kt rename to appholder/src/main/java/com/android/identity/wallet/MainActivity.kt index 88aae5f55..91a743463 100644 --- a/appholder/src/main/java/com/android/mdl/app/MainActivity.kt +++ b/appholder/src/main/java/com/android/identity/wallet/MainActivity.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app +package com.android.identity.wallet import android.app.PendingIntent import android.content.Intent @@ -15,12 +15,12 @@ import androidx.navigation.ui.NavigationUI.setupActionBarWithNavController import androidx.navigation.ui.setupWithNavController import com.android.identity.mdoc.origininfo.OriginInfo import com.android.identity.mdoc.origininfo.OriginInfoReferrerUrl -import com.android.mdl.app.databinding.ActivityMainBinding -import com.android.mdl.app.util.log -import com.android.mdl.app.util.logError -import com.android.mdl.app.util.logInfo -import com.android.mdl.app.util.logWarning -import com.android.mdl.app.viewmodel.ShareDocumentViewModel +import com.android.identity.wallet.databinding.ActivityMainBinding +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.logError +import com.android.identity.wallet.util.logInfo +import com.android.identity.wallet.util.logWarning +import com.android.identity.wallet.viewmodel.ShareDocumentViewModel import com.google.android.material.elevation.SurfaceColors import java.security.Security import org.bouncycastle.jce.provider.BouncyCastleProvider diff --git a/appholder/src/main/java/com/android/mdl/app/adapter/BindingAdapters.kt b/appholder/src/main/java/com/android/identity/wallet/adapter/BindingAdapters.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/adapter/BindingAdapters.kt rename to appholder/src/main/java/com/android/identity/wallet/adapter/BindingAdapters.kt index 36e72e96a..749ae5ff9 100644 --- a/appholder/src/main/java/com/android/mdl/app/adapter/BindingAdapters.kt +++ b/appholder/src/main/java/com/android/identity/wallet/adapter/BindingAdapters.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.adapter +package com.android.identity.wallet.adapter import android.icu.text.SimpleDateFormat import android.widget.TextView diff --git a/appholder/src/main/java/com/android/mdl/app/adapter/DocumentAdapter.kt b/appholder/src/main/java/com/android/identity/wallet/adapter/DocumentAdapter.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/adapter/DocumentAdapter.kt rename to appholder/src/main/java/com/android/identity/wallet/adapter/DocumentAdapter.kt index 7be24e1ce..d078b798a 100644 --- a/appholder/src/main/java/com/android/mdl/app/adapter/DocumentAdapter.kt +++ b/appholder/src/main/java/com/android/identity/wallet/adapter/DocumentAdapter.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.mdl.app.adapter +package com.android.identity.wallet.adapter import android.view.LayoutInflater @@ -24,10 +24,10 @@ import androidx.navigation.findNavController import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView -import com.android.mdl.app.R -import com.android.mdl.app.databinding.ListItemDocumentBinding -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.wallet.SelectDocumentFragmentDirections +import com.android.identity.wallet.R +import com.android.identity.wallet.databinding.ListItemDocumentBinding +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.wallet.SelectDocumentFragmentDirections /** * Adapter for the [RecyclerView]. diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/AuthConfirmationFragment.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/AuthConfirmationFragment.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/AuthConfirmationFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/AuthConfirmationFragment.kt index 9802289d1..39680f63c 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/AuthConfirmationFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/AuthConfirmationFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import android.content.DialogInterface import android.os.Bundle @@ -22,13 +22,13 @@ import androidx.navigation.fragment.navArgs import com.android.identity.android.securearea.AndroidKeystoreSecureArea import com.android.identity.securearea.BouncyCastleSecureArea import com.android.identity.securearea.SecureArea.ALGORITHM_ES256 -import com.android.mdl.app.R -import com.android.mdl.app.authprompt.UserAuthPromptBuilder -import com.android.mdl.app.theme.HolderAppTheme -import com.android.mdl.app.transfer.AddDocumentToResponseResult -import com.android.mdl.app.util.DocumentData -import com.android.mdl.app.util.log -import com.android.mdl.app.viewmodel.TransferDocumentViewModel +import com.android.identity.wallet.R +import com.android.identity.wallet.authprompt.UserAuthPromptBuilder +import com.android.identity.wallet.theme.HolderAppTheme +import com.android.identity.wallet.transfer.AddDocumentToResponseResult +import com.android.identity.wallet.util.DocumentData +import com.android.identity.wallet.util.log +import com.android.identity.wallet.viewmodel.TransferDocumentViewModel import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kotlinx.coroutines.launch diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheet.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheet.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheet.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheet.kt index e08bd9d44..f0912438e 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheet.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheet.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import android.content.res.Configuration.UI_MODE_NIGHT_YES import androidx.compose.animation.AnimatedVisibility @@ -43,9 +43,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.android.mdl.app.R -import com.android.mdl.app.authconfirmation.ConfirmationSheetData.DocumentElement -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.R +import com.android.identity.wallet.authconfirmation.ConfirmationSheetData.DocumentElement +import com.android.identity.wallet.theme.HolderAppTheme @Composable fun ConfirmationSheet( diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheetData.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheetData.kt similarity index 86% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheetData.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheetData.kt index d38a817df..3031c002c 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/ConfirmationSheetData.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/ConfirmationSheetData.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphraseAuthResult.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphraseAuthResult.kt similarity index 74% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphraseAuthResult.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphraseAuthResult.kt index 564d3aca2..1488a1108 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphraseAuthResult.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphraseAuthResult.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation sealed class PassphraseAuthResult { object Idle: PassphraseAuthResult() diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePrompt.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePrompt.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePrompt.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePrompt.kt index 18d774bb2..8e9435264 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePrompt.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePrompt.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import android.os.Bundle import android.view.LayoutInflater @@ -32,9 +32,9 @@ import androidx.fragment.app.DialogFragment import androidx.fragment.app.activityViewModels import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs -import com.android.mdl.app.R -import com.android.mdl.app.composables.PreviewLightDark -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.R +import com.android.identity.wallet.composables.PreviewLightDark +import com.android.identity.wallet.theme.HolderAppTheme class PassphrasePrompt : DialogFragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePromptViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePromptViewModel.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePromptViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePromptViewModel.kt index e6344c61b..03a477134 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/PassphrasePromptViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/PassphrasePromptViewModel.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import androidx.lifecycle.ViewModel import kotlinx.coroutines.flow.MutableStateFlow diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedDocumentData.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedDocumentData.kt similarity index 84% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedDocumentData.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedDocumentData.kt index d3d09638f..be3866439 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedDocumentData.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedDocumentData.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import com.android.identity.mdoc.request.DeviceRequestParser diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedElement.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedElement.kt similarity index 60% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedElement.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedElement.kt index d2643de29..e0e444cc9 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/RequestedElement.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/RequestedElement.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation data class RequestedElement( val namespace: String, diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedDocumentData.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedDocumentData.kt similarity index 90% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedDocumentData.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedDocumentData.kt index 29f5f824a..786d95304 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedDocumentData.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedDocumentData.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation class SignedDocumentData( private val signedElements: List, diff --git a/appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedElementsCollection.kt b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedElementsCollection.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedElementsCollection.kt rename to appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedElementsCollection.kt index 5eb4fd77c..91bc2d80f 100644 --- a/appholder/src/main/java/com/android/mdl/app/authconfirmation/SignedElementsCollection.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authconfirmation/SignedElementsCollection.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation class SignedElementsCollection { diff --git a/appholder/src/main/java/com/android/mdl/app/authprompt/BiometricUserAuthPrompt.kt b/appholder/src/main/java/com/android/identity/wallet/authprompt/BiometricUserAuthPrompt.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/authprompt/BiometricUserAuthPrompt.kt rename to appholder/src/main/java/com/android/identity/wallet/authprompt/BiometricUserAuthPrompt.kt index 9fa72644d..8a0d6ea83 100644 --- a/appholder/src/main/java/com/android/mdl/app/authprompt/BiometricUserAuthPrompt.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authprompt/BiometricUserAuthPrompt.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authprompt +package com.android.identity.wallet.authprompt import androidx.biometric.BiometricPrompt diff --git a/appholder/src/main/java/com/android/mdl/app/authprompt/UserAuthPromptBuilder.kt b/appholder/src/main/java/com/android/identity/wallet/authprompt/UserAuthPromptBuilder.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/authprompt/UserAuthPromptBuilder.kt rename to appholder/src/main/java/com/android/identity/wallet/authprompt/UserAuthPromptBuilder.kt index abc05bded..10a3fcdd0 100644 --- a/appholder/src/main/java/com/android/mdl/app/authprompt/UserAuthPromptBuilder.kt +++ b/appholder/src/main/java/com/android/identity/wallet/authprompt/UserAuthPromptBuilder.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authprompt +package com.android.identity.wallet.authprompt import androidx.biometric.BiometricManager import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG @@ -7,7 +7,7 @@ import androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS import androidx.biometric.BiometricPrompt import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment -import com.android.mdl.app.util.log +import com.android.identity.wallet.util.log class UserAuthPromptBuilder private constructor(private val fragment: Fragment) { diff --git a/appholder/src/main/java/com/android/mdl/app/composables/DocumentValues.kt b/appholder/src/main/java/com/android/identity/wallet/composables/DocumentValues.kt similarity index 66% rename from appholder/src/main/java/com/android/mdl/app/composables/DocumentValues.kt rename to appholder/src/main/java/com/android/identity/wallet/composables/DocumentValues.kt index 9b4ca2873..df35a6905 100644 --- a/appholder/src/main/java/com/android/mdl/app/composables/DocumentValues.kt +++ b/appholder/src/main/java/com/android/identity/wallet/composables/DocumentValues.kt @@ -1,14 +1,14 @@ -package com.android.mdl.app.composables +package com.android.identity.wallet.composables import androidx.annotation.StringRes import androidx.compose.ui.graphics.Brush -import com.android.mdl.app.R -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.theme.BlueGradient -import com.android.mdl.app.theme.GreenGradient -import com.android.mdl.app.theme.RedGradient -import com.android.mdl.app.theme.YellowGradient +import com.android.identity.wallet.R +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.theme.BlueGradient +import com.android.identity.wallet.theme.GreenGradient +import com.android.identity.wallet.theme.RedGradient +import com.android.identity.wallet.theme.YellowGradient @StringRes fun keystoreNameFor(implementation: SecureAreaImplementationState): Int { diff --git a/appholder/src/main/java/com/android/mdl/app/composables/LoadingIndicator.kt b/appholder/src/main/java/com/android/identity/wallet/composables/LoadingIndicator.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/composables/LoadingIndicator.kt rename to appholder/src/main/java/com/android/identity/wallet/composables/LoadingIndicator.kt index 4f637f482..3732a1217 100644 --- a/appholder/src/main/java/com/android/mdl/app/composables/LoadingIndicator.kt +++ b/appholder/src/main/java/com/android/identity/wallet/composables/LoadingIndicator.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.composables +package com.android.identity.wallet.composables import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -9,7 +9,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.theme.HolderAppTheme @Composable fun LoadingIndicator( diff --git a/appholder/src/main/java/com/android/mdl/app/composables/Preview.kt b/appholder/src/main/java/com/android/identity/wallet/composables/Preview.kt similarity index 84% rename from appholder/src/main/java/com/android/mdl/app/composables/Preview.kt rename to appholder/src/main/java/com/android/identity/wallet/composables/Preview.kt index 1c5933d99..d5a9167b3 100644 --- a/appholder/src/main/java/com/android/mdl/app/composables/Preview.kt +++ b/appholder/src/main/java/com/android/identity/wallet/composables/Preview.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.composables +package com.android.identity.wallet.composables import android.content.res.Configuration import androidx.compose.ui.tooling.preview.Preview diff --git a/appholder/src/main/java/com/android/mdl/app/composables/Toast.kt b/appholder/src/main/java/com/android/identity/wallet/composables/Toast.kt similarity index 84% rename from appholder/src/main/java/com/android/mdl/app/composables/Toast.kt rename to appholder/src/main/java/com/android/identity/wallet/composables/Toast.kt index e0d6d240b..1b920eba8 100644 --- a/appholder/src/main/java/com/android/mdl/app/composables/Toast.kt +++ b/appholder/src/main/java/com/android/identity/wallet/composables/Toast.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.composables +package com.android.identity.wallet.composables import android.widget.Toast import androidx.compose.runtime.Composable diff --git a/appholder/src/main/java/com/android/mdl/app/document/DocumentColor.kt b/appholder/src/main/java/com/android/identity/wallet/document/DocumentColor.kt similarity index 86% rename from appholder/src/main/java/com/android/mdl/app/document/DocumentColor.kt rename to appholder/src/main/java/com/android/identity/wallet/document/DocumentColor.kt index bddec8ddd..dde802c79 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/DocumentColor.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/DocumentColor.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/appholder/src/main/java/com/android/mdl/app/document/DocumentInformation.kt b/appholder/src/main/java/com/android/identity/wallet/document/DocumentInformation.kt similarity index 93% rename from appholder/src/main/java/com/android/mdl/app/document/DocumentInformation.kt rename to appholder/src/main/java/com/android/identity/wallet/document/DocumentInformation.kt index 88759a93d..1d80f23ac 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/DocumentInformation.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/DocumentInformation.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document data class DocumentInformation( val userVisibleName: String, diff --git a/appholder/src/main/java/com/android/mdl/app/document/DocumentManager.kt b/appholder/src/main/java/com/android/identity/wallet/document/DocumentManager.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/document/DocumentManager.kt rename to appholder/src/main/java/com/android/identity/wallet/document/DocumentManager.kt index fd150fa52..6a540a6d9 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/DocumentManager.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/DocumentManager.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document import android.annotation.SuppressLint import android.content.Context @@ -11,19 +11,19 @@ import com.android.identity.* import com.android.identity.android.legacy.* import com.android.identity.credential.Credential import com.android.identity.credential.NameSpacedData -import com.android.mdl.app.util.ProvisioningUtil -import com.android.mdl.app.util.ProvisioningUtil.Companion.toDocumentInformation -import com.android.mdl.app.selfsigned.SelfSignedDocumentData -import com.android.mdl.app.util.DocumentData -import com.android.mdl.app.util.DocumentData.EU_PID_DOCTYPE -import com.android.mdl.app.util.DocumentData.MDL_DOCTYPE -import com.android.mdl.app.util.DocumentData.MICOV_DOCTYPE -import com.android.mdl.app.util.DocumentData.MVR_DOCTYPE -import com.android.mdl.app.util.DocumentData.MVR_NAMESPACE -import com.android.mdl.app.util.FormatUtil +import com.android.identity.wallet.util.ProvisioningUtil +import com.android.identity.wallet.util.ProvisioningUtil.Companion.toDocumentInformation +import com.android.identity.wallet.selfsigned.SelfSignedDocumentData +import com.android.identity.wallet.util.DocumentData +import com.android.identity.wallet.util.DocumentData.EU_PID_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MDL_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MICOV_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MVR_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MVR_NAMESPACE +import com.android.identity.wallet.util.FormatUtil import java.io.ByteArrayOutputStream import java.util.* -import com.android.mdl.app.R +import com.android.identity.wallet.R class DocumentManager private constructor(private val context: Context) { diff --git a/appholder/src/main/java/com/android/mdl/app/document/DocumentType.kt b/appholder/src/main/java/com/android/identity/wallet/document/DocumentType.kt similarity index 79% rename from appholder/src/main/java/com/android/mdl/app/document/DocumentType.kt rename to appholder/src/main/java/com/android/identity/wallet/document/DocumentType.kt index 29b7e0626..e7cc323ee 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/DocumentType.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/DocumentType.kt @@ -1,7 +1,7 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document import android.os.Parcelable -import com.android.mdl.app.util.DocumentData +import com.android.identity.wallet.util.DocumentData import kotlinx.parcelize.Parcelize @Parcelize diff --git a/appholder/src/main/java/com/android/mdl/app/document/KeysAndCertificates.kt b/appholder/src/main/java/com/android/identity/wallet/document/KeysAndCertificates.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/document/KeysAndCertificates.kt rename to appholder/src/main/java/com/android/identity/wallet/document/KeysAndCertificates.kt index 2f8a6afe9..032fa518f 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/KeysAndCertificates.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/KeysAndCertificates.kt @@ -1,7 +1,7 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document import android.content.Context -import com.android.mdl.app.R +import com.android.identity.wallet.R import java.io.InputStream import java.nio.charset.StandardCharsets import java.security.KeyFactory diff --git a/appholder/src/main/java/com/android/mdl/app/document/SecureAreaImplementationState.kt b/appholder/src/main/java/com/android/identity/wallet/document/SecureAreaImplementationState.kt similarity index 88% rename from appholder/src/main/java/com/android/mdl/app/document/SecureAreaImplementationState.kt rename to appholder/src/main/java/com/android/identity/wallet/document/SecureAreaImplementationState.kt index 39c259c04..dc91dd814 100644 --- a/appholder/src/main/java/com/android/mdl/app/document/SecureAreaImplementationState.kt +++ b/appholder/src/main/java/com/android/identity/wallet/document/SecureAreaImplementationState.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.document +package com.android.identity.wallet.document import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/DocumentDataReader.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentDataReader.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/documentdata/DocumentDataReader.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentDataReader.kt index 6047ab963..1a6af8473 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/DocumentDataReader.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentDataReader.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata import android.graphics.BitmapFactory import co.nstant.`in`.cbor.CborDecoder @@ -16,12 +16,12 @@ import co.nstant.`in`.cbor.model.SimpleValueType import co.nstant.`in`.cbor.model.UnicodeString import co.nstant.`in`.cbor.model.UnsignedInteger import com.android.identity.credential.NameSpacedData -import com.android.mdl.app.util.DocumentData.EU_PID_DOCTYPE -import com.android.mdl.app.util.DocumentData.EU_PID_NAMESPACE -import com.android.mdl.app.util.DocumentData.MDL_DOCTYPE -import com.android.mdl.app.util.DocumentData.MDL_NAMESPACE -import com.android.mdl.app.util.DocumentData.MICOV_ATT_NAMESPACE -import com.android.mdl.app.util.DocumentData.MICOV_DOCTYPE +import com.android.identity.wallet.util.DocumentData.EU_PID_DOCTYPE +import com.android.identity.wallet.util.DocumentData.EU_PID_NAMESPACE +import com.android.identity.wallet.util.DocumentData.MDL_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MDL_NAMESPACE +import com.android.identity.wallet.util.DocumentData.MICOV_ATT_NAMESPACE +import com.android.identity.wallet.util.DocumentData.MICOV_DOCTYPE import java.io.ByteArrayInputStream import java.math.BigInteger import java.text.DecimalFormat diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/DocumentElements.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentElements.kt similarity index 85% rename from appholder/src/main/java/com/android/mdl/app/documentdata/DocumentElements.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentElements.kt index 64bf1b7b0..322eff249 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/DocumentElements.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/DocumentElements.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata import android.graphics.Bitmap diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestDocument.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestDocument.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestDocument.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestDocument.kt index c20715693..25e27a5ef 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestDocument.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestDocument.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata import java.io.Serializable diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestEuPid.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestEuPid.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestEuPid.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestEuPid.kt index 2f3ee751b..716c83d2c 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestEuPid.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestEuPid.kt @@ -1,6 +1,6 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata -import com.android.mdl.app.R +import com.android.identity.wallet.R object RequestEuPid : RequestDocument() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMdl.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMdl.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestMdl.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMdl.kt index 0c4b90d3b..447bbea78 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMdl.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMdl.kt @@ -1,6 +1,6 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata -import com.android.mdl.app.R +import com.android.identity.wallet.R object RequestMdl : RequestDocument() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovAtt.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovAtt.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovAtt.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovAtt.kt index a4ef774cc..6196f4c79 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovAtt.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovAtt.kt @@ -1,6 +1,6 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata -import com.android.mdl.app.R +import com.android.identity.wallet.R object RequestMicovAtt : RequestDocument() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovVtr.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovVtr.kt similarity index 90% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovVtr.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovVtr.kt index 1f737e5e7..b0d1e7ea7 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMicovVtr.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMicovVtr.kt @@ -1,6 +1,6 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata -import com.android.mdl.app.R +import com.android.identity.wallet.R object RequestMicovVtr : RequestDocument() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMvr.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMvr.kt similarity index 88% rename from appholder/src/main/java/com/android/mdl/app/documentdata/RequestMvr.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMvr.kt index 0ddc9ae7c..5fb133852 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/RequestMvr.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/RequestMvr.kt @@ -1,6 +1,6 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata -import com.android.mdl.app.R +import com.android.identity.wallet.R object RequestMvr : RequestDocument() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentdata/ShowDocumentDataFragment.kt b/appholder/src/main/java/com/android/identity/wallet/documentdata/ShowDocumentDataFragment.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/documentdata/ShowDocumentDataFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/documentdata/ShowDocumentDataFragment.kt index ab7032e66..148ad9fa0 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentdata/ShowDocumentDataFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentdata/ShowDocumentDataFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentdata +package com.android.identity.wallet.documentdata import android.os.Bundle import android.view.LayoutInflater @@ -8,8 +8,8 @@ import androidx.core.text.HtmlCompat import androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY import androidx.fragment.app.Fragment import androidx.navigation.fragment.navArgs -import com.android.mdl.app.databinding.FragmentShowDocumentDataBinding -import com.android.mdl.app.transfer.TransferManager +import com.android.identity.wallet.databinding.FragmentShowDocumentDataBinding +import com.android.identity.wallet.transfer.TransferManager class ShowDocumentDataFragment : Fragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreen.kt b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreen.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreen.kt rename to appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreen.kt index 0719b05e6..73d3b2328 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreen.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreen.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentinfo +package com.android.identity.wallet.documentinfo import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.ExperimentalFoundationApi @@ -57,12 +57,12 @@ import com.android.identity.securearea.SecureArea.EC_CURVE_X25519 import com.android.identity.securearea.SecureArea.EC_CURVE_X448 import com.android.identity.securearea.SecureArea.KEY_PURPOSE_AGREE_KEY import com.android.identity.securearea.SecureArea.KEY_PURPOSE_SIGN -import com.android.mdl.app.R -import com.android.mdl.app.composables.LoadingIndicator -import com.android.mdl.app.composables.ShowToast -import com.android.mdl.app.composables.gradientFor -import com.android.mdl.app.composables.keystoreNameFor -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.R +import com.android.identity.wallet.composables.LoadingIndicator +import com.android.identity.wallet.composables.ShowToast +import com.android.identity.wallet.composables.gradientFor +import com.android.identity.wallet.composables.keystoreNameFor +import com.android.identity.wallet.theme.HolderAppTheme @Composable fun DocumentInfoScreen( diff --git a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreenState.kt b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreenState.kt similarity index 85% rename from appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreenState.kt rename to appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreenState.kt index 34fd09d8b..d92445143 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoScreenState.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoScreenState.kt @@ -1,11 +1,11 @@ -package com.android.mdl.app.documentinfo +package com.android.identity.wallet.documentinfo import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable import com.android.identity.securearea.SecureArea.EcCurve import com.android.identity.securearea.SecureArea.KeyPurpose -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.SecureAreaImplementationState +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.SecureAreaImplementationState @Immutable data class DocumentInfoScreenState( diff --git a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoViewModel.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoViewModel.kt index 078db8347..6215e3b9f 100644 --- a/appholder/src/main/java/com/android/mdl/app/documentinfo/DocumentInfoViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/documentinfo/DocumentInfoViewModel.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.documentinfo +package com.android.identity.wallet.documentinfo import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel @@ -7,10 +7,10 @@ import androidx.lifecycle.createSavedStateHandle import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewmodel.initializer import androidx.lifecycle.viewmodel.viewModelFactory -import com.android.mdl.app.composables.toCardArt -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.fragment.DocumentDetailFragmentArgs +import com.android.identity.wallet.composables.toCardArt +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.fragment.DocumentDetailFragmentArgs import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow diff --git a/appholder/src/main/java/com/android/mdl/app/fragment/DocumentDetailFragment.kt b/appholder/src/main/java/com/android/identity/wallet/fragment/DocumentDetailFragment.kt similarity index 83% rename from appholder/src/main/java/com/android/mdl/app/fragment/DocumentDetailFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/fragment/DocumentDetailFragment.kt index 0bec296ef..36e001cf0 100644 --- a/appholder/src/main/java/com/android/mdl/app/fragment/DocumentDetailFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/fragment/DocumentDetailFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.fragment +package com.android.identity.wallet.fragment import android.os.Bundle import android.view.LayoutInflater @@ -9,10 +9,10 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.documentinfo.DocumentInfoScreen -import com.android.mdl.app.documentinfo.DocumentInfoViewModel -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.documentinfo.DocumentInfoScreen +import com.android.identity.wallet.documentinfo.DocumentInfoViewModel +import com.android.identity.wallet.theme.HolderAppTheme class DocumentDetailFragment : Fragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/fragment/ReverseEngagementFragment.kt b/appholder/src/main/java/com/android/identity/wallet/fragment/ReverseEngagementFragment.kt similarity index 94% rename from appholder/src/main/java/com/android/mdl/app/fragment/ReverseEngagementFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/fragment/ReverseEngagementFragment.kt index a8cd4fca6..22ce77a2a 100644 --- a/appholder/src/main/java/com/android/mdl/app/fragment/ReverseEngagementFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/fragment/ReverseEngagementFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.fragment +package com.android.identity.wallet.fragment import android.Manifest import android.content.Intent @@ -15,10 +15,10 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import com.android.identity.mdoc.origininfo.OriginInfo -import com.android.mdl.app.databinding.FragmentReverseEngagementBinding -import com.android.mdl.app.util.log -import com.android.mdl.app.util.logWarning -import com.android.mdl.app.viewmodel.ShareDocumentViewModel +import com.android.identity.wallet.databinding.FragmentReverseEngagementBinding +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.logWarning +import com.android.identity.wallet.viewmodel.ShareDocumentViewModel import com.budiyev.android.codescanner.CodeScanner import com.budiyev.android.codescanner.DecodeCallback diff --git a/appholder/src/main/java/com/android/mdl/app/fragment/SelfSignedDetailsFragment.kt b/appholder/src/main/java/com/android/identity/wallet/fragment/SelfSignedDetailsFragment.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/fragment/SelfSignedDetailsFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/fragment/SelfSignedDetailsFragment.kt index 500e184d1..9e007b2c1 100644 --- a/appholder/src/main/java/com/android/mdl/app/fragment/SelfSignedDetailsFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/fragment/SelfSignedDetailsFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.fragment +package com.android.identity.wallet.fragment import android.Manifest import android.content.Intent @@ -32,16 +32,16 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs -import com.android.mdl.app.databinding.FragmentSelfSignedDetailsBinding -import com.android.mdl.app.util.Field -import com.android.mdl.app.util.FieldType -import com.android.mdl.app.util.FormatUtil.fullDateStringToMilliseconds -import com.android.mdl.app.util.FormatUtil.millisecondsToFullDateString -import com.android.mdl.app.selfsigned.ProvisionInfo -import com.android.mdl.app.selfsigned.SelfSignedDocumentData -import com.android.mdl.app.util.log -import com.android.mdl.app.util.logError -import com.android.mdl.app.viewmodel.SelfSignedViewModel +import com.android.identity.wallet.databinding.FragmentSelfSignedDetailsBinding +import com.android.identity.wallet.util.Field +import com.android.identity.wallet.util.FieldType +import com.android.identity.wallet.util.FormatUtil.fullDateStringToMilliseconds +import com.android.identity.wallet.util.FormatUtil.millisecondsToFullDateString +import com.android.identity.wallet.selfsigned.ProvisionInfo +import com.android.identity.wallet.selfsigned.SelfSignedDocumentData +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.logError +import com.android.identity.wallet.viewmodel.SelfSignedViewModel import com.google.android.material.datepicker.MaterialDatePicker import java.io.File import java.io.IOException diff --git a/appholder/src/main/java/com/android/mdl/app/fragment/ShareDocumentFragment.kt b/appholder/src/main/java/com/android/identity/wallet/fragment/ShareDocumentFragment.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/fragment/ShareDocumentFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/fragment/ShareDocumentFragment.kt index 5b7ff92ed..a01aa8767 100644 --- a/appholder/src/main/java/com/android/mdl/app/fragment/ShareDocumentFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/fragment/ShareDocumentFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.fragment +package com.android.identity.wallet.fragment import android.os.Bundle import android.view.LayoutInflater @@ -8,9 +8,9 @@ import androidx.activity.OnBackPressedCallback import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController -import com.android.mdl.app.databinding.FragmentShareDocumentBinding -import com.android.mdl.app.util.TransferStatus -import com.android.mdl.app.viewmodel.ShareDocumentViewModel +import com.android.identity.wallet.databinding.FragmentShareDocumentBinding +import com.android.identity.wallet.util.TransferStatus +import com.android.identity.wallet.viewmodel.ShareDocumentViewModel class ShareDocumentFragment : Fragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/fragment/TransferDocumentFragment.kt b/appholder/src/main/java/com/android/identity/wallet/fragment/TransferDocumentFragment.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/fragment/TransferDocumentFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/fragment/TransferDocumentFragment.kt index 6d488406d..eb4db80d3 100644 --- a/appholder/src/main/java/com/android/mdl/app/fragment/TransferDocumentFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/fragment/TransferDocumentFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.fragment +package com.android.identity.wallet.fragment import android.content.Context import android.os.Bundle @@ -11,16 +11,16 @@ import androidx.appcompat.app.AlertDialog import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.navigation.fragment.findNavController -import com.android.mdl.app.R -import com.android.mdl.app.databinding.FragmentTransferDocumentBinding -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.document.KeysAndCertificates -import com.android.mdl.app.readerauth.SimpleReaderTrustStore -import com.android.mdl.app.transfer.TransferManager -import com.android.mdl.app.util.PreferencesHelper -import com.android.mdl.app.util.TransferStatus -import com.android.mdl.app.util.log -import com.android.mdl.app.viewmodel.TransferDocumentViewModel +import com.android.identity.wallet.R +import com.android.identity.wallet.databinding.FragmentTransferDocumentBinding +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.document.KeysAndCertificates +import com.android.identity.wallet.readerauth.SimpleReaderTrustStore +import com.android.identity.wallet.transfer.TransferManager +import com.android.identity.wallet.util.PreferencesHelper +import com.android.identity.wallet.util.TransferStatus +import com.android.identity.wallet.util.log +import com.android.identity.wallet.viewmodel.TransferDocumentViewModel class TransferDocumentFragment : Fragment() { private var _binding: FragmentTransferDocumentBinding? = null @@ -83,7 +83,7 @@ class TransferDocumentFragment : Fragment() { log("Request") try { - val trustStore = SimpleReaderTrustStore( + val trustStore = com.android.identity.wallet.readerauth.SimpleReaderTrustStore( KeysAndCertificates.getTrustedReaderCertificates(requireContext()) ) val requestedDocuments = viewModel.getRequestedDocuments() diff --git a/appholder/src/main/java/com/android/mdl/app/readerauth/ReaderTrustStore.java b/appholder/src/main/java/com/android/identity/wallet/readerauth/ReaderTrustStore.java similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/readerauth/ReaderTrustStore.java rename to appholder/src/main/java/com/android/identity/wallet/readerauth/ReaderTrustStore.java index dc9adde22..47dc0b2d5 100644 --- a/appholder/src/main/java/com/android/mdl/app/readerauth/ReaderTrustStore.java +++ b/appholder/src/main/java/com/android/identity/wallet/readerauth/ReaderTrustStore.java @@ -1,4 +1,4 @@ -package com.android.mdl.app.readerauth; +package com.android.identity.wallet.readerauth; import java.security.cert.X509Certificate; import java.util.List; diff --git a/appholder/src/main/java/com/android/mdl/app/readerauth/SimpleReaderTrustStore.java b/appholder/src/main/java/com/android/identity/wallet/readerauth/SimpleReaderTrustStore.java similarity index 99% rename from appholder/src/main/java/com/android/mdl/app/readerauth/SimpleReaderTrustStore.java rename to appholder/src/main/java/com/android/identity/wallet/readerauth/SimpleReaderTrustStore.java index bbd9d20e9..45b97e6e7 100644 --- a/appholder/src/main/java/com/android/mdl/app/readerauth/SimpleReaderTrustStore.java +++ b/appholder/src/main/java/com/android/identity/wallet/readerauth/SimpleReaderTrustStore.java @@ -1,4 +1,4 @@ -package com.android.mdl.app.readerauth; +package com.android.identity.wallet.readerauth; import org.bouncycastle.asn1.x500.X500Name; diff --git a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedDocumentScreen.kt b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedDocumentScreen.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedDocumentScreen.kt rename to appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedDocumentScreen.kt index 1d7788e86..78e7cd28f 100644 --- a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedDocumentScreen.kt +++ b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedDocumentScreen.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import androidx.annotation.StringRes import androidx.compose.animation.AnimatedContent @@ -60,15 +60,15 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.android.identity.securearea.SecureArea -import com.android.mdl.app.R -import com.android.mdl.app.composables.PreviewLightDark -import com.android.mdl.app.composables.gradientFor -import com.android.mdl.app.composables.keystoreNameFor -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.DocumentType -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.* -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.R +import com.android.identity.wallet.composables.PreviewLightDark +import com.android.identity.wallet.composables.gradientFor +import com.android.identity.wallet.composables.keystoreNameFor +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.DocumentType +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.* +import com.android.identity.wallet.theme.HolderAppTheme @Composable fun AddSelfSignedDocumentScreen( diff --git a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedFragment.kt b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedFragment.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedFragment.kt index 25486bbaa..dbca20cf2 100644 --- a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import android.os.Bundle import android.view.LayoutInflater @@ -8,7 +8,7 @@ import androidx.compose.ui.platform.ComposeView import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.theme.HolderAppTheme class AddSelfSignedFragment : Fragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedScreenState.kt b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedScreenState.kt similarity index 94% rename from appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedScreenState.kt rename to appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedScreenState.kt index eaa2802f4..184ec58f0 100644 --- a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedScreenState.kt +++ b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedScreenState.kt @@ -1,10 +1,10 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import android.os.Parcelable import com.android.identity.securearea.SecureArea -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.DocumentType -import com.android.mdl.app.document.SecureAreaImplementationState +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.DocumentType +import com.android.identity.wallet.document.SecureAreaImplementationState import kotlinx.parcelize.Parcelize @Parcelize diff --git a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedViewModel.kt similarity index 88% rename from appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedViewModel.kt index 5afe82269..3830842c4 100644 --- a/appholder/src/main/java/com/android/mdl/app/selfsigned/AddSelfSignedViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/selfsigned/AddSelfSignedViewModel.kt @@ -1,20 +1,20 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import android.content.Context import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import com.android.identity.android.securearea.KeystoreUtil -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.DocumentType -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveOption -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.AuthTypeState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.BouncyCastleAuthKeyCurveOption -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.MdocAuthOptionState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.MdocAuthStateOption -import com.android.mdl.app.util.getState -import com.android.mdl.app.util.updateState +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.DocumentType +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveOption +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.AuthTypeState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.BouncyCastleAuthKeyCurveOption +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.MdocAuthOptionState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.MdocAuthStateOption +import com.android.identity.wallet.util.getState +import com.android.identity.wallet.util.updateState import kotlinx.coroutines.flow.StateFlow import java.lang.Integer.max diff --git a/appholder/src/main/java/com/android/mdl/app/selfsigned/SelfSignedDocumentData.kt b/appholder/src/main/java/com/android/identity/wallet/selfsigned/SelfSignedDocumentData.kt similarity index 83% rename from appholder/src/main/java/com/android/mdl/app/selfsigned/SelfSignedDocumentData.kt rename to appholder/src/main/java/com/android/identity/wallet/selfsigned/SelfSignedDocumentData.kt index 0aa434588..f258318d8 100644 --- a/appholder/src/main/java/com/android/mdl/app/selfsigned/SelfSignedDocumentData.kt +++ b/appholder/src/main/java/com/android/identity/wallet/selfsigned/SelfSignedDocumentData.kt @@ -1,10 +1,10 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import android.graphics.Bitmap import android.os.Parcelable -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.MdocAuthStateOption -import com.android.mdl.app.util.Field +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.MdocAuthStateOption +import com.android.identity.wallet.util.Field import kotlinx.parcelize.Parcelize data class SelfSignedDocumentData( diff --git a/appholder/src/main/java/com/android/mdl/app/settings/SettingsFragment.kt b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsFragment.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/settings/SettingsFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/settings/SettingsFragment.kt index 3a43c0927..17a1bb4b5 100644 --- a/appholder/src/main/java/com/android/mdl/app/settings/SettingsFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.settings +package com.android.identity.wallet.settings import android.os.Bundle import android.view.LayoutInflater @@ -10,7 +10,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.ComposeView import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.theme.HolderAppTheme class SettingsFragment : Fragment() { diff --git a/appholder/src/main/java/com/android/mdl/app/settings/SettingsScreen.kt b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreen.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/settings/SettingsScreen.kt rename to appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreen.kt index ae23fcc1c..b4721824b 100644 --- a/appholder/src/main/java/com/android/mdl/app/settings/SettingsScreen.kt +++ b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreen.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.settings +package com.android.identity.wallet.settings import android.content.res.Configuration import androidx.compose.foundation.layout.Arrangement @@ -17,7 +17,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.android.mdl.app.theme.HolderAppTheme +import com.android.identity.wallet.theme.HolderAppTheme @Composable fun SettingsScreen( diff --git a/appholder/src/main/java/com/android/mdl/app/settings/SettingsScreenState.kt b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreenState.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/settings/SettingsScreenState.kt rename to appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreenState.kt index 499b7cc59..f907e53ec 100644 --- a/appholder/src/main/java/com/android/mdl/app/settings/SettingsScreenState.kt +++ b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsScreenState.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.settings +package com.android.identity.wallet.settings import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable diff --git a/appholder/src/main/java/com/android/mdl/app/settings/SettingsViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsViewModel.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/settings/SettingsViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/settings/SettingsViewModel.kt index 87e801967..aaa035af1 100644 --- a/appholder/src/main/java/com/android/mdl/app/settings/SettingsViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/settings/SettingsViewModel.kt @@ -1,7 +1,7 @@ -package com.android.mdl.app.settings +package com.android.identity.wallet.settings import androidx.lifecycle.ViewModel -import com.android.mdl.app.util.PreferencesHelper +import com.android.identity.wallet.util.PreferencesHelper import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.update diff --git a/appholder/src/main/java/com/android/mdl/app/theme/Color.kt b/appholder/src/main/java/com/android/identity/wallet/theme/Color.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/theme/Color.kt rename to appholder/src/main/java/com/android/identity/wallet/theme/Color.kt index 5269598d6..3cd8bccb9 100644 --- a/appholder/src/main/java/com/android/mdl/app/theme/Color.kt +++ b/appholder/src/main/java/com/android/identity/wallet/theme/Color.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.theme +package com.android.identity.wallet.theme import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color diff --git a/appholder/src/main/java/com/android/mdl/app/theme/Shape.kt b/appholder/src/main/java/com/android/identity/wallet/theme/Shape.kt similarity index 86% rename from appholder/src/main/java/com/android/mdl/app/theme/Shape.kt rename to appholder/src/main/java/com/android/identity/wallet/theme/Shape.kt index ce73a15b7..6edaebc19 100644 --- a/appholder/src/main/java/com/android/mdl/app/theme/Shape.kt +++ b/appholder/src/main/java/com/android/identity/wallet/theme/Shape.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.theme +package com.android.identity.wallet.theme import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Shapes diff --git a/appholder/src/main/java/com/android/mdl/app/theme/Theme.kt b/appholder/src/main/java/com/android/identity/wallet/theme/Theme.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/theme/Theme.kt rename to appholder/src/main/java/com/android/identity/wallet/theme/Theme.kt index c94e5a68b..d5c9b31d8 100644 --- a/appholder/src/main/java/com/android/mdl/app/theme/Theme.kt +++ b/appholder/src/main/java/com/android/identity/wallet/theme/Theme.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.theme +package com.android.identity.wallet.theme import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme diff --git a/appholder/src/main/java/com/android/mdl/app/theme/Type.kt b/appholder/src/main/java/com/android/identity/wallet/theme/Type.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/theme/Type.kt rename to appholder/src/main/java/com/android/identity/wallet/theme/Type.kt index bb480f10f..d6341d7b3 100644 --- a/appholder/src/main/java/com/android/mdl/app/theme/Type.kt +++ b/appholder/src/main/java/com/android/identity/wallet/theme/Type.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.theme +package com.android.identity.wallet.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/AddDocumentToResponseResult.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/AddDocumentToResponseResult.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/transfer/AddDocumentToResponseResult.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/AddDocumentToResponseResult.kt index 798c9216b..212a84616 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/AddDocumentToResponseResult.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/AddDocumentToResponseResult.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer sealed class AddDocumentToResponseResult { diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/Communication.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/Communication.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/transfer/Communication.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/Communication.kt index 0e05f7c58..b0e7c9827 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/Communication.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/Communication.kt @@ -1,12 +1,12 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.annotation.SuppressLint import android.content.Context import com.android.identity.util.Constants import com.android.identity.mdoc.request.DeviceRequestParser import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper -import com.android.mdl.app.util.log -import com.android.mdl.app.util.mainExecutor +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.mainExecutor import java.util.OptionalLong class Communication private constructor( diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/ConnectionSetup.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/ConnectionSetup.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/transfer/ConnectionSetup.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/ConnectionSetup.kt index 1d410e644..b2622d178 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/ConnectionSetup.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/ConnectionSetup.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.content.Context import com.android.identity.mdoc.connectionmethod.ConnectionMethod @@ -6,7 +6,7 @@ import com.android.identity.mdoc.connectionmethod.ConnectionMethodBle import com.android.identity.mdoc.connectionmethod.ConnectionMethodNfc import com.android.identity.mdoc.connectionmethod.ConnectionMethodWifiAware import com.android.identity.android.mdoc.transport.DataTransportOptions -import com.android.mdl.app.util.PreferencesHelper +import com.android.identity.wallet.util.PreferencesHelper import java.util.ArrayList import java.util.OptionalLong import java.util.UUID diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/CredentialStore.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/CredentialStore.kt similarity index 87% rename from appholder/src/main/java/com/android/mdl/app/transfer/CredentialStore.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/CredentialStore.kt index 87bea4859..79b6e35c9 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/CredentialStore.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/CredentialStore.kt @@ -1,8 +1,8 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.content.Context import com.android.identity.android.legacy.IdentityCredentialStore -import com.android.mdl.app.util.PreferencesHelper +import com.android.identity.wallet.util.PreferencesHelper class CredentialStore( private val context: Context diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/QrCommunicationSetup.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/QrCommunicationSetup.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/transfer/QrCommunicationSetup.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/QrCommunicationSetup.kt index b302efd80..4f7d67b4d 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/QrCommunicationSetup.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/QrCommunicationSetup.kt @@ -1,12 +1,12 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.content.Context import com.android.identity.android.mdoc.transport.DataTransport import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper import com.android.identity.android.legacy.PresentationSession import com.android.identity.android.mdoc.engagement.QrEngagementHelper -import com.android.mdl.app.util.log -import com.android.mdl.app.util.mainExecutor +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.mainExecutor import java.security.PublicKey class QrCommunicationSetup( diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/ReverseQrCommunicationSetup.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/ReverseQrCommunicationSetup.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/transfer/ReverseQrCommunicationSetup.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/ReverseQrCommunicationSetup.kt index 718b646e4..edf721866 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/ReverseQrCommunicationSetup.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/ReverseQrCommunicationSetup.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.content.Context import android.net.Uri @@ -8,8 +8,8 @@ import com.android.identity.mdoc.engagement.EngagementParser import com.android.identity.mdoc.origininfo.OriginInfo import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper import com.android.identity.android.legacy.PresentationSession -import com.android.mdl.app.util.log -import com.android.mdl.app.util.mainExecutor +import com.android.identity.wallet.util.log +import com.android.identity.wallet.util.mainExecutor import java.security.PublicKey class ReverseQrCommunicationSetup( diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/SessionSetup.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/SessionSetup.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/transfer/SessionSetup.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/SessionSetup.kt index ecc4f682a..e69f0d5c5 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/SessionSetup.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/SessionSetup.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import com.android.identity.android.legacy.IdentityCredentialStore.CIPHERSUITE_ECDHE_HKDF_ECDSA_WITH_AES_256_GCM_SHA256 import com.android.identity.android.legacy.PresentationSession diff --git a/appholder/src/main/java/com/android/mdl/app/transfer/TransferManager.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt similarity index 97% rename from appholder/src/main/java/com/android/mdl/app/transfer/TransferManager.kt rename to appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt index ec30c58b1..6d765a801 100644 --- a/appholder/src/main/java/com/android/mdl/app/transfer/TransferManager.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.transfer +package com.android.identity.wallet.transfer import android.annotation.SuppressLint import android.content.Context @@ -25,11 +25,11 @@ import com.android.identity.mdoc.response.DocumentGenerator import com.android.identity.mdoc.util.MdocUtil import com.android.identity.securearea.SecureArea import com.android.identity.util.Timestamp -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.documentdata.DocumentDataReader -import com.android.mdl.app.documentdata.DocumentElements -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState -import com.android.mdl.app.util.* +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.documentdata.DocumentDataReader +import com.android.identity.wallet.documentdata.DocumentElements +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState +import com.android.identity.wallet.util.* import com.google.zxing.BarcodeFormat import com.google.zxing.MultiFormatWriter import com.google.zxing.WriterException diff --git a/appholder/src/main/java/com/android/mdl/app/util/BindingAdapters.kt b/appholder/src/main/java/com/android/identity/wallet/util/BindingAdapters.kt similarity index 93% rename from appholder/src/main/java/com/android/mdl/app/util/BindingAdapters.kt rename to appholder/src/main/java/com/android/identity/wallet/util/BindingAdapters.kt index b2d35e834..c61aba37b 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/BindingAdapters.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/BindingAdapters.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.view.View import android.view.ViewGroup diff --git a/appholder/src/main/java/com/android/mdl/app/util/ContextExtensions.kt b/appholder/src/main/java/com/android/identity/wallet/util/ContextExtensions.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/util/ContextExtensions.kt rename to appholder/src/main/java/com/android/identity/wallet/util/ContextExtensions.kt index e17f6e428..76ee921ec 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/ContextExtensions.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/ContextExtensions.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.content.Context import android.os.Build diff --git a/appholder/src/main/java/com/android/mdl/app/util/DocumentData.kt b/appholder/src/main/java/com/android/identity/wallet/util/DocumentData.kt similarity index 95% rename from appholder/src/main/java/com/android/mdl/app/util/DocumentData.kt rename to appholder/src/main/java/com/android/identity/wallet/util/DocumentData.kt index d2e7515fa..ef6cf6775 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/DocumentData.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/DocumentData.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util object DocumentData { const val MDL_DOCTYPE = "org.iso.18013.5.1.mDL" diff --git a/appholder/src/main/java/com/android/mdl/app/util/FormatUtil.kt b/appholder/src/main/java/com/android/identity/wallet/util/FormatUtil.kt similarity index 98% rename from appholder/src/main/java/com/android/mdl/app/util/FormatUtil.kt rename to appholder/src/main/java/com/android/identity/wallet/util/FormatUtil.kt index 2f8b2b011..179d0a179 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/FormatUtil.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/FormatUtil.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.icu.text.SimpleDateFormat import android.icu.util.TimeZone diff --git a/appholder/src/main/java/com/android/mdl/app/util/LogginExtensions.kt b/appholder/src/main/java/com/android/identity/wallet/util/LogginExtensions.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/util/LogginExtensions.kt rename to appholder/src/main/java/com/android/identity/wallet/util/LogginExtensions.kt index e0a2f8fbb..67e19216b 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/LogginExtensions.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/LogginExtensions.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.util.Log diff --git a/appholder/src/main/java/com/android/mdl/app/util/NfcDataTransferHandler.kt b/appholder/src/main/java/com/android/identity/wallet/util/NfcDataTransferHandler.kt similarity index 93% rename from appholder/src/main/java/com/android/mdl/app/util/NfcDataTransferHandler.kt rename to appholder/src/main/java/com/android/identity/wallet/util/NfcDataTransferHandler.kt index c4f2bc006..ec7821753 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/NfcDataTransferHandler.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/NfcDataTransferHandler.kt @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.nfc.cardemulation.HostApduService import android.os.Bundle import com.android.identity.android.mdoc.transport.DataTransportNfc -import com.android.mdl.app.transfer.TransferManager +import com.android.identity.wallet.transfer.TransferManager class NfcDataTransferHandler : HostApduService() { diff --git a/appholder/src/main/java/com/android/mdl/app/util/NfcEngagementHandler.kt b/appholder/src/main/java/com/android/identity/wallet/util/NfcEngagementHandler.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/util/NfcEngagementHandler.kt rename to appholder/src/main/java/com/android/identity/wallet/util/NfcEngagementHandler.kt index 923c30cba..cb43af8b2 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/NfcEngagementHandler.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/NfcEngagementHandler.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.content.Intent import android.nfc.cardemulation.HostApduService @@ -26,13 +26,13 @@ import com.android.identity.android.mdoc.transport.DataTransport import com.android.identity.android.mdoc.engagement.NfcEngagementHelper import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper import com.android.identity.android.legacy.PresentationSession -import com.android.mdl.app.MainActivity -import com.android.mdl.app.R -import com.android.mdl.app.transfer.Communication -import com.android.mdl.app.transfer.ConnectionSetup -import com.android.mdl.app.transfer.CredentialStore -import com.android.mdl.app.transfer.SessionSetup -import com.android.mdl.app.transfer.TransferManager +import com.android.identity.wallet.MainActivity +import com.android.identity.wallet.R +import com.android.identity.wallet.transfer.Communication +import com.android.identity.wallet.transfer.ConnectionSetup +import com.android.identity.wallet.transfer.CredentialStore +import com.android.identity.wallet.transfer.SessionSetup +import com.android.identity.wallet.transfer.TransferManager import java.security.PublicKey @@ -52,7 +52,7 @@ class NfcEngagementHandler : HostApduService() { override fun onDeviceConnecting() { log("Engagement Listener: Device Connecting. Launching Transfer Screen") - val launchAppIntent = Intent(applicationContext, MainActivity::class.java) + val launchAppIntent = Intent(applicationContext, com.android.identity.wallet.MainActivity::class.java) launchAppIntent.action = Intent.ACTION_VIEW launchAppIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) launchAppIntent.addCategory(Intent.CATEGORY_DEFAULT) @@ -62,7 +62,7 @@ class NfcEngagementHandler : HostApduService() { val pendingIntent = NavDeepLinkBuilder(applicationContext) .setGraph(R.navigation.navigation_graph) .setDestination(R.id.transferDocumentFragment) - .setComponentName(MainActivity::class.java) + .setComponentName(com.android.identity.wallet.MainActivity::class.java) .createPendingIntent() pendingIntent.send(applicationContext, 0, null) transferManager.updateStatus(TransferStatus.CONNECTING) diff --git a/appholder/src/main/java/com/android/mdl/app/util/Preconditions.kt b/appholder/src/main/java/com/android/identity/wallet/util/Preconditions.kt similarity index 91% rename from appholder/src/main/java/com/android/mdl/app/util/Preconditions.kt rename to appholder/src/main/java/com/android/identity/wallet/util/Preconditions.kt index e7392a3c0..096d4f7d5 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/Preconditions.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/Preconditions.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalContracts::class) -package com.android.mdl.app.util +package com.android.identity.wallet.util import kotlin.contracts.ExperimentalContracts import kotlin.contracts.contract diff --git a/appholder/src/main/java/com/android/mdl/app/util/PreferencesHelper.kt b/appholder/src/main/java/com/android/identity/wallet/util/PreferencesHelper.kt similarity index 99% rename from appholder/src/main/java/com/android/mdl/app/util/PreferencesHelper.kt rename to appholder/src/main/java/com/android/identity/wallet/util/PreferencesHelper.kt index 086b9b998..30512ea00 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/PreferencesHelper.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/PreferencesHelper.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.content.Context import android.content.SharedPreferences diff --git a/appholder/src/main/java/com/android/mdl/app/util/ProvisioningUtil.kt b/appholder/src/main/java/com/android/identity/wallet/util/ProvisioningUtil.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/util/ProvisioningUtil.kt rename to appholder/src/main/java/com/android/identity/wallet/util/ProvisioningUtil.kt index afa5b3c04..12d295457 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/ProvisioningUtil.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/ProvisioningUtil.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import android.annotation.SuppressLint import android.content.Context @@ -17,13 +17,13 @@ import com.android.identity.securearea.SecureArea import com.android.identity.securearea.SecureArea.KeyPurpose import com.android.identity.securearea.SecureAreaRepository import com.android.identity.util.Timestamp -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.document.KeysAndCertificates -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState -import com.android.mdl.app.selfsigned.ProvisionInfo -import com.android.mdl.app.util.DocumentData.MICOV_DOCTYPE -import com.android.mdl.app.util.DocumentData.MVR_DOCTYPE +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.document.KeysAndCertificates +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState +import com.android.identity.wallet.selfsigned.ProvisionInfo +import com.android.identity.wallet.util.DocumentData.MICOV_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MVR_DOCTYPE import java.io.File import java.security.cert.X509Certificate import java.time.Instant diff --git a/appholder/src/main/java/com/android/mdl/app/util/SavedStateHandleExtensions.kt b/appholder/src/main/java/com/android/identity/wallet/util/SavedStateHandleExtensions.kt similarity index 87% rename from appholder/src/main/java/com/android/mdl/app/util/SavedStateHandleExtensions.kt rename to appholder/src/main/java/com/android/identity/wallet/util/SavedStateHandleExtensions.kt index f1808c0db..2fc445ce0 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/SavedStateHandleExtensions.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/SavedStateHandleExtensions.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util import androidx.lifecycle.SavedStateHandle diff --git a/appholder/src/main/java/com/android/mdl/app/util/TransferStatus.kt b/appholder/src/main/java/com/android/identity/wallet/util/TransferStatus.kt similarity index 80% rename from appholder/src/main/java/com/android/mdl/app/util/TransferStatus.kt rename to appholder/src/main/java/com/android/identity/wallet/util/TransferStatus.kt index 2ce118fb0..a939071ad 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/TransferStatus.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/TransferStatus.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util enum class TransferStatus { QR_ENGAGEMENT_READY, diff --git a/appholder/src/main/java/com/android/mdl/app/util/ViewHelper.kt b/appholder/src/main/java/com/android/identity/wallet/util/ViewHelper.kt similarity index 82% rename from appholder/src/main/java/com/android/mdl/app/util/ViewHelper.kt rename to appholder/src/main/java/com/android/identity/wallet/util/ViewHelper.kt index 741d93318..08b4b9eb6 100644 --- a/appholder/src/main/java/com/android/mdl/app/util/ViewHelper.kt +++ b/appholder/src/main/java/com/android/identity/wallet/util/ViewHelper.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.util +package com.android.identity.wallet.util data class Field( val id: Int, diff --git a/appholder/src/main/java/com/android/mdl/app/viewmodel/SelfSignedViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/viewmodel/SelfSignedViewModel.kt similarity index 96% rename from appholder/src/main/java/com/android/mdl/app/viewmodel/SelfSignedViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/viewmodel/SelfSignedViewModel.kt index 7ef7355bd..bf75f6360 100644 --- a/appholder/src/main/java/com/android/mdl/app/viewmodel/SelfSignedViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/viewmodel/SelfSignedViewModel.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.viewmodel +package com.android.identity.wallet.viewmodel import android.app.Application import android.graphics.BitmapFactory @@ -6,15 +6,15 @@ import android.view.View import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import androidx.lifecycle.viewModelScope -import com.android.mdl.app.R -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.selfsigned.SelfSignedDocumentData -import com.android.mdl.app.util.DocumentData.EU_PID_DOCTYPE -import com.android.mdl.app.util.DocumentData.MDL_DOCTYPE -import com.android.mdl.app.util.DocumentData.MICOV_DOCTYPE -import com.android.mdl.app.util.DocumentData.MVR_DOCTYPE -import com.android.mdl.app.util.Field -import com.android.mdl.app.util.FieldType +import com.android.identity.wallet.R +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.selfsigned.SelfSignedDocumentData +import com.android.identity.wallet.util.DocumentData.EU_PID_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MDL_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MICOV_DOCTYPE +import com.android.identity.wallet.util.DocumentData.MVR_DOCTYPE +import com.android.identity.wallet.util.Field +import com.android.identity.wallet.util.FieldType import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext diff --git a/appholder/src/main/java/com/android/mdl/app/viewmodel/ShareDocumentViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/viewmodel/ShareDocumentViewModel.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/viewmodel/ShareDocumentViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/viewmodel/ShareDocumentViewModel.kt index 22c8a8be1..8e98d874c 100644 --- a/appholder/src/main/java/com/android/mdl/app/viewmodel/ShareDocumentViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/viewmodel/ShareDocumentViewModel.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.viewmodel +package com.android.identity.wallet.viewmodel import android.app.Application import android.view.View @@ -6,8 +6,8 @@ import androidx.databinding.ObservableField import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.LiveData import com.android.identity.mdoc.origininfo.OriginInfo -import com.android.mdl.app.transfer.TransferManager -import com.android.mdl.app.util.TransferStatus +import com.android.identity.wallet.transfer.TransferManager +import com.android.identity.wallet.util.TransferStatus class ShareDocumentViewModel(val app: Application) : AndroidViewModel(app) { diff --git a/appholder/src/main/java/com/android/mdl/app/viewmodel/TransferDocumentViewModel.kt b/appholder/src/main/java/com/android/identity/wallet/viewmodel/TransferDocumentViewModel.kt similarity index 89% rename from appholder/src/main/java/com/android/mdl/app/viewmodel/TransferDocumentViewModel.kt rename to appholder/src/main/java/com/android/identity/wallet/viewmodel/TransferDocumentViewModel.kt index f93a3aba1..a189c7fe3 100644 --- a/appholder/src/main/java/com/android/mdl/app/viewmodel/TransferDocumentViewModel.kt +++ b/appholder/src/main/java/com/android/identity/wallet/viewmodel/TransferDocumentViewModel.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.viewmodel +package com.android.identity.wallet.viewmodel import android.app.Application import android.view.View @@ -13,17 +13,17 @@ import com.android.identity.android.legacy.CredentialInvalidatedException import com.android.identity.mdoc.response.DeviceResponseGenerator import com.android.identity.mdoc.request.DeviceRequestParser import com.android.identity.securearea.SecureArea -import com.android.mdl.app.R -import com.android.mdl.app.authconfirmation.RequestedDocumentData -import com.android.mdl.app.authconfirmation.RequestedElement -import com.android.mdl.app.authconfirmation.SignedElementsCollection -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.transfer.AddDocumentToResponseResult -import com.android.mdl.app.transfer.TransferManager -import com.android.mdl.app.util.TransferStatus -import com.android.mdl.app.util.logWarning -import com.android.mdl.app.util.PreferencesHelper +import com.android.identity.wallet.R +import com.android.identity.wallet.authconfirmation.RequestedDocumentData +import com.android.identity.wallet.authconfirmation.RequestedElement +import com.android.identity.wallet.authconfirmation.SignedElementsCollection +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.transfer.AddDocumentToResponseResult +import com.android.identity.wallet.transfer.TransferManager +import com.android.identity.wallet.util.TransferStatus +import com.android.identity.wallet.util.logWarning +import com.android.identity.wallet.util.PreferencesHelper class TransferDocumentViewModel(val app: Application) : AndroidViewModel(app) { diff --git a/appholder/src/main/java/com/android/mdl/app/wallet/DocumentPageTransformer.kt b/appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPageTransformer.kt similarity index 90% rename from appholder/src/main/java/com/android/mdl/app/wallet/DocumentPageTransformer.kt rename to appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPageTransformer.kt index 9c56a3715..ab7f3ac23 100644 --- a/appholder/src/main/java/com/android/mdl/app/wallet/DocumentPageTransformer.kt +++ b/appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPageTransformer.kt @@ -1,9 +1,9 @@ -package com.android.mdl.app.wallet +package com.android.identity.wallet.wallet import android.content.Context import android.view.View import androidx.viewpager2.widget.ViewPager2 -import com.android.mdl.app.R +import com.android.identity.wallet.R import kotlin.math.abs class DocumentPageTransformer(context: Context) : ViewPager2.PageTransformer { diff --git a/appholder/src/main/java/com/android/mdl/app/wallet/DocumentPagerItemDecoration.kt b/appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPagerItemDecoration.kt similarity index 93% rename from appholder/src/main/java/com/android/mdl/app/wallet/DocumentPagerItemDecoration.kt rename to appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPagerItemDecoration.kt index e02411b6c..c9903b79d 100644 --- a/appholder/src/main/java/com/android/mdl/app/wallet/DocumentPagerItemDecoration.kt +++ b/appholder/src/main/java/com/android/identity/wallet/wallet/DocumentPagerItemDecoration.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.wallet +package com.android.identity.wallet.wallet import android.content.Context import android.graphics.Rect diff --git a/appholder/src/main/java/com/android/mdl/app/wallet/SelectDocumentFragment.kt b/appholder/src/main/java/com/android/identity/wallet/wallet/SelectDocumentFragment.kt similarity index 92% rename from appholder/src/main/java/com/android/mdl/app/wallet/SelectDocumentFragment.kt rename to appholder/src/main/java/com/android/identity/wallet/wallet/SelectDocumentFragment.kt index 431e52494..14ad18614 100644 --- a/appholder/src/main/java/com/android/mdl/app/wallet/SelectDocumentFragment.kt +++ b/appholder/src/main/java/com/android/identity/wallet/wallet/SelectDocumentFragment.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.wallet +package com.android.identity.wallet.wallet import android.Manifest import android.content.pm.PackageManager @@ -13,14 +13,14 @@ import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.navigation.fragment.findNavController -import com.android.mdl.app.R -import com.android.mdl.app.adapter.DocumentAdapter -import com.android.mdl.app.databinding.FragmentSelectDocumentBinding -import com.android.mdl.app.document.DocumentInformation -import com.android.mdl.app.document.DocumentManager -import com.android.mdl.app.util.TransferStatus -import com.android.mdl.app.util.log -import com.android.mdl.app.viewmodel.ShareDocumentViewModel +import com.android.identity.wallet.R +import com.android.identity.wallet.adapter.DocumentAdapter +import com.android.identity.wallet.databinding.FragmentSelectDocumentBinding +import com.android.identity.wallet.document.DocumentInformation +import com.android.identity.wallet.document.DocumentManager +import com.android.identity.wallet.util.TransferStatus +import com.android.identity.wallet.util.log +import com.android.identity.wallet.viewmodel.ShareDocumentViewModel import com.google.android.material.tabs.TabLayoutMediator class SelectDocumentFragment : Fragment() { diff --git a/appholder/src/main/res/layout-land/fragment_share_document.xml b/appholder/src/main/res/layout-land/fragment_share_document.xml index fd4b02f2c..eb330fdb5 100644 --- a/appholder/src/main/res/layout-land/fragment_share_document.xml +++ b/appholder/src/main/res/layout-land/fragment_share_document.xml @@ -7,11 +7,11 @@ + type="com.android.identity.wallet.viewmodel.ShareDocumentViewModel" /> + type="com.android.identity.wallet.fragment.ShareDocumentFragment" /> + type="com.android.identity.wallet.wallet.SelectDocumentFragment" /> + type="com.android.identity.wallet.fragment.SelfSignedDetailsFragment" /> diff --git a/appholder/src/main/res/layout/fragment_share_document.xml b/appholder/src/main/res/layout/fragment_share_document.xml index 74561fa07..87818ba4f 100644 --- a/appholder/src/main/res/layout/fragment_share_document.xml +++ b/appholder/src/main/res/layout/fragment_share_document.xml @@ -7,11 +7,11 @@ + type="com.android.identity.wallet.viewmodel.ShareDocumentViewModel" /> + type="com.android.identity.wallet.fragment.ShareDocumentFragment" /> + type="com.android.identity.wallet.fragment.TransferDocumentFragment" /> + type="com.android.identity.wallet.viewmodel.TransferDocumentViewModel" /> + type="com.android.identity.wallet.document.DocumentInformation" /> + app:argType="com.android.identity.wallet.selfsigned.ProvisionInfo" /> + android:name="com.android.identity.wallet.authconfirmation.PassphrasePrompt"> - App Holder Cancel Show QR Code Done diff --git a/appholder/src/purse/res/values/ic_launcher_background.xml b/appholder/src/purse/res/values/ic_launcher_background.xml new file mode 100644 index 000000000..5dc7c0f5b --- /dev/null +++ b/appholder/src/purse/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FF9800 + \ No newline at end of file diff --git a/appholder/src/purse/res/values/strings.xml b/appholder/src/purse/res/values/strings.xml new file mode 100644 index 000000000..80b2b93d2 --- /dev/null +++ b/appholder/src/purse/res/values/strings.xml @@ -0,0 +1,4 @@ + + + IC Purse + \ No newline at end of file diff --git a/appholder/src/test/java/com/android/mdl/app/ExampleUnitTest.kt b/appholder/src/test/java/com/android/identity/wallet/ExampleUnitTest.kt similarity index 90% rename from appholder/src/test/java/com/android/mdl/app/ExampleUnitTest.kt rename to appholder/src/test/java/com/android/identity/wallet/ExampleUnitTest.kt index d8178104e..b3efc89ec 100644 --- a/appholder/src/test/java/com/android/mdl/app/ExampleUnitTest.kt +++ b/appholder/src/test/java/com/android/identity/wallet/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app +package com.android.identity.wallet import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/appholder/src/test/java/com/android/mdl/app/authconfirmation/PassphraseValidationTest.kt b/appholder/src/test/java/com/android/identity/wallet/authconfirmation/PassphraseValidationTest.kt similarity index 94% rename from appholder/src/test/java/com/android/mdl/app/authconfirmation/PassphraseValidationTest.kt rename to appholder/src/test/java/com/android/identity/wallet/authconfirmation/PassphraseValidationTest.kt index a59252895..4acf0a8d1 100644 --- a/appholder/src/test/java/com/android/mdl/app/authconfirmation/PassphraseValidationTest.kt +++ b/appholder/src/test/java/com/android/identity/wallet/authconfirmation/PassphraseValidationTest.kt @@ -1,4 +1,4 @@ -package com.android.mdl.app.authconfirmation +package com.android.identity.wallet.authconfirmation import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test diff --git a/appholder/src/test/java/com/android/mdl/app/selfsigned/SelfSignedScreenStateTest.kt b/appholder/src/test/java/com/android/identity/wallet/selfsigned/SelfSignedScreenStateTest.kt similarity index 94% rename from appholder/src/test/java/com/android/mdl/app/selfsigned/SelfSignedScreenStateTest.kt rename to appholder/src/test/java/com/android/identity/wallet/selfsigned/SelfSignedScreenStateTest.kt index 54cf3fbcb..1878eb23d 100644 --- a/appholder/src/test/java/com/android/mdl/app/selfsigned/SelfSignedScreenStateTest.kt +++ b/appholder/src/test/java/com/android/identity/wallet/selfsigned/SelfSignedScreenStateTest.kt @@ -1,12 +1,12 @@ -package com.android.mdl.app.selfsigned +package com.android.identity.wallet.selfsigned import androidx.lifecycle.SavedStateHandle -import com.android.mdl.app.document.DocumentColor -import com.android.mdl.app.document.DocumentType -import com.android.mdl.app.document.SecureAreaImplementationState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.AuthTypeState -import com.android.mdl.app.selfsigned.AddSelfSignedScreenState.MdocAuthOptionState +import com.android.identity.wallet.document.DocumentColor +import com.android.identity.wallet.document.DocumentType +import com.android.identity.wallet.document.SecureAreaImplementationState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.AndroidAuthKeyCurveState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.AuthTypeState +import com.android.identity.wallet.selfsigned.AddSelfSignedScreenState.MdocAuthOptionState import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test diff --git a/appholder/src/main/res/values/ic_launcher_background.xml b/appholder/src/wallet/res/values/ic_launcher_background.xml similarity index 100% rename from appholder/src/main/res/values/ic_launcher_background.xml rename to appholder/src/wallet/res/values/ic_launcher_background.xml diff --git a/appholder/src/wallet/res/values/strings.xml b/appholder/src/wallet/res/values/strings.xml new file mode 100644 index 000000000..9db99f25a --- /dev/null +++ b/appholder/src/wallet/res/values/strings.xml @@ -0,0 +1,4 @@ + + + IC Wallet + \ No newline at end of file