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

Commit bf1a18bf authored by Oluwarotimi Adesina's avatar Oluwarotimi Adesina Committed by Android (Google) Code Review
Browse files

Merge "Nit fix for multi-user test" into main

parents 04d09206 e396e46e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ public class AppFunctionManagerServiceImpl extends IAppFunctionManager.Stub {
                .verifyCallerCanExecuteAppFunction(
                        callingUid,
                        callingPid,
                        targetUser,
                        requestInternal.getCallingPackage(),
                        targetPackageName,
                        requestInternal.getClientRequest().getFunctionIdentifier())
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,9 @@ public interface CallerValidator {
     * {@link Manifest.permission#EXECUTE_APP_FUNCTIONS} granted. In some cases, app functions can
     * still opt-out of caller having {@link Manifest.permission#EXECUTE_APP_FUNCTIONS}.
     *
     * @param callingUid The calling uid.
     * @param callingPid The calling pid.
     * @param targetUser The user which the caller is requesting to execute as.
     * @param callerPackageName The calling package (as previously validated).
     * @param targetPackageName The package that owns the app function to execute.
     * @param functionId The id of the app function to execute.
@@ -72,6 +75,7 @@ public interface CallerValidator {
    AndroidFuture<Boolean> verifyCallerCanExecuteAppFunction(
            int callingUid,
            int callingPid,
            @NonNull UserHandle targetUser,
            @NonNull String callerPackageName,
            @NonNull String targetPackageName,
            @NonNull String functionId);
+5 −1
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ class CallerValidatorImpl implements CallerValidator {
    public AndroidFuture<Boolean> verifyCallerCanExecuteAppFunction(
            int callingUid,
            int callingPid,
            @NonNull UserHandle targetUser,
            @NonNull String callerPackageName,
            @NonNull String targetPackageName,
            @NonNull String functionId) {
@@ -122,7 +123,10 @@ class CallerValidatorImpl implements CallerValidator {

        FutureAppSearchSession futureAppSearchSession =
                new FutureAppSearchSessionImpl(
                        mContext.getSystemService(AppSearchManager.class),
                        Objects.requireNonNull(
                                mContext
                                        .createContextAsUser(targetUser, 0)
                                        .getSystemService(AppSearchManager.class)),
                        THREAD_POOL_EXECUTOR,
                        new SearchContext.Builder(APP_FUNCTION_STATIC_METADATA_DB).build());