Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b1bab41 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add onClickListener to "show all" button on the QAW empty state view."...

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

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



Change-Id: I10d27403df95afe84fd2e416e87f6761cff3b10d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8c7e5226 a9449268
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -215,6 +215,7 @@ public class WalletView extends FrameLayout implements WalletCardCarousel.OnCard
        logoView.setImageDrawable(mContext.getDrawable(R.drawable.ic_qs_plus));
        logoView.setImageDrawable(mContext.getDrawable(R.drawable.ic_qs_plus));
        mEmptyStateView.<TextView>requireViewById(R.id.empty_state_title).setText(label);
        mEmptyStateView.<TextView>requireViewById(R.id.empty_state_title).setText(label);
        mEmptyStateView.setOnClickListener(clickListener);
        mEmptyStateView.setOnClickListener(clickListener);
        mAppButton.setOnClickListener(clickListener);
    }
    }


    void showErrorMessage(@Nullable CharSequence message) {
    void showErrorMessage(@Nullable CharSequence message) {
@@ -255,6 +256,11 @@ public class WalletView extends FrameLayout implements WalletCardCarousel.OnCard
        return mActionButton;
        return mActionButton;
    }
    }


    @VisibleForTesting
    Button getAppButton() {
        return mAppButton;
    }

    @VisibleForTesting
    @VisibleForTesting
    TextView getErrorView() {
    TextView getErrorView() {
        return mErrorView;
        return mErrorView;
+2 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static android.view.View.VISIBLE;


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


    @Test
    @Test