Remove FLAG_FOREGROUND_SERVICE on Service.stopForeground()

When services call Service.stopForeground(), remove
FLAG_FOREGROUND_SERVICE from the notification that was supplied
to Service.startForeground().

This enables services to post notifications that become user
dismissable when they switch to being a background service.

Restrict this to targetSdk=L apps to reduce the risk of breaking
existing apps.

Bug: 17551106
Change-Id: Iff8541e5bb2a23ad1fbc9ad80df5fd6eb683148b
diff --git a/services/core/java/com/android/server/notification/NotificationManagerInternal.java b/services/core/java/com/android/server/notification/NotificationManagerInternal.java
index b695b68..c6b0d36 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerInternal.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerInternal.java
@@ -21,4 +21,6 @@
 public interface NotificationManagerInternal {
     void enqueueNotification(String pkg, String basePkg, int callingUid, int callingPid,
             String tag, int id, Notification notification, int[] idReceived, int userId);
+
+    void removeForegroundServiceFlagFromNotification(String pkg, int notificationId, int userId);
 }