Merge "Import translations. DO NOT MERGE ANYWHERE"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2861482..984b36e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -844,9 +844,11 @@
<!-- Button text in face settings which lets the user enroll their face [CHAR LIMIT=40] -->
<string name="security_settings_face_settings_enroll">Set up face unlock</string>
<!-- Text shown in face settings explaining what your face can be used for. [CHAR LIMIT=NONE] -->
- <string name="security_settings_face_settings_footer">Use face unlock to unlock your device, sign in to apps, and confirm payments.\n\nKeep in mind:\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
+ <string name="security_settings_face_settings_top_intro">Use face unlock to unlock your device, sign in to apps, and confirm payments.</string>
+ <!-- Text shown in face settings explaining what your face can be used for. [CHAR LIMIT=NONE] -->
+ <string name="security_settings_face_settings_footer">Keep in mind:\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
<!-- Text shown in face settings explaining what your face can be used for. Used when attention checking is not supported. [CHAR LIMIT=NONE] -->
- <string name="security_settings_face_settings_footer_attention_not_supported">Use face unlock to unlock your device, sign in to apps, and confirm payments.\n\nKeep in mind:\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face, even if your eyes are closed.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
+ <string name="security_settings_face_settings_footer_attention_not_supported">Keep in mind:\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face, even if your eyes are closed.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
<!-- Dialog title shown when the user removes an enrollment [CHAR LIMIT=35] -->
<string name="security_settings_face_settings_remove_dialog_title">Delete face data?</string>
<!-- Dialog contents shown when the user removes an enrollment [CHAR LIMIT=NONE] -->
diff --git a/res/xml/dark_mode_settings.xml b/res/xml/dark_mode_settings.xml
index 0ebc044..e076b89 100644
--- a/res/xml/dark_mode_settings.xml
+++ b/res/xml/dark_mode_settings.xml
@@ -27,6 +27,11 @@
settings:allowDividerBelow="true"
settings:controller="com.android.settings.display.TwilightLocationPreferenceController"/>
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="dark_ui_top_intro"
+ android:title="@string/dark_ui_text"
+ settings:searchable="false"/>
+
<DropDownPreference
android:key="dark_ui_auto_mode"
android:title="@string/dark_ui_auto_mode_title"
@@ -55,11 +60,4 @@
settings:allowDividerBelow="true"
settings:controller="com.android.settings.display.darkmode.DarkModeActivationPreferenceController"/>
- <com.android.settingslib.widget.FooterPreference
- android:key="dark_ui_footer"
- android:title="@string/dark_ui_text"
- android:selectable="false"
- settings:searchable="false"
- settings:allowDividerAbove="true"/>
-
</PreferenceScreen>
diff --git a/res/xml/graphics_driver_settings.xml b/res/xml/graphics_driver_settings.xml
index a1fa78c..26c3193 100644
--- a/res/xml/graphics_driver_settings.xml
+++ b/res/xml/graphics_driver_settings.xml
@@ -20,12 +20,17 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/graphics_driver_dashboard_title">
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="top_info_graphics_driver"
+ android:title="@string/graphics_driver_footer_text"
+ settings:controller="com.android.settings.development.graphicsdriver.GraphicsDriverTopIntroPreferenceController"/>
+
<ListPreference
android:key="graphics_driver_all_apps_preference"
android:title="@string/graphics_driver_all_apps_preference_title"
android:dialogTitle="@string/graphics_driver_all_apps_preference_title"
- settings:controller="com.android.settings.development.graphicsdriver.GraphicsDriverEnableForAllAppsPreferenceController">
- </ListPreference>
+ settings:controller="com.android.settings.development.graphicsdriver.GraphicsDriverEnableForAllAppsPreferenceController"
+ settings:allowDividerAbove="true"/>
<PreferenceCategory
android:key="graphics_driver_category"
@@ -33,11 +38,4 @@
settings:controller="com.android.settings.development.graphicsdriver.GraphicsDriverAppPreferenceController">
</PreferenceCategory>
- <com.android.settingslib.widget.FooterPreference
- android:key="graphics_driver_footer"
- android:title="@string/graphics_driver_footer_text"
- android:selectable="false"
- settings:controller="com.android.settings.development.graphicsdriver.GraphicsDriverFooterPreferenceController">
- </com.android.settingslib.widget.FooterPreference>
-
</PreferenceScreen>
diff --git a/res/xml/night_display_settings.xml b/res/xml/night_display_settings.xml
index 8b7e41a..9acccf6 100644
--- a/res/xml/night_display_settings.xml
+++ b/res/xml/night_display_settings.xml
@@ -27,10 +27,16 @@
settings:controller="com.android.settings.display.TwilightLocationPreferenceController"
settings:allowDividerBelow="true"/>
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="night_display_top_intro"
+ android:title="@string/night_display_text"
+ settings:controller="com.android.settings.display.NightDisplayTopIntroPreferenceController"/>
+
<DropDownPreference
android:key="night_display_auto_mode"
android:title="@string/night_display_auto_mode_title"
android:summary="%s"
+ settings:allowDividerAbove="true"
settings:controller="com.android.settings.display.NightDisplayAutoModePreferenceController"/>
<Preference
@@ -59,11 +65,4 @@
settings:keywords="@string/keywords_display_night_display"
settings:controller="com.android.settings.display.NightDisplayActivationPreferenceController"/>
- <com.android.settingslib.widget.FooterPreference
- android:key="night_display_footer"
- android:title="@string/night_display_text"
- android:selectable="false"
- settings:allowDividerAbove="true"
- settings:controller="com.android.settings.display.NightDisplayFooterPreferenceController"/>
-
</PreferenceScreen>
diff --git a/res/xml/security_settings_face.xml b/res/xml/security_settings_face.xml
index d450fef..1fc1ca8 100644
--- a/res/xml/security_settings_face.xml
+++ b/res/xml/security_settings_face.xml
@@ -16,15 +16,18 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/security_settings_face_preference_title">
<com.android.settings.widget.VideoPreference
android:key="security_settings_face_video"
android:title="@string/summary_placeholder"
- app:animation="@raw/face_settings"
- app:controller="com.android.settings.widget.VideoPreferenceController"/>
+ settings:animation="@raw/face_settings"
+ settings:controller="com.android.settings.widget.VideoPreferenceController"/>
+
+ <com.android.settingslib.widget.TopIntroPreference
+ android:title="@string/security_settings_face_settings_top_intro"
+ settings:searchable="false"/>
<PreferenceCategory
android:key="security_settings_face_unlock_category"
@@ -32,13 +35,13 @@
<com.android.settingslib.RestrictedSwitchPreference
android:key="security_settings_face_keyguard"
android:title="@string/security_settings_face_settings_use_face_unlock_phone"
- app:keywords="@string/keywords_face_unlock"
- app:controller="com.android.settings.biometrics.face.FaceSettingsKeyguardPreferenceController"/>
+ settings:keywords="@string/keywords_face_unlock"
+ settings:controller="com.android.settings.biometrics.face.FaceSettingsKeyguardPreferenceController"/>
<SwitchPreference
android:key="security_settings_face_app"
android:title="@string/security_settings_face_settings_use_face_for_apps"
- app:keywords="@string/keywords_face_unlock"
- app:controller="com.android.settings.biometrics.face.FaceSettingsAppPreferenceController"/>
+ settings:keywords="@string/keywords_face_unlock"
+ settings:controller="com.android.settings.biometrics.face.FaceSettingsAppPreferenceController"/>
<com.android.settingslib.RestrictedSwitchPreference
android:key="security_lockscreen_bypass"
android:title="@string/lockscreen_bypass_title"
@@ -54,15 +57,15 @@
android:key="security_settings_face_require_attention"
android:title="@string/security_settings_face_settings_require_attention"
android:summary="@string/security_settings_face_settings_require_attention_details"
- app:keywords="@string/keywords_face_unlock"
- app:controller="com.android.settings.biometrics.face.FaceSettingsAttentionPreferenceController"/>
+ settings:keywords="@string/keywords_face_unlock"
+ settings:controller="com.android.settings.biometrics.face.FaceSettingsAttentionPreferenceController"/>
<SwitchPreference
android:key="security_settings_face_require_confirmation"
android:title="@string/security_settings_face_settings_require_confirmation"
android:summary="@string/security_settings_face_settings_require_confirmation_details"
- app:keywords="@string/keywords_face_unlock"
- app:controller="com.android.settings.biometrics.face.FaceSettingsConfirmPreferenceController"/>
+ settings:keywords="@string/keywords_face_unlock"
+ settings:controller="com.android.settings.biometrics.face.FaceSettingsConfirmPreferenceController"/>
</PreferenceCategory>
<PreferenceCategory
@@ -84,5 +87,7 @@
</PreferenceCategory>
<com.android.settingslib.widget.FooterPreference
- settings:allowDividerAbove="true"/>
+ android:key="security_face_footer"
+ settings:allowDividerAbove="true"
+ settings:controller="com.android.settings.biometrics.face.FaceSettingsFooterPreferenceController" />
</PreferenceScreen>
diff --git a/res/xml/tether_prefs.xml b/res/xml/tether_prefs.xml
index 9367a9b..cca4e5f 100644
--- a/res/xml/tether_prefs.xml
+++ b/res/xml/tether_prefs.xml
@@ -19,12 +19,17 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/tether_settings_title_all">
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="tether_prefs_top_intro"
+ settings:searchable="false"/>
+
<com.android.settings.widget.FixedLineSummaryPreference
android:key="wifi_tether"
android:title="@string/wifi_hotspot_checkbox_text"
android:summary="@string/summary_placeholder"
android:fragment="com.android.settings.wifi.tether.WifiTetherSettings"
- settings:summaryLineCount="2" />
+ settings:allowDividerAbove="true"
+ settings:summaryLineCount="2"/>
<SwitchPreference
android:key="usb_tether_settings"
@@ -49,9 +54,4 @@
android:summary="@string/tether_settings_disabled_on_data_saver"
android:selectable="false"
settings:allowDividerAbove="true" />
-
- <com.android.settingslib.widget.FooterPreference
- android:key="tether_prefs_footer"
- android:selectable="false"
- settings:searchable="false"/>
</PreferenceScreen>
diff --git a/res/xml/user_settings.xml b/res/xml/user_settings.xml
index 7726a18..5cafa1a 100644
--- a/res/xml/user_settings.xml
+++ b/res/xml/user_settings.xml
@@ -20,6 +20,11 @@
android:key="user_settings_screen"
android:title="@string/user_settings_title">
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="multiuser_top_intro"
+ android:title="@string/user_settings_footer_text"
+ settings:controller="com.android.settings.users.MultiUserTopIntroPreferenceController"/>
+
<PreferenceCategory
android:key="user_list"
android:title="@string/user_list_title"
@@ -45,11 +50,4 @@
android:order="105"
settings:allowDividerAbove="true"/>
- <com.android.settingslib.widget.FooterPreference
- android:key="multiuser_footer"
- android:title="@string/user_settings_footer_text"
- android:selectable="false"
- settings:searchable="false"
- settings:controller="com.android.settings.users.MultiUserFooterPreferenceController"/>
-
</PreferenceScreen>
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java
index 74a0897..c33f7db 100644
--- a/src/com/android/settings/TetherSettings.java
+++ b/src/com/android/settings/TetherSettings.java
@@ -78,7 +78,7 @@
private static final String KEY_ENABLE_ETHERNET_TETHERING = "enable_ethernet_tethering";
private static final String KEY_DATA_SAVER_FOOTER = "disabled_on_data_saver";
@VisibleForTesting
- static final String KEY_TETHER_PREFS_FOOTER = "tether_prefs_footer";
+ static final String KEY_TETHER_PREFS_TOP_INTRO = "tether_prefs_top_intro";
private static final String TAG = "TetheringSettings";
@@ -155,7 +155,7 @@
}
setupTetherPreference();
- setFooterPreferenceTitle();
+ setTopIntroPreferenceTitle();
mDataSaverBackend.addListener(this);
@@ -231,14 +231,14 @@
}
@VisibleForTesting
- void setFooterPreferenceTitle() {
- final Preference footerPreference = findPreference(KEY_TETHER_PREFS_FOOTER);
+ void setTopIntroPreferenceTitle() {
+ final Preference topIntroPreference = findPreference(KEY_TETHER_PREFS_TOP_INTRO);
final WifiManager wifiManager =
(WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager.isStaApConcurrencySupported()) {
- footerPreference.setTitle(R.string.tethering_footer_info_sta_ap_concurrency);
+ topIntroPreference.setTitle(R.string.tethering_footer_info_sta_ap_concurrency);
} else {
- footerPreference.setTitle(R.string.tethering_footer_info);
+ topIntroPreference.setTitle(R.string.tethering_footer_info);
}
}
diff --git a/src/com/android/settings/biometrics/face/FaceSettings.java b/src/com/android/settings/biometrics/face/FaceSettings.java
index 5c8447f..7751485 100644
--- a/src/com/android/settings/biometrics/face/FaceSettings.java
+++ b/src/com/android/settings/biometrics/face/FaceSettings.java
@@ -312,7 +312,6 @@
controllers.add(new FaceSettingsAppPreferenceController(context));
controllers.add(new FaceSettingsAttentionPreferenceController(context));
controllers.add(new FaceSettingsRemoveButtonPreferenceController(context));
- controllers.add(new FaceSettingsFooterPreferenceController(context));
controllers.add(new FaceSettingsConfirmPreferenceController(context));
controllers.add(new FaceSettingsEnrollButtonPreferenceController(context));
return controllers;
diff --git a/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java b/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
index c665467..ba1047b 100644
--- a/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
+++ b/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
@@ -26,7 +26,6 @@
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.utils.AnnotationSpan;
import com.android.settingslib.HelpUtils;
-import com.android.settingslib.widget.FooterPreference;
/**
* Footer for face settings showing the help text and help link.
@@ -42,13 +41,9 @@
mProvider = FeatureFactory.getFactory(context).getFaceFeatureProvider();
}
- public FaceSettingsFooterPreferenceController(Context context) {
- this(context, FooterPreference.KEY_FOOTER);
- }
-
@Override
public int getAvailabilityStatus() {
- return AVAILABLE;
+ return AVAILABLE_UNSEARCHABLE;
}
@Override
diff --git a/src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceController.java b/src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceController.java
similarity index 85%
rename from src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceController.java
rename to src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceController.java
index 5595f39..3d449d9 100644
--- a/src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceController.java
+++ b/src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceController.java
@@ -33,12 +33,12 @@
import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnStart;
import com.android.settingslib.core.lifecycle.events.OnStop;
-import com.android.settingslib.widget.FooterPreference;
+import com.android.settingslib.widget.TopIntroPreference;
/**
- * Controller of footer preference for Graphics Driver Preferences dashboard.
+ * Controller of top info preference for Graphics Driver Preferences dashboard.
*/
-public class GraphicsDriverFooterPreferenceController extends BasePreferenceController
+public class GraphicsDriverTopIntroPreferenceController extends BasePreferenceController
implements GraphicsDriverContentObserver.OnGraphicsDriverContentChangedListener,
LifecycleObserver, OnStart, OnStop {
@@ -46,9 +46,9 @@
@VisibleForTesting
GraphicsDriverContentObserver mGraphicsDriverContentObserver;
- private FooterPreference mPreference;
+ private TopIntroPreference mPreference;
- public GraphicsDriverFooterPreferenceController(Context context, String key) {
+ public GraphicsDriverTopIntroPreferenceController(Context context, String key) {
super(context, key);
mContentResolver = context.getContentResolver();
mGraphicsDriverContentObserver =
@@ -83,8 +83,8 @@
@Override
public void updateState(Preference preference) {
- final FooterPreference footerPref = (FooterPreference) preference;
- footerPref.setVisible(isAvailable());
+ final TopIntroPreference topIntroPref = (TopIntroPreference) preference;
+ topIntroPref.setVisible(isAvailable());
}
@Override
diff --git a/src/com/android/settings/display/NightDisplayFooterPreferenceController.java b/src/com/android/settings/display/NightDisplayTopIntroPreferenceController.java
similarity index 78%
rename from src/com/android/settings/display/NightDisplayFooterPreferenceController.java
rename to src/com/android/settings/display/NightDisplayTopIntroPreferenceController.java
index 14fe25e..a40044b 100644
--- a/src/com/android/settings/display/NightDisplayFooterPreferenceController.java
+++ b/src/com/android/settings/display/NightDisplayTopIntroPreferenceController.java
@@ -21,9 +21,13 @@
import com.android.settings.core.BasePreferenceController;
-public class NightDisplayFooterPreferenceController extends BasePreferenceController {
+/**
+ * NightDisplayTopIntroPreferenceController can control the visibility of night display top info
+ * preference.
+ */
+public class NightDisplayTopIntroPreferenceController extends BasePreferenceController {
- public NightDisplayFooterPreferenceController(Context context, String key) {
+ public NightDisplayTopIntroPreferenceController(Context context, String key) {
super(context, key);
}
diff --git a/src/com/android/settings/users/MultiUserFooterPreferenceController.java b/src/com/android/settings/users/MultiUserTopIntroPreferenceController.java
similarity index 83%
rename from src/com/android/settings/users/MultiUserFooterPreferenceController.java
rename to src/com/android/settings/users/MultiUserTopIntroPreferenceController.java
index 03ed6ce..a8076c2 100644
--- a/src/com/android/settings/users/MultiUserFooterPreferenceController.java
+++ b/src/com/android/settings/users/MultiUserTopIntroPreferenceController.java
@@ -23,12 +23,16 @@
import com.android.settings.core.BasePreferenceController;
-public class MultiUserFooterPreferenceController extends BasePreferenceController {
+/**
+ * MultiUserTopIntroPreferenceController can control the visibility of multi user top info
+ * preference.
+ */
+public class MultiUserTopIntroPreferenceController extends BasePreferenceController {
@VisibleForTesting
final UserCapabilities mUserCaps;
- public MultiUserFooterPreferenceController(Context context, String key) {
+ public MultiUserTopIntroPreferenceController(Context context, String key) {
super(context, key);
mUserCaps = UserCapabilities.create(context);
}
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index d92418d..63ccb6b 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -110,7 +110,7 @@
private static final String KEY_ADD_GUEST = "guest_add";
private static final String KEY_ADD_USER = "user_add";
private static final String KEY_ADD_USER_WHEN_LOCKED = "user_settings_add_users_when_locked";
- private static final String KEY_MULTIUSER_FOOTER = "multiuser_footer";
+ private static final String KEY_MULTIUSER_TOP_INTRO = "multiuser_top_intro";
private static final int MENU_REMOVE_USER = Menu.FIRST;
@@ -169,7 +169,7 @@
private EditUserInfoController mEditUserInfoController =
new EditUserInfoController(Utils.FILE_PROVIDER_AUTHORITY);
private AddUserWhenLockedPreferenceController mAddUserWhenLockedPreferenceController;
- private MultiUserFooterPreferenceController mMultiUserFooterPreferenceController;
+ private MultiUserTopIntroPreferenceController mMultiUserTopIntroPreferenceController;
private UserCreatingDialog mUserCreatingDialog;
private CharSequence mPendingUserName;
@@ -240,12 +240,12 @@
mAddUserWhenLockedPreferenceController = new AddUserWhenLockedPreferenceController(
activity, KEY_ADD_USER_WHEN_LOCKED);
- mMultiUserFooterPreferenceController = new MultiUserFooterPreferenceController(activity,
- KEY_MULTIUSER_FOOTER);
+ mMultiUserTopIntroPreferenceController = new MultiUserTopIntroPreferenceController(activity,
+ KEY_MULTIUSER_TOP_INTRO);
final PreferenceScreen screen = getPreferenceScreen();
mAddUserWhenLockedPreferenceController.displayPreference(screen);
- mMultiUserFooterPreferenceController.displayPreference(screen);
+ mMultiUserTopIntroPreferenceController.displayPreference(screen);
screen.findPreference(mAddUserWhenLockedPreferenceController.getPreferenceKey())
.setOnPreferenceChangeListener(mAddUserWhenLockedPreferenceController);
@@ -936,14 +936,14 @@
// Remove everything from mUserListCategory and add new users.
mUserListCategory.removeAll();
- // If multi-user is disabled, just show footer and return.
+ // If multi-user is disabled, just show top info and return.
final Preference addUserOnLockScreen = getPreferenceScreen().findPreference(
mAddUserWhenLockedPreferenceController.getPreferenceKey());
mAddUserWhenLockedPreferenceController.updateState(addUserOnLockScreen);
- final Preference multiUserFooterPrefence = getPreferenceScreen().findPreference(
- mMultiUserFooterPreferenceController.getPreferenceKey());
- mMultiUserFooterPreferenceController.updateState(multiUserFooterPrefence);
+ final Preference multiUserTopIntroPrefence = getPreferenceScreen().findPreference(
+ mMultiUserTopIntroPreferenceController.getPreferenceKey());
+ mMultiUserTopIntroPreferenceController.updateState(multiUserTopIntroPrefence);
mUserListCategory.setVisible(mUserCaps.mUserSwitcherEnabled);
updateAddGuest(context, users.stream().anyMatch(UserInfo::isGuest));
diff --git a/tests/robotests/src/com/android/settings/TetherSettingsTest.java b/tests/robotests/src/com/android/settings/TetherSettingsTest.java
index be14eda..f217e21 100644
--- a/tests/robotests/src/com/android/settings/TetherSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/TetherSettingsTest.java
@@ -158,13 +158,13 @@
final TetherSettings spyTetherSettings = spy(new TetherSettings());
when(spyTetherSettings.getContext()).thenReturn(mContext);
final Preference mockPreference = mock(Preference.class);
- when(spyTetherSettings.findPreference(TetherSettings.KEY_TETHER_PREFS_FOOTER))
+ when(spyTetherSettings.findPreference(TetherSettings.KEY_TETHER_PREFS_TOP_INTRO))
.thenReturn(mockPreference);
final WifiManager mockWifiManager = mock(WifiManager.class);
when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mockWifiManager);
when(mockWifiManager.isStaApConcurrencySupported()).thenReturn(true);
- spyTetherSettings.setFooterPreferenceTitle();
+ spyTetherSettings.setTopIntroPreferenceTitle();
verify(mockPreference, never()).setTitle(R.string.tethering_footer_info);
verify(mockPreference).setTitle(R.string.tethering_footer_info_sta_ap_concurrency);
diff --git a/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceControllerTest.java
similarity index 92%
rename from tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceControllerTest.java
rename to tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceControllerTest.java
index 1e4c496..28e5c5a 100644
--- a/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverTopIntroPreferenceControllerTest.java
@@ -34,7 +34,7 @@
import androidx.preference.PreferenceScreen;
-import com.android.settingslib.widget.FooterPreference;
+import com.android.settingslib.widget.TopIntroPreference;
import org.junit.Before;
import org.junit.Test;
@@ -45,25 +45,25 @@
import org.robolectric.RuntimeEnvironment;
@RunWith(RobolectricTestRunner.class)
-public class GraphicsDriverFooterPreferenceControllerTest {
+public class GraphicsDriverTopIntroPreferenceControllerTest {
@Mock
private PreferenceScreen mScreen;
@Mock
- private FooterPreference mPreference;
+ private TopIntroPreference mPreference;
@Mock
private GraphicsDriverContentObserver mGraphicsDriverContentObserver;
private Context mContext;
private ContentResolver mResolver;
- private GraphicsDriverFooterPreferenceController mController;
+ private GraphicsDriverTopIntroPreferenceController mController;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mResolver = mContext.getContentResolver();
- mController = spy(new GraphicsDriverFooterPreferenceController(mContext, "key"));
+ mController = spy(new GraphicsDriverTopIntroPreferenceController(mContext, "key"));
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
}
diff --git a/tests/robotests/src/com/android/settings/display/NightDisplayFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/NightDisplayTopIntroPreferenceControllerTest.java
similarity index 74%
rename from tests/robotests/src/com/android/settings/display/NightDisplayFooterPreferenceControllerTest.java
rename to tests/robotests/src/com/android/settings/display/NightDisplayTopIntroPreferenceControllerTest.java
index efb26fa..10f7f0b 100644
--- a/tests/robotests/src/com/android/settings/display/NightDisplayFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/NightDisplayTopIntroPreferenceControllerTest.java
@@ -1,15 +1,17 @@
/*
* Copyright (C) 2018 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
+ * 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.
+ * 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.display;
@@ -31,14 +33,14 @@
@RunWith(RobolectricTestRunner.class)
@Config(shadows = SettingsShadowResources.class)
-public class NightDisplayFooterPreferenceControllerTest {
+public class NightDisplayTopIntroPreferenceControllerTest {
- private NightDisplayFooterPreferenceController mController;
+ private NightDisplayTopIntroPreferenceController mController;
@Before
public void setUp() {
mController =
- new NightDisplayFooterPreferenceController(RuntimeEnvironment.application, "key");
+ new NightDisplayTopIntroPreferenceController(RuntimeEnvironment.application, "key");
}
@After
diff --git a/tests/robotests/src/com/android/settings/users/MultiUserFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/users/MultiUserTopIntroPreferenceControllerTest.java
similarity index 89%
rename from tests/robotests/src/com/android/settings/users/MultiUserFooterPreferenceControllerTest.java
rename to tests/robotests/src/com/android/settings/users/MultiUserTopIntroPreferenceControllerTest.java
index 69825b4..bc0b060 100644
--- a/tests/robotests/src/com/android/settings/users/MultiUserFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/users/MultiUserTopIntroPreferenceControllerTest.java
@@ -32,15 +32,15 @@
@RunWith(RobolectricTestRunner.class)
@Ignore
-public class MultiUserFooterPreferenceControllerTest {
+public class MultiUserTopIntroPreferenceControllerTest {
private Context mContext;
- private MultiUserFooterPreferenceController mController;
+ private MultiUserTopIntroPreferenceController mController;
@Before
public void setUp() {
mContext = RuntimeEnvironment.application;
- mController = new MultiUserFooterPreferenceController(mContext, "footer");
+ mController = new MultiUserTopIntroPreferenceController(mContext, "top_info");
}
@Test
diff --git a/tests/robotests/src/com/android/settings/users/UserSettingsTest.java b/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
index ec2fdc6..3494c63 100644
--- a/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
@@ -128,8 +128,8 @@
mFragment = spy(new UserSettings());
ReflectionHelpers.setField(mFragment, "mAddUserWhenLockedPreferenceController",
mock(AddUserWhenLockedPreferenceController.class));
- ReflectionHelpers.setField(mFragment, "mMultiUserFooterPreferenceController",
- mock(MultiUserFooterPreferenceController.class));
+ ReflectionHelpers.setField(mFragment, "mMultiUserTopIntroPreferenceController",
+ mock(MultiUserTopIntroPreferenceController.class));
ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
ReflectionHelpers.setField(mFragment, "mUserCaps", mUserCapabilities);
ReflectionHelpers.setField(mFragment, "mDefaultIconDrawable", mDefaultIconDrawable);