Add default app prefs to app info
This makes them easier to discover and to know the state of them. Bug: 27276982 Change-Id: I24a9d34d7e189b19df39cc0b9028b6412f76aa05
This commit is contained in:
@@ -158,13 +158,17 @@ public class WriteSettingsDetails extends AppInfoWithHeader implements OnPrefere
|
||||
}
|
||||
|
||||
public static CharSequence getSummary(Context context, AppEntry entry) {
|
||||
if (entry.extraInfo != null) {
|
||||
return getSummary(context, new WriteSettingsState((PermissionState)entry
|
||||
.extraInfo));
|
||||
WriteSettingsState state;
|
||||
if (entry.extraInfo instanceof WriteSettingsState) {
|
||||
state = (WriteSettingsState) entry.extraInfo;
|
||||
} else if (entry.extraInfo instanceof PermissionState) {
|
||||
state = new WriteSettingsState((PermissionState) entry.extraInfo);
|
||||
} else {
|
||||
state = new AppStateWriteSettingsBridge(context, null, null).getWriteSettingsInfo(
|
||||
entry.info.packageName, entry.info.uid);
|
||||
}
|
||||
|
||||
// fallback if entry.extrainfo is null - although this should not happen
|
||||
return getSummary(context, entry.info.packageName);
|
||||
return getSummary(context, state);
|
||||
}
|
||||
|
||||
public static CharSequence getSummary(Context context, WriteSettingsState writeSettingsState) {
|
||||
|
Reference in New Issue
Block a user