Work on issue #36891897: Need to ensure foreground services can't...

...hide themselves

The activity manager now keeps track of all apps that are running
foreground services and builds a notification showing them to the
user.  We ensure they are shown to the user for at least 30 seconds
(configurable).  If foreground services are executed while the
screen is off, their apps will be shown to the user for at least
30 seconds after the screen turns back on.

While doing this I am also adding a new process state to distinguish
between "important background" stuff that should bypass bg check vs.
ones that don't.  By default, these now no longer bypass bg check,
which is really the expected (and documented) behavior.  There is a
new bind flag to allow them to bypass bg check, which is currently
only used by the IME.

Also add some new job scheduler commands that will be used to
write new tests cases for jobs timing out.

Bug: 36891897

Test: manual

Change-Id: Ied3f7b56444254513fd776f06b88bc0e54704958
diff --git a/services/core/java/com/android/server/DropBoxManagerService.java b/services/core/java/com/android/server/DropBoxManagerService.java
index 9d3d531..e1756d1 100644
--- a/services/core/java/com/android/server/DropBoxManagerService.java
+++ b/services/core/java/com/android/server/DropBoxManagerService.java
@@ -371,6 +371,14 @@
                 doPrint = true;
             } else if (args[i].equals("-f") || args[i].equals("--file")) {
                 doFile = true;
+            } else if (args[i].equals("-h") || args[i].equals("--help")) {
+                pw.println("Dropbox (dropbox) dump options:");
+                pw.println("  [-h|--help] [-p|--print] [-f|--file] [timestamp]");
+                pw.println("    -h|--help: print this help");
+                pw.println("    -p|--print: print full contents of each entry");
+                pw.println("    -f|--file: print path of each entry's file");
+                pw.println("  [timestamp] optionally filters to only those entries.");
+                return;
             } else if (args[i].startsWith("-")) {
                 out.append("Unknown argument: ").append(args[i]).append("\n");
             } else {