Add high power whitelist for apps
- Strings not final! - New UX for power usage details (more preferency) - Add high power apps list shows on/off and screen to change (when possible) - Link from power usage summary to high power list - Link from advanced apps to high power list Bug: 19991702 Change-Id: I97c927ed82d3b89041e4429b427508545763d66c
This commit is contained in:
@@ -20,6 +20,7 @@ import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.Fragment;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -36,6 +37,7 @@ import android.util.Log;
|
||||
|
||||
import com.android.settings.InstrumentedPreferenceFragment;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.applications.ApplicationsState.AppEntry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -194,6 +196,17 @@ public abstract class AppInfoBase extends InstrumentedPreferenceFragment
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
public static void startAppInfoFragment(Class<? extends AppInfoBase> fragment, int titleRes,
|
||||
String pkg, int uid, Fragment source, int request) {
|
||||
Bundle args = new Bundle();
|
||||
args.putString(AppInfoBase.ARG_PACKAGE_NAME, pkg);
|
||||
|
||||
Intent intent = Utils.onBuildStartFragmentIntent(source.getActivity(), fragment.getName(),
|
||||
args, null, titleRes, null, false);
|
||||
source.getActivity().startActivityForResultAsUser(intent, request,
|
||||
new UserHandle(UserHandle.getUserId(uid)));
|
||||
}
|
||||
|
||||
public class MyAlertDialogFragment extends DialogFragment {
|
||||
public MyAlertDialogFragment(int id, int errorCode) {
|
||||
Bundle args = new Bundle();
|
||||
|
||||
Reference in New Issue
Block a user