Hi,
try the way, please!
----------------------------------------
frameworks/native/services/inputflinger/InputReader.cpp
void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
int32_t oldDeviceMode = mDeviceMode;
......
if (viewportChanged) {
mViewport = newViewport;
/* add code like below, or you can also add rotation property in init.rc, then get the propery here, and using "if" to judge it */
mViewport.orientation = DISPLAY_ORIENTATION_0; // if rotate 0 degree.
mViewport.orientation = DISPLAY_ORIENTATION_90;// if rotate 90 degree.
mViewport.orientation = DISPLAY_ORIENTATION_180;// if rotate 180 degree
mViewport.orientation = DISPLAY_ORIENTATION_270;// if rotate 270 degree
if (mDeviceMode == DEVICE_MODE_DIRECT || mDeviceMode == DEVICE_MODE_POINTER) {
......
Have a nice day!
B.R,
weidong