Merge "Request MANAGE_EXTERNAL_STORAGE permission" into rvc-dev
diff --git a/res/values/config.xml b/res/values/config.xml
index 6ddf648..e50c013 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -22,4 +22,7 @@
 
     <!-- Whether the downloads backup job should be scheduled. -->
     <bool name="enable_downloads_backup">false</bool>
+
+    <!-- Whether the low storage notification should be shown. -->
+    <bool name="enable_low_storage_notification">true</bool>
 </resources>
\ No newline at end of file
diff --git a/src/com/android/storagemanager/automatic/NotificationController.java b/src/com/android/storagemanager/automatic/NotificationController.java
index de987c5..e596a75 100644
--- a/src/com/android/storagemanager/automatic/NotificationController.java
+++ b/src/com/android/storagemanager/automatic/NotificationController.java
@@ -150,6 +150,12 @@
     }
 
     private boolean shouldShowNotification(Context context) {
+        boolean showNotificationConfigEnabled =
+                context.getResources().getBoolean(R.bool.enable_low_storage_notification);
+        if (!showNotificationConfigEnabled) {
+            return false;
+        }
+
         SharedPreferences sp = context.getSharedPreferences(
                 SHARED_PREFERENCES_NAME,
                 Context.MODE_PRIVATE);