Fix issue #34855227: Bg check Android O: Able to start...

...service after receiving broadcast in background

A new UidRecord should start out idle, not non-idle.

Test: added CtsAppTestCases:.ActivityManagerTest#testBackgroundCheckBroadcastService
Change-Id: Ib04e11b95958477eaba1e421fd901f9cd1ee705a
diff --git a/services/core/java/com/android/server/am/UidRecord.java b/services/core/java/com/android/server/am/UidRecord.java
index 48a1a1a..5a847fb 100644
--- a/services/core/java/com/android/server/am/UidRecord.java
+++ b/services/core/java/com/android/server/am/UidRecord.java
@@ -87,6 +87,7 @@
 
     public UidRecord(int _uid) {
         uid = _uid;
+        idle = true;
         reset();
     }