Loading packages/SystemUI/res/layout/auth_biometric_contents.xml +1 −7 Original line number Diff line number Diff line Loading @@ -55,13 +55,7 @@ android:layout_height="wrap_content" android:layout_gravity="center"> <com.airbnb.lottie.LottieAnimationView android:id="@+id/biometric_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY" /> <include layout="@layout/auth_biometric_icon"/> <com.airbnb.lottie.LottieAnimationView android:id="@+id/biometric_icon_overlay" Loading packages/SystemUI/res/layout/auth_biometric_icon.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <com.airbnb.lottie.LottieAnimationView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/biometric_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY"/> No newline at end of file packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +4 −0 Original line number Diff line number Diff line Loading @@ -961,6 +961,10 @@ public abstract class AuthBiometricView extends LinearLayout implements AuthBiom return Utils.isDeviceCredentialAllowed(mPromptInfo); } public LottieAnimationView getIconView() { return mIconView; } @AuthDialog.DialogSize int getSize() { return mSize; } Loading packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ constructor( sendFoldStateUpdate(isFolded) } } sendFoldStateUpdate(false) screenSizeFoldProvider.registerCallback(callback, mainExecutor) awaitClose { screenSizeFoldProvider.unregisterCallback(callback) } Loading packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/AuthBiometricFingerprintIconViewBinder.kt 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.android.systemui.biometrics.ui.binder import android.view.DisplayInfo import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.airbnb.lottie.LottieAnimationView import com.android.systemui.biometrics.AuthBiometricFingerprintView import com.android.systemui.biometrics.ui.viewmodel.AuthBiometricFingerprintViewModel import com.android.systemui.lifecycle.repeatWhenAttached import kotlinx.coroutines.launch /** Sub-binder for [AuthBiometricFingerprintView.mIconView]. */ object AuthBiometricFingerprintIconViewBinder { /** * Binds a [AuthBiometricFingerprintView.mIconView] to a [AuthBiometricFingerprintViewModel]. */ @JvmStatic fun bind(view: LottieAnimationView, viewModel: AuthBiometricFingerprintViewModel) { view.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { val displayInfo = DisplayInfo() view.context.display?.getDisplayInfo(displayInfo) viewModel.setRotation(displayInfo.rotation) viewModel.onConfigurationChanged(view.context.resources.configuration) launch { viewModel.iconAsset.collect { iconAsset -> view.setAnimation(iconAsset) } } } } } } Loading
packages/SystemUI/res/layout/auth_biometric_contents.xml +1 −7 Original line number Diff line number Diff line Loading @@ -55,13 +55,7 @@ android:layout_height="wrap_content" android:layout_gravity="center"> <com.airbnb.lottie.LottieAnimationView android:id="@+id/biometric_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY" /> <include layout="@layout/auth_biometric_icon"/> <com.airbnb.lottie.LottieAnimationView android:id="@+id/biometric_icon_overlay" Loading
packages/SystemUI/res/layout/auth_biometric_icon.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <com.airbnb.lottie.LottieAnimationView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/biometric_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY"/> No newline at end of file
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +4 −0 Original line number Diff line number Diff line Loading @@ -961,6 +961,10 @@ public abstract class AuthBiometricView extends LinearLayout implements AuthBiom return Utils.isDeviceCredentialAllowed(mPromptInfo); } public LottieAnimationView getIconView() { return mIconView; } @AuthDialog.DialogSize int getSize() { return mSize; } Loading
packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ constructor( sendFoldStateUpdate(isFolded) } } sendFoldStateUpdate(false) screenSizeFoldProvider.registerCallback(callback, mainExecutor) awaitClose { screenSizeFoldProvider.unregisterCallback(callback) } Loading
packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/AuthBiometricFingerprintIconViewBinder.kt 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.android.systemui.biometrics.ui.binder import android.view.DisplayInfo import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.airbnb.lottie.LottieAnimationView import com.android.systemui.biometrics.AuthBiometricFingerprintView import com.android.systemui.biometrics.ui.viewmodel.AuthBiometricFingerprintViewModel import com.android.systemui.lifecycle.repeatWhenAttached import kotlinx.coroutines.launch /** Sub-binder for [AuthBiometricFingerprintView.mIconView]. */ object AuthBiometricFingerprintIconViewBinder { /** * Binds a [AuthBiometricFingerprintView.mIconView] to a [AuthBiometricFingerprintViewModel]. */ @JvmStatic fun bind(view: LottieAnimationView, viewModel: AuthBiometricFingerprintViewModel) { view.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { val displayInfo = DisplayInfo() view.context.display?.getDisplayInfo(displayInfo) viewModel.setRotation(displayInfo.rotation) viewModel.onConfigurationChanged(view.context.resources.configuration) launch { viewModel.iconAsset.collect { iconAsset -> view.setAnimation(iconAsset) } } } } } }