Merge change I9a1ed7e4 into eclair

* changes:
  Update to reflect new priorities for A2DP profile. DO NOT MERGE.
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 7f256c5..00958d9 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Při příchozím hovoru vibrovat"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Tón oznámení"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Umožňuje nastavit výchozí tón oznámení"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Hlasitost příchozího hovoru"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Hlasitost oznámení"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Použije hlasitost příchozích hovorů také pro oznámení"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 70a2fe0..ff36998 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibration ved indgående opkald"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Ringetone for meddelelser"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Angiv din standardringetone for meddelelser"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Lydstyrke for indgående opkald"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Meddelelseslydstyrke"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Brug lydstyrke for indgående opkald til meddelelser"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 944649e..7f7b88f 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibration für eingehende Anrufe"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Benachrichtigungston"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Standard-Benachrichtigungston festlegen"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Lautstärke für eingehende Anrufe"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Benachrichtigungslautstärke"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Lautstärke für eingehende Anrufe für Benachrichtigungen verwenden"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index cd72dfc..2374920 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Δόνηση τηλεφώνου για εισερχόμενες κλήσεις"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Ήχος κλήσης ειδοποίησης"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Ορισμός του προεπιλεγμένου ήχου κλήσης ειδοποίησης"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Ένταση ήχου εισερχόμενης κλήσης"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Ένταση ήχου ειδοποίησης"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Χρήση έντασης ήχου εισερχόμενης κλήσης για ειδοποιήσεις"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 12f8fe42..4469a63 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Hacer vibrar el teléfono para las llamadas entrantes"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Tono de llam. de notific."</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Establecer tono predeterminado de llamada de notificación"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volumen de llamada entrante"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volumen de notificación"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Utilizar el volumen de las llamadas entrantes para las notificaciones"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 2133836..e19e911 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Teléfono en vibración para llamadas entrantes"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Tono de notificación"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Establecer el tono de notificación predeterminado"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volumen de llamada entrante"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volumen de notificaciones"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Utilizar volumen de llamada entrante para notificaciones"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index bcc9f67..1beafb7 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Activer le vibreur pour les appels entrants"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Sonnerie de notification"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Définir votre sonnerie de notification par défaut"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volume des appels entrants"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volume des notifications"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Utiliser le volume des appels entrants pour les notifications"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index dede061..04555bf 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibrazione per chiamate in entrata"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Suoneria notifiche"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Imposta la suoneria di notifica predefinita"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volume chiamate in entrata"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volume notifiche"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Usa volume chiamate in entrata per le notifiche"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 438ba8f..4e204f4 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"着信時バイブレーションをONにする"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"通知音"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"端末の基本通知音を選択"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"着信音量"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"通知音量"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"通知音にも着信音量を適用"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 9f14f66..d50fc97 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"전화 올 때 진동"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"알림 벨소리"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"기본 알림 벨소리 설정"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"수신전화 볼륨"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"알림 볼륨"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"알림을 위해 수신전화 볼륨 사용"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 5698563..e2e0d5a 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibrer ved innkommende anrop"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Ringetone for varsling"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Standard ringetone for varsling"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volum for innkommende anrop"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Varslingsvolum"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Bruk volum for innkommende anrop også for varslinger"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 463ea32..298834c 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Laat telefoon trillen bij inkomende oproepen"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Beltoon voor meldingen"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Standaardbeltoon voor meldingen instellen"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volume van inkomende oproepen"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Meldingsvolume"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Volume van inkomende oproepen gebruiken voor meldingen"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index eadfe53..8dd9014 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Wibracje telefonu przy połączeniach przychodzących"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Powiadomienia"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Ustaw domyślny dzwonek dla powiadomień"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Głośność połączeń przychodzących"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Głośność powiadomienia"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Użyj głośności połączeń przychodzących dla powiadomień"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 34ccc82..eda38e2 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibrar telefone para chamadas recebidas"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Toque de notificação"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Definir toque de notificações predefinido"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volume de chamadas recebidas"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volume de notificações"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Utilizar volume de chamadas recebidas para notificações"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 9fc68d1..690159f 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Vibrar o telefone para chamadas recebidas"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Toque de notificação"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Definir o seu toque de notificação padrão"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volume da chamada recebida"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Volume da notificação"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Usar volume de chamada recebida para notificações"</string>
diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml
index 12f3050..f1c7bad 100644
--- a/res/values-ru/arrays.xml
+++ b/res/values-ru/arrays.xml
@@ -120,7 +120,7 @@
   <string-array name="emergency_tone_entries">
     <item msgid="5165439859689033665">"Выкл."</item>
     <item msgid="3165868966179561687">"Оповещение"</item>
-    <item msgid="6038758039030476855">"Вибрация"</item>
+    <item msgid="6038758039030476855">"Вибровызов"</item>
   </string-array>
   <string-array name="apn_auth_entries">
     <item msgid="3856896061242872146">"Нет"</item>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 816e6ea..b74827a 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Включить"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Мелодия уведомления"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Выбрать мелодию для уведомлений"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Громкость входящего вызова"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Громкость уведомления"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Использовать этот уровень громкости также для уведомлений"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index d34f379..a3f8595 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Telefonen vibrerar vid inkommande samtal"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Ringsignal för avisering"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Ställ in standardsignal för avisering"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Volym för inkommande samtal"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Aviseringsvolym"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Använd volymen för inkommande samtal vid avisering"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 4afe68c..556ab9c 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"Gelen çağrılarda telefonu titreştir"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"Bildirim zil sesi"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"Varsayılan bildirim zil sesinizi ayarlayın"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"Gelen çağrı ses düzeyi"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"Bildirim ses düzeyi"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"Bildirimlerde gelen çağrı ses düzeyini kullan"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index ccc17b3..88cecb7 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"来电时振动手机"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"通知铃声"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"设置默认的通知铃声"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"来电音量"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"通知音量"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"将来电音量用作通知音量"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 7d7e66d..8994a09 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -397,6 +397,10 @@
     <string name="vibrate_summary" msgid="5224303668448643275">"來電震動"</string>
     <string name="notification_sound_title" msgid="6316316069880531693">"通知鈴聲"</string>
     <string name="notification_sound_summary" msgid="7628081155578496618">"設定預設通知鈴聲"</string>
+    <!-- no translation found for notification_pulse_title (1247988024534030629) -->
+    <skip />
+    <!-- no translation found for notification_pulse_summary (6899220780534617152) -->
+    <skip />
     <string name="incoming_call_volume_title" msgid="6144314834963494752">"來電音量"</string>
     <string name="notification_volume_title" msgid="3363351773121138717">"通知音量"</string>
     <string name="checkbox_notification_same_as_incoming_call" msgid="1073644356290338921">"通知使用來電音量"</string>
@@ -670,8 +674,7 @@
     <string name="service_restarting" msgid="2242747937372354306">"重新啟動中"</string>
     <string name="no_running_services" msgid="6981216347270280598">"沒有正在運作的服務"</string>
     <string name="confirm_stop_service" msgid="5700448757318301681">"要停止服務嗎?"</string>
-    <!-- no translation found for confirm_stop_service_msg (1166661293369421272) -->
-    <skip />
+    <string name="confirm_stop_service_msg" msgid="1166661293369421272">"服務將不再繼續執行,除非您重新啟動該服務。這個動作可能會對應用程式「<xliff:g id="APPLICATION">%1$s</xliff:g>」造成無法預期的結果。"</string>
     <string name="confirm_stop_stop" msgid="7382363913280993331">"停止"</string>
     <string name="confirm_stop_cancel" msgid="206495326622692381">"取消"</string>
     <string name="service_started_by_app" msgid="8432097226392386802">"由應用程式啟動:輕觸螢幕即可停止"</string>
diff --git a/res/values/bools.xml b/res/values/bools.xml
new file mode 100644
index 0000000..61cc79e
--- /dev/null
+++ b/res/values/bools.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<resources>
+    <!-- Whether or not there is a notification led that is too intrusive to be pulsing
+         constantly -->
+    <bool name="has_intrusive_led">false</bool>
+    <!-- Whether or not the dock settings are to be displayed for this device when docked -->
+    <bool name="has_dock_settings">false</bool>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 68b955f..85ca4d4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -877,6 +877,10 @@
     <string name="notification_sound_title">Notification ringtone</string>
     <!-- Sound settings screen, setting option summary text -->
     <string name="notification_sound_summary">Set your default notification ringtone</string>
+    <!-- Sound settings screen, notification light repeat pulsing title -->
+    <string name="notification_pulse_title">Pulse notification light</string>
+    <!-- Sound settings screen, notification light repeat pulsing summary -->
+    <string name="notification_pulse_summary">Pulse trackball light repeatedly for new notifications</string>
     <!-- Sound settings screen, the title of the volume bar to adjust the incoming call volume -->
     <string name="incoming_call_volume_title">Incoming call volume</string>
     <!-- Sound settings screen, the title of the volume bar to adjust the notification volume -->
@@ -890,6 +894,8 @@
     <string name="media_volume_title">Media volume</string>
     <!-- Sound settings screen, setting option summary text -->
     <string name="media_volume_summary">Set volume for music and videos</string>
+    <!-- Sound settings screen, dock settings -->
+    <string name="dock_settings_title">Dock settings</string>
     <!-- Sound settings screen, setting check box label -->
     <string name="dtmf_tone_enable_title">Audible touch tones</string>
     <!-- Sound settings screen, setting option summary text when check box is selected -->
diff --git a/res/xml/sound_and_display_settings.xml b/res/xml/sound_and_display_settings.xml
index 8544fee..151b0fb 100644
--- a/res/xml/sound_and_display_settings.xml
+++ b/res/xml/sound_and_display_settings.xml
@@ -17,16 +17,17 @@
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
         
-    <PreferenceCategory
+    <PreferenceCategory android:key="sound_settings"
             android:title="@string/sound_settings">
-            
+
         <CheckBoxPreference
                 android:key="silent"
                 android:title="@string/silent_mode_title"
                 android:summary="@string/silent_mode_summary"
                 android:persistent="false"
+                android:order="1"
                 android:disableDependentsState="true" />
-    
+
         <com.android.settings.RingerVolumePreference
                 android:key="ring_volume"
                 android:title="@string/ring_volume_title"
@@ -34,16 +35,28 @@
                 android:dialogTitle="@string/ring_volume_title"
                 android:persistent="false"
                 android:dependency="silent"
+                android:order="2"
                 android:streamType="ring" />
-    
+
         <VolumePreference
                 android:key="media_volume"
                 android:title="@string/media_volume_title"
                 android:summary="@string/media_volume_summary"
                 android:dialogTitle="@string/media_volume_title"
                 android:persistent="false"
+                android:order="3"
                 android:streamType="music" />
-    
+
+        <PreferenceScreen
+                android:key="dock_settings"
+                android:order="4"
+                android:title="@string/dock_settings_title">
+            <intent
+                android:action="android.intent.action.MAIN"
+                android:targetPackage="com.android.settings"
+                android:targetClass="com.android.settings.bluetooth.DockSettingsActivity" />
+        </PreferenceScreen>
+
         <com.android.settings.DefaultRingtonePreference
                 android:key="ringtone"
                 android:title="@string/ringtone_title"
@@ -51,12 +64,14 @@
                 android:dialogTitle="@string/ringtone_title"
                 android:persistent="false"
                 android:dependency="silent"
+                android:order="5"
                 android:ringtoneType="ringtone" />
     
         <CheckBoxPreference
                 android:key="vibrate"
                 android:title="@string/vibrate_title"
                 android:summary="@string/vibrate_summary"
+                android:order="6"
                 android:persistent="false" />
     
         <com.android.settings.DefaultRingtonePreference
@@ -66,14 +81,23 @@
                 android:dialogTitle="@string/notification_sound_dialog_title"
                 android:dependency="silent"
                 android:persistent="false"
+                android:order="7"
                 android:ringtoneType="notification" />
-                
+
+        <CheckBoxPreference
+                android:key="notification_pulse"
+                android:title="@string/notification_pulse_title"
+                android:summary="@string/notification_pulse_summary"
+                android:order="8"
+                android:persistent="false" />
+
         <CheckBoxPreference
                 android:key="dtmf_tone"
                 android:title="@string/dtmf_tone_enable_title"
                 android:summaryOn="@string/dtmf_tone_enable_summary_on"
                 android:summaryOff="@string/dtmf_tone_enable_summary_off"
                 android:dependency="silent"
+                android:order="9"
                 android:defaultValue="true" />
 
         <CheckBoxPreference
@@ -82,6 +106,7 @@
                 android:summaryOn="@string/sound_effects_enable_summary_on"
                 android:summaryOff="@string/sound_effects_enable_summary_off"
                 android:dependency="silent"
+                android:order="10"
                 android:defaultValue="true" />
 
         <CheckBoxPreference
@@ -90,6 +115,7 @@
                 android:summaryOn="@string/haptic_feedback_enable_summary_on"
                 android:summaryOff="@string/haptic_feedback_enable_summary_off"
                 android:dependency="silent"
+                 android:order="11"
                 android:defaultValue="true" />
 
         <CheckBoxPreference
@@ -98,6 +124,7 @@
                 android:summaryOn="@string/play_media_notification_sounds_enable_summary_on"
                 android:summaryOff="@string/play_media_notification_sounds_enable_summary_off"
                 android:dependency="silent"
+                android:order="12"
                 android:defaultValue="true" />
 
     </PreferenceCategory>
diff --git a/src/com/android/settings/SoundAndDisplaySettings.java b/src/com/android/settings/SoundAndDisplaySettings.java
index 92297de..67fc533 100644
--- a/src/com/android/settings/SoundAndDisplaySettings.java
+++ b/src/com/android/settings/SoundAndDisplaySettings.java
@@ -17,8 +17,6 @@
 package com.android.settings;
 
 import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
-import static android.provider.Settings.System.COMPATIBILITY_MODE;
-
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -29,15 +27,17 @@
 import android.os.IMountService;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.preference.CheckBoxPreference;
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
+import android.preference.PreferenceGroup;
 import android.preference.PreferenceScreen;
-import android.preference.CheckBoxPreference;
 import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
+import android.telephony.TelephonyManager;
 import android.util.Log;
 import android.view.IWindowManager;
-import android.telephony.TelephonyManager;
 
 public class SoundAndDisplaySettings extends PreferenceActivity implements
         Preference.OnPreferenceChangeListener {
@@ -55,13 +55,20 @@
     private static final String KEY_HAPTIC_FEEDBACK = "haptic_feedback";
     private static final String KEY_ANIMATIONS = "animations";
     private static final String KEY_ACCELEROMETER = "accelerometer";
-    private static final String KEY_PLAY_MEDIA_NOTIFICATION_SOUNDS = "play_media_notification_sounds";
-    private static final String KEY_EMERGENCY_TONE ="emergency_tone";
-    
+    private static final String KEY_PLAY_MEDIA_NOTIFICATION_SOUNDS =
+            "play_media_notification_sounds";
+    private static final String KEY_EMERGENCY_TONE = "emergency_tone";
+    private static final String KEY_SOUND_SETTINGS = "sound_settings";
+    private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
+    private static final String KEY_DOCK_SETTINGS = "dock_settings";
+
     private CheckBoxPreference mSilent;
 
     private CheckBoxPreference mPlayMediaNotificationSounds;
 
+    private Preference mDockSettings;
+    private boolean mHasDockSettings;
+
     private IMountService mMountService = null;
 
     /*
@@ -77,6 +84,7 @@
     private CheckBoxPreference mHapticFeedback;
     private ListPreference mAnimations;
     private CheckBoxPreference mAccelerometer;
+    private CheckBoxPreference mNotificationPulse;
     private float[] mAnimationScales;
     
     private AudioManager mAudioManager;
@@ -86,10 +94,16 @@
     private BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
-            updateState(false);
+            if (intent.getAction().equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) {
+                updateState(false);
+            } else if (intent.getAction().equals(Intent.ACTION_DOCK_EVENT)) {
+                handleDockChange(intent);
+            }
         }
     };
 
+    private PreferenceGroup mSoundSettings;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -102,11 +116,11 @@
         mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount"));
         
         addPreferencesFromResource(R.xml.sound_and_display_settings);
-        
+
         if (TelephonyManager.PHONE_TYPE_CDMA != activePhoneType) {
             // device is not CDMA, do not display CDMA emergency_tone
             getPreferenceScreen().removePreference(findPreference(KEY_EMERGENCY_TONE));
-         }
+        }
 
         mSilent = (CheckBoxPreference) findPreference(KEY_SILENT);
         mPlayMediaNotificationSounds = (CheckBoxPreference) findPreference(KEY_PLAY_MEDIA_NOTIFICATION_SOUNDS);
@@ -142,8 +156,26 @@
                 resolver, Settings.System.EMERGENCY_TONE, FALLBACK_EMERGENCY_TONE_VALUE)));
             emergencyTonePreference.setOnPreferenceChangeListener(this);
         }
+
+        mSoundSettings = (PreferenceGroup) findPreference(KEY_SOUND_SETTINGS);
+        mNotificationPulse = (CheckBoxPreference)
+                mSoundSettings.findPreference(KEY_NOTIFICATION_PULSE);
+        if (mNotificationPulse != null &&
+                getResources().getBoolean(R.bool.has_intrusive_led) == false) {
+            mSoundSettings.removePreference(mNotificationPulse);
+        } else {
+            try {
+                mNotificationPulse.setChecked(Settings.System.getInt(resolver,
+                        Settings.System.NOTIFICATION_LIGHT_PULSE) == 1);
+                mNotificationPulse.setOnPreferenceChangeListener(this);
+            } catch (SettingNotFoundException snfe) {
+                Log.e(TAG, Settings.System.NOTIFICATION_LIGHT_PULSE + " not found");
+            }
+        }
+
+        initDockSettings();
     }
-    
+
     @Override
     protected void onResume() {
         super.onResume();
@@ -151,6 +183,12 @@
         updateState(true);
         
         IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION);
+        if (mHasDockSettings) {
+            if (mDockSettings != null) {
+                mSoundSettings.removePreference(mDockSettings);
+            }
+            filter.addAction(Intent.ACTION_DOCK_EVENT);
+        }
         registerReceiver(mReceiver, filter);
     }
 
@@ -161,6 +199,31 @@
         unregisterReceiver(mReceiver);
     }
 
+    private void initDockSettings() {
+        mDockSettings = mSoundSettings.findPreference(KEY_DOCK_SETTINGS);
+        mHasDockSettings = getResources().getBoolean(R.bool.has_dock_settings);
+        if (mDockSettings != null) {
+            mSoundSettings.removePreference(mDockSettings);
+            // Don't care even if we dock
+            if (getResources().getBoolean(R.bool.has_dock_settings) == false) {
+                mDockSettings = null;
+            }
+        }
+    }
+
+    private void handleDockChange(Intent intent) {
+        if (mHasDockSettings && mDockSettings != null) {
+            int dockState = intent.getIntExtra(Intent.EXTRA_DOCK_STATE, 0);
+            if (dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
+                // Show dock settings item
+                mSoundSettings.addPreference(mDockSettings);
+            } else {
+                // Remove dock settings item
+                mSoundSettings.removePreference(mDockSettings);
+            }
+        }
+    }
+
     private void updateState(boolean force) {
         final int ringerMode = mAudioManager.getRingerMode();
         final boolean silentOrVibrateMode =
@@ -279,12 +342,18 @@
             Settings.System.putInt(getContentResolver(),
                     Settings.System.ACCELEROMETER_ROTATION,
                     mAccelerometer.isChecked() ? 1 : 0);
+        } else if (preference == mNotificationPulse) {
+            boolean value = mNotificationPulse.isChecked();
+            Settings.System.putInt(getContentResolver(),
+                    Settings.System.NOTIFICATION_LIGHT_PULSE, value ? 1 : 0);
         }
+
         return true;
     }
 
     public boolean onPreferenceChange(Preference preference, Object objValue) {
-        if (KEY_ANIMATIONS.equals(preference.getKey())) {
+        final String key = preference.getKey();
+        if (KEY_ANIMATIONS.equals(key)) {
             try {
                 int value = Integer.parseInt((String) objValue);
                 if (mAnimationScales.length >= 1) {
@@ -303,7 +372,7 @@
             }
             
         }
-        if (KEY_SCREEN_TIMEOUT.equals(preference.getKey())) {
+        if (KEY_SCREEN_TIMEOUT.equals(key)) {
             int value = Integer.parseInt((String) objValue);
             try {
                 Settings.System.putInt(getContentResolver(), 
@@ -311,7 +380,7 @@
             } catch (NumberFormatException e) {
                 Log.e(TAG, "could not persist screen timeout setting", e);
             }
-        } else if (KEY_EMERGENCY_TONE.equals(preference.getKey())) {
+        } else if (KEY_EMERGENCY_TONE.equals(key)) {
             int value = Integer.parseInt((String) objValue);
             try {
                 Settings.System.putInt(getContentResolver(),
@@ -320,8 +389,7 @@
                 Log.e(TAG, "could not persist emergency tone setting", e);
             }
         }
-        
+
         return true;
     }
-
 }