Merge "CP: Don't create panel if content is empty" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-04-12 00:46:49 +00:00
committed by Android (Google) Code Review

View File

@@ -912,6 +912,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
}
if (!st.hasPanelItems()) {
// Ensure that |st.decorView| has its actual content. Otherwise, an empty window can be
// created and cause ANR.
return;
}
st.isHandled = false;
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(