OSDN Git Service

Fixup App Compaction CL nits.
authorBen Murdoch <benm@google.com>
Thu, 4 Apr 2019 13:29:49 +0000 (14:29 +0100)
committerBen Murdoch <benm@google.com>
Thu, 4 Apr 2019 13:29:49 +0000 (14:29 +0100)
A couple of nits to cleanup from change I71fffc52a232cd5608742d9f36965a4de6494b56

 - remove unused method
 - remove unnecessary null check.

BUG: 128427978
Test: atest FrameworksMockingServicesTests:AppCompactorTest
Change-Id: I363c57fc78529207585f5d1e004770d967ce87b9

services/core/java/com/android/server/am/AppCompactor.java

index 043dc8d..13b55db 100644 (file)
@@ -278,17 +278,15 @@ public final class AppCompactor {
                     + " full, " + mPersistentCompactionCount + " persistent, "
                     + mBfgsCompactionCount + " BFGS compactions.");
 
-            if (mLastCompactionStats != null) {
-                pw.println("  Tracking last compaction stats for " + mLastCompactionStats.size()
-                        + " processes.");
-                if (DEBUG_COMPACTION) {
-                    for (Map.Entry<Integer, LastCompactionStats> entry
-                            : mLastCompactionStats.entrySet()) {
-                        int pid = entry.getKey();
-                        LastCompactionStats stats = entry.getValue();
-                        pw.println("    " + pid + ": "
-                                + Arrays.toString(stats.getRssAfterCompaction()));
-                    }
+            pw.println("  Tracking last compaction stats for " + mLastCompactionStats.size()
+                    + " processes.");
+            if (DEBUG_COMPACTION) {
+                for (Map.Entry<Integer, LastCompactionStats> entry
+                        : mLastCompactionStats.entrySet()) {
+                    int pid = entry.getKey();
+                    LastCompactionStats stats = entry.getValue();
+                    pw.println("    " + pid + ": "
+                            + Arrays.toString(stats.getRssAfterCompaction()));
                 }
             }
         }
@@ -506,10 +504,6 @@ public final class AppCompactor {
         }
     }
 
-    @VisibleForTesting static String procStateListToString(Integer... processStates) {
-        return Arrays.toString(processStates);
-    }
-
     private static final class LastCompactionStats {
         private final long[] mRssAfterCompaction;