Use the new API to control lights out mode.
Bug: 3241144
Change-Id: Ie4c0a3ca608e439d25f6ae4d0a8d4e4b1939ab33
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 02d9199..40bc16e 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -645,9 +645,9 @@
}
private void setStatusBarVisibility(boolean visible) {
- int flag = visible ? 0 : WindowManager.LayoutParams.FLAG_FULLSCREEN;
- mActivity.getWindow().setFlags(flag,
- WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ WindowManager.LayoutParams params = mActivity.getWindow().getAttributes();
+ params.systemUiVisibility = visible ? View.STATUS_BAR_VISIBLE : View.STATUS_BAR_HIDDEN;
+ mActivity.getWindow().setAttributes(params);
}
// -------------------------------------------------------------------------