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