Loading services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -12230,6 +12230,7 @@ public final class ActivityManagerService extends ActivityManagerNative pw.println(" package [PACKAGE_NAME]: all state related to given package"); pw.println(" all: dump all activities"); pw.println(" top: dump the top activity"); pw.println(" write: write all pending state to storage"); pw.println(" cmd may also be a COMP_SPEC to dump activities."); pw.println(" COMP_SPEC may be a component name (com.foo/.myApp),"); pw.println(" a partial substring in a component name, a"); Loading Loading @@ -12364,6 +12365,10 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { mServices.dumpServicesLocked(fd, pw, args, opti, true, dumpClient, null); } } else if ("write".equals(cmd)) { mTaskPersister.flush(); pw.println("All tasks persisted."); return; } else { // Dumping a single activity? if (!dumpActivity(fd, pw, cmd, args, opti, dumpAll)) { Loading services/core/java/com/android/server/am/TaskPersister.java +18 −1 Original line number Diff line number Diff line Loading @@ -187,6 +187,19 @@ public class TaskPersister { yieldIfQueueTooDeep(); } void flush() { synchronized (this) { mNextWriteTime = FLUSH_QUEUE; notifyAll(); do { try { wait(); } catch (InterruptedException e) { } } while (mNextWriteTime == FLUSH_QUEUE); } } void saveImage(Bitmap image, String filename) { synchronized (this) { int queueNdx; Loading Loading @@ -483,8 +496,12 @@ public class TaskPersister { INTER_WRITE_DELAY_MS + " msec. (" + mNextWriteTime + ")"); } while (mWriteQueue.isEmpty()) { if (mNextWriteTime != 0) { mNextWriteTime = 0; // idle. TaskPersister.this.notifyAll(); // wake up flush() if needed. } try { if (DEBUG) Slog.d(TAG, "LazyTaskWriter: waiting indefinitely."); TaskPersister.this.wait(); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -12230,6 +12230,7 @@ public final class ActivityManagerService extends ActivityManagerNative pw.println(" package [PACKAGE_NAME]: all state related to given package"); pw.println(" all: dump all activities"); pw.println(" top: dump the top activity"); pw.println(" write: write all pending state to storage"); pw.println(" cmd may also be a COMP_SPEC to dump activities."); pw.println(" COMP_SPEC may be a component name (com.foo/.myApp),"); pw.println(" a partial substring in a component name, a"); Loading Loading @@ -12364,6 +12365,10 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { mServices.dumpServicesLocked(fd, pw, args, opti, true, dumpClient, null); } } else if ("write".equals(cmd)) { mTaskPersister.flush(); pw.println("All tasks persisted."); return; } else { // Dumping a single activity? if (!dumpActivity(fd, pw, cmd, args, opti, dumpAll)) { Loading
services/core/java/com/android/server/am/TaskPersister.java +18 −1 Original line number Diff line number Diff line Loading @@ -187,6 +187,19 @@ public class TaskPersister { yieldIfQueueTooDeep(); } void flush() { synchronized (this) { mNextWriteTime = FLUSH_QUEUE; notifyAll(); do { try { wait(); } catch (InterruptedException e) { } } while (mNextWriteTime == FLUSH_QUEUE); } } void saveImage(Bitmap image, String filename) { synchronized (this) { int queueNdx; Loading Loading @@ -483,8 +496,12 @@ public class TaskPersister { INTER_WRITE_DELAY_MS + " msec. (" + mNextWriteTime + ")"); } while (mWriteQueue.isEmpty()) { if (mNextWriteTime != 0) { mNextWriteTime = 0; // idle. TaskPersister.this.notifyAll(); // wake up flush() if needed. } try { if (DEBUG) Slog.d(TAG, "LazyTaskWriter: waiting indefinitely."); TaskPersister.this.wait(); Loading