title: SurfaceHolder.setFormat(PixelFormat.RGBA_8888) fails on some devices and not others
body: <p>I have a game app with the following Views structure. First I have an empty FrameLayout like so:</p>
  
  <pre><code>FrameLayout game_frame_layout = new FrameLayout(getApplicationContext());
  </code></pre>
  
  <p>Then I add two views to it like so:</p>
  
  <pre><code>game_frame_layout.addView(customView);
  game_frame_layout.addView(butView);
  </code></pre>
  
  <p>The customView is for displaying all sorts of moving game graphics while the butView displays some ImageButtons on top of the moving grapics. The customView is an instance of a class CustomView which extends SurfaceView.</p>
  
  <p>CustomView includes the following code </p>
  
  <pre><code>    void updateView() 
      {
          final SurfaceHolder holder = getHolder();
          holder.setFormat(PixelFormat.RGBA_8888);
  
          try 
          {
                  Canvas canvas = holder.lockCanvas();
                  if (canvas != null) 
                  {
                      onDraw(canvas);
  
                      holder.unlockCanvasAndPost(canvas);
                  }
          } 
          catch (Exception e) 
          {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>The line <code>holder.setFormat(PixelFormat.RGBA_8888);</code> is a recent addition (see <a href="https://stackoverflow.com/questions/21052146/setting-the-pixelformat">here</a>). Without that line, my animated graphics appear to be in a format with too few colours (by experiment I deduced it was "RGB_565"), so I get some <a href="https://en.wikipedia.org/wiki/Colour_banding" rel="nofollow noreferrer">banding</a> artifacts. When I added the setFormat line, the graphics appear perfectly (without banding) on my Samsung Galaxy Tab 10.1 (Android 3.1)... but on three other devices: a Samsung GT-l9100 (4.1.2), a Nexus 7 ME370T 4.4.2 and a HTC One X 4.2.2 I only see the buttons corresponding to butView against an entirely black background. There is no indication in the logs that the program has crashed.</p>
  
  <p>Any ideas?</p>