-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSurfaceFlinger.patch
More file actions
27 lines (27 loc) · 917 Bytes
/
Copy pathSurfaceFlinger.patch
File metadata and controls
27 lines (27 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/SurfaceFlinger.cpp b/SurfaceFlinger.cpp
index c8f6bc7..0df9817 100644
--- a/SurfaceFlinger.cpp
+++ b/SurfaceFlinger.cpp
@@ -2022,6 +2022,22 @@ ui::Rotation SurfaceFlinger::getPhysicalDisplayOrientation(DisplayId displayId,
break;
}
}
+ if (!isPrimary) {
+ char valueRotation[PROPERTY_VALUE_MAX];
+ property_get("persist.panel.rds.orientation", valueRotation, "0");
+ int defaultOrientation = atoi(valueRotation);
+ ALOGE("%d isPrimary %s %d", __LINE__, valueRotation, defaultOrientation);
+ switch(defaultOrientation) {
+ case 90:
+ return ui::ROTATION_90;
+ case 180:
+ return ui::ROTATION_180;
+ case 270:
+ return ui::ROTATION_270;
+ default:
+ break;
+ }
+ }
return ui::ROTATION_0;
}
void SurfaceFlinger::postComposition() {