DO NOT MERGE Do not reinflate the layout if it has not been already inflated.
This fixes the NPE caused when reinflate method is called before the layout is inflated. Bug: 180534861 Test: Manual Change-Id: Ia3fb6867e55c63a5fe7c17df1c3f86d048b4d1a8
This commit is contained in:
@@ -240,6 +240,9 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
|
|
||||||
/** Reinflates the view. */
|
/** Reinflates the view. */
|
||||||
public void reinflate() {
|
public void reinflate() {
|
||||||
|
// Do not reinflate the view if it has not been inflated at all.
|
||||||
|
if (!isInflated()) return;
|
||||||
|
|
||||||
ViewGroup container = (ViewGroup) getLayout();
|
ViewGroup container = (ViewGroup) getLayout();
|
||||||
container.removeView(mNotificationView);
|
container.removeView(mNotificationView);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user