• 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.pm.ParceledListSlice;
19 import android.content.pm.ShortcutInfo;
20 
21 /**
22  * {@hide}
23  */
24 interface IShortcutService {
25 
setDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList, int userId)26     boolean setDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
27             int userId);
28 
getDynamicShortcuts(String packageName, int userId)29     ParceledListSlice getDynamicShortcuts(String packageName, int userId);
30 
getManifestShortcuts(String packageName, int userId)31     ParceledListSlice getManifestShortcuts(String packageName, int userId);
32 
addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList, int userId)33     boolean addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
34             int userId);
35 
removeDynamicShortcuts(String packageName, in List shortcutIds, int userId)36     void removeDynamicShortcuts(String packageName, in List shortcutIds, int userId);
37 
removeAllDynamicShortcuts(String packageName, int userId)38     void removeAllDynamicShortcuts(String packageName, int userId);
39 
getPinnedShortcuts(String packageName, int userId)40     ParceledListSlice getPinnedShortcuts(String packageName, int userId);
41 
updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId)42     boolean updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId);
43 
disableShortcuts(String packageName, in List shortcutIds, CharSequence disabledMessage, int disabledMessageResId, int userId)44     void disableShortcuts(String packageName, in List shortcutIds, CharSequence disabledMessage,
45             int disabledMessageResId, int userId);
46 
enableShortcuts(String packageName, in List shortcutIds, int userId)47     void enableShortcuts(String packageName, in List shortcutIds, int userId);
48 
getMaxShortcutCountPerActivity(String packageName, int userId)49     int getMaxShortcutCountPerActivity(String packageName, int userId);
50 
getRemainingCallCount(String packageName, int userId)51     int getRemainingCallCount(String packageName, int userId);
52 
getRateLimitResetTime(String packageName, int userId)53     long getRateLimitResetTime(String packageName, int userId);
54 
getIconMaxDimensions(String packageName, int userId)55     int getIconMaxDimensions(String packageName, int userId);
56 
reportShortcutUsed(String packageName, String shortcutId, int userId)57     void reportShortcutUsed(String packageName, String shortcutId, int userId);
58 
resetThrottling()59     void resetThrottling(); // system only API for developer opsions
60 
onApplicationActive(String packageName, int userId)61     void onApplicationActive(String packageName, int userId); // system only API for sysUI
62 
getBackupPayload(int user)63     byte[] getBackupPayload(int user);
64 
applyRestore(in byte[] payload, int user)65     void applyRestore(in byte[] payload, int user);
66 }