Settings: support black theme for dark mode [2/3]
Change-Id: I12451c0b72f73b08b885e8103bbe3e74a0c4e19f
Signed-off-by: Jesse Chan <jc@lineageos.org>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index f5549bc..22ea2e7 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -26,4 +26,8 @@
<!-- Navigation bar hint -->
<string name="show_navbar_gesture_bar_title">Gesture bar</string>
<string name="show_navbar_gesture_bar_summary">Show gesture bar at the bottom of the screen</string>
+
+ <!-- Black theme for dark mode -->
+ <string name="berry_black_theme_title">Pure black</string>
+ <string name="berry_black_theme_summary">Pure black background for dark theme</string>
</resources>
diff --git a/res/xml/dark_mode_settings.xml b/res/xml/dark_mode_settings.xml
index 7f13659..ec3fe66 100644
--- a/res/xml/dark_mode_settings.xml
+++ b/res/xml/dark_mode_settings.xml
@@ -62,4 +62,10 @@
settings:searchable="false"
settings:controller="com.android.settings.display.darkmode.DarkModeCustomBedtimePreferenceController" />
+ <SwitchPreference
+ android:key="berry_black_theme"
+ android:title="@string/berry_black_theme_title"
+ android:summary="@string/berry_black_theme_summary"
+ android:defaultValue="false"
+ settings:controller="org.leafos.settings.display.BerryBlackThemePreferenceController" />
</PreferenceScreen>
diff --git a/src/org/leafos/settings/display/BerryBlackThemePreferenceController.java b/src/org/leafos/settings/display/BerryBlackThemePreferenceController.java
new file mode 100644
index 0000000..a7d00fc
--- /dev/null
+++ b/src/org/leafos/settings/display/BerryBlackThemePreferenceController.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2022 The LeafOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.leafos.settings.display;
+
+import android.content.Context;
+
+import org.leafos.settings.controller.BaseSecureSwitchPreferenceController;
+
+public class BerryBlackThemePreferenceController extends BaseSecureSwitchPreferenceController {
+
+ public BerryBlackThemePreferenceController(Context context, String key) {
+ super(context, key);
+ }
+
+}