Gallery2: Everyone or no one

hide statusbar only when toolbar is hidden
when viewing photo / video for better ui consistency

Change-Id: I64e3a951a13a765f38df83de290d9b0d167c90f7
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 272f939..76bd5db 100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -44,7 +44,6 @@
 import android.view.WindowManager;
 import android.widget.RelativeLayout;
 import android.widget.Toast;
-import android.widget.Toolbar;
 
 import org.codeaurora.gallery.R;
 
@@ -210,10 +209,6 @@
 
     private Intent mShareIntent;
 
-    //use for saving the original height and padding of toolbar
-    private int originalHeight = 0;
-    private int originalPadding = 0;
-
     private ThreeDButton m3DButton;
     private boolean bShow3DButton;
     private ParseGDepthTask mParseGDepthTask;
@@ -969,7 +964,7 @@
         mShowBars = true;
         mOrientationManager.unlockOrientation();
         mActionBar.show();
-        mActivity.getGLRoot().setLightsOutMode(true);
+        mActivity.getGLRoot().setLightsOutMode(false);
         refreshHidingMessage();
         refreshBottomControlsWhenReady();
     }
@@ -1541,14 +1536,6 @@
     public void onPause() {
         super.onPause();
         mIsActive = false;
-        //restore the orginal heigh and padding of toolbar
-        Toolbar toolbar = mActivity.getToolbar();
-        if (toolbar != null) {
-            ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams();
-            layoutParams.height = originalHeight;
-            toolbar.setLayoutParams(layoutParams);
-            toolbar.setPadding(0, originalPadding, 0, 0);
-        }
         showFullScreen(false);
 
         DetailsHelper.pause();
@@ -1669,16 +1656,6 @@
 
         transitionFromAlbumPageIfNeeded();
 
-        Toolbar toolbar = mActivity.getToolbar();
-        //set the new height and padding to toolbar
-        if (toolbar != null) {
-            ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams();
-            originalHeight = layoutParams.height;
-            originalPadding = toolbar.getPaddingTop();
-            layoutParams.height = originalHeight - originalPadding;
-            toolbar.setPadding(0, 0, 0, 0);
-            toolbar.setLayoutParams(layoutParams);
-        }
         mIsActive = true;
         setContentPane(mRootPane);
 
@@ -1701,8 +1678,6 @@
         if (!mShowBars) {
             mActionBar.hide();
         }
-        //hide the status bar
-        mActivity.getGLRoot().setLightsOutMode(true);
         boolean haveImageEditor = GalleryUtils.isEditorAvailable(mActivity, "image/*");
         if (haveImageEditor != mHaveImageEditor) {
             mHaveImageEditor = haveImageEditor;