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