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

Commit 6997da71 authored by Jason Monk's avatar Jason Monk
Browse files

Fix monkey crash

Test: runtest systemui
Change-Id: I6706a9e1bb7935d709f10c192f421fe1d321fe1d
Fixes: 36779672
parent f244f7e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -242,7 +242,7 @@ public class QSDetail extends LinearLayout {
        mDetailSettingsButton.setVisibility(settingsIntent != null ? VISIBLE : GONE);
        mDetailSettingsButton.setVisibility(settingsIntent != null ? VISIBLE : GONE);
        mDetailSettingsButton.setOnClickListener(v -> {
        mDetailSettingsButton.setOnClickListener(v -> {
            Dependency.get(MetricsLogger.class).action(ACTION_QS_MORE_SETTINGS,
            Dependency.get(MetricsLogger.class).action(ACTION_QS_MORE_SETTINGS,
                    mDetailAdapter.getMetricsCategory());
                    adapter.getMetricsCategory());
            Dependency.get(ActivityStarter.class)
            Dependency.get(ActivityStarter.class)
                    .postStartActivityDismissingKeyguard(settingsIntent, 0);
                    .postStartActivityDismissingKeyguard(settingsIntent, 0);
        });
        });
+6 −0
Original line number Original line Diff line number Diff line
@@ -100,4 +100,10 @@ public class QSDetailTest extends SysuiTestCase {
        ViewUtils.detachView(mQsDetail);
        ViewUtils.detachView(mQsDetail);
        mTestableLooper.processAllMessages();
        mTestableLooper.processAllMessages();
    }
    }

    @Test
    public void testNullAdapterClick() {
        mQsDetail.setupDetailFooter(mock(DetailAdapter.class));
        mQsDetail.findViewById(android.R.id.button2).performClick();
    }
}
}