diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-05-29 10:02:40 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-29 10:02:40 +0200 |
commit | 35bf89e154ed7ac26e538fb908a96fc99e9b441d (patch) | |
tree | 705a2929e3c01ff09b8f90861fe59f205d3f4743 /src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java | |
parent | e3bb47e14731bb93fbfced3fe9e0fbd30886311e (diff) |
set screen brightness to maximum while showing image or video
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java index 1f2ba9291..d32279300 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java @@ -8,6 +8,7 @@ import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.Window; +import android.view.WindowManager; import android.widget.ImageView; import android.widget.Toast; @@ -34,6 +35,9 @@ public class ShowFullscreenMessageActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { + WindowManager.LayoutParams layout = getWindow().getAttributes(); + layout.screenBrightness = 1; + getWindow().setAttributes(layout); super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_ACTION_BAR); getActionBar().hide(); @@ -107,4 +111,11 @@ public class ShowFullscreenMessageActivity extends Activity { public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } + + public void onStop () { + WindowManager.LayoutParams layout = getWindow().getAttributes(); + layout.screenBrightness = -1; + getWindow().setAttributes(layout); + super.onStop(); + } }
\ No newline at end of file |