diff options
| author | 2020-07-16 21:15:52 +0000 | |
|---|---|---|
| committer | 2020-07-16 21:15:52 +0000 | |
| commit | c1474c5d0530534ae25a4873b595bdaf52b50bba (patch) | |
| tree | 8a353b79afc3ca4f425c0dc65592606278b36e72 | |
| parent | 3d8eae5e6ad2b1f726098d0166bc641e40f5f6c1 (diff) | |
| parent | 76cc6e415e8f23f802d13ce7ccf544967fb03321 (diff) | |
Merge "Add logcat message for background started FGS." into rvc-dev am: 274ce4442a am: b6fa5d4f8a am: 76cc6e415e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12172784
Change-Id: Ia7c949cb8143c5aa2c2c5dca44a1ecd7cb62bcc1
| -rw-r--r-- | services/core/java/com/android/server/am/ActiveServices.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 56953708e383..3f867f656c24 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -18,7 +18,6 @@ package com.android.server.am; import static android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND; import static android.content.pm.PackageManager.PERMISSION_GRANTED; -import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION; import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST; import static android.os.Process.NFC_UID; import static android.os.Process.ROOT_UID; @@ -1361,13 +1360,12 @@ public final class ActiveServices { + String.format("0x%08X", manifestType) + " in service element of manifest file"); } - if ((foregroundServiceType & FOREGROUND_SERVICE_TYPE_LOCATION) != 0 - && !r.mAllowWhileInUsePermissionInFgs) { - // If the foreground service is not started from TOP process, do not allow it to - // have location capability, this prevents BG started FGS to have while-in-use - // location permission. + // If the foreground service is not started from TOP process, do not allow it to + // have while-in-use location/camera/microphone access. + if (!r.mAllowWhileInUsePermissionInFgs) { Slog.w(TAG, - "BG started FGS can not have location capability: service " + "Foreground service started from background can not have " + + "location/camera/microphone access: service " + r.shortInstanceName); } } |