title: toddler safe app on android
body: <p>I have an app, that should be toddler safe.
  Meaning that, it blocks any single key touch, yet handles long pressing for exiting the app.
  This is so that, the toddler will be safe from doing (too) nasty things while playing.
  Up to version 2.3.4, I succeeded in achieving this.
  However, now I have 2 problems:</p>
  
  <ol>
  <li>On honeycomb, I have the status bar notifications which can be pressed on. Also , I have the switch-windows key which can be pressed. The only thing I succeeded with it is to dim the status bar.</li>
  <li><p>On ice cream sandwich (using emulator, I still don't have a real device with this version), when calling the next code, I get an exception which cannot even be caught.
  the exception:</p>
  
  <p>java.lang.IllegalArgumentException: Window type can not be changed after the window is added.</p></li>
  </ol>
  
  <p>the code:</p>
  
  <pre><code>@Override
  public void onAttachedToWindow()
    {
    this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
    super.onAttachedToWindow();
    }
  </code></pre>
  
  <p>What can I do?</p>