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

Commit 8c220d13 authored by Jonathan Miranda's avatar Jonathan Miranda
Browse files

[automerger] Move orientation initialization to onCreate. am: 11ee2f6e

Change-Id: Ic4928769ab2891a7a709ed57404298a988baec1d
parents 0520395d 11ee2f6e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -80,10 +80,15 @@ public class QsbContainerView extends FrameLayout {
        private AppWidgetProviderInfo mWidgetInfo;
        private QsbWidgetHostView mQsb;

        // We need to store the orientation here, due to a bug (b/64916689) that results in widgets
        // being inflated in the wrong orientation.
        private int mOrientation;

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            mQsbWidgetHost = new QsbWidgetHost(getActivity());
            mOrientation = getContext().getResources().getConfiguration().orientation;
        }

        private FrameLayout mWrapper;
@@ -194,8 +199,7 @@ public class QsbContainerView extends FrameLayout {
        @Override
        public void onResume() {
            super.onResume();
            int orientation = Launcher.getLauncher(getContext()).getOrientation();
            if (mQsb != null && mQsb.isReinflateRequired(orientation)) {
            if (mQsb != null && mQsb.isReinflateRequired(mOrientation)) {
                rebindFragment();
            }
        }