Merge auto-rotate comment/style fixes from tm-dev that couldn't be cherry picked into master

Test: none

Bug: 230378938
Change-Id: Ia0e9e5bf25d005aa6b8ccaa07a1901779b88588c
This commit is contained in:
Abel Tesfaye
2022-04-25 23:13:20 +00:00
parent 79463db83b
commit 939e0e0d9d
2 changed files with 3 additions and 13 deletions

View File

@@ -17,13 +17,11 @@
<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/accelerometer_title" >
<com.android.settingslib.widget.TopIntroPreference
android:title="@string/auto_rotate_screen_summary"
app:allowDividerAbove="false"/>
android:title="@string/auto_rotate_screen_summary"/>
<com.android.settingslib.widget.MainSwitchPreference
android:key="auto_rotate_main_switch"
@@ -58,10 +56,9 @@
settings:controller="com.android.settings.display.SmartAutoRotateController" />
<com.android.settingslib.widget.FooterPreference
android:order="100"
android:key="auto_rotate_footer_preference"
android:title="@string/smart_rotate_text_headline"
android:selectable="true"
android:selectable="false"
settings:searchable="false"/>
</PreferenceScreen>

View File

@@ -70,13 +70,6 @@ public class SmartAutoRotatePreferenceFragment extends DashboardFragment {
);
}
@Override
public void onStart() {
super.onStart();
setupFooter();
}
@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
return DeviceStateAutoRotationHelper.createPreferenceControllers(context);
@@ -91,6 +84,7 @@ public class SmartAutoRotatePreferenceFragment extends DashboardFragment {
final Preference footerPreference = findPreference(KEY_FOOTER_PREFERENCE);
if (footerPreference != null) {
footerPreference.setVisible(isRotationResolverServiceAvailable(activity));
setupFooter();
}
return view;
}
@@ -135,7 +129,6 @@ public class SmartAutoRotatePreferenceFragment extends DashboardFragment {
void addHelpLink() {
final FooterPreference pref = findPreference(KEY_FOOTER_PREFERENCE);
if (pref != null) {
pref.setSelectable(false);
pref.setLearnMoreAction(v -> {
startActivityForResult(HelpUtils.getHelpIntent(getContext(),
getString(getHelpResource()),