title: Hardware acceleration not being enabled
body: <p>Probably something silly going on, but I am trying to enable hardware acceleration in an app targeting 3.1, per <a href="http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html">this tutorial</a>.</p>
  
  <p>I've added the following to my manifest:</p>
  
  <pre><code>&lt;uses-sdk 
      android:targetSdkVersion="12" 
      android:minSdkVersion="12" /&gt;
  
  &lt;application 
      ...
      android:hardwareAccelerated="true"&gt;
  </code></pre>
  
  <p>When I check the state of hardware acceleration after the View is attached (by calling  <code>isHardwareAccelerated()</code> in an overriden <code>onAttachedToWindow()</code>) I am returned true, so all looks great. The problem is that the SurfaceView's Canvas is NOT being accelerated, as <code>canvas.isHardwareAccelerated()</code> returns false. I am checking in <code>surfaceCreated()</code>, and I get true there as well, so no idea whay the Canvas is losing this setting.</p>
  
  <p>Any pointers?</p>
  
  <p>EDIT1:</p>
  
  <p>Found <a href="http://groups.google.com/group/android-developers/msg/38bdb0c8512114b3">this</a> and <a href="http://groups.google.com/group/android-developers/msg/38bdb0c8512114b3?">this</a> on the Google Developers group, but I am indeed checking after the View is attached if I am checking this in <code>onAttachedToWindow()</code>, right? This is on a Lenovo Tablet running 3.1 BTW.</p>
  
  <p>EDIT2:</p>
  
  <p>I have tried disabling acceleration via setting </p>
  
  <pre><code>&lt;application 
      ...
      android:hardwareAccelerated="false"&gt;
  </code></pre>
  
  <p>And I am still seeing true returned from the View in <code>onAttachedToWindow()</code>, so something is not right here. I am not explicitly chanbing hw accel from code, maybe a device specific issue?</p>
  
  <p>Also, I am seeing the following line sporadically in LogCat when the SurfaceView is created:</p>
  
  <pre><code>surface (identity=524) is invalid, err=-19 (No such device)
  </code></pre>
  
  <p>EDIT3:</p>
  
  <p>Just thinking out loud here, but is there any chance that the Canvas is not being accelerated due to the fact that it is on it's own thread, via the typical SurfaceView implementation that uses a drawing loop, like Lunar Lander?</p>