Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f26cb60 authored by Hui Yu's avatar Hui Yu Committed by Automerger Merge Worker
Browse files

Merge "Add logcat message for background started FGS." into rvc-dev am:...

Merge "Add logcat message for background started FGS." into rvc-dev am: 274ce444 am: b6fa5d4f am: 76cc6e41 am: c1474c5d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12172784

Change-Id: I5e6c23f776ac2dac61c94f62030e3b631b998c85
parents c32bde25 c1474c5d
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -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.
                // 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);
                }
            }