summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/settings/res
diff options
context:
space:
mode:
authorZachary Heidepriem <zachh@google.com>2017-11-06 19:10:44 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-06 19:10:44 -0800
commit7547d3e963dab2b1ef467ad27c3f0d25e150b50c (patch)
tree642c7b180b33d1371c1f474be03fbb8de2110f6d /java/com/android/dialer/voicemail/settings/res
parentb519cd522d472b5d7980cc015aa37c101be99386 (diff)
Move voicemail settings to dialer UI
The voicemail module should not contain any UI code. Bug: 37258159 Test: DialerSettingsActivityTest,VoicemailSettingsFragmentTest. A future CL is refactoring VoicemailChangePinActivity into a fragment. PiperOrigin-RevId: 174125949 Change-Id: I89cf6a083b0a0952332440d76e7ae0cb1c801931
Diffstat (limited to 'java/com/android/dialer/voicemail/settings/res')
-rw-r--r--java/com/android/dialer/voicemail/settings/res/layout/voicemail_change_pin.xml94
-rw-r--r--java/com/android/dialer/voicemail/settings/res/values/strings.xml121
-rw-r--r--java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml46
3 files changed, 261 insertions, 0 deletions
diff --git a/java/com/android/dialer/voicemail/settings/res/layout/voicemail_change_pin.xml b/java/com/android/dialer/voicemail/settings/res/layout/voicemail_change_pin.xml
new file mode 100644
index 000000000..304bd37ec
--- /dev/null
+++ b/java/com/android/dialer/voicemail/settings/res/layout/voicemail_change_pin.xml
@@ -0,0 +1,94 @@
+<?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"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_horizontal"
+ android:orientation="vertical">
+ <!-- header text ('Enter Pin') -->
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:paddingTop="48dp"
+ android:paddingStart="48dp"
+ android:paddingEnd="48dp">
+ <TextView
+ android:id="@+id/headerText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:lines="2"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle"
+ android:accessibilityLiveRegion="polite"/>
+
+ <!-- hint text ('PIN too short') -->
+ <TextView
+ android:id="@+id/hintText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:lines="2"/>
+
+ <!-- error text ('PIN too short') -->
+ <TextView
+ android:id="@+id/errorText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:lines="2"
+ android:textColor="@android:color/holo_red_dark"/>
+
+ <!-- Password entry field -->
+ <EditText
+ android:id="@+id/pin_entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:imeOptions="actionNext|flagNoExtractUi"
+ android:inputType="numberPassword"
+ android:textSize="24sp"/>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:gravity="end"
+ android:orientation="horizontal">
+
+ <!-- left : cancel -->
+ <Button
+ android:id="@+id/cancel_button"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:text="@string/change_pin_cancel_label"/>
+
+ <!-- right : continue -->
+ <Button
+ android:id="@+id/next_button"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:text="@string/change_pin_continue_label"/>
+
+ </LinearLayout>
+</LinearLayout>
diff --git a/java/com/android/dialer/voicemail/settings/res/values/strings.xml b/java/com/android/dialer/voicemail/settings/res/values/strings.xml
new file mode 100644
index 000000000..4e502b488
--- /dev/null
+++ b/java/com/android/dialer/voicemail/settings/res/values/strings.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Title of the "Voicemail" settings screen, with a text label identifying which SIM the settings are for. -->
+ <string name="voicemail_settings_with_label">Voicemail (<xliff:g example="Mock Carrier" id="subscriptionlabel">%s</xliff:g>)</string>
+
+ <!-- Call settings screen, setting option name -->
+ <string name="voicemail_settings_title">Voicemail</string>
+
+ <!-- DO NOT TRANSLATE. Internal key for a voicemail notification preference. -->
+ <string name="voicemail_notifications_key" translatable="false">voicemail_notification_key</string>
+
+ <!-- Voicemail notifications title. The user clicks on this preference to select
+ which sound to play and whether to vibrate when a voicemail notification is received.
+ [CHAR LIMIT=30] -->
+ <string name="voicemail_notifications_preference_title">Notifications</string>
+ <string name="voicemail_advanced_settings_key" translatable="false">voicemail_advanced_settings_key</string>
+
+ <!-- Title for advanced settings in the voicemail settings -->
+ <string name="voicemail_advanced_settings_title">Advanced Settings</string>
+
+ <!-- DO NOT TRANSLATE. Internal key for a visual voicemail preference. -->
+ <string name="voicemail_visual_voicemail_key" translatable="false">voicemail_visual_voicemail_key</string>
+
+ <!-- DO NOT TRANSLATE. Internal key for a visual voicemail archive preference. -->
+ <string name="voicemail_visual_voicemail_archive_key" translatable="false">archive_is_enabled</string>
+
+ <!-- DO NOT TRANSLATE. Internal key for a voicemail change pin preference. -->
+ <string name="voicemail_change_pin_key" translatable="false">voicemail_change_pin_key</string>
+
+ <!-- Visual voicemail on/off title [CHAR LIMIT=40] -->
+ <string name="voicemail_visual_voicemail_switch_title">Visual Voicemail</string>
+
+ <!-- Visual voicemail archive on/off title [CHAR LIMIT=40] -->
+ <string name="voicemail_visual_voicemail_auto_archive_switch_title">Extra backup and storage</string>
+
+ <!-- Voicemail change PIN dialog title [CHAR LIMIT=40] -->
+ <string name="voicemail_set_pin_preference_title">Set PIN</string>
+ <!-- Voicemail change PIN dialog title [CHAR LIMIT=40] -->
+ <string name="voicemail_change_pin_preference_title">Change PIN</string>
+
+ <string name="voicemail_change_pin_preference_summary_disable">Visual voicemail must be enabled to change PIN</string>
+ <string name="voicemail_change_pin_preference_summary_not_activated">Visual voicemail is not activated yet, please try again later</string>
+
+ <!-- Hint for the old PIN field in the change vociemail PIN dialog -->
+ <string name="vm_change_pin_old_pin">Old PIN</string>
+ <!-- Hint for the new PIN field in the change vociemail PIN dialog -->
+ <string name="vm_change_pin_new_pin">New PIN</string>
+
+ <!-- Message on the dialog when PIN changing is in progress -->
+ <string name="vm_change_pin_progress_message">Please wait.</string>
+ <!-- Error message for the voicemail PIN change if the PIN is too short -->
+ <string name="vm_change_pin_error_too_short">The new PIN is too short.</string>
+ <!-- Error message for the voicemail PIN change if the PIN is too long -->
+ <string name="vm_change_pin_error_too_long">The new PIN is too long.</string>
+ <!-- Error message for the voicemail PIN change if the PIN is too weak -->
+ <string name="vm_change_pin_error_too_weak">The new PIN is too weak. A strong password should not have continuous sequence or repeated digits.</string>
+ <!-- Error message for the voicemail PIN change if the old PIN entered doesn't match -->
+ <string name="vm_change_pin_error_mismatch">The old PIN does not match.</string>
+ <!-- Error message for the voicemail PIN change if the new PIN contains invalid character -->
+ <string name="vm_change_pin_error_invalid">The new PIN contains invalid characters.</string>
+ <!-- Error message for the voicemail PIN change if operation has failed -->
+ <string name="vm_change_pin_error_system_error">Unable to change PIN</string>
+
+ <!-- The title for the change voicemail PIN activity -->
+ <string name="change_pin_title">Change Voicemail PIN</string>
+ <!-- The label for the continue button in change voicemail PIN activity -->
+ <string name="change_pin_continue_label">Continue</string>
+ <!-- The label for the cancel button in change voicemail PIN activity -->
+ <string name="change_pin_cancel_label">Cancel</string>
+ <!-- The label for the ok button in change voicemail PIN activity -->
+ <string name="change_pin_ok_label">Ok</string>
+ <!-- The title for the enter old pin step in change voicemail PIN activity -->
+ <string name="change_pin_enter_old_pin_header">Confirm your old PIN</string>
+ <!-- The hint for the enter old pin step in change voicemail PIN activity -->
+ <string name="change_pin_enter_old_pin_hint">Enter your voicemail PIN to continue.</string>
+ <!-- The title for the enter new pin step in change voicemail PIN activity -->
+ <string name="change_pin_enter_new_pin_header">Set a new PIN</string>
+ <!-- The hint for the enter new pin step in change voicemail PIN activity -->
+ <string name="change_pin_enter_new_pin_hint">PIN must be <xliff:g example="4" id="min">%1$d</xliff:g>-<xliff:g example="7" id="max">%2$d</xliff:g> digits.</string>
+ <!-- The title for the confirm new pin step in change voicemail PIN activity -->
+ <string name="change_pin_confirm_pin_header">Confirm your PIN</string>
+ <!-- The error message for th confirm new pin step in change voicemail PIN activity, if the pin doen't match the one previously entered -->
+ <string name="change_pin_confirm_pins_dont_match">PINs don\'t match</string>
+ <!-- The toast to show after the voicemail PIN has been successfully changed -->
+ <string name="change_pin_succeeded">Voicemail PIN updated</string>
+ <!-- The error message to show if the server reported an error while attempting to change the voicemail PIN -->
+ <string name="change_pin_system_error">Unable to set PIN</string>
+
+ <string name="voicemail_visual_voicemail_donation_key" translatable="false">donate_voicemails</string>
+
+ <!-- Title for visual voicemail setting that enables user to donate their voicemails for analysis.
+ [CHAR LIMIT=40] -->
+ <string name="voicemail_visual_voicemail_donation_switch_title">
+ Voicemail transcription analysis
+ </string>
+ <!-- Summary information for visual voicemail donation setting when visual voicemail is not enabled
+ [CHAR LIMIT=NONE] -->
+ <string name="voicemail_donate_preference_summary_disable">Visual voicemail must be enabled to donate voicemails</string>
+ <!-- Summary information for visual voicemail donation setting when visual voicemail is not activated
+ [CHAR LIMIT=NONE] -->
+ <string name="voicemail_donate_preference_summary_not_activated">Visual voicemail is not activated yet, please try again later</string>
+ <!-- Summary information for visual voicemail donation setting [CHAR LIMIT=NONE] -->
+ <string name="voicemail_donate_preference_summary_info">Let Google review your voicemail messages to improve transcription quality</string>
+
+</resources>
diff --git a/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml b/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml
new file mode 100644
index 000000000..9b0391ad4
--- /dev/null
+++ b/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml
@@ -0,0 +1,46 @@
+<?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/voicemail_settings_title">
+
+ <Preference
+ android:key="@string/voicemail_notifications_key"
+ android:title="@string/voicemail_notifications_preference_title"/>
+
+ <SwitchPreference
+ android:key="@string/voicemail_visual_voicemail_key"
+ android:title="@string/voicemail_visual_voicemail_switch_title"/>"
+
+ <SwitchPreference
+ android:key="@string/voicemail_visual_voicemail_archive_key"
+ android:dependency="@string/voicemail_visual_voicemail_key"
+ android:title="@string/voicemail_visual_voicemail_auto_archive_switch_title"/>"
+
+ <SwitchPreference
+ android:key="@string/voicemail_visual_voicemail_donation_key"
+ android:dependency="@string/voicemail_visual_voicemail_key"
+ android:title="@string/voicemail_visual_voicemail_donation_switch_title"/>"
+
+ <Preference
+ android:key="@string/voicemail_change_pin_key"
+ android:title="@string/voicemail_change_pin_preference_title"/>
+
+ <PreferenceScreen
+ android:key="@string/voicemail_advanced_settings_key"
+ android:title="@string/voicemail_advanced_settings_title">
+ </PreferenceScreen>
+</PreferenceScreen>