SF: Ensure boot animation always appears in panel orientation

Ensure that boot animation is always shown in panel
orientation.

Change-Id: I36a75ba5aea803a7b7cace3335a0d7f730612c5d
CRs-Fixed: 604934
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 85e41c1..ac4a0c2 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1320,13 +1320,24 @@
                                 || (state.frame != draw[i].frame))
                         {
                             // Honor the orientation change after boot
-                            // animation completes or the new orientation is
-                            // same as panel orientation..
-                            if(mBootFinished ||
-                               state.orientation == disp->getOrientation()) {
+                            // animation completes and make sure boot
+                            // animation is shown in panel orientation always.
+                            if(mBootFinished){
                                 disp->setProjection(state.orientation,
                                         state.viewport, state.frame);
                             }
+                            else{
+                                char property[PROPERTY_VALUE_MAX];
+                                int panelOrientation =
+                                        DisplayState::eOrientationDefault;
+                                if(property_get("persist.panel.orientation",
+                                            property, "0") > 0){
+                                    panelOrientation = atoi(property) / 90;
+                                }
+                                disp->setProjection(panelOrientation,
+                                        state.viewport, state.frame);
+
+                            }
                         }
                         if (state.width != draw[i].width || state.height != draw[i].height) {
                             disp->setDisplaySize(state.width, state.height);