[automerger] Optimise the hit test algorithm am: 71ecf5bd5c am: 42eaa8f932 am: a72cb45f89

Change-Id: I9fa897b6bd6b5291d2956a38a3740b4f6d783ab2