From 1905d12d51fe766bf98813a1b9d460dae67c45b7 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Wed, 27 Jul 2016 21:28:18 +0200 Subject: don't crash during standby and resume full screen video view fixes #93 --- .../ui/ShowFullscreenMessageActivity.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3