Loading services/core/java/com/android/server/am/ActiveServices.java +3 −7 Original line number Diff line number Diff line Loading @@ -1888,13 +1888,9 @@ public final class ActiveServices { } else if (r.mStartForegroundCount >= 1) { // The second or later time startForeground() is called after service is // started. Check for app state again. final long delayMs = SystemClock.elapsedRealtime() - r.mLastSetFgsRestrictionTime; if (delayMs > mAm.mConstants.mFgsStartForegroundTimeoutMs) { setFgsRestrictionLocked(r.serviceInfo.packageName, r.app.getPid(), r.appInfo.uid, r.intent.getIntent(), r, r.userId, false); } } // 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) { Loading Loading
services/core/java/com/android/server/am/ActiveServices.java +3 −7 Original line number Diff line number Diff line Loading @@ -1888,13 +1888,9 @@ public final class ActiveServices { } else if (r.mStartForegroundCount >= 1) { // The second or later time startForeground() is called after service is // started. Check for app state again. final long delayMs = SystemClock.elapsedRealtime() - r.mLastSetFgsRestrictionTime; if (delayMs > mAm.mConstants.mFgsStartForegroundTimeoutMs) { setFgsRestrictionLocked(r.serviceInfo.packageName, r.app.getPid(), r.appInfo.uid, r.intent.getIntent(), r, r.userId, false); } } // 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) { Loading