title: Keeping track of View added to WindowManager (no findViewById() function?)
body: <p>In my service I add a view to <code>WindowManager</code> with <code>addView()</code>. When I'm ready to hide the view, I call <code>removeView()</code> using the <code>View</code> reference. This works great -- most of the time.</p>
  
  <p>I have occasional Force Close reports that say that the View is not attached to the <code>WindowManager</code>. This makes sense. The problem is that I think the service is getting killed by Android, and when it is time to hide the view, it attempts to removeView on the wrong <code>View</code>.</p>
  
  <p>I have tried checking for the View to be null, but apparently it isn't at this point, it simply isn't the one attached to the <code>WindowManager</code>. It seems that if the View reference is lost, there is no way to gain access to it again.</p>
  
  <p>How can I get the equivalent of <code>findViewById()</code> on the <code>WindowManager</code> itself? Is the <code>View</code> automatically removed from <code>WindowManager</code> if my service is stopped (killed)? Is there a way I can store the reference to the <code>View</code> so that if the service is stopped I can still remove the <code>View</code> later (I'm also trying to avoid leaking the <code>View</code>)?</p>