use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AppStatePowerBridge method loadAllExtraInfo.
@Override
protected void loadAllExtraInfo() {
ArrayList<AppEntry> apps = mAppSession.getAllApps();
final int N = apps.size();
for (int i = 0; i < N; i++) {
AppEntry app = apps.get(i);
app.extraInfo = mBackend.isWhitelisted(app.info.packageName) ? Boolean.TRUE : Boolean.FALSE;
}
}
use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AppStateSmsPremBridge method loadAllExtraInfo.
@Override
protected void loadAllExtraInfo() {
ArrayList<AppEntry> apps = mAppSession.getAllApps();
final int N = apps.size();
for (int i = 0; i < N; i++) {
AppEntry app = apps.get(i);
updateExtraInfo(app, app.info.packageName, app.info.uid);
}
}
use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AppStateAppOpsBridge method loadAllExtraInfo.
@Override
protected void loadAllExtraInfo() {
SparseArray<ArrayMap<String, PermissionState>> entries = getEntries();
// Load state info.
loadPermissionsStates(entries);
loadAppOpsStates(entries);
// Map states to application info.
List<AppEntry> apps = mAppSession.getAllApps();
final int N = apps.size();
for (int i = 0; i < N; i++) {
AppEntry app = apps.get(i);
int userId = UserHandle.getUserId(app.info.uid);
ArrayMap<String, PermissionState> userMap = entries.get(userId);
app.extraInfo = userMap != null ? userMap.get(app.info.packageName) : null;
}
}
use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AppStateNotificationBridge method loadAllExtraInfo.
@Override
protected void loadAllExtraInfo() {
ArrayList<AppEntry> apps = mAppSession.getAllApps();
final int N = apps.size();
for (int i = 0; i < N; i++) {
AppEntry app = apps.get(i);
app.extraInfo = mNotifBackend.loadAppRow(mContext, mPm, app.info);
}
}
use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class DataSaverSummary method onExtraInfoUpdated.
@Override
public void onExtraInfoUpdated() {
if (!isAdded()) {
return;
}
int count = 0;
final ArrayList<AppEntry> allApps = mSession.getAllApps();
final int N = allApps.size();
for (int i = 0; i < N; i++) {
final AppEntry entry = allApps.get(i);
if (!ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(entry)) {
continue;
}
if (entry.extraInfo != null && ((AppStateDataUsageBridge.DataUsageState) entry.extraInfo).isDataSaverWhitelisted) {
count++;
}
}
mUnrestrictedAccess.setSummary(getResources().getQuantityString(R.plurals.data_saver_unrestricted_summary, count, count));
}