Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.content.pm; |
| 18 | |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 19 | import android.content.pm.IPackageDeleteObserver2; |
Jeff Sharkey | 16c8e3f | 2014-07-24 17:08:17 -0700 | [diff] [blame] | 20 | import android.content.pm.IPackageInstallerCallback; |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 21 | import android.content.pm.IPackageInstallerSession; |
Jeff Sharkey | a090743 | 2014-08-15 10:23:11 -0700 | [diff] [blame] | 22 | import android.content.pm.PackageInstaller; |
Jeff Sharkey | 97d47ed | 2014-10-15 09:19:47 -0700 | [diff] [blame] | 23 | import android.content.pm.ParceledListSlice; |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 24 | import android.content.pm.VersionedPackage; |
Jeff Sharkey | a090743 | 2014-08-15 10:23:11 -0700 | [diff] [blame] | 25 | import android.content.IntentSender; |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 26 | |
Jeff Sharkey | ec9bad2 | 2014-09-05 09:45:20 -0700 | [diff] [blame] | 27 | import android.graphics.Bitmap; |
| 28 | |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 29 | /** {@hide} */ |
| 30 | interface IPackageInstaller { |
Jeff Sharkey | a090743 | 2014-08-15 10:23:11 -0700 | [diff] [blame] | 31 | int createSession(in PackageInstaller.SessionParams params, String installerPackageName, int userId); |
Jeff Sharkey | ec9bad2 | 2014-09-05 09:45:20 -0700 | [diff] [blame] | 32 | |
| 33 | void updateSessionAppIcon(int sessionId, in Bitmap appIcon); |
| 34 | void updateSessionAppLabel(int sessionId, String appLabel); |
| 35 | |
Jeff Sharkey | 381d94b | 2014-08-24 14:45:56 -0700 | [diff] [blame] | 36 | void abandonSession(int sessionId); |
| 37 | |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 38 | IPackageInstallerSession openSession(int sessionId); |
| 39 | |
Jeff Sharkey | a090743 | 2014-08-15 10:23:11 -0700 | [diff] [blame] | 40 | PackageInstaller.SessionInfo getSessionInfo(int sessionId); |
Jeff Sharkey | ec9bad2 | 2014-09-05 09:45:20 -0700 | [diff] [blame] | 41 | |
Jeff Sharkey | 97d47ed | 2014-10-15 09:19:47 -0700 | [diff] [blame] | 42 | ParceledListSlice getAllSessions(int userId); |
| 43 | ParceledListSlice getMySessions(String installerPackageName, int userId); |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 44 | |
Dario Freni | aac4ba4 | 2018-12-06 15:47:16 +0000 | [diff] [blame] | 45 | ParceledListSlice getStagedSessions(); |
| 46 | |
Jeff Sharkey | 16c8e3f | 2014-07-24 17:08:17 -0700 | [diff] [blame] | 47 | void registerCallback(IPackageInstallerCallback callback, int userId); |
| 48 | void unregisterCallback(IPackageInstallerCallback callback); |
Jeff Sharkey | bb58067 | 2014-07-10 12:10:25 -0700 | [diff] [blame] | 49 | |
Andrei Onea | f650e3c | 2019-02-25 13:15:54 +0000 | [diff] [blame] | 50 | @UnsupportedAppUsage |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 51 | void uninstall(in VersionedPackage versionedPackage, String callerPackageName, int flags, |
Benjamin Franz | 39fb7fd | 2015-02-18 16:11:18 +0000 | [diff] [blame] | 52 | in IntentSender statusReceiver, int userId); |
Jeff Sharkey | 7328a1b | 2014-08-07 14:01:43 -0700 | [diff] [blame] | 53 | |
Chandan Nath | e8e463b | 2019-01-28 15:23:38 +0000 | [diff] [blame] | 54 | void installExistingPackage(String packageName, int installFlags, int installReason, |
Philip P. Moltmann | bfcffa0 | 2019-05-13 17:10:46 -0700 | [diff] [blame^] | 55 | in IntentSender statusReceiver, int userId, in List<String> whiteListedPermissions); |
Chandan Nath | e8e463b | 2019-01-28 15:23:38 +0000 | [diff] [blame] | 56 | |
Jeff Sharkey | 7328a1b | 2014-08-07 14:01:43 -0700 | [diff] [blame] | 57 | void setPermissionsResult(int sessionId, boolean accepted); |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 58 | } |