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

Commit 31e7db83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use the system server identity before binding the service" into main

parents b0115622 04b17b2e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.app.appfunctions.IExecuteAppFunctionCallback;
import android.app.appfunctions.SafeOneTimeExecuteAppFunctionCallback;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Slog;
@@ -141,10 +142,16 @@ public class AppFunctionManagerServiceImpl extends IAppFunctionManager.Stub {
            ));
            return;
        }

        final long token = Binder.clearCallingIdentity();
        try {
            bindAppFunctionServiceUnchecked(requestInternal, serviceIntent, targetUser,
                safeExecuteAppFunctionCallback,
                /*bindFlags=*/ Context.BIND_AUTO_CREATE,
                /*timeoutInMillis=*/ mServiceConfig.getExecuteAppFunctionTimeoutMillis());
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }

    private void bindAppFunctionServiceUnchecked(