blob: ba7710b8ef48ab28c443c0ff68cddaff0a42b25b [file] [log] [blame]
Amith Yamasani4f582632014-02-19 14:31:52 -08001/**
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
Makoto Onuki1a342742018-04-26 14:56:59 -070019import android.app.IApplicationThread;
Amith Yamasani4f582632014-02-19 14:31:52 -080020import android.content.ComponentName;
21import android.content.Intent;
Sunny Goyala6be88a2017-01-12 16:27:58 -080022import android.content.IntentSender;
Sunny Goyal45d3e972016-03-31 12:38:17 -070023import android.content.pm.ActivityInfo;
Kenny Guy77242752016-01-15 13:29:06 +000024import android.content.pm.ApplicationInfo;
Amith Yamasani4f582632014-02-19 14:31:52 -080025import android.content.pm.IOnAppsChangedListener;
Sunny Goyal6cbc2fe2015-11-24 09:34:20 -080026import android.content.pm.ParceledListSlice;
Amith Yamasani4f582632014-02-19 14:31:52 -080027import android.content.pm.ResolveInfo;
Makoto Onuki6f7362d92016-03-04 13:39:41 -080028import android.content.pm.ShortcutInfo;
Amith Yamasani4f582632014-02-19 14:31:52 -080029import android.graphics.Rect;
30import android.os.Bundle;
31import android.os.UserHandle;
Makoto Onuki55046222016-03-08 10:49:47 -080032import android.os.ParcelFileDescriptor;
33
Amith Yamasani4f582632014-02-19 14:31:52 -080034import java.util.List;
35
36/**
37 * {@hide}
38 */
39interface ILauncherApps {
Makoto Onuki4dbe0de2016-03-14 17:31:49 -070040 void addOnAppsChangedListener(String callingPackage, in IOnAppsChangedListener listener);
Amith Yamasani4f582632014-02-19 14:31:52 -080041 void removeOnAppsChangedListener(in IOnAppsChangedListener listener);
Makoto Onuki3a2541e2017-01-24 09:00:15 -080042 ParceledListSlice getLauncherActivities(
43 String callingPackage, String packageName, in UserHandle user);
44 ActivityInfo resolveActivity(
45 String callingPackage, in ComponentName component, in UserHandle user);
Makoto Onuki1a342742018-04-26 14:56:59 -070046 void startActivityAsUser(in IApplicationThread caller, String callingPackage,
Makoto Onuki3a2541e2017-01-24 09:00:15 -080047 in ComponentName component, in Rect sourceBounds,
Amith Yamasani4f582632014-02-19 14:31:52 -080048 in Bundle opts, in UserHandle user);
Makoto Onuki1a342742018-04-26 14:56:59 -070049 void showAppDetailsAsUser(in IApplicationThread caller,
Makoto Onuki3a2541e2017-01-24 09:00:15 -080050 String callingPackage, in ComponentName component, in Rect sourceBounds,
Kenny Guy466d2032014-07-23 12:23:35 +010051 in Bundle opts, in UserHandle user);
Makoto Onuki3a2541e2017-01-24 09:00:15 -080052 boolean isPackageEnabled(String callingPackage, String packageName, in UserHandle user);
Suprabh Shukla19b41f32018-03-26 22:35:13 -070053 Bundle getSuspendedPackageLauncherExtras(String packageName, in UserHandle user);
Makoto Onuki3a2541e2017-01-24 09:00:15 -080054 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 Onuki6f7362d92016-03-04 13:39:41 -080058
59 ParceledListSlice getShortcuts(String callingPackage, long changedSince, String packageName,
Makoto Onuki99302b52017-03-29 12:42:26 -070060 in List shortcutIds, in ComponentName componentName, int flags, in UserHandle user);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080061 void pinShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
62 in UserHandle user);
Makoto Onuki83f6d2d2016-07-11 14:30:19 -070063 boolean startShortcut(String callingPackage, String packageName, String id,
Makoto Onukiabe84422016-04-07 09:41:19 -070064 in Rect sourceBounds, in Bundle startActivityOptions, int userId);
Makoto Onuki55046222016-03-08 10:49:47 -080065
Makoto Onukiabe84422016-04-07 09:41:19 -070066 int getShortcutIconResId(String callingPackage, String packageName, String id,
67 int userId);
68 ParcelFileDescriptor getShortcutIconFd(String callingPackage, String packageName, String id,
69 int userId);
Makoto Onuki2d5b4652016-03-11 16:09:54 -080070
71 boolean hasShortcutHostPermission(String callingPackage);
Sunny Goyala6be88a2017-01-12 16:27:58 -080072
Makoto Onuki3a2541e2017-01-24 09:00:15 -080073 ParceledListSlice getShortcutConfigActivities(
74 String callingPackage, String packageName, in UserHandle user);
Sunny Goyala6be88a2017-01-12 16:27:58 -080075 IntentSender getShortcutConfigActivityIntent(String callingPackage, in ComponentName component,
76 in UserHandle user);
Amith Yamasani4f582632014-02-19 14:31:52 -080077}