Merge "Use KeyguardViewController for SystemUIDialogManager" into tm-dev

This commit is contained in:
Alex Stetson
2022-04-14 16:30:38 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 7 deletions

View File

@@ -54,6 +54,11 @@ public interface KeyguardViewController {
*/ */
void reset(boolean hideBouncerWhenShowing); void reset(boolean hideBouncerWhenShowing);
/**
* Stop showing any alternate auth methods.
*/
void resetAlternateAuth(boolean forceUpdateScrim);
/** /**
* Called when the device started going to sleep. * Called when the device started going to sleep.
*/ */

View File

@@ -580,9 +580,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} }
} }
/** @Override
* Stop showing any alternate auth methods
*/
public void resetAlternateAuth(boolean forceUpdateScrim) { public void resetAlternateAuth(boolean forceUpdateScrim) {
final boolean updateScrim = (mAlternateAuthInterceptor != null final boolean updateScrim = (mAlternateAuthInterceptor != null
&& mAlternateAuthInterceptor.hideAlternateAuthBouncer()) && mAlternateAuthInterceptor.hideAlternateAuthBouncer())

View File

@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.android.keyguard.KeyguardViewController;
import com.android.systemui.Dumpable; import com.android.systemui.Dumpable;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpManager;
@@ -37,7 +38,7 @@ import javax.inject.Inject;
*/ */
@SysUISingleton @SysUISingleton
public class SystemUIDialogManager implements Dumpable { public class SystemUIDialogManager implements Dumpable {
private final StatusBarKeyguardViewManager mKeyguardViewManager; private final KeyguardViewController mKeyguardViewController;
private final Set<SystemUIDialog> mDialogsShowing = new HashSet<>(); private final Set<SystemUIDialog> mDialogsShowing = new HashSet<>();
private final Set<Listener> mListeners = new HashSet<>(); private final Set<Listener> mListeners = new HashSet<>();
@@ -45,9 +46,9 @@ public class SystemUIDialogManager implements Dumpable {
@Inject @Inject
public SystemUIDialogManager( public SystemUIDialogManager(
DumpManager dumpManager, DumpManager dumpManager,
StatusBarKeyguardViewManager statusBarKeyguardViewManager) { KeyguardViewController keyguardViewController) {
dumpManager.registerDumpable(this); dumpManager.registerDumpable(this);
mKeyguardViewManager = statusBarKeyguardViewManager; mKeyguardViewController = keyguardViewController;
} }
/** /**
@@ -86,7 +87,7 @@ public class SystemUIDialogManager implements Dumpable {
private void updateDialogListeners() { private void updateDialogListeners() {
if (shouldHideAffordance()) { if (shouldHideAffordance()) {
mKeyguardViewManager.resetAlternateAuth(true); mKeyguardViewController.resetAlternateAuth(true);
} }
for (Listener listener : mListeners) { for (Listener listener : mListeners) {