title: Bitmap-analysis code works pre-2.2, not 2.2
body: <p>I'm creating "maps" for a game I'm making, and it's working fine on &lt;=Android 2.1, but 2.2 is causing problems.</p>
  
  <p>I'm not sure if this is a common method, so I'll explain what I'm doing. First, I draw the map which the user is going to see then I draw a map of identical size with nothing but white and pink (0xffFF006E). Anywhere I draw the pink color is an area/boundary I don't want the player to be able to enter/cross.</p>
  
  <p>So, in-game, the regular map is constantly being drawn and the "bordermap" with the pink color is loaded into a Bitmap (but never actually drawn). To see if the player is <em>attempting</em> to cross a border, I check the player's x,y pos against the bordermap:</p>
  
  <pre><code>private boolean overBorder(int x, int y){
  
     //The int 'COLOR_border' is predefined as 0xffFF006E
  if(mPlayerDirection == UP &amp;&amp; mMapBorders.getPixel(x, y-mPlayerHeight/2) == COLOR_border)return true;
  if(mPlayerDirection == DOWN &amp;&amp; mMapBorders.getPixel(x, y+mPlayerHeight/2) == COLOR_border)return true;
  if(mPlayerDirection == LEFT &amp;&amp; mMapBorders.getPixel(x-mPlayerWidth/2, y) == COLOR_border)return true;
  if(mPlayerDirection == RIGHT &amp;&amp; mMapBorders.getPixel(x+mPlayerWidth/2, y) == COLOR_border)return true;
  
     //If those fail, false    
     return false;
  }
  </code></pre>
  
  <p>If that code returns true, I stop the player. Like I said, this works excellently pre-2.2. If anyone has any insight on how to fix 2.2 compatibility I would appreciate it greatly.</p>