Merge "Reset message area." into tm-qpr-dev am: 796e1c4c37

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21109635

Change-Id: Ia7c25b5b5803e1f1aee3d256548e51946ff883f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aaron Liu
2023-01-30 18:46:24 +00:00
committed by Automerger Merge Worker
5 changed files with 9 additions and 13 deletions

View File

@@ -103,6 +103,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
@Override @Override
public void reset() { public void reset() {
super.reset();
// start fresh // start fresh
mDismissing = false; mDismissing = false;
mView.resetPasswordText(false /* animate */, false /* announce */); mView.resetPasswordText(false /* animate */, false /* announce */);

View File

@@ -121,6 +121,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
@Override @Override
public void reset() { public void reset() {
mMessageAreaController.setMessage("", false);
} }
@Override @Override

View File

@@ -106,13 +106,6 @@ object KeyguardBouncerViewBinder {
hostViewController.appear( hostViewController.appear(
SystemBarUtils.getStatusBarHeight(view.context) SystemBarUtils.getStatusBarHeight(view.context)
) )
}
}
launch {
viewModel.showWithFullExpansion.collect { model ->
hostViewController.resetSecurityContainer()
hostViewController.showPromptReason(model.promptReason)
hostViewController.onResume() hostViewController.onResume()
} }
} }

View File

@@ -20,12 +20,10 @@ import android.view.View
import com.android.systemui.keyguard.data.BouncerView import com.android.systemui.keyguard.data.BouncerView
import com.android.systemui.keyguard.data.BouncerViewDelegate import com.android.systemui.keyguard.data.BouncerViewDelegate
import com.android.systemui.keyguard.domain.interactor.PrimaryBouncerInteractor import com.android.systemui.keyguard.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.keyguard.shared.constants.KeyguardBouncerConstants.EXPANSION_VISIBLE
import com.android.systemui.keyguard.shared.model.BouncerShowMessageModel import com.android.systemui.keyguard.shared.model.BouncerShowMessageModel
import com.android.systemui.keyguard.shared.model.KeyguardBouncerModel import com.android.systemui.keyguard.shared.model.KeyguardBouncerModel
import javax.inject.Inject import javax.inject.Inject
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map
/** Models UI state for the lock screen bouncer; handles user input. */ /** Models UI state for the lock screen bouncer; handles user input. */
@@ -44,10 +42,6 @@ constructor(
/** Observe whether bouncer is showing. */ /** Observe whether bouncer is showing. */
val show: Flow<KeyguardBouncerModel> = interactor.show val show: Flow<KeyguardBouncerModel> = interactor.show
/** Observe visible expansion when bouncer is showing. */
val showWithFullExpansion: Flow<KeyguardBouncerModel> =
interactor.show.filter { it.expansionAmount == EXPANSION_VISIBLE }
/** Observe whether bouncer is hiding. */ /** Observe whether bouncer is hiding. */
val hide: Flow<Unit> = interactor.hide val hide: Flow<Unit> = interactor.hide

View File

@@ -150,4 +150,11 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase {
getContext().getResources().getString(R.string.kg_prompt_reason_restart_password), getContext().getResources().getString(R.string.kg_prompt_reason_restart_password),
false); false);
} }
@Test
public void testReset() {
mKeyguardAbsKeyInputViewController.reset();
verify(mKeyguardMessageAreaController).setMessage("", false);
}
} }