am db82c9e0: Merge "Fix regression, don\'t NPE if Switch doesn\'t have a thumb set" into lmp-mr1-dev

* commit 'db82c9e00ee9eefab68f6b8fff5db60736583490':
  Fix regression, don't NPE if Switch doesn't have a thumb set
This commit is contained in:
Alan Viverette
2014-12-09 00:07:12 +00:00
committed by Android Git Automerger

View File

@@ -689,6 +689,10 @@ public class Switch extends CompoundButton {
* @return true if (x, y) is within the target area of the switch thumb
*/
private boolean hitThumb(float x, float y) {
if (mThumbDrawable == null) {
return false;
}
// Relies on mTempRect, MUST be called first!
final int thumbOffset = getThumbOffset();