Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc9ad369 authored by radhakrishna's avatar radhakrishna Committed by Steve Kondik
Browse files

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
parent 2326d769
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -1504,13 +1504,24 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                                || (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);

                            }
                        }
                    }
                }