Change-Id: Ife6a7c4802e8b1ec1ff8445e639f8a6d90a00592
mStylusState.when = when;
+ mStylusState.toolType = mTouchButtonAccumulator.getToolType();
+ if (mStylusState.toolType == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) {
+ mStylusState.toolType = AMOTION_EVENT_TOOL_TYPE_STYLUS;
+ }
+
int32_t pressure = mSingleTouchMotionAccumulator.getAbsolutePressure();
if (mRawPressureAxis.valid) {
mStylusState.pressure = float(pressure) / mRawPressureAxis.maxValue;
}
mStylusState.buttons = mTouchButtonAccumulator.getButtonState();
- mStylusState.toolType = mTouchButtonAccumulator.getToolType();
mContext->dispatchExternalStylusState(mStylusState);
}