1 /* 2 * Copyright (C) 2021 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.pm; 18 19 import android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.content.IIntentReceiver; 22 import android.os.Bundle; 23 import android.util.SparseArray; 24 25 interface PackageSender { 26 /** 27 * @param userIds User IDs where the action occurred on a full application 28 * @param instantUserIds User IDs where the action occurred on an instant application 29 */ sendPackageBroadcast(String action, String pkg, Bundle extras, int flags, String targetPkg, IIntentReceiver finishedReceiver, int[] userIds, int[] instantUserIds, @Nullable SparseArray<int[]> broadcastAllowList, @Nullable Bundle bOptions)30 void sendPackageBroadcast(String action, String pkg, 31 Bundle extras, int flags, String targetPkg, 32 IIntentReceiver finishedReceiver, int[] userIds, int[] instantUserIds, 33 @Nullable SparseArray<int[]> broadcastAllowList, @Nullable Bundle bOptions); sendPackageAddedForNewUsers(@onNull Computer snapshot, String packageName, boolean sendBootCompleted, boolean includeStopped, int appId, int[] userIds, int[] instantUserIds, int dataLoaderType)34 void sendPackageAddedForNewUsers(@NonNull Computer snapshot, String packageName, 35 boolean sendBootCompleted, boolean includeStopped, int appId, int[] userIds, 36 int[] instantUserIds, int dataLoaderType); notifyPackageAdded(String packageName, int uid)37 void notifyPackageAdded(String packageName, int uid); notifyPackageChanged(String packageName, int uid)38 void notifyPackageChanged(String packageName, int uid); notifyPackageRemoved(String packageName, int uid)39 void notifyPackageRemoved(String packageName, int uid); 40 } 41