summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications/ProcessStatsDetail.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-09-15 13:22:28 -0700
committerDianne Hackborn <hackbod@google.com>2013-09-15 13:22:28 -0700
commit49759af6b06b884d3a1af9dbb120370893744b94 (patch)
treef68130fa2a361d5eacd7eb275cc044b1acda3fc3 /src/com/android/settings/applications/ProcessStatsDetail.java
parentb8e39041a5e8994376e44f7b5c5b9cd32a09377e (diff)
downloadpackages_apps_Settings-49759af6b06b884d3a1af9dbb120370893744b94.tar.gz
packages_apps_Settings-49759af6b06b884d3a1af9dbb120370893744b94.tar.bz2
packages_apps_Settings-49759af6b06b884d3a1af9dbb120370893744b94.zip
Various proc stats UI improvements.
- Option to include system processes. - Option to use uss instead of pss sizes. - Option to select type of stats: background processes, foreground (top) processes, cached processes. - Details now shows max mem usage. Change-Id: Ic994564ce846bc1021bf35576feeb9ef095b0e48
Diffstat (limited to 'src/com/android/settings/applications/ProcessStatsDetail.java')
-rw-r--r--src/com/android/settings/applications/ProcessStatsDetail.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/settings/applications/ProcessStatsDetail.java b/src/com/android/settings/applications/ProcessStatsDetail.java
index 5ec3b0774..fad374523 100644
--- a/src/com/android/settings/applications/ProcessStatsDetail.java
+++ b/src/com/android/settings/applications/ProcessStatsDetail.java
@@ -52,6 +52,7 @@ public class ProcessStatsDetail extends Fragment implements Button.OnClickListen
public static final int ACTION_FORCE_STOP = 1;
public static final String EXTRA_ENTRY = "entry";
+ public static final String EXTRA_USE_USS = "use_uss";
public static final String EXTRA_MAX_WEIGHT = "max_weight";
public static final String EXTRA_TOTAL_TIME = "total_time";
@@ -59,6 +60,7 @@ public class ProcessStatsDetail extends Fragment implements Button.OnClickListen
private DevicePolicyManager mDpm;
private ProcStatsEntry mEntry;
+ private boolean mUseUss;
private long mMaxWeight;
private long mTotalTime;
@@ -83,6 +85,7 @@ public class ProcessStatsDetail extends Fragment implements Button.OnClickListen
final Bundle args = getArguments();
mEntry = (ProcStatsEntry)args.getParcelable(EXTRA_ENTRY);
mEntry.retrieveUiData(mPm);
+ mUseUss = args.getBoolean(EXTRA_USE_USS);
mMaxWeight = args.getLong(EXTRA_MAX_WEIGHT);
mTotalTime = args.getLong(EXTRA_TOTAL_TIME);
}
@@ -177,8 +180,12 @@ public class ProcessStatsDetail extends Fragment implements Button.OnClickListen
}
private void fillDetailsSection() {
- addDetailsItem(mDetailsParent, getResources().getText(R.string.process_stats_ram_use),
- Formatter.formatShortFileSize(getActivity(), mEntry.mAvgPss * 1024));
+ addDetailsItem(mDetailsParent, getResources().getText(R.string.process_stats_avg_ram_use),
+ Formatter.formatShortFileSize(getActivity(),
+ (mUseUss ? mEntry.mAvgUss : mEntry.mAvgPss) * 1024));
+ addDetailsItem(mDetailsParent, getResources().getText(R.string.process_stats_max_ram_use),
+ Formatter.formatShortFileSize(getActivity(),
+ (mUseUss ? mEntry.mMaxUss : mEntry.mMaxPss) * 1024));
addDetailsItem(mDetailsParent, getResources().getText(R.string.process_stats_run_time),
makePercentString(getResources(), mEntry.mDuration, mTotalTime));
}