Add click handler for qsb on boot to keep it responsive

Bug: None
Test: reboot device, qsb is responsive, and launches search,
after widgets initialized, qsb remote view takes over click

Change-Id: I30c01ce1ff3da63cc0324f822d21901eb6a49c2d
This commit is contained in:
Ng Zhi An 2018-05-14 10:53:52 -07:00
parent 98f4fc00ac
commit cabc1ff276
1 changed files with 12 additions and 0 deletions

View File

@ -73,6 +73,18 @@ public class QsbWidgetHostView extends AppWidgetHostView {
return getDefaultView(this);
}
@Override
protected View getDefaultView() {
View v = super.getDefaultView();
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
Launcher.getLauncher(getContext()).startSearch("", false, null, true);
}
});
return v;
}
public static View getDefaultView(ViewGroup parent) {
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.qsb_default_view, parent, false);