Developer settings screen for inactive apps
Show a list of apps and allow toggling their active state. Bug: 20066058 Change-Id: Id81e95c354a579773d39d3e7d7cfa1ff46df29e9
This commit is contained in:
@@ -73,8 +73,10 @@ import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.settings.fuelgauge.InactiveApps;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Indexable;
|
||||
import com.android.settings.users.UserDetailsSettings;
|
||||
import com.android.settings.widget.SwitchBar;
|
||||
|
||||
import java.lang.Process;
|
||||
@@ -165,6 +167,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
private static final String WIFI_LEGACY_DHCP_CLIENT_KEY = "legacy_dhcp_client";
|
||||
private static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on";
|
||||
|
||||
private static final String INACTIVE_APPS_KEY = "inactive_apps";
|
||||
|
||||
private static final String OPENGL_TRACES_KEY = "enable_opengl_traces";
|
||||
|
||||
private static final String IMMEDIATELY_DESTROY_ACTIVITIES_KEY
|
||||
@@ -1728,6 +1732,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
writeUseAwesomePlayerOptions();
|
||||
} else if (preference == mUSBAudio) {
|
||||
writeUSBAudioOptions();
|
||||
} else if (INACTIVE_APPS_KEY.equals(preference.getKey())) {
|
||||
startInactiveAppsFragment();
|
||||
} else {
|
||||
return super.onPreferenceTreeClick(preferenceScreen, preference);
|
||||
}
|
||||
@@ -1735,6 +1741,12 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
return false;
|
||||
}
|
||||
|
||||
private void startInactiveAppsFragment() {
|
||||
((SettingsActivity) getActivity()).startPreferencePanel(
|
||||
InactiveApps.class.getName(),
|
||||
null, R.string.inactive_apps_title, null, null, 0);
|
||||
}
|
||||
|
||||
private boolean showKeyguardConfirmation(Resources resources, int requestCode) {
|
||||
return new ChooseLockSettingsHelper(getActivity(), this).launchConfirmationActivity(
|
||||
requestCode, resources.getString(R.string.oem_unlock_enable));
|
||||
|
Reference in New Issue
Block a user