[Android] Permission request for brightness seems useless

Geoffrey Métais git at videolan.org
Fri Jan 20 16:01:34 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 20 16:00:35 2017 +0100| [fad767ac9f454ab14202c30fe2a6f49279efa504] | committer: Geoffrey Métais

Permission request for brightness seems useless

> https://code.videolan.org/videolan/vlc-android/commit/fad767ac9f454ab14202c30fe2a6f49279efa504
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 7bf8af5..e13793e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2185,10 +2185,6 @@ 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);



More information about the Android mailing list