Clarify touch event consumption logic

* Make it clear that both onInterceptTouchEvent and onTouchEvent need to
  occur.

Change-Id: I951a470ad073f85a9a006c7f440872839d26cd26
This commit is contained in:
Ethan Chen 2015-06-19 17:00:19 -07:00 committed by Gerrit Code Review
parent e8ae2d7cdf
commit ee89d29fb4

View File

@ -143,9 +143,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
mRootView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return
mEnableAccessibilityController.onInterceptTouchEvent(event) &
mEnableAccessibilityController.onTouchEvent(event);
boolean consumeIntercept = mEnableAccessibilityController.onInterceptTouchEvent(event);
boolean consumeTouch = mEnableAccessibilityController.onTouchEvent(event);
return consumeIntercept && consumeTouch;
}
});
registerReceiver(mSetupData, mSetupData.getIntentFilter());