blob: 8e840796e953f0afdc4a705d6492c30f2b87c596 [file] [log] [blame]
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -07001/*
2 * Copyright (C) 2014 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
17package android.content.pm;
18
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -070019import android.content.pm.IPackageDeleteObserver2;
Jeff Sharkey16c8e3f2014-07-24 17:08:17 -070020import android.content.pm.IPackageInstallerCallback;
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070021import android.content.pm.IPackageInstallerSession;
Jeff Sharkeya0907432014-08-15 10:23:11 -070022import android.content.pm.PackageInstaller;
Jeff Sharkey97d47ed2014-10-15 09:19:47 -070023import android.content.pm.ParceledListSlice;
Svet Ganov67882122016-12-11 16:36:34 -080024import android.content.pm.VersionedPackage;
Jeff Sharkeya0907432014-08-15 10:23:11 -070025import android.content.IntentSender;
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070026
Jeff Sharkeyec9bad22014-09-05 09:45:20 -070027import android.graphics.Bitmap;
28
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070029/** {@hide} */
30interface IPackageInstaller {
Jeff Sharkeya0907432014-08-15 10:23:11 -070031 int createSession(in PackageInstaller.SessionParams params, String installerPackageName, int userId);
Jeff Sharkeyec9bad22014-09-05 09:45:20 -070032
33 void updateSessionAppIcon(int sessionId, in Bitmap appIcon);
34 void updateSessionAppLabel(int sessionId, String appLabel);
35
Jeff Sharkey381d94b2014-08-24 14:45:56 -070036 void abandonSession(int sessionId);
37
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070038 IPackageInstallerSession openSession(int sessionId);
39
Jeff Sharkeya0907432014-08-15 10:23:11 -070040 PackageInstaller.SessionInfo getSessionInfo(int sessionId);
Jeff Sharkeyec9bad22014-09-05 09:45:20 -070041
Jeff Sharkey97d47ed2014-10-15 09:19:47 -070042 ParceledListSlice getAllSessions(int userId);
43 ParceledListSlice getMySessions(String installerPackageName, int userId);
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070044
Dario Freniaac4ba42018-12-06 15:47:16 +000045 ParceledListSlice getStagedSessions();
46
Jeff Sharkey16c8e3f2014-07-24 17:08:17 -070047 void registerCallback(IPackageInstallerCallback callback, int userId);
48 void unregisterCallback(IPackageInstallerCallback callback);
Jeff Sharkeybb580672014-07-10 12:10:25 -070049
Andrei Oneaf650e3c2019-02-25 13:15:54 +000050 @UnsupportedAppUsage
Svet Ganov67882122016-12-11 16:36:34 -080051 void uninstall(in VersionedPackage versionedPackage, String callerPackageName, int flags,
Benjamin Franz39fb7fd2015-02-18 16:11:18 +000052 in IntentSender statusReceiver, int userId);
Jeff Sharkey7328a1b2014-08-07 14:01:43 -070053
Chandan Nathe8e463b2019-01-28 15:23:38 +000054 void installExistingPackage(String packageName, int installFlags, int installReason,
55 in IntentSender statusReceiver, int userId);
56
Jeff Sharkey7328a1b2014-08-07 14:01:43 -070057 void setPermissionsResult(int sessionId, boolean accepted);
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070058}