aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
index d32279300..9befd1dea 100644
--- a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
@@ -35,11 +35,12 @@ public class ShowFullscreenMessageActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = 1;
getWindow().setAttributes(layout);
- super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
+ getWindow().addFlags(layout.FLAG_KEEP_SCREEN_ON);
getActionBar().hide();
setContentView(R.layout.activity_fullscreen_message);
mImage = (PhotoView) findViewById(R.id.message_image_view);
@@ -116,6 +117,7 @@ public class ShowFullscreenMessageActivity extends Activity {
WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = -1;
getWindow().setAttributes(layout);
+ getWindow().clearFlags(layout.FLAG_KEEP_SCREEN_ON);
super.onStop();
}
} \ No newline at end of file