[Settings] Update PIP with new Settings integration

Updates PIP settings to be compatible with new Settings guidelines.

For context we have 2 settings pages PictureInPictureSettings.java
and PictureInPictureDetails.java, both of which inherit from standard
androidx components, so there should not be any other required
changes.

Bug: b/349659719
Flag: EXEMPT refactor
Test: manually enable update and check settings pages
Change-Id: Iafc3cda8cdb2fcdba466755bf537188ee2005dc2
This commit is contained in:
Perry Wu
2024-10-10 18:23:31 +00:00
parent 3c0dde887d
commit 046ad86d79

View File

@@ -43,7 +43,6 @@ import com.android.settings.applications.AppInfoBase;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.widget.EmptyTextSettings;
import com.android.settingslib.search.SearchIndexable;
import com.android.settingslib.widget.AppPreference;
import java.text.Collator;
import java.util.ArrayList;
@@ -160,7 +159,7 @@ public class PictureInPictureSettings extends EmptyTextSettings {
final String packageName = appInfo.packageName;
final CharSequence label = appInfo.loadLabel(mPackageManager);
final Preference pref = new AppPreference(prefContext);
final Preference pref = new Preference(prefContext);
pref.setIcon(mIconDrawableFactory.getBadgedIcon(appInfo, userId));
pref.setTitle(mPackageManager.getUserBadgedLabel(label, user));
pref.setSummary(PictureInPictureDetails.getPreferenceSummary(prefContext,