diff --git a/frameworks/native/services/inputflinger/InputReader.cpp b/frameworks/native/services/inputflinger/InputReader.cpp
old mode 100644
new mode 100755
index fa81a10..5dcf5f7
--- a/frameworks/native/services/inputflinger/InputReader.cpp
+++ b/frameworks/native/services/inputflinger/InputReader.cpp
@@ -3500,7 +3500,27 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
bool viewportChanged = mViewport != newViewport;
if (viewportChanged) {
mViewport = newViewport;
-
+ char buffer_orientation[PROP_VALUE_MAX];
+ memset(buffer_orientation, 0, sizeof(buffer_orientation));
+ property_get("persist.sys.rotation.einit", buffer_orientation, "0");
+ int cmpRet = atoi(buffer_orientation);
+ ALOGI("persist.sys.rotation.einit~~~~~~~~~~~~~~ = %d",cmpRet);
+ if (cmpRet == 0)
+ {
+ mViewport.orientation = DISPLAY_ORIENTATION_0;
+ }
+ else if(cmpRet == 1)
+ {
+ mViewport.orientation = DISPLAY_ORIENTATION_90;
+ }
+ else if(cmpRet == 2)
+ {
+ mViewport.orientation = DISPLAY_ORIENTATION_180;
+ }
+ else if(cmpRet == 3)
+ {
+ mViewport.orientation = DISPLAY_ORIENTATION_270;
+ }
if (mDeviceMode == DEVICE_MODE_DIRECT || mDeviceMode == DEVICE_MODE_POINTER) {
// Convert rotated viewport to natural surface coordinates.
int32_t naturalLogicalWidth, naturalLogicalHeight;
diff --git a/device/rockchip/rk3288/system.prop b/device/rockchip/rk3288/system.prop
index 2831458..eb319af 100755
--- a/device/rockchip/rk3288/system.prop
+++ b/device/rockchip/rk3288/system.prop
@@ -28,8 +28,7 @@ sys.wallpaper.rgb565=0
sf.power.control=2073600
sys.rkadb.root=0
ro.sf.fakerotation=false
+ro.sf.hwrotation=90
ro.rk.MassStorage=false
ro.rk.systembar.voiceicon=true
ro.rk.systembar.tabletUI=false
@@ -53,5 +52,4 @@ sys.hwc.device.extend=DSI
ro.sys.rotation.sensor=false
persist.sys.rotation.efull=true
# 0-0 1-90 2-180 3-270
+persist.sys.rotation.einit=1
\ No newline at end of file
技术交流群:?微信号
|