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

Commit be70aaa6 authored by lindatseng's avatar lindatseng
Browse files

Add null check to precent crash in monkey test

Fixes: 133259172
Test: manual
Change-Id: Ib4dd24965fda40a7a917397bf558309e0424bf16
parent b6012f8d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,10 @@ public class PanelFeatureProviderImpl implements PanelFeatureProvider {

    @Override
    public PanelContent getPanel(Context context, String panelType, String mediaPackageName) {
        if (context == null) {
            return null;
        }

        switch (panelType) {
            case Settings.Panel.ACTION_INTERNET_CONNECTIVITY:
                return InternetConnectivityPanel.create(context);
+4 −0
Original line number Diff line number Diff line
@@ -170,6 +170,10 @@ public class PanelFragment extends Fragment {
                .getPanelFeatureProvider()
                .getPanel(activity, panelType, mediaPackageName);

        if (mPanel == null) {
            activity.finish();
        }

        mMetricsProvider = FeatureFactory.getFactory(activity).getMetricsFeatureProvider();

        mPanelSlices.setLayoutManager(new LinearLayoutManager((activity)));