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

Commit 5cb48cbc authored by Pinyao Ting's avatar Pinyao Ting
Browse files

fix RuntimeException when inflating default layout for AdapterView-based widgets

Bug: 151901506
Test: manual
Change-Id: I71068b7d13783f658c02cc76ec50f40319e68160
parent a611e762
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -625,7 +625,10 @@ public class AppWidgetHostView extends FrameLayout {
                    }
                }
                defaultView = inflater.inflate(layoutId, this, false);
                if (!(defaultView instanceof AdapterView)) {
                    // AdapterView does not support onClickListener
                    defaultView.setOnClickListener(this::onDefaultViewClicked);
                }
            } else {
                Log.w(TAG, "can't inflate defaultView because mInfo is missing");
            }