diff options
author | Clyde Tan <bokbokan@yahoo.com> | 2013-12-30 08:49:51 +0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2015-11-07 13:45:41 -0800 |
commit | 5b6a10373ee6280155f91ef82f51509014530b1e (patch) | |
tree | 37448593e11660299b0f1b7805b95f35b139e3be /services | |
parent | 94d724071d7479f5d9a07952924b91a5ef8e2028 (diff) | |
download | frameworks_native-5b6a10373ee6280155f91ef82f51509014530b1e.zip frameworks_native-5b6a10373ee6280155f91ef82f51509014530b1e.tar.gz frameworks_native-5b6a10373ee6280155f91ef82f51509014530b1e.tar.bz2 |
Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270
Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index 8946c41..1f607f2 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -466,7 +466,15 @@ 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()) { |