rk3288 HDMI修改旋转方向90度

frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
 
  
final class LocalDisplayAdapter extends DisplayAdapter {
} else {
mInfo.type = Display.TYPE_HDMI;
mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION;
+boolean noRotate = "0".equals(SystemProperties.get("ro.sf.hwrotation"));
+if(noRotate && mBuiltInDisplayId == SurfaceControl.BUILT_IN_DISPLAY_ID_HDMI){
+if (SystemProperties.getBoolean("ro.rotation.external", false)) {
+mInfo.flags |= DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT;
+ }
+ String value = SystemProperties.get("ro.orientation.einit");
+if ("0".equals(value)) {
+ mInfo.rotation = Surface.ROTATION_0;
+} else if ("90".equals(value)) {
+mInfo.rotation = Surface.ROTATION_90;
+} else if ("180".equals(value)) {
 +mInfo.rotation = Surface.ROTATION_180;
+} else if ("270".equals(value)) {
+mInfo.rotation = Surface.ROTATION_270;
+}
+}
mInfo.name = getContext().getResources().getString(


frameworks/native/services/surfaceflinger/DisplayDevice.cpp
void DisplayDevice::setProjection(int orientation,
mClientOrientation = orientation;
orientation = (mHardwareOrientation + orientation) % 4;
 }
+ if (mType == DisplayDevice::DISPLAY_EXTERNAL) {
+ mClientOrientation = orientation;
+ if (orientation %2 == 1)
+ frame = Rect(0,0,getHeight(),getWidth());
+ }
device/rockchip/rk3288/system.prop
+ro.same.orientation=true
+ro.rotation.external=true
+ro.orientation.einit=90


你可能感兴趣的:(rk3288 HDMI修改旋转方向90度)