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

Commit 8c890f8a authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Work around instability of Display.getRotation()." into jb-mr1-dev

parents 6beee269 7f3cf958
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -451,6 +451,7 @@ public class PhoneStatusBar extends BaseStatusBar {
        filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
        filter.addAction(Intent.ACTION_SCREEN_OFF);
        filter.addAction(Intent.ACTION_SCREEN_ON);
        context.registerReceiver(mBroadcastReceiver, filter);

        return mStatusBarView;
@@ -788,11 +789,6 @@ public class PhoneStatusBar extends BaseStatusBar {
        setAreThereNotifications();
    }

    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        updateShowSearchHoldoff();
    }

    private void updateShowSearchHoldoff() {
        mShowSearchHoldoff = mContext.getResources().getInteger(
            R.integer.config_show_search_delay);
@@ -1804,9 +1800,17 @@ public class PhoneStatusBar extends BaseStatusBar {
                makeExpandedInvisible();
            }
            else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
                if (DEBUG) {
                    Slog.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
                }
                updateResources();
                repositionNavigationBar();
                updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
                updateShowSearchHoldoff();
            }
            else if (Intent.ACTION_SCREEN_ON.equals(action)) {
                // work around problem where mDisplay.getRotation() is not stable while screen is off (bug 7086018)
                repositionNavigationBar();
            }
        }
    };