code: public boolean setIntersect(Rect a, Rect b) {
          if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
              left = Math.max(a.left, b.left);
              top = Math.max(a.top, b.top);
              right = Math.min(a.right, b.right);
              bottom = Math.min(a.bottom, b.bottom);
              return true;
          }
          return false;
      }
docs: If rectangles a and b intersect, return true and set this rectangle to
  that intersection, otherwise return false and do not change this
  rectangle. No check is performed to see if either rectangle is empty.
  To just test for intersection, use intersects()
  
  @param a The first rectangle being intersected with
  @param b The second rectangle being intersected with
  
  @return true iff the two specified rectangles intersect. If they do, set
  this rectangle to that intersection. If they do not, return
  false and do not change this rectangle.