Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91daf590 authored by Helen Qin's avatar Helen Qin
Browse files

Change M3 tokens to the framework counterparts

Also, fixed a few unnecessary safe ?. calls.

Bug: 275412580
Test: manual
Change-Id: Ic06d27d018028142225cca353d5c403e782ef62b
parent 4c6f5787
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -65,8 +65,8 @@ class CredentialManagerRepo(
        )

        val originName: String? = when (requestInfo?.type) {
            RequestInfo.TYPE_CREATE -> requestInfo?.createCredentialRequest?.origin
            RequestInfo.TYPE_GET -> requestInfo?.getCredentialRequest?.origin
            RequestInfo.TYPE_CREATE -> requestInfo.createCredentialRequest?.origin
            RequestInfo.TYPE_GET -> requestInfo.getCredentialRequest?.origin
            else -> null
        }

+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ class GetFlowUtils {
                            userName = credentialEntry.username.toString(),
                            displayName = credentialEntry.displayName?.toString(),
                            icon = credentialEntry.icon.loadDrawable(context),
                            shouldTintIcon = credentialEntry.isDefaultIcon ?: false,
                            shouldTintIcon = credentialEntry.isDefaultIcon,
                            lastUsedTimeMillis = credentialEntry.lastUsedTime,
                            isAutoSelectable = credentialEntry.isAutoSelectAllowed &&
                                credentialEntry.autoSelectAllowedFromOption,
+1 −1
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ fun ModalBottomSheetLayout(
        rememberModalBottomSheetState(Hidden),
    sheetShape: Shape = MaterialTheme.shapes.large,
    sheetElevation: Dp = ModalBottomSheetDefaults.Elevation,
    sheetBackgroundColor: Color = MaterialTheme.colorScheme.surface,
    sheetBackgroundColor: Color,
    sheetContentColor: Color = contentColorFor(sheetBackgroundColor),
    content: @Composable () -> Unit
) {
+8 −10
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import androidx.compose.material.icons.outlined.Lock
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SuggestionChip
import androidx.compose.material3.SuggestionChipDefaults
import androidx.compose.material3.TopAppBar
@@ -155,7 +154,7 @@ fun Entry(
                            // Decorative purpose only.
                            contentDescription = null,
                            modifier = Modifier.size(24.dp),
                            tint = MaterialTheme.colorScheme.onSurfaceVariant,
                            tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
                        )
                    }
                }
@@ -169,7 +168,7 @@ fun Entry(
                        Icon(
                            modifier = iconSize,
                            bitmap = iconImageBitmap,
                            tint = MaterialTheme.colorScheme.onSurfaceVariant,
                            tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
                            // Decorative purpose only.
                            contentDescription = null,
                        )
@@ -193,7 +192,7 @@ fun Entry(
                    Icon(
                        modifier = iconSize,
                        imageVector = iconImageVector,
                        tint = MaterialTheme.colorScheme.onSurfaceVariant,
                        tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
                        // Decorative purpose only.
                        contentDescription = null,
                    )
@@ -205,7 +204,7 @@ fun Entry(
                    Icon(
                        modifier = iconSize,
                        painter = iconPainter,
                        tint = MaterialTheme.colorScheme.onSurfaceVariant,
                        tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
                        // Decorative purpose only.
                        contentDescription = null,
                    )
@@ -217,9 +216,8 @@ fun Entry(
        border = null,
        colors = SuggestionChipDefaults.suggestionChipColors(
            containerColor = LocalAndroidColorScheme.current.colorSurfaceContainerHigh,
            // TODO: remove?
            labelColor = MaterialTheme.colorScheme.onSurfaceVariant,
            iconContentColor = MaterialTheme.colorScheme.onSurfaceVariant,
            labelColor = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
            iconContentColor = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
        ),
    )
}
@@ -282,7 +280,7 @@ fun PasskeyBenefitRow(
        Icon(
            modifier = Modifier.size(24.dp),
            painter = leadingIconPainter,
            tint = MaterialTheme.colorScheme.onSurfaceVariant,
            tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
            // Decorative purpose only.
            contentDescription = null,
        )
@@ -341,7 +339,7 @@ fun MoreOptionTopAppBar(
                            R.string.accessibility_back_arrow_button
                        ),
                        modifier = Modifier.size(24.dp).autoMirrored(),
                        tint = MaterialTheme.colorScheme.onSurfaceVariant,
                        tint = LocalAndroidColorScheme.current.colorOnSurfaceVariant,
                    )
                }
            }
+3 −3
Original line number Diff line number Diff line
@@ -20,20 +20,20 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.android.credentialmanager.ui.theme.LocalAndroidColorScheme

@Composable
fun CredentialListSectionHeader(text: String) {
    InternalSectionHeader(text, MaterialTheme.colorScheme.onSurfaceVariant)
    InternalSectionHeader(text, LocalAndroidColorScheme.current.colorOnSurfaceVariant)
}

@Composable
fun MoreAboutPasskeySectionHeader(text: String) {
    InternalSectionHeader(text, MaterialTheme.colorScheme.onSurface)
    InternalSectionHeader(text, LocalAndroidColorScheme.current.colorOnSurface)
}

@Composable
Loading