Search in sources :

Example 1 with AppEntry

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;
    }
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Example 2 with AppEntry

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);
    }
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Example 3 with AppEntry

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;
    }
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry) ArrayMap(android.util.ArrayMap)

Example 4 with AppEntry

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);
    }
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Example 5 with AppEntry

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));
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Aggregations

AppEntry (com.android.settingslib.applications.ApplicationsState.AppEntry)8 ArrayMap (android.util.ArrayMap)1