diff options
author | Clyde Tan <bokbokan@yahoo.com> | 2013-12-30 08:30:49 +0800 |
---|---|---|
committer | Clyde Tan <bokbokan@yahoo.com> | 2013-12-30 08:31:33 +0800 |
commit | 5f35514b9eee0dee777d3c7f94ac350e6aa5c9d1 (patch) | |
tree | 968c826028231305eb929289d99bcef24caa840f | |
parent | 1bfc8ff4a11bc89b095376af8267c8fe05710056 (diff) | |
download | android_frameworks_native-stable/cm-10.2.tar.gz android_frameworks_native-stable/cm-10.2.tar.bz2 android_frameworks_native-stable/cm-10.2.zip |
Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270cm-10.2.1stable/cm-10.2cm-10.2
Change-Id: I523204540ead9be61e5dc186fa6bbad7c468c3c4
-rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index fce66c8c6..92511ac96 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -392,7 +392,14 @@ void DisplayDevice::setProjection(int orientation, if (!frame.isValid()) { // the destination frame can be invalid if it has never been set, // in that case we assume the whole display frame. - frame = Rect(w, h); + char value[PROPERTY_VALUE_MAX]; + property_get("ro.sf.hwrotation", value, "0"); + int additionalRot = atoi(value); + + if (additionalRot == 90 || additionalRot == 270) + frame = Rect(h, w); + else + frame = Rect(w, h); } if (viewport.isEmpty()) { |