Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19bc995e authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix animation scale to also scale start offset."

parents 28853aaf a4bacb8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ public abstract class Animation implements Cloneable {
     */
    public void scaleCurrentDuration(float scale) {
        mDuration = (long) (mDuration * scale);
        mStartOffset = (long) (mStartOffset * scale);
    }

    /**
+16 −3
Original line number Diff line number Diff line
@@ -9026,6 +9026,7 @@ public final class ActivityManagerService extends ActivityManagerNative
    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 @@ public final class ActivityManagerService extends ActivityManagerNative
        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 @@ public final class ActivityManagerService extends ActivityManagerNative
                "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 @@ public final class ActivityManagerService extends ActivityManagerNative
                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 @@ public final class ActivityManagerService extends ActivityManagerNative
                    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 @@ public final class ActivityManagerService extends ActivityManagerNative
            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);
                }
            }