Hi All,
I have changed the screen mode from the landscape to the portrait in Android Q10.0.0_2.4.0_AUTO in iMX8QM Mek Board.
But I have a problem with the input of touch to use the USB interface. The input of touch is the abnormal operation in the portrait screen mode. When inputting a touch, the touch input works only when inputting in the landscape screen mode. For example, the touch events input in the landscape screen mode ONLY operates.
So, I want how to be able to enter the input of touch to the portrait screen.
Please help me to solve the issue.
Regards
HM
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