Merge "Add onClickListener to "show all" button on the QAW empty state view." into tm-dev am: a944926829 am: c09e22bfc8

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

Change-Id: I0f449cff4a8f2ad7e7e42c9222282c7a431325fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-04-15 17:19:19 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 0 deletions

View File

@@ -215,6 +215,7 @@ public class WalletView extends FrameLayout implements WalletCardCarousel.OnCard
logoView.setImageDrawable(mContext.getDrawable(R.drawable.ic_qs_plus));
mEmptyStateView.<TextView>requireViewById(R.id.empty_state_title).setText(label);
mEmptyStateView.setOnClickListener(clickListener);
mAppButton.setOnClickListener(clickListener);
}
void showErrorMessage(@Nullable CharSequence message) {
@@ -255,6 +256,11 @@ public class WalletView extends FrameLayout implements WalletCardCarousel.OnCard
return mActionButton;
}
@VisibleForTesting
Button getAppButton() {
return mAppButton;
}
@VisibleForTesting
TextView getErrorView() {
return mErrorView;

View File

@@ -20,6 +20,7 @@ import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -323,6 +324,7 @@ public class WalletScreenControllerTest extends SysuiTestCase {
assertEquals(GONE, mWalletView.getCardCarousel().getVisibility());
assertEquals(VISIBLE, mWalletView.getEmptyStateView().getVisibility());
assertEquals(GONE, mWalletView.getErrorView().getVisibility());
assertTrue(mWalletView.getAppButton().hasOnClickListeners());
}
@Test