Fix animation scale to also scale start offset.
Also more better info in meminfo dump.
Change-Id: I45ab41821cd8dd81b61605de6a0cf7074e76c71a
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index c935733..7232a94 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -9026,6 +9026,7 @@
final static class MemItem {
final String label;
final long pss;
+ ArrayList<MemItem> subitems;
public MemItem(String _label, long _pss) {
label = _label;
@@ -9051,7 +9052,10 @@
for (int i=0; i<items.size(); i++) {
MemItem mi = items.get(i);
- pw.print(prefix); pw.printf("%8d Kb: ", mi.pss); pw.println(mi.label);
+ pw.print(prefix); pw.printf("%7d Kb: ", mi.pss); pw.println(mi.label);
+ if (mi.subitems != null) {
+ dumpMemItems(pw, prefix + " ", mi.subitems, true);
+ }
}
}
@@ -9119,6 +9123,7 @@
"Backup", "Services", "Home", "Background"
};
long oomPss[] = new long[oomLabel.length];
+ ArrayList<MemItem>[] oomProcs = (ArrayList<MemItem>[])new ArrayList[oomLabel.length];
long totalPss = 0;
@@ -9147,7 +9152,9 @@
if (!isCheckinRequest && mi != null) {
long myTotalPss = mi.getTotalPss();
totalPss += myTotalPss;
- procMems.add(new MemItem(r.processName + " (pid " + r.pid + ")", myTotalPss));
+ MemItem pssItem = new MemItem(r.processName + " (pid " + r.pid + ")",
+ myTotalPss);
+ procMems.add(pssItem);
nativePss += mi.nativePss;
dalvikPss += mi.dalvikPss;
@@ -9161,6 +9168,10 @@
for (int oomIndex=0; oomIndex<oomPss.length; oomIndex++) {
if (r.setAdj <= oomAdj[oomIndex] || oomIndex == (oomPss.length-1)) {
oomPss[oomIndex] += myTotalPss;
+ if (oomProcs[oomIndex] == null) {
+ oomProcs[oomIndex] = new ArrayList<MemItem>();
+ }
+ oomProcs[oomIndex].add(pssItem);
break;
}
}
@@ -9181,7 +9192,9 @@
ArrayList<MemItem> oomMems = new ArrayList<MemItem>();
for (int j=0; j<oomPss.length; j++) {
if (oomPss[j] != 0) {
- oomMems.add(new MemItem(oomLabel[j], oomPss[j]));
+ MemItem item = new MemItem(oomLabel[j], oomPss[j]);
+ item.subitems = oomProcs[j];
+ oomMems.add(item);
}
}