aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-07-27 21:28:18 +0200
committerChristian Schneppe <christian@pix-art.de>2016-07-27 21:28:18 +0200
commit1905d12d51fe766bf98813a1b9d460dae67c45b7 (patch)
tree8853f0f7c09132171894737dbe7c4f9e7d276daa /src/main/java
parente10f4ccfa053c620070003768d9278befe5ea004 (diff)
don't crash during standby and resume full screen video view
fixes #93
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
index aa58a673b..dddb8ab80 100644
--- a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
@@ -92,8 +92,8 @@ public class ShowFullscreenMessageActivity extends Activity {
}
@Override
- protected void onResume() {
- super.onResume();
+ protected void onStart() {
+ super.onStart();
Intent intent = getIntent();
if (intent != null) {
@@ -152,6 +152,20 @@ public class ShowFullscreenMessageActivity extends Activity {
super.onConfigurationChanged(newConfig);
}
+ @Override
+ protected void onResume() {
+ WindowManager.LayoutParams layout = getWindow().getAttributes();
+ layout.screenBrightness = 1;
+ mVideo.setShouldAutoplay(true);
+ super.onResume();
+ }
+
+ @Override
+ protected void onPause() {
+ mVideo.reset();
+ super.onPause();
+ }
+
public void onStop () {
WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = -1;