1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.credentialmanager.model.get 18 19 import android.app.PendingIntent 20 import android.content.Intent 21 import android.graphics.drawable.Drawable 22 import com.android.credentialmanager.model.BiometricRequestInfo 23 import com.android.credentialmanager.model.CredentialType 24 import com.android.credentialmanager.model.EntryInfo 25 import java.time.Instant 26 27 class CredentialEntryInfo( 28 providerId: String, 29 entryKey: String, 30 entrySubkey: String, 31 pendingIntent: PendingIntent?, 32 fillInIntent: Intent?, 33 /** Type of this credential used for sorting. Not localized so must not be directly displayed. */ 34 val credentialType: CredentialType, 35 /** 36 * String type value of this credential used for sorting. Not localized so must not be directly 37 * displayed. 38 */ 39 val rawCredentialType: String, 40 /** Localized type value of this credential used for display purpose. */ 41 val credentialTypeDisplayName: String, 42 val providerDisplayName: String, 43 val userName: String, 44 val displayName: String?, 45 val icon: Drawable?, 46 val shouldTintIcon: Boolean, 47 val lastUsedTimeMillis: Instant?, 48 val isAutoSelectable: Boolean, 49 val entryGroupId: String, // Used for deduplication, and displayed as the grouping title 50 // "For <value-of-entryGroupId>" on the more-option screen. 51 val isDefaultIconPreferredAsSingleProvider: Boolean, 52 val affiliatedDomain: String?, 53 val biometricRequest: BiometricRequestInfo? = null, 54 ) : EntryInfo( 55 providerId, 56 entryKey, 57 entrySubkey, 58 pendingIntent, 59 fillInIntent, 60 shouldTerminateUiUponSuccessfulProviderResult = true, 61 )