Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +2 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter import com.android.systemui.plugins.statusbar.StatusBarStateController Loading Loading @@ -237,7 +237,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( ) } REASON_AUTH_KEYGUARD -> { if (featureFlags.isEnabled(REFACTOR_UDFPS_KEYGUARD_VIEWS)) { if (DeviceEntryUdfpsRefactor.isEnabled) { // note: empty controller, currently shows no visual affordance // instead SysUI will show the fingerprint icon in its DeviceEntryIconView UdfpsBpViewController( Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ open class UdfpsKeyguardViewControllerLegacy( } init { com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor.assertInLegacyMode() view.repeatWhenAttached { // repeatOnLifecycle CREATED (as opposed to STARTED) because the Bouncer expansion // can make the view not visible; and we still want to listen for events Loading packages/SystemUI/src/com/android/systemui/deviceentry/shared/DeviceEntryUdfpsRefactor.kt 0 → 100644 +53 −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.deviceentry.shared import com.android.systemui.Flags import com.android.systemui.flags.FlagToken import com.android.systemui.flags.RefactorFlagUtils /** Helper for reading or using the device entry udfps refactor flag state. */ @Suppress("NOTHING_TO_INLINE") object DeviceEntryUdfpsRefactor { /** The aconfig flag name */ const val FLAG_NAME = Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR /** A token used for dependency declaration */ val token: FlagToken get() = FlagToken(FLAG_NAME, isEnabled) /** Is the refactor enabled */ @JvmStatic inline val isEnabled get() = Flags.deviceEntryUdfpsRefactor() /** * Called to ensure code is only run when the flag is enabled. This protects users from the * unintended behaviors caused by accidentally running new logic, while also crashing on an eng * build to ensure that the refactor author catches issues in testing. */ @JvmStatic inline fun isUnexpectedlyInLegacyMode() = RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME) /** * Called to ensure code is only run when the flag is disabled. This will throw an exception if * the flag is enabled to ensure that the refactor author catches issues in testing. */ @JvmStatic inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME) } packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −10 Original line number Diff line number Diff line Loading @@ -224,11 +224,6 @@ object Flags { val WALLPAPER_PICKER_GRID_APPLY_BUTTON = unreleasedFlag("wallpaper_picker_grid_apply_button") /** Whether to run the new udfps keyguard refactor code. */ // TODO(b/279440316): Tracking bug. @JvmField val REFACTOR_UDFPS_KEYGUARD_VIEWS = unreleasedFlag("refactor_udfps_keyguard_views") /** Provide new auth messages on the bouncer. */ // TODO(b/277961132): Tracking bug. @JvmField val REVAMPED_BOUNCER_MESSAGES = unreleasedFlag("revamped_bouncer_messages") Loading Loading @@ -285,11 +280,6 @@ object Flags { R.bool.flag_stop_pulsing_face_scanning_animation, "stop_pulsing_face_scanning_animation") /** Flag to use a separate view for the alternate bouncer. */ // TODO(b/300440924): Tracking bug @JvmField val ALTERNATE_BOUNCER_VIEW: UnreleasedFlag = unreleasedFlag("alternate_bouncer_view") // 300 - power menu // TODO(b/254512600): Tracking Bug @JvmField val POWER_MENU_LITE = releasedFlag("power_menu_lite") Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ import com.android.systemui.Flags.keyguardBottomAreaRefactor import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags import com.android.systemui.keyguard.ui.binder.KeyguardBlueprintViewBinder import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.binder.KeyguardRootViewBinder Loading Loading @@ -134,7 +134,7 @@ constructor( val indicationArea = KeyguardIndicationArea(context, null) keyguardIndicationController.setIndicationArea(indicationArea) if (!featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { if (!DeviceEntryUdfpsRefactor.isEnabled) { lockIconViewController.get().setLockIconView(LockIconView(context, null)) } } Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +2 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter import com.android.systemui.plugins.statusbar.StatusBarStateController Loading Loading @@ -237,7 +237,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( ) } REASON_AUTH_KEYGUARD -> { if (featureFlags.isEnabled(REFACTOR_UDFPS_KEYGUARD_VIEWS)) { if (DeviceEntryUdfpsRefactor.isEnabled) { // note: empty controller, currently shows no visual affordance // instead SysUI will show the fingerprint icon in its DeviceEntryIconView UdfpsBpViewController( Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ open class UdfpsKeyguardViewControllerLegacy( } init { com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor.assertInLegacyMode() view.repeatWhenAttached { // repeatOnLifecycle CREATED (as opposed to STARTED) because the Bouncer expansion // can make the view not visible; and we still want to listen for events Loading
packages/SystemUI/src/com/android/systemui/deviceentry/shared/DeviceEntryUdfpsRefactor.kt 0 → 100644 +53 −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.deviceentry.shared import com.android.systemui.Flags import com.android.systemui.flags.FlagToken import com.android.systemui.flags.RefactorFlagUtils /** Helper for reading or using the device entry udfps refactor flag state. */ @Suppress("NOTHING_TO_INLINE") object DeviceEntryUdfpsRefactor { /** The aconfig flag name */ const val FLAG_NAME = Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR /** A token used for dependency declaration */ val token: FlagToken get() = FlagToken(FLAG_NAME, isEnabled) /** Is the refactor enabled */ @JvmStatic inline val isEnabled get() = Flags.deviceEntryUdfpsRefactor() /** * Called to ensure code is only run when the flag is enabled. This protects users from the * unintended behaviors caused by accidentally running new logic, while also crashing on an eng * build to ensure that the refactor author catches issues in testing. */ @JvmStatic inline fun isUnexpectedlyInLegacyMode() = RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME) /** * Called to ensure code is only run when the flag is disabled. This will throw an exception if * the flag is enabled to ensure that the refactor author catches issues in testing. */ @JvmStatic inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME) }
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −10 Original line number Diff line number Diff line Loading @@ -224,11 +224,6 @@ object Flags { val WALLPAPER_PICKER_GRID_APPLY_BUTTON = unreleasedFlag("wallpaper_picker_grid_apply_button") /** Whether to run the new udfps keyguard refactor code. */ // TODO(b/279440316): Tracking bug. @JvmField val REFACTOR_UDFPS_KEYGUARD_VIEWS = unreleasedFlag("refactor_udfps_keyguard_views") /** Provide new auth messages on the bouncer. */ // TODO(b/277961132): Tracking bug. @JvmField val REVAMPED_BOUNCER_MESSAGES = unreleasedFlag("revamped_bouncer_messages") Loading Loading @@ -285,11 +280,6 @@ object Flags { R.bool.flag_stop_pulsing_face_scanning_animation, "stop_pulsing_face_scanning_animation") /** Flag to use a separate view for the alternate bouncer. */ // TODO(b/300440924): Tracking bug @JvmField val ALTERNATE_BOUNCER_VIEW: UnreleasedFlag = unreleasedFlag("alternate_bouncer_view") // 300 - power menu // TODO(b/254512600): Tracking Bug @JvmField val POWER_MENU_LITE = releasedFlag("power_menu_lite") Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ import com.android.systemui.Flags.keyguardBottomAreaRefactor import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags import com.android.systemui.keyguard.ui.binder.KeyguardBlueprintViewBinder import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.binder.KeyguardRootViewBinder Loading Loading @@ -134,7 +134,7 @@ constructor( val indicationArea = KeyguardIndicationArea(context, null) keyguardIndicationController.setIndicationArea(indicationArea) if (!featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { if (!DeviceEntryUdfpsRefactor.isEnabled) { lockIconViewController.get().setLockIconView(LockIconView(context, null)) } } Loading