diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-07-27 21:28:18 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-07-27 21:28:18 +0200 |
commit | 1905d12d51fe766bf98813a1b9d460dae67c45b7 (patch) | |
tree | 8853f0f7c09132171894737dbe7c4f9e7d276daa /src/main/java | |
parent | e10f4ccfa053c620070003768d9278befe5ea004 (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.java | 18 |
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; |