• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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  */
16 package android.content.pm;
17 
18 import android.content.Intent;
19 import android.content.IntentFilter;
20 import android.content.IntentSender;
21 import android.content.pm.ParceledListSlice;
22 import android.content.pm.ShortcutInfo;
23 
24 /** {@hide} */
25 interface IShortcutService {
26 
setDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList, int userId)27     boolean setDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
28             int userId);
29 
addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList, int userId)30     boolean addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
31             int userId);
32 
removeDynamicShortcuts(String packageName, in List<String> shortcutIds, int userId)33     void removeDynamicShortcuts(String packageName, in List<String> shortcutIds, int userId);
34 
removeAllDynamicShortcuts(String packageName, int userId)35     void removeAllDynamicShortcuts(String packageName, int userId);
36 
updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId)37     boolean updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId);
38 
requestPinShortcut(String packageName, in ShortcutInfo shortcut, in IntentSender resultIntent, int userId)39     boolean requestPinShortcut(String packageName, in ShortcutInfo shortcut,
40             in IntentSender resultIntent, int userId);
41 
createShortcutResultIntent(String packageName, in ShortcutInfo shortcut, int userId)42     Intent createShortcutResultIntent(String packageName, in ShortcutInfo shortcut,
43             int userId);
44 
disableShortcuts(String packageName, in List<String> shortcutIds, CharSequence disabledMessage, int disabledMessageResId, int userId)45     void disableShortcuts(String packageName, in List<String> shortcutIds,
46             CharSequence disabledMessage, int disabledMessageResId, int userId);
47 
enableShortcuts(String packageName, in List<String> shortcutIds, int userId)48     void enableShortcuts(String packageName, in List<String> shortcutIds, int userId);
49 
getMaxShortcutCountPerActivity(String packageName, int userId)50     int getMaxShortcutCountPerActivity(String packageName, int userId);
51 
getRemainingCallCount(String packageName, int userId)52     int getRemainingCallCount(String packageName, int userId);
53 
getRateLimitResetTime(String packageName, int userId)54     long getRateLimitResetTime(String packageName, int userId);
55 
getIconMaxDimensions(String packageName, int userId)56     int getIconMaxDimensions(String packageName, int userId);
57 
reportShortcutUsed(String packageName, String shortcutId, int userId)58     void reportShortcutUsed(String packageName, String shortcutId, int userId);
59 
resetThrottling()60     void resetThrottling(); // system only API for developer opsions
61 
onApplicationActive(String packageName, int userId)62     oneway void onApplicationActive(String packageName, int userId); // system only API for sysUI
63 
getBackupPayload(int user)64     byte[] getBackupPayload(int user);
65 
applyRestore(in byte[] payload, int user)66     void applyRestore(in byte[] payload, int user);
67 
isRequestPinItemSupported(int user, int requestType)68     boolean isRequestPinItemSupported(int user, int requestType);
69 
70     // System API used by framework's ShareSheet (ChooserActivity)
getShareTargets(String packageName, in IntentFilter filter, int userId)71     ParceledListSlice getShareTargets(String packageName, in IntentFilter filter, int userId);
72 
hasShareTargets(String packageName, String packageToCheck, int userId)73     boolean hasShareTargets(String packageName, String packageToCheck, int userId);
74 
removeLongLivedShortcuts(String packageName, in List<String> shortcutIds, int userId)75     void removeLongLivedShortcuts(String packageName, in List<String> shortcutIds, int userId);
76 
getShortcuts(String packageName, int matchFlags, int userId)77     ParceledListSlice getShortcuts(String packageName, int matchFlags, int userId);
78 
pushDynamicShortcut(String packageName, in ShortcutInfo shortcut, int userId)79     void pushDynamicShortcut(String packageName, in ShortcutInfo shortcut, int userId);
80 }
81