Fix ApplicationsState.Session memory leak in settings app
Removes the creation of an unused session and some other redundant code
left behind when c5291b87
was applied.
Change-Id: Ie5ec0f00b3240df9cf2c4fa3bd05b49ba45f4547
This commit is contained in:
committed by
Edward Savage-Jones
parent
87e59d0e81
commit
6cd4db0576
@@ -29,16 +29,13 @@ import com.android.settings.Utils;
|
||||
import com.android.settings.applications.PermissionsSummaryHelper.PermissionsResultCallback;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Indexable;
|
||||
import com.android.settingslib.applications.ApplicationsState;
|
||||
import com.android.settingslib.applications.ApplicationsState.AppEntry;
|
||||
import com.android.settingslib.applications.ApplicationsState.Session;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class AdvancedAppSettings extends SettingsPreferenceFragment implements
|
||||
ApplicationsState.Callbacks, Indexable {
|
||||
Indexable {
|
||||
|
||||
static final String TAG = "AdvancedAppSettings";
|
||||
|
||||
@@ -48,7 +45,6 @@ public class AdvancedAppSettings extends SettingsPreferenceFragment implements
|
||||
private static final String KEY_SYSTEM_ALERT_WINDOW = "system_alert_window";
|
||||
private static final String KEY_WRITE_SETTINGS_APPS = "write_settings_apps";
|
||||
|
||||
private Session mSession;
|
||||
private Preference mAppPermsPreference;
|
||||
private Preference mAppDomainURLsPreference;
|
||||
private Preference mHighPowerPreference;
|
||||
@@ -65,10 +61,6 @@ public class AdvancedAppSettings extends SettingsPreferenceFragment implements
|
||||
Preference permissions = getPreferenceScreen().findPreference(KEY_APP_PERM);
|
||||
permissions.setIntent(new Intent(Intent.ACTION_MANAGE_PERMISSIONS));
|
||||
|
||||
ApplicationsState applicationsState = ApplicationsState.getInstance(
|
||||
getActivity().getApplication());
|
||||
mSession = applicationsState.newSession(this);
|
||||
|
||||
mAppPermsPreference = findPreference(KEY_APP_PERM);
|
||||
mAppDomainURLsPreference = findPreference(KEY_APP_DOMAIN_URLS);
|
||||
mHighPowerPreference = findPreference(KEY_HIGH_POWER_APPS);
|
||||
@@ -81,46 +73,6 @@ public class AdvancedAppSettings extends SettingsPreferenceFragment implements
|
||||
return MetricsEvent.APPLICATIONS_ADVANCED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRunningStateChanged(boolean running) {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPackageListChanged() {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRebuildComplete(ArrayList<AppEntry> apps) {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPackageIconChanged() {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPackageSizeChanged(String packageName) {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAllSizesComputed() {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLauncherInfoChanged() {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadEntriesCompleted() {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
private final PermissionsResultCallback mPermissionCallback = new PermissionsResultCallback() {
|
||||
@Override
|
||||
public void onAppWithPermissionsCountsResult(int standardGrantedPermissionAppCount,
|
||||
|
Reference in New Issue
Block a user