1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.server.appfunctions; 18 19 import android.annotation.NonNull; 20 import android.content.Intent; 21 import android.os.UserHandle; 22 23 import com.android.internal.annotations.VisibleForTesting; 24 25 /** Helper interface for AppFunctionService. */ 26 @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) 27 public interface ServiceHelper { 28 /** 29 * Resolves the AppFunctionService for the target package. 30 * 31 * @param targetPackageName The package name of the target. 32 * @param targetUser The user which the caller is requesting to execute as. 33 * @return The intent to bind to the target service. 34 */ resolveAppFunctionService( @onNull String targetPackageName, @NonNull UserHandle targetUser)35 Intent resolveAppFunctionService( 36 @NonNull String targetPackageName, @NonNull UserHandle targetUser); 37 } 38