Avoid native crash triggered by Canvas.getClipBounds(Rect)

When Canvas.getClipBounds(Rect) is called with a null argument, which is
explicitely allowed, it causes a crash in Android. This delegates the
method to throw an exception in this case for layoutlib instead.

Bug: N/A
Test: N/A
Change-Id: If5bb6dec37a84204de303cd81cb87d0d4c66a03b
(cherry picked from commit 3107c166b47fc20064b09c38b6bf17258d416f70)
2 files changed