Add details screen to proc stats.

Lets you see the actual RAM use and % running time, a list of
all of the services that are associated with it (kind-of, not
working correctly for those that share processes), and most
importantly a glorious FORCE STOP button.

Change-Id: I34ac30c88f1187227a8a7809ae103118c8b9a865
This commit is contained in:
Dianne Hackborn
2013-09-04 15:47:59 -07:00
parent 35ec3b7fa3
commit 0448673834
6 changed files with 566 additions and 116 deletions

View File

@@ -27,15 +27,21 @@ import android.widget.TextView;
import com.android.settings.R;
public class ProcessStatsPreference extends Preference {
private final ProcStatsEntry mEntry;
private int mProgress;
private CharSequence mProgressText;
public ProcessStatsPreference(Context context, Drawable icon) {
public ProcessStatsPreference(Context context, Drawable icon, ProcStatsEntry entry) {
super(context);
mEntry = entry;
setLayoutResource(R.layout.app_percentage_item);
setIcon(icon != null ? icon : new ColorDrawable(0));
}
public ProcStatsEntry getEntry() {
return mEntry;
}
public void setPercent(double percentOfWeight, double percentOfTime) {
mProgress = (int) Math.ceil(percentOfWeight);
mProgressText = getContext().getResources().getString(