Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270

Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531
This commit is contained in:
Clyde Tan 2013-12-30 08:49:51 +08:00 committed by Steve Kondik
parent 94d724071d
commit 5b6a10373e

View File

@ -466,8 +466,16 @@ void DisplayDevice::setProjection(int orientation,
if (!frame.isValid()) { if (!frame.isValid()) {
// the destination frame can be invalid if it has never been set, // the destination frame can be invalid if it has never been set,
// in that case we assume the whole display frame. // in that case we assume the whole display frame.
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); frame = Rect(w, h);
} }
}
if (viewport.isEmpty()) { if (viewport.isEmpty()) {
// viewport can be invalid if it has never been set, in that case // viewport can be invalid if it has never been set, in that case