Merge "Follow framework refactoring." into nyc-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b788d09..09cfa15 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1005,7 +1005,7 @@
<string name="lock_settings_picker_title">Choose screen lock</string>
<!-- Title for security picker to choose the profile unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
- <string name="lock_settings_picker_title_profile">Choose profile screen lock</string>
+ <string name="lock_settings_picker_title_profile">Choose work lock</string>
<!-- Title for security picker in setup wizard to choose the unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
<string name="setup_lock_settings_picker_title">Protect your phone</string>
@@ -1029,15 +1029,15 @@
<!-- Profile Security lock settings --><skip />
<!-- Title for PreferenceScreen to launch picker for security method for the managed profile when there is none [CHAR LIMIT=22] -->
- <string name="unlock_set_unlock_launch_picker_title_profile">Profile screen lock</string>
+ <string name="unlock_set_unlock_launch_picker_title_profile">Work profile lock</string>
<!-- Title for PreferenceScreen to change security method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
<string name="unlock_set_unlock_launch_picker_change_title">Change lock screen</string>
- <!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
+ <!-- Summary for PreferenceScreen to change security method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
<string name="unlock_set_unlock_launch_picker_change_summary">Change or disable pattern, PIN, or password security</string>
- <!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
+ <!-- Summary for PreferenceScreen to change security method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
<string name="unlock_set_unlock_launch_picker_enable_summary">Choose a method to lock the screen</string>
<!-- Title for preference that disables unlock security [CHAR LIMIT=22] -->
@@ -3087,15 +3087,15 @@
<!-- Message to be used to explain the user that he needs to enter his password to continue a
particular operation. [CHAR LIMIT=70]-->
<string name="lockpassword_confirm_your_password_generic">Enter your device password to continue.</string>
- <!-- Message to be used to explain the user that he needs to enter his profile pattern to continue a
+ <!-- Message to be used to explain the user that he needs to enter his work pattern to continue a
particular operation. [CHAR LIMIT=70]-->
- <string name="lockpassword_confirm_your_pattern_generic_profile">Use your profile pattern to continue.</string>
- <!-- Message to be used to explain the user that he needs to enter his profile PIN to continue a
+ <string name="lockpassword_confirm_your_pattern_generic_profile">Use your work pattern to continue.</string>
+ <!-- Message to be used to explain the user that he needs to enter his work PIN to continue a
particular operation. [CHAR LIMIT=70]-->
- <string name="lockpassword_confirm_your_pin_generic_profile">Enter your profile PIN to continue.</string>
- <!-- Message to be used to explain the user that he needs to enter his profile password to continue a
+ <string name="lockpassword_confirm_your_pin_generic_profile">Enter your work PIN to continue.</string>
+ <!-- Message to be used to explain the user that he needs to enter his work password to continue a
particular operation. [CHAR LIMIT=70]-->
- <string name="lockpassword_confirm_your_password_generic_profile">Enter your profile password to continue.</string>
+ <string name="lockpassword_confirm_your_password_generic_profile">Enter your work password to continue.</string>
<!-- Security & location settings screen, change security method screen instruction if user
enters incorrect PIN [CHAR LIMIT=30] -->
@@ -3165,21 +3165,21 @@
<!-- Profile Lock settings -->
<!-- Security & location settings screen, header for profile specific section -->
- <string name="lock_settings_profile_title">Work profile</string>
- <!-- Security & location settings screen, setting option name -->
- <string name="lock_settings_profile_label">Work profile security</string>
+ <string name="lock_settings_profile_title">Work profile security</string>
<!-- Security & location settings screen, title when changing or confirming the work profile lock -->
<string name="lock_settings_profile_screen_lock_title">Work profile screen lock</string>
<!-- Security & location settings screen, setting option name to unify work and personal locks -->
<string name="lock_settings_profile_unification_title">Use the same lock</string>
<!-- Security & location settings screen, setting option explanation to unify work and personal locks -->
- <string name="lock_settings_profile_unification_summary">Change device screen lock to match work profile?</string>
+ <string name="lock_settings_profile_unification_summary">Change device screen lock to match work profile</string>
<!-- Security & location settings screen, title of the dialog asking if the user wants to unify work and personal locks -->
- <string name="lock_settings_profile_unification_dialog_title">Use the same screen lock?</string>
+ <string name="lock_settings_profile_unification_dialog_title">Use the same lock?</string>
<!-- Security & location settings screen, explanation in the dialog asking if the user wants to unify work and personal locks -->
- <string name="lock_settings_profile_unification_dialog_body">You can use this lock for your device but it will include all screen lock related policies set by your IT admin on the work profile.\nDo you want to use the same screen lock for your device?</string>
+ <string name="lock_settings_profile_unification_dialog_body">You can use your work profile lock for your device screen lock as well. If you do, any work lock policies will also apply to your device screen lock.</string>
<!-- Security & location settings screen, explanation in the dialog asking if the user wants to create a new lock for personal and work as the current work lock is not enough for the device. -->
- <string name="lock_settings_profile_unification_dialog_uncompliant_body">Your work screen lock doesn\'t meet your organization\'s security requirements.\nYou can set a new screen lock for both your device and your work profile, but any work screen lock policies will apply to your device screen lock as well.</string>
+ <string name="lock_settings_profile_unification_dialog_uncompliant_body">Your work profile lock doesn\'t meet your organization\'s security requirements.\n\nYou can set a new screen lock for both your device and your work profile, but any work lock policies will apply to your device screen lock as well.</string>
+ <!-- Security & location settings screen, confirmation button of the dialog asking if the user wants to create a new lock for both personal and work profiles. -->
+ <string name="lock_settings_profile_unification_dialog_confirm">Change device lock</string>
<!-- Security & location settings screen, confirmation button of the dialog asking if the user wants to create a new lock for both personal and work profiles. -->
<string name="lock_settings_profile_unification_dialog_uncompliant_confirm">Change lock</string>
<!-- Security & location settings screen, summary of the item that changes your work profile lock when it is unified with the personal lock -->
@@ -5938,18 +5938,18 @@
<string name="lock_screen_notifications_interstitial_title">Notifications</string>
<!-- Configure Notifications: Value for lockscreen notifications: all information will be
- shown in profile notifications shown on a secure lock screen
+ shown in work notifications shown on a secure lock screen
[CHAR LIMIT=50] -->
- <string name="lock_screen_notifications_summary_show_profile">Show all profile notification content</string>
+ <string name="lock_screen_notifications_summary_show_profile">Show all work notification content</string>
<!-- Configure Notifications: Value for lockscreen notifications: sensitive information will be
- hidden or redacted from profile notifications shown on a secure lock screen
+ hidden or redacted from work notifications shown on a secure lock screen
[CHAR LIMIT=50] -->
- <string name="lock_screen_notifications_summary_hide_profile">Hide sensitive profile notification content</string>
+ <string name="lock_screen_notifications_summary_hide_profile">Hide sensitive work notification content</string>
- <!-- Configure Notifications: Value for lockscreen notifications: profile notifications will not appear on a secure lock screen
+ <!-- Configure Notifications: Value for lockscreen notifications: work notifications will not appear on a secure lock screen
[CHAR LIMIT=50] -->
- <string name="lock_screen_notifications_summary_disable_profile">Don\u2019t show profile notifications at all</string>
+ <string name="lock_screen_notifications_summary_disable_profile">Don\u2019t show work notifications at all</string>
<!-- Security > Choose PIN/PW/Pattern > Notification redaction interstitial: Message asking the user how they want their profile notifications to appear when the device is locked [CHAR LIMIT=NONE] -->
<string name="lock_screen_notifications_interstitial_message_profile">When your device is locked, how do you want profile notifications to show?</string>
@@ -7071,7 +7071,7 @@
<!-- Title for dialog displayed when user clicks on a setting locked by an admin [CHAR LIMIT=30] -->
<string name="disabled_by_policy_title">Action not allowed</string>
<!-- Shown when the user tries to change a settings locked by an admin [CHAR LIMIT=200] -->
- <string name="default_admin_support_msg">This action is disabled. Contact your organisation\'s administrator to learn more.</string>
+ <string name="default_admin_support_msg">This action is disabled. Contact your organization\'s administrator to learn more.</string>
<!-- Shown in dialog to allow user to see more information about the device admin [CHAR LIMIT=30] -->
<string name="admin_support_more_info">More details</string>
<!-- Shown in admin details page to warn user about policies the admin can set in a work profile. [CHAR LIMIT=NONE] -->
diff --git a/res/values/themes.xml b/res/values/themes.xml
index ffc421d..7a02ea9 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -286,6 +286,7 @@
</style>
<style name="Theme.ConfirmDeviceCredentialsWork" parent="Theme.ConfirmDeviceCredentialsDark">
<item name="@*android:regularColor">@*android:color/white</item>
+ <item name="android:colorAccent">@*android:color/white</item>
</style>
<style name="Theme.FingerprintEnroll" parent="@*android:style/Theme.Material.Settings.NoActionBar">
@@ -295,6 +296,7 @@
<item name="android:textAppearanceListItemSmall">@android:style/TextAppearance.Material.Body1</item>
<item name="android:windowAnimationStyle">@style/Animation.SuwWindowAnimation</item>
+ <item name="suwDividerCondition">both</item>
<item name="suwListItemIconColor">?android:attr/colorAccent</item>
<item name="suwMarginSides">@dimen/suw_layout_margin_sides</item>
</style>
diff --git a/res/xml/accessibility_settings_for_setup_wizard.xml b/res/xml/accessibility_settings_for_setup_wizard.xml
index 0ed914a..5d83590 100644
--- a/res/xml/accessibility_settings_for_setup_wizard.xml
+++ b/res/xml/accessibility_settings_for_setup_wizard.xml
@@ -18,7 +18,7 @@
android:title="@string/vision_settings_title"
android:persistent="true" >
- <Preference
+ <com.android.settings.accessibility.DividerAllowedBelowPreference
android:key="vision_settings_summary"
android:title="@string/vision_settings_description"
android:layout="@layout/preference_multiline_title"
diff --git a/res/xml/profile_challenge_settings.xml b/res/xml/profile_challenge_settings.xml
index cd61119..e3ad0c3 100644
--- a/res/xml/profile_challenge_settings.xml
+++ b/res/xml/profile_challenge_settings.xml
@@ -15,6 +15,6 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/lock_settings_profile_label">
+ android:title="@string/lock_settings_profile_title">
</PreferenceScreen>
diff --git a/src/com/android/settings/ConfirmDeviceCredentialBaseFragment.java b/src/com/android/settings/ConfirmDeviceCredentialBaseFragment.java
index b9836d1..42279fd 100644
--- a/src/com/android/settings/ConfirmDeviceCredentialBaseFragment.java
+++ b/src/com/android/settings/ConfirmDeviceCredentialBaseFragment.java
@@ -137,17 +137,12 @@
if (intent != null) {
CharSequence titleText = intent.getCharSequenceExtra(
ConfirmDeviceCredentialBaseFragment.TITLE_TEXT);
- if (titleText == null && supplementalText == null) {
+ if (titleText == null || supplementalText == null) {
return;
}
- StringBuilder builder = new StringBuilder();
- if (titleText != null) {
- builder.append(titleText).append(",");
- }
- if (supplementalText != null) {
- builder.append(supplementalText);
- }
- getActivity().setTitle(Utils.createAccessibleSequence(titleText, builder.toString()));
+ String accessibilityTitle =
+ new StringBuilder(titleText).append(",").append(supplementalText).toString();
+ getActivity().setTitle(Utils.createAccessibleSequence(titleText, accessibilityTitle));
}
}
diff --git a/src/com/android/settings/accessibility/DividerAllowedBelowPreference.java b/src/com/android/settings/accessibility/DividerAllowedBelowPreference.java
new file mode 100644
index 0000000..80baaf3
--- /dev/null
+++ b/src/com/android/settings/accessibility/DividerAllowedBelowPreference.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2016 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.accessibility;
+
+import android.content.Context;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.util.AttributeSet;
+
+/*
+ * Preference that always has a divider below. Used for SUW Accessibility Settings Summary text.
+ */
+public class DividerAllowedBelowPreference extends Preference {
+ public DividerAllowedBelowPreference(Context context) {
+ super(context);
+ }
+
+ public DividerAllowedBelowPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public DividerAllowedBelowPreference(Context context, AttributeSet attrs, int defStyleAttrs) {
+ super(context, attrs, defStyleAttrs);
+ }
+
+ @Override
+ public void onBindViewHolder(PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+ holder.setDividerAllowedBelow(true);
+ }
+}
+