Merge "Add tablet pattern layout to avoid outsize patterns"
diff --git a/Android.mk b/Android.mk
index 8b6532c..023e0c0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -21,4 +21,6 @@
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
+ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call all-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 2794d9d..b40cfb2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1665,16 +1665,6 @@
</intent-filter>
</activity>
- <activity android:name=".PairNfcDevice"
- android:taskAffinity="com.android.settings"
- android:parentActivityName="Settings$SecuritySettingsActivity"
- android:launchMode="singleTask">
- <intent-filter>
- <action android:name="android.settings.PAIR_NFC_DEVICE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
-
<activity android:name="Settings$NotificationAccessSettingsActivity"
android:label="@string/manage_notification_access"
android:taskAffinity=""
@@ -1722,6 +1712,53 @@
android:resource="@id/notification_settings" />
</activity>
+ <activity android:name="Settings$NotificationDisplaySettingsActivity"
+ android:label="@string/notification_display_settings"
+ android:exported="true"
+ android:taskAffinity=""
+ android:excludeFromRecents="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.ACTION_NOTIFICATION_DISPLAY_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.notification.NotificationDisplaySettings" />
+ <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/notification_settings" />
+ </activity>
+
+ <activity android:name="Settings$TouchSoundSettingsActivity"
+ android:label="@string/touch_sound_settings"
+ android:exported="true"
+ android:taskAffinity=""
+ android:excludeFromRecents="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.ACTION_TOUCH_SOUND_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.notification.TouchSoundSettings" />
+ <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/notification_settings" />
+ </activity>
+
+ <activity android:name="Settings$AppNotificationSettingsActivity"
+ android:label="@string/app_notifications_title"
+ android:exported="true"
+ android:taskAffinity=""
+ android:excludeFromRecents="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.ACTION_APP_NOTIFICATION_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <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" />
+ </activity>
<!-- Show regulatory info (from settings item or dialing "*#07#") -->
<activity android:name="RegulatoryInfoDisplayActivity"
diff --git a/proguard.flags b/proguard.flags
index 211a5a4..694ab29 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -12,8 +12,8 @@
-keep class com.android.settings.accounts.*
-keep class com.android.settings.fuelgauge.*
-keep class com.android.settings.users.*
--keep class com.android.settings.NotificationStation
-keep class com.android.settings.nfc.*
+-keep class com.android.settings.notification.*
# Keep click responders
-keepclassmembers class com.android.settings.inputmethod.UserDictionaryAddWordActivity {
diff --git a/res/drawable-hdpi/ic_appwidget_settings_brightness_auto_holo.png b/res/drawable-hdpi/ic_appwidget_settings_brightness_auto_holo.png
index a8fde41..1fa510f 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_brightness_auto_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_brightness_auto_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_appwidget_settings_brightness_full_holo.png b/res/drawable-hdpi/ic_appwidget_settings_brightness_full_holo.png
index c5ea9b6..21f60f4 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_brightness_full_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_brightness_full_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_appwidget_settings_brightness_half_holo.png b/res/drawable-hdpi/ic_appwidget_settings_brightness_half_holo.png
index 3927f1b..24719b1 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_brightness_half_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_brightness_half_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_appwidget_settings_brightness_off_holo.png b/res/drawable-hdpi/ic_appwidget_settings_brightness_off_holo.png
index 649bb2a..cf9eb4f 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_brightness_off_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_brightness_off_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_appwidget_settings_sync_on_holo.png b/res/drawable-hdpi/ic_appwidget_settings_sync_on_holo.png
index c77db7b..333ca53 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_sync_on_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_sync_on_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_appwidget_settings_wifi_on_holo.png b/res/drawable-hdpi/ic_appwidget_settings_wifi_on_holo.png
index dc0e6c1..1f0c444 100644
--- a/res/drawable-hdpi/ic_appwidget_settings_wifi_on_holo.png
+++ b/res/drawable-hdpi/ic_appwidget_settings_wifi_on_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_cellphone.png b/res/drawable-hdpi/ic_bt_cellphone.png
index a6a6448..6e29d23 100644
--- a/res/drawable-hdpi/ic_bt_cellphone.png
+++ b/res/drawable-hdpi/ic_bt_cellphone.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_config.png b/res/drawable-hdpi/ic_bt_config.png
index 47b4ba2..939a14d 100644
--- a/res/drawable-hdpi/ic_bt_config.png
+++ b/res/drawable-hdpi/ic_bt_config.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_headphones_a2dp.png b/res/drawable-hdpi/ic_bt_headphones_a2dp.png
index 7e0f73b..6110e9e 100644
--- a/res/drawable-hdpi/ic_bt_headphones_a2dp.png
+++ b/res/drawable-hdpi/ic_bt_headphones_a2dp.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_headset_hfp.png b/res/drawable-hdpi/ic_bt_headset_hfp.png
index a32379e..6cca225 100644
--- a/res/drawable-hdpi/ic_bt_headset_hfp.png
+++ b/res/drawable-hdpi/ic_bt_headset_hfp.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_imaging.png b/res/drawable-hdpi/ic_bt_imaging.png
index 66d7538..62624ee 100644
--- a/res/drawable-hdpi/ic_bt_imaging.png
+++ b/res/drawable-hdpi/ic_bt_imaging.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_laptop.png b/res/drawable-hdpi/ic_bt_laptop.png
index 1f9a1e8..42c3dc5 100644
--- a/res/drawable-hdpi/ic_bt_laptop.png
+++ b/res/drawable-hdpi/ic_bt_laptop.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_misc_hid.png b/res/drawable-hdpi/ic_bt_misc_hid.png
index 1d75d6c..6445f2a 100644
--- a/res/drawable-hdpi/ic_bt_misc_hid.png
+++ b/res/drawable-hdpi/ic_bt_misc_hid.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bt_pointing_hid.png b/res/drawable-hdpi/ic_bt_pointing_hid.png
index 4755d22..2fcc3b0 100644
--- a/res/drawable-hdpi/ic_bt_pointing_hid.png
+++ b/res/drawable-hdpi/ic_bt_pointing_hid.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_lockscreen_ime.png b/res/drawable-hdpi/ic_lockscreen_ime.png
index 29a7989..70d35bf 100644
--- a/res/drawable-hdpi/ic_lockscreen_ime.png
+++ b/res/drawable-hdpi/ic_lockscreen_ime.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_dark.png b/res/drawable-hdpi/ic_menu_add_dark.png
index b45001e..40a26b1 100644
--- a/res/drawable-hdpi/ic_menu_add_dark.png
+++ b/res/drawable-hdpi/ic_menu_add_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_delete_holo_dark.png b/res/drawable-hdpi/ic_menu_delete_holo_dark.png
index 92c0954..e25b44f 100644
--- a/res/drawable-hdpi/ic_menu_delete_holo_dark.png
+++ b/res/drawable-hdpi/ic_menu_delete_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_network_signal_4.png b/res/drawable-hdpi/ic_network_signal_4.png
index f04616d..0588950 100644
--- a/res/drawable-hdpi/ic_network_signal_4.png
+++ b/res/drawable-hdpi/ic_network_signal_4.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_about.png b/res/drawable-hdpi/ic_settings_about.png
old mode 100755
new mode 100644
index ace754b..f4596ed
--- a/res/drawable-hdpi/ic_settings_about.png
+++ b/res/drawable-hdpi/ic_settings_about.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_accessibility.png b/res/drawable-hdpi/ic_settings_accessibility.png
old mode 100755
new mode 100644
index 849c19c..202ec9d
--- a/res/drawable-hdpi/ic_settings_accessibility.png
+++ b/res/drawable-hdpi/ic_settings_accessibility.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_applications.png b/res/drawable-hdpi/ic_settings_applications.png
index 4d3f128..627b7cb 100644
--- a/res/drawable-hdpi/ic_settings_applications.png
+++ b/res/drawable-hdpi/ic_settings_applications.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_backup.png b/res/drawable-hdpi/ic_settings_backup.png
index ef764c7..c0662da 100644
--- a/res/drawable-hdpi/ic_settings_backup.png
+++ b/res/drawable-hdpi/ic_settings_backup.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_battery.png b/res/drawable-hdpi/ic_settings_battery.png
index fe57826..d7f3d18 100644
--- a/res/drawable-hdpi/ic_settings_battery.png
+++ b/res/drawable-hdpi/ic_settings_battery.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_bluetooth2.png b/res/drawable-hdpi/ic_settings_bluetooth2.png
index 454b552..9afe435 100644
--- a/res/drawable-hdpi/ic_settings_bluetooth2.png
+++ b/res/drawable-hdpi/ic_settings_bluetooth2.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_date_time.png b/res/drawable-hdpi/ic_settings_date_time.png
index 2b61b22..5a84c33 100644
--- a/res/drawable-hdpi/ic_settings_date_time.png
+++ b/res/drawable-hdpi/ic_settings_date_time.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_dock.png b/res/drawable-hdpi/ic_settings_dock.png
index 97b1694..bdeaee7 100644
--- a/res/drawable-hdpi/ic_settings_dock.png
+++ b/res/drawable-hdpi/ic_settings_dock.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_home.png b/res/drawable-hdpi/ic_settings_home.png
index 1333b3a..6a0564a 100644
--- a/res/drawable-hdpi/ic_settings_home.png
+++ b/res/drawable-hdpi/ic_settings_home.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_language.png b/res/drawable-hdpi/ic_settings_language.png
index 5332469..bf641aa 100644
--- a/res/drawable-hdpi/ic_settings_language.png
+++ b/res/drawable-hdpi/ic_settings_language.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_location.png b/res/drawable-hdpi/ic_settings_location.png
index 98cfb86..968253c 100644
--- a/res/drawable-hdpi/ic_settings_location.png
+++ b/res/drawable-hdpi/ic_settings_location.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_multiuser.png b/res/drawable-hdpi/ic_settings_multiuser.png
index ae48c4d..c1a6e63 100644
--- a/res/drawable-hdpi/ic_settings_multiuser.png
+++ b/res/drawable-hdpi/ic_settings_multiuser.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_notifications.png b/res/drawable-hdpi/ic_settings_notifications.png
index c064620..6dd91bb 100644
--- a/res/drawable-hdpi/ic_settings_notifications.png
+++ b/res/drawable-hdpi/ic_settings_notifications.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_security.png b/res/drawable-hdpi/ic_settings_security.png
index c779437..abbf3fa 100644
--- a/res/drawable-hdpi/ic_settings_security.png
+++ b/res/drawable-hdpi/ic_settings_security.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_sound.png b/res/drawable-hdpi/ic_settings_sound.png
index 8400123..dec290a 100644
--- a/res/drawable-hdpi/ic_settings_sound.png
+++ b/res/drawable-hdpi/ic_settings_sound.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_storage.png b/res/drawable-hdpi/ic_settings_storage.png
index 59c7042..5444eeb 100644
--- a/res/drawable-hdpi/ic_settings_storage.png
+++ b/res/drawable-hdpi/ic_settings_storage.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_sync.png b/res/drawable-hdpi/ic_settings_sync.png
index 333ca53..96254d6 100644
--- a/res/drawable-hdpi/ic_settings_sync.png
+++ b/res/drawable-hdpi/ic_settings_sync.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_settings_wireless.png b/res/drawable-hdpi/ic_settings_wireless.png
index 1f0c444..8a6c8de 100644
--- a/res/drawable-hdpi/ic_settings_wireless.png
+++ b/res/drawable-hdpi/ic_settings_wireless.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_sysbar_quicksettings.png b/res/drawable-hdpi/ic_sysbar_quicksettings.png
index 939a14d..a204936 100644
--- a/res/drawable-hdpi/ic_sysbar_quicksettings.png
+++ b/res/drawable-hdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_unselected_download.png b/res/drawable-hdpi/ic_tab_unselected_download.png
index 39d2938..1e71efb 100644
--- a/res/drawable-hdpi/ic_tab_unselected_download.png
+++ b/res/drawable-hdpi/ic_tab_unselected_download.png
Binary files differ
diff --git a/res/drawable-hdpi/no_ring_detected.png b/res/drawable-hdpi/no_ring_detected.png
deleted file mode 100644
index 2adb7bf..0000000
--- a/res/drawable-hdpi/no_ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ring_detected.png b/res/drawable-hdpi/ring_detected.png
deleted file mode 100644
index 5b1836b..0000000
--- a/res/drawable-hdpi/ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ring_paired.png b/res/drawable-hdpi/ring_paired.png
deleted file mode 100644
index 065e752..0000000
--- a/res/drawable-hdpi/ring_paired.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_settings_applications.png b/res/drawable-ldrtl-hdpi/ic_settings_applications.png
deleted file mode 100644
index 1cb9c8d..0000000
--- a/res/drawable-ldrtl-hdpi/ic_settings_applications.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_settings_language.png b/res/drawable-ldrtl-hdpi/ic_settings_language.png
deleted file mode 100755
index bbd2c1e..0000000
--- a/res/drawable-ldrtl-hdpi/ic_settings_language.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_settings_multiuser.png b/res/drawable-ldrtl-hdpi/ic_settings_multiuser.png
deleted file mode 100644
index 7d6eff9..0000000
--- a/res/drawable-ldrtl-hdpi/ic_settings_multiuser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_settings_applications.png b/res/drawable-ldrtl-mdpi/ic_settings_applications.png
deleted file mode 100644
index 740e709..0000000
--- a/res/drawable-ldrtl-mdpi/ic_settings_applications.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_settings_language.png b/res/drawable-ldrtl-mdpi/ic_settings_language.png
deleted file mode 100644
index bb97a45..0000000
--- a/res/drawable-ldrtl-mdpi/ic_settings_language.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_settings_multiuser.png b/res/drawable-ldrtl-mdpi/ic_settings_multiuser.png
deleted file mode 100644
index f538805..0000000
--- a/res/drawable-ldrtl-mdpi/ic_settings_multiuser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_settings_applications.png b/res/drawable-ldrtl-xhdpi/ic_settings_applications.png
deleted file mode 100644
index fcd6ab1..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_settings_applications.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_settings_language.png b/res/drawable-ldrtl-xhdpi/ic_settings_language.png
deleted file mode 100644
index 3e0f3df..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_settings_language.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_settings_multiuser.png b/res/drawable-ldrtl-xhdpi/ic_settings_multiuser.png
deleted file mode 100644
index a3c797c..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_settings_multiuser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_brightness_auto_holo.png b/res/drawable-mdpi/ic_appwidget_settings_brightness_auto_holo.png
index 8fe0ac4..cee898b 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_brightness_auto_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_brightness_auto_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_brightness_full_holo.png b/res/drawable-mdpi/ic_appwidget_settings_brightness_full_holo.png
index bb98273..d35af9a 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_brightness_full_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_brightness_full_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_brightness_half_holo.png b/res/drawable-mdpi/ic_appwidget_settings_brightness_half_holo.png
index 5ccec31..c794f76 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_brightness_half_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_brightness_half_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_brightness_off_holo.png b/res/drawable-mdpi/ic_appwidget_settings_brightness_off_holo.png
index 72b62e7..cc847ad 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_brightness_off_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_brightness_off_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_sync_on_holo.png b/res/drawable-mdpi/ic_appwidget_settings_sync_on_holo.png
index 35f4558..5570bad 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_sync_on_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_sync_on_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_appwidget_settings_wifi_on_holo.png b/res/drawable-mdpi/ic_appwidget_settings_wifi_on_holo.png
index a008f8a..7acea3a 100644
--- a/res/drawable-mdpi/ic_appwidget_settings_wifi_on_holo.png
+++ b/res/drawable-mdpi/ic_appwidget_settings_wifi_on_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_cellphone.png b/res/drawable-mdpi/ic_bt_cellphone.png
index 2286bb4..1fa0a3d 100644
--- a/res/drawable-mdpi/ic_bt_cellphone.png
+++ b/res/drawable-mdpi/ic_bt_cellphone.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_config.png b/res/drawable-mdpi/ic_bt_config.png
index 7928104..c2d7876 100644
--- a/res/drawable-mdpi/ic_bt_config.png
+++ b/res/drawable-mdpi/ic_bt_config.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_headphones_a2dp.png b/res/drawable-mdpi/ic_bt_headphones_a2dp.png
index 09a811e..175bd78 100644
--- a/res/drawable-mdpi/ic_bt_headphones_a2dp.png
+++ b/res/drawable-mdpi/ic_bt_headphones_a2dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_headset_hfp.png b/res/drawable-mdpi/ic_bt_headset_hfp.png
index 95d776a..05b27e8 100644
--- a/res/drawable-mdpi/ic_bt_headset_hfp.png
+++ b/res/drawable-mdpi/ic_bt_headset_hfp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_imaging.png b/res/drawable-mdpi/ic_bt_imaging.png
index 64bc9f1..76234a6 100644
--- a/res/drawable-mdpi/ic_bt_imaging.png
+++ b/res/drawable-mdpi/ic_bt_imaging.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_laptop.png b/res/drawable-mdpi/ic_bt_laptop.png
index b07a7d0..792e8df 100644
--- a/res/drawable-mdpi/ic_bt_laptop.png
+++ b/res/drawable-mdpi/ic_bt_laptop.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_misc_hid.png b/res/drawable-mdpi/ic_bt_misc_hid.png
index d4a9eda..6e9f8ae 100644
--- a/res/drawable-mdpi/ic_bt_misc_hid.png
+++ b/res/drawable-mdpi/ic_bt_misc_hid.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bt_pointing_hid.png b/res/drawable-mdpi/ic_bt_pointing_hid.png
index cdbb182..539d77f 100644
--- a/res/drawable-mdpi/ic_bt_pointing_hid.png
+++ b/res/drawable-mdpi/ic_bt_pointing_hid.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_lockscreen_ime.png b/res/drawable-mdpi/ic_lockscreen_ime.png
index b27e059..3216776 100644
--- a/res/drawable-mdpi/ic_lockscreen_ime.png
+++ b/res/drawable-mdpi/ic_lockscreen_ime.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_dark.png b/res/drawable-mdpi/ic_menu_add_dark.png
index e6add2b..d7aa774 100644
--- a/res/drawable-mdpi/ic_menu_add_dark.png
+++ b/res/drawable-mdpi/ic_menu_add_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_delete_holo_dark.png b/res/drawable-mdpi/ic_menu_delete_holo_dark.png
index db5e868..b0517ad 100644
--- a/res/drawable-mdpi/ic_menu_delete_holo_dark.png
+++ b/res/drawable-mdpi/ic_menu_delete_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_network_signal_4.png b/res/drawable-mdpi/ic_network_signal_4.png
index a7d0d8b..43cdf26 100644
--- a/res/drawable-mdpi/ic_network_signal_4.png
+++ b/res/drawable-mdpi/ic_network_signal_4.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_about.png b/res/drawable-mdpi/ic_settings_about.png
index b3b61fb..8c5206e 100644
--- a/res/drawable-mdpi/ic_settings_about.png
+++ b/res/drawable-mdpi/ic_settings_about.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_accessibility.png b/res/drawable-mdpi/ic_settings_accessibility.png
old mode 100755
new mode 100644
index ba86d3d..d0229f6
--- a/res/drawable-mdpi/ic_settings_accessibility.png
+++ b/res/drawable-mdpi/ic_settings_accessibility.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_applications.png b/res/drawable-mdpi/ic_settings_applications.png
index 33e23b3..60ebf38 100644
--- a/res/drawable-mdpi/ic_settings_applications.png
+++ b/res/drawable-mdpi/ic_settings_applications.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_backup.png b/res/drawable-mdpi/ic_settings_backup.png
index b012d97..756ccae 100644
--- a/res/drawable-mdpi/ic_settings_backup.png
+++ b/res/drawable-mdpi/ic_settings_backup.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_battery.png b/res/drawable-mdpi/ic_settings_battery.png
index 6c71cc4..cca14ff 100644
--- a/res/drawable-mdpi/ic_settings_battery.png
+++ b/res/drawable-mdpi/ic_settings_battery.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_bluetooth2.png b/res/drawable-mdpi/ic_settings_bluetooth2.png
index b05656f..f556bb4 100644
--- a/res/drawable-mdpi/ic_settings_bluetooth2.png
+++ b/res/drawable-mdpi/ic_settings_bluetooth2.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_date_time.png b/res/drawable-mdpi/ic_settings_date_time.png
index 0833699..80be678 100644
--- a/res/drawable-mdpi/ic_settings_date_time.png
+++ b/res/drawable-mdpi/ic_settings_date_time.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_dock.png b/res/drawable-mdpi/ic_settings_dock.png
index 4120f20..62ccb3c 100644
--- a/res/drawable-mdpi/ic_settings_dock.png
+++ b/res/drawable-mdpi/ic_settings_dock.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_home.png b/res/drawable-mdpi/ic_settings_home.png
index 06d96d9..b18ca3e 100644
--- a/res/drawable-mdpi/ic_settings_home.png
+++ b/res/drawable-mdpi/ic_settings_home.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_language.png b/res/drawable-mdpi/ic_settings_language.png
index af42f4a..a6dba3c 100644
--- a/res/drawable-mdpi/ic_settings_language.png
+++ b/res/drawable-mdpi/ic_settings_language.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_location.png b/res/drawable-mdpi/ic_settings_location.png
index 2853c7f..de70e6f 100644
--- a/res/drawable-mdpi/ic_settings_location.png
+++ b/res/drawable-mdpi/ic_settings_location.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_multiuser.png b/res/drawable-mdpi/ic_settings_multiuser.png
index e1ff083..d6f8501 100644
--- a/res/drawable-mdpi/ic_settings_multiuser.png
+++ b/res/drawable-mdpi/ic_settings_multiuser.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_notifications.png b/res/drawable-mdpi/ic_settings_notifications.png
index 35e23e3..407ec8c 100644
--- a/res/drawable-mdpi/ic_settings_notifications.png
+++ b/res/drawable-mdpi/ic_settings_notifications.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_security.png b/res/drawable-mdpi/ic_settings_security.png
index 98ba690..cd65dd2 100644
--- a/res/drawable-mdpi/ic_settings_security.png
+++ b/res/drawable-mdpi/ic_settings_security.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_sound.png b/res/drawable-mdpi/ic_settings_sound.png
index 2db9413..17b2cc4 100644
--- a/res/drawable-mdpi/ic_settings_sound.png
+++ b/res/drawable-mdpi/ic_settings_sound.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_storage.png b/res/drawable-mdpi/ic_settings_storage.png
index d44f91a..ff6af99 100644
--- a/res/drawable-mdpi/ic_settings_storage.png
+++ b/res/drawable-mdpi/ic_settings_storage.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_sync.png b/res/drawable-mdpi/ic_settings_sync.png
index 5570bad..fbd03ba 100644
--- a/res/drawable-mdpi/ic_settings_sync.png
+++ b/res/drawable-mdpi/ic_settings_sync.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_settings_wireless.png b/res/drawable-mdpi/ic_settings_wireless.png
index 7acea3a..8ddaa6a 100644
--- a/res/drawable-mdpi/ic_settings_wireless.png
+++ b/res/drawable-mdpi/ic_settings_wireless.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_sysbar_quicksettings.png b/res/drawable-mdpi/ic_sysbar_quicksettings.png
index c2d7876..d266b39 100644
--- a/res/drawable-mdpi/ic_sysbar_quicksettings.png
+++ b/res/drawable-mdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_unselected_download.png b/res/drawable-mdpi/ic_tab_unselected_download.png
index 6d9faf1..59930fe 100644
--- a/res/drawable-mdpi/ic_tab_unselected_download.png
+++ b/res/drawable-mdpi/ic_tab_unselected_download.png
Binary files differ
diff --git a/res/drawable-mdpi/no_ring_detected.png b/res/drawable-mdpi/no_ring_detected.png
deleted file mode 100644
index 6d53477..0000000
--- a/res/drawable-mdpi/no_ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ring_detected.png b/res/drawable-mdpi/ring_detected.png
deleted file mode 100644
index 9dc0e9f..0000000
--- a/res/drawable-mdpi/ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ring_paired.png b/res/drawable-mdpi/ring_paired.png
deleted file mode 100644
index 70c8541..0000000
--- a/res/drawable-mdpi/ring_paired.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_brightness_auto_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_brightness_auto_holo.png
index 16d8fe3..d03e040 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_brightness_auto_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_brightness_auto_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_brightness_full_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_brightness_full_holo.png
index f4dee45..9265a76 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_brightness_full_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_brightness_full_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_brightness_half_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_brightness_half_holo.png
index cec10f7..be367f3 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_brightness_half_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_brightness_half_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_brightness_off_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_brightness_off_holo.png
index 64117df..3682c67 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_brightness_off_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_brightness_off_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_sync_on_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_sync_on_holo.png
index 9a7ea50..28cb714 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_sync_on_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_sync_on_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_appwidget_settings_wifi_on_holo.png b/res/drawable-xhdpi/ic_appwidget_settings_wifi_on_holo.png
index 9651f2b..dded3fd 100644
--- a/res/drawable-xhdpi/ic_appwidget_settings_wifi_on_holo.png
+++ b/res/drawable-xhdpi/ic_appwidget_settings_wifi_on_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_cellphone.png b/res/drawable-xhdpi/ic_bt_cellphone.png
index cd9ff60..4f381ba 100644
--- a/res/drawable-xhdpi/ic_bt_cellphone.png
+++ b/res/drawable-xhdpi/ic_bt_cellphone.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_config.png b/res/drawable-xhdpi/ic_bt_config.png
index 6754469..6fec792 100644
--- a/res/drawable-xhdpi/ic_bt_config.png
+++ b/res/drawable-xhdpi/ic_bt_config.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_headphones_a2dp.png b/res/drawable-xhdpi/ic_bt_headphones_a2dp.png
index 82fdf72..c67127d 100644
--- a/res/drawable-xhdpi/ic_bt_headphones_a2dp.png
+++ b/res/drawable-xhdpi/ic_bt_headphones_a2dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_headset_hfp.png b/res/drawable-xhdpi/ic_bt_headset_hfp.png
index 8793a31..d3b356b 100644
--- a/res/drawable-xhdpi/ic_bt_headset_hfp.png
+++ b/res/drawable-xhdpi/ic_bt_headset_hfp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_imaging.png b/res/drawable-xhdpi/ic_bt_imaging.png
index 5b0da65..9ea3b85 100644
--- a/res/drawable-xhdpi/ic_bt_imaging.png
+++ b/res/drawable-xhdpi/ic_bt_imaging.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_laptop.png b/res/drawable-xhdpi/ic_bt_laptop.png
index 25124bf..1c053c8 100644
--- a/res/drawable-xhdpi/ic_bt_laptop.png
+++ b/res/drawable-xhdpi/ic_bt_laptop.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_misc_hid.png b/res/drawable-xhdpi/ic_bt_misc_hid.png
index 06dfe48..2d38129 100644
--- a/res/drawable-xhdpi/ic_bt_misc_hid.png
+++ b/res/drawable-xhdpi/ic_bt_misc_hid.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bt_pointing_hid.png b/res/drawable-xhdpi/ic_bt_pointing_hid.png
index 7a724b0..d8b68eb 100644
--- a/res/drawable-xhdpi/ic_bt_pointing_hid.png
+++ b/res/drawable-xhdpi/ic_bt_pointing_hid.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_lockscreen_ime.png b/res/drawable-xhdpi/ic_lockscreen_ime.png
index a40ddeb..02cc3af 100644
--- a/res/drawable-xhdpi/ic_lockscreen_ime.png
+++ b/res/drawable-xhdpi/ic_lockscreen_ime.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_dark.png b/res/drawable-xhdpi/ic_menu_add_dark.png
index 6e2e18a..2f00b96 100644
--- a/res/drawable-xhdpi/ic_menu_add_dark.png
+++ b/res/drawable-xhdpi/ic_menu_add_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_delete_holo_dark.png b/res/drawable-xhdpi/ic_menu_delete_holo_dark.png
index 9c31231..33010c6 100644
--- a/res/drawable-xhdpi/ic_menu_delete_holo_dark.png
+++ b/res/drawable-xhdpi/ic_menu_delete_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_network_signal_4.png b/res/drawable-xhdpi/ic_network_signal_4.png
index 5e2b009..304108f 100644
--- a/res/drawable-xhdpi/ic_network_signal_4.png
+++ b/res/drawable-xhdpi/ic_network_signal_4.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_about.png b/res/drawable-xhdpi/ic_settings_about.png
index 84c3cd1..188b362 100644
--- a/res/drawable-xhdpi/ic_settings_about.png
+++ b/res/drawable-xhdpi/ic_settings_about.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_accessibility.png b/res/drawable-xhdpi/ic_settings_accessibility.png
index 2fec7a3..297a08b 100644
--- a/res/drawable-xhdpi/ic_settings_accessibility.png
+++ b/res/drawable-xhdpi/ic_settings_accessibility.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_applications.png b/res/drawable-xhdpi/ic_settings_applications.png
index 8eda83f..f8122ba 100644
--- a/res/drawable-xhdpi/ic_settings_applications.png
+++ b/res/drawable-xhdpi/ic_settings_applications.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_backup.png b/res/drawable-xhdpi/ic_settings_backup.png
index 5ebb9fc..2a5b0d4 100644
--- a/res/drawable-xhdpi/ic_settings_backup.png
+++ b/res/drawable-xhdpi/ic_settings_backup.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_battery.png b/res/drawable-xhdpi/ic_settings_battery.png
index f7aa7a4..78f8a3f 100644
--- a/res/drawable-xhdpi/ic_settings_battery.png
+++ b/res/drawable-xhdpi/ic_settings_battery.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_bluetooth2.png b/res/drawable-xhdpi/ic_settings_bluetooth2.png
index 80a94ac..3767382 100644
--- a/res/drawable-xhdpi/ic_settings_bluetooth2.png
+++ b/res/drawable-xhdpi/ic_settings_bluetooth2.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_date_time.png b/res/drawable-xhdpi/ic_settings_date_time.png
index a8ddced..8a40de8 100644
--- a/res/drawable-xhdpi/ic_settings_date_time.png
+++ b/res/drawable-xhdpi/ic_settings_date_time.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_dock.png b/res/drawable-xhdpi/ic_settings_dock.png
index 578c81f..e7eb120 100644
--- a/res/drawable-xhdpi/ic_settings_dock.png
+++ b/res/drawable-xhdpi/ic_settings_dock.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_home.png b/res/drawable-xhdpi/ic_settings_home.png
index 837ec65..3cb118d 100644
--- a/res/drawable-xhdpi/ic_settings_home.png
+++ b/res/drawable-xhdpi/ic_settings_home.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_language.png b/res/drawable-xhdpi/ic_settings_language.png
index cdc1e1e..24a1d3c 100644
--- a/res/drawable-xhdpi/ic_settings_language.png
+++ b/res/drawable-xhdpi/ic_settings_language.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_location.png b/res/drawable-xhdpi/ic_settings_location.png
index 5059c3f..cd2e7b5 100644
--- a/res/drawable-xhdpi/ic_settings_location.png
+++ b/res/drawable-xhdpi/ic_settings_location.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_multiuser.png b/res/drawable-xhdpi/ic_settings_multiuser.png
index b85ddf3..e1b3932 100644
--- a/res/drawable-xhdpi/ic_settings_multiuser.png
+++ b/res/drawable-xhdpi/ic_settings_multiuser.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_notifications.png b/res/drawable-xhdpi/ic_settings_notifications.png
index da0d626..a67930e 100644
--- a/res/drawable-xhdpi/ic_settings_notifications.png
+++ b/res/drawable-xhdpi/ic_settings_notifications.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_security.png b/res/drawable-xhdpi/ic_settings_security.png
index 61947ea..5ead24e 100644
--- a/res/drawable-xhdpi/ic_settings_security.png
+++ b/res/drawable-xhdpi/ic_settings_security.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_sound.png b/res/drawable-xhdpi/ic_settings_sound.png
index 29cd34c..644e593 100644
--- a/res/drawable-xhdpi/ic_settings_sound.png
+++ b/res/drawable-xhdpi/ic_settings_sound.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_storage.png b/res/drawable-xhdpi/ic_settings_storage.png
index 0807c9f..51ded7e 100644
--- a/res/drawable-xhdpi/ic_settings_storage.png
+++ b/res/drawable-xhdpi/ic_settings_storage.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_sync.png b/res/drawable-xhdpi/ic_settings_sync.png
index 28cb714..50f3bf8 100644
--- a/res/drawable-xhdpi/ic_settings_sync.png
+++ b/res/drawable-xhdpi/ic_settings_sync.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_wireless.png b/res/drawable-xhdpi/ic_settings_wireless.png
index dded3fd..cc0fe15 100644
--- a/res/drawable-xhdpi/ic_settings_wireless.png
+++ b/res/drawable-xhdpi/ic_settings_wireless.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_sysbar_quicksettings.png b/res/drawable-xhdpi/ic_sysbar_quicksettings.png
index 6fec792..46077be 100644
--- a/res/drawable-xhdpi/ic_sysbar_quicksettings.png
+++ b/res/drawable-xhdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_unselected_download.png b/res/drawable-xhdpi/ic_tab_unselected_download.png
index 8e76bbb..e8084c2 100644
--- a/res/drawable-xhdpi/ic_tab_unselected_download.png
+++ b/res/drawable-xhdpi/ic_tab_unselected_download.png
Binary files differ
diff --git a/res/drawable-xhdpi/no_ring_detected.png b/res/drawable-xhdpi/no_ring_detected.png
deleted file mode 100644
index a657afa..0000000
--- a/res/drawable-xhdpi/no_ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ring_detected.png b/res/drawable-xhdpi/ring_detected.png
deleted file mode 100644
index a6180b2..0000000
--- a/res/drawable-xhdpi/ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ring_paired.png b/res/drawable-xhdpi/ring_paired.png
deleted file mode 100644
index df77918..0000000
--- a/res/drawable-xhdpi/ring_paired.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_auto_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_auto_holo.png
index bb352cd..54eba96 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_auto_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_auto_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_full_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_full_holo.png
index e5ab2a0..8f739aa 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_full_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_full_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_half_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_half_holo.png
index 0965b13..a16ee17 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_half_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_half_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_off_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_off_holo.png
index cb7c88a..e546f31 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_brightness_off_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_brightness_off_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_sync_on_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_sync_on_holo.png
index 88eb54b..498d9ad 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_sync_on_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_sync_on_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_appwidget_settings_wifi_on_holo.png b/res/drawable-xxhdpi/ic_appwidget_settings_wifi_on_holo.png
index a8b4772..0f8d454 100644
--- a/res/drawable-xxhdpi/ic_appwidget_settings_wifi_on_holo.png
+++ b/res/drawable-xxhdpi/ic_appwidget_settings_wifi_on_holo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_cellphone.png b/res/drawable-xxhdpi/ic_bt_cellphone.png
index 3c546e5..7805b7a 100644
--- a/res/drawable-xxhdpi/ic_bt_cellphone.png
+++ b/res/drawable-xxhdpi/ic_bt_cellphone.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_config.png b/res/drawable-xxhdpi/ic_bt_config.png
new file mode 100644
index 0000000..fc3600e
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_bt_config.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png b/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png
index a9edd47..8127774 100644
--- a/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png
+++ b/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_headset_hfp.png b/res/drawable-xxhdpi/ic_bt_headset_hfp.png
index a4c98e7..84b8085 100644
--- a/res/drawable-xxhdpi/ic_bt_headset_hfp.png
+++ b/res/drawable-xxhdpi/ic_bt_headset_hfp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_imaging.png b/res/drawable-xxhdpi/ic_bt_imaging.png
index 9470510..a0058dc 100644
--- a/res/drawable-xxhdpi/ic_bt_imaging.png
+++ b/res/drawable-xxhdpi/ic_bt_imaging.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_laptop.png b/res/drawable-xxhdpi/ic_bt_laptop.png
index 04c3995..bca7145 100644
--- a/res/drawable-xxhdpi/ic_bt_laptop.png
+++ b/res/drawable-xxhdpi/ic_bt_laptop.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_misc_hid.png b/res/drawable-xxhdpi/ic_bt_misc_hid.png
index c78ca2b..289d6ac 100644
--- a/res/drawable-xxhdpi/ic_bt_misc_hid.png
+++ b/res/drawable-xxhdpi/ic_bt_misc_hid.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_bt_pointing_hid.png b/res/drawable-xxhdpi/ic_bt_pointing_hid.png
index 49f14d0..e31ce2b 100644
--- a/res/drawable-xxhdpi/ic_bt_pointing_hid.png
+++ b/res/drawable-xxhdpi/ic_bt_pointing_hid.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_lockscreen_ime.png b/res/drawable-xxhdpi/ic_lockscreen_ime.png
new file mode 100644
index 0000000..f23b0e7
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_lockscreen_ime.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_add_dark.png b/res/drawable-xxhdpi/ic_menu_add_dark.png
index 5b4923f..0ab6a40 100644
--- a/res/drawable-xxhdpi/ic_menu_add_dark.png
+++ b/res/drawable-xxhdpi/ic_menu_add_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_delete_holo_dark.png b/res/drawable-xxhdpi/ic_menu_delete_holo_dark.png
new file mode 100644
index 0000000..6171b5a
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_menu_delete_holo_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_network_signal_4.png b/res/drawable-xxhdpi/ic_network_signal_4.png
new file mode 100644
index 0000000..dafe7c4
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_network_signal_4.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_about.png b/res/drawable-xxhdpi/ic_settings_about.png
index 924d962..ae91bad 100644
--- a/res/drawable-xxhdpi/ic_settings_about.png
+++ b/res/drawable-xxhdpi/ic_settings_about.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_accessibility.png b/res/drawable-xxhdpi/ic_settings_accessibility.png
new file mode 100644
index 0000000..08ee9c4
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_accessibility.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_applications.png b/res/drawable-xxhdpi/ic_settings_applications.png
new file mode 100644
index 0000000..db8c9c4
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_applications.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_backup.png b/res/drawable-xxhdpi/ic_settings_backup.png
new file mode 100644
index 0000000..2edc43c
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_backup.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_battery.png b/res/drawable-xxhdpi/ic_settings_battery.png
new file mode 100644
index 0000000..0396687
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_battery.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_bluetooth2.png b/res/drawable-xxhdpi/ic_settings_bluetooth2.png
new file mode 100644
index 0000000..ad5e802
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_bluetooth2.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_date_time.png b/res/drawable-xxhdpi/ic_settings_date_time.png
index 4808605..dd13084 100644
--- a/res/drawable-xxhdpi/ic_settings_date_time.png
+++ b/res/drawable-xxhdpi/ic_settings_date_time.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_dock.png b/res/drawable-xxhdpi/ic_settings_dock.png
index 9151116..24f2351 100644
--- a/res/drawable-xxhdpi/ic_settings_dock.png
+++ b/res/drawable-xxhdpi/ic_settings_dock.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_home.png b/res/drawable-xxhdpi/ic_settings_home.png
index 1a01637..5a7e813 100644
--- a/res/drawable-xxhdpi/ic_settings_home.png
+++ b/res/drawable-xxhdpi/ic_settings_home.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_language.png b/res/drawable-xxhdpi/ic_settings_language.png
index 787be2a..2303abe 100644
--- a/res/drawable-xxhdpi/ic_settings_language.png
+++ b/res/drawable-xxhdpi/ic_settings_language.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_location.png b/res/drawable-xxhdpi/ic_settings_location.png
index ed455b4..3fe4b9d 100644
--- a/res/drawable-xxhdpi/ic_settings_location.png
+++ b/res/drawable-xxhdpi/ic_settings_location.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_multiuser.png b/res/drawable-xxhdpi/ic_settings_multiuser.png
index 32d55c3..b5155d7 100644
--- a/res/drawable-xxhdpi/ic_settings_multiuser.png
+++ b/res/drawable-xxhdpi/ic_settings_multiuser.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_notifications.png b/res/drawable-xxhdpi/ic_settings_notifications.png
index 10a129c..3f0e063 100644
--- a/res/drawable-xxhdpi/ic_settings_notifications.png
+++ b/res/drawable-xxhdpi/ic_settings_notifications.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_security.png b/res/drawable-xxhdpi/ic_settings_security.png
index 0b563b1..0c317aa 100644
--- a/res/drawable-xxhdpi/ic_settings_security.png
+++ b/res/drawable-xxhdpi/ic_settings_security.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_sound.png b/res/drawable-xxhdpi/ic_settings_sound.png
index 8748833..5283caf 100644
--- a/res/drawable-xxhdpi/ic_settings_sound.png
+++ b/res/drawable-xxhdpi/ic_settings_sound.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_storage.png b/res/drawable-xxhdpi/ic_settings_storage.png
new file mode 100644
index 0000000..45c42a7
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_settings_storage.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_sync.png b/res/drawable-xxhdpi/ic_settings_sync.png
index 498d9ad..2a09495 100644
--- a/res/drawable-xxhdpi/ic_settings_sync.png
+++ b/res/drawable-xxhdpi/ic_settings_sync.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_settings_wireless.png b/res/drawable-xxhdpi/ic_settings_wireless.png
index 0f8d454..f225145 100644
--- a/res/drawable-xxhdpi/ic_settings_wireless.png
+++ b/res/drawable-xxhdpi/ic_settings_wireless.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_sysbar_quicksettings.png b/res/drawable-xxhdpi/ic_sysbar_quicksettings.png
index fc3600e..ad964b4 100644
--- a/res/drawable-xxhdpi/ic_sysbar_quicksettings.png
+++ b/res/drawable-xxhdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_tab_unselected_download.png b/res/drawable-xxhdpi/ic_tab_unselected_download.png
new file mode 100644
index 0000000..7030f3e
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_tab_unselected_download.png
Binary files differ
diff --git a/res/drawable-xxhdpi/no_ring_detected.png b/res/drawable-xxhdpi/no_ring_detected.png
deleted file mode 100644
index a56d6b7..0000000
--- a/res/drawable-xxhdpi/no_ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ring_detected.png b/res/drawable-xxhdpi/ring_detected.png
deleted file mode 100644
index b225740..0000000
--- a/res/drawable-xxhdpi/ring_detected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ring_paired.png b/res/drawable-xxhdpi/ring_paired.png
deleted file mode 100644
index c90233b..0000000
--- a/res/drawable-xxhdpi/ring_paired.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_auto_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_auto_holo.png
new file mode 100644
index 0000000..5e0d7f8
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_auto_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_full_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_full_holo.png
new file mode 100644
index 0000000..bcbd4cf
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_full_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_half_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_half_holo.png
new file mode 100644
index 0000000..4f6933d
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_half_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_off_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_off_holo.png
new file mode 100644
index 0000000..35dc60a
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_brightness_off_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_sync_on_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_sync_on_holo.png
new file mode 100644
index 0000000..ab90906
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_sync_on_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_appwidget_settings_wifi_on_holo.png b/res/drawable-xxxhdpi/ic_appwidget_settings_wifi_on_holo.png
new file mode 100644
index 0000000..71ca89b
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_appwidget_settings_wifi_on_holo.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_cellphone.png b/res/drawable-xxxhdpi/ic_bt_cellphone.png
new file mode 100644
index 0000000..1e12f96
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_cellphone.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_config.png b/res/drawable-xxxhdpi/ic_bt_config.png
new file mode 100644
index 0000000..bbefb4a
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_config.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png b/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png
new file mode 100644
index 0000000..8b547d9
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_headset_hfp.png b/res/drawable-xxxhdpi/ic_bt_headset_hfp.png
new file mode 100644
index 0000000..03c5033
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_headset_hfp.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_imaging.png b/res/drawable-xxxhdpi/ic_bt_imaging.png
new file mode 100644
index 0000000..f0ffb52
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_imaging.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_laptop.png b/res/drawable-xxxhdpi/ic_bt_laptop.png
new file mode 100644
index 0000000..2d758bd
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_laptop.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_misc_hid.png b/res/drawable-xxxhdpi/ic_bt_misc_hid.png
new file mode 100644
index 0000000..b9a9923
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_misc_hid.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_network_pan.png b/res/drawable-xxxhdpi/ic_bt_network_pan.png
new file mode 100644
index 0000000..989e1ab
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_network_pan.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_bt_pointing_hid.png b/res/drawable-xxxhdpi/ic_bt_pointing_hid.png
new file mode 100644
index 0000000..de8c389
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_bt_pointing_hid.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_item_delete.png b/res/drawable-xxxhdpi/ic_item_delete.png
new file mode 100644
index 0000000..00d9b71
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_item_delete.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_lockscreen_ime.png b/res/drawable-xxxhdpi/ic_lockscreen_ime.png
new file mode 100644
index 0000000..2eb8a92
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_lockscreen_ime.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_menu_add_dark.png b/res/drawable-xxxhdpi/ic_menu_add_dark.png
new file mode 100644
index 0000000..01f53fe
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_menu_add_dark.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_menu_delete_holo_dark.png b/res/drawable-xxxhdpi/ic_menu_delete_holo_dark.png
new file mode 100644
index 0000000..e380101
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_menu_delete_holo_dark.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_network_signal_4.png b/res/drawable-xxxhdpi/ic_network_signal_4.png
new file mode 100644
index 0000000..622cc4c
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_network_signal_4.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_about.png b/res/drawable-xxxhdpi/ic_settings_about.png
new file mode 100644
index 0000000..b39842f
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_about.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_accessibility.png b/res/drawable-xxxhdpi/ic_settings_accessibility.png
new file mode 100644
index 0000000..d289f02
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_accessibility.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_applications.png b/res/drawable-xxxhdpi/ic_settings_applications.png
new file mode 100644
index 0000000..07f5785
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_applications.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_backup.png b/res/drawable-xxxhdpi/ic_settings_backup.png
new file mode 100644
index 0000000..f3ab021
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_backup.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_battery.png b/res/drawable-xxxhdpi/ic_settings_battery.png
new file mode 100644
index 0000000..06edb91
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_battery.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_bluetooth2.png b/res/drawable-xxxhdpi/ic_settings_bluetooth2.png
new file mode 100644
index 0000000..d354eb6
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_bluetooth2.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_data_usage.png b/res/drawable-xxxhdpi/ic_settings_data_usage.png
new file mode 100644
index 0000000..45922f9
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_data_usage.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_date_time.png b/res/drawable-xxxhdpi/ic_settings_date_time.png
new file mode 100644
index 0000000..736bb3f
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_date_time.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_display.png b/res/drawable-xxxhdpi/ic_settings_display.png
new file mode 100644
index 0000000..169c94f
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_display.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_dock.png b/res/drawable-xxxhdpi/ic_settings_dock.png
new file mode 100644
index 0000000..56aac4b
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_dock.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_home.png b/res/drawable-xxxhdpi/ic_settings_home.png
new file mode 100644
index 0000000..5d37a94
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_home.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_language.png b/res/drawable-xxxhdpi/ic_settings_language.png
new file mode 100644
index 0000000..04f0f8d
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_language.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_location.png b/res/drawable-xxxhdpi/ic_settings_location.png
new file mode 100644
index 0000000..67f5bad
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_location.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_multiuser.png b/res/drawable-xxxhdpi/ic_settings_multiuser.png
new file mode 100644
index 0000000..aad5c64
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_multiuser.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_notifications.png b/res/drawable-xxxhdpi/ic_settings_notifications.png
new file mode 100644
index 0000000..1619240
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_notifications.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_security.png b/res/drawable-xxxhdpi/ic_settings_security.png
new file mode 100644
index 0000000..9a3959b
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_security.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_sound.png b/res/drawable-xxxhdpi/ic_settings_sound.png
new file mode 100644
index 0000000..15352de
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_sound.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_storage.png b/res/drawable-xxxhdpi/ic_settings_storage.png
new file mode 100644
index 0000000..be02ffb
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_storage.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_sync.png b/res/drawable-xxxhdpi/ic_settings_sync.png
new file mode 100644
index 0000000..7a741a7
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_sync.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_settings_wireless.png b/res/drawable-xxxhdpi/ic_settings_wireless.png
new file mode 100644
index 0000000..9f137be
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_settings_wireless.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_sysbar_quicksettings.png b/res/drawable-xxxhdpi/ic_sysbar_quicksettings.png
new file mode 100644
index 0000000..e89d484
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_tab_selected_download.png b/res/drawable-xxxhdpi/ic_tab_selected_download.png
new file mode 100644
index 0000000..a024704
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_tab_selected_download.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_tab_selected_running.png b/res/drawable-xxxhdpi/ic_tab_selected_running.png
new file mode 100644
index 0000000..f7a329f
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_tab_selected_running.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_tab_unselected_download.png b/res/drawable-xxxhdpi/ic_tab_unselected_download.png
new file mode 100644
index 0000000..1aa5f2e
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_tab_unselected_download.png
Binary files differ
diff --git a/res/drawable/dashboard_tile_background.xml b/res/drawable/dashboard_tile_background.xml
index 55cb4c9..92b6f42 100644
--- a/res/drawable/dashboard_tile_background.xml
+++ b/res/drawable/dashboard_tile_background.xml
@@ -14,10 +14,10 @@
limitations under the License.
-->
-<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="?android:attr/colorButtonPressed">
<item>
<color android:color="@android:color/white" />
</item>
-</touch-feedback>
+</ripple>
diff --git a/res/drawable/preference_highlight.xml b/res/drawable/preference_highlight.xml
index 0b704f7..615a360 100644
--- a/res/drawable/preference_highlight.xml
+++ b/res/drawable/preference_highlight.xml
@@ -14,10 +14,10 @@
limitations under the License.
-->
-<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="?android:attr/colorButtonPressed"
android:pinned="true">
<item android:id="@android:id/mask"
android:drawable="@android:color/white" />
-</touch-feedback>
+</ripple>
diff --git a/res/layout-land/crypt_keeper_pattern_entry.xml b/res/layout-land/crypt_keeper_pattern_entry.xml
new file mode 100644
index 0000000..d3d987d
--- /dev/null
+++ b/res/layout-land/crypt_keeper_pattern_entry.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, The Android Open Source 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.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+>
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ >
+ <include layout="@layout/crypt_keeper_status" />
+
+ <!-- Emergency call button.
+ Text and icon are set by CryptKeeper.updateEmergencyCallButtonState() -->
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="16dip"
+ style="@*android:style/Widget.Button.Transparent"
+ android:textSize="14sp"
+ android:drawablePadding="6dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="8dip"
+ android:layout_marginEnd="8dip"
+ android:orientation="horizontal"
+ >
+ <include layout="@layout/crypt_keeper_pattern_field" />
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout/activity_nfc_pairing.xml b/res/layout/activity_nfc_pairing.xml
deleted file mode 100644
index c753fd0..0000000
--- a/res/layout/activity_nfc_pairing.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- Copyright (C) 2013 The Android Open Source 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center_vertical">
-
- <ImageView
- android:id="@+id/status_image"
- android:src="@drawable/no_ring_detected"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="bottom"
- android:scaleType="center"/>
-
- <TextView
- android:id="@+id/status_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="top"
- android:textSize="24sp"
- android:textAlignment="center"
- android:paddingTop="16dp"
- android:paddingLeft="20dp"
- android:paddingRight="20dp"/>
-
-</LinearLayout>
diff --git a/res/layout/dashboard.xml b/res/layout/dashboard.xml
index 116580a..c6c7292 100644
--- a/res/layout/dashboard.xml
+++ b/res/layout/dashboard.xml
@@ -18,8 +18,8 @@
android:id="@+id/dashboard"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingStart="12dp"
- android:paddingEnd="12dp"
+ android:paddingStart="@*android:dimen/preference_fragment_padding_side"
+ android:paddingEnd="@*android:dimen/preference_fragment_padding_side"
android:scrollbarStyle="outsideOverlay"
android:background="@color/dashboard_background_color">
@@ -27,6 +27,7 @@
android:id="@+id/dashboard_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:paddingBottom="12dp"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
/>
diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml
index 8abbee2..1099dda 100644
--- a/res/layout/dashboard_category.xml
+++ b/res/layout/dashboard_category.xml
@@ -22,10 +22,11 @@
<TextView android:id="@+id/category_title"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/dashboard_category_title_height"
android:singleLine="true"
android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center_vertical"
+ android:textAppearance="@style/TextAppearance.Small"
android:textAlignment="viewStart"
/>
diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml
index 7b61d17..2a811b2 100644
--- a/res/layout/dashboard_tile.xml
+++ b/res/layout/dashboard_tile.xml
@@ -39,7 +39,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="@style/TextAppearance.Medium"
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
@@ -48,7 +48,7 @@
android:layout_height="wrap_content"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textAppearance="@style/TextAppearance.Small"
android:textColor="?android:attr/textColorSecondary"
/>
diff --git a/res/layout/nfc_payment_option.xml b/res/layout/nfc_payment_option.xml
index 04fdc07..76fea4f 100644
--- a/res/layout/nfc_payment_option.xml
+++ b/res/layout/nfc_payment_option.xml
@@ -19,7 +19,7 @@
android:layout_weight="1"
android:id="@+id/nfc_payment_pref"
android:focusable="true"
- android:clickable="true"
+ android:clickable="false"
android:gravity="center_vertical"
android:paddingTop="10dp"
android:paddingBottom="10dp"
@@ -37,6 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="96dp"
android:scaleType="centerInside"
+ android:clickable="true"
/>
</FrameLayout>
<RadioButton
@@ -46,6 +47,6 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:duplicateParentState="true"
- android:clickable="false"
+ android:clickable="true"
android:focusable="false" />
</RelativeLayout>
diff --git a/res/layout/notification_app.xml b/res/layout/notification_app.xml
index 414165a..8f5f8e6 100644
--- a/res/layout/notification_app.xml
+++ b/res/layout/notification_app.xml
@@ -31,27 +31,7 @@
android:layout_height="@dimen/notification_app_icon_size"
android:layout_centerVertical="true"
android:contentDescription="@null"
- android:scaleType="center" />
-
- <ImageView
- android:id="@android:id/icon1"
- android:layout_width="@dimen/notification_app_icon_badge_size"
- android:layout_height="@dimen/notification_app_icon_badge_size"
- android:layout_marginLeft="@dimen/notification_app_icon_badge_margin"
- android:layout_marginTop="@dimen/notification_app_icon_badge_margin"
- android:background="#bb8b0000"
- android:contentDescription="@null" />
-
- <ImageView
- android:id="@android:id/icon2"
- android:layout_width="@dimen/notification_app_icon_badge_size"
- android:layout_height="@dimen/notification_app_icon_badge_size"
- android:layout_alignBottom="@android:id/icon"
- android:layout_alignEnd="@android:id/icon"
- android:layout_marginBottom="@dimen/notification_app_icon_badge_margin"
- android:layout_marginEnd="@dimen/notification_app_icon_badge_margin"
- android:background="#bb006400"
- android:contentDescription="@null" />
+ android:padding="8dp" />
<TextView
android:id="@android:id/title"
@@ -63,6 +43,18 @@
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_app_icon_size"
+ android:layout_toEndOf="@android:id/icon"
+ android:gravity="bottom"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:textAlignment="viewStart"
+ android:textColor="#888"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
<View
diff --git a/res/layout/notification_app_dialog.xml b/res/layout/notification_app_dialog.xml
index a8f7880..bbd4846 100644
--- a/res/layout/notification_app_dialog.xml
+++ b/res/layout/notification_app_dialog.xml
@@ -19,10 +19,10 @@
<ImageView
android:id="@android:id/icon"
+ android:padding="8dp"
android:layout_width="@dimen/notification_app_icon_size"
android:layout_height="@dimen/notification_app_icon_size"
- android:contentDescription="@null"
- android:scaleType="center" />
+ android:contentDescription="@null" />
<TextView
android:id="@android:id/title"
@@ -44,4 +44,22 @@
android:text="@string/app_notifications_dialog_show"
android:textAppearance="?android:attr/textAppearanceListItem" />
+ <CheckBox
+ android:id="@android:id/button2"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_app_icon_size"
+ android:layout_below="@android:id/button1"
+ android:layout_marginStart="@dimen/content_margin_left"
+ android:text="@string/app_notifications_dialog_priority"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
+ <CheckBox
+ android:id="@android:id/button3"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_app_icon_size"
+ android:layout_below="@android:id/button2"
+ android:layout_marginStart="@dimen/content_margin_left"
+ android:text="@string/app_notifications_dialog_visibility"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/search_panel.xml b/res/layout/search_panel.xml
index 22f2b52..8837bc9 100644
--- a/res/layout/search_panel.xml
+++ b/res/layout/search_panel.xml
@@ -17,7 +17,10 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dashboard"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:paddingStart="@*android:dimen/preference_fragment_padding_side"
+ android:paddingEnd="@*android:dimen/preference_fragment_padding_side"
+ android:background="@color/dashboard_background_color">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -31,23 +34,19 @@
android:orientation="vertical">
<TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/dashboard_category_title_height"
android:singleLine="true"
android:ellipsize="marquee"
- android:fadingEdge="horizontal"
+ android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/search_recents_queries_label"/>
+ android:textAlignment="viewStart"
+ android:text="@string/search_recents_queries_label"
+ />
<ListView android:id="@+id/list_suggestions"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <ImageView android:src="?android:attr/dividerHorizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:paddingBottom="2dp"
- android:paddingTop="2dp" />
+ android:layout_height="match_parent"
+ />
</LinearLayout>
@@ -56,15 +55,17 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
- android:layout_weight="1" >
+ android:layout_weight="1">
<TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/dashboard_category_title_height"
android:singleLine="true"
android:ellipsize="marquee"
- android:fadingEdge="horizontal"
+ android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/search_results_label"/>
+ android:textAlignment="viewStart"
+ android:text="@string/search_results_label"
+ />
<ListView android:id="@+id/list_results"
android:layout_width="match_parent"
diff --git a/res/layout/search_suggestion_item.xml b/res/layout/search_suggestion_item.xml
index c099892..49df3ca 100644
--- a/res/layout/search_suggestion_item.xml
+++ b/res/layout/search_suggestion_item.xml
@@ -22,41 +22,14 @@
android:paddingStart="@*android:dimen/preference_item_padding_side"
android:paddingEnd="?android:attr/scrollbarSize">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center"
- android:minWidth="@*android:dimen/preference_icon_minWidth"
- android:orientation="horizontal">
-
- <ImageView
- android:id="@+id/icon"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:layout_gravity="center"
- android:minWidth="48dp"
- android:scaleType="centerInside"
- android:layout_marginEnd="@*android:dimen/preference_item_padding_inner"
- />
-
- </LinearLayout>
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingEnd="@*android:dimen/preference_item_padding_inner"
- android:paddingTop="6dip"
- android:paddingBottom="6dip">
-
- <TextView android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:ellipsize="marquee"
- android:fadingEdge="horizontal" />
-
- </RelativeLayout>
+ <TextView android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingStart="@*android:dimen/preference_item_padding_inner"
+ android:paddingEnd="@*android:dimen/preference_item_padding_inner"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
</LinearLayout>
diff --git a/res/layout/settings_main.xml b/res/layout/settings_main.xml
index b4be3bf..740932d 100644
--- a/res/layout/settings_main.xml
+++ b/res/layout/settings_main.xml
@@ -24,8 +24,9 @@
<LinearLayout
android:orientation="vertical"
- android:layout_height="match_parent"
- android:layout_width="match_parent">
+ android:layout_height="0px"
+ android:layout_width="match_parent"
+ android:layout_weight="1">
<com.android.settings.widget.SwitchBar android:id="@+id/switch_bar"
android:layout_height="?android:attr/actionBarSize"
@@ -37,7 +38,6 @@
android:id="@+id/prefs"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_weight="1"
/>
</LinearLayout>
diff --git a/res/layout/switch_bar.xml b/res/layout/switch_bar.xml
index f9a887f..51914c9 100644
--- a/res/layout/switch_bar.xml
+++ b/res/layout/switch_bar.xml
@@ -23,15 +23,15 @@
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
- android:paddingStart="32dp"
+ android:paddingStart="@dimen/switchbar_padding_start"
android:layout_gravity="center_vertical"
android:textAppearance="@style/TextAppearance.Switch"
android:textAlignment="viewStart" />
- <Switch android:id="@+id/switch_widget"
+ <com.android.settings.widget.ToggleSwitch android:id="@+id/switch_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:paddingEnd="32dp" />
+ android:paddingEnd="@dimen/switchbar_padding_end" />
</merge>
diff --git a/res/layout/write_wifi_config_to_nfc.xml b/res/layout/write_wifi_config_to_nfc.xml
index 416c1ae..f132bdb 100644
--- a/res/layout/write_wifi_config_to_nfc.xml
+++ b/res/layout/write_wifi_config_to_nfc.xml
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 The Android Open Source 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.
+-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/wifi_section">
diff --git a/res/layout/zen_mode_section_first.xml b/res/layout/zen_mode_section_first.xml
new file mode 100644
index 0000000..6054be4
--- /dev/null
+++ b/res/layout/zen_mode_section_first.xml
@@ -0,0 +1,28 @@
+<!--
+ Copyright (C) 2014 The Android Open Source 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAllCaps="true"
+ android:textStyle="bold" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 154b34f..0cef851 100755
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -42,4 +42,7 @@
<!-- Dashboard padding between each tiles within the layout -->
<dimen name="dashboard_cell_gap">8dp</dimen>
+ <!-- SwitchBar padding start -->
+ <dimen name="switchbar_padding_start">80dp</dimen>
+
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 562dd80..93d9833 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -88,4 +88,12 @@
<!-- Dashboard padding between each tiles within the layout -->
<dimen name="dashboard_cell_gap">4dp</dimen>
+ <!-- Dashboard category title layout height -->
+ <dimen name="dashboard_category_title_height">48dp</dimen>
+
+ <!-- SwitchBar padding start -->
+ <dimen name="switchbar_padding_start">72dp</dimen>
+ <!-- SwitchBar padding emd -->
+ <dimen name="switchbar_padding_end">@*android:dimen/preference_fragment_padding_side</dimen>
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 350798d..945dd3d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -44,13 +44,13 @@
<!-- Category headings in left-pane header menu --> <skip />
<!-- Settings main menu category heading. Wireless and networks (Wi-Fi, Bluetooth, data usage...). [CHAR LIMIT=40] -->
- <string name="header_category_wireless_networks">WIRELESS & NETWORKS</string>
+ <string name="header_category_wireless_networks">Wireless & Networks</string>
<!-- Settings main menu category heading. Device (Sound, display, battery, applications...). [CHAR LIMIT=40] -->
- <string name="header_category_device">DEVICE</string>
+ <string name="header_category_device">Device</string>
<!-- Settings main menu category heading. Personal (Accounts, security, language, backup...). [CHAR LIMIT=40] -->
- <string name="header_category_personal">PERSONAL</string>
+ <string name="header_category_personal">Personal</string>
<!-- Settings main menu category heading. System (Updates, data, accessibility, about phone). [CHAR LIMIT=40] -->
- <string name="header_category_system">SYSTEM</string>
+ <string name="header_category_system">System</string>
<!-- Phone info -->
<!-- Phone Info screen. Button label to turn on the radio . Only shown in diagnostic screen, so precise translation is not needed. -->
@@ -702,10 +702,6 @@
<string name="security_enable_widgets_title">Enable widgets</string>
<!-- Summary for settings checkbox to disable widgets when the setting has been disabled by an installed device admin [CHAR LIMIT=50] -->
<string name="security_enable_widgets_disabled_summary">Disabled by administrator</string>
- <!-- Text shown for title of settings to setup/change NFC unlock [CHAR LIMIT=20]-->
- <string name="nfc_unlock_title">NFC unlock</string>
-
-
<!-- Text shown for summary of owner info setting [CHAR LIMIT=40]-->
<string name="owner_info_settings_summary"></string>
<!-- Hint text shown in owner info edit text [CHAR LIMIT=50] -->
@@ -737,35 +733,27 @@
<!-- Title of the preferences item to control encryption -->
<string name="crypt_keeper_encrypt_title" product="default">Encrypt phone</string>
- <!-- Summary of the preferences item to control encryption, when encryption is inactive -->
- <string name="crypt_keeper_encrypt_summary" product="tablet">
- Require a numeric PIN or password to decrypt your tablet each time you
- power it on</string>
- <!-- Summary of the preferences item to control encryption, when encryption is inactive -->
- <string name="crypt_keeper_encrypt_summary" product="default">
- Require a numeric PIN or password to decrypt your phone each time you
- power it on</string>
<!-- Summary of the preferences item to control encryption, when encryption is active -->
<string name="crypt_keeper_encrypted_summary">Encrypted</string>
<!-- Informational text in the first confirmation screen before starting device encryption -->
<string name="crypt_keeper_desc" product="tablet">
You can encrypt your accounts, settings, downloaded apps and their data,
- media, and other files. Once you encrypt your tablet, you need to type a numeric PIN
- or password to decrypt it each time you power it on. You can\'t decrypt your tablet
- except by performing a factory data reset, erasing all your data.\n\nEncryption takes
- an hour or more. You must start with a charged battery and keep your tablet plugged in
- until encryption is complete. If you interrupt the encryption process, you will lose
- some or all of your data.</string>
+ media, and other files. After you encrypt your tablet, assuming you\’ve set up a screen lock
+ (that is, a pattern or numeric PIN or password), you\'ll need to unlock the screen to decrypt
+ the tablet every time you power it on. The only other way to decrypt is to perform a factory
+ data reset, erasing all your data.\n\nEncryption takes an hour or more. You must start with
+ a charged battery and keep your tablet plugged in throughout the process. If you interrupt,
+ you\’ll lose some or all of your data</string>
<!-- Informational text in the first confirmation screen before starting device encryption -->
<string name="crypt_keeper_desc" product="default">
You can encrypt your accounts, settings, downloaded apps and their data,
- media, and other files. Once you encrypt your phone, you need to type a numeric PIN or
- password to decrypt it each time you power it on. You can\'t decrypt your phone
- except by performing a factory data reset, erasing all your data.\n\nEncryption takes
- an hour or more. You must start with a charged battery and keep your phone plugged in
- until encryption is complete. If you interrupt the encryption process, you will lose
- some or all of your data.</string>
+ media, and other files. After you encrypt your phone, assuming you’ve set up a screen lock
+ (that is, a pattern or numeric PIN or password), you\'ll need to unlock the screen to decrypt
+ the phone every time you power it on. The only other way to decrypt is to perform a factory
+ data reset, erasing all your data.\n\nEncryption takes an hour or more. You must start with
+ a charged battery and keep your phone plugged in throughout the process. If you interrupt,
+ you\’ll lose some or all of your data.</string>
<!-- Button text to start encryption process -->
<string name="crypt_keeper_button_text" product="tablet">Encrypt tablet</string>
@@ -1028,63 +1016,6 @@
<!-- Summary of preference to manage device policies -->
<string name="manage_trust_agents_summary">View or deactivate trust agents</string>
- <!-- Notification access settings (part of Security) -->
-
- <!-- Title of preference to manage notification listeners -->
- <string name="manage_notification_access">Notification access</string>
-
- <!-- Summary of preference to manage notification listeners, when none are enabled -->
- <string name="manage_notification_access_summary_zero">Apps cannot read notifications</string>
-
- <!-- Summary of preference to manage notification listeners, when one or more are enabled
- and are therefore able to read the user's notifications -->
- <plurals name="manage_notification_access_summary_nonzero">
- <item quantity="one">%d app can read notifications</item>
- <item quantity="other">%d apps can read notifications</item>
- </plurals>
-
- <!-- String to show in the list of notification listeners, when none is installed -->
- <string name="no_notification_listeners">No notification listeners are installed.</string>
-
- <!-- Title for a warning message about security implications of enabling a notification
- listener, displayed as a dialog message. [CHAR LIMIT=NONE] -->
- <string name="notification_listener_security_warning_title">Enable
- <xliff:g id="service" example="NotificationReader">%1$s</xliff:g>?</string>
- <!-- Summary for a warning message about security implications of enabling a notification
- listener, displayed as a dialog message. [CHAR LIMIT=NONE] -->
- <string name="notification_listener_security_warning_summary">
- <xliff:g id="notification_listener_name">%1$s</xliff:g> will be able to
- read all notifications posted by the system or any installed app, which may include personal
- information such as contact names and the text of messages sent to you. It will also be able
- to dismiss these notifications or touch action buttons within them.
- </string>
-
- <!-- Title of preference to manage condition providers -->
- <string name="manage_condition_providers">Condition providers</string>
-
- <!-- Summary of preference to manage condition providers, when none are enabled -->
- <string name="manage_condition_providers_summary_zero">No apps provide conditions</string>
-
- <!-- Summary of preference to manage condition providers, when one or more are enabled -->
- <plurals name="manage_condition_providers_summary_nonzero">
- <item quantity="one">%d app provides conditions</item>
- <item quantity="other">%d apps provide conditions</item>
- </plurals>
-
- <!-- String to show in the list of condition providers, when none is installed -->
- <string name="no_condition_providers">No condition providers are installed.</string>
-
- <!-- Title for a warning message about security implications of enabling a condition
- provider, displayed as a dialog message. [CHAR LIMIT=NONE] -->
- <string name="condition_provider_security_warning_title">Enable
- <xliff:g id="service" example="ConditionProvider">%1$s</xliff:g>?</string>
- <!-- Summary for a warning message about security implications of enabling a condition
- provider, displayed as a dialog message. [CHAR LIMIT=NONE] -->
- <string name="condition_provider_security_warning_summary">
- <xliff:g id="condition_provider_name">%1$s</xliff:g> will be able to
- add exit conditions to Do not disturb mode.
- </string>
-
<!-- Bluetooth settings -->
<!-- Bluetooth settings check box title on Main Settings screen -->
<string name="bluetooth_quick_toggle_title">Bluetooth</string>
@@ -1417,6 +1348,8 @@
<string name="wifi_menu_forget">Forget network</string>
<!-- Menu option to modify a Wi-Fi network configuration -->
<string name="wifi_menu_modify">Modify network</string>
+ <!-- Menu option to write a Wi-Fi configuration token to an NFC tag [CHAR_LIMIT=30]-->
+ <string name="wifi_menu_write_to_nfc">Write to NFC tag</string>
<!-- Wi-Fi settings. text displayed when Wi-Fi is off and network list is empty [CHAR LIMIT=50]-->
<string name="wifi_empty_list_wifi_off">To see available networks, turn Wi\u2011Fi on.</string>
<!-- Wi-Fi settings. text displayed when Wi-Fi is on and network list is empty [CHAR LIMIT=50]-->
@@ -1522,8 +1455,8 @@
<!-- Substring of wifi status for wifi with authentication. This version is for when the
string is not first in the list (lowercase in english) -->
<string name="wifi_secured_second_item">, secured with <xliff:g id="wifi_security_short">%1$s</xliff:g></string>
- <!-- Message in WriteWifiConfigToNfcDialog when prompted to enter network password [CHAR LIMIT=150] -->
- <string name="wifi_wps_nfc_enter_password">Enter your network password.</string>
+ <!-- Message in WriteWifiConfigToNfcDialog when prompted to enter network password [CHAR_LIMIT=40] -->
+ <string name="wifi_wps_nfc_enter_password">Enter your network password</string>
<!-- Do not translate. Concise terminology for wifi with WEP security -->
<string name="wifi_security_short_wep">WEP</string>
@@ -1776,8 +1709,6 @@
<string name="display_settings_title">Display</string>
<!-- Sound settings screen heading -->
<string name="sound_settings">Sound</string>
- <!-- Sound settings screen, setting option name to pick ringtone (a list dialog comes up)-->
- <string name="ringtone_title">Phone ringtone</string>
<!-- Sound settings screen, setting option summary text -->
<string name="ringtone_summary">""</string>
<!-- Sound settings screen, volume title -->
@@ -1790,8 +1721,6 @@
<string name="vibrate_in_silent_title">Vibrate when silent</string>
<!-- Sound settings screen, setting option name -->
<string name="notification_sound_title">Default notification sound</string>
- <!-- Sound settings screen, notification light repeat pulsing title -->
- <string name="notification_pulse_title">Pulse notification light</string>
<!-- Display settings screen, notification popups are enabled [CHAR LIMIT=30] -->
<string name="heads_up_enabled_title">Pop up if high priority</string>
<!-- Sound settings screen, the title of the volume bar to adjust the incoming call volume -->
@@ -1837,9 +1766,6 @@
<string name="volume_notification_mute">Mute notifications</string>
<!-- Image description for alarm volume mute button. -->
<string name="volume_alarm_mute">Mute alarms</string>
- <!-- Sound settings screen, setting option name checkbox. About vibration setting
- during incoming calls. [CHAR LIMIT=30] -->
- <string name="vibrate_when_ringing_title">Vibrate when ringing</string>
<!-- Dock settings title, top level -->
<string name="dock_settings">Dock</string>
@@ -4364,6 +4290,10 @@
<string name="status_wimax_mac_address">4G MAC address</string>
<!-- This is displayed to the user when the device needs to be decrypted -->
<string name="enter_password">Type password to decrypt storage</string>
+ <!-- Informational text on the pin entry screen prompting the user for their pin -->
+ <string name="enter_pin">Enter your PIN to decrypt storage</string>
+ <!-- Informational text on the pattern entry screen prompting the user for their pattern -->
+ <string name="enter_pattern">Draw your pattern to decrypt storage</string>
<!-- This is displayed when the password is entered incorrectly -->
<string name="try_again">Try again.</string>
@@ -4955,6 +4885,9 @@
<string name="nfc_payment_settings_title">Tap & pay</string>
<!-- String shown when there are no NFC payment applications installed -->
<string name="nfc_payment_no_apps">Pay with just a tap</string>
+ <!-- String shown before a checkbox, allowing the user to indicate that he wants foreground apps
+ to be able to override the configured default app -->
+ <string name="nfc_payment_favor_foreground">Favor foreground app</string>
<!-- String shown when there are no NFC payment applications installed, clickable, pointing to
a website to learn more-->
<string name="nfc_payment_learn_more">Learn more</string>
@@ -5069,22 +5002,6 @@
<!-- Text to display in regulatory info screen (from device overlay). -->
<string name="regulatory_info_text"></string>
- <!-- NFC unlock -->
- <string name="lock_settings_nfc_title">NFC Screen Lock Settings</string>
- <string name="nfc_unlock_paired_tags_title">Paired Tags</string>
- <string name="nfc_unlock_enabled">Enabled</string>
- <string name="start_nfc_pairing">Pair with a tag</string>
-
- <!-- Nfc pair activity strings -->
- <string name="title_activity_nfc_pairing">NfcPairingActivity</string>
- <string name="pairing_button_title">Pair now</string>
- <string name="status_no_ring_detected">Set the tag flat on a table and place the phone on top</string>
- <string name="status_device_paired">Tag and phone successfully paired, you are done!</string>
- <string name="status_error_invalid_device">The tag provided cannot be used to unlock your phone</string>
- <string name="status_error_pairing_failed">The pairing with your tag failed, please try again</string>
- <string name="enable_nfc">NFC is not enabled and is required for NFC Unlock. Please turn on NFC.</string>
- <string name="ok">NFC Settings</string>
-
<!--Dashboard strings-->
<!-- Text to describe the dashboard fragment title [CHAR LIMIT=16] -->
<string name="dashboard_title">Settings</string>
@@ -5105,43 +5022,10 @@
<!--Search Keywords-->
<string name="keywords_wifi">wifi wi-fi network connection</string>
- <!-- Notifications on lockscreen -->
- <!-- Label for checkbox controlling the contents of notifications shown on
- the secure lockscreen [CHAR LIMIT=25] -->
- <string name="lock_screen_notifications">When device is locked</string>
- <!-- Summary for lock_screen_notifications: sensitive information will be
- hidden or redacted from notifications shown on a secure lock screen
- [CHAR LIMIT=50] -->
- <string name="lock_screen_notifications_summary_hide">Hide sensitive notification content</string>
- <!-- Summary for lock_screen_notifications: all information will be
- shown in notifications shown on a secure lock screen
- [CHAR LIMIT=50] -->
- <string name="lock_screen_notifications_summary_show">Show all notification content</string>
+ <!-- NFC Wi-Fi pairing/setup strings-->
- <!-- [CHAR LIMIT=30] Notification settings screen, setting option name -->
- <string name="title_zen_mode">Do not disturb</string>
-
- <!-- [CHAR LIMIT=30] Zen mode settings screen, activity title -->
- <string name="zen_mode_settings_title">Do not disturb</string>
-
- <!-- [CHAR LIMIT=20] Notifications settings header -->
- <string name="notification_settings">Notifications</string>
-
- <!-- [CHAR LIMIT=20] Notifications settings: Tweaks section header (eng
- builds only) -->
- <string name="notification_settings_tweaks">Tweaks</string>
-
- <!-- [CHAR LIMIT=20] Notifications settings: Apps section header -->
- <string name="notification_settings_apps_title">App notifications</string>
-
- <!-- [CHAR LIMIT=NONE] Content description for per-app notification
- settings button -->
- <string name="notification_app_settings_button">Notification settings</string>
-
- <!-- NFC WiFi pairing/setup strings-->
-
- <!-- Write NFC tag for WiFi pairing/setup title -->
- <string name="setup_wifi_nfc_tag">Set up WiFi NFC Tag</string>
+ <!-- Write NFC tag for Wi-Fi pairing/setup title [CHAR_LIMIT=30]-->
+ <string name="setup_wifi_nfc_tag">Set up Wi-Fi NFC Tag</string>
<!-- Text for button to confirm writing tag -->
<string name="write_tag">Write</string>
<!-- Text to inform the user to tap a tag to complete the setup process -->
@@ -5158,27 +5042,174 @@
<!-- Option title for the default sound, context based on screen -->
<string name="default_sound">Default sound</string>
+
+ <!-- Sounds and Notifications -->
+
+ <!-- Sounds & notifications: Settings header. [CHAR LIMIT=20] -->
+ <string name="notification_settings">Sounds & Notifications</string>
+
+ <!-- Sounds & notifications: Title for the option managing media volume. [CHAR LIMIT=NONE] -->
+ <string name="media_volume_option_title">Media volume</string>
+
+ <!-- Sounds & notifications: Title for the option managing alarm volume. [CHAR LIMIT=NONE] -->
+ <string name="alarm_volume_option_title">Alarm volume</string>
+
+ <!-- Sounds & notifications: Title for the option managing ringer volume. [CHAR LIMIT=NONE] -->
+ <string name="ring_volume_option_title">Ring volume</string>
+
+ <!-- Sounds & notifications: Title for the Do not disturb option and associated settings page. [CHAR LIMIT=NONE] -->
+ <string name="zen_mode_settings_title">Do not disturb</string>
+
+ <!-- Sounds & notifications: Title for the ringer mode option. [CHAR LIMIT=NONE] -->
+ <string name="ringer_mode_title">When calls and notifications arrive</string>
+
+ <!-- Sounds & notifications: Value for the ringer mode option when audible. [CHAR LIMIT=NONE] -->
+ <string name="ringer_mode_audible">Ring</string>
+
+ <!-- Sounds & notifications: Value for the ringer mode option when vibrate. [CHAR LIMIT=NONE] -->
+ <string name="ringer_mode_vibrate">Vibrate instead of ringing</string>
+
+ <!-- Sounds & notifications: Value for the ringer mode option when silent. [CHAR LIMIT=NONE] -->
+ <string name="ringer_mode_silent">Don\'t ring or vibrate</string>
+
+ <!-- Sounds & notifications: Title for the option defining the phone ringtone. [CHAR LIMIT=NONE] -->
+ <string name="ringtone_title">Phone ringtone</string>
+
+ <!-- Sounds & notifications: Title for the option defining the default notification ringtone. [CHAR LIMIT=NONE] -->
+ <string name="notification_ringtone_title">Default notification ringtone</string>
+
+ <!-- Sounds & notifications: Title for the option managing whether or not to vibrate when ringing. [CHAR LIMIT=NONE] -->
+ <string name="vibrate_when_ringing_title">Vibrate when ringing</string>
+
+ <!-- Sounds & notifications: Title for the showing notifications option and associated settings page. [CHAR LIMIT=NONE] -->
+ <string name="notification_display_settings">Showing notifications</string>
+
+ <!-- Sounds & notifications > Showing notifications: Title for the pulse notification light option. [CHAR LIMIT=NONE] -->
+ <string name="notification_pulse_title">Pulse notification light</string>
+
+ <!-- Sounds & notifications > Showing notifications: Title for the option controlling notifications on the lockscreen. [CHAR LIMIT=NONE] -->
+ <string name="lock_screen_notifications_title">When device is locked</string>
+
+ <!-- Sounds & notifications > Showing notifications: Value for lockscreen notifications: all information will be
+ shown in notifications shown on a secure lock screen
+ [CHAR LIMIT=50] -->
+ <string name="lock_screen_notifications_summary_show">Show all notification content</string>
+
+ <!-- Sounds & notifications > Showing notifications: Value for lockscreen notifications: sensitive information will be
+ hidden or redacted from notifications shown on a secure lock screen
+ [CHAR LIMIT=50] -->
+ <string name="lock_screen_notifications_summary_hide">Hide sensitive notification content</string>
+
+ <!-- Sounds & notifications > Showing notifications: Value for lockscreen notifications: notifications will not appear on a secure lock screen
+ [CHAR LIMIT=50] -->
+ <string name="lock_screen_notifications_summary_disable">Don\'t show notifications at all</string>
+
+ <!-- Sounds & notifications > Showing notifications: Title for the option managing notification display in zen mode. [CHAR LIMIT=NONE] -->
+ <string name="zen_mode_notifications_title">When do not disturb is on</string>
+
+ <!-- Sounds & notifications > Showing notifications: Value for zen mode notifications: notifications will be suppressed in zen mode [CHAR LIMIT=50] -->
+ <string name="zen_mode_notifications_summary_hide">Hide new notifications from the list</string>
+
+ <!-- Sounds & notifications > Showing notifications: Value for zen mode notifications: notifications will be displayed in zen mode [CHAR LIMIT=50] -->
+ <string name="zen_mode_notifications_summary_show">Show all notifications in the list</string>
+
+ <!-- Sounds & notifications > Showing notifications: Title for the option managing notifications per application. [CHAR LIMIT=NONE] -->
+ <string name="app_notifications_title">App notifications</string>
+
+ <!-- Sounds & notifications: Title for the touch sounds option and associated settings page. [CHAR LIMIT=NONE] -->
+ <string name="touch_sound_settings">Touch sounds</string>
+
+ <!-- Sounds & notifications > Touch sounds: Title for the option enabling touch sounds for dial pad tones. [CHAR LIMIT=NONE] -->
+ <string name="dial_pad_tones_title">Dial pad tones</string>
+
+ <!-- Sounds & notifications > Touch sounds: Title for the option enabling touch sounds for screen locking and unlocking. [CHAR LIMIT=NONE] -->
+ <string name="screen_locking_sounds_title">Screen locking & unlocking</string>
+
+ <!-- Sounds & notifications > Touch sounds: Title for the option enabling other touch sounds. [CHAR LIMIT=NONE] -->
+ <string name="other_touch_sounds_title">Other touch sounds</string>
+
+ <!-- Sounds & notifications > Touch sounds: Title for the option enabling haptic feedback on touch. [CHAR LIMIT=NONE] -->
+ <string name="vibrate_on_touch_title">Vibrate on touch</string>
+
+ <!-- Sounds & notifications: Title for managing notification listeners option. [CHAR LIMIT=NONE] -->
+ <string name="manage_notification_access_title">Notification access</string>
+
+ <!-- Summary of preference to manage notification listeners, when none are enabled -->
+ <string name="manage_notification_access_summary_zero">Apps cannot read notifications</string>
+
+ <!-- Summary of preference to manage notification listeners, when one or more are enabled
+ and are therefore able to read the user's notifications -->
+ <plurals name="manage_notification_access_summary_nonzero">
+ <item quantity="one">%d app can read notifications</item>
+ <item quantity="other">%d apps can read notifications</item>
+ </plurals>
+
+ <!-- String to show in the list of notification listeners, when none is installed -->
+ <string name="no_notification_listeners">No notification listeners are installed.</string>
+
+ <!-- Title for a warning message about security implications of enabling a notification
+ listener, displayed as a dialog message. [CHAR LIMIT=NONE] -->
+ <string name="notification_listener_security_warning_title">Enable
+ <xliff:g id="service" example="NotificationReader">%1$s</xliff:g>?</string>
+ <!-- Summary for a warning message about security implications of enabling a notification
+ listener, displayed as a dialog message. [CHAR LIMIT=NONE] -->
+ <string name="notification_listener_security_warning_summary">
+ <xliff:g id="notification_listener_name">%1$s</xliff:g> will be able to
+ read all notifications posted by the system or any installed app, which may include personal
+ information such as contact names and the text of messages sent to you. It will also be able
+ to dismiss these notifications or touch action buttons within them.
+ </string>
+
+ <!-- Title of preference to manage condition providers -->
+ <string name="manage_condition_providers">Condition providers</string>
+
+ <!-- Summary of preference to manage condition providers, when none are enabled -->
+ <string name="manage_condition_providers_summary_zero">No apps provide conditions</string>
+
+ <!-- Summary of preference to manage condition providers, when one or more are enabled -->
+ <plurals name="manage_condition_providers_summary_nonzero">
+ <item quantity="one">%d app provides conditions</item>
+ <item quantity="other">%d apps provide conditions</item>
+ </plurals>
+
+ <!-- String to show in the list of condition providers, when none is installed -->
+ <string name="no_condition_providers">No condition providers are installed.</string>
+
+ <!-- Title for a warning message about security implications of enabling a condition
+ provider, displayed as a dialog message. [CHAR LIMIT=NONE] -->
+ <string name="condition_provider_security_warning_title">Enable
+ <xliff:g id="service" example="ConditionProvider">%1$s</xliff:g>?</string>
+ <!-- Summary for a warning message about security implications of enabling a condition
+ provider, displayed as a dialog message. [CHAR LIMIT=NONE] -->
+ <string name="condition_provider_security_warning_summary">
+ <xliff:g id="condition_provider_name">%1$s</xliff:g> will be able to
+ add exit conditions to Do not disturb mode.
+ </string>
+
<!-- [CHAR LIMIT=NONE] Text when loading app list in notification settings -->
<string name="loading_notification_apps">Loading apps...</string>
- <!-- [CHAR LIMIT=40] Notification settings: App notifications screen title -->
- <string name="app_notifications_title">App notifications</string>
-
- <!-- [CHAR LIMIT=30] Notification settings: App notifications dialog show option -->
+ <!-- [CHAR LIMIT=NONE] Notification settings: App notifications dialog show option -->
<string name="app_notifications_dialog_show">Show notifications</string>
- <!-- [CHAR LIMIT=30] Notification settings: App notifications dialog priority option -->
- <string name="app_notifications_dialog_priority">High priority</string>
+ <!-- [CHAR LIMIT=NONE] Notification settings: App notifications dialog priority option -->
+ <string name="app_notifications_dialog_priority">Display at the top of the list</string>
+
+ <!-- [CHAR LIMIT=NONE] Notification settings: App notifications dialog visibility option -->
+ <string name="app_notifications_dialog_visibility">Hide sensitive content when device is locked</string>
+
+ <!-- [CHAR LIMIT=20] Notification settings: App notifications row summary when banned -->
+ <string name="app_notification_row_banned">Blocked</string>
+
+ <!-- [CHAR LIMIT=20] Notification settings: App notifications row summary when high priority -->
+ <string name="app_notification_row_priority">Top of list</string>
+
+ <!-- [CHAR LIMIT=20] Notification settings: App notifications row summary when sensitive -->
+ <string name="app_notification_row_sensitive">Sensitive</string>
<!-- [CHAR LIMIT=20] Notification settings: App notifications dialog dismiss button caption -->
<string name="app_notifications_dialog_done">Done</string>
- <!-- [CHAR LIMIT=20] Zen mode settings: Master switch option title, off -->
- <string name="zen_mode_option_off">Off</string>
-
- <!-- [CHAR LIMIT=20] Zen mode settings: Master switch option title, on -->
- <string name="zen_mode_option_on">On</string>
-
<!-- [CHAR LIMIT=30] Zen mode settings: Exit condition selection dialog, default option -->
<string name="zen_mode_default_option">Until you turn this off</string>
@@ -5194,8 +5225,8 @@
<!-- [CHAR LIMIT=40] Zen mode settings: Entry conditions option: title -->
<string name="zen_mode_entry_conditions_title">Automatically turn on</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Entry conditions option: summary condition divider -->
- <string name="zen_mode_entry_conditions_summary_divider">, </string>
+ <!-- [CHAR LIMIT=40] General divider text when concatenating multiple items in a text summary -->
+ <string name="summary_divider_text">, </string>
<!-- [CHAR LIMIT=40] Zen mode settings: Entry conditions option: value when blank -->
<string name="zen_mode_entry_conditions_summary_none">Never</string>
@@ -5242,6 +5273,14 @@
<!-- [CHAR LIMIT=20] Zen mode settings: End time option: Summary text value format -->
<string name="zen_mode_end_time_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string>
+ <!-- [CHAR LIMIT=20] Notifications settings: Apps section header -->
+ <string name="notification_settings_apps_title">App notifications</string>
+
+ <!-- [CHAR LIMIT=NONE] Content description for per-app notification
+ settings button -->
+ <string name="notification_app_settings_button">Notification settings</string>
+
+
<!-- [CHAR LIMIT=35] Feedback on the device -->
<string name="device_feedback">Send feedback about this device</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f9e7b2b..568297f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -86,9 +86,6 @@
<item name="android:windowContentOverlay">@null</item>
</style>
- <style name="Theme.CreateShortCut" parent="android:Theme.Quantum.Light.DialogWhenLarge">
- </style>
-
<style name="PreferenceHeaderPanelSinglePane">
<item name="android:layout_marginStart">0dp</item>
<item name="android:layout_marginEnd">0dp</item>
@@ -242,10 +239,6 @@
<item name="android:widgetLayout">@layout/preference_inputmethod_widget</item>
</style>
- <style name="TextAppearance.Switch" parent="@*android:style/TextAppearance.Quantum.Widget.Switch">
- <item name="android:textAllCaps">true</item>
- </style>
-
<style name="TextAppearance.PagerTabs" parent="@android:style/TextAppearance.Quantum.Small">
<item name="android:textAllCaps">true</item>
<item name="android:textStyle">bold</item>
@@ -262,7 +255,13 @@
<item name="android:layout">@layout/apn_preference_layout</item>
</style>
- <style name="TextAppearance.Switch" parent="@android:style/TextAppearance.Quantum.Medium">
- <item name="android:textSize">16sp</item>
+ <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Quantum.Medium">
</style>
+
+ <style name="TextAppearance.Small" parent="@android:style/TextAppearance.Quantum.Small">
+ </style>
+
+ <style name="TextAppearance.Switch" parent="TextAppearance.Medium">
+ </style>
+
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 97dc0d4..c39910b 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -59,7 +59,19 @@
<item name="wifi_signal">@drawable/wifi_signal_light</item>
</style>
- <style name="Theme.Settings" parent="@android:style/Theme.Quantum.Light">
+ <style name="Theme.CreateShortCut" parent="android:Theme.Quantum.Light.DialogWhenLarge">
+ <item name="android:actionBarWidgetTheme">@android:style/ThemeOverlay.Quantum.ActionBarWidget</item>
+ <item name="android:actionBarTheme">@android:style/ThemeOverlay.Quantum.Dark</item>
+
+ <item name="android:colorPrimary">@color/actionbar_background_color</item>
+ <!-- Used by the bouncing effect for ListView and ScrollView -->
+ <item name="android:colorPrimaryLight">@color/actionbar_background_color</item>
+ <!-- Used by the StatusBar and NavBar -->
+ <item name="android:colorPrimaryDark">@color/actionbar_background_color</item>
+ <item name="android:colorAccent">@color/quantum_orange_A200</item>
+ </style>
+
+ <style name="Theme.Settings" parent="@android:style/Theme.Quantum.Light.DarkActionBar">
<item name="@*android:preferenceHeaderPanelStyle">@style/PreferenceHeaderPanelSinglePane</item>
<item name="@*android:preferencePanelStyle">@style/PreferencePanelSinglePane</item>
<item name="@*android:preferenceListStyle">@style/PreferenceHeaderListSinglePane</item>
@@ -71,22 +83,11 @@
<item name="ic_wps">@drawable/ic_wps_dark</item>
<item name="wifi_signal">@drawable/wifi_signal_dark</item>
- <item name="android:actionBarTheme">@style/Theme.Settings.ActionBar.Quantum</item>
-
<item name="android:colorPrimary">@color/actionbar_background_color</item>
- <item name="android:colorPrimaryLight">@color/quantum_blue_grey_100</item>
- <item name="android:colorPrimaryDark">@color/quantum_blue_grey_700</item>
- <item name="android:colorAccent">@color/quantum_orange_A200</item>
- </style>
-
- <style name="Theme.Settings.ActionBar.Quantum" parent="@android:style/Theme.Quantum">
- <!--Set the background color-->
- <item name="android:colorPrimary">@color/actionbar_background_color</item>
- <!--Set the activated state color for the on/off switches-->
- <item name="android:colorControlActivated">?android:attr/colorControlNormal</item>
- <!--Other colors-->
- <item name="android:colorPrimaryLight">@color/quantum_blue_grey_100</item>
- <item name="android:colorPrimaryDark">@color/quantum_blue_grey_700</item>
+ <!-- Used by the bouncing effect for ListView and ScrollView -->
+ <item name="android:colorPrimaryLight">@color/actionbar_background_color</item>
+ <!-- Used by the StatusBar and NavBar -->
+ <item name="android:colorPrimaryDark">@color/actionbar_background_color</item>
<item name="android:colorAccent">@color/quantum_orange_A200</item>
</style>
diff --git a/res/xml/notification_display_settings.xml b/res/xml/notification_display_settings.xml
new file mode 100644
index 0000000..d5cade1
--- /dev/null
+++ b/res/xml/notification_display_settings.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source 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/notification_display_settings"
+ android:key="notification_display_settings"
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
+
+ <!-- Pulse notification light -->
+ <SwitchPreference
+ android:key="notification_pulse"
+ android:title="@string/notification_pulse_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
+ android:persistent="false" />
+
+ <!-- When device is locked -->
+ <com.android.settings.notification.DropDownPreference
+ android:key="lock_screen_notifications"
+ android:title="@string/lock_screen_notifications_title"
+ android:persistent="false" />
+
+ <!-- When do not disturb is on -->
+ <com.android.settings.notification.DropDownPreference
+ android:key="zen_mode_notifications"
+ android:title="@string/zen_mode_notifications_title"
+ android:persistent="false" />
+
+ <!-- App notifications -->
+ <PreferenceScreen
+ android:key="app_notifications"
+ android:title="@string/app_notifications_title"
+ android:fragment="com.android.settings.notification.AppNotificationSettings" />
+
+</PreferenceScreen>
diff --git a/res/xml/notification_settings.xml b/res/xml/notification_settings.xml
index 8cc1069..633c133 100644
--- a/res/xml/notification_settings.xml
+++ b/res/xml/notification_settings.xml
@@ -19,41 +19,78 @@
android:key="notification_settings"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
+ <!-- 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" />
+
+ <!-- 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" />
+
+ <!-- Do not disturb -->
+ <PreferenceScreen
+ android:key="zen_mode"
+ android:title="@string/zen_mode_settings_title"
+ android:fragment="com.android.settings.notification.ZenModeSettings" />
+
+ <!-- When calls and notifications arrive -->
+ <com.android.settings.notification.DropDownPreference
+ android:key="ringer_mode"
+ android:title="@string/ringer_mode_title"
+ android:persistent="false" />
+
+ <!-- Phone ringtone -->
<com.android.settings.DefaultRingtonePreference
- android:key="notification_sound"
- android:title="@string/default_sound"
- android:dialogTitle="@string/notification_sound_dialog_title"
+ 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"
+ android:dialogTitle="@string/notification_ringtone_title"
android:persistent="false"
android:ringtoneType="notification" />
- <CheckBoxPreference
- android:key="notification_pulse"
- android:title="@string/notification_pulse_title"
+ <!-- Vibrate when ringing -->
+ <SwitchPreference
+ android:key="vibrate_when_ringing"
+ android:title="@string/vibrate_when_ringing_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
android:persistent="false" />
- <CheckBoxPreference
- android:key="heads_up"
- android:title="@string/heads_up_enabled_title"
- android:persistent="false" />
+ <!-- Showing notifications -->
+ <Preference
+ android:key="showing_notifications"
+ android:title="@string/notification_display_settings"
+ android:persistent="false"
+ android:fragment="com.android.settings.notification.NotificationDisplaySettings" />
- <com.android.settings.notification.DropDownPreference
- android:key="toggle_lock_screen_notifications"
- android:title="@string/lock_screen_notifications"
- android:persistent="false" />
+ <!-- Touch sounds -->
+ <Preference
+ android:key="touch_sounds"
+ android:title="@string/touch_sound_settings"
+ android:persistent="false"
+ android:fragment="com.android.settings.notification.TouchSoundSettings" />
- <PreferenceScreen
- android:key="configure"
- android:title="@string/notification_settings_apps_title"
- android:fragment="com.android.settings.notification.AppNotificationSettings" />
-
- <PreferenceScreen
- android:key="zen_mode"
- android:title="@string/title_zen_mode"
- android:fragment="com.android.settings.notification.ZenModeSettings" />
-
+ <!-- Notification access -->
<Preference
android:key="manage_notification_access"
- android:title="@string/manage_notification_access"
+ android:title="@string/manage_notification_access_title"
android:persistent="false"
android:fragment="com.android.settings.notification.NotificationAccessSettings" />
diff --git a/res/xml/security_settings_biometric_weak.xml b/res/xml/security_settings_biometric_weak.xml
index 7226c6c..c663492 100644
--- a/res/xml/security_settings_biometric_weak.xml
+++ b/res/xml/security_settings_biometric_weak.xml
@@ -57,11 +57,6 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
- <PreferenceScreen
- android:key="nfc_unlock_set_or_change"
- android:title="@string/nfc_unlock_title"
- android:persistent="false"/>
-
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
index f6e2e89..d17366e 100644
--- a/res/xml/security_settings_chooser.xml
+++ b/res/xml/security_settings_chooser.xml
@@ -32,11 +32,6 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
- <PreferenceScreen
- android:key="nfc_unlock_set_or_change"
- android:title="@string/nfc_unlock_title"
- android:persistent="false"/>
-
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
index 0380716..b418aa7 100644
--- a/res/xml/security_settings_password.xml
+++ b/res/xml/security_settings_password.xml
@@ -44,11 +44,6 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
- <PreferenceScreen
- android:key="nfc_unlock_set_or_change"
- android:title="@string/nfc_unlock_title"
- android:persistent="false"/>
-
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
index 8a8cb63..d47a99d 100644
--- a/res/xml/security_settings_pattern.xml
+++ b/res/xml/security_settings_pattern.xml
@@ -48,11 +48,6 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
- <PreferenceScreen
- android:key="nfc_unlock_set_or_change"
- android:title="@string/nfc_unlock_title"
- android:persistent="false"/>
-
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
index c114631..c1aac48 100644
--- a/res/xml/security_settings_pin.xml
+++ b/res/xml/security_settings_pin.xml
@@ -44,11 +44,6 @@
android:title="@string/owner_info_settings_title"
android:summary="@string/owner_info_settings_summary"/>
- <PreferenceScreen
- android:key="nfc_unlock_set_or_change"
- android:title="@string/nfc_unlock_title"
- android:persistent="false"/>
-
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_unencrypted.xml b/res/xml/security_settings_unencrypted.xml
index 00213df..947317c 100644
--- a/res/xml/security_settings_unencrypted.xml
+++ b/res/xml/security_settings_unencrypted.xml
@@ -23,7 +23,6 @@
<PreferenceScreen
android:key="encryption"
android:title="@string/crypt_keeper_encrypt_title"
- android:summary="@string/crypt_keeper_encrypt_summary"
android:fragment="com.android.settings.CryptKeeperSettings" />
</PreferenceCategory>
diff --git a/res/xml/touch_sound_settings.xml b/res/xml/touch_sound_settings.xml
new file mode 100644
index 0000000..d10ef0d
--- /dev/null
+++ b/res/xml/touch_sound_settings.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source 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/touch_sound_settings"
+ android:key="touch_sound_settings"
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
+
+ <!-- Dial pad tones -->
+ <SwitchPreference
+ android:key="dial_pad_tones"
+ android:title="@string/dial_pad_tones_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
+ android:persistent="false" />
+
+ <!-- Screen locking / unlocking -->
+ <SwitchPreference
+ android:key="screen_locking_sounds"
+ android:title="@string/screen_locking_sounds_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
+ android:persistent="false" />
+
+ <!-- Other touch sounds -->
+ <SwitchPreference
+ android:key="other_touch_sounds"
+ android:title="@string/other_touch_sounds_title"
+ android:switchTextOff=""
+ android:switchTextOn=""
+ 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" />
+
+</PreferenceScreen>
diff --git a/res/xml/zen_mode_settings.xml b/res/xml/zen_mode_settings.xml
index b1ec8ad..35732d6 100644
--- a/res/xml/zen_mode_settings.xml
+++ b/res/xml/zen_mode_settings.xml
@@ -19,15 +19,9 @@
android:key="zen_mode_settings"
android:title="@string/zen_mode_settings_title" >
- <SwitchPreference
- android:key="zen_mode"
- android:persistent="false"
- android:switchTextOff=""
- android:switchTextOn="" />
-
<PreferenceCategory
android:key="general"
- android:layout="@layout/zen_mode_section"
+ android:layout="@layout/zen_mode_section_first"
android:title="@string/zen_mode_general_category" >
<SwitchPreference
android:key="phone_calls"
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 1efe98f..661e304 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -120,6 +120,8 @@
private LockPatternView mLockPatternView;
/** Number of calls to {@link #notifyUser()} to ignore before notifying. */
private int mNotificationCountdown = 0;
+ /** Number of calls to {@link #notifyUser()} before we release the wakelock */
+ private int mReleaseWakeLockCountdown = 0;
/**
* Used to propagate state through configuration changes (e.g. screen rotation)
@@ -287,6 +289,14 @@
// Notify the user again in 5 seconds.
mHandler.removeMessages(MESSAGE_NOTIFY);
mHandler.sendEmptyMessageDelayed(MESSAGE_NOTIFY, 5 * 1000);
+
+ if (mWakeLock.isHeld()) {
+ if (mReleaseWakeLockCountdown > 0) {
+ --mReleaseWakeLockCountdown;
+ } else {
+ mWakeLock.release();
+ }
+ }
}
/**
@@ -388,9 +398,11 @@
public void onPostExecute(java.lang.Void v) {
if(type == StorageManager.CRYPT_TYPE_PIN) {
setContentView(R.layout.crypt_keeper_pin_entry);
+ ((TextView)findViewById(R.id.status)).setText(R.string.enter_pin);
} else if (type == StorageManager.CRYPT_TYPE_PATTERN) {
setContentView(R.layout.crypt_keeper_pattern_entry);
setBackFunctionality(false);
+ ((TextView)findViewById(R.id.status)).setText(R.string.enter_pattern);
} else {
setContentView(R.layout.crypt_keeper_password_entry);
}
@@ -624,8 +636,12 @@
if (pm != null) {
mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG);
mWakeLock.acquire();
+ // Keep awake for 10 minutes - if the user hasn't been alerted by then
+ // best not to just drain their battery
+ mReleaseWakeLockCountdown = 96; // 96 * 5 + 120 = 600
}
}
+
// Asynchronously throw up the IME, since there are issues with requesting it to be shown
// immediately.
if (mLockPatternView == null) {
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index d21e4ab..cc7a116 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -387,19 +387,6 @@
mEnabledSwitch.setEnabled(false);
return;
}
- mSwitchBar.addOnSwitchChangeListener(this);
- }
-
- @Override
- public void onStart() {
- super.onStart();
- mSwitchBar.show();
- }
-
- @Override
- public void onStop() {
- super.onStop();
- mSwitchBar.hide();
}
private boolean removePreferenceForProduction(Preference preference) {
@@ -464,6 +451,17 @@
mEnabledSwitch.setChecked(mLastEnabledState);
setPrefsEnabledState(mLastEnabledState);
}
+
+ mSwitchBar.addOnSwitchChangeListener(this);
+ mSwitchBar.show();
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+
+ mSwitchBar.removeOnSwitchChangeListener(this);
+ mSwitchBar.hide();
}
void updateCheckBox(CheckBoxPreference checkBox, boolean value) {
diff --git a/src/com/android/settings/DreamSettings.java b/src/com/android/settings/DreamSettings.java
index 9119f7b..1175639 100644
--- a/src/com/android/settings/DreamSettings.java
+++ b/src/com/android/settings/DreamSettings.java
@@ -16,7 +16,6 @@
package com.android.settings;
-import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -27,7 +26,6 @@
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -39,8 +37,6 @@
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RadioButton;
@@ -48,10 +44,12 @@
import android.widget.TextView;
import com.android.settings.DreamBackend.DreamInfo;
+import com.android.settings.widget.SwitchBar;
import java.util.List;
-public class DreamSettings extends SettingsPreferenceFragment {
+public class DreamSettings extends SettingsPreferenceFragment implements
+ SwitchBar.OnSwitchChangeListener {
private static final String TAG = DreamSettings.class.getSimpleName();
static final boolean DEBUG = false;
private static final int DIALOG_WHEN_TO_DREAM = 1;
@@ -62,6 +60,7 @@
private Context mContext;
private DreamBackend mBackend;
private DreamInfoAdapter mAdapter;
+ private SwitchBar mSwitchBar;
private Switch mSwitch;
private MenuItem[] mMenuItemsWhenEnabled;
private boolean mRefreshing;
@@ -83,46 +82,28 @@
logd("onCreate(%s)", icicle);
super.onCreate(icicle);
- final Activity activity = getActivity();
-
- mBackend = new DreamBackend(activity);
- mSwitch = new Switch(activity.getActionBar().getThemedContext());
- mSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- if (!mRefreshing) {
- mBackend.setEnabled(isChecked);
- refreshFromBackend();
- }
- }
- });
-
- final int padding = activity.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- mSwitch.setPaddingRelative(0, 0, padding, 0);
+ mBackend = new DreamBackend(getActivity());
setHasOptionsMenu(true);
}
@Override
+ public void onSwitchChanged(Switch switchView, boolean isChecked) {
+ if (!mRefreshing) {
+ mBackend.setEnabled(isChecked);
+ refreshFromBackend();
+ }
+ }
+
+ @Override
public void onStart() {
logd("onStart()");
super.onStart();
-
- final ActionBar actionBar = getActivity().getActionBar();
-
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
- ActionBar.DISPLAY_SHOW_CUSTOM);
- actionBar.setCustomView(mSwitch, new ActionBar.LayoutParams(
- ActionBar.LayoutParams.WRAP_CONTENT,
- ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
}
@Override
public void onDestroyView() {
logd("onDestroyView()");
- getActivity().getActionBar().setCustomView(null);
super.onDestroyView();
}
@@ -140,6 +121,10 @@
mAdapter = new DreamInfoAdapter(mContext);
listView.setAdapter(mAdapter);
+
+ final SettingsActivity sa = (SettingsActivity) getActivity();
+ mSwitchBar = sa.getSwitchBar();
+ mSwitch = mSwitchBar.getSwitch();
}
@Override
@@ -225,7 +210,11 @@
public void onPause() {
logd("onPause()");
super.onPause();
+
mContext.unregisterReceiver(mPackageReceiver);
+
+ mSwitchBar.removeOnSwitchChangeListener(this);
+ mSwitchBar.hide();
}
@Override
@@ -242,6 +231,9 @@
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
filter.addDataScheme(PACKAGE_SCHEME);
mContext.registerReceiver(mPackageReceiver , filter);
+
+ mSwitchBar.addOnSwitchChangeListener(this);
+ mSwitchBar.show();
}
public static int getSummaryResource(Context context) {
diff --git a/src/com/android/settings/HighlightingFragment.java b/src/com/android/settings/HighlightingFragment.java
index a1d6be0..3595eec 100644
--- a/src/com/android/settings/HighlightingFragment.java
+++ b/src/com/android/settings/HighlightingFragment.java
@@ -83,8 +83,9 @@
public void run() {
final int centerX = view.getWidth() / 2;
final int centerY = view.getHeight() / 2;
- highlight.setHotspot(0, centerX, centerY);
- highlight.clearHotspots();
+ highlight.setHotspot(centerX, centerY);
+ view.setPressed(true);
+ view.setPressed(false);
}
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
diff --git a/src/com/android/settings/NfcLockFragment.java b/src/com/android/settings/NfcLockFragment.java
deleted file mode 100644
index b7bf6f7..0000000
--- a/src/com/android/settings/NfcLockFragment.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source 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;
-
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.nfc.NfcAdapter;
-import android.nfc.NfcUnlock;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-
-import android.preference.PreferenceCategory;
-import android.util.Log;
-import com.android.internal.widget.LockPatternUtils;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import static android.preference.Preference.OnPreferenceClickListener;
-
-public class NfcLockFragment extends SettingsPreferenceFragment {
-
- private static final String NFC_PAIRING = "nfc_pairing";
- private static final String NFC_UNLOCK_ENABLED = "nfc_unlock_enabled";
- private static final String TAGS_CATEGORY = "nfc_unlock_tags_category";
- private static final String TAG_FORMAT = "Tag # %d";
-
- private NfcUnlock mNfcUnlock;
- private LockPatternUtils mLockPatternUtils;
- private NfcAdapter mNfcAdapter;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mNfcUnlock = NfcUnlock.getInstance(NfcAdapter.getDefaultAdapter(getActivity()));
- mLockPatternUtils = new LockPatternUtils(getActivity());
- mNfcAdapter = NfcAdapter.getDefaultAdapter(getActivity());
- addPreferencesFromResource(R.xml.security_settings_nfc_unlock);
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- boolean prefsEnabled = (mLockPatternUtils.isLockPasswordEnabled() ||
- mLockPatternUtils.isLockPatternEnabled()) && mNfcAdapter.isEnabled();
- CheckBoxPreference unlockPref = (CheckBoxPreference) findPreference(NFC_UNLOCK_ENABLED);
- unlockPref.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- mNfcUnlock.setNfcUnlockEnabled((Boolean) newValue);
- return true;
- }
- });
- Preference pairingPref = findPreference(NFC_PAIRING);
- unlockPref.setEnabled(prefsEnabled);
- pairingPref.setEnabled(prefsEnabled);
-
- long[] tagRegistryTimes = mNfcUnlock.getTagRegistryTimes();
- unlockPref.setChecked(mNfcUnlock.getNfcUnlockEnabled());
-
- final PreferenceCategory pairedTags = (PreferenceCategory) findPreference(TAGS_CATEGORY);
- pairedTags.setEnabled(prefsEnabled);
-
- loadTagList(tagRegistryTimes, pairedTags);
- }
-
- private void loadTagList(long[] tagRegistryTimes, final PreferenceCategory pairedTags) {
- pairedTags.removeAll();
-
- for (int i = 0; i < tagRegistryTimes.length; i++) {
-
- final Preference thisPreference = new Preference(getActivity());
- final long timestamp = tagRegistryTimes[i];
-
- thisPreference.setTitle(String.format(TAG_FORMAT, i));
- thisPreference.setSummary(
- DateFormat.getDateTimeInstance().format(new Date(tagRegistryTimes[i])));
- thisPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
- @Override
- public boolean onPreferenceClick(Preference preference) {
-
- AlertDialog.Builder deleteDialogBuilder = new AlertDialog.Builder(getActivity());
-
- deleteDialogBuilder.setTitle(thisPreference.getTitle());
- deleteDialogBuilder.setItems(new String[] {"Delete"},
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (which == 0) {
- if (mNfcUnlock.deregisterTag(timestamp)) {
- loadTagList(mNfcUnlock.getTagRegistryTimes(),
- pairedTags);
- }
- }
- }
- });
-
-
- deleteDialogBuilder.show();
-
- return true;
- }
- });
-
-
- pairedTags.addPreference(thisPreference);
- }
- }
-}
diff --git a/src/com/android/settings/PairNfcDevice.java b/src/com/android/settings/PairNfcDevice.java
deleted file mode 100644
index 7c75b9f..0000000
--- a/src/com/android/settings/PairNfcDevice.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source 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;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.PendingIntent;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.nfc.NfcAdapter;
-import android.nfc.NfcUnlock;
-import android.nfc.Tag;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.provider.Settings;
-import android.view.Menu;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-public class PairNfcDevice extends Activity {
- private static String TAG = PairNfcDevice.class.getName();
-
- private TextView mStatusText;
- private ImageView mStatusImage;
-
- private PendingIntent mPendingIntent;
- private NfcAdapter mAdapter;
-
- private Handler mHandler = new Handler();
- private PowerManager.WakeLock mWakeLock;
-
- private NfcUnlock mNfcUnlock;
-
- // If pairing fails, we immediately get a new intent that would not leave time for the user to
- // read the error message. So we'll just drop it and the user has to try again.
- // TEST
- private boolean mWaitingForDeviceDelayed;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_nfc_pairing);
-
- mStatusText = (TextView) findViewById(R.id.status_text);
- mStatusImage = (ImageView) findViewById(R.id.status_image);
-
- mAdapter = NfcAdapter.getDefaultAdapter(this);
- mPendingIntent = PendingIntent.getActivity(
- this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
-
- mNfcUnlock = NfcUnlock.getInstance(mAdapter);
-
- setWaitingForDeviceMode();
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- return false;
- }
-
- public void onPause() {
- super.onPause();
- mAdapter.disableForegroundDispatch(this);
- if (mWakeLock != null) {
- mWakeLock.release();
- }
- }
-
- public void onResume() {
- super.onResume();
-
- if (!mAdapter.isEnabled()) {
- // We need the user to start NFC.
- AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
- dialogBuilder.setMessage(R.string.enable_nfc);
- dialogBuilder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- startActivity(new Intent(Settings.ACTION_NFC_SETTINGS));
- }
- });
- dialogBuilder.show();
- }
-
- mAdapter.enableForegroundDispatch(this, mPendingIntent, null, null);
-
- if (mWakeLock == null) {
- PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
- mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, TAG);
- }
- mWakeLock.acquire();
- }
-
- @Override
- public void onNewIntent(Intent intent) {
- Tag tag = (Tag) intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
- if (!mWaitingForDeviceDelayed) {
- processTag(tag);
- }
- }
-
- private void processTag(Tag tag) {
- if (mNfcUnlock.registerTag(tag)) {
- setPairingSucceededMode();
- } else {
- setPairingFailedMode();
- }
- }
-
- private void setWaitingForDeviceModeDelayed(int delayInMs) {
- mWaitingForDeviceDelayed = true;
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- mWaitingForDeviceDelayed = false;
- setWaitingForDeviceMode();
- }
- }, delayInMs);
- }
-
- private void setWaitingForDeviceMode() {
- mStatusImage.setImageResource(R.drawable.no_ring_detected);
- mStatusText.setText(R.string.status_no_ring_detected);
- }
-
- private void setPairingFailedMode() {
- setErrorMode(R.string.status_error_pairing_failed);
- }
-
- private void setPairingSucceededMode() {
- mStatusImage.setImageResource(R.drawable.ring_paired);
- mStatusText.setText(R.string.status_device_paired);
-
- // Automatically quit.
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- finish();
- }
- }, 1000);
- }
-
- private void setErrorMode(int errorMsgResourceId) {
- mStatusText.setText(errorMsgResourceId);
- setWaitingForDeviceModeDelayed(2500);
- }
-}
diff --git a/src/com/android/settings/RingerVolumePreference.java b/src/com/android/settings/RingerVolumePreference.java
index dd81ded..0f28e06 100644
--- a/src/com/android/settings/RingerVolumePreference.java
+++ b/src/com/android/settings/RingerVolumePreference.java
@@ -34,6 +34,7 @@
import android.os.Message;
import android.os.Parcel;
import android.os.Parcelable;
+import android.preference.SeekBarVolumizer;
import android.preference.VolumePreference;
import android.provider.Settings;
import android.provider.Settings.System;
@@ -173,10 +174,10 @@
mSeekBars[i] = seekBar;
if (SEEKBAR_TYPE[i] == AudioManager.STREAM_MUSIC) {
mSeekBarVolumizer[i] = new SeekBarVolumizer(getContext(), seekBar,
- SEEKBAR_TYPE[i], getMediaVolumeUri(getContext()));
+ SEEKBAR_TYPE[i], getMediaVolumeUri(getContext()), this);
} else {
mSeekBarVolumizer[i] = new SeekBarVolumizer(getContext(), seekBar,
- SEEKBAR_TYPE[i]);
+ SEEKBAR_TYPE[i], null, this);
}
}
@@ -275,7 +276,7 @@
}
@Override
- protected void onSampleStarting(SeekBarVolumizer volumizer) {
+ public void onSampleStarting(SeekBarVolumizer volumizer) {
super.onSampleStarting(volumizer);
for (SeekBarVolumizer vol : mSeekBarVolumizer) {
if (vol != null && vol != volumizer) vol.stopSample();
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 0ab9ea7..00d1d89 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -20,7 +20,6 @@
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
import android.app.Activity;
-import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
@@ -30,7 +29,6 @@
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.content.res.Resources;
-import android.nfc.NfcUnlock;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
@@ -54,8 +52,6 @@
import java.util.ArrayList;
import java.util.List;
-import static com.android.settings.search.SearchIndexableResources.RANK_SECURITY;
-
/**
* Gesture lock pattern settings.
*/
@@ -65,7 +61,6 @@
// Lock Settings
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
- private static final String KEY_NFC_UNLOCK_SET_OR_CHANGE = "nfc_unlock_set_or_change";
private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING =
"biometric_weak_improve_matching";
private static final String KEY_BIOMETRIC_WEAK_LIVELINESS = "biometric_weak_liveliness";
@@ -238,19 +233,6 @@
}
}
- // don't display NFC unlock settings if the prop is not enabled
- if (!NfcUnlock.getPropertyEnabled()) {
- PreferenceGroup securityCategory =
- (PreferenceGroup) root.findPreference(KEY_SECURITY_CATEGORY);
-
- if (securityCategory != null) {
- Preference preference = root.findPreference(KEY_NFC_UNLOCK_SET_OR_CHANGE);
- if (preference != null) {
- securityCategory.removePreference(preference);
- }
- }
- }
-
// Append the rest of the settings
addPreferencesFromResource(R.xml.security_settings_misc);
@@ -490,9 +472,6 @@
if (KEY_UNLOCK_SET_OR_CHANGE.equals(key)) {
startFragment(this, "com.android.settings.ChooseLockGeneric$ChooseLockGenericFragment",
SET_OR_CHANGE_LOCK_METHOD_REQUEST, null);
- } else if (KEY_NFC_UNLOCK_SET_OR_CHANGE.equals(key)) {
- startFragment(this, "com.android.settings.NfcLockFragment",
- SET_OR_CHANGE_LOCK_METHOD_REQUEST, null);
} else if (KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING.equals(key)) {
ChooseLockSettingsHelper helper =
new ChooseLockSettingsHelper(this.getActivity(), this);
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 25378086..38176eb 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -88,6 +88,9 @@
public static class PrintJobSettingsActivity extends SettingsActivity { /* empty */ }
public static class ZenModeSettingsActivity extends SettingsActivity { /* empty */ }
public static class NotificationSettingsActivity extends SettingsActivity { /* empty */ }
+ public static class NotificationDisplaySettingsActivity extends SettingsActivity { /* empty */ }
+ public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ }
+ public static class TouchSoundSettingsActivity extends SettingsActivity { /* empty */ }
public static class TopLevelSettings extends SettingsActivity { /* empty */ }
}
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index fb2f0ac..5b78950 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -470,15 +470,13 @@
ArrayList<DashboardCategory> categories =
savedState.getParcelableArrayList(SAVE_KEY_CATEGORIES);
if (categories != null) {
+ mCategories.clear();
mCategories.addAll(categories);
setTitleFromBackStack();
}
mDisplayHomeAsUpEnabled = savedState.getBoolean(SAVE_KEY_SHOW_HOME_AS_UP);
} else {
- // We need to build the Categories in all cases
- buildDashboardCategories(mCategories);
-
if (!mIsShowingDashboard) {
final ComponentName cn = getIntent().getComponent();
// No UP is we are launched thru a Settings shortcut
@@ -493,6 +491,9 @@
switchToFragment( initialFragmentName, initialArguments, true, false,
mInitialTitle, false);
} else {
+ // We need to build the Categories in all cases
+ buildDashboardCategories(mCategories);
+
// No UP if we are displaying the main Dashboard
mDisplayHomeAsUpEnabled = false;
if (mCategories.size() > 0) {
@@ -504,34 +505,35 @@
}
mActionBar = getActionBar();
- mActionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled);
- mActionBar.setHomeButtonEnabled(mDisplayHomeAsUpEnabled);
-
+ if (mActionBar != null) {
+ mActionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled);
+ mActionBar.setHomeButtonEnabled(mDisplayHomeAsUpEnabled);
+ }
mSwitchBar = (SwitchBar) findViewById(R.id.switch_bar);
// see if we should show Back/Next buttons
Intent intent = getIntent();
if (intent.getBooleanExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)) {
- View buttonBar = findViewById(com.android.internal.R.id.button_bar);
+ View buttonBar = findViewById(R.id.button_bar);
if (buttonBar != null) {
buttonBar.setVisibility(View.VISIBLE);
- Button backButton = (Button)findViewById(com.android.internal.R.id.back_button);
+ Button backButton = (Button)findViewById(R.id.back_button);
backButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_CANCELED);
finish();
}
});
- Button skipButton = (Button)findViewById(com.android.internal.R.id.skip_button);
+ Button skipButton = (Button)findViewById(R.id.skip_button);
skipButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_OK);
finish();
}
});
- mNextButton = (Button)findViewById(com.android.internal.R.id.next_button);
+ mNextButton = (Button)findViewById(R.id.next_button);
mNextButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_OK);
@@ -632,8 +634,6 @@
mDevelopmentPreferences.registerOnSharedPreferenceChangeListener(
mDevelopmentPreferencesListener);
- invalidateCategories();
-
registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
mDynamicIndexableContentMonitor.register(this);
@@ -649,17 +649,17 @@
unregisterReceiver(mBatteryInfoReceiver);
- mDevelopmentPreferences.unregisterOnSharedPreferenceChangeListener(
- mDevelopmentPreferencesListener);
-
- mDevelopmentPreferencesListener = null;
-
mDynamicIndexableContentMonitor.unregister();
}
@Override
public void onDestroy() {
super.onDestroy();
+
+ mDevelopmentPreferences.unregisterOnSharedPreferenceChangeListener(
+ mDevelopmentPreferencesListener);
+ mDevelopmentPreferencesListener = null;
+
if (mListeningToAccountUpdates) {
AccountManager.get(this).removeOnAccountsUpdatedListener(this);
}
@@ -816,7 +816,7 @@
* @param categories The list in which to place the tiles categories.
*/
private void buildDashboardCategories(List<DashboardCategory> categories) {
- mCategories.clear();
+ categories.clear();
loadCategoriesFromResource(R.xml.dashboard_categories, categories);
updateTilesList(categories);
}
@@ -1249,7 +1249,8 @@
if (current != null && current instanceof SearchResultsSummary) {
mSearchResultsFragment = (SearchResultsSummary) current;
} else {
- final boolean isShowingSwitchBar = mSwitchBar.isShowing();
+ final boolean isShowingSwitchBar =
+ (mSwitchBar != null) ? mSwitchBar.isShowing() : false;
String title = getString(R.string.search_results_title);
mSearchResultsFragment = (SearchResultsSummary) switchToFragment(
SearchResultsSummary.class.getName(), null, false, true, title,
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 2c290b1..9fbdebe 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -183,10 +183,12 @@
listView.postDelayed(new Runnable() {
@Override
public void run() {
- final int centerX = listView.getWidth() / 2;
- final int centerY = listView.getChildAt(0).getHeight() / 2;
- highlight.setHotspot(0, centerX, centerY);
- highlight.clearHotspots();
+ final View v = listView.getChildAt(0);
+ final int centerX = v.getWidth() / 2;
+ final int centerY = v.getHeight() / 2;
+ highlight.setHotspot(centerX, centerY);
+ v.setPressed(true);
+ v.setPressed(false);
((PreferenceGroupAdapter) adapter).setHighlighted(-1);
}
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
@@ -201,8 +203,9 @@
preferenceView.setBackground(highlight);
final int centerX = preferenceView.getWidth() / 2;
final int centerY = preferenceView.getHeight() / 2;
- highlight.setHotspot(0, centerX, centerY);
- highlight.clearHotspots();
+ highlight.setHotspot(centerX, centerY);
+ preferenceView.setPressed(true);
+ preferenceView.setPressed(false);
}
}
}
diff --git a/src/com/android/settings/TrustAgentSettings.java b/src/com/android/settings/TrustAgentSettings.java
index f209ca5..d31436d 100644
--- a/src/com/android/settings/TrustAgentSettings.java
+++ b/src/com/android/settings/TrustAgentSettings.java
@@ -158,8 +158,8 @@
&& type != XmlPullParser.START_TAG) {
}
String nodeName = parser.getName();
- if (!"trust_agent".equals(nodeName)) {
- Slog.w(TAG, "Meta-data does not start with trust_agent tag");
+ if (!"trust-agent".equals(nodeName)) {
+ Slog.w(TAG, "Meta-data does not start with trust-agent tag");
return null;
}
TypedArray sa = res
diff --git a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
index 810b8b5..5dcf121 100644
--- a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
+++ b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
@@ -16,8 +16,6 @@
package com.android.settings.accessibility;
-import android.app.ActionBar;
-import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
@@ -29,7 +27,6 @@
import android.preference.PreferenceFrameLayout;
import android.preference.Preference.OnPreferenceChangeListener;
import android.provider.Settings;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -39,9 +36,12 @@
import com.android.internal.widget.SubtitleView;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.SwitchBar;
+import com.android.settings.widget.ToggleSwitch;
+import com.android.settings.widget.ToggleSwitch.OnBeforeCheckedChangeListener;
import java.util.Locale;
@@ -69,6 +69,7 @@
private CaptioningManager mCaptioningManager;
private SubtitleView mPreviewText;
private View mPreviewWindow;
+ private SwitchBar mSwitchBar;
private ToggleSwitch mToggleSwitch;
// Standard options.
@@ -129,14 +130,9 @@
mPreviewText = (SubtitleView) view.findViewById(R.id.preview_text);
mPreviewText.setVisibility(enabled ? View.VISIBLE : View.INVISIBLE);
- final Context context = getActivity().getActionBar().getThemedContext();
- final int padding = context.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- mToggleSwitch = new ToggleSwitch(context);
- mToggleSwitch.setPaddingRelative(0, 0, padding, 0);
- mToggleSwitch.setLayoutParams(new ActionBar.LayoutParams(
- ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
+ SettingsActivity activity = (SettingsActivity) getActivity();
+ mSwitchBar = activity.getSwitchBar();
+ mToggleSwitch = mSwitchBar.getSwitch();
mToggleSwitch.setCheckedInternal(enabled);
mPreviewWindow = view.findViewById(R.id.preview_window);
@@ -149,14 +145,12 @@
@Override
public void onResume() {
super.onResume();
-
- installActionBarToggleSwitch();
+ installSwitchBarToggleSwitch();
}
@Override
public void onPause() {
- removeActionBarToggleSwitch();
-
+ removeSwitchBarToggleSwitch();
super.onPause();
}
@@ -205,7 +199,7 @@
}
}
- protected void onInstallActionBarToggleSwitch() {
+ protected void onInstallSwitchBarToggleSwitch() {
mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
@@ -221,20 +215,14 @@
});
}
- private void installActionBarToggleSwitch() {
- final ActionBar ab = getActivity().getActionBar();
- ab.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM);
- ab.setCustomView(mToggleSwitch);
-
- onInstallActionBarToggleSwitch();
+ private void installSwitchBarToggleSwitch() {
+ onInstallSwitchBarToggleSwitch();
+ mSwitchBar.show();
}
- private void removeActionBarToggleSwitch() {
+ private void removeSwitchBarToggleSwitch() {
+ mSwitchBar.hide();
mToggleSwitch.setOnBeforeCheckedChangeListener(null);
-
- final ActionBar ab = getActivity().getActionBar();
- ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_CUSTOM);
- ab.setCustomView(null);
}
private void initializeAllPreferences() {
diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
index db473f8..a446f49 100644
--- a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
@@ -37,7 +37,8 @@
import android.widget.TextView;
import com.android.settings.R;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.ToggleSwitch;
+import com.android.settings.widget.ToggleSwitch.OnBeforeCheckedChangeListener;
import java.util.Collections;
import java.util.HashSet;
@@ -280,8 +281,8 @@
}
@Override
- protected void onInstallActionBarToggleSwitch() {
- super.onInstallActionBarToggleSwitch();
+ protected void onInstallSwitchBarToggleSwitch() {
+ super.onInstallSwitchBarToggleSwitch();
mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
diff --git a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
index 384aafc..b910f796a 100644
--- a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
@@ -16,25 +16,20 @@
package com.android.settings.accessibility;
-import android.accessibilityservice.AccessibilityService;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceScreen;
-import android.preference.SeekBarPreference;
import android.provider.Settings;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.Switch;
import com.android.settings.R;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.SwitchBar;
public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceFragment
- implements Preference.OnPreferenceChangeListener {
+ implements Preference.OnPreferenceChangeListener, SwitchBar.OnSwitchChangeListener {
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED;
private static final String TYPE = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER;
private static final String QUICK_SETTING_ENABLED =
@@ -82,17 +77,18 @@
}
@Override
- protected void onInstallActionBarToggleSwitch() {
- super.onInstallActionBarToggleSwitch();
+ protected void onInstallSwitchBarToggleSwitch() {
+ super.onInstallSwitchBarToggleSwitch();
mToggleSwitch.setCheckedInternal(
Settings.Secure.getInt(getContentResolver(), ENABLED, 0) == 1);
- mToggleSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton button, boolean checked) {
- onPreferenceToggled(mPreferenceKey, checked);
- }
- });
+ mSwitchBar.addOnSwitchChangeListener(this);
+ }
+
+ @Override
+ protected void onRemoveSwitchBarToggleSwitch() {
+ super.onRemoveSwitchBarToggleSwitch();
+ mSwitchBar.removeOnSwitchChangeListener(this);
}
private void initPreferences() {
@@ -111,4 +107,9 @@
getString(R.string.simulate_color_space)));
}
}
+
+ @Override
+ public void onSwitchChanged(Switch switchView, boolean isChecked) {
+ onPreferenceToggled(mPreferenceKey, isChecked);
+ }
}
diff --git a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
index 6558cc7..331c0e3 100644
--- a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
@@ -16,16 +16,12 @@
package com.android.settings.accessibility;
-import android.app.ActionBar;
-import android.app.Activity;
-import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceScreen;
-import android.view.Gravity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -37,10 +33,13 @@
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.widget.SwitchBar;
+import com.android.settings.widget.ToggleSwitch;
public abstract class ToggleFeaturePreferenceFragment
extends SettingsPreferenceFragment {
+ protected SwitchBar mSwitchBar;
protected ToggleSwitch mToggleSwitch;
protected String mPreferenceKey;
@@ -88,14 +87,9 @@
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
- final Context context = getActivity().getActionBar().getThemedContext();
- final int padding = context.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- mToggleSwitch = new ToggleSwitch(context);
- mToggleSwitch.setPaddingRelative(0, 0, padding, 0);
- mToggleSwitch.setLayoutParams(new ActionBar.LayoutParams(
- ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
+ SettingsActivity activity = (SettingsActivity) getActivity();
+ mSwitchBar = activity.getSwitchBar();
+ mToggleSwitch = mSwitchBar.getSwitch();
onProcessArguments(getArguments());
}
@@ -124,28 +118,26 @@
menuItem.setIntent(mSettingsIntent);
}
- protected void onInstallActionBarToggleSwitch() {
+ protected void onInstallSwitchBarToggleSwitch() {
// Implement this to set a checked listener.
}
- private void installActionBarToggleSwitch() {
- final ActionBar ab = getActivity().getActionBar();
- ab.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM);
- ab.setCustomView(mToggleSwitch);
+ protected void onRemoveSwitchBarToggleSwitch() {
+ // Implement this to reset a checked listener.
+ }
- onInstallActionBarToggleSwitch();
+ private void installActionBarToggleSwitch() {
+ mSwitchBar.show();
+ onInstallSwitchBarToggleSwitch();
}
private void removeActionBarToggleSwitch() {
mToggleSwitch.setOnBeforeCheckedChangeListener(null);
-
- final ActionBar ab = getActivity().getActionBar();
- ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_CUSTOM);
- ab.setCustomView(null);
+ onRemoveSwitchBarToggleSwitch();
+ mSwitchBar.hide();
}
public void setTitle(String title) {
- final SettingsActivity activity = (SettingsActivity) getActivity();
getActivity().setTitle(title);
}
diff --git a/src/com/android/settings/accessibility/ToggleGlobalGesturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleGlobalGesturePreferenceFragment.java
index f4ac2cc..782e7a5 100644
--- a/src/com/android/settings/accessibility/ToggleGlobalGesturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleGlobalGesturePreferenceFragment.java
@@ -18,7 +18,8 @@
import android.provider.Settings;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.ToggleSwitch;
+import com.android.settings.widget.ToggleSwitch.OnBeforeCheckedChangeListener;
public class ToggleGlobalGesturePreferenceFragment
extends ToggleFeaturePreferenceFragment {
@@ -29,8 +30,8 @@
}
@Override
- protected void onInstallActionBarToggleSwitch() {
- super.onInstallActionBarToggleSwitch();
+ protected void onInstallSwitchBarToggleSwitch() {
+ super.onInstallSwitchBarToggleSwitch();
mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
diff --git a/src/com/android/settings/accessibility/ToggleInversionPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleInversionPreferenceFragment.java
index 92a778e..b6d5569 100644
--- a/src/com/android/settings/accessibility/ToggleInversionPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleInversionPreferenceFragment.java
@@ -16,24 +16,18 @@
package com.android.settings.accessibility;
-import android.accessibilityservice.AccessibilityService;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
-import android.preference.ListPreference;
import android.preference.Preference;
-import android.preference.PreferenceScreen;
-import android.preference.SeekBarPreference;
import android.provider.Settings;
import android.view.View;
-import android.view.accessibility.AccessibilityManager;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.Switch;
import com.android.settings.R;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.SwitchBar;
public class ToggleInversionPreferenceFragment extends ToggleFeaturePreferenceFragment
- implements Preference.OnPreferenceChangeListener {
+ implements Preference.OnPreferenceChangeListener, SwitchBar.OnSwitchChangeListener {
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED;
private static final String QUICK_SETTING_ENABLED =
Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_QUICK_SETTING_ENABLED;
@@ -74,17 +68,18 @@
}
@Override
- protected void onInstallActionBarToggleSwitch() {
- super.onInstallActionBarToggleSwitch();
+ protected void onInstallSwitchBarToggleSwitch() {
+ super.onInstallSwitchBarToggleSwitch();
mToggleSwitch.setCheckedInternal(
Settings.Secure.getInt(getContentResolver(), ENABLED, 0) == 1);
- mToggleSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton button, boolean checked) {
- onPreferenceToggled(mPreferenceKey, checked);
- }
- });
+ mSwitchBar.addOnSwitchChangeListener(this);
+ }
+
+ @Override
+ protected void onRemoveSwitchBarToggleSwitch() {
+ super.onRemoveSwitchBarToggleSwitch();
+ mSwitchBar.removeOnSwitchChangeListener(this);
}
private void initPreferences() {
@@ -92,4 +87,9 @@
Settings.Secure.getInt(getContentResolver(), QUICK_SETTING_ENABLED, 0) == 1);
mEnableQuickSetting.setOnPreferenceChangeListener(this);
}
+
+ @Override
+ public void onSwitchChanged(Switch switchView, boolean isChecked) {
+ onPreferenceToggled(mPreferenceKey, isChecked);
+ }
}
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 27d07d2..8202a2a 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -18,7 +18,8 @@
import android.provider.Settings;
-import com.android.settings.accessibility.ToggleSwitch.OnBeforeCheckedChangeListener;
+import com.android.settings.widget.ToggleSwitch;
+import com.android.settings.widget.ToggleSwitch.OnBeforeCheckedChangeListener;
public class ToggleScreenMagnificationPreferenceFragment
extends ToggleFeaturePreferenceFragment {
@@ -29,8 +30,8 @@
}
@Override
- protected void onInstallActionBarToggleSwitch() {
- super.onInstallActionBarToggleSwitch();
+ protected void onInstallSwitchBarToggleSwitch() {
+ super.onInstallSwitchBarToggleSwitch();
mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
diff --git a/src/com/android/settings/applications/AppOpsSummary.java b/src/com/android/settings/applications/AppOpsSummary.java
index 4cee8e5..92515ac 100644
--- a/src/com/android/settings/applications/AppOpsSummary.java
+++ b/src/com/android/settings/applications/AppOpsSummary.java
@@ -16,7 +16,6 @@
package com.android.settings.applications;
-import android.app.AppOpsManager;
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
diff --git a/src/com/android/settings/dashboard/DashboardSummary.java b/src/com/android/settings/dashboard/DashboardSummary.java
index 6cd6d7a..faafad1 100644
--- a/src/com/android/settings/dashboard/DashboardSummary.java
+++ b/src/com/android/settings/dashboard/DashboardSummary.java
@@ -75,8 +75,6 @@
mAuthHelper = ((SettingsActivity) context).getAuthenticatorHelper();
- rebuildUI(getActivity());
-
return rootView;
}
@@ -121,18 +119,20 @@
}
@Override
- public void onStart() {
- super.onStart();
+ public void onResume() {
+ super.onResume();
if (!mAccountListenerAdded) {
AccountManager.get(getActivity()).addOnAccountsUpdatedListener(this, null, false);
mAccountListenerAdded = true;
}
+
+ rebuildCategories();
}
@Override
- public void onStop() {
- super.onStop();
+ public void onDestroy() {
+ super.onDestroy();
if (mAccountListenerAdded) {
AccountManager.get(getActivity()).removeOnAccountsUpdatedListener(this);
diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java
index e45c585..862b53b 100644
--- a/src/com/android/settings/dashboard/SearchResultsSummary.java
+++ b/src/com/android/settings/dashboard/SearchResultsSummary.java
@@ -448,6 +448,8 @@
SuggestionItem item = (SuggestionItem) getItem(position);
query.setText(item.query);
+ view.setBackgroundResource(R.drawable.dashboard_tile_background);
+
return view;
}
}
@@ -621,6 +623,8 @@
imageView.setBackgroundResource(R.drawable.empty_icon);
}
+ view.setBackgroundResource(R.drawable.dashboard_tile_background);
+
return view;
}
}
diff --git a/src/com/android/settings/nfc/AndroidBeam.java b/src/com/android/settings/nfc/AndroidBeam.java
index f289550..2d8d6fe 100644
--- a/src/com/android/settings/nfc/AndroidBeam.java
+++ b/src/com/android/settings/nfc/AndroidBeam.java
@@ -16,88 +16,75 @@
package com.android.settings.nfc;
-import android.app.ActionBar;
-import android.app.Activity;
import android.app.Fragment;
import android.nfc.NfcAdapter;
import android.os.Bundle;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.CompoundButton;
import android.widget.Switch;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
+import com.android.settings.widget.SwitchBar;
public class AndroidBeam extends Fragment
- implements CompoundButton.OnCheckedChangeListener {
+ implements SwitchBar.OnSwitchChangeListener {
private View mView;
private NfcAdapter mNfcAdapter;
- private Switch mActionBarSwitch;
+ private SwitchBar mSwitchBar;
+ private Switch mSwitch;
private CharSequence mOldActivityTitle;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- Activity activity = getActivity();
- mActionBarSwitch = new Switch(activity.getActionBar().getThemedContext());
+ SettingsActivity activity = (SettingsActivity) getActivity();
- if (activity instanceof SettingsActivity) {
- final int padding = activity.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- mActionBarSwitch.setPaddingRelative(0, 0, padding, 0);
- activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
- ActionBar.DISPLAY_SHOW_CUSTOM);
- activity.getActionBar().setCustomView(mActionBarSwitch, new ActionBar.LayoutParams(
- ActionBar.LayoutParams.WRAP_CONTENT,
- ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
- mOldActivityTitle = activity.getActionBar().getTitle();
- activity.getActionBar().setTitle(R.string.android_beam_settings_title);
- }
-
- mActionBarSwitch.setOnCheckedChangeListener(this);
+ mOldActivityTitle = activity.getActionBar().getTitle();
+ activity.getActionBar().setTitle(R.string.android_beam_settings_title);
mNfcAdapter = NfcAdapter.getDefaultAdapter(getActivity());
- mActionBarSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
+
+ mSwitchBar = activity.getSwitchBar();
+ mSwitch = mSwitchBar.getSwitch();
+ mSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mView = inflater.inflate(R.layout.android_beam, container, false);
- initView(mView);
+
+ mSwitchBar.addOnSwitchChangeListener(this);
+ mSwitchBar.show();
+ mSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
+
return mView;
}
@Override
public void onDestroyView() {
super.onDestroyView();
- getActivity().getActionBar().setCustomView(null);
+ mSwitchBar.removeOnSwitchChangeListener(this);
+ mSwitchBar.hide();
if (mOldActivityTitle != null) {
getActivity().getActionBar().setTitle(mOldActivityTitle);
}
}
- private void initView(View view) {
- mActionBarSwitch.setOnCheckedChangeListener(this);
- mActionBarSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
- }
-
@Override
- public void onCheckedChanged(CompoundButton buttonView, boolean desiredState) {
+ public void onSwitchChanged(Switch switchView, boolean desiredState) {
boolean success = false;
- mActionBarSwitch.setEnabled(false);
+ mSwitch.setEnabled(false);
if (desiredState) {
success = mNfcAdapter.enableNdefPush();
} else {
success = mNfcAdapter.disableNdefPush();
}
if (success) {
- mActionBarSwitch.setChecked(desiredState);
+ mSwitch.setChecked(desiredState);
}
- mActionBarSwitch.setEnabled(true);
+ mSwitch.setEnabled(true);
}
}
diff --git a/src/com/android/settings/nfc/PaymentBackend.java b/src/com/android/settings/nfc/PaymentBackend.java
index f84bc74..25572a7 100644
--- a/src/com/android/settings/nfc/PaymentBackend.java
+++ b/src/com/android/settings/nfc/PaymentBackend.java
@@ -24,6 +24,7 @@
import android.nfc.cardemulation.ApduServiceInfo;
import android.nfc.cardemulation.CardEmulation;
import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
import java.util.ArrayList;
import java.util.List;
@@ -74,6 +75,20 @@
return appInfos;
}
+ boolean isForegroundMode() {
+ try {
+ return Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.NFC_PAYMENT_FOREGROUND) != 0;
+ } catch (SettingNotFoundException e) {
+ return false;
+ }
+ }
+
+ void setForegroundMode(boolean foreground) {
+ Settings.Secure.putInt(mContext.getContentResolver(),
+ Settings.Secure.NFC_PAYMENT_FOREGROUND, foreground ? 1 : 0) ;
+ }
+
ComponentName getDefaultPaymentApp() {
String componentString = Settings.Secure.getString(mContext.getContentResolver(),
Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT);
diff --git a/src/com/android/settings/nfc/PaymentDefaultDialog.java b/src/com/android/settings/nfc/PaymentDefaultDialog.java
index 61c6fdb..6bc29e1 100644
--- a/src/com/android/settings/nfc/PaymentDefaultDialog.java
+++ b/src/com/android/settings/nfc/PaymentDefaultDialog.java
@@ -19,14 +19,7 @@
import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.nfc.cardemulation.ApduServiceInfo;
import android.nfc.cardemulation.CardEmulation;
-import android.nfc.cardemulation.HostApduService;
-import android.nfc.cardemulation.OffHostApduService;
import android.os.Bundle;
import android.util.Log;
@@ -35,11 +28,8 @@
import com.android.settings.R;
import com.android.settings.nfc.PaymentBackend.PaymentAppInfo;
-import java.io.IOException;
import java.util.List;
-import org.xmlpull.v1.XmlPullParserException;
-
public final class PaymentDefaultDialog extends AlertActivity implements
DialogInterface.OnClickListener {
diff --git a/src/com/android/settings/nfc/PaymentSettings.java b/src/com/android/settings/nfc/PaymentSettings.java
index 7548c50..df4e396 100644
--- a/src/com/android/settings/nfc/PaymentSettings.java
+++ b/src/com/android/settings/nfc/PaymentSettings.java
@@ -22,7 +22,9 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.preference.CheckBoxPreference;
import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.provider.Settings;
@@ -48,7 +50,7 @@
import java.util.List;
public class PaymentSettings extends SettingsPreferenceFragment implements
- OnClickListener {
+ OnClickListener, OnPreferenceChangeListener {
public static final String TAG = "PaymentSettings";
private LayoutInflater mInflater;
private PaymentBackend mPaymentBackend;
@@ -67,6 +69,7 @@
public void refresh() {
PreferenceManager manager = getPreferenceManager();
PreferenceScreen screen = manager.createPreferenceScreen(getActivity());
+
// Get all payment services
List<PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos();
if (appInfos != null && appInfos.size() > 0) {
@@ -92,6 +95,13 @@
emptyImage.setVisibility(View.VISIBLE);
getListView().setVisibility(View.GONE);
} else {
+ CheckBoxPreference foreground = new CheckBoxPreference(getActivity());
+ boolean foregroundMode = mPaymentBackend.isForegroundMode();
+ foreground.setPersistent(false);
+ foreground.setTitle(getString(R.string.nfc_payment_favor_foreground));
+ foreground.setChecked(foregroundMode);
+ foreground.setOnPreferenceChangeListener(this);
+ screen.addPreference(foreground);
emptyText.setVisibility(View.GONE);
learnMore.setVisibility(View.GONE);
emptyImage.setVisibility(View.GONE);
@@ -207,14 +217,25 @@
protected void onBindView(View view) {
super.onBindView(view);
- view.setOnClickListener(listener);
- view.setTag(appInfo);
-
RadioButton radioButton = (RadioButton) view.findViewById(android.R.id.button1);
radioButton.setChecked(appInfo.isDefault);
+ radioButton.setOnClickListener(listener);
+ radioButton.setTag(appInfo);
ImageView banner = (ImageView) view.findViewById(R.id.banner);
banner.setImageDrawable(appInfo.banner);
+ banner.setOnClickListener(listener);
+ banner.setTag(appInfo);
+ }
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ if (preference instanceof CheckBoxPreference) {
+ mPaymentBackend.setForegroundMode(((Boolean) newValue).booleanValue());
+ return true;
+ } else {
+ return false;
}
}
}
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index c63ae63..91035732 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -29,11 +29,7 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.Signature;
-import android.graphics.Paint;
-import android.graphics.Path;
import android.graphics.drawable.Drawable;
-import android.graphics.drawable.ShapeDrawable;
-import android.graphics.drawable.shapes.PathShape;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
@@ -64,6 +60,7 @@
import java.util.Comparator;
import java.util.List;
+/** Just a sectioned list of installed applications, nothing else to index **/
public class AppNotificationSettings extends ListFragment {
private static final String TAG = "AppNotificationSettings";
private static final boolean DEBUG = true;
@@ -187,6 +184,9 @@
final TextView title = (TextView) layout.findViewById(android.R.id.title);
title.setText(row.label);
final CheckBox showBox = (CheckBox) layout.findViewById(android.R.id.button1);
+ final CheckBox priBox = (CheckBox) layout.findViewById(android.R.id.button2);
+ final CheckBox senBox = (CheckBox) layout.findViewById(android.R.id.button3);
+
showBox.setChecked(!row.banned);
final OnCheckedChangeListener showListener = new OnCheckedChangeListener() {
@Override
@@ -195,6 +195,8 @@
if (success) {
row.banned = !isChecked;
mAdapter.bindView(v, row, true /*animate*/);
+ priBox.setEnabled(!row.banned);
+ senBox.setEnabled(!row.banned);
} else {
showBox.setOnCheckedChangeListener(null);
showBox.setChecked(!isChecked);
@@ -203,6 +205,44 @@
}
};
showBox.setOnCheckedChangeListener(showListener);
+
+ priBox.setChecked(row.priority);
+ final OnCheckedChangeListener priListener = new OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ boolean success = mBackend.setHighPriority(row.pkg, row.uid, isChecked);
+ if (success) {
+ row.priority = isChecked;
+ mAdapter.bindView(v, row, true /*animate*/);
+ } else {
+ priBox.setOnCheckedChangeListener(null);
+ priBox.setChecked(!isChecked);
+ priBox.setOnCheckedChangeListener(this);
+ }
+ }
+ };
+ priBox.setOnCheckedChangeListener(priListener);
+
+ senBox.setChecked(row.sensitive);
+ final OnCheckedChangeListener senListener = new OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ boolean success = mBackend.setSensitive(row.pkg, row.uid, isChecked);
+ if (success) {
+ row.sensitive = isChecked;
+ mAdapter.bindView(v, row, true /*animate*/);
+ } else {
+ senBox.setOnCheckedChangeListener(null);
+ senBox.setChecked(!isChecked);
+ senBox.setOnCheckedChangeListener(this);
+ }
+ }
+ };
+ senBox.setOnCheckedChangeListener(senListener);
+
+ priBox.setEnabled(!row.banned);
+ senBox.setEnabled(!row.banned);
+
final AlertDialog d = new AlertDialog.Builder(mContext)
.setView(layout)
.setPositiveButton(R.string.app_notifications_dialog_done, null)
@@ -214,48 +254,16 @@
ViewGroup row;
ViewGroup appButton;
ImageView icon;
- ImageView banBadge;
- ImageView priBadge;
TextView title;
+ TextView subtitle;
View settingsDivider;
ImageView settingsButton;
View rowDivider;
}
private class NotificationAppAdapter extends ArrayAdapter<Row> implements SectionIndexer {
- private final ShapeDrawable mBanShape, mPriShape;
-
public NotificationAppAdapter(Context context) {
super(context, 0, 0);
- final int s = context.getResources()
- .getDimensionPixelSize(R.dimen.notification_app_icon_badge_size);
- mBanShape = shape(banPath(s), s);
- mPriShape = shape(priPath(s), s);
- }
-
- private ShapeDrawable shape(Path path, int s) {
- final ShapeDrawable sd = new ShapeDrawable(new PathShape(path, s, s));
- sd.getPaint().setStyle(Paint.Style.STROKE);
- sd.getPaint().setColor(0xffffffff);
- sd.getPaint().setStrokeWidth(s / 12);
- sd.setIntrinsicWidth(s);
- sd.setIntrinsicHeight(s);
- return sd;
- }
-
- private Path banPath(int s) {
- final Path p = new Path();
- final int d = s / 5;
- p.moveTo(d, d); p.lineTo(s - d, s - d);
- p.moveTo(d, s - d); p.lineTo(s - d, d);
- return p;
- }
-
- private Path priPath(int s) {
- final Path p = new Path();
- final int d = s / 5;
- p.moveTo(s / 2, d); p.lineTo(s / 2, s - d);
- return p;
}
@Override
@@ -302,11 +310,8 @@
vh.appButton = (ViewGroup) v.findViewById(android.R.id.button1);
vh.appButton.setLayoutTransition(new LayoutTransition());
vh.icon = (ImageView) v.findViewById(android.R.id.icon);
- vh.banBadge = (ImageView) v.findViewById(android.R.id.icon1);
- vh.banBadge.setImageDrawable(mBanShape);
- vh.priBadge = (ImageView) v.findViewById(android.R.id.icon2);
- vh.priBadge.setImageDrawable(mPriShape);
vh.title = (TextView) v.findViewById(android.R.id.title);
+ vh.subtitle = (TextView) v.findViewById(android.R.id.text1);
vh.settingsDivider = v.findViewById(R.id.settings_divider);
vh.settingsButton = (ImageView) v.findViewById(android.R.id.button2);
vh.rowDivider = v.findViewById(R.id.row_divider);
@@ -326,6 +331,7 @@
public void bindView(final View view, Row r, boolean animate) {
if (!(r instanceof AppRow)) {
+ // it's a section row
TextView tv = (TextView)view;
tv.setText(r.section);
return;
@@ -343,9 +349,10 @@
});
enableLayoutTransitions(vh.appButton, animate);
vh.icon.setImageDrawable(row.icon);
- vh.banBadge.setVisibility(row.banned ? View.VISIBLE : View.GONE);
- vh.priBadge.setVisibility(row.priority ? View.VISIBLE : View.GONE);
vh.title.setText(row.label);
+ final String sub = getSubtitle(row);
+ vh.subtitle.setText(sub);
+ vh.subtitle.setVisibility(!sub.isEmpty() ? View.VISIBLE : View.GONE);
final boolean showSettings = !row.banned && row.settingsIntent != null;
vh.settingsDivider.setVisibility(showSettings ? View.VISIBLE : View.GONE);
vh.settingsButton.setVisibility(showSettings ? View.VISIBLE : View.GONE);
@@ -359,6 +366,17 @@
});
}
+ private String getSubtitle(AppRow row) {
+ if (row.banned) return mContext.getString(R.string.app_notification_row_banned);
+ if (!row.priority && !row.sensitive) return "";
+ final String priString = mContext.getString(R.string.app_notification_row_priority);
+ final String senString = mContext.getString(R.string.app_notification_row_sensitive);
+ if (row.priority != row.sensitive) {
+ return row.priority ? priString : senString;
+ }
+ return priString + mContext.getString(R.string.summary_divider_text) + senString;
+ }
+
@Override
public Object[] getSections() {
return mSections.toArray(new Object[mSections.size()]);
@@ -396,7 +414,8 @@
public Intent settingsIntent;
public boolean banned;
public boolean priority;
- public boolean first;
+ public boolean sensitive;
+ public boolean first; // first app in section
}
private static final Comparator<AppRow> mRowComparator = new Comparator<AppRow>() {
@@ -435,6 +454,7 @@
row.icon = pkg.applicationInfo.loadIcon(pm);
row.banned = mBackend.getNotificationsBanned(row.pkg, row.uid);
row.priority = mBackend.getHighPriority(row.pkg, row.uid);
+ row.sensitive = mBackend.getSensitive(row.pkg, row.uid);
mRows.put(row.pkg, row);
}
// collect config activities
@@ -552,5 +572,15 @@
// TODO save high-pri state to NoMan
return true;
}
+
+ public boolean getSensitive(String pkg, int uid) {
+ // TODO get visibility state from NoMan
+ return false;
+ }
+
+ public boolean setSensitive(String pkg, int uid, boolean sensitive) {
+ // TODO save visibility state to NoMan
+ return true;
+ }
}
}
diff --git a/src/com/android/settings/notification/NotificationDisplaySettings.java b/src/com/android/settings/notification/NotificationDisplaySettings.java
new file mode 100644
index 0000000..7842cad
--- /dev/null
+++ b/src/com/android/settings/notification/NotificationDisplaySettings.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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.ContentResolver;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceScreen;
+import android.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+
+public class NotificationDisplaySettings extends SettingsPreferenceFragment {
+ private static final String TAG = "NotificationDisplaySettings";
+
+ 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_ZEN_MODE_NOTIFICATIONS = "zen_mode_notifications";
+
+ private final Handler mHandler = new Handler();
+ private final SettingsObserver mSettingsObserver = new SettingsObserver();
+
+ private TwoStatePreference mNotificationPulse;
+ private DropDownPreference mLockscreen;
+ private DropDownPreference mZenModeNotifications;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.notification_display_settings);
+
+ final PreferenceScreen root = getPreferenceScreen();
+ initPulse(root);
+ initLockscreenNotifications(root);
+ initZenModeNotifications(root);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ mSettingsObserver.register(true);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ mSettingsObserver.register(false);
+ }
+
+ // === Pulse notification light ===
+
+ private void initPulse(PreferenceScreen parent) {
+ mNotificationPulse = (TwoStatePreference) parent.findPreference(KEY_NOTIFICATION_PULSE);
+ if (mNotificationPulse == null) return;
+ if (!getResources()
+ .getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) {
+ parent.removePreference(mNotificationPulse);
+ } else {
+ updatePulse();
+ mNotificationPulse.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ final boolean val = (Boolean)newValue;
+ return Settings.System.putInt(getContentResolver(),
+ Settings.System.NOTIFICATION_LIGHT_PULSE,
+ val ? 1 : 0);
+ }
+ });
+ }
+ }
+
+ 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(PreferenceScreen parent) {
+ mLockscreen = (DropDownPreference) parent.findPreference(KEY_LOCK_SCREEN_NOTIFICATIONS);
+ if (mLockscreen == null) return;
+ mLockscreen.addItem(R.string.lock_screen_notifications_summary_show,
+ R.string.lock_screen_notifications_summary_show);
+ 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;
+ 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.Global.putInt(getContentResolver(),
+ Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, enabled ? 1 : 0);
+ return true;
+ }
+ });
+ }
+
+ private void updateLockscreenNotifications() {
+ if (mLockscreen == null) return;
+ final boolean allowPrivate = getLockscreenAllowPrivateNotifications();
+ final boolean enabled = getLockscreenNotificationsEnabled();
+ final int val = !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(val);
+ }
+
+ private boolean getLockscreenNotificationsEnabled() {
+ return Settings.Global.getInt(getContentResolver(),
+ Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
+ }
+
+ private boolean getLockscreenAllowPrivateNotifications() {
+ return Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
+ }
+
+ // === Zen mode notifications ===
+
+ private void initZenModeNotifications(PreferenceScreen parent) {
+ mZenModeNotifications = (DropDownPreference)
+ parent.findPreference(KEY_ZEN_MODE_NOTIFICATIONS);
+ if (mZenModeNotifications == null) return;
+ mZenModeNotifications.addItem(R.string.zen_mode_notifications_summary_hide, 0);
+ mZenModeNotifications.addItem(R.string.zen_mode_notifications_summary_show, 1);
+ updateZenModeNotifications();
+ mZenModeNotifications.setCallback(new DropDownPreference.Callback() {
+ @Override
+ public boolean onItemSelected(int pos, Object value) {
+ final int val = (Integer) value;
+ Settings.Secure.putInt(getContentResolver(),
+ Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, val);
+ return true;
+ }
+ });
+ }
+
+ private void updateZenModeNotifications() {
+ if (mZenModeNotifications == null) return;
+ mZenModeNotifications.setSelectedValue(Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, 0));
+ }
+
+ // === Callbacks ===
+
+ private final class SettingsObserver extends ContentObserver {
+ private final Uri NOTIFICATION_LIGHT_PULSE_URI =
+ Settings.System.getUriFor(Settings.System.NOTIFICATION_LIGHT_PULSE);
+ private final Uri LOCK_SCREEN_PRIVATE_URI =
+ Settings.Secure.getUriFor(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
+ private final Uri LOCK_SCREEN_SHOW_URI =
+ Settings.Global.getUriFor(Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS);
+ private final Uri DISPLAY_INTERCEPTED_NOTIFICATIONS_URI =
+ Settings.Secure.getUriFor(Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS);
+
+ public SettingsObserver() {
+ super(mHandler);
+ }
+
+ public void register(boolean register) {
+ final ContentResolver cr = getContentResolver();
+ if (register) {
+ cr.registerContentObserver(NOTIFICATION_LIGHT_PULSE_URI, false, this);
+ cr.registerContentObserver(LOCK_SCREEN_PRIVATE_URI, false, this);
+ cr.registerContentObserver(LOCK_SCREEN_SHOW_URI, false, this);
+ cr.registerContentObserver(DISPLAY_INTERCEPTED_NOTIFICATIONS_URI, false, this);
+ } else {
+ cr.unregisterContentObserver(this);
+ }
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ super.onChange(selfChange, uri);
+ if (NOTIFICATION_LIGHT_PULSE_URI.equals(uri)) {
+ updatePulse();
+ }
+ if (LOCK_SCREEN_PRIVATE_URI.equals(uri) || LOCK_SCREEN_SHOW_URI.equals(uri)) {
+ updateLockscreenNotifications();
+ }
+ if (DISPLAY_INTERCEPTED_NOTIFICATIONS_URI.equals(uri)) {
+ updateZenModeNotifications();
+ }
+ }
+ }
+}
diff --git a/src/com/android/settings/notification/NotificationSettings.java b/src/com/android/settings/notification/NotificationSettings.java
index d432bed..b67032a 100644
--- a/src/com/android/settings/notification/NotificationSettings.java
+++ b/src/com/android/settings/notification/NotificationSettings.java
@@ -16,209 +16,205 @@
package com.android.settings.notification;
+import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
+import android.media.AudioManager;
import android.media.RingtoneManager;
-import android.os.Build;
+import android.net.Uri;
+import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
+import android.os.Looper;
import android.os.Message;
import android.preference.Preference;
-import android.preference.Preference.OnPreferenceClickListener;
-import android.preference.PreferenceGroup;
+import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceScreen;
+import android.preference.SeekBarVolumizer;
import android.preference.TwoStatePreference;
import android.provider.Settings;
-import android.util.Log;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.SoundSettings;
-public class NotificationSettings extends SettingsPreferenceFragment implements
- Preference.OnPreferenceChangeListener, OnPreferenceClickListener {
+public class NotificationSettings extends SettingsPreferenceFragment {
private static final String TAG = "NotificationSettings";
- private static final String KEY_NOTIFICATION_SOUND = "notification_sound";
- private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
- private static final String KEY_HEADS_UP = "heads_up";
- private static final String KEY_LOCK_SCREEN_NOTIFICATIONS = "toggle_lock_screen_notifications";
+ 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";
+ private static final String KEY_RINGER_MODE = "ringer_mode";
+ private static final String KEY_PHONE_RINGTONE = "ringtone";
+ private static final String KEY_NOTIFICATION_RINGTONE = "notification_ringtone";
+ private static final String KEY_VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
private static final String KEY_NOTIFICATION_ACCESS = "manage_notification_access";
- private static final String KEY_TWEAKS_CATEGORY = "category_tweaks"; // power toys, eng only
+ private static final int SAMPLE_CUTOFF = 2000; // manually cap sample playback at 2 seconds
- private static final int MSG_UPDATE_SOUND_SUMMARY = 2;
+ private final VolumePreferenceCallback mVolumeCallback = new VolumePreferenceCallback();
+ private final H mHandler = new H();
+ private final SettingsObserver mSettingsObserver = new SettingsObserver();
private Context mContext;
private PackageManager mPM;
- private Preference mNotificationSoundPreference;
+ private DropDownPreference mRingerMode;
+ private Preference mPhoneRingtonePreference;
+ private Preference mNotificationRingtonePreference;
+ private TwoStatePreference mVibrateWhenRinging;
private Preference mNotificationAccess;
- private DropDownPreference mLockscreen;
- private TwoStatePreference mHeadsUp;
- private TwoStatePreference mNotificationPulse;
-
- private final Runnable mRingtoneLookupRunnable = new Runnable() {
- @Override
- public void run() {
- if (mNotificationSoundPreference != null) {
- final CharSequence summary = SoundSettings.updateRingtoneName(
- mContext, RingtoneManager.TYPE_NOTIFICATION);
- if (summary != null) {
- mHandler.sendMessage(
- mHandler.obtainMessage(MSG_UPDATE_SOUND_SUMMARY, summary));
- }
- }
- }
- };
-
- private final Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MSG_UPDATE_SOUND_SUMMARY:
- mNotificationSoundPreference.setSummary((CharSequence) msg.obj);
- break;
- }
- }
- };
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = getActivity();
- final ContentResolver resolver = mContext.getContentResolver();
-
mPM = mContext.getPackageManager();
addPreferencesFromResource(R.xml.notification_settings);
final PreferenceScreen root = getPreferenceScreen();
-
- PreferenceGroup tweaksCategory = (PreferenceGroup)
- root.findPreference(KEY_TWEAKS_CATEGORY);
-
- if (tweaksCategory != null
- && !(Build.TYPE.equals("eng") || Build.TYPE.equals("userdebug"))) {
- root.removePreference(tweaksCategory);
- tweaksCategory = null;
- }
-
- mNotificationSoundPreference = findPreference(KEY_NOTIFICATION_SOUND);
+ initVolumePreference(KEY_MEDIA_VOLUME, AudioManager.STREAM_MUSIC);
+ initVolumePreference(KEY_ALARM_VOLUME, AudioManager.STREAM_ALARM);
+ initVolumePreference(KEY_RING_VOLUME, AudioManager.STREAM_RING);
+ initRingerMode(root);
+ initRingtones(root);
+ initVibrateWhenRinging(root);
mNotificationAccess = findPreference(KEY_NOTIFICATION_ACCESS);
refreshNotificationListeners();
-
- mLockscreen = (DropDownPreference) root.findPreference(KEY_LOCK_SCREEN_NOTIFICATIONS);
- if (mLockscreen != null) {
- if (!getDeviceLockscreenNotificationsEnabled()) {
- root.removePreference(mLockscreen);
- } else {
- mLockscreen.addItem(R.string.lock_screen_notifications_summary_show, 1);
- mLockscreen.addItem(R.string.lock_screen_notifications_summary_hide, 0);
- final int val = getLockscreenAllowPrivateNotifications() ? 1 : 0;
- mLockscreen.setSelectedValue(val);
- mLockscreen.setCallback(new DropDownPreference.Callback() {
- @Override
- public boolean onItemSelected(int pos, Object value) {
- final int val = (Integer) value;
- Settings.Secure.putInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, val);
- return true;
- }
- });
- }
- }
-
- mHeadsUp = (TwoStatePreference) findPreference(KEY_HEADS_UP);
- if (mHeadsUp != null) {
- updateHeadsUpMode(resolver);
- mHeadsUp.setOnPreferenceChangeListener(this);
- resolver.registerContentObserver(
- Settings.Global.getUriFor(Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED),
- false, new ContentObserver(mHandler) {
- @Override
- public void onChange(boolean selfChange) {
- updateHeadsUpMode(resolver);
- }
- });
- }
- mNotificationPulse = (TwoStatePreference) findPreference(KEY_NOTIFICATION_PULSE);
-
- if (mNotificationPulse != null
- && getResources().getBoolean(
- com.android.internal.R.bool.config_intrusiveNotificationLed) == false) {
- getPreferenceScreen().removePreference(mNotificationPulse);
- } else {
- try {
- mNotificationPulse.setChecked(Settings.System.getInt(resolver,
- Settings.System.NOTIFICATION_LIGHT_PULSE) == 1);
- mNotificationPulse.setOnPreferenceChangeListener(this);
- } catch (Settings.SettingNotFoundException snfe) {
- Log.e(TAG, Settings.System.NOTIFICATION_LIGHT_PULSE + " not found");
- }
- }
}
@Override
public void onResume() {
super.onResume();
-
refreshNotificationListeners();
lookupRingtoneNames();
+ final IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION);
+ mContext.registerReceiver(mReceiver, filter);
+ mSettingsObserver.register(true);
}
@Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- final String key = preference.getKey();
+ public void onPause() {
+ super.onPause();
+ mVolumeCallback.stopSample();
+ mContext.unregisterReceiver(mReceiver);
+ mSettingsObserver.register(false);
+ }
- if (KEY_HEADS_UP.equals(key)) {
- setHeadsUpMode(getContentResolver(), mHeadsUp.isChecked());
- } else if (KEY_NOTIFICATION_PULSE.equals(key)) {
- Settings.System.putInt(getContentResolver(),
- Settings.System.NOTIFICATION_LIGHT_PULSE,
- mNotificationPulse.isChecked() ? 1 : 0);
- } else {
- return super.onPreferenceTreeClick(preferenceScreen, preference);
+ // === Volumes ===
+
+ private void initVolumePreference(String key, int stream) {
+ final VolumeSeekBarPreference volumePref = (VolumeSeekBarPreference) findPreference(key);
+ volumePref.setStream(stream);
+ volumePref.setCallback(mVolumeCallback);
+ }
+
+ private final class VolumePreferenceCallback implements VolumeSeekBarPreference.Callback {
+ private SeekBarVolumizer mCurrent;
+
+ @Override
+ public void onSampleStarting(SeekBarVolumizer sbv) {
+ if (mCurrent != null && mCurrent != sbv) {
+ mCurrent.stopSample();
+ }
+ mCurrent = sbv;
+ if (mCurrent != null) {
+ mHandler.removeMessages(H.STOP_SAMPLE);
+ mHandler.sendEmptyMessageDelayed(H.STOP_SAMPLE, SAMPLE_CUTOFF);
+ }
}
- return true;
+ public void stopSample() {
+ if (mCurrent != null) {
+ mCurrent.stopSample();
+ }
+ }
+ };
+
+ // === Ringer mode ===
+
+ private void initRingerMode(PreferenceScreen root) {
+ mRingerMode = (DropDownPreference) root.findPreference(KEY_RINGER_MODE);
+ if (mRingerMode == null) return;
+ final AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+ mRingerMode.addItem(R.string.ringer_mode_audible, AudioManager.RINGER_MODE_NORMAL);
+ mRingerMode.addItem(R.string.ringer_mode_vibrate, AudioManager.RINGER_MODE_VIBRATE);
+ mRingerMode.addItem(R.string.ringer_mode_silent, AudioManager.RINGER_MODE_SILENT);
+ updateRingerMode();
+ mRingerMode.setCallback(new DropDownPreference.Callback() {
+ @Override
+ public boolean onItemSelected(int pos, Object value) {
+ final int val = (Integer) value;
+ am.setRingerMode(val);
+ return true;
+ }
+ });
}
- @Override
- public boolean onPreferenceChange(Preference preference, Object objValue) {
- return true;
+ private void updateRingerMode() {
+ final AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+ mRingerMode.setSelectedValue(am.getRingerMode());
}
- @Override
- public boolean onPreferenceClick(Preference preference) {
- return false;
+ // === Phone & notification ringtone ===
+
+ private void initRingtones(PreferenceScreen root) {
+ mPhoneRingtonePreference = root.findPreference(KEY_PHONE_RINGTONE);
+ mNotificationRingtonePreference = root.findPreference(KEY_NOTIFICATION_RINGTONE);
}
- // === Heads-up notifications ===
-
- private void updateHeadsUpMode(ContentResolver resolver) {
- mHeadsUp.setChecked(Settings.Global.HEADS_UP_ON == Settings.Global.getInt(resolver,
- Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, Settings.Global.HEADS_UP_OFF));
+ private void lookupRingtoneNames() {
+ AsyncTask.execute(mLookupRingtoneNames);
}
- private void setHeadsUpMode(ContentResolver resolver, boolean value) {
- Settings.Global.putInt(resolver, Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
- value ? Settings.Global.HEADS_UP_ON : Settings.Global.HEADS_UP_OFF);
+ private final Runnable mLookupRingtoneNames = new Runnable() {
+ @Override
+ public void run() {
+ if (mPhoneRingtonePreference != null) {
+ final CharSequence summary = SoundSettings.updateRingtoneName(
+ mContext, RingtoneManager.TYPE_RINGTONE);
+ if (summary != null) {
+ mHandler.obtainMessage(H.UPDATE_PHONE_RINGTONE, summary).sendToTarget();
+ }
+ }
+ if (mNotificationRingtonePreference != null) {
+ final CharSequence summary = SoundSettings.updateRingtoneName(
+ mContext, RingtoneManager.TYPE_NOTIFICATION);
+ if (summary != null) {
+ mHandler.obtainMessage(H.UPDATE_NOTIFICATION_RINGTONE, summary).sendToTarget();
+ }
+ }
+ }
+ };
+
+ // === Vibrate when ringing ===
+
+ private void initVibrateWhenRinging(PreferenceScreen root) {
+ mVibrateWhenRinging = (TwoStatePreference) findPreference(KEY_VIBRATE_WHEN_RINGING);
+ if (mVibrateWhenRinging == null) return;
+ mVibrateWhenRinging.setPersistent(false);
+ updateVibrateWhenRinging();
+ mVibrateWhenRinging.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ final boolean val = (Boolean) newValue;
+ return Settings.System.putInt(getContentResolver(),
+ Settings.System.VIBRATE_WHEN_RINGING,
+ val ? 1 : 0);
+ }
+ });
}
- // === Lockscreen (public / private) notifications ===
-
- private boolean getDeviceLockscreenNotificationsEnabled() {
- return 0 != Settings.Global.getInt(getContentResolver(),
- Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0);
- }
-
- private boolean getLockscreenAllowPrivateNotifications() {
- return 0 != Settings.Secure.getInt(getContentResolver(),
- Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0);
+ private void updateVibrateWhenRinging() {
+ if (mVibrateWhenRinging == null) return;
+ mVibrateWhenRinging.setChecked(Settings.System.getInt(getContentResolver(),
+ Settings.System.VIBRATE_WHEN_RINGING, 0) != 0);
}
// === Notification listeners ===
@@ -242,9 +238,65 @@
}
}
- // === Ringtone ===
+ // === Callbacks ===
- private void lookupRingtoneNames() {
- new Thread(mRingtoneLookupRunnable).start();
+ private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(intent.getAction())) {
+ updateRingerMode();
+ }
+ }
+ };
+
+ private final class SettingsObserver extends ContentObserver {
+ private final Uri VIBRATE_WHEN_RINGING_URI =
+ Settings.System.getUriFor(Settings.System.VIBRATE_WHEN_RINGING);
+
+ public SettingsObserver() {
+ super(mHandler);
+ }
+
+ public void register(boolean register) {
+ final ContentResolver cr = getContentResolver();
+ if (register) {
+ cr.registerContentObserver(VIBRATE_WHEN_RINGING_URI, false, this);
+ } else {
+ cr.unregisterContentObserver(this);
+ }
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ super.onChange(selfChange, uri);
+ if (VIBRATE_WHEN_RINGING_URI.equals(uri)) {
+ updateVibrateWhenRinging();
+ }
+ }
+ }
+
+ private final class H extends Handler {
+ private static final int UPDATE_PHONE_RINGTONE = 1;
+ private static final int UPDATE_NOTIFICATION_RINGTONE = 2;
+ private static final int STOP_SAMPLE = 3;
+
+ private H() {
+ super(Looper.getMainLooper());
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case UPDATE_PHONE_RINGTONE:
+ mPhoneRingtonePreference.setSummary((CharSequence) msg.obj);
+ break;
+ case UPDATE_NOTIFICATION_RINGTONE:
+ mNotificationRingtonePreference.setSummary((CharSequence) msg.obj);
+ break;
+ case STOP_SAMPLE:
+ mVolumeCallback.stopSample();
+ break;
+ }
+ }
}
}
diff --git a/src/com/android/settings/notification/NotificationStation.java b/src/com/android/settings/notification/NotificationStation.java
index 69a7a89..3f37f6d 100644
--- a/src/com/android/settings/notification/NotificationStation.java
+++ b/src/com/android/settings/notification/NotificationStation.java
@@ -35,8 +35,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
-import android.service.notification.INotificationListener;
-import android.service.notification.NotificationOrderUpdate;
+import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import android.view.LayoutInflater;
@@ -73,14 +72,13 @@
}
};
- private INotificationListener.Stub mListener = new INotificationListener.Stub() {
+ private NotificationListenerService mListener = new NotificationListenerService() {
@Override
- public void onListenerConnected(NotificationOrderUpdate update) throws RemoteException {
+ public void onListenerConnected(String[] notificationKeys) {
// noop
}
@Override
- public void onNotificationPosted(StatusBarNotification notification,
- NotificationOrderUpdate update) throws RemoteException {
+ public void onNotificationPosted(StatusBarNotification notification) {
Log.v(TAG, "onNotificationPosted: " + notification);
final Handler h = getListView().getHandler();
h.removeCallbacks(mRefreshListRunnable);
@@ -88,17 +86,11 @@
}
@Override
- public void onNotificationRemoved(StatusBarNotification notification,
- NotificationOrderUpdate update) throws RemoteException {
+ public void onNotificationRemoved(StatusBarNotification notification) {
final Handler h = getListView().getHandler();
h.removeCallbacks(mRefreshListRunnable);
h.postDelayed(mRefreshListRunnable, 100);
}
-
- @Override
- public void onNotificationOrderUpdate(NotificationOrderUpdate update)
- throws RemoteException {
- }
};
private NotificationHistoryAdapter mAdapter;
@@ -122,16 +114,24 @@
mNoMan = INotificationManager.Stub.asInterface(
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
try {
- mNoMan.registerListener(mListener,
- new ComponentName(mContext.getPackageName(),
- this.getClass().getCanonicalName()),
- ActivityManager.getCurrentUser());
+ mListener.registerAsSystemService(new ComponentName(mContext.getPackageName(),
+ this.getClass().getCanonicalName()), ActivityManager.getCurrentUser());
} catch (RemoteException e) {
// well, that didn't work out
}
}
@Override
+ public void onDetach() {
+ try {
+ mListener.unregisterAsSystemService();
+ } catch (RemoteException e) {
+ // well, that didn't work out
+ }
+ super.onDetach();
+ }
+
+ @Override
public void onCreate(Bundle icicle) {
logd("onCreate(%s)", icicle);
super.onCreate(icicle);
diff --git a/src/com/android/settings/notification/TouchSoundSettings.java b/src/com/android/settings/notification/TouchSoundSettings.java
new file mode 100644
index 0000000..2d7149e
--- /dev/null
+++ b/src/com/android/settings/notification/TouchSoundSettings.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.media.AudioManager;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Vibrator;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.TwoStatePreference;
+import android.provider.Settings.System;
+
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.Utils;
+
+public class TouchSoundSettings extends SettingsPreferenceFragment {
+ private static final String TAG = "TouchSoundSettings";
+
+ private static final String KEY_DIAL_PAD_TONES = "dial_pad_tones";
+ private static final String KEY_SCREEN_LOCKING_SOUNDS = "screen_locking_sounds";
+ private static final String KEY_OTHER_TOUCH_SOUNDS = "other_touch_sounds";
+ private static final String KEY_VIBRATE_ON_TOUCH = "vibrate_on_touch";
+
+ private final Handler mHandler = new Handler();
+ private final SettingsObserver mSettingsObserver = new SettingsObserver();
+
+ private AudioManager mAudioManager;
+ private SystemSettingPref mDialPadTones;
+ private SystemSettingPref mScreenLockingSounds;
+ private SystemSettingPref mOtherTouchSounds;
+ private SystemSettingPref mVibrateOnTouch;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.touch_sound_settings);
+
+ mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+
+ final boolean hasVoice = Utils.isVoiceCapable(getActivity());
+ final Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
+ final boolean hasHaptic = vibrator != null && vibrator.hasVibrator();
+
+ mDialPadTones = new SystemSettingPref(hasVoice,
+ KEY_DIAL_PAD_TONES, System.DTMF_TONE_WHEN_DIALING);
+
+ mScreenLockingSounds = new SystemSettingPref(true,
+ KEY_SCREEN_LOCKING_SOUNDS, System.LOCKSCREEN_SOUNDS_ENABLED);
+
+ mOtherTouchSounds = new SystemSettingPref(true,
+ KEY_OTHER_TOUCH_SOUNDS,System.SOUND_EFFECTS_ENABLED) {
+ @Override
+ protected void setSetting(boolean value) {
+ if (value) {
+ mAudioManager.loadSoundEffects();
+ } else {
+ mAudioManager.unloadSoundEffects();
+ }
+ super.setSetting(value);
+ }
+ };
+
+ mVibrateOnTouch = new SystemSettingPref(hasHaptic,
+ KEY_VIBRATE_ON_TOUCH, System.HAPTIC_FEEDBACK_ENABLED);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ mSettingsObserver.register(true);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ mSettingsObserver.register(false);
+ }
+
+ // === Common system setting preference helper ===
+
+ private class SystemSettingPref {
+ private final String mSetting;
+ private final Uri mUri;
+
+ private TwoStatePreference mPref;
+
+ private SystemSettingPref(boolean applicable, String key, String setting) {
+ mSetting = setting;
+ mUri = System.getUriFor(mSetting);
+ if (!applicable) removePreference(key);
+ mPref = (TwoStatePreference) getPreferenceScreen().findPreference(key);
+ if (mPref == null) return;
+ update();
+ mPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ setSetting((Boolean)newValue);
+ return true;
+ }
+ });
+ }
+
+ protected void setSetting(boolean value) {
+ System.putInt(getContentResolver(), mSetting, value ? 1 : 0);
+ }
+
+ private Uri getUri() {
+ return mUri;
+ }
+
+ private void update() {
+ if (mPref == null) return;
+ mPref.setChecked(System.getInt(getContentResolver(), mSetting, 1) != 0);
+ }
+ }
+
+ // === Callbacks ===
+
+ private final class SettingsObserver extends ContentObserver {
+ public SettingsObserver() {
+ super(mHandler);
+ }
+
+ public void register(boolean register) {
+ final ContentResolver cr = getContentResolver();
+ if (register) {
+ cr.registerContentObserver(mDialPadTones.getUri(), false, this);
+ cr.registerContentObserver(mScreenLockingSounds.getUri(), false, this);
+ cr.registerContentObserver(mOtherTouchSounds.getUri(), false, this);
+ cr.registerContentObserver(mVibrateOnTouch.getUri(), false, this);
+ } else {
+ cr.unregisterContentObserver(this);
+ }
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ super.onChange(selfChange, uri);
+ if (mDialPadTones.getUri().equals(uri)) {
+ mDialPadTones.update();
+ }
+ if (mScreenLockingSounds.getUri().equals(uri)) {
+ mScreenLockingSounds.update();
+ }
+ if (mOtherTouchSounds.getUri().equals(uri)) {
+ mOtherTouchSounds.update();
+ }
+ if (mVibrateOnTouch.getUri().equals(uri)) {
+ mVibrateOnTouch.update();
+ }
+ }
+ }
+}
diff --git a/src/com/android/settings/notification/VolumeSeekBarPreference.java b/src/com/android/settings/notification/VolumeSeekBarPreference.java
new file mode 100644
index 0000000..5b0621d
--- /dev/null
+++ b/src/com/android/settings/notification/VolumeSeekBarPreference.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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.ContentResolver;
+import android.content.Context;
+import android.media.AudioManager;
+import android.net.Uri;
+import android.preference.PreferenceManager;
+import android.preference.SeekBarPreference;
+import android.preference.SeekBarVolumizer;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.widget.SeekBar;
+
+import com.android.settings.R;
+
+/** A slider preference that directly controls an audio stream volume (no dialog) **/
+public class VolumeSeekBarPreference extends SeekBarPreference
+ implements PreferenceManager.OnActivityStopListener {
+ private static final String TAG = "VolumeSeekBarPreference";
+
+ private final Context mContext;
+
+ private int mStream;
+ private SeekBar mSeekBar;
+ private SeekBarVolumizer mVolumizer;
+ private Callback mCallback;
+
+ public VolumeSeekBarPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mContext = context;
+ }
+
+ public void setStream(int stream) {
+ mStream = stream;
+ }
+
+ public void setCallback(Callback callback) {
+ mCallback = callback;
+ }
+
+ @Override
+ public void onActivityStop() {
+ if (mVolumizer != null) {
+ mVolumizer.stop();
+ }
+ }
+
+ @Override
+ protected void onBindView(View view) {
+ super.onBindView(view);
+ if (mStream == 0) {
+ Log.w(TAG, "No stream found, not binding volumizer");
+ return;
+ }
+ getPreferenceManager().registerOnActivityStopListener(this);
+ final SeekBar seekBar = (SeekBar) view.findViewById(com.android.internal.R.id.seekbar);
+ if (seekBar == mSeekBar) return;
+ mSeekBar = seekBar;
+ final SeekBarVolumizer.Callback sbvc = new SeekBarVolumizer.Callback() {
+ @Override
+ public void onSampleStarting(SeekBarVolumizer sbv) {
+ if (mCallback != null) {
+ mCallback.onSampleStarting(sbv);
+ }
+ }
+ };
+ final Uri sampleUri = mStream == AudioManager.STREAM_MUSIC ? getMediaVolumeUri() : null;
+ mVolumizer = new SeekBarVolumizer(mContext, seekBar, mStream, sampleUri, sbvc);
+ }
+
+ private Uri getMediaVolumeUri() {
+ return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"
+ + mContext.getPackageName()
+ + "/" + R.raw.media_volume);
+ }
+
+ public interface Callback {
+ void onSampleStarting(SeekBarVolumizer sbv);
+ }
+}
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java
index ff1a5ab..e69fe95 100644
--- a/src/com/android/settings/notification/ZenModeSettings.java
+++ b/src/com/android/settings/notification/ZenModeSettings.java
@@ -45,42 +45,65 @@
import android.service.notification.ZenModeConfig;
import android.text.format.DateFormat;
import android.util.Log;
+import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.Switch;
import android.widget.TextView;
import android.widget.TimePicker;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settings.search.SearchIndexableRaw;
+import com.android.settings.widget.SwitchBar;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Objects;
-public class ZenModeSettings extends SettingsPreferenceFragment implements Indexable {
+public class ZenModeSettings extends SettingsPreferenceFragment implements Indexable,
+ SwitchBar.OnSwitchChangeListener {
private static final String TAG = "ZenModeSettings";
private static final boolean DEBUG = true;
- private static final String KEY_ZEN_MODE = "zen_mode";
private static final String KEY_GENERAL = "general";
private static final String KEY_CALLS = "phone_calls";
private static final String KEY_MESSAGES = "messages";
private static final String KEY_AUTOMATIC = "automatic";
private static final String KEY_WHEN = "when";
+ private static final String KEY_START_TIME = "start_time";
+ private static final String KEY_END_TIME = "end_time";
private static final String KEY_AUTOMATION = "automation";
private static final String KEY_ENTRY = "entry";
private static final String KEY_CONDITION_PROVIDERS = "manage_condition_providers";
+ private static final SparseArray<String> ALL_KEY_TITLES = allKeyTitles();
+
+ private static SparseArray<String> allKeyTitles() {
+ final SparseArray<String> rt = new SparseArray<String>();
+ rt.put(R.string.zen_mode_general_category, KEY_GENERAL);
+ rt.put(R.string.zen_mode_phone_calls, KEY_CALLS);
+ rt.put(R.string.zen_mode_messages, KEY_MESSAGES);
+ rt.put(R.string.zen_mode_automatic_category, KEY_AUTOMATIC);
+ rt.put(R.string.zen_mode_when, KEY_WHEN);
+ rt.put(R.string.zen_mode_start_time, KEY_START_TIME);
+ rt.put(R.string.zen_mode_end_time, KEY_END_TIME);
+ rt.put(R.string.zen_mode_automation_category, KEY_AUTOMATION);
+ rt.put(R.string.manage_condition_providers, KEY_CONDITION_PROVIDERS);
+ return rt;
+ }
+
private final Handler mHandler = new Handler();
private final SettingsObserver mSettingsObserver = new SettingsObserver();
- private SwitchPreference mSwitch;
+ private SwitchBar mSwitchBar;
+ private Switch mSwitch;
private Context mContext;
private PackageManager mPM;
private ZenModeConfig mConfig;
@@ -98,6 +121,26 @@
private boolean mIgnoreNext;
@Override
+ public void onSwitchChanged(Switch switchView, final boolean isChecked) {
+ if (DEBUG) Log.d(TAG, "onPreferenceChange isChecked=" + isChecked
+ + " mIgnoreNext=" + mIgnoreNext);
+ if (mIgnoreNext) {
+ mIgnoreNext = false;
+ }
+ AsyncTask.execute(new Runnable() {
+ @Override
+ public void run() {
+ final int v = isChecked ? Global.ZEN_MODE_ON : Global.ZEN_MODE_OFF;
+ putZenModeSetting(v);
+ final int n = ConditionProviderSettings.getEnabledProviderCount(mContext);
+ if (n > 0) {
+ mHandler.post(isChecked ? mShowDialog : mHideDialog);
+ }
+ }
+ });
+ }
+
+ @Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mContext = getActivity();
@@ -111,8 +154,8 @@
mConfig = getZenModeConfig();
if (DEBUG) Log.d(TAG, "Loaded mConfig=" + mConfig);
- mSwitch = (SwitchPreference) root.findPreference(KEY_ZEN_MODE);
- mSwitch.setOnPreferenceChangeListener(mSwitchListener);
+ mSwitchBar = ((SettingsActivity) mContext).getSwitchBar();
+ mSwitch = mSwitchBar.getSwitch();
final PreferenceCategory general = (PreferenceCategory) root.findPreference(KEY_GENERAL);
@@ -193,6 +236,7 @@
final FragmentManager mgr = getFragmentManager();
mStart = new TimePickerPreference(mContext, mgr);
+ mStart.setKey(KEY_START_TIME);
mStart.setTitle(R.string.zen_mode_start_time);
mStart.setCallback(new TimePickerPreference.Callback() {
@Override
@@ -214,6 +258,7 @@
mStart.setDependency(mWhen.getKey());
mEnd = new TimePickerPreference(mContext, mgr);
+ mEnd.setKey(KEY_END_TIME);
mEnd.setTitle(R.string.zen_mode_end_time);
mEnd.setSummaryFormat(R.string.zen_mode_end_time_summary_format);
mEnd.setCallback(new TimePickerPreference.Callback() {
@@ -305,7 +350,7 @@
if (automatic == null || automatic.length == 0) {
return null;
}
- final String divider = getString(R.string.zen_mode_entry_conditions_summary_divider);
+ final String divider = getString(R.string.summary_divider_text);
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < automatic.length; i++) {
if (i > 0) sb.append(divider);
@@ -324,12 +369,16 @@
updateControls();
updateZenMode();
mSettingsObserver.register();
+ mSwitchBar.addOnSwitchChangeListener(this);
+ mSwitchBar.show();
}
@Override
public void onPause() {
super.onPause();
mSettingsObserver.unregister();
+ mSwitchBar.removeOnSwitchChangeListener(this);
+ mSwitchBar.hide();
}
private void updateZenMode() {
@@ -339,7 +388,6 @@
mSwitch.setChecked(zenMode);
mIgnoreNext = true;
}
- mSwitch.setTitle(zenMode ? R.string.zen_mode_option_on : R.string.zen_mode_option_off);
}
private void updateZenModeConfig() {
@@ -417,54 +465,22 @@
}
};
- private final OnPreferenceChangeListener mSwitchListener = new OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- final boolean isChecked = (Boolean) newValue;
- if (DEBUG) Log.d(TAG, "onPreferenceChange isChecked=" + isChecked
- + " mIgnoreNext=" + mIgnoreNext);
- if (mIgnoreNext) {
- mIgnoreNext = false;
- return true;
- }
- AsyncTask.execute(new Runnable() {
- @Override
- public void run() {
- final int v = isChecked ? Global.ZEN_MODE_ON : Global.ZEN_MODE_OFF;
- putZenModeSetting(v);
- final int n = ConditionProviderSettings.getEnabledProviderCount(mContext);
- if (n > 0) {
- mHandler.post(isChecked ? mShowDialog : mHideDialog);
- }
- }
- });
- return true;
- }
- };
-
// Enable indexing of searchable data
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider() {
@Override
public List<SearchIndexableRaw> getRawDataToIndex(Context context, boolean enabled) {
- final List<SearchIndexableRaw> result = new ArrayList<SearchIndexableRaw>();
- add(result, context, R.string.zen_mode_settings_title);
- add(result, context, R.string.zen_mode_general_category);
- add(result, context, R.string.zen_mode_phone_calls);
- add(result, context, R.string.zen_mode_messages);
- add(result, context, R.string.zen_mode_automatic_category);
- add(result, context, R.string.zen_mode_when);
- add(result, context, R.string.zen_mode_start_time);
- add(result, context, R.string.zen_mode_end_time);
- return result;
- }
-
- private void add(List<SearchIndexableRaw> result, Context context, int title) {
+ final int N = ALL_KEY_TITLES.size();
+ final List<SearchIndexableRaw> result = new ArrayList<SearchIndexableRaw>(N);
final Resources res = context.getResources();
- final SearchIndexableRaw data = new SearchIndexableRaw(context);
- data.title = res.getString(title);
- data.screenTitle = res.getString(R.string.zen_mode_settings_title);
- result.add(data);
+ for (int i = 0; i < N; i++) {
+ final SearchIndexableRaw data = new SearchIndexableRaw(context);
+ data.key = ALL_KEY_TITLES.valueAt(i);
+ data.title = res.getString(ALL_KEY_TITLES.keyAt(i));
+ data.screenTitle = res.getString(R.string.zen_mode_settings_title);
+ result.add(data);
+ }
+ return result;
}
};
diff --git a/src/com/android/settings/print/PrintServiceSettingsFragment.java b/src/com/android/settings/print/PrintServiceSettingsFragment.java
index ab162fb..f104a06 100644
--- a/src/com/android/settings/print/PrintServiceSettingsFragment.java
+++ b/src/com/android/settings/print/PrintServiceSettingsFragment.java
@@ -16,7 +16,6 @@
package com.android.settings.print;
-import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -45,7 +44,6 @@
import android.print.PrinterInfo;
import android.text.TextUtils;
import android.util.Log;
-import android.view.Gravity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -53,30 +51,31 @@
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityManager;
import android.widget.BaseAdapter;
-import android.widget.CompoundButton;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SearchView;
+import android.widget.Switch;
import android.widget.TextView;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
-import com.android.settings.print.PrintSettingsFragment.ToggleSwitch;
-import com.android.settings.print.PrintSettingsFragment.ToggleSwitch.OnBeforeCheckedChangeListener;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import android.widget.CompoundButton.OnCheckedChangeListener;
+import com.android.settings.widget.SwitchBar;
+import com.android.settings.widget.ToggleSwitch;
+
/**
* Fragment with print service settings.
*/
public class PrintServiceSettingsFragment extends SettingsPreferenceFragment
- implements DialogInterface.OnClickListener {
+ implements DialogInterface.OnClickListener, SwitchBar.OnSwitchChangeListener {
private static final int LOADER_ID_PRINTERS_LOADER = 1;
@@ -112,6 +111,7 @@
}
};
+ private SwitchBar mSwitchBar;
private ToggleSwitch mToggleSwitch;
private String mPreferenceKey;
@@ -143,12 +143,16 @@
mSettingsContentObserver.register(getContentResolver());
updateEmptyView();
updateUiForServiceState();
+ mSwitchBar.addOnSwitchChangeListener(this);
+ mSwitchBar.show();
}
@Override
public void onPause() {
mSettingsContentObserver.unregister(getContentResolver());
super.onPause();
+ mSwitchBar.removeOnSwitchChangeListener(this);
+ mSwitchBar.hide();
}
@Override
@@ -159,18 +163,10 @@
}
@Override
- public void onStart() {
- super.onStart();
- setupActionBarToggleSwitch(getActivity(), mToggleSwitch);
- }
-
- @Override
public void onDestroyView() {
- removeActionBarToggleSwitch(getActivity());
if (mOldActivityTitle != null) {
getActivity().getActionBar().setTitle(mOldActivityTitle);
}
- mToggleSwitch.setOnBeforeCheckedChangeListener(null);
super.onDestroyView();
}
@@ -294,8 +290,12 @@
mPrintersAdapter = new PrintersAdapter();
mPrintersAdapter.registerDataSetObserver(mDataObserver);
- mToggleSwitch = createActionBarToggleSwitch(getActivity().getActionBar().getThemedContext());
- mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
+ final SettingsActivity activity = (SettingsActivity) getActivity();
+
+ mSwitchBar = activity.getSwitchBar();
+
+ mToggleSwitch = mSwitchBar.getSwitch();
+ mToggleSwitch.setOnBeforeCheckedChangeListener(new ToggleSwitch.OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
if (checked) {
@@ -312,17 +312,17 @@
return false;
}
});
- mToggleSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- updateEmptyView();
- }
- });
getListView().setSelector(new ColorDrawable(Color.TRANSPARENT));
getListView().setAdapter(mPrintersAdapter);
}
+
+ @Override
+ public void onSwitchChanged(Switch switchView, boolean isChecked) {
+ updateEmptyView();
+ }
+
private void updateUiForArguments() {
Bundle arguments = getArguments();
@@ -445,27 +445,6 @@
}
}
- private ToggleSwitch createActionBarToggleSwitch(Context context) {
- ToggleSwitch toggleSwitch = new ToggleSwitch(context);
- final int padding = context.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- toggleSwitch.setPaddingRelative(0, 0, padding, 0);
- return toggleSwitch;
- }
-
- private void setupActionBarToggleSwitch(Activity activity, ToggleSwitch toggleSwitch) {
- activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
- ActionBar.DISPLAY_SHOW_CUSTOM);
- activity.getActionBar().setCustomView(toggleSwitch,
- new ActionBar.LayoutParams(ActionBar.LayoutParams.WRAP_CONTENT,
- ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
- }
-
- private void removeActionBarToggleSwitch(Activity activity) {
- activity.getActionBar().setCustomView(null);
- }
-
private static abstract class SettingsContentObserver extends ContentObserver {
public SettingsContentObserver(Handler handler) {
diff --git a/src/com/android/settings/print/PrintSettingsFragment.java b/src/com/android/settings/print/PrintSettingsFragment.java
index 07e70d8..3f7362c 100644
--- a/src/com/android/settings/print/PrintSettingsFragment.java
+++ b/src/com/android/settings/print/PrintSettingsFragment.java
@@ -50,7 +50,6 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.Switch;
import android.widget.TextView;
import com.android.internal.content.PackageMonitor;
@@ -294,36 +293,6 @@
}
}
- public static class ToggleSwitch extends Switch {
-
- private OnBeforeCheckedChangeListener mOnBeforeListener;
-
- public static interface OnBeforeCheckedChangeListener {
- public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked);
- }
-
- public ToggleSwitch(Context context) {
- super(context);
- }
-
- public void setOnBeforeCheckedChangeListener(OnBeforeCheckedChangeListener listener) {
- mOnBeforeListener = listener;
- }
-
- @Override
- public void setChecked(boolean checked) {
- if (mOnBeforeListener != null
- && mOnBeforeListener.onBeforeCheckedChanged(this, checked)) {
- return;
- }
- super.setChecked(checked);
- }
-
- public void setCheckedInternal(boolean checked) {
- super.setChecked(checked);
- }
- }
-
private static abstract class SettingsContentObserver extends ContentObserver {
public SettingsContentObserver(Handler handler) {
diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java
index 1bcb9d8..adddb39 100644
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -1217,9 +1217,16 @@
long lastInsertedRowId = -1;
try {
- lastInsertedRowId =
- database.replaceOrThrow(Tables.TABLE_SAVED_QUERIES, null, values);
+ // First, delete all saved queries that are the same
+ database.delete(Tables.TABLE_SAVED_QUERIES,
+ IndexDatabaseHelper.SavedQueriesColums.QUERY + " = ?",
+ new String[] { params[0] });
+ // Second, insert the saved query
+ lastInsertedRowId =
+ database.insertOrThrow(Tables.TABLE_SAVED_QUERIES, null, values);
+
+ // Last, remove "old" saved queries
final long delta = lastInsertedRowId - MAX_SAVED_SEARCH_QUERY;
if (delta > 0) {
int count = database.delete(Tables.TABLE_SAVED_QUERIES, "rowId <= ?",
diff --git a/src/com/android/settings/search/SearchIndexableResources.java b/src/com/android/settings/search/SearchIndexableResources.java
index 80aef85..03f06e6 100644
--- a/src/com/android/settings/search/SearchIndexableResources.java
+++ b/src/com/android/settings/search/SearchIndexableResources.java
@@ -36,7 +36,9 @@
import com.android.settings.fuelgauge.PowerUsageSummary;
import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
import com.android.settings.location.LocationSettings;
+import com.android.settings.notification.NotificationDisplaySettings;
import com.android.settings.notification.NotificationSettings;
+import com.android.settings.notification.TouchSoundSettings;
import com.android.settings.notification.ZenModeSettings;
import com.android.settings.print.PrintSettingsFragment;
import com.android.settings.users.UserSettings;
@@ -137,6 +139,18 @@
NotificationSettings.class.getName(),
R.drawable.ic_settings_notifications));
+ sResMap.put(NotificationDisplaySettings.class.getName(),
+ new SearchIndexableResource(RANK_NOTIFICATIONS,
+ R.xml.notification_display_settings,
+ NotificationDisplaySettings.class.getName(),
+ R.drawable.ic_settings_notifications));
+
+ sResMap.put(TouchSoundSettings.class.getName(),
+ new SearchIndexableResource(RANK_NOTIFICATIONS,
+ R.xml.touch_sound_settings,
+ TouchSoundSettings.class.getName(),
+ R.drawable.ic_settings_notifications));
+
sResMap.put(ZenModeSettings.class.getName(),
new SearchIndexableResource(RANK_NOTIFICATIONS,
NO_DATA_RES_ID,
diff --git a/src/com/android/settings/widget/SwitchBar.java b/src/com/android/settings/widget/SwitchBar.java
index e871671..40c8481 100644
--- a/src/com/android/settings/widget/SwitchBar.java
+++ b/src/com/android/settings/widget/SwitchBar.java
@@ -33,7 +33,7 @@
public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedChangeListener {
- private Switch mSwitch;
+ private ToggleSwitch mSwitch;
private TextView mTextView;
private ArrayList<OnSwitchChangeListener> mSwitchChangeListeners =
@@ -69,7 +69,7 @@
mTextView = (TextView) findViewById(R.id.switch_text);
mTextView.setText(R.string.switch_off_text);
- mSwitch = (Switch) findViewById(R.id.switch_widget);
+ mSwitch = (ToggleSwitch) findViewById(R.id.switch_widget);
mSwitch.setOnCheckedChangeListener(this);
addOnSwitchChangeListener(new OnSwitchChangeListener() {
@@ -86,7 +86,7 @@
setVisibility(View.GONE);
}
- public Switch getSwitch() {
+ public ToggleSwitch getSwitch() {
return mSwitch;
}
diff --git a/src/com/android/settings/accessibility/ToggleSwitch.java b/src/com/android/settings/widget/ToggleSwitch.java
similarity index 76%
rename from src/com/android/settings/accessibility/ToggleSwitch.java
rename to src/com/android/settings/widget/ToggleSwitch.java
index e7c39e4..8232ff1 100644
--- a/src/com/android/settings/accessibility/ToggleSwitch.java
+++ b/src/com/android/settings/widget/ToggleSwitch.java
@@ -14,12 +14,14 @@
* limitations under the License.
*/
-package com.android.settings.accessibility;
+package com.android.settings.widget;
import android.content.Context;
+import android.util.AttributeSet;
import android.widget.Switch;
public class ToggleSwitch extends Switch {
+
private ToggleSwitch.OnBeforeCheckedChangeListener mOnBeforeListener;
public static interface OnBeforeCheckedChangeListener {
@@ -30,6 +32,18 @@
super(context);
}
+ public ToggleSwitch(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ }
+
public void setOnBeforeCheckedChangeListener(OnBeforeCheckedChangeListener listener) {
mOnBeforeListener = listener;
}
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index a54c1c4..7ccfc6b 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -20,6 +20,9 @@
import android.content.Context;
import android.content.res.Resources;
+import android.net.IpConfiguration;
+import android.net.IpConfiguration.IpAssignment;
+import android.net.IpConfiguration.ProxySettings;
import android.net.LinkAddress;
import android.net.LinkProperties;
import android.net.NetworkInfo.DetailedState;
@@ -28,9 +31,7 @@
import android.net.RouteInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiConfiguration.AuthAlgorithm;
-import android.net.wifi.WifiConfiguration.IpAssignment;
import android.net.wifi.WifiConfiguration.KeyMgmt;
-import android.net.wifi.WifiConfiguration.ProxySettings;
import android.net.wifi.WifiEnterpriseConfig;
import android.net.wifi.WifiEnterpriseConfig.Eap;
import android.net.wifi.WifiEnterpriseConfig.Phase2;
@@ -240,27 +241,27 @@
boolean showAdvancedFields = false;
if (mAccessPoint.networkId != INVALID_NETWORK_ID) {
WifiConfiguration config = mAccessPoint.getConfig();
- if (config.ipAssignment == IpAssignment.STATIC) {
+ if (config.getIpAssignment() == IpAssignment.STATIC) {
mIpSettingsSpinner.setSelection(STATIC_IP);
showAdvancedFields = true;
} else {
mIpSettingsSpinner.setSelection(DHCP);
}
//Display IP addresses
- for(InetAddress a : config.linkProperties.getAddresses()) {
+ for(InetAddress a : config.getLinkProperties().getAddresses()) {
addRow(group, R.string.wifi_ip_address, a.getHostAddress());
}
- if (config.proxySettings == ProxySettings.STATIC) {
+ if (config.getProxySettings() == ProxySettings.STATIC) {
mProxySettingsSpinner.setSelection(PROXY_STATIC);
showAdvancedFields = true;
- } else if (config.proxySettings == ProxySettings.PAC) {
+ } else if (config.getProxySettings() == ProxySettings.PAC) {
mProxySettingsSpinner.setVisibility(View.GONE);
TextView textView = (TextView)mView.findViewById(R.id.proxy_pac_info);
textView.setVisibility(View.VISIBLE);
textView.setText(context.getString(R.string.proxy_url) +
- config.linkProperties.getHttpProxy().getPacFileUrl());
+ config.getLinkProperties().getHttpProxy().getPacFileUrl());
showAdvancedFields = true;
} else {
mProxySettingsSpinner.setSelection(PROXY_NONE);
@@ -446,9 +447,8 @@
return null;
}
- config.proxySettings = mProxySettings;
- config.ipAssignment = mIpAssignment;
- config.linkProperties = new LinkProperties(mLinkProperties);
+ config.setIpConfiguration(
+ new IpConfiguration(mIpAssignment, mProxySettings, mLinkProperties));
return config;
}
@@ -772,7 +772,7 @@
mDns2View.addTextChangedListener(this);
}
if (config != null) {
- LinkProperties linkProperties = config.linkProperties;
+ LinkProperties linkProperties = config.getLinkProperties();
Iterator<LinkAddress> iterator = linkProperties.getLinkAddresses().iterator();
if (iterator.hasNext()) {
LinkAddress linkAddress = iterator.next();
@@ -822,7 +822,7 @@
mProxyExclusionListView.addTextChangedListener(this);
}
if (config != null) {
- ProxyInfo proxyProperties = config.linkProperties.getHttpProxy();
+ ProxyInfo proxyProperties = config.getLinkProperties().getHttpProxy();
if (proxyProperties != null) {
mProxyHostView.setText(proxyProperties.getHost());
mProxyPortView.setText(Integer.toString(proxyProperties.getPort()));
diff --git a/src/com/android/settings/wifi/WifiPickerActivity.java b/src/com/android/settings/wifi/WifiPickerActivity.java
index deef8fa..6dea82e 100644
--- a/src/com/android/settings/wifi/WifiPickerActivity.java
+++ b/src/com/android/settings/wifi/WifiPickerActivity.java
@@ -16,22 +16,12 @@
package com.android.settings.wifi;
import com.android.settings.ButtonBarHandler;
+import com.android.settings.SettingsActivity;
import com.android.settings.wifi.p2p.WifiP2pSettings;
-import android.app.Fragment;
import android.content.Intent;
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.widget.Button;
-public class WifiPickerActivity extends PreferenceActivity implements ButtonBarHandler {
-
- // Same as what are in PreferenceActivity as private.
- private static final String EXTRA_PREFS_SHOW_BUTTON_BAR = "extra_prefs_show_button_bar";
- private static final String EXTRA_PREFS_SET_NEXT_TEXT = "extra_prefs_set_next_text";
- private static final String EXTRA_PREFS_SET_BACK_TEXT = "extra_prefs_set_back_text";
- private static final String EXTRA_WIFI_SHOW_ACTION_BAR = "wifi_show_action_bar";
- private static final String EXTRA_WIFI_SHOW_MENUS = "wifi_show_menus";
+public class WifiPickerActivity extends SettingsActivity implements ButtonBarHandler {
@Override
public Intent getIntent() {
@@ -39,7 +29,6 @@
if (!modIntent.hasExtra(EXTRA_SHOW_FRAGMENT)) {
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, WifiSettings.class.getName());
}
- modIntent.putExtra(EXTRA_NO_HEADERS, true);
return modIntent;
}
@@ -50,59 +39,4 @@
|| AdvancedWifiSettings.class.getName().equals(fragmentName)) return true;
return false;
}
-
- /**
- * Almost dead copy of
- * {@link PreferenceActivity#startWithFragment(String, Bundle, Fragment, int)}, except this has
- * additional codes for button bar handling.
- */
- @Override
- public void startWithFragment(String fragmentName, Bundle args,
- Fragment resultTo, int resultRequestCode) {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.setClass(this, getClass());
- intent.putExtra(EXTRA_SHOW_FRAGMENT, fragmentName);
- intent.putExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS, args);
- intent.putExtra(EXTRA_NO_HEADERS, true);
-
- final Intent orgIntent = getIntent();
- if (orgIntent.hasExtra(EXTRA_PREFS_SHOW_BUTTON_BAR)) {
- intent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR,
- orgIntent.getBooleanExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false));
- }
- if (orgIntent.hasExtra(EXTRA_PREFS_SET_NEXT_TEXT)) {
- intent.putExtra(EXTRA_PREFS_SET_NEXT_TEXT,
- orgIntent.getStringExtra(EXTRA_PREFS_SET_NEXT_TEXT));
- }
- if (orgIntent.hasExtra(EXTRA_PREFS_SET_BACK_TEXT)) {
- intent.putExtra(EXTRA_PREFS_SET_BACK_TEXT,
- orgIntent.getStringExtra(EXTRA_PREFS_SET_BACK_TEXT));
- }
- if (orgIntent.hasExtra(EXTRA_WIFI_SHOW_ACTION_BAR)) {
- intent.putExtra(EXTRA_WIFI_SHOW_ACTION_BAR,
- orgIntent.getBooleanExtra(EXTRA_WIFI_SHOW_ACTION_BAR, true));
- }
- if (orgIntent.hasExtra(EXTRA_WIFI_SHOW_MENUS)) {
- intent.putExtra(EXTRA_WIFI_SHOW_MENUS,
- orgIntent.getBooleanExtra(EXTRA_WIFI_SHOW_MENUS, true));
- }
-
- if (resultTo == null) {
- startActivity(intent);
- } else {
- resultTo.startActivityForResult(intent, resultRequestCode);
- }
- }
-
- @Override
- public boolean hasNextButton() {
- // PreferenceActivity#hasNextButton() is protected, so we need to expose it here.
- return super.hasNextButton();
- }
-
- @Override
- public Button getNextButton() {
- // PreferenceActivity#getNextButton() is protected, so we need to expose it here.
- return super.getNextButton();
- }
}
\ No newline at end of file
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index a7d46e8..00a5b90 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -28,7 +28,6 @@
import com.android.settings.widget.SwitchBar;
import com.android.settings.wifi.p2p.WifiP2pSettings;
-import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -59,7 +58,6 @@
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -73,7 +71,6 @@
import android.widget.PopupMenu;
import android.widget.PopupMenu.OnMenuItemClickListener;
import android.widget.RelativeLayout;
-import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
@@ -570,7 +567,7 @@
if (mSelectedAccessPoint.security != AccessPoint.SECURITY_NONE) {
// Only allow writing of NFC tags for password-protected networks.
- menu.add(Menu.NONE, MENU_ID_WRITE_NFC, 0, "Write to NFC Tag");
+ menu.add(Menu.NONE, MENU_ID_WRITE_NFC, 0, R.string.wifi_menu_write_to_nfc);
}
}
}
@@ -705,9 +702,11 @@
})
.create();
case WRITE_NFC_DIALOG_ID:
- mWifiToNfcDialog =new WriteWifiConfigToNfcDialog(
- getActivity(), mSelectedAccessPoint, mWifiManager);
- return mWifiToNfcDialog;
+ if (mSelectedAccessPoint != null) {
+ mWifiToNfcDialog = new WriteWifiConfigToNfcDialog(
+ getActivity(), mSelectedAccessPoint, mWifiManager);
+ return mWifiToNfcDialog;
+ }
}
return super.onCreateDialog(dialogId);
diff --git a/src/com/android/settings/wifi/WpsDialog.java b/src/com/android/settings/wifi/WpsDialog.java
index 2a93884..662d477 100644
--- a/src/com/android/settings/wifi/WpsDialog.java
+++ b/src/com/android/settings/wifi/WpsDialog.java
@@ -27,7 +27,6 @@
import android.net.wifi.WpsInfo;
import android.os.Bundle;
import android.os.Handler;
-import android.os.Message;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
@@ -45,6 +44,8 @@
public class WpsDialog extends AlertDialog {
private final static String TAG = "WpsDialog";
+ private static final String DIALOG_STATE = "android:dialogState";
+ private static final String DIALOG_MSG_STRING = "android:dialogMsg";
private View mView;
private TextView mTextView;
@@ -64,6 +65,7 @@
private Context mContext;
private Handler mHandler = new Handler();
+ private String mMsgString = "";
private enum DialogState {
WPS_INIT,
@@ -128,6 +130,25 @@
handleEvent(context, intent);
}
};
+ setCanceledOnTouchOutside(false);
+ }
+
+ @Override
+ public Bundle onSaveInstanceState () {
+ Bundle bundle = super.onSaveInstanceState();
+ bundle.putString(DIALOG_STATE, mDialogState.toString());
+ bundle.putString(DIALOG_MSG_STRING, mMsgString.toString());
+ return bundle;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Bundle savedInstanceState) {
+ if (savedInstanceState != null) {
+ super.onRestoreInstanceState(savedInstanceState);
+ DialogState dialogState = mDialogState.valueOf(savedInstanceState.getString(DIALOG_STATE));
+ String msg = savedInstanceState.getString(DIALOG_MSG_STRING);
+ updateDialog(dialogState, msg);
+ }
}
@Override
@@ -207,6 +228,7 @@
return;
}
mDialogState = state;
+ mMsgString = msg;
mHandler.post(new Runnable() {
@Override
diff --git a/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java b/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java
index 7515f5c..e59c61c 100644
--- a/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java
+++ b/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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.wifi;
import android.app.Activity;
@@ -39,6 +55,8 @@
private static final String TAG = WriteWifiConfigToNfcDialog.class.getName().toString();
private static final String PASSWORD_FORMAT = "102700%s%s";
+ private static final int HEX_RADIX = 16;
+ private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
private final PowerManager.WakeLock mWakeLock;
@@ -58,12 +76,13 @@
WriteWifiConfigToNfcDialog(Context context, AccessPoint accessPoint,
WifiManager wifiManager) {
super(context);
- this.mContext = context;
- this.mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE))
+
+ mContext = context;
+ mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE))
.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WriteWifiConfigToNfcDialog:wakeLock");
- this.mAccessPoint = accessPoint;
- this.mOnTextChangedHandler = new Handler();
- this.mWifiManager = wifiManager;
+ mAccessPoint = accessPoint;
+ mOnTextChangedHandler = new Handler();
+ mWifiManager = wifiManager;
}
@Override
@@ -105,9 +124,9 @@
= mWifiManager.getWpsNfcConfigurationToken(mAccessPoint.networkId);
String passwordHex = byteArrayToHexString(password.getBytes());
- String passwordLength = password.length() >= 16
- ? "" + Character.forDigit(password.length(), 16)
- : "0" + Character.forDigit(password.length(), 16);
+ String passwordLength = password.length() >= HEX_RADIX
+ ? "" + Character.forDigit(password.length(), HEX_RADIX)
+ : "0" + Character.forDigit(password.length(), HEX_RADIX);
passwordHex = String.format(PASSWORD_FORMAT, passwordLength, passwordHex).toUpperCase();
@@ -166,11 +185,11 @@
setViewText(mCancelButton, com.android.internal.R.string.done_label);
} catch (IOException e) {
setViewText(mLabelView, R.string.status_failed_to_write);
- Log.e(TAG, "Unable to write WiFi config to NFC tag.", e);
+ Log.e(TAG, "Unable to write Wi-Fi config to NFC tag.", e);
return;
} catch (FormatException e) {
setViewText(mLabelView, R.string.status_failed_to_write);
- Log.e(TAG, "Unable to write WiFi config to NFC tag.", e);
+ Log.e(TAG, "Unable to write Wi-Fi config to NFC tag.", e);
return;
}
} else {
@@ -239,14 +258,13 @@
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
- data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
- + Character.digit(s.charAt(i + 1), 16));
+ data[i / 2] = (byte) ((Character.digit(s.charAt(i), HEX_RADIX) << 4)
+ + Character.digit(s.charAt(i + 1), HEX_RADIX));
}
return data;
}
- final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
private static String byteArrayToHexString(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for ( int j = 0; j < bytes.length; j++ ) {
@@ -259,6 +277,7 @@
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
@Override
public void afterTextChanged(Editable s) {}
}