Loading packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardFaceAuthNotSupportedModule.kt +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.keyguard.dagger import com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository import com.android.systemui.keyguard.data.repository.NoopDeviceEntryFaceAuthRepository import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor import com.android.systemui.keyguard.domain.interactor.NoopKeyguardFaceAuthInteractor import dagger.Binds Loading @@ -32,4 +34,9 @@ import dagger.Module interface KeyguardFaceAuthNotSupportedModule { @Binds fun keyguardFaceAuthInteractor(impl: NoopKeyguardFaceAuthInteractor): KeyguardFaceAuthInteractor @Binds fun deviceEntryFaceAuthRepository( impl: NoopDeviceEntryFaceAuthRepository ): DeviceEntryFaceAuthRepository } packages/SystemUI/src/com/android/systemui/keyguard/data/repository/NoopDeviceEntryFaceAuthRepository.kt 0 → 100644 +71 −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.keyguard.data.repository import com.android.keyguard.FaceAuthUiEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.shared.model.AuthenticationStatus import com.android.systemui.keyguard.shared.model.DetectionStatus import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.emptyFlow /** * Implementation of the repository that noops all face auth operations. * * This is required for SystemUI variants that do not support face authentication but still inject * other SysUI components that depend on [DeviceEntryFaceAuthRepository]. */ @SysUISingleton class NoopDeviceEntryFaceAuthRepository @Inject constructor() : DeviceEntryFaceAuthRepository { override val isAuthenticated: Flow<Boolean> get() = emptyFlow() private val _canRunFaceAuth = MutableStateFlow(false) override val canRunFaceAuth: StateFlow<Boolean> = _canRunFaceAuth override val authenticationStatus: Flow<AuthenticationStatus> get() = emptyFlow() override val detectionStatus: Flow<DetectionStatus> get() = emptyFlow() private val _isLockedOut = MutableStateFlow(false) override val isLockedOut: StateFlow<Boolean> = _isLockedOut private val _isAuthRunning = MutableStateFlow(false) override val isAuthRunning: StateFlow<Boolean> = _isAuthRunning override val isBypassEnabled: Flow<Boolean> get() = emptyFlow() /** * Trigger face authentication. * * [uiEvent] provided should be logged whenever face authentication runs. Invocation should be * ignored if face authentication is already running. Results should be propagated through * [authenticationStatus] * * Run only face detection when [fallbackToDetection] is true and [canRunFaceAuth] is false. */ override suspend fun authenticate(uiEvent: FaceAuthUiEvent, fallbackToDetection: Boolean) {} /** Stop currently running face authentication or detection. */ override fun cancel() {} } packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { .expandableNotificationRow(row) .notificationEntry(entry) .onExpandClickListener(mPresenter) .listContainer(mListContainer) .build(); ExpandableNotificationRowController rowController = component.getExpandableNotificationRowController(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +14 −0 Original line number Diff line number Diff line Loading @@ -63,8 +63,12 @@ import com.android.systemui.statusbar.notification.logging.NotificationPanelLogg import com.android.systemui.statusbar.notification.logging.NotificationPanelLoggerImpl; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback; import com.android.systemui.statusbar.notification.row.ui.viewmodel.ActivatableNotificationViewModelModule; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm; import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationListViewModelModule; import com.android.systemui.statusbar.phone.KeyguardBypassController; import dagger.Binds; Loading @@ -85,6 +89,8 @@ import javax.inject.Provider; ShadeEventsModule.class, NotifPipelineChoreographerModule.class, NotificationSectionHeadersModule.class, NotificationListViewModelModule.class, ActivatableNotificationViewModelModule.class, }) public interface NotificationsModule { @Binds Loading Loading @@ -159,6 +165,14 @@ public interface NotificationsModule { } } /** Provides the container for the notification list. */ @Provides @SysUISingleton static NotificationListContainer provideListContainer( NotificationStackScrollLayoutController nsslController) { return nsslController.getNotificationListContainer(); } /** * Provide the active notification collection managing the notifications to render. */ Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.phone.CentralSurfaces; import dagger.Binds; Loading Loading @@ -59,8 +58,6 @@ public interface ExpandableNotificationRowComponent { Builder notificationEntry(NotificationEntry entry); @BindsInstance Builder onExpandClickListener(ExpandableNotificationRow.OnExpandClickListener presenter); @BindsInstance Builder listContainer(NotificationListContainer listContainer); ExpandableNotificationRowComponent build(); } Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardFaceAuthNotSupportedModule.kt +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.keyguard.dagger import com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository import com.android.systemui.keyguard.data.repository.NoopDeviceEntryFaceAuthRepository import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor import com.android.systemui.keyguard.domain.interactor.NoopKeyguardFaceAuthInteractor import dagger.Binds Loading @@ -32,4 +34,9 @@ import dagger.Module interface KeyguardFaceAuthNotSupportedModule { @Binds fun keyguardFaceAuthInteractor(impl: NoopKeyguardFaceAuthInteractor): KeyguardFaceAuthInteractor @Binds fun deviceEntryFaceAuthRepository( impl: NoopDeviceEntryFaceAuthRepository ): DeviceEntryFaceAuthRepository }
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/NoopDeviceEntryFaceAuthRepository.kt 0 → 100644 +71 −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.keyguard.data.repository import com.android.keyguard.FaceAuthUiEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.shared.model.AuthenticationStatus import com.android.systemui.keyguard.shared.model.DetectionStatus import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.emptyFlow /** * Implementation of the repository that noops all face auth operations. * * This is required for SystemUI variants that do not support face authentication but still inject * other SysUI components that depend on [DeviceEntryFaceAuthRepository]. */ @SysUISingleton class NoopDeviceEntryFaceAuthRepository @Inject constructor() : DeviceEntryFaceAuthRepository { override val isAuthenticated: Flow<Boolean> get() = emptyFlow() private val _canRunFaceAuth = MutableStateFlow(false) override val canRunFaceAuth: StateFlow<Boolean> = _canRunFaceAuth override val authenticationStatus: Flow<AuthenticationStatus> get() = emptyFlow() override val detectionStatus: Flow<DetectionStatus> get() = emptyFlow() private val _isLockedOut = MutableStateFlow(false) override val isLockedOut: StateFlow<Boolean> = _isLockedOut private val _isAuthRunning = MutableStateFlow(false) override val isAuthRunning: StateFlow<Boolean> = _isAuthRunning override val isBypassEnabled: Flow<Boolean> get() = emptyFlow() /** * Trigger face authentication. * * [uiEvent] provided should be logged whenever face authentication runs. Invocation should be * ignored if face authentication is already running. Results should be propagated through * [authenticationStatus] * * Run only face detection when [fallbackToDetection] is true and [canRunFaceAuth] is false. */ override suspend fun authenticate(uiEvent: FaceAuthUiEvent, fallbackToDetection: Boolean) {} /** Stop currently running face authentication or detection. */ override fun cancel() {} }
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { .expandableNotificationRow(row) .notificationEntry(entry) .onExpandClickListener(mPresenter) .listContainer(mListContainer) .build(); ExpandableNotificationRowController rowController = component.getExpandableNotificationRowController(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +14 −0 Original line number Diff line number Diff line Loading @@ -63,8 +63,12 @@ import com.android.systemui.statusbar.notification.logging.NotificationPanelLogg import com.android.systemui.statusbar.notification.logging.NotificationPanelLoggerImpl; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback; import com.android.systemui.statusbar.notification.row.ui.viewmodel.ActivatableNotificationViewModelModule; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm; import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationListViewModelModule; import com.android.systemui.statusbar.phone.KeyguardBypassController; import dagger.Binds; Loading @@ -85,6 +89,8 @@ import javax.inject.Provider; ShadeEventsModule.class, NotifPipelineChoreographerModule.class, NotificationSectionHeadersModule.class, NotificationListViewModelModule.class, ActivatableNotificationViewModelModule.class, }) public interface NotificationsModule { @Binds Loading Loading @@ -159,6 +165,14 @@ public interface NotificationsModule { } } /** Provides the container for the notification list. */ @Provides @SysUISingleton static NotificationListContainer provideListContainer( NotificationStackScrollLayoutController nsslController) { return nsslController.getNotificationListContainer(); } /** * Provide the active notification collection managing the notifications to render. */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.phone.CentralSurfaces; import dagger.Binds; Loading Loading @@ -59,8 +58,6 @@ public interface ExpandableNotificationRowComponent { Builder notificationEntry(NotificationEntry entry); @BindsInstance Builder onExpandClickListener(ExpandableNotificationRow.OnExpandClickListener presenter); @BindsInstance Builder listContainer(NotificationListContainer listContainer); ExpandableNotificationRowComponent build(); } Loading