Use KeyguardViewController for SystemUIDialogManager
Certain SystemUI instances do not support the StatusBarKeyguardViewManager class. Using the more generic KeyguardViewController will allow SystemUIDialogs to work properly under these circumstances. Bug: 227350805 Test: manual Change-Id: Ib5e109df3269f1e93d2c519787724af82bedfcc9
This commit is contained in:
@@ -54,6 +54,11 @@ public interface KeyguardViewController {
|
||||
*/
|
||||
void reset(boolean hideBouncerWhenShowing);
|
||||
|
||||
/**
|
||||
* Stop showing any alternate auth methods.
|
||||
*/
|
||||
void resetAlternateAuth(boolean forceUpdateScrim);
|
||||
|
||||
/**
|
||||
* Called when the device started going to sleep.
|
||||
*/
|
||||
|
||||
@@ -580,9 +580,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop showing any alternate auth methods
|
||||
*/
|
||||
@Override
|
||||
public void resetAlternateAuth(boolean forceUpdateScrim) {
|
||||
final boolean updateScrim = (mAlternateAuthInterceptor != null
|
||||
&& mAlternateAuthInterceptor.hideAlternateAuthBouncer())
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.keyguard.KeyguardViewController;
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.dagger.SysUISingleton;
|
||||
import com.android.systemui.dump.DumpManager;
|
||||
@@ -37,7 +38,7 @@ import javax.inject.Inject;
|
||||
*/
|
||||
@SysUISingleton
|
||||
public class SystemUIDialogManager implements Dumpable {
|
||||
private final StatusBarKeyguardViewManager mKeyguardViewManager;
|
||||
private final KeyguardViewController mKeyguardViewController;
|
||||
|
||||
private final Set<SystemUIDialog> mDialogsShowing = new HashSet<>();
|
||||
private final Set<Listener> mListeners = new HashSet<>();
|
||||
@@ -45,9 +46,9 @@ public class SystemUIDialogManager implements Dumpable {
|
||||
@Inject
|
||||
public SystemUIDialogManager(
|
||||
DumpManager dumpManager,
|
||||
StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
|
||||
KeyguardViewController keyguardViewController) {
|
||||
dumpManager.registerDumpable(this);
|
||||
mKeyguardViewManager = statusBarKeyguardViewManager;
|
||||
mKeyguardViewController = keyguardViewController;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +87,7 @@ public class SystemUIDialogManager implements Dumpable {
|
||||
|
||||
private void updateDialogListeners() {
|
||||
if (shouldHideAffordance()) {
|
||||
mKeyguardViewManager.resetAlternateAuth(true);
|
||||
mKeyguardViewController.resetAlternateAuth(true);
|
||||
}
|
||||
|
||||
for (Listener listener : mListeners) {
|
||||
|
||||
Reference in New Issue
Block a user