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

Commit 8da1dc27 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

Merge "Fix monkey crash" into oc-dev

am: c01dd791

Change-Id: I67f19cb80671166826e97e3e2470037b426500c4
parents 4ba5995a c01dd791
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();
    }
}
}