Search in sources :

Example 6 with AppEntry

use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AppStateDataUsageBridge 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 = new DataUsageState(mDataSaverBackend.isWhitelisted(app.info.uid), mDataSaverBackend.isBlacklisted(app.info.uid));
    }
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Example 7 with AppEntry

use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class UnrestrictedDataAccess method onRebuildComplete.

@Override
public void onRebuildComplete(ArrayList<AppEntry> apps) {
    if (getContext() == null)
        return;
    cacheRemoveAllPrefs(getPreferenceScreen());
    final int N = apps.size();
    for (int i = 0; i < N; i++) {
        AppEntry entry = apps.get(i);
        String key = entry.info.packageName + "|" + entry.info.uid;
        AccessPreference preference = (AccessPreference) getCachedPreference(key);
        if (preference == null) {
            preference = new AccessPreference(getPrefContext(), entry);
            preference.setKey(key);
            preference.setOnPreferenceChangeListener(this);
            getPreferenceScreen().addPreference(preference);
        } else {
            preference.reuse();
        }
        preference.setOrder(i);
    }
    setLoading(false, true);
    removeCachedPrefs(getPreferenceScreen());
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Example 8 with AppEntry

use of com.android.settingslib.applications.ApplicationsState.AppEntry in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ManageDomainUrls method rebuildAppList.

private void rebuildAppList(PreferenceGroup group, ArrayList<AppEntry> apps) {
    cacheRemoveAllPrefs(group);
    final int N = apps.size();
    for (int i = 0; i < N; i++) {
        AppEntry entry = apps.get(i);
        String key = entry.info.packageName + "|" + entry.info.uid;
        DomainAppPreference preference = (DomainAppPreference) getCachedPreference(key);
        if (preference == null) {
            preference = new DomainAppPreference(getPrefContext(), entry);
            preference.setKey(key);
            preference.setOnPreferenceClickListener(this);
            group.addPreference(preference);
        } else {
            preference.reuse();
        }
        preference.setOrder(i);
    }
    removeCachedPrefs(group);
}
Also used : AppEntry(com.android.settingslib.applications.ApplicationsState.AppEntry)

Aggregations

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