Loading packages/CredentialManager/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="accessibility_back_arrow_button">"Go back to the previous page"</string> <!-- Spoken content description of the close "X" icon button. --> <string name="accessibility_close_button">Close</string> <!-- Spoken content description of the close "X" icon button. [CHAR LIMIT=NONE] --> <string name="accessibility_snackbar_dismiss">Dismiss</string> <!-- Strings for the get flow. --> <!-- This appears as the title of the modal bottom sheet asking for user confirmation to use the single previously saved passkey to sign in to the app. [CHAR LIMIT=200] --> Loading packages/CredentialManager/res/values/themes.xml +2 −4 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.CredentialSelector" parent="@android:style/ThemeOverlay.Material"> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowIsTranslucent">true</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="fontFamily">google-sans</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> </style> </resources> No newline at end of file packages/CredentialManager/src/com/android/credentialmanager/CredentialManagerRepo.kt +15 −31 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.credentialmanager import android.app.slice.Slice import android.app.slice.SliceSpec import android.content.Context import android.content.Intent import android.credentials.CreateCredentialRequest Loading @@ -35,7 +33,6 @@ import android.credentials.ui.RequestInfo import android.credentials.ui.BaseDialogResult import android.credentials.ui.ProviderPendingIntentResponse import android.credentials.ui.UserSelectionDialogResult import android.net.Uri import android.os.IBinder import android.os.Binder import android.os.Bundle Loading Loading @@ -230,7 +227,8 @@ class CredentialManagerRepo( context, "key1", "subkey-1", "elisa.beckett@gmail.com", 20, 7, 27, Instant.ofEpochSecond(10L), "Legal note" "You can use your passkey on this or other devices. It is saved to " + "the Password Manager for elisa.beckett@gmail.com." ), CreateTestUtils.newCreateEntry( context, Loading @@ -239,11 +237,9 @@ class CredentialManagerRepo( null ), ) ) .setRemoteEntry( newRemoteEntry("key2", "subkey-1") ) .build(), ).setRemoteEntry( CreateTestUtils.newRemoteCreateEntry(context, "key2", "subkey-1") ).build(), CreateCredentialProviderData .Builder("com.dashlane") .setSaveEntries( Loading @@ -258,11 +254,11 @@ class CredentialManagerRepo( context, "key1", "subkey-4", "elisa.work@dashlane.com", 20, 7, 27, Instant.ofEpochSecond(14L), null "You can use your passkey on this or other devices. It is saved to " + "the Password Manager for elisa.work@dashlane.com" ), ) ) .build(), ).build(), ) } Loading Loading @@ -318,7 +314,7 @@ class CredentialManagerRepo( ), ) ).setRemoteEntry( newRemoteEntry("key4", "subkey-1") GetTestUtils.newRemoteCredentialEntry(context, "key4", "subkey-1") ).build(), GetCredentialProviderData.Builder("com.dashlane") .setCredentialEntries( Loading @@ -333,10 +329,12 @@ class CredentialManagerRepo( ), ) ).setAuthenticationEntries( listOf(GetTestUtils.newAuthenticationEntry( listOf( GetTestUtils.newAuthenticationEntry( context, "key2", "subkey-1", "foo@email.com", AuthenticationEntry.STATUS_UNLOCKED_BUT_EMPTY_LESS_RECENT )) AuthenticationEntry.STATUS_UNLOCKED_BUT_EMPTY_LESS_RECENT, ) ) ).setActionChips( listOf( GetTestUtils.newActionEntry( Loading @@ -348,20 +346,6 @@ class CredentialManagerRepo( ) } private fun newRemoteEntry( key: String, subkey: String, ): Entry { return Entry( key, subkey, Slice.Builder( Uri.EMPTY, SliceSpec("type", 1) ).build() ) } private fun testCreatePasskeyRequestInfo(): RequestInfo { val request = CreatePublicKeyCredentialRequest( "{\"extensions\": {\n" + Loading packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import com.android.credentialmanager.createflow.CreateCredentialScreen import com.android.credentialmanager.createflow.hasContentToDisplay import com.android.credentialmanager.getflow.GetCredentialScreen import com.android.credentialmanager.getflow.hasContentToDisplay import com.android.credentialmanager.ui.theme.CredentialSelectorTheme import com.android.credentialmanager.ui.theme.PlatformTheme @ExperimentalMaterialApi class CredentialSelectorActivity : ComponentActivity() { Loading @@ -50,7 +50,7 @@ class CredentialSelectorActivity : ComponentActivity() { val userConfigRepo = UserConfigRepo(this) val credManRepo = CredentialManagerRepo(this, intent, userConfigRepo) setContent { CredentialSelectorTheme { PlatformTheme { CredentialManagerBottomSheet( credManRepo, userConfigRepo Loading packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt +1 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ class GetFlowUtils { pendingIntent = structuredAuthEntry.pendingIntent, fillInIntent = entry.frameworkExtrasIntent, title = title, providerDisplayName = providerDisplayName, icon = providerIcon, isUnlockedAndEmpty = entry.status != AuthenticationEntry.STATUS_LOCKED, isLastUnlocked = Loading Loading
packages/CredentialManager/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ <string name="accessibility_back_arrow_button">"Go back to the previous page"</string> <!-- Spoken content description of the close "X" icon button. --> <string name="accessibility_close_button">Close</string> <!-- Spoken content description of the close "X" icon button. [CHAR LIMIT=NONE] --> <string name="accessibility_snackbar_dismiss">Dismiss</string> <!-- Strings for the get flow. --> <!-- This appears as the title of the modal bottom sheet asking for user confirmation to use the single previously saved passkey to sign in to the app. [CHAR LIMIT=200] --> Loading
packages/CredentialManager/res/values/themes.xml +2 −4 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.CredentialSelector" parent="@android:style/ThemeOverlay.Material"> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowIsTranslucent">true</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="fontFamily">google-sans</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> </style> </resources> No newline at end of file
packages/CredentialManager/src/com/android/credentialmanager/CredentialManagerRepo.kt +15 −31 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.credentialmanager import android.app.slice.Slice import android.app.slice.SliceSpec import android.content.Context import android.content.Intent import android.credentials.CreateCredentialRequest Loading @@ -35,7 +33,6 @@ import android.credentials.ui.RequestInfo import android.credentials.ui.BaseDialogResult import android.credentials.ui.ProviderPendingIntentResponse import android.credentials.ui.UserSelectionDialogResult import android.net.Uri import android.os.IBinder import android.os.Binder import android.os.Bundle Loading Loading @@ -230,7 +227,8 @@ class CredentialManagerRepo( context, "key1", "subkey-1", "elisa.beckett@gmail.com", 20, 7, 27, Instant.ofEpochSecond(10L), "Legal note" "You can use your passkey on this or other devices. It is saved to " + "the Password Manager for elisa.beckett@gmail.com." ), CreateTestUtils.newCreateEntry( context, Loading @@ -239,11 +237,9 @@ class CredentialManagerRepo( null ), ) ) .setRemoteEntry( newRemoteEntry("key2", "subkey-1") ) .build(), ).setRemoteEntry( CreateTestUtils.newRemoteCreateEntry(context, "key2", "subkey-1") ).build(), CreateCredentialProviderData .Builder("com.dashlane") .setSaveEntries( Loading @@ -258,11 +254,11 @@ class CredentialManagerRepo( context, "key1", "subkey-4", "elisa.work@dashlane.com", 20, 7, 27, Instant.ofEpochSecond(14L), null "You can use your passkey on this or other devices. It is saved to " + "the Password Manager for elisa.work@dashlane.com" ), ) ) .build(), ).build(), ) } Loading Loading @@ -318,7 +314,7 @@ class CredentialManagerRepo( ), ) ).setRemoteEntry( newRemoteEntry("key4", "subkey-1") GetTestUtils.newRemoteCredentialEntry(context, "key4", "subkey-1") ).build(), GetCredentialProviderData.Builder("com.dashlane") .setCredentialEntries( Loading @@ -333,10 +329,12 @@ class CredentialManagerRepo( ), ) ).setAuthenticationEntries( listOf(GetTestUtils.newAuthenticationEntry( listOf( GetTestUtils.newAuthenticationEntry( context, "key2", "subkey-1", "foo@email.com", AuthenticationEntry.STATUS_UNLOCKED_BUT_EMPTY_LESS_RECENT )) AuthenticationEntry.STATUS_UNLOCKED_BUT_EMPTY_LESS_RECENT, ) ) ).setActionChips( listOf( GetTestUtils.newActionEntry( Loading @@ -348,20 +346,6 @@ class CredentialManagerRepo( ) } private fun newRemoteEntry( key: String, subkey: String, ): Entry { return Entry( key, subkey, Slice.Builder( Uri.EMPTY, SliceSpec("type", 1) ).build() ) } private fun testCreatePasskeyRequestInfo(): RequestInfo { val request = CreatePublicKeyCredentialRequest( "{\"extensions\": {\n" + Loading
packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import com.android.credentialmanager.createflow.CreateCredentialScreen import com.android.credentialmanager.createflow.hasContentToDisplay import com.android.credentialmanager.getflow.GetCredentialScreen import com.android.credentialmanager.getflow.hasContentToDisplay import com.android.credentialmanager.ui.theme.CredentialSelectorTheme import com.android.credentialmanager.ui.theme.PlatformTheme @ExperimentalMaterialApi class CredentialSelectorActivity : ComponentActivity() { Loading @@ -50,7 +50,7 @@ class CredentialSelectorActivity : ComponentActivity() { val userConfigRepo = UserConfigRepo(this) val credManRepo = CredentialManagerRepo(this, intent, userConfigRepo) setContent { CredentialSelectorTheme { PlatformTheme { CredentialManagerBottomSheet( credManRepo, userConfigRepo Loading
packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt +1 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ class GetFlowUtils { pendingIntent = structuredAuthEntry.pendingIntent, fillInIntent = entry.frameworkExtrasIntent, title = title, providerDisplayName = providerDisplayName, icon = providerIcon, isUnlockedAndEmpty = entry.status != AuthenticationEntry.STATUS_LOCKED, isLastUnlocked = Loading