Merge "[DS] DSDS support for Settings" into lmp-sprout-dev
diff --git a/res/drawable/ic_audio_alarm_24dp.xml b/res/drawable/ic_audio_alarm_24dp.xml
new file mode 100644
index 0000000..ddfaa01
--- /dev/null
+++ b/res/drawable/ic_audio_alarm_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+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.
+-->
+<!-- shrink ic_audio_alarm from 32dp to 24dp using insets -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@*android:drawable/ic_audio_alarm"
+ android:inset="4dp"
+ />
diff --git a/res/drawable/ic_audio_vol_24dp.xml b/res/drawable/ic_audio_vol_24dp.xml
new file mode 100644
index 0000000..ecb3a40
--- /dev/null
+++ b/res/drawable/ic_audio_vol_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+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.
+-->
+<!-- shrink ic_audio_vol from 32dp to 24dp using insets -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@*android:drawable/ic_audio_vol"
+ android:inset="4dp"
+ />
diff --git a/res/drawable/ring_notif.xml b/res/drawable/ring_notif.xml
index 414a83d..cc9da31 100644
--- a/res/drawable/ring_notif.xml
+++ b/res/drawable/ring_notif.xml
@@ -16,9 +16,6 @@
<!-- shrink ic_audio_ring_notif from 32dp to 24dp using insets -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@*android:drawable/ic_audio_ring_notif"
- android:insetLeft="4dp"
- android:insetRight="4dp"
- android:insetTop="4dp"
- android:insetBottom="4dp"
+ android:inset="4dp"
/>
diff --git a/res/drawable/ring_notif_mute.xml b/res/drawable/ring_notif_mute.xml
index afb835c..fe9417d 100644
--- a/res/drawable/ring_notif_mute.xml
+++ b/res/drawable/ring_notif_mute.xml
@@ -16,8 +16,5 @@
<!-- shrink ic_audio_ring_notif_mute from 32dp to 24dp using insets -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@*android:drawable/ic_audio_ring_notif_mute"
- android:insetLeft="4dp"
- android:insetRight="4dp"
- android:insetTop="4dp"
- android:insetBottom="4dp"
+ android:inset="4dp"
/>
diff --git a/res/drawable/ring_notif_vibrate.xml b/res/drawable/ring_notif_vibrate.xml
index 4f19e01..37113d7 100644
--- a/res/drawable/ring_notif_vibrate.xml
+++ b/res/drawable/ring_notif_vibrate.xml
@@ -16,8 +16,5 @@
<!-- shrink ic_audio_ring_notif_vibrate from 32dp to 24dp using insets -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@*android:drawable/ic_audio_ring_notif_vibrate"
- android:insetLeft="4dp"
- android:insetRight="4dp"
- android:insetTop="4dp"
- android:insetBottom="4dp"
+ android:inset="4dp"
/>
diff --git a/res/layout/wifi_ap_dialog.xml b/res/layout/wifi_ap_dialog.xml
index 002a640..30043c4 100644
--- a/res/layout/wifi_ap_dialog.xml
+++ b/res/layout/wifi_ap_dialog.xml
@@ -16,50 +16,54 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300sp"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:fadeScrollbars="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="8dip"
android:orientation="vertical">
<LinearLayout android:id="@+id/info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item"
android:orientation="vertical" />
<LinearLayout android:id="@+id/type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item"
android:orientation="vertical"
android:visibility="gone">
<TextView
- style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_label"
android:layout_marginTop="8dip"
android:text="@string/wifi_ssid" />
<EditText android:id="@+id/ssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_ssid_hint"
android:inputType="textNoSuggestions"
android:maxLength="32" />
<TextView
- style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_label"
android:layout_marginTop="8dip"
android:text="@string/wifi_security" />
<Spinner android:id="@+id/security"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_content"
android:prompt="@string/wifi_security"
android:entries="@array/wifi_ap_security" />
</LinearLayout>
@@ -67,36 +71,38 @@
<LinearLayout android:id="@+id/fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item"
android:orientation="vertical"
android:visibility="gone">
<TextView
- style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="4dip"
+ style="@style/wifi_item_label"
+ android:layout_marginTop="8dip"
android:text="@string/wifi_password" />
<EditText android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_edit_content"
android:singleLine="true"
android:password="true"
android:maxLength="63"
android:imeOptions="flagForceAscii" />
<TextView android:id="@+id/hint"
- style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ style="@style/wifi_item_label"
android:text="@string/credentials_password_too_short"
+ android:layout_marginTop="8dip"
android:layout_marginBottom="10sp"/>
<CheckBox android:id="@+id/show_password"
- style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/wifi_item_content"
android:text="@string/wifi_show_password" />
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml
index b7b20c7..c1fbc4f 100644
--- a/res/layout/wifi_dialog.xml
+++ b/res/layout/wifi_dialog.xml
@@ -26,20 +26,30 @@
android:paddingBottom="8dip">
<LinearLayout android:id="@+id/info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section" />
<LinearLayout android:id="@+id/type"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
<LinearLayout
- style="@style/wifi_item" >
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_ssid"
android:textDirection="locale" />
<EditText android:id="@+id/ssid"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:hint="@string/wifi_ssid_hint"
android:maxLength="32"
@@ -47,98 +57,144 @@
android:inputType="textNoSuggestions" />
</LinearLayout>
- <LinearLayout
- style="@style/wifi_item" >
- <TextView
- style="@style/wifi_item_label"
- android:text="@string/wifi_security" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item" >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item_label"
+ android:text="@string/wifi_security" />
- <Spinner android:id="@+id/security"
- style="@style/wifi_item_content"
- android:prompt="@string/wifi_security"
- android:entries="@array/wifi_security" />
- </LinearLayout>
+ <Spinner android:id="@+id/security"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item_content"
+ android:prompt="@string/wifi_security"
+ android:entries="@array/wifi_security" />
+ </LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/security_fields"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
<LinearLayout android:id="@+id/eap"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
<LinearLayout android:id="@+id/l_method"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_eap_method" />
<Spinner android:id="@+id/method"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/wifi_eap_method"
android:entries="@array/wifi_eap_method" />
</LinearLayout>
<LinearLayout android:id="@+id/l_phase2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/please_select_phase2" />
<Spinner android:id="@+id/phase2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/please_select_phase2"
android:entries="@array/wifi_phase2_entries" />
</LinearLayout>
<LinearLayout android:id="@+id/l_ca_cert"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_eap_ca_cert" />
<Spinner android:id="@+id/ca_cert"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/wifi_eap_ca_cert" />
</LinearLayout>
<LinearLayout android:id="@+id/l_user_cert"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_eap_user_cert" />
<Spinner android:id="@+id/user_cert"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/wifi_eap_user_cert" />
</LinearLayout>
<LinearLayout android:id="@+id/l_identity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_eap_identity" />
<EditText android:id="@+id/identity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
</LinearLayout>
<LinearLayout android:id="@+id/l_anonymous"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_eap_anonymous" />
<EditText android:id="@+id/anonymous"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
@@ -146,34 +202,50 @@
</LinearLayout>
<LinearLayout android:id="@+id/password_layout"
- style="@style/wifi_item" >
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_password" />
<EditText android:id="@+id/password"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:password="true" />
</LinearLayout>
<LinearLayout android:id="@+id/show_password_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<!-- Dummy to enable right-justification of checkbox -->
<TextView
- style="@style/wifi_item_label" />
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item_label" />
<CheckBox android:id="@+id/show_password"
- style="@style/wifi_item_content"
- android:textSize="14sp"
- android:text="@string/wifi_show_password" />
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item_content"
+ android:textSize="14sp"
+ android:text="@string/wifi_show_password" />
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/wifi_advanced_toggle"
- style="@style/wifi_item"
- android:visibility="gone">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item"
+ android:visibility="gone">
<CheckBox android:id="@+id/wifi_advanced_togglebox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:textSize="14sp"
android:text="@string/wifi_show_advanced" />
@@ -186,14 +258,20 @@
android:visibility="gone">
<LinearLayout android:id="@+id/proxy_settings_fields"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item"
android:visibility="gone">
<TextView android:id="@+id/proxy_settings_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/proxy_settings_title" />
<Spinner android:id="@+id/proxy_settings"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/proxy_settings_title"
android:entries="@array/wifi_proxy_settings" />
@@ -201,26 +279,41 @@
</LinearLayout>
<LinearLayout android:id="@+id/proxy_warning_limited_support"
- style="@style/wifi_item"
- android:visibility="gone">
- <!-- Dummy to enable right-justification of warning -->
- <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item"
+ android:visibility="gone">
+ <!-- Dummy to enable right-justification of warning -->
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label" />
- <TextView
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:text="@string/proxy_warning_limited_support" />
</LinearLayout>
<LinearLayout android:id="@+id/proxy_pac_field"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
- <LinearLayout style="@style/wifi_item">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item">
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/proxy_url_title" />
<EditText android:id="@+id/proxy_pac"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:hint="@string/proxy_url_hint"
android:inputType="textNoSuggestions"
@@ -228,37 +321,60 @@
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/proxy_fields"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
- <LinearLayout style="@style/wifi_item">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item">
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/proxy_hostname_label" />
<EditText android:id="@+id/proxy_hostname"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:hint="@string/proxy_hostname_hint"
android:inputType="textNoSuggestions"
android:singleLine="true" />
</LinearLayout>
- <LinearLayout style="@style/wifi_item">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item">
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/proxy_port_label" />
<EditText android:id="@+id/proxy_port"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:hint="@string/proxy_port_hint"
android:inputType="number"
android:singleLine="true" />
</LinearLayout>
- <LinearLayout style="@style/wifi_item">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item">
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/proxy_exclusionlist_label" />
<EditText android:id="@+id/proxy_exclusionlist"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:hint="@string/proxy_exclusionlist_hint"
android:inputType="textNoSuggestions"
@@ -267,14 +383,20 @@
</LinearLayout>
<LinearLayout android:id="@+id/ip_fields"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item"
android:visibility="gone">
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_ip_settings" />
<Spinner android:id="@+id/ip_settings"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/wifi_ip_settings"
android:entries="@array/wifi_ip_settings" />
@@ -282,15 +404,23 @@
</LinearLayout>
<LinearLayout android:id="@+id/staticip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_section"
android:visibility="gone">
<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_ip_address" />
<EditText android:id="@+id/ipaddress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_ip_address_hint"
@@ -298,12 +428,18 @@
</LinearLayout>
<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_gateway" />
<EditText android:id="@+id/gateway"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_gateway_hint"
@@ -311,24 +447,36 @@
</LinearLayout>
<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_network_prefix_length" />
<EditText android:id="@+id/network_prefix_length"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_network_prefix_length_hint"
android:inputType="number" />
</LinearLayout>
<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_dns1" />
<EditText android:id="@+id/dns1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_dns1_hint"
@@ -336,12 +484,18 @@
</LinearLayout>
<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
<TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_dns2" />
<EditText android:id="@+id/dns2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_dns2_hint"
diff --git a/res/layout/wifi_dialog_row.xml b/res/layout/wifi_dialog_row.xml
index 6cac559..1fe9063 100644
--- a/res/layout/wifi_dialog_row.xml
+++ b/res/layout/wifi_dialog_row.xml
@@ -15,15 +15,19 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/wifi_item" >
- <TextView
+ <TextView android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
style="@style/wifi_item_label"
- android:id="@+id/name"
android:textAlignment="viewStart" />
- <TextView
- android:id="@+id/value"
- style="@style/wifi_item_content"
+ <TextView android:id="@+id/value"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/wifi_item_label"
android:textStyle="bold"
android:textAlignment="viewStart" />
</LinearLayout>
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
index 0903167..8cbd5e8 100644
--- a/res/values-land/styles.xml
+++ b/res/values-land/styles.xml
@@ -18,4 +18,38 @@
<style name="KeyguardAppWidgetItem">
<item name="android:textSize">16sp</item>
</style>
+
+ <style name="wifi_item">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginStart">8dip</item>
+ <item name="android:layout_marginEnd">8dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:gravity">start</item>
+ </style>
+
+ <style name="wifi_item_label">
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Body1</item>
+ <item name="android:textColor">@*android:color/secondary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_content">
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
+ <item name="android:textColor">@*android:color/primary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_edit_content">
+ <item name="android:paddingStart">4dip</item>
+ <item name="android:layout_marginStart">4dip</item>
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="wifi_section">
+ <item name="android:orientation">vertical</item>
+ </style>
</resources>
diff --git a/res/values-sw600dp-land/styles.xml b/res/values-sw600dp-land/styles.xml
index 645d1fe..55fbe04 100644
--- a/res/values-sw600dp-land/styles.xml
+++ b/res/values-sw600dp-land/styles.xml
@@ -18,4 +18,38 @@
<style name="KeyguardAppWidgetItem">
<item name="android:textSize">18sp</item>
</style>
+
+ <style name="wifi_item">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginStart">8dip</item>
+ <item name="android:layout_marginEnd">8dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:gravity">start</item>
+ </style>
+
+ <style name="wifi_item_label">
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Body1</item>
+ <item name="android:textColor">@*android:color/secondary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_content">
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
+ <item name="android:textColor">@*android:color/primary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_edit_content">
+ <item name="android:paddingStart">4dip</item>
+ <item name="android:layout_marginStart">4dip</item>
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="wifi_section">
+ <item name="android:orientation">vertical</item>
+ </style>
</resources>
diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml
index 645d1fe..55fbe04 100644
--- a/res/values-sw720dp/styles.xml
+++ b/res/values-sw720dp/styles.xml
@@ -18,4 +18,38 @@
<style name="KeyguardAppWidgetItem">
<item name="android:textSize">18sp</item>
</style>
+
+ <style name="wifi_item">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginStart">8dip</item>
+ <item name="android:layout_marginEnd">8dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:gravity">start</item>
+ </style>
+
+ <style name="wifi_item_label">
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Body1</item>
+ <item name="android:textColor">@*android:color/secondary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_content">
+ <item name="android:textAlignment">viewStart</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
+ <item name="android:textColor">@*android:color/primary_text_default_material_light</item>
+ </style>
+
+ <style name="wifi_item_edit_content">
+ <item name="android:paddingStart">4dip</item>
+ <item name="android:layout_marginStart">4dip</item>
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="wifi_section">
+ <item name="android:orientation">vertical</item>
+ </style>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 448c992..8d39d37 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1554,7 +1554,7 @@
<!-- Text displayed when WPS fails due to another session [CHAR LIMIT=150] -->
<string name="wifi_wps_failed_overlap">Another WPS session was detected. Please try again in a few minutes.</string>
<!-- Label for the SSID of the network -->
- <string name="wifi_ssid">Network SSID</string>
+ <string name="wifi_ssid">Network name</string>
<!-- Hint for a text field to enter the SSID of a hidden wifi network. [CHAR LIMIT=35] -->
<string name="wifi_ssid_hint">Enter the SSID</string>
<!-- Label for the security of the connection -->
@@ -3668,11 +3668,12 @@
<!-- Warning that the device data will not be encrypted with password or PIN if
enabling an accessibility service and there is a secure lock setup. [CHAR LIMIT=NONE] -->
<string name="enable_service_encryption_warning">If you turn on <xliff:g id="service"
- example="TalkBack">%1$s</xliff:g>, your data\'s encryption won\'t be as strong.</string>
+ example="TalkBack">%1$s</xliff:g>, your device won’t use your screen lock to enhance
+ data encryption.</string>
<!-- Warning that the device data will not be encrypted with password or PIN if
choosing a secure lock and there is an enabled accessibility service. [CHAR LIMIT=NONE] -->
<string name="secure_lock_encryption_warning">Because you\'ve turned on an accessibility service,
- encryption based on this type of lock won\'t be as strong.</string>
+ your device won’t use your screen lock to enhance data encryption.</string>
<!-- Title for the capability of an accessibility service to receive events and keys. -->
<string name="capability_title_receiveAccessibilityEvents">Observe your actions</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b71f362..cd6883f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -220,8 +220,6 @@
</style>
<style name="wifi_item">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">8dip</item>
<item name="android:layout_marginStart">8dip</item>
<item name="android:layout_marginEnd">8dip</item>
@@ -232,8 +230,6 @@
</style>
<style name="wifi_item_label">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:paddingStart">8dip</item>
<item name="android:textSize">14sp</item>
<item name="android:textAlignment">viewStart</item>
@@ -242,24 +238,18 @@
</style>
<style name="wifi_item_content">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:textAlignment">viewStart</item>
<item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
<item name="android:textColor">@*android:color/primary_text_default_material_light</item>
</style>
<style name="wifi_item_edit_content">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:paddingStart">4dip</item>
<item name="android:layout_marginStart">4dip</item>
<item name="android:textSize">18sp</item>
</style>
<style name="wifi_section">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
</style>
diff --git a/res/xml/notification_settings.xml b/res/xml/notification_settings.xml
index e9a4992..3f9b40c 100644
--- a/res/xml/notification_settings.xml
+++ b/res/xml/notification_settings.xml
@@ -27,13 +27,13 @@
<!-- Media volume -->
<com.android.settings.notification.VolumeSeekBarPreference
android:key="media_volume"
- android:icon="@*android:drawable/ic_audio_vol"
+ android:icon="@drawable/ic_audio_vol_24dp"
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:icon="@drawable/ic_audio_alarm_24dp"
android:title="@string/alarm_volume_option_title" />
<!-- Ring volume -->
diff --git a/src/com/android/settings/RingerVolumePreference.java b/src/com/android/settings/RingerVolumePreference.java
deleted file mode 100644
index 313c1c0..0000000
--- a/src/com/android/settings/RingerVolumePreference.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Copyright (C) 2008 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 static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
-
-import com.android.internal.telephony.TelephonyIntents;
-
-import android.app.Dialog;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.media.AudioManager;
-import android.media.AudioSystem;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.Looper;
-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;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.ImageView;
-import android.widget.SeekBar;
-import android.widget.TextView;
-
-/**
- * Special preference type that allows configuration of both the ring volume and
- * notification volume.
- */
-public class RingerVolumePreference extends VolumePreference {
- private static final String TAG = "RingerVolumePreference";
- private static final int MSG_RINGER_MODE_CHANGED = 101;
-
- private SeekBarVolumizer [] mSeekBarVolumizer;
-
- // These arrays must all match in length and order
- private static final int[] SEEKBAR_ID = new int[] {
- R.id.media_volume_seekbar,
- R.id.ringer_volume_seekbar,
- R.id.notification_volume_seekbar,
- R.id.alarm_volume_seekbar
- };
-
- private static final int[] SEEKBAR_TYPE = new int[] {
- AudioManager.STREAM_MUSIC,
- AudioManager.STREAM_RING,
- AudioManager.STREAM_NOTIFICATION,
- AudioManager.STREAM_ALARM
- };
-
- private static final int[] CHECKBOX_VIEW_ID = new int[] {
- R.id.media_mute_button,
- R.id.ringer_mute_button,
- R.id.notification_mute_button,
- R.id.alarm_mute_button
- };
-
- private static final int[] SEEKBAR_SECTION_ID = new int[] {
- R.id.media_section,
- R.id.ringer_section,
- R.id.notification_section,
- R.id.alarm_section
- };
-
- private static final int[] SEEKBAR_MUTED_RES_ID = new int[] {
- com.android.internal.R.drawable.ic_audio_vol_mute,
- com.android.internal.R.drawable.ic_audio_ring_notif_mute,
- com.android.internal.R.drawable.ic_audio_notification_mute,
- com.android.internal.R.drawable.ic_audio_alarm_mute
- };
-
- private static final int[] SEEKBAR_UNMUTED_RES_ID = new int[] {
- com.android.internal.R.drawable.ic_audio_vol,
- com.android.internal.R.drawable.ic_audio_ring_notif,
- com.android.internal.R.drawable.ic_audio_notification,
- com.android.internal.R.drawable.ic_audio_alarm
- };
-
- private ImageView[] mCheckBoxes = new ImageView[SEEKBAR_MUTED_RES_ID.length];
- private SeekBar[] mSeekBars = new SeekBar[SEEKBAR_ID.length];
-
- private Handler mHandler = new Handler() {
- public void handleMessage(Message msg) {
- updateSlidersAndMutedStates();
- }
- };
-
- @Override
- public void createActionButtons() {
- setPositiveButtonText(android.R.string.ok);
- setNegativeButtonText(null);
- }
-
- private void updateSlidersAndMutedStates() {
- for (int i = 0; i < SEEKBAR_TYPE.length; i++) {
- int streamType = SEEKBAR_TYPE[i];
- boolean muted = mAudioManager.isStreamMute(streamType);
-
- if (mCheckBoxes[i] != null) {
- if (((streamType == AudioManager.STREAM_RING) ||
- (streamType == AudioManager.STREAM_NOTIFICATION)) &&
- (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE)) {
- mCheckBoxes[i].setImageResource(
- com.android.internal.R.drawable.ic_audio_ring_notif_vibrate);
- } else {
- mCheckBoxes[i].setImageResource(
- muted ? SEEKBAR_MUTED_RES_ID[i] : SEEKBAR_UNMUTED_RES_ID[i]);
- }
- }
- if (mSeekBars[i] != null) {
- final int volume = mAudioManager.getStreamVolume(streamType);
- mSeekBars[i].setProgress(volume);
- if (streamType != mAudioManager.getMasterStreamType() && muted) {
- mSeekBars[i].setEnabled(false);
- } else {
- mSeekBars[i].setEnabled(true);
- }
- }
- }
- }
-
- private BroadcastReceiver mRingModeChangedReceiver;
- private AudioManager mAudioManager;
-
- //private SeekBarVolumizer mNotificationSeekBarVolumizer;
- //private TextView mNotificationVolumeTitle;
-
- public RingerVolumePreference(Context context, AttributeSet attrs) {
- super(context, attrs);
-
- // The always visible seekbar is for ring volume
- setStreamType(AudioManager.STREAM_RING);
-
- setDialogLayoutResource(R.layout.preference_dialog_ringervolume);
- //setDialogIcon(R.drawable.ic_settings_sound);
-
- mSeekBarVolumizer = new SeekBarVolumizer[SEEKBAR_ID.length];
-
- mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
- }
-
- @Override
- protected void onBindDialogView(View view) {
- super.onBindDialogView(view);
-
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- SeekBar seekBar = (SeekBar) view.findViewById(SEEKBAR_ID[i]);
- mSeekBars[i] = seekBar;
- if (SEEKBAR_TYPE[i] == AudioManager.STREAM_MUSIC) {
- mSeekBarVolumizer[i] = new SeekBarVolumizer(getContext(),
- SEEKBAR_TYPE[i], getMediaVolumeUri(getContext()), this);
- mSeekBarVolumizer[i].setSeekBar(seekBar);
- } else {
- mSeekBarVolumizer[i] = new SeekBarVolumizer(getContext(),
- SEEKBAR_TYPE[i], null, this);
- mSeekBarVolumizer[i].setSeekBar(seekBar);
- }
- }
-
- // Register callbacks for mute/unmute buttons
- for (int i = 0; i < mCheckBoxes.length; i++) {
- ImageView checkbox = (ImageView) view.findViewById(CHECKBOX_VIEW_ID[i]);
- mCheckBoxes[i] = checkbox;
- }
-
- // Load initial states from AudioManager
- updateSlidersAndMutedStates();
-
- // Listen for updates from AudioManager
- if (mRingModeChangedReceiver == null) {
- final IntentFilter filter = new IntentFilter();
- filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
- mRingModeChangedReceiver = new BroadcastReceiver() {
- public void onReceive(Context context, Intent intent) {
- final String action = intent.getAction();
- if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {
- mHandler.sendMessage(mHandler.obtainMessage(MSG_RINGER_MODE_CHANGED, intent
- .getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1), 0));
- }
- }
- };
- getContext().registerReceiver(mRingModeChangedReceiver, filter);
- }
-
- boolean useMasterVolume = getContext().getResources().
- getBoolean(com.android.internal.R.bool.config_useMasterVolume);
- if (useMasterVolume) {
- // If config_useMasterVolume is true, all streams are treated as STREAM_MASTER.
- // So hide all except a stream.
- int id;
- if (Utils.isVoiceCapable(getContext())) {
- id = R.id.ringer_section;
- } else {
- id = R.id.media_section;
- }
- for (int i = 0; i < SEEKBAR_SECTION_ID.length; i++) {
- if (SEEKBAR_SECTION_ID[i] != id) {
- view.findViewById(SEEKBAR_SECTION_ID[i]).setVisibility(View.GONE);
- }
- }
- } else {
- // Disable either ringer+notifications or notifications
- int id;
- if (!Utils.isVoiceCapable(getContext())) {
- id = R.id.ringer_section;
- } else {
- id = R.id.notification_section;
- }
- View hideSection = view.findViewById(id);
- hideSection.setVisibility(View.GONE);
- }
- }
-
- private Uri getMediaVolumeUri(Context context) {
- return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"
- + context.getPackageName()
- + "/" + R.raw.media_volume);
- }
-
- @Override
- protected void onDialogClosed(boolean positiveResult) {
- super.onDialogClosed(positiveResult);
-
- if (!positiveResult) {
- for (SeekBarVolumizer vol : mSeekBarVolumizer) {
- if (vol != null) vol.revertVolume();
- }
- }
- cleanup();
- }
-
- @Override
- public void onActivityStop() {
- super.onActivityStop();
-
- for (SeekBarVolumizer vol : mSeekBarVolumizer) {
- if (vol != null) vol.stopSample();
- }
- }
-
- @Override
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- boolean isdown = (event.getAction() == KeyEvent.ACTION_DOWN);
- switch (keyCode) {
- case KeyEvent.KEYCODE_VOLUME_DOWN:
- case KeyEvent.KEYCODE_VOLUME_UP:
- case KeyEvent.KEYCODE_VOLUME_MUTE:
- return true;
- default:
- return false;
- }
- }
-
- @Override
- public void onSampleStarting(SeekBarVolumizer volumizer) {
- super.onSampleStarting(volumizer);
- for (SeekBarVolumizer vol : mSeekBarVolumizer) {
- if (vol != null && vol != volumizer) vol.stopSample();
- }
- }
-
- private void cleanup() {
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- if (mSeekBarVolumizer[i] != null) {
- Dialog dialog = getDialog();
- if (dialog != null && dialog.isShowing()) {
- // Stopped while dialog was showing, revert changes
- mSeekBarVolumizer[i].revertVolume();
- }
- mSeekBarVolumizer[i].stop();
- mSeekBarVolumizer[i] = null;
- }
- }
- if (mRingModeChangedReceiver != null) {
- getContext().unregisterReceiver(mRingModeChangedReceiver);
- mRingModeChangedReceiver = null;
- }
- }
-
- @Override
- protected Parcelable onSaveInstanceState() {
- final Parcelable superState = super.onSaveInstanceState();
- if (isPersistent()) {
- // No need to save instance state since it's persistent
- return superState;
- }
-
- final SavedState myState = new SavedState(superState);
- VolumeStore[] volumeStore = myState.getVolumeStore(SEEKBAR_ID.length);
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- SeekBarVolumizer vol = mSeekBarVolumizer[i];
- if (vol != null) {
- vol.onSaveInstanceState(volumeStore[i]);
- }
- }
- return myState;
- }
-
- @Override
- protected void onRestoreInstanceState(Parcelable state) {
- if (state == null || !state.getClass().equals(SavedState.class)) {
- // Didn't save state for us in onSaveInstanceState
- super.onRestoreInstanceState(state);
- return;
- }
-
- SavedState myState = (SavedState) state;
- super.onRestoreInstanceState(myState.getSuperState());
- VolumeStore[] volumeStore = myState.getVolumeStore(SEEKBAR_ID.length);
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- SeekBarVolumizer vol = mSeekBarVolumizer[i];
- if (vol != null) {
- vol.onRestoreInstanceState(volumeStore[i]);
- }
- }
- }
-
- private static class SavedState extends BaseSavedState {
- VolumeStore [] mVolumeStore;
-
- public SavedState(Parcel source) {
- super(source);
- mVolumeStore = new VolumeStore[SEEKBAR_ID.length];
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- mVolumeStore[i] = new VolumeStore();
- mVolumeStore[i].volume = source.readInt();
- mVolumeStore[i].originalVolume = source.readInt();
- }
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags);
- for (int i = 0; i < SEEKBAR_ID.length; i++) {
- dest.writeInt(mVolumeStore[i].volume);
- dest.writeInt(mVolumeStore[i].originalVolume);
- }
- }
-
- VolumeStore[] getVolumeStore(int count) {
- if (mVolumeStore == null || mVolumeStore.length != count) {
- mVolumeStore = new VolumeStore[count];
- for (int i = 0; i < count; i++) {
- mVolumeStore[i] = new VolumeStore();
- }
- }
- return mVolumeStore;
- }
-
- public SavedState(Parcelable superState) {
- super(superState);
- }
-
- public static final Parcelable.Creator<SavedState> CREATOR =
- new Parcelable.Creator<SavedState>() {
- public SavedState createFromParcel(Parcel in) {
- return new SavedState(in);
- }
-
- public SavedState[] newArray(int size) {
- return new SavedState[size];
- }
- };
- }
-}