diff options
author | Sean Pont <seanpont@google.com> | 2020-05-20 20:33:19 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-20 20:33:19 +0000 |
commit | 047ad602d65779d07c36832037f4797ec19afce8 (patch) | |
tree | 98749d466a0d4cd6818070386ffb7ab977c62e58 | |
parent | e7113410d826dd0067877e7a7d5a7667b74ce071 (diff) | |
parent | 3c29c9b565d033460ecebde8d77a70ccaec79efd (diff) | |
download | QuickAccessWallet-047ad602d65779d07c36832037f4797ec19afce8.tar.gz |
Do not show wallet-specific lock screen message am: 3c29c9b565
Change-Id: I36b5d46ecd454b7b2cf45138d6baf2b6d8108397
3 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java b/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java index 5bf9082..22165d4 100644 --- a/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java +++ b/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java @@ -158,9 +158,10 @@ public class WalletPanelViewController implements mHasRegisteredListener = true; } if (mIsDeviceLocked && !mWalletClient.isWalletFeatureAvailableWhenDeviceLocked()) { - mWalletView.showDeviceLockedMessage(); + mWalletView.hide(); return; } + mWalletView.show(); mWalletView.hideErrorMessage(); int cardWidthPx = mWalletCardCarousel.getCardWidthPx(); int cardHeightPx = mWalletCardCarousel.getCardHeightPx(); diff --git a/src/com/android/systemui/plugin/globalactions/wallet/WalletView.java b/src/com/android/systemui/plugin/globalactions/wallet/WalletView.java index df74fbf..a0231ec 100644 --- a/src/com/android/systemui/plugin/globalactions/wallet/WalletView.java +++ b/src/com/android/systemui/plugin/globalactions/wallet/WalletView.java @@ -205,6 +205,10 @@ class WalletView extends FrameLayout implements WalletCardCarousel.OnCardScrollL setVisibility(GONE); } + void show() { + setVisibility(VISIBLE); + } + void hideErrorMessage() { mErrorView.setVisibility(GONE); } diff --git a/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewControllerTest.java b/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewControllerTest.java index 89b25f6..34c83eb 100644 --- a/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewControllerTest.java +++ b/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewControllerTest.java @@ -240,13 +240,14 @@ public class WalletPanelViewControllerTest { mViewController.queryWalletCards(); verify(mWalletClient, never()).getWalletCards(any(), any(), any()); - assertThat(errorView.getVisibility()).isEqualTo(VISIBLE); + assertThat(walletView.getVisibility()).isEqualTo(GONE); mViewController.onDeviceLockStateChanged(false); mViewController.onDeviceLockStateChanged(true); verify(mWalletClient).getWalletCards(any(), any(), any()); - assertThat(errorView.getVisibility()).isEqualTo(View.GONE); + assertThat(walletView.getVisibility()).isEqualTo(VISIBLE); + assertThat(errorView.getVisibility()).isEqualTo(GONE); } @Test |