Debian Codegraph @

core/java/android/content/pm/ILauncherApps.aidl

raw
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
19 import android.app.IApplicationThread;
20 import android.app.PendingIntent;
21 import android.content.ComponentName;
22 import android.content.Intent;
23 import android.content.IntentSender;
24 import android.content.LocusId;
25 import android.content.pm.ApplicationInfo;
26 import android.content.pm.IOnAppsChangedListener;
27 import android.content.pm.LauncherActivityInfoInternal;
28 import android.content.pm.LauncherApps;
29 import android.content.pm.ShortcutQueryWrapper;
30 import android.content.pm.IPackageInstallerCallback;
31 import android.content.pm.IShortcutChangeCallback;
32 import android.content.pm.PackageInstaller;
33 import android.content.pm.ParceledListSlice;
34 import android.content.pm.ResolveInfo;
35 import android.content.pm.ShortcutInfo;
36 import android.graphics.Rect;
37 import android.os.Bundle;
38 import android.os.UserHandle;
39 import android.os.ParcelFileDescriptor;
40
41 import com.android.internal.infra.AndroidFuture;
42
43 import java.util.List;
44
45 /**
46 * {@hide}
47 */
48 interface ILauncherApps {
49 void addOnAppsChangedListener(String callingPackage, in IOnAppsChangedListener listener);
50 void removeOnAppsChangedListener(in IOnAppsChangedListener listener);
51 ParceledListSlice getLauncherActivities(
52 String callingPackage, String packageName, in UserHandle user);
53 LauncherActivityInfoInternal resolveLauncherActivityInternal(
54 String callingPackage, in ComponentName component, in UserHandle user);
55 void startSessionDetailsActivityAsUser(in IApplicationThread caller, String callingPackage,
56 String callingFeatureId, in PackageInstaller.SessionInfo sessionInfo,
57 in Rect sourceBounds, in Bundle opts, in UserHandle user);
58 void startActivityAsUser(in IApplicationThread caller, String callingPackage,
59 String callingFeatureId, in ComponentName component, in Rect sourceBounds,
60 in Bundle opts, in UserHandle user);
61 PendingIntent getActivityLaunchIntent(String callingPackage, in ComponentName component,
62 in UserHandle user);
63 void showAppDetailsAsUser(in IApplicationThread caller, String callingPackage,
64 String callingFeatureId, in ComponentName component, in Rect sourceBounds,
65 in Bundle opts, in UserHandle user);
66 boolean isPackageEnabled(String callingPackage, String packageName, in UserHandle user);
67 Bundle getSuspendedPackageLauncherExtras(String packageName, in UserHandle user);
68 boolean isActivityEnabled(
69 String callingPackage, in ComponentName component, in UserHandle user);
70 ApplicationInfo getApplicationInfo(
71 String callingPackage, String packageName, int flags, in UserHandle user);
72
73 LauncherApps.AppUsageLimit getAppUsageLimit(String callingPackage, String packageName,
74 in UserHandle user);
75
76 ParceledListSlice getShortcuts(String callingPackage, in ShortcutQueryWrapper query,
77 in UserHandle user);
78 void getShortcutsAsync(String callingPackage, in ShortcutQueryWrapper query,
79 in UserHandle user, in AndroidFuture<List<ShortcutInfo>> cb);
80 void pinShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
81 in UserHandle user);
82 boolean startShortcut(String callingPackage, String packageName, String featureId, String id,
83 in Rect sourceBounds, in Bundle startActivityOptions, int userId);
84
85 int getShortcutIconResId(String callingPackage, String packageName, String id,
86 int userId);
87 ParcelFileDescriptor getShortcutIconFd(String callingPackage, String packageName, String id,
88 int userId);
89
90 boolean hasShortcutHostPermission(String callingPackage);
91 boolean shouldHideFromSuggestions(String packageName, in UserHandle user);
92
93 ParceledListSlice getShortcutConfigActivities(
94 String callingPackage, String packageName, in UserHandle user);
95 IntentSender getShortcutConfigActivityIntent(String callingPackage, in ComponentName component,
96 in UserHandle user);
97 PendingIntent getShortcutIntent(String callingPackage, String packageName, String shortcutId,
98 in Bundle opts, in UserHandle user);
99
100 // Unregister is performed using package installer
101 void registerPackageInstallerCallback(String callingPackage,
102 in IPackageInstallerCallback callback);
103 ParceledListSlice getAllSessions(String callingPackage);
104
105 void registerShortcutChangeCallback(String callingPackage, in ShortcutQueryWrapper query,
106 in IShortcutChangeCallback callback);
107 void unregisterShortcutChangeCallback(String callingPackage,
108 in IShortcutChangeCallback callback);
109
110 void cacheShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
111 in UserHandle user, int cacheFlags);
112 void uncacheShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
113 in UserHandle user, int cacheFlags);
114
115 String getShortcutIconUri(String callingPackage, String packageName, String shortcutId,
116 int userId);
117 }