Apply top intro preference for face settings page

Do a few things in this cl
- Use correct way to work with controller.
- Refactor xml file.
- Separate content of footer to two parts.
  - First paragraph should become top intro.
  - Rest should keep in footer.

Test: Build apk and see the screen
Bug: 173087905
Change-Id: Icb16dedf6b36542b833527471579aaadb5407d87
Screenshot: https://screenshot.googleplex.com/92Jx6zKyTZU8LJa.png
This commit is contained in:
Tsung-Mao Fang
2020-11-16 18:34:21 +08:00
parent 564eaec283
commit ae7f264fa2
4 changed files with 22 additions and 21 deletions

View File

@@ -312,7 +312,6 @@ public class FaceSettings extends DashboardFragment {
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;

View File

@@ -26,7 +26,6 @@ import com.android.settings.core.BasePreferenceController;
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 @@ public class FaceSettingsFooterPreferenceController extends BasePreferenceContro
mProvider = FeatureFactory.getFactory(context).getFaceFeatureProvider();
}
public FaceSettingsFooterPreferenceController(Context context) {
this(context, FooterPreference.KEY_FOOTER);
}
@Override
public int getAvailabilityStatus() {
return AVAILABLE;
return AVAILABLE_UNSEARCHABLE;
}
@Override