Allow services to execute in the background scheduling group.

If a service is being executed due to a call from a background
process, there is no reason for its process to be brought up
to the foreground scheduling group to do its work.  So, don't.

Change-Id: I0f4f9f2fdcc3481ca4ad2e4e3deb43b8edbbd897
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index 1b45d30..cade2bb 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -39,7 +39,6 @@
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.HashSet;
 
 /**
  * Full information about a particular process that
@@ -138,7 +137,8 @@
     // All ContentProviderRecord process is using
     final ArrayList<ContentProviderConnection> conProviders
             = new ArrayList<ContentProviderConnection>();
-    
+
+    boolean execServicesFg;     // do we need to be executing services in the foreground?
     boolean persistent;         // always keep this application running?
     boolean crashing;           // are we in the process of crashing?
     Dialog crashDialog;         // dialog being displayed due to crash.
@@ -301,7 +301,8 @@
             }
         }
         if (executingServices.size() > 0) {
-            pw.print(prefix); pw.println("Executing Services:");
+            pw.print(prefix); pw.print("Executing Services (fg=");
+            pw.print(execServicesFg); pw.println(")");
             for (int i=0; i<executingServices.size(); i++) {
                 pw.print(prefix); pw.print("  - "); pw.println(executingServices.valueAt(i));
             }