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

Commit 97d7d0f2 authored by Wu-cheng Li's avatar Wu-cheng Li Committed by Android (Google) Code Review
Browse files

Merge "Add a method to disable toggle status bar."

parents b774b7e1 b1db75c1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ public class AbstractGalleryActivity extends Activity implements GalleryActivity
    private GLRootView mGLRootView;
    private StateManager mStateManager;
    private GalleryActionBar mActionBar;
    private boolean mDisableToggleStatusBar;

    private AlertDialog mAlertDialog = null;
    private BroadcastReceiver mMountReceiver = new BroadcastReceiver() {
@@ -223,8 +224,14 @@ public class AbstractGalleryActivity extends Activity implements GalleryActivity
        }
    }

    protected void disableToggleStatusBar() {
        mDisableToggleStatusBar = true;
    }

    // Shows status bar in portrait view, hide in landscape view
    private void toggleStatusBarByOrientation() {
        if (mDisableToggleStatusBar) return;

        Window win = getWindow();
        if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
            win.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);