blob: 276853d3b860266a1769d55855272351dd03c129 [file] [log] [blame]
Makoto Onuki6f7362d92016-03-04 13:39:41 -08001/*
2 * Copyright (C) 2016 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 */
16package android.content.pm;
17
Sunny Goyala6be88a2017-01-12 16:27:58 -080018import android.content.Intent;
Mehdi Alizadeh406e8b32018-12-11 18:21:49 -080019import android.content.IntentFilter;
Makoto Onuki2d895c32016-12-02 15:48:40 -080020import android.content.IntentSender;
Makoto Onuki6f7362d92016-03-04 13:39:41 -080021import android.content.pm.ParceledListSlice;
22import android.content.pm.ShortcutInfo;
23
24/**
25 * {@hide}
26 */
27interface IShortcutService {
28
29 boolean setDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
30 int userId);
31
32 ParceledListSlice getDynamicShortcuts(String packageName, int userId);
33
Makoto Onuki22fcc682016-05-17 14:52:19 -070034 ParceledListSlice getManifestShortcuts(String packageName, int userId);
35
Makoto Onukib6d35232016-04-04 15:57:17 -070036 boolean addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
37 int userId);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080038
Makoto Onukib6d35232016-04-04 15:57:17 -070039 void removeDynamicShortcuts(String packageName, in List shortcutIds, int userId);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080040
Makoto Onukib6d35232016-04-04 15:57:17 -070041 void removeAllDynamicShortcuts(String packageName, int userId);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080042
43 ParceledListSlice getPinnedShortcuts(String packageName, int userId);
44
45 boolean updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId);
46
Makoto Onuki2d895c32016-12-02 15:48:40 -080047 boolean requestPinShortcut(String packageName, in ShortcutInfo shortcut,
48 in IntentSender resultIntent, int userId);
49
Sunny Goyala6be88a2017-01-12 16:27:58 -080050 Intent createShortcutResultIntent(String packageName, in ShortcutInfo shortcut, int userId);
51
Makoto Onukid6880792016-06-29 13:37:43 -070052 void disableShortcuts(String packageName, in List shortcutIds, CharSequence disabledMessage,
Makoto Onuki20c95f82016-05-11 16:51:01 -070053 int disabledMessageResId, int userId);
54
Makoto Onuki22fcc682016-05-17 14:52:19 -070055 void enableShortcuts(String packageName, in List shortcutIds, int userId);
56
Makoto Onukid6880792016-06-29 13:37:43 -070057 int getMaxShortcutCountPerActivity(String packageName, int userId);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080058
59 int getRemainingCallCount(String packageName, int userId);
60
61 long getRateLimitResetTime(String packageName, int userId);
62
Makoto Onuki55046222016-03-08 10:49:47 -080063 int getIconMaxDimensions(String packageName, int userId);
64
Makoto Onuki20c95f82016-05-11 16:51:01 -070065 void reportShortcutUsed(String packageName, String shortcutId, int userId);
66
Makoto Onuki6f7362d92016-03-04 13:39:41 -080067 void resetThrottling(); // system only API for developer opsions
Makoto Onuki9da23fc2016-03-29 11:14:42 -070068
Makoto Onuki4d36b3a2016-04-27 12:00:17 -070069 void onApplicationActive(String packageName, int userId); // system only API for sysUI
70
Makoto Onuki9da23fc2016-03-29 11:14:42 -070071 byte[] getBackupPayload(int user);
72
73 void applyRestore(in byte[] payload, int user);
Makoto Onuki2d895c32016-12-02 15:48:40 -080074
Sunny Goyal7f7372a2017-01-24 11:53:54 -080075 boolean isRequestPinItemSupported(int user, int requestType);
Mehdi Alizadeh406e8b32018-12-11 18:21:49 -080076
77 // System API used by framework's ShareSheet (ChooserActivity)
78 ParceledListSlice getShareTargets(String packageName, in IntentFilter filter, int userId);
Mehdi Alizadeh85fd3d52019-01-23 12:49:53 -080079
80 boolean hasShareTargets(String packageName, String packageToCheck, int userId);
Makoto Onuki6f7362d92016-03-04 13:39:41 -080081}