When I try to do a WindowManager.removeView(),
E/AndroidRuntime( 2445): java.lang.IllegalArgumentException: View=android.widget.LinearLayout{41a03700 V.E..... ......I. 0,0-0,0} not attached to window manager
E/AndroidRuntime( 2445): at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:370)
E/AndroidRuntime( 2445): at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:299)
E/AndroidRuntime( 2445): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:79)
I get this fatal error because the view was not in the window manager. Is there no way to check if windowmanager had already added the view before? I do not see any such method in the source