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

Commit 8797e1f0 authored by Hui Yu's avatar Hui Yu
Browse files

Add interface tempAllowWhileInUsePermissionInFgs() to

ActivityManagerInternal.

So Telecomm can potentially call tempAllowWhileInUsePermissionInFgs() to
allow a FGS started for incoming call to have a while-in-use permission.
Previously tempAllowWhileInUsePermissionInFgs() is an interface in
ActivityManagerLocal, because Telecomm is in packages/services/Telecomm directory, it has
difficulty to call ActivityManagerLocal interfaces. Add
tempAllowWhileInUsePermissionInFgs() to ActivityManagerInternal is the
easiest workaround.

Bug: 270966067
Test: build and run.

Change-Id: I1112ec2b9d4d4a273f47d7d9abae1bd91f2987c2
parent 00a9833d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -994,6 +994,16 @@ public abstract class ActivityManagerInternal {
     */
    public abstract void logFgsApiEnd(int apiType, int uid, int pid);

     /**
     * Temporarily allow foreground service started by an uid to have while-in-use permission
     * for durationMs.
     *
     * @param uid The UID of the app that starts the foreground service.
     * @param durationMs elapsedRealTime duration in milliseconds.
     * @hide
     */
    public abstract void tempAllowWhileInUsePermissionInFgs(int uid, long durationMs);

    /**
     * The list of the events about the {@link android.media.projection.IMediaProjection} itself.
     *