summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xAndroidManifest.xml53
-rwxr-xr-xres/drawable-hdpi/ic_audio_ring_24dp.pngbin0 -> 1047 bytes
-rwxr-xr-xres/drawable-mdpi/ic_audio_ring_24dp.pngbin0 -> 713 bytes
-rwxr-xr-xres/drawable-xhdpi/ic_audio_ring_24dp.pngbin0 -> 1403 bytes
-rwxr-xr-xres/drawable-xxhdpi/ic_audio_ring_24dp.pngbin0 -> 2126 bytes
-rw-r--r--res/drawable/ic_settings_notification_drawer.xml45
-rw-r--r--res/drawable/ic_settings_sounds.xml27
-rw-r--r--res/menu/privacy_guard_manager.xml2
-rw-r--r--res/values/cm_strings.xml14
-rw-r--r--res/xml/button_settings.xml11
-rw-r--r--res/xml/dashboard_categories.xml195
-rw-r--r--res/xml/display.xml (renamed from res/xml/display_settings.xml)225
-rw-r--r--res/xml/notification_manager_settings.xml49
-rw-r--r--res/xml/other_sound_settings.xml22
-rw-r--r--res/xml/privacy_settings_cyanogenmod.xml5
-rw-r--r--res/xml/security_settings_chooser.xml6
-rw-r--r--res/xml/security_settings_lockscreen.xml14
-rw-r--r--res/xml/security_settings_misc.xml48
-rw-r--r--res/xml/security_settings_password.xml25
-rw-r--r--res/xml/security_settings_pattern.xml25
-rw-r--r--res/xml/security_settings_pin.xml23
-rw-r--r--res/xml/sounds.xml114
-rw-r--r--res/xml/tether_prefs.xml10
-rw-r--r--res/xml/wireless_settings.xml5
-rw-r--r--src/com/android/settings/ButtonSettings.java11
-rw-r--r--src/com/android/settings/DisplaySettings.java71
-rw-r--r--src/com/android/settings/SecuritySettings.java259
-rw-r--r--src/com/android/settings/Settings.java4
-rw-r--r--src/com/android/settings/SettingsActivity.java29
-rw-r--r--src/com/android/settings/WirelessSettings.java12
-rw-r--r--src/com/android/settings/cyanogenmod/DisplayRotation.java2
-rw-r--r--src/com/android/settings/notification/NotificationManagerSettings.java136
-rw-r--r--src/com/android/settings/notification/SoundSettings.java (renamed from src/com/android/settings/notification/NotificationSettings.java)151
-rw-r--r--src/com/android/settings/notification/VolumeSeekBarPreference.java8
-rw-r--r--src/com/android/settings/search/IndexDatabaseHelper.java2
-rw-r--r--src/com/android/settings/search/Ranking.java6
-rw-r--r--src/com/android/settings/search/SearchIndexableResources.java23
37 files changed, 1033 insertions, 599 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e2138e0..77ef4f8 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -718,7 +718,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModeSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -739,7 +739,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModePrioritySettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -764,7 +764,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModeAutomationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -783,7 +783,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModeScheduleRuleSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -802,7 +802,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModeEventRuleSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -821,7 +821,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenModeExternalRuleSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -863,7 +863,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.DisplaySettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -876,7 +876,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.DisplaySettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
</activity-alias>
<activity android:name="Settings$DeviceInfoSettingsActivity"
@@ -2187,7 +2187,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.livedisplay.LiveDisplay" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
</activity>
<!-- Display rotation -->
@@ -2205,7 +2205,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.cyanogenmod.DisplayRotation" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
</activity>
<activity-alias android:name=".livedisplay.LiveDisplay"
@@ -2217,7 +2217,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.livedisplay.LiveDisplay" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
</activity-alias>
@@ -2312,7 +2312,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.DreamSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/display_settings" />
+ android:resource="@id/display_and_lights_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2350,7 +2350,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.nfc.PaymentSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/nfc_payment_settings" />
+ android:resource="@id/lockscreen_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2407,7 +2407,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.NotificationAccessSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
</activity>
<activity android:name="Settings$ZenAccessSettingsActivity"
@@ -2424,7 +2424,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.ZenAccessSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
</activity>
<activity android:name="Settings$NotificationSettingsActivity"
@@ -2443,7 +2443,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.NotificationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2466,7 +2466,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.NotificationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity-alias>
@@ -2479,7 +2479,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.NotificationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
</activity-alias>
<activity android:name="Settings$OtherSoundSettingsActivity"
@@ -2497,7 +2497,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.OtherSoundSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2510,7 +2510,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.ManageApplications" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
</activity>
<!-- Show application-level notification settings (app passed in as extras) -->
@@ -2528,7 +2528,7 @@
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.AppNotificationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/notification_settings" />
+ android:resource="@id/sound_settings" />
</activity>
<!-- Show Manual (from settings item) -->
@@ -2701,6 +2701,15 @@
android:resource="@id/wireless_settings" />
</activity>
+ <activity android:name=".Settings$LockScreenSettingsActivity"
+ android:label="@string/lockscreen_settings"
+ android:taskAffinity="">
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.SecuritySettings" />
+ <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/lockscreen_settings" />
+ </activity>
+
<provider
android:name=".search.SettingsSearchIndexablesProvider"
android:authorities="com.android.settings"
@@ -2805,4 +2814,4 @@
</activity>
</application>
-</manifest> \ No newline at end of file
+</manifest>
diff --git a/res/drawable-hdpi/ic_audio_ring_24dp.png b/res/drawable-hdpi/ic_audio_ring_24dp.png
new file mode 100755
index 0000000..69a7e90
--- /dev/null
+++ b/res/drawable-hdpi/ic_audio_ring_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_audio_ring_24dp.png b/res/drawable-mdpi/ic_audio_ring_24dp.png
new file mode 100755
index 0000000..5e15c2a
--- /dev/null
+++ b/res/drawable-mdpi/ic_audio_ring_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_audio_ring_24dp.png b/res/drawable-xhdpi/ic_audio_ring_24dp.png
new file mode 100755
index 0000000..82bbdb1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_audio_ring_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_audio_ring_24dp.png b/res/drawable-xxhdpi/ic_audio_ring_24dp.png
new file mode 100755
index 0000000..f198d96
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_audio_ring_24dp.png
Binary files differ
diff --git a/res/drawable/ic_settings_notification_drawer.xml b/res/drawable/ic_settings_notification_drawer.xml
new file mode 100644
index 0000000..a83989e
--- /dev/null
+++ b/res/drawable/ic_settings_notification_drawer.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The CyanogenMod 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#009688"
+ android:pathData="M20.815,16.008h-17.5c-0.138,0-0.25,0.112-0.25,0.25v3.5c0,0.138,0.112,0.25,0.25,0.25h17.5
+c0.138,0,0.25-0.112,0.25-0.25v-3.5C21.065,16.12,20.953,16.008,20.815,16.008Z
+M4.878,19.07c-0.552,0-1-0.448-1-1
+c0-0.552,0.448-1,1-1c0.552,0,1,0.448,1,1C5.878,18.623,5.43,19.07,4.878,19.07z" />
+ <path
+ android:fillColor="#009688"
+ android:pathData="M20.815,11.008h-17.5c-0.138,0-0.25,0.112-0.25,0.25v3.5c0,0.138,0.112,0.25,0.25,0.25h17.5
+c0.138,0,0.25-0.112,0.25-0.25v-3.5C21.065,11.12,20.953,11.008,20.815,11.008Z
+M4.878,14.07c-0.552,0-1-0.448-1-1
+c0-0.552,0.448-1,1-1c0.552,0,1,0.448,1,1C5.878,13.623,5.43,14.07,4.878,14.07z" />
+ <path
+ android:fillColor="#009688"
+ android:pathData="M20.815,6.008h-17.5c-0.138,0-0.25,0.112-0.25,0.25v3.5c0,0.138,0.112,0.25,0.25,0.25h17.5
+c0.138,0,0.25-0.112,0.25-0.25v-3.5C21.065,6.12,20.953,6.008,20.815,6.008Z
+M4.878,9.07c-0.552,0-1-0.448-1-1c0-0.552,0.448-1,1-1
+c0.552,0,1,0.448,1,1C5.878,8.623,5.43,9.07,4.878,9.07z" />
+ <path
+ android:fillColor="#009688"
+ android:pathData="M22,3v2H2V3H22Z" />
+ </group>
+</vector>
diff --git a/res/drawable/ic_settings_sounds.xml b/res/drawable/ic_settings_sounds.xml
new file mode 100644
index 0000000..c6531c5
--- /dev/null
+++ b/res/drawable/ic_settings_sounds.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The CyanogenMod 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#009688"
+ android:pathData="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25
+2.5-4.02zM14 3.23v2.06c2.89 .86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91
+7-4.49 7-8.77s-2.99-7.86-7-8.77z" />
+</vector>
diff --git a/res/menu/privacy_guard_manager.xml b/res/menu/privacy_guard_manager.xml
index 5e41e46..e088ccb 100644
--- a/res/menu/privacy_guard_manager.xml
+++ b/res/menu/privacy_guard_manager.xml
@@ -23,7 +23,7 @@
android:title="@string/privacy_guard_manager_show_system_apps"
android:checkable="true" />
<item android:id="@+id/advanced"
- android:title="@string/privacy_guard_advanced_settings_title" />
+ android:title="@string/advanced" />
<item android:id="@+id/help"
android:title="@string/privacy_guard_help_title" />
</menu>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index d14a88e..b2ccb76 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -698,7 +698,6 @@
<string name="privacy_guard_reset_text">Reset permissions?</string>
<string name="privacy_guard_help_text">In this screen you can choose which apps Privacy Guard should be active for by simply tapping on them. Selected apps will not be able to access your personal data such as contacts, messages or call logs. Long pressing an app\'s entry opens its app details screen.\n\nBuilt-in apps are not shown by default but can be revealed by selecting the respective menu option.</string>
<string name="privacy_guard_manager_show_system_apps">Show built-in apps</string>
- <string name="privacy_guard_advanced_settings_title">Advanced</string>
<!-- Battery saver -->
<string name="battery_saver_threshold">Battery saver threshold</string>
@@ -851,4 +850,15 @@
<![CDATA[<b>Total contributors:</b> <xliff:g id="total_contributors">%1$s</xliff:g><br/><br/>
<b>Total commits:</b> <xliff:g id="total_commits">%2$s</xliff:g><br/><br/>
<b>Last update:</b> <xliff:g id="date">%3$s</xliff:g>]]></string>
-</resources> \ No newline at end of file
+
+ <string name="category_sounds">Sounds</string>
+ <string name="notification_manager">Notifications</string>
+ <string name="lockscreen_settings">Lock screen</string>
+ <string name="lockscreen_settings">Lock screen</string>
+ <string name="category_lights">Lights</string>
+ <string name="category_volume">Volume</string>
+ <string name="category_vibrate">Vibrate</string>
+ <string name="category_misc">Miscellaneous</string>
+ <string name="title_general">General</string>
+ <string name="advanced">Advanced</string>
+</resources>
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml
index d62b538..d144698 100644
--- a/res/xml/button_settings.xml
+++ b/res/xml/button_settings.xml
@@ -29,17 +29,8 @@
android:dialogTitle="@string/button_backlight_title"
android:persistent="false" />
- <!-- Device Specific Bluetooth Input settings -->
- <Preference
- android:key="bluetooth_input_settings">
- <intent
- android:action="com.cyanogenmod.action.LAUNCH_BLUETOOTH_INPUT_SETTINGS"
- android:targetPackage="com.cyanogenmod.settings.device"
- android:targetClass="com.cyanogenmod.settings.device.BluetoothInputSettings" />
- </Preference>
-
<PreferenceCategory
- android:key="navigation_bar"
+ android:key="navigation_bar_category"
android:title="@string/navigation_bar_category" >
<com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
diff --git a/res/xml/dashboard_categories.xml b/res/xml/dashboard_categories.xml
index a6013f0..4b893a8 100644
--- a/res/xml/dashboard_categories.xml
+++ b/res/xml/dashboard_categories.xml
@@ -80,6 +80,12 @@
android:icon="@drawable/ic_settings_more"
/>
+ <!-- Manufacturer hook -->
+ <dashboard-tile
+ android:id="@+id/manufacturer_settings"
+ android:fragment="com.android.settings.WirelessSettings">
+ <intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />
+ </dashboard-tile>
</dashboard-category>
<!-- DEVICE -->
@@ -88,76 +94,70 @@
android:key="@string/category_key_device"
android:title="@string/header_category_device" >
+ <!-- Sound -->
<dashboard-tile
- android:id="@+id/button_settings"
- android:title="@string/button_pref_title"
- android:fragment="com.android.settings.ButtonSettings"
- android:icon="@drawable/ic_settings_buttons"
- />
-
- <!-- Home -->
- <dashboard-tile
- android:id="@+id/home_settings"
- android:title="@string/home_settings"
- android:fragment="com.android.settings.HomeSettings"
- android:icon="@drawable/ic_settings_home"
+ android:id="@+id/sound_settings"
+ android:title="@string/category_sounds"
+ android:fragment="com.android.settings.notification.SoundSettings"
+ android:icon="@drawable/ic_settings_sounds"
/>
- <!-- Display -->
+ <!-- Display & lights -->
<dashboard-tile
- android:id="@+id/display_settings"
- android:title="@string/display_settings"
+ android:id="@+id/display_and_lights_settings"
+ android:title="@string/display_and_lights"
android:fragment="com.android.settings.DisplaySettings"
android:icon="@drawable/ic_settings_display"
/>
- <!-- Gestures -->
- <dashboard-tile
- android:id="@+id/device_specific_gesture_settings"
- android:title="@string/gesture_settings_title"
- android:icon="@drawable/ic_settings_gestures">
- <intent
- android:action="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS"
- android:targetPackage="com.cyanogenmod.settings.device"
- android:targetClass="com.cyanogenmod.settings.device.TouchscreenGestureSettings" />
- </dashboard-tile>
-
<!-- Themes -->
<!-- NOTE: Intent.parseIntent looks for "categories" tag and not "category" -->
<dashboard-tile
- android:id="@+id/theme_settings"
- android:title="@string/themes_settings_title"
- android:icon="@drawable/ic_settings_themes">
+ android:id="@+id/theme_settings"
+ android:title="@string/themes_settings_title"
+ android:icon="@drawable/ic_settings_themes">
<intent
- android:action="android.intent.action.MAIN" >
+ android:action="android.intent.action.MAIN" >
<categories android:name="cyanogenmod.intent.category.APP_THEMES" />
</intent>
</dashboard-tile>
- <!-- Notifications -->
+ <!-- Notification manager -->
<dashboard-tile
- android:id="@+id/notification_settings"
- android:title="@string/notification_settings"
- android:fragment="com.android.settings.notification.NotificationSettings"
+ android:id="@+id/notification_manager"
+ android:title="@string/notification_manager"
+ android:fragment="com.android.settings.notification.NotificationManagerSettings"
android:icon="@drawable/ic_settings_notifications"
/>
- <!-- Application Settings -->
+ <!-- Lock screen -->
<dashboard-tile
- android:id="@+id/application_settings"
- android:title="@string/applications_settings"
- android:fragment="com.android.settings.applications.ManageApplications"
- android:icon="@drawable/ic_settings_applications"
- />
+ android:id="@+id/lockscreen_settings"
+ android:title="@string/lockscreen_settings"
+ android:fragment="com.android.settings.SecuritySettings"
+ android:icon="@drawable/ic_settings_security">
+ <extra android:name="filter_type" android:value="0" />
+ </dashboard-tile>
- <!-- Storage -->
+ <!-- Buttons -->
<dashboard-tile
- android:id="@+id/storage_settings"
- android:title="@string/storage_usb_settings"
- android:fragment="com.android.settings.deviceinfo.StorageSettings"
- android:icon="@drawable/ic_settings_storage"
+ android:id="@+id/button_settings"
+ android:title="@string/button_pref_title"
+ android:fragment="com.android.settings.ButtonSettings"
+ android:icon="@drawable/ic_settings_buttons"
/>
+ <!-- Gestures -->
+ <dashboard-tile
+ android:id="@+id/device_specific_gesture_settings"
+ android:title="@string/gesture_settings_title"
+ android:icon="@drawable/ic_settings_gestures">
+ <intent
+ android:action="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS"
+ android:targetPackage="com.cyanogenmod.settings.device"
+ android:targetClass="com.cyanogenmod.settings.device.TouchscreenGestureSettings" />
+ </dashboard-tile>
+
<!-- Battery -->
<dashboard-tile
android:id="@+id/battery_settings"
@@ -166,6 +166,14 @@
android:icon="@drawable/ic_settings_battery"
/>
+ <!-- Security -->
+ <dashboard-tile
+ android:id="@+id/security_settings"
+ android:title="@string/security_settings_title"
+ android:fragment="com.android.settings.SecuritySettings"
+ android:icon="@drawable/ic_settings_security">
+ </dashboard-tile>
+
<!-- Memory -->
<dashboard-tile
android:id="@+id/manage_memory"
@@ -182,29 +190,22 @@
android:icon="@drawable/ic_settings_multiuser"
/>
- <!-- Manage NFC payment apps -->
- <dashboard-tile
- android:id="@+id/nfc_payment_settings"
- android:title="@string/nfc_payment_settings_title"
- android:fragment="com.android.settings.nfc.PaymentSettings"
- android:icon="@drawable/ic_settings_nfc_payment"
- />
-
- <!-- Manufacturer hook -->
- <dashboard-tile
- android:id="@+id/manufacturer_settings"
- android:fragment="com.android.settings.WirelessSettings">
- <intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />
- </dashboard-tile>
-
</dashboard-category>
- <!-- PERSONAL -->
+ <!-- Personalization -->
<dashboard-category
android:id="@+id/personal_section"
android:key="@string/category_key_personal"
android:title="@string/header_category_personal" >
+ <!-- Home -->
+ <dashboard-tile
+ android:id="@+id/home_settings"
+ android:title="@string/home_settings"
+ android:fragment="com.android.settings.HomeSettings"
+ android:icon="@drawable/ic_settings_home"
+ />
+
<!-- Profiles -->
<dashboard-tile
android:id="@+id/profile_settings"
@@ -221,29 +222,12 @@
android:icon="@drawable/ic_settings_extdesk_hidenavbar"
/>
- <!-- Location -->
- <dashboard-tile
- android:id="@+id/location_settings"
- android:title="@string/location_settings_title"
- android:fragment="com.android.settings.location.LocationSettings"
- android:icon="@drawable/ic_settings_location"
- />
-
- <!-- Security -->
- <dashboard-tile
- android:id="@+id/security_settings"
- android:title="@string/security_settings_title"
- android:fragment="com.android.settings.SecuritySettings"
- android:icon="@drawable/ic_settings_security"
- />
-
- <!-- CyanogenMod Privacy Settings -->
- <!-- This is the 'real' Privacy items and includes Privacy Guard, Blacklist & WhisperPush -->
+ <!-- Application Settings -->
<dashboard-tile
- android:id="@+id/privacy_settings_cyanogenmod"
- android:title="@string/privacy_settings_cyanogenmod_title"
- android:fragment="com.android.settings.cyanogenmod.PrivacySettings"
- android:icon="@drawable/ic_settings_privacy"
+ android:id="@+id/application_settings"
+ android:title="@string/applications_settings"
+ android:fragment="com.android.settings.applications.ManageApplications"
+ android:icon="@drawable/ic_settings_applications"
/>
<!-- Account -->
@@ -257,20 +241,21 @@
<!-- Marker for where to place external tiles in this category -->
<external-tiles />
- <!-- Language -->
+ <!-- CyanogenMod Privacy Settings -->
+ <!-- This is the 'real' Privacy items and includes Privacy Guard, Blacklist & WhisperPush -->
<dashboard-tile
- android:id="@+id/language_settings"
- android:title="@string/language_settings"
- android:fragment="com.android.settings.inputmethod.InputMethodAndLanguageSettings"
- android:icon="@drawable/ic_settings_language"
+ android:id="@+id/privacy_settings_cyanogenmod"
+ android:title="@string/privacy_settings_cyanogenmod_title"
+ android:fragment="com.android.settings.cyanogenmod.PrivacySettings"
+ android:icon="@drawable/ic_settings_privacy"
/>
- <!-- Backup and reset -->
+ <!-- Location -->
<dashboard-tile
- android:id="@+id/privacy_settings"
- android:title="@string/privacy_settings"
- android:fragment="com.android.settings.PrivacySettings"
- android:icon="@drawable/ic_settings_backup"
+ android:id="@+id/location_settings"
+ android:title="@string/location_settings_title"
+ android:fragment="com.android.settings.location.LocationSettings"
+ android:icon="@drawable/ic_settings_location"
/>
</dashboard-category>
@@ -297,6 +282,30 @@
android:icon="@drawable/ic_settings_accessibility"
/>
+ <!-- Storage -->
+ <dashboard-tile
+ android:id="@+id/storage_settings"
+ android:title="@string/storage_usb_settings"
+ android:fragment="com.android.settings.deviceinfo.StorageSettings"
+ android:icon="@drawable/ic_settings_storage"
+ />
+
+ <!-- Language -->
+ <dashboard-tile
+ android:id="@+id/language_settings"
+ android:title="@string/language_settings"
+ android:fragment="com.android.settings.inputmethod.InputMethodAndLanguageSettings"
+ android:icon="@drawable/ic_settings_language"
+ />
+
+ <!-- Backup and reset -->
+ <dashboard-tile
+ android:id="@+id/privacy_settings"
+ android:title="@string/privacy_settings"
+ android:fragment="com.android.settings.PrivacySettings"
+ android:icon="@drawable/ic_settings_backup"
+ />
+
<!-- Print -->
<dashboard-tile
android:id="@+id/print_settings"
diff --git a/res/xml/display_settings.xml b/res/xml/display.xml
index a196460..35792de 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!--
+ Copyright (C) 2015 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -13,12 +14,14 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
- android:title="@string/display_settings"
- settings:keywords="@string/keywords_display">
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
+
+ <PreferenceCategory
+ android:key="display"
+ android:title="@string/display_label">
+ <!-- Brightness slider -->
<PreferenceScreen
android:key="brightness"
android:title="@string/brightness"
@@ -26,6 +29,7 @@
<intent android:action="android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
</PreferenceScreen>
+ <!-- Adaptive brightness -->
<SwitchPreference
android:key="auto_brightness"
android:title="@string/auto_brightness_title"
@@ -33,46 +37,6 @@
android:summary="@string/auto_brightness_summary"
android:persistent="false" />
- <!-- Hide night mode for now
- <ListPreference
- android:key="night_mode"
- android:title="@string/night_mode_title"
- settings:keywords="@string/keywords_display_night_mode"
- android:summary="@string/night_mode_summary"
- android:persistent="false"
- android:entries="@array/night_mode_entries"
- android:entryValues="@array/night_mode_values" /> -->
-
- <PreferenceScreen
- android:key="display_rotation"
- android:title="@string/display_rotation_title"
- android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
-
- <ListPreference
- android:key="screen_timeout"
- android:title="@string/screen_timeout"
- android:summary="@string/screen_timeout_summary"
- android:persistent="false"
- android:entries="@array/screen_timeout_entries"
- android:entryValues="@array/screen_timeout_values" />
-
- <SwitchPreference
- android:key="camera_gesture"
- android:title="@string/camera_gesture_title"
- android:summary="@string/camera_gesture_desc"
- android:persistent="false" />
-
- <SwitchPreference
- android:key="camera_double_tap_power_gesture"
- android:title="@string/camera_double_tap_power_gesture_title"
- android:summary="@string/camera_double_tap_power_gesture_desc"
- android:persistent="false" />
-
- <PreferenceScreen
- android:key="screensaver"
- android:title="@string/screensaver_settings_title"
- android:fragment="com.android.settings.DreamSettings" />
-
<!-- LiveDisplay -->
<PreferenceScreen
android:key="live_display"
@@ -80,92 +44,141 @@
android:summary="@string/live_display_summary"
android:fragment="com.android.settings.livedisplay.LiveDisplay" />
- <SwitchPreference
- android:key="lift_to_wake"
- android:title="@string/lift_to_wake_title"
- android:persistent="false" />
+ <PreferenceScreen
+ android:key="wallpaper"
+ android:title="@string/wallpaper_settings_title"
+ settings:keywords="@string/keywords_display_wallpaper"
+ android:fragment="com.android.settings.WallpaperTypeSettings" />
+
+ <!-- Rotation modes -->
+ <PreferenceScreen
+ android:key="display_rotation"
+ android:title="@string/display_rotation_title"
+ android:fragment="com.android.settings.cyanogenmod.DisplayRotation"/>
+ <!-- Doze // Ambient display -->
<SwitchPreference
android:key="doze"
android:title="@string/doze_title"
android:summary="@string/doze_summary"
android:persistent="false" />
+ <!-- Lift to wake -->
+ <SwitchPreference
+ android:key="lift_to_wake"
+ android:title="@string/lift_to_wake_title"
+ android:persistent="false" />
+
+ <!-- Double tap to wake -->
<SwitchPreference
android:key="tap_to_wake"
android:title="@string/tap_to_wake"
android:summary="@string/tap_to_wake_summary"
android:persistent="false" />
- <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
- android:key="proximity_on_wake"
- android:title="@string/proximity_wake_title"
- android:summary="@string/proximity_wake_summary"
- android:defaultValue="true" />
-
- <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
+ <!-- Double tap to sleep -->
+ <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
android:key="double_tap_sleep_gesture"
android:title="@string/double_tap_to_sleep_title"
android:summary="@string/double_tap_to_sleep_summary"
android:defaultValue="true" />
- <ListPreference
- android:key="lcd_density"
- android:title="@string/lcd_density"
+ <SwitchPreference
+ android:key="camera_gesture"
+ android:title="@string/camera_gesture_title"
+ android:summary="@string/camera_gesture_desc"
android:persistent="false" />
+ <SwitchPreference
+ android:key="camera_double_tap_power_gesture"
+ android:title="@string/camera_double_tap_power_gesture_title"
+ android:summary="@string/camera_double_tap_power_gesture_desc"
+ android:persistent="false" />
+
+ <!-- Prevent accidental wake-up -->
+ <SwitchPreference
+ android:key="proximity_on_wake"
+ android:title="@string/proximity_wake_title"
+ android:summary="@string/proximity_wake_summary"/>
+
+ <!-- Seconds before sleep -->
+ <ListPreference
+ android:key="screen_timeout"
+ android:title="@string/screen_timeout"
+ android:summary="@string/screen_timeout_summary"
+ android:persistent="false"
+ android:entries="@array/screen_timeout_entries"
+ android:entryValues="@array/screen_timeout_values" />
+
+ <!-- Wake on plug -->
+ <SwitchPreference
+ android:key="wake_when_plugged_or_unplugged"
+ android:title="@string/wake_when_plugged_or_unplugged_title"
+ android:summary="@string/wake_when_plugged_or_unplugged_summary"
+ android:defaultValue="false"/>
+
+ <!-- Cast screen -->
<PreferenceScreen
android:key="wifi_display"
android:title="@string/wifi_display_settings_title"
settings:keywords="@string/keywords_display_cast_screen"
android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="interface"
+ android:title="@string/category_interface">
+ <!-- expanded desktop -->
+ <PreferenceScreen
+ android:key="expanded_desktop"
+ android:title="@string/power_menu_expanded_desktop"
+ android:fragment="com.android.settings.applications.ExpandedDesktopPreferenceFragment"/>
+
+ <!-- DPI chooser -->
+ <ListPreference
+ android:key="lcd_density"
+ android:title="@string/lcd_density"
+ android:persistent="false" />
+
+ <!-- Day dream -->
+ <PreferenceScreen
+ android:key="screensaver"
+ android:title="@string/screensaver_settings_title"
+ android:fragment="com.android.settings.DreamSettings" />
+
+ <!-- Font size -->
+ <com.android.settings.FontDialogPreference
+ android:key="font_size"
+ android:title="@string/title_font_size"
+ settings:keywords="@string/keywords_display_font_size"
+ android:summary="@string/summary_font_size"
+ android:dialogTitle="@string/dialog_title_font_size" />
+
+ <!-- Search in Recents -->
+ <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
+ android:key="recents_show_search_bar"
+ android:title="@string/recents_show_searchbar"
+ settings:keywords="@string/keywords_recents_show_searchbar"
+ android:defaultValue="true" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="lights"
+ android:title="@string/category_lights">
+
+ <!-- Battery light -->
+ <PreferenceScreen
+ android:key="battery_light"
+ android:title="@string/battery_light_title"
+ android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
+
+ <!-- Notification lights -->
+ <PreferenceScreen
+ android:key="notification_light"
+ android:title="@string/notification_light_title"
+ android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
- <PreferenceCategory
- android:key="interface"
- android:title="@string/category_interface">
-
- <PreferenceScreen
- android:key="wallpaper"
- android:title="@string/wallpaper_settings_title"
- settings:keywords="@string/keywords_display_wallpaper"
- android:fragment="com.android.settings.WallpaperTypeSettings" />
-
- <!-- expanded desktop -->
- <PreferenceScreen
- android:key="expanded_desktop"
- android:title="@string/power_menu_expanded_desktop"
- android:fragment="com.android.settings.applications.ExpandedDesktopPreferenceFragment" />
-
- <!-- Search in Recents -->
- <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
- android:key="recents_show_search_bar"
- android:title="@string/recents_show_searchbar"
- android:defaultValue="true" />
-
- <com.android.settings.FontDialogPreference
- android:key="font_size"
- android:title="@string/title_font_size"
- settings:keywords="@string/keywords_display_font_size"
- android:summary="@string/summary_font_size"
- android:dialogTitle="@string/dialog_title_font_size" />
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="advanced_display_prefs"
- android:title="@string/advanced_settings">
-
- <SwitchPreference
- android:key="wake_when_plugged_or_unplugged"
- android:title="@string/wake_when_plugged_or_unplugged_title"
- android:summary="@string/wake_when_plugged_or_unplugged_summary"
- android:defaultValue="false" />
-
- <SwitchPreference
- android:key="adaptive_backlight"
- android:title="@string/adaptive_backlight_title"
- android:summary="@string/adaptive_backlight_summary"
- android:defaultValue="true" />
- </PreferenceCategory>
+ </PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/notification_manager_settings.xml b/res/xml/notification_manager_settings.xml
new file mode 100644
index 0000000..51bcafa
--- /dev/null
+++ b/res/xml/notification_manager_settings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Zen Mode -->
+ <PreferenceScreen
+ android:key="zen_mode"
+ android:title="@string/zen_mode_settings_title"
+ android:fragment="com.android.settings.notification.ZenModeSettings" />
+
+ <!-- When device is locked -->
+ <com.android.settings.DropDownPreference
+ android:key="lock_screen_notifications"
+ android:title="@string/lock_screen_notifications_title"
+ android:persistent="false" />
+
+ <!-- App notifications -->
+ <PreferenceScreen
+ android:key="app_notifications"
+ android:title="@string/app_notifications_title"
+ android:fragment="com.android.settings.notification.NotificationAppList" />
+
+ <!-- Notification access -->
+ <Preference
+ android:key="manage_notification_access"
+ android:title="@string/manage_notification_access_title"
+ android:persistent="false"
+ android:fragment="com.android.settings.notification.NotificationAccessSettings" />
+
+ <!-- Filter notifications -->
+ <PreferenceScreen
+ android:title="@string/block_notifications_title"
+ android:summary="@string/block_notifications_summary"
+ android:fragment="com.android.settings.cyanogenmod.SpamList" />
+
+</PreferenceScreen>
diff --git a/res/xml/other_sound_settings.xml b/res/xml/other_sound_settings.xml
index 834c1ff..3ba3dfb 100644
--- a/res/xml/other_sound_settings.xml
+++ b/res/xml/other_sound_settings.xml
@@ -43,14 +43,6 @@
android:title="@string/docking_sounds_title"
android:persistent="false" />
- <!-- Volume adjust sounds -->
- <SwitchPreference
- android:key="volume_adjust_sounds"
- android:title="@string/volume_adjust_sounds_title"
- android:switchTextOff=""
- android:switchTextOn=""
- android:persistent="false" />
-
<!-- Touch sounds -->
<SwitchPreference
android:key="touch_sounds"
@@ -59,15 +51,8 @@
<!-- Vibrate on touch -->
<SwitchPreference
- android:key="vibrate_on_touch"
- android:title="@string/vibrate_on_touch_title"
- android:persistent="false" />
-
- <!-- CMHW vibration intensity -->
- <com.android.settings.hardware.VibratorIntensity
- android:key="vibration_intensity"
- android:title="@string/vibrator_intensity_title"
- android:dialogTitle="@string/vibrator_intensity_title"
+ android:key="volume_adjust_sounds"
+ android:title="@string/volume_adjust_sounds_title"
android:persistent="false" />
<!-- Dock speaker plays -->
@@ -83,7 +68,7 @@
android:persistent="false" />
<PreferenceCategory
- android:title="@string/power_notifications_category_title"/>
+ android:title="@string/power_notifications_category_title">
<SwitchPreference
android:key="power_notifications"
@@ -105,4 +90,5 @@
android:dependency="power_notifications"
android:persistent="false" />
+ </PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/privacy_settings_cyanogenmod.xml b/res/xml/privacy_settings_cyanogenmod.xml
index 310e74b..65e8198 100644
--- a/res/xml/privacy_settings_cyanogenmod.xml
+++ b/res/xml/privacy_settings_cyanogenmod.xml
@@ -29,11 +29,6 @@
android:summary="@string/blacklist_summary"
android:fragment="com.android.settings.blacklist.BlacklistSettings" />
- <PreferenceScreen
- android:title="@string/block_notifications_title"
- android:summary="@string/block_notifications_summary"
- android:fragment="com.android.settings.cyanogenmod.SpamList" />
-
<!-- Anonymous statistics - (CMStats) -->
<PreferenceScreen
android:key="cmstats"
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
index 46340f2..7e23992 100644
--- a/res/xml/security_settings_chooser.xml
+++ b/res/xml/security_settings_chooser.xml
@@ -27,6 +27,12 @@
android:summary="@string/unlock_set_unlock_mode_none"
android:persistent="false"/>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="general_category"
+ android:title="@string/title_general">
+
<com.android.settings.SingleLineSummaryPreference
android:key="owner_info_settings"
android:title="@string/owner_info_settings_title"
diff --git a/res/xml/security_settings_lockscreen.xml b/res/xml/security_settings_lockscreen.xml
index fde0446..d0f3e55 100644
--- a/res/xml/security_settings_lockscreen.xml
+++ b/res/xml/security_settings_lockscreen.xml
@@ -29,12 +29,26 @@
settings:keywords="@string/keywords_lockscreen"
android:persistent="false"/>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="general_category"
+ android:title="@string/title_general">
+
<com.android.settings.SingleLineSummaryPreference
android:key="owner_info_settings"
android:enabled="false"
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
+ <PreferenceScreen
+ android:key="lockscreen_shortcuts_settings"
+ android:title="@string/lockscreen_targets_message" >
+ <intent
+ android:targetPackage="com.android.systemui"
+ android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
+ </PreferenceScreen>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_misc.xml b/res/xml/security_settings_misc.xml
index 21f4477..58876ba 100644
--- a/res/xml/security_settings_misc.xml
+++ b/res/xml/security_settings_misc.xml
@@ -17,6 +17,15 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/security_settings_title">
+ <PreferenceCategory android:title="@string/security_passwords_title"
+ android:persistent="false">
+
+ <SwitchPreference android:key="show_password"
+ android:title="@string/show_password"
+ android:persistent="false"/>
+
+ </PreferenceCategory>
+
<PreferenceCategory android:key="sim_lock"
android:title="@string/sim_lock_settings_title"
android:persistent="false">
@@ -33,29 +42,6 @@
</PreferenceCategory>
- <PreferenceCategory
- android:key="app_security"
- android:title="@string/app_security_title">
-
- <ListPreference
- android:key="sms_security_check_limit"
- android:dialogTitle="@string/sms_security_check_limit_title"
- android:title="@string/sms_security_check_limit_title"
- android:entries="@array/sms_security_check_limit_entries"
- android:entryValues="@array/sms_security_check_limit_values"
- android:defaultValue="30" />
-
- </PreferenceCategory>
-
- <PreferenceCategory android:title="@string/security_passwords_title"
- android:persistent="false">
-
- <SwitchPreference android:key="show_password"
- android:title="@string/show_password"
- android:persistent="false"/>
-
- </PreferenceCategory>
-
<PreferenceCategory android:key="device_admin_category"
android:title="@string/device_admin_title"
android:persistent="false">
@@ -113,15 +99,17 @@
</PreferenceCategory>
- <PreferenceCategory android:key="advanced_security"
- android:title="@string/advanced_security_title"
+ <PreferenceCategory android:key="advanced"
+ android:title="@string/category_misc"
android:persistent="false">
- <Preference android:key="manage_trust_agents"
- android:title="@string/manage_trust_agents"
- android:summary="@string/manage_trust_agents_summary"
- android:persistent="false"
- android:fragment="com.android.settings.TrustAgentSettings"/>
+ <ListPreference
+ android:key="sms_security_check_limit"
+ android:dialogTitle="@string/sms_security_check_limit_title"
+ android:title="@string/sms_security_check_limit_title"
+ android:entries="@array/sms_security_check_limit_entries"
+ android:entryValues="@array/sms_security_check_limit_values"
+ android:defaultValue="30" />
<PreferenceScreen
android:key="screen_pinning_settings"
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
index 7587af8..c073fe0 100644
--- a/res/xml/security_settings_password.xml
+++ b/res/xml/security_settings_password.xml
@@ -29,12 +29,11 @@
settings:keywords="@string/keywords_lockscreen"
android:persistent="false"/>
- <PreferenceScreen
- android:title="@string/lockscreen_targets_message" >
- <intent
- android:targetPackage="com.android.systemui"
- android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
- </PreferenceScreen>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="general_category"
+ android:title="@string/title_general">
<ListPreference
android:key="lock_after_timeout"
@@ -53,6 +52,20 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
+ <PreferenceScreen
+ android:key="lockscreen_shortcuts_settings"
+ android:title="@string/lockscreen_targets_message" >
+ <intent
+ android:targetPackage="com.android.systemui"
+ android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
+ </PreferenceScreen>
+
+ <Preference android:key="manage_trust_agents"
+ android:title="@string/manage_trust_agents"
+ android:summary="@string/manage_trust_agents_summary"
+ android:persistent="false"
+ android:fragment="com.android.settings.TrustAgentSettings"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
index b82b149..968efc5 100644
--- a/res/xml/security_settings_pattern.xml
+++ b/res/xml/security_settings_pattern.xml
@@ -29,12 +29,11 @@
settings:keywords="@string/keywords_lockscreen"
android:persistent="false"/>
- <PreferenceScreen
- android:title="@string/lockscreen_targets_message" >
- <intent
- android:targetPackage="com.android.systemui"
- android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
- </PreferenceScreen>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="general_category"
+ android:title="@string/title_general">
<SwitchPreference
android:key="visiblepattern"
@@ -57,6 +56,20 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
+ <PreferenceScreen
+ android:key="lockscreen_shortcuts_settings"
+ android:title="@string/lockscreen_targets_message" >
+ <intent
+ android:targetPackage="com.android.systemui"
+ android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
+ </PreferenceScreen>
+
+ <Preference android:key="manage_trust_agents"
+ android:title="@string/manage_trust_agents"
+ android:summary="@string/manage_trust_agents_summary"
+ android:persistent="false"
+ android:fragment="com.android.settings.TrustAgentSettings" />
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
index 6629f28..9a29ad5 100644
--- a/res/xml/security_settings_pin.xml
+++ b/res/xml/security_settings_pin.xml
@@ -29,10 +29,11 @@
settings:keywords="@string/keywords_lockscreen"
android:persistent="false"/>
- <PreferenceScreen
- android:key="lockscreen_shortcuts_settings"
- android:fragment="com.android.settings.cyanogenmod.LockscreenShortcuts"
- android:title="@string/lockscreen_targets_message" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="general_category"
+ android:title="@string/title_general">
<com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
android:key="lockscreen_scramble_pin_layout"
@@ -56,6 +57,20 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
+ <PreferenceScreen
+ android:key="lockscreen_shortcuts_settings"
+ android:title="@string/lockscreen_targets_message" >
+ <intent
+ android:targetPackage="com.android.systemui"
+ android:targetClass="com.android.systemui.cm.LockscreenShortcutsActivity" />
+ </PreferenceScreen>
+
+ <Preference android:key="manage_trust_agents"
+ android:title="@string/manage_trust_agents"
+ android:summary="@string/manage_trust_agents_summary"
+ android:persistent="false"
+ android:fragment="com.android.settings.TrustAgentSettings"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/sounds.xml b/res/xml/sounds.xml
new file mode 100644
index 0000000..fe07526
--- /dev/null
+++ b/res/xml/sounds.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/sound_settings"
+ android:key="sound_settings">
+
+ <PreferenceCategory
+ android:key="volumes"
+ android:title="@string/category_volume" >
+
+ <!-- Ring volume -->
+ <com.android.settings.notification.VolumeSeekBarPreference
+ android:key="ring_volume"
+ android:icon="@*android:drawable/ic_audio_ring_notif"
+ android:title="@string/ring_volume_option_title" />
+
+ <!-- Media volume -->
+ <com.android.settings.notification.VolumeSeekBarPreference
+ android:key="media_volume"
+ android:icon="@*android:drawable/ic_audio_vol"
+ android:title="@string/media_volume_option_title" />
+
+ <!-- Alarm volume -->
+ <com.android.settings.notification.VolumeSeekBarPreference
+ android:key="alarm_volume"
+ android:icon="@*android:drawable/ic_audio_alarm"
+ android:title="@string/alarm_volume_option_title" />
+
+ <!-- Notification volume -->
+ <com.android.settings.notification.VolumeSeekBarPreference
+ android:key="notification_volume"
+ android:icon="@*android:drawable/ic_audio_ring_notif"
+ android:title="@string/notification_volume_option_title"/>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="sounds"
+ android:title="@string/category_sounds">
+
+ <!-- Phone ringtone -->
+ <com.android.settings.DefaultRingtonePreference
+ android:key="ringtone"
+ android:title="@string/ringtone_title"
+ android:dialogTitle="@string/ringtone_title"
+ android:persistent="false"
+ android:ringtoneType="ringtone" />
+
+ <!-- Default notification ringtone -->
+ <com.android.settings.DefaultRingtonePreference
+ android:key="notification_ringtone"
+ android:title="@string/notification_ringtone_title_cm"
+ android:dialogTitle="@string/notification_ringtone_title_cm"
+ android:persistent="false"
+ android:ringtoneType="notification" />
+
+ <!-- Increasing ring -->
+ <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
+ android:key="increasing_ring"
+ android:title="@string/increasing_ring_volume_option_title" />
+
+ <!-- Increasing ring volume -->
+ <com.android.settings.notification.IncreasingRingVolumePreference
+ android:key="increasing_ring_volume"
+ android:icon="@drawable/ring_notif_increasing"
+ android:dependency="increasing_ring"/>
+
+ <!-- Other sounds -->
+ <Preference
+ android:key="other_sounds"
+ android:title="@string/other_sound_settings"
+ android:persistent="false"
+ android:fragment="com.android.settings.notification.OtherSoundSettings" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="vibrate"
+ android:title="@string/category_vibrate">
+
+ <!-- Also vibrate for calls -->
+ <SwitchPreference
+ android:key="vibrate_when_ringing"
+ android:title="@string/vibrate_when_ringing_title"
+ android:persistent="false" />
+
+ <!-- Vibrate on touch -->
+ <SwitchPreference
+ android:key="vibrate_on_touch"
+ android:title="@string/vibrate_on_touch_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
+ android:persistent="false" />
+
+ <!-- CMHW vibration intensity -->
+ <com.android.settings.hardware.VibratorIntensity
+ android:key="vibration_intensity"
+ android:title="@string/vibrator_intensity_title"
+ android:dialogTitle="@string/vibrator_intensity_title"
+ android:persistent="false"/>
+ </PreferenceCategory>
+</PreferenceScreen>
diff --git a/res/xml/tether_prefs.xml b/res/xml/tether_prefs.xml
index 7a70306..2f67dc4 100644
--- a/res/xml/tether_prefs.xml
+++ b/res/xml/tether_prefs.xml
@@ -17,11 +17,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
- android:key="usb_tether_settings"
- android:title="@string/usb_tethering_button_text"
- android:persistent="false" />
-
- <SwitchPreference
android:key="enable_wifi_ap"
android:title="@string/wifi_tether_checkbox_text"
android:persistent="false" />
@@ -32,6 +27,11 @@
android:persistent="false" />
<SwitchPreference
+ android:key="usb_tether_settings"
+ android:title="@string/usb_tethering_button_text"
+ android:persistent="false" />
+
+ <SwitchPreference
android:key="enable_bluetooth_tethering"
android:title="@string/bluetooth_tether_checkbox_text"
android:persistent="false" />
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
index 4a3741e..fdb5286 100644
--- a/res/xml/wireless_settings.xml
+++ b/res/xml/wireless_settings.xml
@@ -29,6 +29,11 @@
android:title="@string/wifi_calling_settings_title"
settings:keywords="@string/keywords_wifi_calling"
android:fragment="com.android.settings.WifiCallingSettings" />
+
+ <PreferenceScreen
+ android:key="nfc_payment_settings"
+ android:title="@string/nfc_payment_settings_title"
+ android:fragment="com.android.settings.nfc.PaymentSettings" />
<PreferenceScreen
android:fragment="com.android.settings.TetherSettings"
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java
index 5886a3f..a5a7d35 100644
--- a/src/com/android/settings/ButtonSettings.java
+++ b/src/com/android/settings/ButtonSettings.java
@@ -78,7 +78,6 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
private static final String KEY_NAVIGATION_RECENTS_LONG_PRESS = "navigation_recents_long_press";
private static final String KEY_POWER_END_CALL = "power_end_call";
private static final String KEY_HOME_ANSWER_CALL = "home_answer_call";
- private static final String KEY_BLUETOOTH_INPUT_SETTINGS = "bluetooth_input_settings";
private static final String KEY_VOLUME_MUSIC_CONTROLS = "volbtn_music_controls";
private static final String KEY_VOLUME_CONTROL_RING_STREAM = "volume_keys_control_ring_stream";
@@ -91,7 +90,7 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
private static final String CATEGORY_CAMERA = "camera_key";
private static final String CATEGORY_VOLUME = "volume_keys";
private static final String CATEGORY_BACKLIGHT = "key_backlight";
- private static final String CATEGORY_NAVBAR = "navigation_bar";
+ private static final String CATEGORY_NAVBAR = "navigation_bar_category";
// Available custom actions to perform on a key press.
// Must match values for KEY_HOME_LONG_PRESS_ACTION in:
@@ -380,7 +379,9 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION, 0);
mSwapVolumeButtons = (SwitchPreference)
prefScreen.findPreference(KEY_SWAP_VOLUME_BUTTONS);
- mSwapVolumeButtons.setChecked(swapVolumeKeys > 0);
+ if (mSwapVolumeButtons != null) {
+ mSwapVolumeButtons.setChecked(swapVolumeKeys > 0);
+ }
} else {
prefScreen.removePreference(volumeCategory);
}
@@ -412,9 +413,6 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
prefScreen.removePreference(backlight);
}
- Utils.updatePreferenceToSpecificActivityFromMetaDataOrRemove(getActivity(),
- getPreferenceScreen(), KEY_BLUETOOTH_INPUT_SETTINGS);
-
if (mCameraWakeScreen != null) {
if (mCameraSleepOnRelease != null && !getResources().getBoolean(
com.android.internal.R.bool.config_singleStageCameraKey)) {
@@ -468,6 +466,7 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
private ListPreference initActionList(String key, int value) {
ListPreference list = (ListPreference) getPreferenceScreen().findPreference(key);
+ if (list == null) return null;
list.setValue(Integer.toString(value));
list.setSummary(list.getEntry());
list.setOnPreferenceChangeListener(this);
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 9758848..f651ead 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -91,6 +91,9 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
/** If there is no setting in the provider, use this. */
private static final int FALLBACK_SCREEN_TIMEOUT_VALUE = 30000;
+ private static final String KEY_CATEGORY_LIGHTS = "lights";
+ private static final String KEY_CATEGORY_DISPLAY = "display";
+ private static final String KEY_CATEGORY_INTERFACE = "interface";
private static final String KEY_SCREEN_TIMEOUT = "screen_timeout";
private static final String KEY_LCD_DENSITY = "lcd_density";
private static final String KEY_FONT_SIZE = "font_size";
@@ -107,6 +110,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
private static final String KEY_PROXIMITY_WAKE = "proximity_on_wake";
private static final String KEY_DISPLAY_ROTATION = "display_rotation";
private static final String KEY_WAKE_WHEN_PLUGGED_OR_UNPLUGGED = "wake_when_plugged_or_unplugged";
+ private static final String KEY_NOTIFICATION_LIGHT = "notification_light";
+ private static final String KEY_BATTERY_LIGHT = "battery_light";
private static final int DLG_GLOBAL_CHANGE_WARNING = 1;
@@ -119,6 +124,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
private ListPreference mScreenTimeoutPreference;
private ListPreference mNightModePreference;
private Preference mScreenSaverPreference;
+ private SwitchPreference mAccelerometer;
private SwitchPreference mLiftToWakePreference;
private SwitchPreference mDozePreference;
private SwitchPreference mTapToWakePreference;
@@ -130,6 +136,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
@Override
public void onChange(boolean selfChange) {
updateDisplayRotationPreferenceDescription();
+ updateAccelerometerRotationSwitch();
}
};
@@ -153,15 +160,23 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
super.onCreate(savedInstanceState);
final Activity activity = getActivity();
final ContentResolver resolver = activity.getContentResolver();
- addPreferencesFromResource(R.xml.display_settings);
+ addPreferencesFromResource(R.xml.display);
+ PreferenceCategory displayPrefs = (PreferenceCategory)
+ findPreference(KEY_CATEGORY_DISPLAY);
+ PreferenceCategory interfacePrefs = (PreferenceCategory)
+ findPreference(KEY_CATEGORY_INTERFACE);
mDisplayRotationPreference = (PreferenceScreen) findPreference(KEY_DISPLAY_ROTATION);
+ mAccelerometer = (SwitchPreference) findPreference(DisplayRotation.KEY_ACCELEROMETER);
+ if (mAccelerometer != null) {
+ mAccelerometer.setPersistent(false);
+ }
mScreenSaverPreference = findPreference(KEY_SCREEN_SAVER);
if (mScreenSaverPreference != null
&& getResources().getBoolean(
com.android.internal.R.bool.config_dreamsSupported) == false) {
- getPreferenceScreen().removePreference(mScreenSaverPreference);
+ interfacePrefs.removePreference(mScreenSaverPreference);
}
mScreenTimeoutPreference = (ListPreference) findPreference(KEY_SCREEN_TIMEOUT);
@@ -176,7 +191,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
mLcdDensityPreference = (ListPreference) findPreference(KEY_LCD_DENSITY);
if (mLcdDensityPreference != null) {
if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
- getPreferenceScreen().removePreference(mLcdDensityPreference);
+ interfacePrefs.removePreference(mLcdDensityPreference);
} else {
int defaultDensity = getDefaultDensity();
int currentDensity = getCurrentDensity();
@@ -220,8 +235,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
if (mAutoBrightnessPreference != null && isAutomaticBrightnessAvailable(getResources())) {
mAutoBrightnessPreference.setOnPreferenceChangeListener(this);
} else {
- if (mAutoBrightnessPreference != null) {
- removePreference(KEY_AUTO_BRIGHTNESS);
+ if (displayPrefs != null && mAutoBrightnessPreference != null) {
+ displayPrefs.removePreference(mAutoBrightnessPreference);
mAutoBrightnessPreference = null;
}
}
@@ -230,8 +245,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
if (mLiftToWakePreference != null && isLiftToWakeAvailable(activity)) {
mLiftToWakePreference.setOnPreferenceChangeListener(this);
} else {
- if (mLiftToWakePreference != null) {
- removePreference(KEY_LIFT_TO_WAKE);
+ if (displayPrefs != null && mLiftToWakePreference != null) {
+ displayPrefs.removePreference(mLiftToWakePreference);
mLiftToWakePreference = null;
}
}
@@ -240,7 +255,9 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
if (mDozePreference != null && Utils.isDozeAvailable(activity)) {
mDozePreference.setOnPreferenceChangeListener(this);
} else {
- removePreference(KEY_DOZE);
+ if (displayPrefs != null && mDozePreference != null) {
+ displayPrefs.removePreference(mDozePreference);
+ }
}
if (isCameraGestureAvailable(getResources())) {
@@ -283,6 +300,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
mWakeWhenPluggedOrUnplugged =
(SwitchPreference) findPreference(KEY_WAKE_WHEN_PLUGGED_OR_UNPLUGGED);
+ initPulse((PreferenceCategory) findPreference(KEY_CATEGORY_LIGHTS));
}
private int getDefaultDensity() {
@@ -325,6 +343,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
return res.getBoolean(com.android.internal.R.bool.config_automatic_brightness_available);
}
+ private void updateAccelerometerRotationSwitch() {
+ if (mAccelerometer != null) {
+ mAccelerometer.setChecked(!RotationPolicy.isRotationLocked(getActivity()));
+ }
+ }
private void updateDisplayRotationPreferenceDescription() {
if (mDisplayRotationPreference == null) {
// The preference was removed, do nothing
@@ -477,11 +500,14 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
boolean wakeUpWhenPluggedOrUnpluggedConfig = getResources().getBoolean(
com.android.internal.R.bool.config_unplugTurnsOnScreen);
+ if (mWakeWhenPluggedOrUnplugged != null) {
mWakeWhenPluggedOrUnplugged.setChecked(CMSettings.Global.getInt(getContentResolver(),
CMSettings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED,
(wakeUpWhenPluggedOrUnpluggedConfig ? 1 : 0)) == 1);
+ }
updateState();
+ updateAccelerometerRotationSwitch();
}
@Override
@@ -600,6 +626,22 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
task.execute();
}
+ // === Pulse notification light ===
+
+ private void initPulse(PreferenceCategory parent) {
+ if (!getResources().getBoolean(
+ com.android.internal.R.bool.config_intrusiveNotificationLed)) {
+ parent.removePreference(parent.findPreference(KEY_NOTIFICATION_LIGHT));
+ }
+ if (!getResources().getBoolean(
+ com.android.internal.R.bool.config_intrusiveBatteryLed)
+ || UserHandle.myUserId() != UserHandle.USER_OWNER) {
+ parent.removePreference(parent.findPreference(KEY_BATTERY_LIGHT));
+ }
+ if (parent.getPreferenceCount() == 0) {
+ getPreferenceScreen().removePreference(parent);
+ }
+ }
/**
* Reads the current font size and sets the value in the summary text
*/
@@ -632,6 +674,9 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
CMSettings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED,
mWakeWhenPluggedOrUnplugged.isChecked() ? 1 : 0);
return true;
+ } else if (preference == mAccelerometer) {
+ RotationPolicy.setRotationLockForAccessibility(getActivity(),
+ !mAccelerometer.isChecked());
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
@@ -729,7 +774,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
new ArrayList<SearchIndexableResource>();
SearchIndexableResource sir = new SearchIndexableResource(context);
- sir.xmlResId = R.xml.display_settings;
+ sir.xmlResId = R.xml.display;
result.add(sir);
return result;
@@ -742,6 +787,14 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
com.android.internal.R.bool.config_dreamsSupported)) {
result.add(KEY_SCREEN_SAVER);
}
+ if (!context.getResources().getBoolean(
+ com.android.internal.R.bool.config_intrusiveNotificationLed)) {
+ result.add(KEY_NOTIFICATION_LIGHT);
+ }
+ if (!context.getResources().getBoolean(
+ com.android.internal.R.bool.config_intrusiveBatteryLed)) {
+ result.add(KEY_BATTERY_LIGHT);
+ }
if (!isAutomaticBrightnessAvailable(context.getResources())) {
result.add(KEY_AUTO_BRIGHTNESS);
}
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 308bea5..c0e5b73 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -53,6 +53,7 @@ import android.util.Log;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.Settings.LockScreenSettingsActivity;
import com.android.settings.TrustAgentUtils.TrustAgentComponentInfo;
import com.android.settings.fingerprint.FingerprintEnrollIntroduction;
import com.android.settings.fingerprint.FingerprintSettings;
@@ -77,6 +78,11 @@ public class SecuritySettings extends SettingsPreferenceFragment
private static final Intent TRUST_AGENT_INTENT =
new Intent(TrustAgentService.SERVICE_INTERFACE);
+ // Fitler types for this panel
+ private static final String FILTER_TYPE_EXTRA = "filter_type";
+ private static final int TYPE_LOCKSCREEN_EXTRA = 0;
+ private static final int TYPE_SECURITY_EXTRA = 1;
+
// Lock Settings
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
@@ -141,6 +147,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
private Intent mTrustAgentClickIntent;
private Preference mOwnerInfoPref;
+ private int mFilterType = TYPE_SECURITY_EXTRA;
@Override
protected int getMetricsCategory() {
@@ -151,6 +158,19 @@ public class SecuritySettings extends SettingsPreferenceFragment
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ // Ugly hack for legacy shortcuts :'(
+ Intent intent = getActivity().getIntent();
+ ComponentName componentName = intent.getComponent();
+ if (componentName.getClassName().equals(
+ LockScreenSettingsActivity.class.getName())) {
+ mFilterType = TYPE_LOCKSCREEN_EXTRA;
+ } else {
+ Bundle bundle = getArguments();
+ if (bundle != null) {
+ mFilterType = bundle.getInt(FILTER_TYPE_EXTRA, TYPE_SECURITY_EXTRA);
+ }
+ }
+
mSubscriptionManager = SubscriptionManager.from(getActivity());
mLockPatternUtils = new LockPatternUtils(getActivity());
@@ -210,25 +230,27 @@ public class SecuritySettings extends SettingsPreferenceFragment
// Add package manager to check if features are available
PackageManager pm = getPackageManager();
- // Add options for lock/unlock screen
- final int resid = getResIdForLockUnlockScreen(getActivity(), mLockPatternUtils);
- addPreferencesFromResource(resid);
-
// Add options for device encryption
mIsPrimary = MY_USER_ID == UserHandle.USER_OWNER;
- mOwnerInfoPref = findPreference(KEY_OWNER_INFO_SETTINGS);
- if (mOwnerInfoPref != null) {
- mOwnerInfoPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
- @Override
- public boolean onPreferenceClick(Preference preference) {
- OwnerInfoSettings.show(SecuritySettings.this);
- return true;
- }
- });
+ if (mFilterType == TYPE_LOCKSCREEN_EXTRA) {
+ // Add options for lock/unlock screen
+ final int resid = getResIdForLockUnlockScreen(getActivity(), mLockPatternUtils);
+ addPreferencesFromResource(resid);
+
+ mOwnerInfoPref = findPreference(KEY_OWNER_INFO_SETTINGS);
+ if (mOwnerInfoPref != null) {
+ mOwnerInfoPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ OwnerInfoSettings.show(SecuritySettings.this);
+ return true;
+ }
+ });
+ }
}
- if (mIsPrimary) {
+ if (mIsPrimary && mFilterType == TYPE_SECURITY_EXTRA) {
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
// The device is currently encrypted.
addPreferencesFromResource(R.xml.security_settings_encrypted);
@@ -238,119 +260,120 @@ public class SecuritySettings extends SettingsPreferenceFragment
}
}
- // Fingerprint and trust agents
- PreferenceGroup securityCategory = (PreferenceGroup)
- root.findPreference(KEY_SECURITY_CATEGORY);
- if (securityCategory != null) {
- maybeAddFingerprintPreference(securityCategory);
- addTrustAgentSettings(securityCategory);
- }
+ if (mFilterType == TYPE_LOCKSCREEN_EXTRA) {
+ // Fingerprint and trust agents
+ PreferenceGroup securityCategory = (PreferenceGroup)
+ root.findPreference(KEY_SECURITY_CATEGORY);
+ if (securityCategory != null) {
+ maybeAddFingerprintPreference(securityCategory);
+ addTrustAgentSettings(securityCategory);
+ }
- // lock after preference
- mLockAfter = (ListPreference) root.findPreference(KEY_LOCK_AFTER_TIMEOUT);
- if (mLockAfter != null) {
- setupLockAfterPreference();
- updateLockAfterPreferenceSummary();
- }
+ // lock after preference
+ mLockAfter = (ListPreference) root.findPreference(KEY_LOCK_AFTER_TIMEOUT);
+ if (mLockAfter != null) {
+ setupLockAfterPreference();
+ updateLockAfterPreferenceSummary();
+ }
- // visible pattern
- mVisiblePattern = (SwitchPreference) root.findPreference(KEY_VISIBLE_PATTERN);
+ // visible pattern
+ mVisiblePattern = (SwitchPreference) root.findPreference(KEY_VISIBLE_PATTERN);
+
+ // lock instantly on power key press
+ mPowerButtonInstantlyLocks = (SwitchPreference) root.findPreference(
+ KEY_POWER_INSTANTLY_LOCKS);
+ Preference trustAgentPreference = root.findPreference(KEY_TRUST_AGENT);
+ if (mPowerButtonInstantlyLocks != null &&
+ trustAgentPreference != null &&
+ trustAgentPreference.getTitle().length() > 0) {
+ mPowerButtonInstantlyLocks.setSummary(getString(
+ R.string.lockpattern_settings_power_button_instantly_locks_summary,
+ trustAgentPreference.getTitle()));
+ }
+ } else {
+ // Append the rest of the settings
+ addPreferencesFromResource(R.xml.security_settings_misc);
- // lock instantly on power key press
- mPowerButtonInstantlyLocks = (SwitchPreference) root.findPreference(
- KEY_POWER_INSTANTLY_LOCKS);
- Preference trustAgentPreference = root.findPreference(KEY_TRUST_AGENT);
- if (mPowerButtonInstantlyLocks != null &&
- trustAgentPreference != null &&
- trustAgentPreference.getTitle().length() > 0) {
- mPowerButtonInstantlyLocks.setSummary(getString(
- R.string.lockpattern_settings_power_button_instantly_locks_summary,
- trustAgentPreference.getTitle()));
- }
+ // Do not display SIM lock for devices without an Icc card
+ TelephonyManager tm = TelephonyManager.getDefault();
+ CarrierConfigManager cfgMgr = (CarrierConfigManager)
+ getActivity().getSystemService(Context.CARRIER_CONFIG_SERVICE);
+ PersistableBundle b = cfgMgr.getConfig();
+ if (!mIsPrimary || !isSimIccReady() ||
+ b.getBoolean(CarrierConfigManager.KEY_HIDE_SIM_LOCK_SETTINGS_BOOL)) {
+ root.removePreference(root.findPreference(KEY_SIM_LOCK));
+ } else {
+ // Disable SIM lock if there is no ready SIM card.
+ root.findPreference(KEY_SIM_LOCK).setEnabled(isSimReady());
+ }
+ if (Settings.System.getInt(getContentResolver(),
+ Settings.System.LOCK_TO_APP_ENABLED, 0) != 0) {
+ root.findPreference(KEY_SCREEN_PINNING).setSummary(
+ getResources().getString(R.string.switch_on_text));
+ }
- // Append the rest of the settings
- addPreferencesFromResource(R.xml.security_settings_misc);
+ // SMS rate limit security check
+ boolean isTelephony = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
+ if (isTelephony) {
+ mSmsSecurityCheck = (ListPreference) root.findPreference(KEY_SMS_SECURITY_CHECK_PREF);
+ mSmsSecurityCheck.setOnPreferenceChangeListener(this);
+ int smsSecurityCheck = Integer.valueOf(mSmsSecurityCheck.getValue());
+ updateSmsSecuritySummary(smsSecurityCheck);
+ }
- // Do not display SIM lock for devices without an Icc card
- TelephonyManager tm = TelephonyManager.getDefault();
- CarrierConfigManager cfgMgr = (CarrierConfigManager)
- getActivity().getSystemService(Context.CARRIER_CONFIG_SERVICE);
- PersistableBundle b = cfgMgr.getConfig();
- if (!mIsPrimary || !isSimIccReady() ||
- b.getBoolean(CarrierConfigManager.KEY_HIDE_SIM_LOCK_SETTINGS_BOOL)) {
- root.removePreference(root.findPreference(KEY_SIM_LOCK));
- } else {
- // Disable SIM lock if there is no ready SIM card.
- root.findPreference(KEY_SIM_LOCK).setEnabled(isSimReady());
- }
- if (Settings.System.getInt(getContentResolver(),
- Settings.System.LOCK_TO_APP_ENABLED, 0) != 0) {
- root.findPreference(KEY_SCREEN_PINNING).setSummary(
- getResources().getString(R.string.switch_on_text));
- }
+ // Show password
+ mShowPassword = (SwitchPreference) root.findPreference(KEY_SHOW_PASSWORD);
+ mResetCredentials = root.findPreference(KEY_RESET_CREDENTIALS);
- // SMS rate limit security check
- boolean isTelephony = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
- if (isTelephony) {
- mSmsSecurityCheck = (ListPreference) root.findPreference(KEY_SMS_SECURITY_CHECK_PREF);
- mSmsSecurityCheck.setOnPreferenceChangeListener(this);
- int smsSecurityCheck = Integer.valueOf(mSmsSecurityCheck.getValue());
- updateSmsSecuritySummary(smsSecurityCheck);
- }
+ // Credential storage
+ final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
+ mKeyStore = KeyStore.getInstance(); // needs to be initialized for onResume()
+ if (!um.hasUserRestriction(UserManager.DISALLOW_CONFIG_CREDENTIALS)) {
+ Preference credentialStorageType = root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE);
- // Show password
- mShowPassword = (SwitchPreference) root.findPreference(KEY_SHOW_PASSWORD);
- mResetCredentials = root.findPreference(KEY_RESET_CREDENTIALS);
+ final int storageSummaryRes =
+ mKeyStore.isHardwareBacked() ? R.string.credential_storage_type_hardware
+ : R.string.credential_storage_type_software;
+ credentialStorageType.setSummary(storageSummaryRes);
+ } else {
+ PreferenceGroup credentialsManager = (PreferenceGroup)
+ root.findPreference(KEY_CREDENTIALS_MANAGER);
+ credentialsManager.removePreference(root.findPreference(KEY_RESET_CREDENTIALS));
+ credentialsManager.removePreference(root.findPreference(KEY_CREDENTIALS_INSTALL));
+ credentialsManager.removePreference(root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE));
+ }
- // Credential storage
- final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
- mKeyStore = KeyStore.getInstance(); // needs to be initialized for onResume()
- if (!um.hasUserRestriction(UserManager.DISALLOW_CONFIG_CREDENTIALS)) {
- Preference credentialStorageType = root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE);
-
- final int storageSummaryRes =
- mKeyStore.isHardwareBacked() ? R.string.credential_storage_type_hardware
- : R.string.credential_storage_type_software;
- credentialStorageType.setSummary(storageSummaryRes);
- } else {
- PreferenceGroup credentialsManager = (PreferenceGroup)
- root.findPreference(KEY_CREDENTIALS_MANAGER);
- credentialsManager.removePreference(root.findPreference(KEY_RESET_CREDENTIALS));
- credentialsManager.removePreference(root.findPreference(KEY_CREDENTIALS_INSTALL));
- credentialsManager.removePreference(root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE));
- }
-
- // Application install
- PreferenceGroup deviceAdminCategory = (PreferenceGroup)
- root.findPreference(KEY_DEVICE_ADMIN_CATEGORY);
- mToggleAppInstallation = (SwitchPreference) findPreference(
- KEY_TOGGLE_INSTALL_APPLICATIONS);
- mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
- // Side loading of apps.
- // Disable for restricted profiles. For others, check if policy disallows it.
- mToggleAppInstallation.setEnabled(!um.getUserInfo(MY_USER_ID).isRestricted());
- if (um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES)
- || um.hasUserRestriction(UserManager.DISALLOW_INSTALL_APPS)) {
- mToggleAppInstallation.setEnabled(false);
- }
-
- // Advanced Security features
- PreferenceGroup advancedCategory =
- (PreferenceGroup)root.findPreference(KEY_ADVANCED_SECURITY);
- if (advancedCategory != null) {
- Preference manageAgents = advancedCategory.findPreference(KEY_MANAGE_TRUST_AGENTS);
- if (manageAgents != null && !mLockPatternUtils.isSecure(MY_USER_ID)) {
- manageAgents.setEnabled(false);
- manageAgents.setSummary(R.string.disabled_because_no_backup_security);
- }
- }
-
- // The above preferences come and go based on security state, so we need to update
- // the index. This call is expected to be fairly cheap, but we may want to do something
- // smarter in the future.
- Index.getInstance(getActivity())
- .updateFromClassNameResource(SecuritySettings.class.getName(), true, true);
+ // Application install
+ PreferenceGroup deviceAdminCategory = (PreferenceGroup)
+ root.findPreference(KEY_DEVICE_ADMIN_CATEGORY);
+ mToggleAppInstallation = (SwitchPreference) findPreference(
+ KEY_TOGGLE_INSTALL_APPLICATIONS);
+ mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
+ // Side loading of apps.
+ // Disable for restricted profiles. For others, check if policy disallows it.
+ mToggleAppInstallation.setEnabled(!um.getUserInfo(MY_USER_ID).isRestricted());
+ if (um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES)
+ || um.hasUserRestriction(UserManager.DISALLOW_INSTALL_APPS)) {
+ mToggleAppInstallation.setEnabled(false);
+ }
+ // Advanced Security features
+ PreferenceGroup advancedCategory =
+ (PreferenceGroup)root.findPreference(KEY_ADVANCED_SECURITY);
+ if (advancedCategory != null) {
+ Preference manageAgents = advancedCategory.findPreference(KEY_MANAGE_TRUST_AGENTS);
+ if (manageAgents != null && !mLockPatternUtils.isSecure(MY_USER_ID)) {
+ manageAgents.setEnabled(false);
+ manageAgents.setSummary(R.string.disabled_because_no_backup_security);
+ }
+ }
+
+ // The above preferences come and go based on security state, so we need to update
+ // the index. This call is expected to be fairly cheap, but we may want to do something
+ // smarter in the future.
+ Index.getInstance(getActivity())
+ .updateFromClassNameResource(SecuritySettings.class.getName(), true, true);
+ }
for (int i = 0; i < SWITCH_PREFERENCE_KEYS.length; i++) {
final Preference pref = findPreference(SWITCH_PREFERENCE_KEYS[i]);
if (pref != null) pref.setOnPreferenceChangeListener(this);
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 380d24f..53cdbaa 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -123,4 +123,6 @@ public class Settings extends SettingsActivity {
public static class BlacklistSettingsActivity extends SettingsActivity { /* empty */ }
public static class AnonymousStatsActivity extends Settings { /* empty */ }
public static class ContributorsCloudActivity extends SettingsActivity { /* empty */ }
-} \ No newline at end of file
+ public static class SoundSettingsActivity extends SettingsActivity { /* empty */ }
+ public static class LockScreenSettingsActivity extends SettingsActivity { /* empty */ }
+}
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 9dc5021..9670139 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -95,7 +95,9 @@ import com.android.settings.deviceinfo.StorageSettings;
import com.android.settings.fuelgauge.PowerUsageDetail;
import com.android.settings.fuelgauge.PowerUsageSummary;
import com.android.settings.livedisplay.LiveDisplay;
+import com.android.settings.notification.NotificationManagerSettings;
import com.android.settings.notification.OtherSoundSettings;
+import com.android.settings.notification.SoundSettings;
import com.android.settings.profiles.NFCProfileTagCallback;
import com.android.settings.search.DynamicIndexableContentMonitor;
import com.android.settings.search.Index;
@@ -108,7 +110,6 @@ import com.android.settings.nfc.AndroidBeam;
import com.android.settings.nfc.PaymentSettings;
import com.android.settings.notification.AppNotificationSettings;
import com.android.settings.notification.NotificationAccessSettings;
-import com.android.settings.notification.NotificationSettings;
import com.android.settings.notification.NotificationStation;
import com.android.settings.notification.OtherSoundSettings;
import com.android.settings.notification.ZenAccessSettings;
@@ -271,8 +272,10 @@ public class SettingsActivity extends Activity
R.id.sim_settings,
R.id.wireless_settings,
R.id.device_section,
- R.id.notification_settings,
- R.id.display_settings,
+ R.id.sound_settings,
+ R.id.display_and_lights_settings,
+ R.id.lockscreen_settings,
+ R.id.notification_manager,
R.id.storage_settings,
R.id.application_settings,
R.id.battery_settings,
@@ -287,7 +290,6 @@ public class SettingsActivity extends Activity
R.id.about_settings,
R.id.accessibility_settings,
R.id.print_settings,
- R.id.nfc_payment_settings,
R.id.home_settings,
R.id.dashboard,
R.id.privacy_settings_cyanogenmod
@@ -347,7 +349,7 @@ public class SettingsActivity extends Activity
PaymentSettings.class.getName(),
KeyboardLayoutPickerFragment.class.getName(),
ZenModeSettings.class.getName(),
- NotificationSettings.class.getName(),
+ SoundSettings.class.getName(),
ChooseLockPassword.ChooseLockPasswordFragment.class.getName(),
ChooseLockPattern.ChooseLockPatternFragment.class.getName(),
InstalledAppDetails.class.getName(),
@@ -369,7 +371,8 @@ public class SettingsActivity extends Activity
com.android.settings.cyanogenmod.DisplayRotation.class.getName(),
com.android.settings.cyanogenmod.PrivacySettings.class.getName(),
BlacklistSettings.class.getName(),
- ContributorsCloudFragment.class.getName()
+ ContributorsCloudFragment.class.getName(),
+ NotificationManagerSettings.class.getName()
};
@@ -1297,18 +1300,6 @@ public class SettingsActivity extends Activity
|| Utils.isMonkeyRunning()) {
removeTile = true;
}
- } else if (id == R.id.nfc_payment_settings) {
- if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)) {
- removeTile = true;
- } else {
- // Only show if NFC is on and we have the HCE feature
- NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
- if (adapter == null || !adapter.isEnabled() ||
- !getPackageManager().hasSystemFeature(
- PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
- removeTile = true;
- }
- }
} else if (id == R.id.print_settings) {
boolean hasPrintingSupport = getPackageManager().hasSystemFeature(
PackageManager.FEATURE_PRINTING);
@@ -1563,4 +1554,4 @@ public class SettingsActivity extends Activity
super.onNewIntent(intent);
}
-} \ No newline at end of file
+}
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index df430ef..a5cbf9e 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -74,6 +74,7 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
private static final String KEY_TOGGLE_NSD = "toggle_nsd"; //network service discovery
private static final String KEY_CELL_BROADCAST_SETTINGS = "cell_broadcast_settings";
private static final String KEY_WFC_SETTINGS = "wifi_calling_settings";
+ private static final String KEY_NFC_PAYMENT_SETTINGS = "nfc_payment_settings";
public static final String EXIT_ECM_RESULT = "exit_ecm_result";
public static final int REQUEST_CODE_EXIT_ECM = 1;
@@ -290,6 +291,7 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
mNfcAdapter = NfcAdapter.getDefaultAdapter(activity);
if (mNfcAdapter == null) {
getPreferenceScreen().removePreference(nfcCategory);
+ removePreference(KEY_NFC_PAYMENT_SETTINGS);
mNfcEnabler = null;
}
@@ -299,12 +301,13 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|| mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) {
removePreference(KEY_MOBILE_NETWORK_SETTINGS);
removePreference(KEY_MANAGE_MOBILE_PLAN);
+ removePreference(KEY_NFC_PAYMENT_SETTINGS);
}
// Remove Mobile Network Settings and Manage Mobile Plan
// if config_show_mobile_plan sets false.
final boolean isMobilePlanEnabled = this.getResources().getBoolean(
R.bool.config_show_mobile_plan);
- if (!isMobilePlanEnabled) {
+ if (!isMobilePlanEnabled || mCm.getMobileProvisioningUrl().isEmpty()) {
Preference pref = findPreference(KEY_MANAGE_MOBILE_PLAN);
if (pref != null) {
removePreference(KEY_MANAGE_MOBILE_PLAN);
@@ -473,11 +476,14 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
result.add(KEY_MANAGE_MOBILE_PLAN);
}
+ ConnectivityManager cm = (ConnectivityManager)
+ context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
// Remove Mobile Network Settings and Manage Mobile Plan
// if config_show_mobile_plan sets false.
final boolean isMobilePlanEnabled = context.getResources().getBoolean(
R.bool.config_show_mobile_plan);
- if (!isMobilePlanEnabled) {
+ if (!isMobilePlanEnabled || cm.getMobileProvisioningUrl().isEmpty()) {
result.add(KEY_MANAGE_MOBILE_PLAN);
}
@@ -492,8 +498,6 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
result.add(KEY_PROXY_SETTINGS);
// Disable Tethering if it's not allowed or if it's a wifi-only device
- ConnectivityManager cm = (ConnectivityManager)
- context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (isSecondaryUser || !cm.isTetheringSupported()) {
result.add(KEY_TETHER_SETTINGS);
}
diff --git a/src/com/android/settings/cyanogenmod/DisplayRotation.java b/src/com/android/settings/cyanogenmod/DisplayRotation.java
index 67fa571..122e836 100644
--- a/src/com/android/settings/cyanogenmod/DisplayRotation.java
+++ b/src/com/android/settings/cyanogenmod/DisplayRotation.java
@@ -35,7 +35,7 @@ import com.android.internal.logging.MetricsLogger;
public class DisplayRotation extends SettingsPreferenceFragment {
private static final String TAG = "DisplayRotation";
- private static final String KEY_ACCELEROMETER = "accelerometer";
+ public static final String KEY_ACCELEROMETER = "accelerometer";
private static final String KEY_LOCKSCREEN_ROTATION = "lockscreen_rotation";
private static final String ROTATION_0_PREF = "display_rotation_0";
private static final String ROTATION_90_PREF = "display_rotation_90";
diff --git a/src/com/android/settings/notification/NotificationManagerSettings.java b/src/com/android/settings/notification/NotificationManagerSettings.java
new file mode 100644
index 0000000..d25d186
--- /dev/null
+++ b/src/com/android/settings/notification/NotificationManagerSettings.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod 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 com.android.settings.notification;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.os.UserHandle;
+import android.preference.PreferenceCategory;
+import android.provider.SearchIndexableResource;
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.DropDownPreference;
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.search.BaseSearchIndexProvider;
+import com.android.settings.search.Indexable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class NotificationManagerSettings extends SettingsPreferenceFragment
+ implements Indexable {
+
+ private static final String TAG = NotificationManagerSettings.class.getSimpleName();
+
+ private static final String KEY_LOCK_SCREEN_NOTIFICATIONS = "lock_screen_notifications";
+
+ private boolean mSecure;
+ private int mLockscreenSelectedValue;
+ private DropDownPreference mLockscreen;
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ addPreferencesFromResource(R.xml.notification_manager_settings);
+ mSecure = new LockPatternUtils(getActivity()).isSecure(UserHandle.myUserId());
+ initLockscreenNotifications();
+ }
+
+ // === Lockscreen (public / private) notifications ===
+
+ private void initLockscreenNotifications() {
+ mLockscreen = (DropDownPreference) findPreference(KEY_LOCK_SCREEN_NOTIFICATIONS);
+ if (mLockscreen == null) {
+ Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_NOTIFICATIONS);
+ return;
+ }
+
+ mLockscreen.addItem(R.string.lock_screen_notifications_summary_show,
+ R.string.lock_screen_notifications_summary_show);
+ if (mSecure) {
+ mLockscreen.addItem(R.string.lock_screen_notifications_summary_hide,
+ R.string.lock_screen_notifications_summary_hide);
+ }
+ mLockscreen.addItem(R.string.lock_screen_notifications_summary_disable,
+ R.string.lock_screen_notifications_summary_disable);
+ updateLockscreenNotifications();
+ mLockscreen.setCallback(new DropDownPreference.Callback() {
+ @Override
+ public boolean onItemSelected(int pos, Object value) {
+ final int val = (Integer) value;
+ if (val == mLockscreenSelectedValue) {
+ return true;
+ }
+ final boolean enabled = val != R.string.lock_screen_notifications_summary_disable;
+ final boolean show = val == R.string.lock_screen_notifications_summary_show;
+ Settings.Secure.putInt(getContentResolver(),
+ Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, show ? 1 : 0);
+ Settings.Secure.putInt(getContentResolver(),
+ Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, enabled ? 1 : 0);
+ mLockscreenSelectedValue = val;
+ return true;
+ }
+ });
+ }
+
+ private void updateLockscreenNotifications() {
+ if (mLockscreen == null) {
+ return;
+ }
+ final boolean enabled = getLockscreenNotificationsEnabled();
+ final boolean allowPrivate = !mSecure || getLockscreenAllowPrivateNotifications();
+ mLockscreenSelectedValue = !enabled ? R.string.lock_screen_notifications_summary_disable :
+ allowPrivate ? R.string.lock_screen_notifications_summary_show :
+ R.string.lock_screen_notifications_summary_hide;
+ mLockscreen.setSelectedValue(mLockscreenSelectedValue);
+ }
+
+ private boolean getLockscreenNotificationsEnabled() {
+ return Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
+ }
+
+ private boolean getLockscreenAllowPrivateNotifications() {
+ return Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
+ }
+
+ public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
+ new BaseSearchIndexProvider() {
+ @Override
+ public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
+ boolean enabled) {
+ ArrayList<SearchIndexableResource> result =
+ new ArrayList<SearchIndexableResource>();
+
+ SearchIndexableResource sir = new SearchIndexableResource(context);
+ sir.xmlResId = R.xml.notification_manager_settings;
+ result.add(sir);
+
+ return result;
+ }
+ };
+
+ @Override
+ protected int getMetricsCategory() {
+ return MetricsLogger.DONT_TRACK_ME_BRO;
+ }
+}
diff --git a/src/com/android/settings/notification/NotificationSettings.java b/src/com/android/settings/notification/SoundSettings.java
index df4305d..f265bd3 100644
--- a/src/com/android/settings/notification/NotificationSettings.java
+++ b/src/com/android/settings/notification/SoundSettings.java
@@ -44,6 +44,7 @@ import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceCategory;
import android.preference.SeekBarVolumizer;
+import android.preference.SwitchPreference;
import android.preference.TwoStatePreference;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
@@ -57,6 +58,7 @@ import com.android.settings.DropDownPreference;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils;
+import com.android.settings.hardware.VibratorIntensity;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import cyanogenmod.providers.CMSettings;
@@ -66,10 +68,12 @@ import java.util.Arrays;
import java.util.List;
import java.util.Objects;
-public class NotificationSettings extends SettingsPreferenceFragment implements Indexable {
- private static final String TAG = "NotificationSettings";
+public class SoundSettings extends SettingsPreferenceFragment implements Indexable {
+ private static final String TAG = SoundSettings.class.getSimpleName();
- private static final String KEY_SOUND = "sound";
+ private static final String KEY_SOUND = "sounds";
+ private static final String KEY_VOLUMES = "volumes";
+ private static final String KEY_VIBRATE = "vibrate";
private static final String KEY_MEDIA_VOLUME = "media_volume";
private static final String KEY_ALARM_VOLUME = "alarm_volume";
private static final String KEY_RING_VOLUME = "ring_volume";
@@ -80,11 +84,9 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
private static final String KEY_WIFI_DISPLAY = "wifi_display";
private static final String KEY_NOTIFICATION = "notification";
private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
- private static final String KEY_LOCK_SCREEN_NOTIFICATIONS = "lock_screen_notifications";
private static final String KEY_NOTIFICATION_ACCESS = "manage_notification_access";
private static final String KEY_INCREASING_RING_VOLUME = "increasing_ring_volume";
- private static final String KEY_NOTIFICATION_LIGHT = "notification_light";
- private static final String KEY_BATTERY_LIGHT = "battery_light";
+ private static final String KEY_VIBRATION_INTENSITY = "vibration_intensity";
private static final String KEY_ZEN_ACCESS = "manage_zen_access";
private static final String KEY_ZEN_MODE = "zen_mode";
@@ -125,8 +127,6 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
private Preference mPhoneRingtonePreference;
private Preference mNotificationRingtonePreference;
private TwoStatePreference mVibrateWhenRinging;
- private TwoStatePreference mNotificationPulse;
- private DropDownPreference mLockscreen;
private Preference mNotificationAccess;
private Preference mZenAccess;
private boolean mSecure;
@@ -148,7 +148,6 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
mPM = mContext.getPackageManager();
mUserManager = UserManager.get(getContext());
mVoiceCapable = Utils.isVoiceCapable(mContext);
- mSecure = new LockPatternUtils(getActivity()).isSecure(UserHandle.myUserId());
mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
mVibrator = (Vibrator) getActivity().getSystemService(Context.VIBRATOR_SERVICE);
@@ -156,9 +155,11 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
mVibrator = null;
}
- addPreferencesFromResource(R.xml.notification_settings);
+ addPreferencesFromResource(R.xml.sounds);
- final PreferenceCategory sound = (PreferenceCategory) findPreference(KEY_SOUND);
+ final PreferenceCategory volumes = (PreferenceCategory) findPreference(KEY_VOLUMES);
+ final PreferenceCategory sounds = (PreferenceCategory) findPreference(KEY_SOUND);
+ final PreferenceCategory vibrate = (PreferenceCategory) findPreference(KEY_VIBRATE);
initVolumePreference(KEY_MEDIA_VOLUME, AudioManager.STREAM_MUSIC,
com.android.internal.R.drawable.ic_audio_media_mute);
initVolumePreference(KEY_ALARM_VOLUME, AudioManager.STREAM_ALARM,
@@ -167,21 +168,21 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
mRingOrNotificationPreference =
initVolumePreference(KEY_RING_VOLUME, AudioManager.STREAM_RING,
com.android.internal.R.drawable.ic_audio_ring_notif_mute);
- sound.removePreference(sound.findPreference(KEY_NOTIFICATION_VOLUME));
+ volumes.removePreference(volumes.findPreference(KEY_NOTIFICATION_VOLUME));
} else {
mRingOrNotificationPreference =
initVolumePreference(KEY_NOTIFICATION_VOLUME, AudioManager.STREAM_NOTIFICATION,
com.android.internal.R.drawable.ic_audio_ring_notif_mute);
- sound.removePreference(sound.findPreference(KEY_RING_VOLUME));
+ volumes.removePreference(volumes.findPreference(KEY_RING_VOLUME));
}
- initRingtones(sound);
- initVibrateWhenRinging(sound);
- initIncreasingRing(sound);
- final PreferenceCategory notification = (PreferenceCategory)
- findPreference(KEY_NOTIFICATION);
- initPulse(notification);
- initLockscreenNotifications(notification);
+ if (!VibratorIntensity.isSupported(mContext)) {
+ removePreference(KEY_VIBRATION_INTENSITY);
+ }
+
+ initRingtones(sounds);
+ initIncreasingRing(sounds);
+ initVibrateWhenRinging(vibrate);
mNotificationAccess = findPreference(KEY_NOTIFICATION_ACCESS);
refreshNotificationListeners();
@@ -225,6 +226,7 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
private VolumeSeekBarPreference initVolumePreference(String key, int stream, int muteIcon) {
final VolumeSeekBarPreference volumePref = (VolumeSeekBarPreference) findPreference(key);
+ if (volumePref == null) return null;
volumePref.setCallback(mVolumeCallback);
volumePref.setStream(stream);
mVolumePrefs.add(volumePref);
@@ -397,7 +399,7 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
mIncreasingRingVolume = (IncreasingRingVolumePreference)
root.findPreference(KEY_INCREASING_RING_VOLUME);
- if (mIncreasingRing == null || mIncreasingRingVolume == null || !mVoiceCapable) {
+ if (!mVoiceCapable) {
if (mIncreasingRing != null) {
root.removePreference(mIncreasingRing);
mIncreasingRing = null;
@@ -407,7 +409,9 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
mIncreasingRingVolume = null;
}
} else {
- mIncreasingRingVolume.setCallback(mIncreasingRingVolumeCallback);
+ if (mIncreasingRingVolume != null) {
+ mIncreasingRingVolume.setCallback(mIncreasingRingVolumeCallback);
+ }
}
}
@@ -443,79 +447,6 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
Settings.System.VIBRATE_WHEN_RINGING, 0) != 0);
}
- // === Pulse notification light ===
-
- private void initPulse(PreferenceCategory parent) {
- if (!getResources().getBoolean(
- com.android.internal.R.bool.config_intrusiveNotificationLed)) {
- parent.removePreference(parent.findPreference(KEY_NOTIFICATION_LIGHT));
- }
- if (!getResources().getBoolean(
- com.android.internal.R.bool.config_intrusiveBatteryLed)
- || UserHandle.myUserId() != UserHandle.USER_OWNER) {
- parent.removePreference(parent.findPreference(KEY_BATTERY_LIGHT));
- }
- }
-
- private void updatePulse() {
- if (mNotificationPulse == null) {
- return;
- }
- try {
- mNotificationPulse.setChecked(Settings.System.getInt(getContentResolver(),
- Settings.System.NOTIFICATION_LIGHT_PULSE) == 1);
- } catch (Settings.SettingNotFoundException snfe) {
- Log.e(TAG, Settings.System.NOTIFICATION_LIGHT_PULSE + " not found");
- }
- }
-
- // === Lockscreen (public / private) notifications ===
-
- private void initLockscreenNotifications(PreferenceCategory parent) {
- mLockscreen = (DropDownPreference) parent.findPreference(KEY_LOCK_SCREEN_NOTIFICATIONS);
- if (mLockscreen == null) {
- Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_NOTIFICATIONS);
- return;
- }
-
- boolean isSecureNotificationsDisabled = isSecureNotificationsDisabled();
- boolean isUnredactedNotificationsDisabled = isUnredactedNotificationsDisabled();
- if (!isSecureNotificationsDisabled && !isUnredactedNotificationsDisabled) {
- mLockscreen.addItem(R.string.lock_screen_notifications_summary_show,
- R.string.lock_screen_notifications_summary_show);
- }
- if (mSecure && !isSecureNotificationsDisabled) {
- mLockscreen.addItem(R.string.lock_screen_notifications_summary_hide,
- R.string.lock_screen_notifications_summary_hide);
- }
- mLockscreen.addItem(R.string.lock_screen_notifications_summary_disable,
- R.string.lock_screen_notifications_summary_disable);
- updateLockscreenNotifications();
- if (mLockscreen.getItemCount() > 1) {
- mLockscreen.setCallback(new DropDownPreference.Callback() {
- @Override
- public boolean onItemSelected(int pos, Object value) {
- final int val = (Integer) value;
- if (val == mLockscreenSelectedValue) {
- return true;
- }
- final boolean enabled =
- val != R.string.lock_screen_notifications_summary_disable;
- final boolean show = val == R.string.lock_screen_notifications_summary_show;
- Settings.Secure.putInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, show ? 1 : 0);
- Settings.Secure.putInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, enabled ? 1 : 0);
- mLockscreenSelectedValue = val;
- return true;
- }
- });
- } else {
- // There is one or less option for the user, disable the drop down.
- mLockscreen.setEnabled(false);
- }
- }
-
private boolean isSecureNotificationsDisabled() {
final DevicePolicyManager dpm =
(DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
@@ -530,28 +461,6 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
& DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS) != 0;
}
- private void updateLockscreenNotifications() {
- if (mLockscreen == null) {
- return;
- }
- final boolean enabled = getLockscreenNotificationsEnabled();
- final boolean allowPrivate = !mSecure || getLockscreenAllowPrivateNotifications();
- mLockscreenSelectedValue = !enabled ? R.string.lock_screen_notifications_summary_disable :
- allowPrivate ? R.string.lock_screen_notifications_summary_show :
- R.string.lock_screen_notifications_summary_hide;
- mLockscreen.setSelectedValue(mLockscreenSelectedValue);
- }
-
- private boolean getLockscreenNotificationsEnabled() {
- return Settings.Secure.getInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
- }
-
- private boolean getLockscreenAllowPrivateNotifications() {
- return Settings.Secure.getInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
- }
-
// === Notification listeners ===
private void refreshNotificationListeners() {
@@ -608,12 +517,6 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
if (VIBRATE_WHEN_RINGING_URI.equals(uri)) {
updateVibrateWhenRinging();
}
- if (NOTIFICATION_LIGHT_PULSE_URI.equals(uri)) {
- updatePulse();
- }
- if (LOCK_SCREEN_PRIVATE_URI.equals(uri) || LOCK_SCREEN_SHOW_URI.equals(uri)) {
- updateLockscreenNotifications();
- }
}
}
@@ -685,7 +588,7 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
public List<SearchIndexableResource> getXmlResourcesToIndex(
Context context, boolean enabled) {
final SearchIndexableResource sir = new SearchIndexableResource(context);
- sir.xmlResId = R.xml.notification_settings;
+ sir.xmlResId = R.xml.sounds;
return Arrays.asList(sir);
}
diff --git a/src/com/android/settings/notification/VolumeSeekBarPreference.java b/src/com/android/settings/notification/VolumeSeekBarPreference.java
index cb2fa90..49bd815 100644
--- a/src/com/android/settings/notification/VolumeSeekBarPreference.java
+++ b/src/com/android/settings/notification/VolumeSeekBarPreference.java
@@ -138,7 +138,9 @@ public class VolumeSeekBarPreference extends SeekBarPreference
mVolumizer.start();
mVolumizer.setSeekBar(mSeekBar);
updateIconView();
- mCallback.onStreamValueChanged(mStream, mSeekBar.getProgress());
+ if (mCallback != null) {
+ mCallback.onStreamValueChanged(mStream, mSeekBar.getProgress());
+ }
updateSuppressionText();
if (!isEnabled()) {
mSeekBar.setEnabled(false);
@@ -150,7 +152,9 @@ public class VolumeSeekBarPreference extends SeekBarPreference
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) {
super.onProgressChanged(seekBar, progress, fromTouch);
- mCallback.onStreamValueChanged(mStream, progress);
+ if (mCallback != null) {
+ mCallback.onStreamValueChanged(mStream, progress);
+ }
}
private void updateIconView() {
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index 152cbf3..273960d 100644
--- a/src/com/android/settings/search/IndexDatabaseHelper.java
+++ b/src/com/android/settings/search/IndexDatabaseHelper.java
@@ -28,7 +28,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "IndexDatabaseHelper";
private static final String DATABASE_NAME = "search_index.db";
- private static final int DATABASE_VERSION = 115;
+ private static final int DATABASE_VERSION = 116;
public interface Tables {
public static final String TABLE_PREFS_INDEX = "prefs_index";
diff --git a/src/com/android/settings/search/Ranking.java b/src/com/android/settings/search/Ranking.java
index 591fb67..2dc1a89 100644
--- a/src/com/android/settings/search/Ranking.java
+++ b/src/com/android/settings/search/Ranking.java
@@ -40,8 +40,9 @@ import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
import com.android.settings.location.LocationSettings;
import com.android.settings.location.ScanningSettings;
import com.android.settings.net.DataUsageMeteredSettings;
-import com.android.settings.notification.NotificationSettings;
+import com.android.settings.notification.NotificationManagerSettings;
import com.android.settings.notification.OtherSoundSettings;
+import com.android.settings.notification.SoundSettings;
import com.android.settings.notification.ZenModeAutomationSettings;
import com.android.settings.notification.ZenModePrioritySettings;
import com.android.settings.notification.ZenModeSettings;
@@ -121,7 +122,8 @@ public final class Ranking {
sRankMap.put(WallpaperTypeSettings.class.getName(), RANK_WALLPAPER);
// Notifications
- sRankMap.put(NotificationSettings.class.getName(), RANK_NOTIFICATIONS);
+ sRankMap.put(SoundSettings.class.getName(), RANK_NOTIFICATIONS);
+ sRankMap.put(NotificationManagerSettings.class.getName(), RANK_NOTIFICATIONS);
sRankMap.put(OtherSoundSettings.class.getName(), RANK_NOTIFICATIONS);
sRankMap.put(ZenModeSettings.class.getName(), RANK_NOTIFICATIONS);
sRankMap.put(ZenModePrioritySettings.class.getName(), RANK_NOTIFICATIONS);
diff --git a/src/com/android/settings/search/SearchIndexableResources.java b/src/com/android/settings/search/SearchIndexableResources.java
index 2f67383..a7a8264 100644
--- a/src/com/android/settings/search/SearchIndexableResources.java
+++ b/src/com/android/settings/search/SearchIndexableResources.java
@@ -42,8 +42,9 @@ import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
import com.android.settings.location.LocationSettings;
import com.android.settings.location.ScanningSettings;
import com.android.settings.net.DataUsageMeteredSettings;
-import com.android.settings.notification.NotificationSettings;
+import com.android.settings.notification.NotificationManagerSettings;
import com.android.settings.notification.OtherSoundSettings;
+import com.android.settings.notification.SoundSettings;
import com.android.settings.notification.ZenModePrioritySettings;
import com.android.settings.notification.ZenModeSettings;
import com.android.settings.print.PrintSettingsFragment;
@@ -120,6 +121,13 @@ public final class SearchIndexableResources {
WirelessSettings.class.getName(),
R.drawable.ic_settings_more));
+ sResMap.put(SecuritySettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(SecuritySettings.class.getName()),
+ NO_DATA_RES_ID,
+ SecuritySettings.class.getName(),
+ R.drawable.ic_settings_security));
+
sResMap.put(HomeSettings.class.getName(),
new SearchIndexableResource(
Ranking.getRankForClassName(HomeSettings.class.getName()),
@@ -141,11 +149,18 @@ public final class SearchIndexableResources {
WallpaperTypeSettings.class.getName(),
R.drawable.ic_settings_display));
- sResMap.put(NotificationSettings.class.getName(),
+ sResMap.put(SoundSettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(SoundSettings.class.getName()),
+ NO_DATA_RES_ID,
+ SoundSettings.class.getName(),
+ R.drawable.ic_settings_notifications));
+
+ sResMap.put(NotificationManagerSettings.class.getName(),
new SearchIndexableResource(
- Ranking.getRankForClassName(NotificationSettings.class.getName()),
+ Ranking.getRankForClassName(NotificationManagerSettings.class.getName()),
NO_DATA_RES_ID,
- NotificationSettings.class.getName(),
+ NotificationManagerSettings.class.getName(),
R.drawable.ic_settings_notifications));
sResMap.put(OtherSoundSettings.class.getName(),