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