1 /* 2 * Copyright (C) 2017 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 package android.view.autofill; 17 18 import android.annotation.NonNull; 19 import android.annotation.Nullable; 20 import android.annotation.UserIdInt; 21 import android.content.AutofillOptions; 22 23 /** 24 * Autofill Manager local system service interface. 25 * 26 * @hide Only for use within the system server. 27 */ 28 public abstract class AutofillManagerInternal { 29 30 /** 31 * Notifies the manager that the back key was pressed. 32 */ onBackKeyPressed()33 public abstract void onBackKeyPressed(); 34 35 /** 36 * Gets autofill options for a package. 37 * 38 * <p><b>NOTE: </b>this method is called by the {@code ActivityManager} service and hence cannot 39 * hold the main service lock. 40 * 41 * @param packageName The package for which to query. 42 * @param versionCode The package version code. 43 * @param userId The user id for which to query. 44 */ 45 @Nullable getAutofillOptions(@onNull String packageName, long versionCode, @UserIdInt int userId)46 public abstract AutofillOptions getAutofillOptions(@NonNull String packageName, 47 long versionCode, @UserIdInt int userId); 48 49 /** 50 * Checks whether the given {@code uid} owns the 51 * {@link android.service.autofill.augmented.AugmentedAutofillService} implementation associated 52 * with the given {@code userId}. 53 */ isAugmentedAutofillServiceForUser(@onNull int callingUid, @UserIdInt int userId)54 public abstract boolean isAugmentedAutofillServiceForUser(@NonNull int callingUid, 55 @UserIdInt int userId); 56 } 57