Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [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 | |
Makoto Onuki | 1a34274 | 2018-04-26 14:56:59 -0700 | [diff] [blame] | 19 | import android.app.IApplicationThread; |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 20 | import android.content.ComponentName; |
| 21 | import android.content.Intent; |
Sunny Goyal | a6be88a | 2017-01-12 16:27:58 -0800 | [diff] [blame] | 22 | import android.content.IntentSender; |
Sunny Goyal | 45d3e97 | 2016-03-31 12:38:17 -0700 | [diff] [blame] | 23 | import android.content.pm.ActivityInfo; |
Kenny Guy | 7724275 | 2016-01-15 13:29:06 +0000 | [diff] [blame] | 24 | import android.content.pm.ApplicationInfo; |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 25 | import android.content.pm.IOnAppsChangedListener; |
Sunny Goyal | 6cbc2fe | 2015-11-24 09:34:20 -0800 | [diff] [blame] | 26 | import android.content.pm.ParceledListSlice; |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 27 | import android.content.pm.ResolveInfo; |
Makoto Onuki | 6f7362d9 | 2016-03-04 13:39:41 -0800 | [diff] [blame] | 28 | import android.content.pm.ShortcutInfo; |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 29 | import android.graphics.Rect; |
| 30 | import android.os.Bundle; |
| 31 | import android.os.UserHandle; |
Makoto Onuki | 5504622 | 2016-03-08 10:49:47 -0800 | [diff] [blame] | 32 | import android.os.ParcelFileDescriptor; |
| 33 | |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 34 | import java.util.List; |
| 35 | |
| 36 | /** |
| 37 | * {@hide} |
| 38 | */ |
| 39 | interface ILauncherApps { |
Makoto Onuki | 4dbe0de | 2016-03-14 17:31:49 -0700 | [diff] [blame] | 40 | void addOnAppsChangedListener(String callingPackage, in IOnAppsChangedListener listener); |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 41 | void removeOnAppsChangedListener(in IOnAppsChangedListener listener); |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 42 | ParceledListSlice getLauncherActivities( |
| 43 | String callingPackage, String packageName, in UserHandle user); |
| 44 | ActivityInfo resolveActivity( |
| 45 | String callingPackage, in ComponentName component, in UserHandle user); |
Makoto Onuki | 1a34274 | 2018-04-26 14:56:59 -0700 | [diff] [blame] | 46 | void startActivityAsUser(in IApplicationThread caller, String callingPackage, |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 47 | in ComponentName component, in Rect sourceBounds, |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 48 | in Bundle opts, in UserHandle user); |
Makoto Onuki | 1a34274 | 2018-04-26 14:56:59 -0700 | [diff] [blame] | 49 | void showAppDetailsAsUser(in IApplicationThread caller, |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 50 | String callingPackage, in ComponentName component, in Rect sourceBounds, |
Kenny Guy | 466d203 | 2014-07-23 12:23:35 +0100 | [diff] [blame] | 51 | in Bundle opts, in UserHandle user); |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 52 | boolean isPackageEnabled(String callingPackage, String packageName, in UserHandle user); |
Suprabh Shukla | 19b41f3 | 2018-03-26 22:35:13 -0700 | [diff] [blame] | 53 | Bundle getSuspendedPackageLauncherExtras(String packageName, in UserHandle user); |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 54 | boolean isActivityEnabled( |
| 55 | String callingPackage, in ComponentName component, in UserHandle user); |
| 56 | ApplicationInfo getApplicationInfo( |
| 57 | String callingPackage, String packageName, int flags, in UserHandle user); |
Makoto Onuki | 6f7362d9 | 2016-03-04 13:39:41 -0800 | [diff] [blame] | 58 | |
| 59 | ParceledListSlice getShortcuts(String callingPackage, long changedSince, String packageName, |
Makoto Onuki | 99302b5 | 2017-03-29 12:42:26 -0700 | [diff] [blame] | 60 | in List shortcutIds, in ComponentName componentName, int flags, in UserHandle user); |
Makoto Onuki | 6f7362d9 | 2016-03-04 13:39:41 -0800 | [diff] [blame] | 61 | void pinShortcuts(String callingPackage, String packageName, in List<String> shortcutIds, |
| 62 | in UserHandle user); |
Makoto Onuki | 83f6d2d | 2016-07-11 14:30:19 -0700 | [diff] [blame] | 63 | boolean startShortcut(String callingPackage, String packageName, String id, |
Makoto Onuki | abe8442 | 2016-04-07 09:41:19 -0700 | [diff] [blame] | 64 | in Rect sourceBounds, in Bundle startActivityOptions, int userId); |
Makoto Onuki | 5504622 | 2016-03-08 10:49:47 -0800 | [diff] [blame] | 65 | |
Makoto Onuki | abe8442 | 2016-04-07 09:41:19 -0700 | [diff] [blame] | 66 | int getShortcutIconResId(String callingPackage, String packageName, String id, |
| 67 | int userId); |
| 68 | ParcelFileDescriptor getShortcutIconFd(String callingPackage, String packageName, String id, |
| 69 | int userId); |
Makoto Onuki | 2d5b465 | 2016-03-11 16:09:54 -0800 | [diff] [blame] | 70 | |
| 71 | boolean hasShortcutHostPermission(String callingPackage); |
Sunny Goyal | a6be88a | 2017-01-12 16:27:58 -0800 | [diff] [blame] | 72 | |
Makoto Onuki | 3a2541e | 2017-01-24 09:00:15 -0800 | [diff] [blame] | 73 | ParceledListSlice getShortcutConfigActivities( |
| 74 | String callingPackage, String packageName, in UserHandle user); |
Sunny Goyal | a6be88a | 2017-01-12 16:27:58 -0800 | [diff] [blame] | 75 | IntentSender getShortcutConfigActivityIntent(String callingPackage, in ComponentName component, |
| 76 | in UserHandle user); |
Amith Yamasani | 4f58263 | 2014-02-19 14:31:52 -0800 | [diff] [blame] | 77 | } |