Move ActivityManager tests to WmTests

Bug: 113800711
Test: Pass all AM presubmit tests in WmTests
  $ tradefed.sh run commandAndExit WmTests \
      --include-filter com.android.server.am. \
      --include-annotation android.platform.test.annotations.Presubmit \
      --exclude-annotation androidx.test.filters.FlakyTest
Change-Id: Idc2dc9e80d95cfe8490ddef94aeca9a5202aad91
diff --git a/services/core/java/com/android/server/am/PersisterQueue.java b/services/core/java/com/android/server/am/PersisterQueue.java
index 60ea0fa..0bcc3b5 100644
--- a/services/core/java/com/android/server/am/PersisterQueue.java
+++ b/services/core/java/com/android/server/am/PersisterQueue.java
@@ -171,6 +171,11 @@
         mListeners.add(listener);
     }
 
+    @VisibleForTesting
+    boolean removeListener(Listener listener) {
+        return mListeners.remove(listener);
+    }
+
     private void processNextItem() throws InterruptedException {
         // This part is extracted into a method so that the GC can clearly see the end of the
         // scope of the variable 'item'.  If this part was in the loop in LazyTaskWriterThread, the