Commit a2838e3f authored by Geoffrey Métais's avatar Geoffrey Métais

Restore permission asking for brightness change

This reverts commit fad767ac.
parent a1d5f532
......@@ -2197,6 +2197,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
// Initialize the layoutParams screen brightness
try {
if (Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE) == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC) {
if (!Permissions.canWriteSettings(this)) {
Permissions.checkWriteSettingsPermission(this, Permissions.PERMISSION_SYSTEM_BRIGHTNESS);
return;
}
Settings.System.putInt(getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment