Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 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 | |
| 17 | package android.app; |
| 18 | |
| 19 | import android.app.ActivityManager; |
| 20 | import android.app.ApplicationErrorReport; |
Jing Ji | 8055a3a | 2019-12-17 15:55:33 -0800 | [diff] [blame] | 21 | import android.app.ApplicationExitInfo; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 22 | import android.app.ContentProviderHolder; |
Felipe Leme | 23a0c7a | 2018-01-24 08:43:34 -0800 | [diff] [blame] | 23 | import android.app.GrantedUriPermission; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 24 | import android.app.IApplicationThread; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 25 | import android.app.IActivityController; |
| 26 | import android.app.IAppTask; |
Winson Chung | e210468 | 2017-11-08 17:31:14 -0800 | [diff] [blame] | 27 | import android.app.IAssistDataReceiver; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 28 | import android.app.IInstrumentationWatcher; |
| 29 | import android.app.IProcessObserver; |
| 30 | import android.app.IServiceConnection; |
| 31 | import android.app.IStopUserCallback; |
| 32 | import android.app.ITaskStackListener; |
| 33 | import android.app.IUiAutomationConnection; |
| 34 | import android.app.IUidObserver; |
| 35 | import android.app.IUserSwitchObserver; |
| 36 | import android.app.Notification; |
| 37 | import android.app.PendingIntent; |
Winson Chung | 709904f | 2017-04-25 11:00:48 -0700 | [diff] [blame] | 38 | import android.app.PictureInPictureParams; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 39 | import android.app.ProfilerInfo; |
| 40 | import android.app.WaitResult; |
| 41 | import android.app.assist.AssistContent; |
| 42 | import android.app.assist.AssistStructure; |
| 43 | import android.content.ComponentName; |
| 44 | import android.content.IIntentReceiver; |
| 45 | import android.content.IIntentSender; |
| 46 | import android.content.Intent; |
| 47 | import android.content.IntentFilter; |
| 48 | import android.content.IntentSender; |
| 49 | import android.content.pm.ApplicationInfo; |
| 50 | import android.content.pm.ConfigurationInfo; |
| 51 | import android.content.pm.IPackageDataObserver; |
| 52 | import android.content.pm.ParceledListSlice; |
| 53 | import android.content.pm.ProviderInfo; |
| 54 | import android.content.pm.UserInfo; |
| 55 | import android.content.res.Configuration; |
Yuliya Kamatkova | 48c3807 | 2020-01-09 15:43:25 -0800 | [diff] [blame] | 56 | import android.content.LocusId; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 57 | import android.graphics.Bitmap; |
Jorim Jaggi | 02886a8 | 2016-12-06 09:10:06 -0800 | [diff] [blame] | 58 | import android.graphics.GraphicBuffer; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 59 | import android.graphics.Point; |
| 60 | import android.graphics.Rect; |
| 61 | import android.net.Uri; |
| 62 | import android.os.Bundle; |
| 63 | import android.os.Debug; |
| 64 | import android.os.IBinder; |
| 65 | import android.os.IProgressListener; |
| 66 | import android.os.ParcelFileDescriptor; |
| 67 | import android.os.PersistableBundle; |
Makoto Onuki | 2c6657f | 2018-06-06 15:24:02 -0700 | [diff] [blame] | 68 | import android.os.RemoteCallback; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 69 | import android.os.StrictMode; |
Narayan Kamath | 695cf72 | 2017-12-21 18:32:47 +0000 | [diff] [blame] | 70 | import android.os.WorkSource; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 71 | import android.service.voice.IVoiceInteractionSession; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 72 | import android.view.IRecentsAnimationRunner; |
Jorim Jaggi | f84e2f6 | 2018-01-16 14:17:59 +0100 | [diff] [blame] | 73 | import android.view.RemoteAnimationDefinition; |
Jorim Jaggi | 04dc596 | 2018-01-29 18:54:13 +0100 | [diff] [blame] | 74 | import android.view.RemoteAnimationAdapter; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 75 | import com.android.internal.app.IVoiceInteractor; |
| 76 | import com.android.internal.os.IResultReceiver; |
Jorim Jaggi | 241ae10 | 2016-11-02 21:57:33 -0700 | [diff] [blame] | 77 | import com.android.internal.policy.IKeyguardDismissCallback; |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 78 | |
| 79 | import java.util.List; |
| 80 | |
| 81 | /** |
| 82 | * System private API for talking with the activity manager service. This |
| 83 | * provides calls from the application back to the activity manager. |
| 84 | * |
| 85 | * {@hide} |
| 86 | */ |
| 87 | interface IActivityManager { |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 88 | // WARNING: when these transactions are updated, check if they are any callers on the native |
Sudheer Shanka | 027a33d | 2016-11-23 15:24:51 -0800 | [diff] [blame] | 89 | // side. If so, make sure they are using the correct transaction ids and arguments. |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 90 | // If a transaction which will also be used on the native side is being inserted, add it to |
| 91 | // below block of transactions. |
| 92 | |
Sudheer Shanka | 027a33d | 2016-11-23 15:24:51 -0800 | [diff] [blame] | 93 | // Since these transactions are also called from native code, these must be kept in sync with |
Peter Visontay | cee7632 | 2017-09-05 11:43:36 +0100 | [diff] [blame] | 94 | // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 95 | // =============== Beginning of transactions used on native side as well ====================== |
| 96 | ParcelFileDescriptor openContentUri(in String uriString); |
Svet Ganov | 14ab967 | 2017-11-22 18:49:32 -0800 | [diff] [blame] | 97 | void registerUidObserver(in IUidObserver observer, int which, int cutpoint, |
| 98 | String callingPackage); |
| 99 | void unregisterUidObserver(in IUidObserver observer); |
Svet Ganov | 0c1c9cd | 2018-03-25 13:14:47 -0700 | [diff] [blame] | 100 | boolean isUidActive(int uid, String callingPackage); |
Eric Laurent | 25f2eac | 2018-10-18 14:58:22 -0700 | [diff] [blame] | 101 | int getUidProcessState(int uid, in String callingPackage); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 102 | // =============== End of transactions used on native side as well ============================ |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 103 | |
| 104 | // Special low-level communication with activity manager. |
| 105 | void handleApplicationCrash(in IBinder app, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 106 | in ApplicationErrorReport.ParcelableCrashInfo crashInfo); |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 107 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 108 | int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent, |
| 109 | in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 110 | int flags, in ProfilerInfo profilerInfo, in Bundle options); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 111 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 112 | void unhandledBack(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 113 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 114 | boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask); |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 115 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 116 | Intent registerReceiver(in IApplicationThread caller, in String callerPackage, |
| 117 | in IIntentReceiver receiver, in IntentFilter filter, |
Chad Brubaker | 6d6015f | 2017-04-18 11:25:16 -0700 | [diff] [blame] | 118 | in String requiredPermission, int userId, int flags); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 119 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 120 | void unregisterReceiver(in IIntentReceiver receiver); |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 121 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 122 | int broadcastIntent(in IApplicationThread caller, in Intent intent, |
| 123 | in String resolvedType, in IIntentReceiver resultTo, int resultCode, |
| 124 | in String resultData, in Bundle map, in String[] requiredPermissions, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 125 | int appOp, in Bundle options, boolean serialized, boolean sticky, int userId); |
| 126 | void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId); |
Artur Satayev | 751e551 | 2019-11-15 19:12:49 +0000 | [diff] [blame] | 127 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 128 | oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 129 | boolean abortBroadcast, int flags); |
Sudheer Shanka | f669010 | 2017-10-16 10:20:32 -0700 | [diff] [blame] | 130 | void attachApplication(in IApplicationThread app, long startSeq); |
Winson Chung | 61c9e5a | 2017-10-11 10:39:32 -0700 | [diff] [blame] | 131 | List<ActivityManager.RunningTaskInfo> getTasks(int maxNum); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 132 | @UnsupportedAppUsage |
Winson Chung | 61c9e5a | 2017-10-11 10:39:32 -0700 | [diff] [blame] | 133 | List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType, |
| 134 | int ignoreWindowingMode); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 135 | @UnsupportedAppUsage |
Ricky Wai | aca8a77 | 2019-04-04 16:01:06 +0100 | [diff] [blame] | 136 | void moveTaskToFront(in IApplicationThread caller, in String callingPackage, int task, |
| 137 | int flags, in Bundle options); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 138 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 139 | int getTaskForActivity(in IBinder token, in boolean onlyRoot); |
Dianne Hackborn | 24bbe58 | 2018-12-17 11:58:31 -0800 | [diff] [blame] | 140 | ContentProviderHolder getContentProvider(in IApplicationThread caller, in String callingPackage, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 141 | in String name, int userId, boolean stable); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 142 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 143 | void publishContentProviders(in IApplicationThread caller, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 144 | in List<ContentProviderHolder> providers); |
| 145 | boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 146 | PendingIntent getRunningServiceControlPanel(in ComponentName service); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 147 | ComponentName startService(in IApplicationThread caller, in Intent service, |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 148 | in String resolvedType, boolean requireForeground, in String callingPackage, int userId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 149 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 150 | int stopService(in IApplicationThread caller, in Intent service, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 151 | in String resolvedType, int userId); |
Dianne Hackborn | 27b4d94 | 2018-11-12 15:01:40 -0800 | [diff] [blame] | 152 | // Currently keeping old bindService because it is on the greylist |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 153 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 154 | int bindService(in IApplicationThread caller, in IBinder token, in Intent service, |
| 155 | in String resolvedType, in IServiceConnection connection, int flags, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 156 | in String callingPackage, int userId); |
Dianne Hackborn | 27b4d94 | 2018-11-12 15:01:40 -0800 | [diff] [blame] | 157 | int bindIsolatedService(in IApplicationThread caller, in IBinder token, in Intent service, |
| 158 | in String resolvedType, in IServiceConnection connection, int flags, |
| 159 | in String instanceName, in String callingPackage, int userId); |
Dianne Hackborn | a631d56 | 2018-11-20 15:58:15 -0800 | [diff] [blame] | 160 | void updateServiceGroup(in IServiceConnection connection, int group, int importance); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 161 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 162 | boolean unbindService(in IServiceConnection connection); |
| 163 | void publishService(in IBinder token, in Intent intent, in IBinder service); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 164 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 165 | void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent); |
Andreas Gampe | 5b495d5 | 2018-01-22 15:15:54 -0800 | [diff] [blame] | 166 | void setAgentApp(in String packageName, @nullable String agent); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 167 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 168 | void setAlwaysFinish(boolean enabled); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 169 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 170 | boolean startInstrumentation(in ComponentName className, in String profileFile, |
| 171 | int flags, in Bundle arguments, in IInstrumentationWatcher watcher, |
| 172 | in IUiAutomationConnection connection, int userId, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 173 | in String abiOverride); |
Dianne Hackborn | 3404173 | 2017-01-31 15:27:13 -0800 | [diff] [blame] | 174 | void addInstrumentationResults(in IApplicationThread target, in Bundle results); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 175 | void finishInstrumentation(in IApplicationThread target, int resultCode, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 176 | in Bundle results); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 177 | /** |
| 178 | * @return A copy of global {@link Configuration}, contains general settings for the entire |
| 179 | * system. Corresponds to the configuration of the default display. |
| 180 | * @throws RemoteException |
| 181 | */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 182 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 183 | Configuration getConfiguration(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 184 | /** |
| 185 | * Updates global configuration and applies changes to the entire system. |
| 186 | * @param values Update values for global configuration. If null is passed it will request the |
| 187 | * Window Manager to compute new config for the default display. |
| 188 | * @throws RemoteException |
| 189 | * @return Returns true if the configuration was updated. |
| 190 | */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 191 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 192 | boolean updateConfiguration(in Configuration values); |
Shuo Qian | b9c9bfa | 2020-01-08 17:59:42 -0800 | [diff] [blame] | 193 | /** |
| 194 | * Updates mcc mnc configuration and applies changes to the entire system. |
| 195 | * |
| 196 | * @param mcc mcc configuration to update. |
| 197 | * @param mnc mnc configuration to update. |
| 198 | * @throws RemoteException; IllegalArgumentException if mcc or mnc is null. |
| 199 | * @return Returns {@code true} if the configuration was updated; |
| 200 | * {@code false} otherwise. |
| 201 | */ |
| 202 | boolean updateMccMncConfiguration(in String mcc, in String mnc); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 203 | boolean stopServiceToken(in ComponentName className, in IBinder token, int startId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 204 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 205 | void setProcessLimit(int max); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 206 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 207 | int getProcessLimit(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 208 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 209 | int checkPermission(in String permission, int pid, int uid); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 210 | int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 211 | in IBinder callerToken); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 212 | void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 213 | int mode, int userId); |
Dianne Hackborn | a47223f | 2017-03-30 13:49:13 -0700 | [diff] [blame] | 214 | void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri, |
| 215 | int mode, int userId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 216 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 217 | void setActivityController(in IActivityController watcher, boolean imAMonkey); |
| 218 | void showWaitingForDebugger(in IApplicationThread who, boolean waiting); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 219 | /* |
| 220 | * This will deliver the specified signal to all the persistent processes. Currently only |
| 221 | * SIGUSR1 is delivered. All others are ignored. |
| 222 | */ |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 223 | void signalPersistentProcesses(int signal); |
Winson Chung | 5fa3975 | 2017-10-04 14:50:15 -0700 | [diff] [blame] | 224 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 225 | @UnsupportedAppUsage |
Winson Chung | 5fa3975 | 2017-10-04 14:50:15 -0700 | [diff] [blame] | 226 | ParceledListSlice getRecentTasks(int maxNum, int flags, int userId); |
Artur Satayev | 751e551 | 2019-11-15 19:12:49 +0000 | [diff] [blame] | 227 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 228 | oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res); |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 229 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 230 | IIntentSender getIntentSender(int type, in String packageName, in IBinder token, |
| 231 | in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 232 | int flags, in Bundle options, int userId); |
| 233 | void cancelIntentSender(in IIntentSender sender); |
| 234 | String getPackageForIntentSender(in IIntentSender sender); |
Dianne Hackborn | f66adfd | 2017-04-13 11:01:48 -0700 | [diff] [blame] | 235 | void registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver); |
| 236 | void unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 237 | void enterSafeMode(); |
Narayan Kamath | 695cf72 | 2017-12-21 18:32:47 +0000 | [diff] [blame] | 238 | void noteWakeupAlarm(in IIntentSender sender, in WorkSource workSource, int sourceUid, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 239 | in String sourcePkg, in String tag); |
Riddle Hsu | 4e8e3b0 | 2019-04-12 17:37:10 +0800 | [diff] [blame] | 240 | oneway void removeContentProvider(in IBinder connection, boolean stable); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 241 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 242 | void setRequestedOrientation(in IBinder token, int requestedOrientation); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 243 | void unbindFinished(in IBinder token, in Intent service, boolean doRebind); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 244 | @UnsupportedAppUsage |
Dianne Hackborn | f965f40 | 2017-05-04 23:27:23 -0700 | [diff] [blame] | 245 | void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason); |
Sudheer Shanka | c9d9407 | 2017-02-22 22:13:55 +0000 | [diff] [blame] | 246 | void setServiceForeground(in ComponentName className, in IBinder token, |
Hui Yu | 2d4207f | 2019-01-22 15:32:20 -0800 | [diff] [blame] | 247 | int id, in Notification notification, int flags, int foregroundServiceType); |
Hui Yu | fb72b99 | 2019-02-20 10:04:07 -0800 | [diff] [blame] | 248 | int getForegroundServiceType(in ComponentName className, in IBinder token); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 249 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 250 | boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 251 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 252 | void getMemoryInfo(out ActivityManager.MemoryInfo outInfo); |
| 253 | List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState(); |
Christopher Tate | 1d99c39 | 2017-12-07 16:54:04 -0800 | [diff] [blame] | 254 | boolean clearApplicationUserData(in String packageName, boolean keepState, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 255 | in IPackageDataObserver observer, int userId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 256 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 257 | void forceStopPackage(in String packageName, int userId); |
| 258 | boolean killPids(in int[] pids, in String reason, boolean secure); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 259 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 260 | List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 261 | // Retrieve running application processes in the system |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 262 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 263 | List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses(); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 264 | IBinder peekService(in Intent service, in String resolvedType, in String callingPackage); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 265 | // Turn on/off profiling in a particular process. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 266 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 267 | boolean profileControl(in String process, int userId, boolean start, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 268 | in ProfilerInfo profilerInfo, int profileType); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 269 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 270 | boolean shutdown(int timeout); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 271 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 272 | void stopAppSwitches(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 273 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 274 | void resumeAppSwitches(); |
Annie Meng | d582787 | 2019-01-30 20:28:57 +0000 | [diff] [blame] | 275 | boolean bindBackupAgent(in String packageName, int backupRestoreMode, int targetUserId); |
| 276 | void backupAgentCreated(in String packageName, in IBinder agent, int userId); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 277 | void unbindBackupAgent(in ApplicationInfo appInfo); |
| 278 | int getUidForIntentSender(in IIntentSender sender); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 279 | int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 280 | boolean requireFull, in String name, in String callerPackage); |
| 281 | void addPackageDependency(in String packageName); |
| 282 | void killApplication(in String pkg, int appId, int userId, in String reason); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 283 | @UnsupportedAppUsage |
Winson Chung | 84deaa2 | 2017-11-02 15:57:28 -0700 | [diff] [blame] | 284 | void closeSystemDialogs(in String reason); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 285 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 286 | Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids); |
| 287 | void killApplicationProcess(in String processName, int uid); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 288 | // Special low-level communication with activity manager. |
| 289 | boolean handleApplicationWtf(in IBinder app, in String tag, boolean system, |
Makoto Onuki | 83679a6 | 2020-01-29 14:39:53 -0800 | [diff] [blame] | 290 | in ApplicationErrorReport.ParcelableCrashInfo crashInfo, int immediateCallerPid); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 291 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 292 | void killBackgroundProcesses(in String packageName, int userId); |
| 293 | boolean isUserAMonkey(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 294 | // Retrieve info of applications installed on external media that are currently |
| 295 | // running. |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 296 | List<ApplicationInfo> getRunningExternalApplications(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 297 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 298 | void finishHeavyWeightApp(); |
Jeff Sharkey | 3ac2a43 | 2018-06-26 10:52:48 -0600 | [diff] [blame] | 299 | // A StrictMode violation to be handled. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 300 | @UnsupportedAppUsage |
Jeff Sharkey | 3ac2a43 | 2018-06-26 10:52:48 -0600 | [diff] [blame] | 301 | void handleApplicationStrictModeViolation(in IBinder app, int penaltyMask, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 302 | in StrictMode.ViolationInfo crashInfo); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 303 | boolean isTopActivityImmersive(); |
Christopher Tate | 9fbc5e7 | 2019-08-19 16:16:20 -0700 | [diff] [blame] | 304 | void crashApplication(int uid, int initialPid, in String packageName, int userId, |
| 305 | in String message, boolean force); |
Dmitri Plotnikov | d55a387 | 2020-01-16 17:00:02 -0800 | [diff] [blame] | 306 | /** @deprecated -- use getProviderMimeTypeAsync */ |
| 307 | @UnsupportedAppUsage(maxTargetSdk = 29, publicAlternatives = |
| 308 | "Use {@link android.content.ContentResolver#getType} public API instead.") |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 309 | String getProviderMimeType(in Uri uri, int userId); |
Dmitri Plotnikov | d55a387 | 2020-01-16 17:00:02 -0800 | [diff] [blame] | 310 | |
| 311 | oneway void getProviderMimeTypeAsync(in Uri uri, int userId, in RemoteCallback resultCallback); |
| 312 | |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 313 | // Cause the specified process to dump the specified heap. |
Christopher Ferris | 8d652f8 | 2017-04-11 16:29:18 -0700 | [diff] [blame] | 314 | boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo, |
Makoto Onuki | 2c6657f | 2018-06-06 15:24:02 -0700 | [diff] [blame] | 315 | boolean runGc, in String path, in ParcelFileDescriptor fd, |
| 316 | in RemoteCallback finishCallback); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 317 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 318 | boolean isUserRunning(int userid, int flags); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 319 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 320 | void setPackageScreenCompatMode(in String packageName, int mode); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 321 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 322 | boolean switchUser(int userid); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 323 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 324 | boolean removeTask(int taskId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 325 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 326 | void registerProcessObserver(in IProcessObserver observer); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 327 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 328 | void unregisterProcessObserver(in IProcessObserver observer); |
| 329 | boolean isIntentSenderTargetedToPackage(in IIntentSender sender); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 330 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 331 | void updatePersistentConfiguration(in Configuration values); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 332 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 333 | long[] getProcessPss(in int[] pids); |
| 334 | void showBootMessage(in CharSequence msg, boolean always); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 335 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 336 | void killAllBackgroundProcesses(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 337 | ContentProviderHolder getContentProviderExternal(in String name, int userId, |
Dianne Hackborn | 95031ef | 2018-07-09 09:09:05 -0700 | [diff] [blame] | 338 | in IBinder token, String tag); |
Makoto Onuki | 679760a | 2018-09-19 09:48:00 -0700 | [diff] [blame] | 339 | /** @deprecated - Use {@link #removeContentProviderExternalAsUser} which takes a user ID. */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 340 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 341 | void removeContentProviderExternal(in String name, in IBinder token); |
Makoto Onuki | 679760a | 2018-09-19 09:48:00 -0700 | [diff] [blame] | 342 | void removeContentProviderExternalAsUser(in String name, in IBinder token, int userId); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 343 | // Get memory information about the calling process. |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 344 | void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo); |
| 345 | boolean killProcessesBelowForeground(in String reason); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 346 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 347 | UserInfo getCurrentUser(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 348 | // This is not public because you need to be very careful in how you |
| 349 | // manage your activity to make sure it is always the uid you expect. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 350 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 351 | int getLaunchedFromUid(in IBinder activityToken); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 352 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 353 | void unstableProviderDied(in IBinder connection); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 354 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 355 | boolean isIntentSenderAnActivity(in IIntentSender sender); |
Suprabh Shukla | db6bf66 | 2017-08-30 15:41:53 -0700 | [diff] [blame] | 356 | boolean isIntentSenderAForegroundService(in IIntentSender sender); |
Christopher Tate | 2f558d2 | 2019-01-17 16:58:31 -0800 | [diff] [blame] | 357 | boolean isIntentSenderABroadcast(in IIntentSender sender); |
Philip P. Moltmann | e7421e9 | 2020-02-10 16:14:12 +0000 | [diff] [blame^] | 358 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 359 | int startActivityAsUser(in IApplicationThread caller, in String callingPackage, |
| 360 | in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, |
| 361 | int requestCode, int flags, in ProfilerInfo profilerInfo, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 362 | in Bundle options, int userId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 363 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 364 | int stopUser(int userid, boolean force, in IStopUserCallback callback); |
Keun young Park | 4cb9933 | 2019-09-19 17:08:41 -0700 | [diff] [blame] | 365 | /** |
| 366 | * Check {@link com.android.server.am.ActivityManagerService#stopUserWithDelayedLocking(int, boolean, IStopUserCallback)} |
| 367 | * for details. |
| 368 | */ |
| 369 | int stopUserWithDelayedLocking(int userid, boolean force, in IStopUserCallback callback); |
| 370 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 371 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 372 | void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name); |
| 373 | void unregisterUserSwitchObserver(in IUserSwitchObserver observer); |
| 374 | int[] getRunningUserIds(); |
Felipe Leme | 10bb9b5 | 2016-12-20 09:10:14 -0800 | [diff] [blame] | 375 | |
Kweku Adams | a3513f0 | 2019-03-21 12:48:08 -0700 | [diff] [blame] | 376 | // Request a heap dump for the system server. |
| 377 | void requestSystemServerHeapDump(); |
| 378 | |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 379 | void requestBugReport(int bugreportType); |
Abhijeet Kaur | e999851 | 2019-08-23 16:39:54 +0100 | [diff] [blame] | 380 | void requestBugReportWithDescription(in @nullable String shareTitle, |
| 381 | in @nullable String shareDescription, int bugreportType); |
Felipe Leme | 10bb9b5 | 2016-12-20 09:10:14 -0800 | [diff] [blame] | 382 | |
Naveen Kalla | ca3d543 | 2017-03-16 19:15:04 -0700 | [diff] [blame] | 383 | /** |
| 384 | * Takes a telephony bug report and notifies the user with the title and description |
| 385 | * that are passed to this API as parameters |
| 386 | * |
| 387 | * @param shareTitle should be a valid legible string less than 50 chars long |
Abhijeet Kaur | 8cd863b | 2019-10-15 17:42:41 +0100 | [diff] [blame] | 388 | * @param shareDescription should be less than 150 chars long |
Naveen Kalla | ca3d543 | 2017-03-16 19:15:04 -0700 | [diff] [blame] | 389 | * |
| 390 | * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the |
| 391 | * paremeters cannot be encoding to an UTF-8 charset. |
| 392 | */ |
| 393 | void requestTelephonyBugReport(in String shareTitle, in String shareDescription); |
| 394 | |
mukesh agrawal | d9e1df5 | 2018-01-22 14:07:31 -0800 | [diff] [blame] | 395 | /** |
Abhijeet Kaur | 8cd863b | 2019-10-15 17:42:41 +0100 | [diff] [blame] | 396 | * This method is only used by Wifi. |
mukesh agrawal | d9e1df5 | 2018-01-22 14:07:31 -0800 | [diff] [blame] | 397 | * |
| 398 | * Takes a minimal bugreport of Wifi-related state. |
| 399 | * |
| 400 | * @param shareTitle should be a valid legible string less than 50 chars long |
Abhijeet Kaur | 8cd863b | 2019-10-15 17:42:41 +0100 | [diff] [blame] | 401 | * @param shareDescription should be less than 150 chars long |
mukesh agrawal | d9e1df5 | 2018-01-22 14:07:31 -0800 | [diff] [blame] | 402 | * |
| 403 | * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the |
| 404 | * parameters cannot be encoding to an UTF-8 charset. |
| 405 | */ |
| 406 | void requestWifiBugReport(in String shareTitle, in String shareDescription); |
Abhijeet Kaur | e999851 | 2019-08-23 16:39:54 +0100 | [diff] [blame] | 407 | void requestInteractiveBugReportWithDescription(in String shareTitle, |
| 408 | in String shareDescription); |
| 409 | |
| 410 | void requestInteractiveBugReport(); |
| 411 | void requestFullBugReport(); |
| 412 | void requestRemoteBugReport(); |
Paul Chang | c40f578 | 2019-11-04 18:55:31 +0800 | [diff] [blame] | 413 | boolean launchBugReportHandlerApp(); |
Paul Chang | c415351 | 2019-12-08 21:35:27 +0800 | [diff] [blame] | 414 | List<String> getBugreportWhitelistedPackages(); |
mukesh agrawal | d9e1df5 | 2018-01-22 14:07:31 -0800 | [diff] [blame] | 415 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 416 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 417 | Intent getIntentForIntentSender(in IIntentSender sender); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 418 | // This is not public because you need to be very careful in how you |
| 419 | // manage your activity to make sure it is always the uid you expect. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 420 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 421 | String getLaunchedFromPackage(in IBinder activityToken); |
| 422 | void killUid(int appId, int userId, in String reason); |
| 423 | void setUserIsMonkey(boolean monkey); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 424 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 425 | void hang(in IBinder who, boolean allowRestart); |
Wale Ogunwale | 388945c | 2017-10-04 12:13:46 -0700 | [diff] [blame] | 426 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 427 | @UnsupportedAppUsage |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 428 | List<ActivityManager.StackInfo> getAllStackInfos(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 429 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 430 | void moveTaskToStack(int taskId, int stackId, boolean toTop); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 431 | void setFocusedStack(int stackId); |
Wale Ogunwale | 6827856 | 2017-09-23 17:13:55 -0700 | [diff] [blame] | 432 | ActivityManager.StackInfo getFocusedStackInfo(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 433 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 434 | void restart(); |
| 435 | void performIdleMaintenance(); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 436 | void appNotRespondingViaProvider(in IBinder connection); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 437 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 438 | Rect getTaskBounds(int taskId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 439 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 440 | boolean setProcessMemoryTrimLevel(in String process, int uid, int level); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 441 | |
| 442 | |
| 443 | // Start of L transactions |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 444 | String getTagForIntentSender(in IIntentSender sender, in String prefix); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 445 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 446 | boolean startUserInBackground(int userid); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 447 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 448 | boolean isInLockTaskMode(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 449 | @UnsupportedAppUsage |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 450 | void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver, |
| 451 | in IRecentsAnimationRunner recentsAnimationRunner); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 452 | @UnsupportedAppUsage |
Winson Chung | 6a38fca | 2018-03-28 17:57:09 -0700 | [diff] [blame] | 453 | void cancelRecentsAnimation(boolean restoreHomeStackPosition); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 454 | @UnsupportedAppUsage |
Winson Chung | ec1ef09 | 2017-10-25 16:22:34 -0700 | [diff] [blame] | 455 | int startActivityFromRecents(int taskId, in Bundle options); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 456 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 457 | void startSystemLockTaskMode(int taskId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 458 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 459 | boolean isTopOfTask(in IBinder token); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 460 | void bootAnimationComplete(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 461 | int checkPermissionWithToken(in String permission, int pid, int uid, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 462 | in IBinder callerToken); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 463 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 464 | void registerTaskStackListener(in ITaskStackListener listener); |
Winson Chung | aa35745 | 2017-10-31 11:35:30 -0700 | [diff] [blame] | 465 | void unregisterTaskStackListener(in ITaskStackListener listener); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 466 | void notifyCleartextNetwork(int uid, in byte[] firstPacket); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 467 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 468 | void setTaskResizeable(int taskId, int resizeableMode); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 469 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 470 | void resizeTask(int taskId, in Rect bounds, int resizeMode); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 471 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 472 | int getLockTaskModeState(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 473 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 474 | void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 475 | in String reportPackage); |
| 476 | void dumpHeapFinished(in String path); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 477 | void updateLockTaskPackages(int userId, in String[] packages); |
Narayan Kamath | 695cf72 | 2017-12-21 18:32:47 +0000 | [diff] [blame] | 478 | void noteAlarmStart(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag); |
| 479 | void noteAlarmFinish(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 480 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 481 | int getPackageProcessState(in String packageName, in String callingPackage); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 482 | void updateDeviceOwner(in String packageName); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 483 | |
| 484 | // Start of N transactions |
| 485 | // Start Binder transaction tracking for all applications. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 486 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 487 | boolean startBinderTracking(); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 488 | // Stop Binder transaction tracking for all applications and dump trace data to the given file |
| 489 | // descriptor. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 490 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 491 | boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd); |
Andrii Kulian | d276563 | 2016-12-12 22:26:34 -0800 | [diff] [blame] | 492 | /** |
| 493 | * Try to place task to provided position. The final position might be different depending on |
| 494 | * current user and stacks state. The task will be moved to target stack if it's currently in |
| 495 | * different stack. |
| 496 | */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 497 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 498 | void positionTaskInStack(int taskId, int stackId, int position); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 499 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 500 | void suppressResizeConfigChanges(boolean suppress); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 501 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 502 | boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds); |
Dianne Hackborn | c3af19a | 2017-01-20 17:00:44 -0800 | [diff] [blame] | 503 | boolean isAppStartModeDisabled(int uid, in String packageName); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 504 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 505 | boolean unlockUser(int userid, in byte[] token, in byte[] secret, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 506 | in IProgressListener listener); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 507 | void killPackageDependents(in String packageName, int userId); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 508 | /** |
| 509 | * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change. |
| 510 | * |
| 511 | * @param dockedBounds The bounds for the docked stack. |
| 512 | * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which |
| 513 | * might be different from the stack bounds to allow more |
| 514 | * flexibility while resizing, or {@code null} if they should be the |
| 515 | * same as the stack bounds. |
| 516 | * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets. |
| 517 | * When resizing, we usually "freeze" the layout of a task. To |
| 518 | * achieve that, we also need to "freeze" the insets, which |
| 519 | * gets achieved by changing task bounds but not bounds used |
| 520 | * to calculate the insets in this transient state |
| 521 | * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or |
| 522 | * {@code null} if they should be the same as the stack bounds. |
| 523 | * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other |
| 524 | * stacks. |
| 525 | * @throws RemoteException |
| 526 | */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 527 | @UnsupportedAppUsage |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 528 | void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds, |
| 529 | in Rect tempDockedTaskInsetBounds, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 530 | in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 531 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 532 | void removeStack(int stackId); |
| 533 | void makePackageIdle(String packageName, int userId); |
| 534 | int getMemoryTrimLevel(); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 535 | boolean isVrModePackageEnabled(in ComponentName packageName); |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 536 | void notifyLockedProfile(int userId); |
Robin Lee | 5d59242 | 2017-01-18 13:48:15 +0000 | [diff] [blame] | 537 | void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 538 | @UnsupportedAppUsage |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 539 | void sendIdleJobTrigger(); |
Dianne Hackborn | 9830552 | 2017-05-05 17:53:53 -0700 | [diff] [blame] | 540 | int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code, |
| 541 | in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver, |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 542 | in String requiredPermission, in Bundle options); |
Suprabh Shukla | 4d64c09 | 2018-02-21 20:06:14 -0800 | [diff] [blame] | 543 | boolean isBackgroundRestricted(in String packageName); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 544 | |
| 545 | // Start of N MR1 transactions |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 546 | void setRenderThread(int tid); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 547 | /** |
| 548 | * Lets activity manager know whether the calling process is currently showing "top-level" UI |
| 549 | * that is not an activity, i.e. windows on the screen the user is currently interacting with. |
| 550 | * |
| 551 | * <p>This flag can only be set for persistent processes. |
| 552 | * |
| 553 | * @param hasTopUi Whether the calling process has "top-level" UI. |
| 554 | */ |
Sudheer Shanka | ee148f9 | 2016-11-14 16:21:07 -0800 | [diff] [blame] | 555 | void setHasTopUi(boolean hasTopUi); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 556 | |
| 557 | // Start of O transactions |
Andrew Scull | 85a63bc | 2016-10-24 13:47:47 +0100 | [diff] [blame] | 558 | int restartUserInBackground(int userId); |
Wale Ogunwale | e1fe7fa2 | 2016-12-15 18:27:00 -0800 | [diff] [blame] | 559 | /** Cancels the window transitions for the given task. */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 560 | @UnsupportedAppUsage |
Wale Ogunwale | e1fe7fa2 | 2016-12-15 18:27:00 -0800 | [diff] [blame] | 561 | void cancelTaskWindowTransition(int taskId); |
Jorim Jaggi | 02886a8 | 2016-12-06 09:10:06 -0800 | [diff] [blame] | 562 | /** |
Svet Ganov | fd31f85 | 2017-04-26 15:54:27 -0700 | [diff] [blame] | 563 | * @param taskId the id of the task to retrieve the sAutoapshots for |
Jorim Jaggi | 35e3f53 | 2017-03-17 17:06:50 +0100 | [diff] [blame] | 564 | * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load |
| 565 | * a reduced resolution of it, which is much faster |
Jorim Jaggi | 02886a8 | 2016-12-06 09:10:06 -0800 | [diff] [blame] | 566 | * @return a graphic buffer representing a screenshot of a task |
| 567 | */ |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 568 | @UnsupportedAppUsage |
Jorim Jaggi | 35e3f53 | 2017-03-17 17:06:50 +0100 | [diff] [blame] | 569 | ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution); |
Mårten Kongstad | 49a4a1d | 2017-01-12 08:36:37 +0100 | [diff] [blame] | 570 | void scheduleApplicationInfoChanged(in List<String> packageNames, int userId); |
Craig Donner | dc4796c | 2017-03-08 09:51:47 -0800 | [diff] [blame] | 571 | void setPersistentVrThread(int tid); |
Mårten Kongstad | 49a4a1d | 2017-01-12 08:36:37 +0100 | [diff] [blame] | 572 | |
Sudheer Shanka | 84a4895 | 2017-03-08 18:19:01 -0800 | [diff] [blame] | 573 | void waitForNetworkStateUpdate(long procStateSeq); |
Christopher Tate | 424b03f | 2017-04-04 14:23:44 -0700 | [diff] [blame] | 574 | /** |
| 575 | * Add a bare uid to the background restrictions whitelist. Only the system uid may call this. |
| 576 | */ |
Charles He | e078db7 | 2017-10-19 18:03:20 +0100 | [diff] [blame] | 577 | void backgroundWhitelistUid(int uid); |
| 578 | |
| 579 | // Start of P transactions |
Rajeev Kumar | 22d92b7 | 2018-02-07 18:38:36 -0800 | [diff] [blame] | 580 | /** |
| 581 | * Similar to {@link #startUserInBackground(int userId), but with a listener to report |
| 582 | * user unlock progress. |
| 583 | */ |
| 584 | boolean startUserInBackgroundWithListener(int userid, IProgressListener unlockProgressListener); |
Svet Ganov | d873ae6 | 2018-06-25 16:39:23 -0700 | [diff] [blame] | 585 | |
| 586 | /** |
| 587 | * Method for the shell UID to start deletating its permission identity to an |
| 588 | * active instrumenation. The shell can delegate permissions only to one active |
| 589 | * instrumentation at a time. An active instrumentation is one running and |
| 590 | * started from the shell. |
| 591 | */ |
Svet Ganov | 5e86959 | 2018-11-09 09:30:52 -0800 | [diff] [blame] | 592 | void startDelegateShellPermissionIdentity(int uid, in String[] permissions); |
Svet Ganov | d873ae6 | 2018-06-25 16:39:23 -0700 | [diff] [blame] | 593 | |
| 594 | /** |
| 595 | * Method for the shell UID to stop deletating its permission identity to an |
| 596 | * active instrumenation. An active instrumentation is one running and |
| 597 | * started from the shell. |
| 598 | */ |
| 599 | void stopDelegateShellPermissionIdentity(); |
Makoto Onuki | b4469f9 | 2019-02-19 15:55:44 -0800 | [diff] [blame] | 600 | |
| 601 | /** Returns a file descriptor that'll be closed when the system server process dies. */ |
| 602 | ParcelFileDescriptor getLifeMonitor(); |
Keun-young Park | 42118d2 | 2019-02-19 15:16:29 -0800 | [diff] [blame] | 603 | |
| 604 | /** |
| 605 | * Start user, if it us not already running, and bring it to foreground. |
| 606 | * unlockProgressListener can be null if monitoring progress is not necessary. |
| 607 | */ |
| 608 | boolean startUserInForegroundWithListener(int userid, IProgressListener unlockProgressListener); |
Jing Ji | 83c6bc5 | 2019-12-19 11:53:31 -0800 | [diff] [blame] | 609 | |
| 610 | /** |
| 611 | * Method for the app to tell system that it's wedged and would like to trigger an ANR. |
| 612 | */ |
| 613 | void appNotResponding(String reason); |
Jing Ji | 8055a3a | 2019-12-17 15:55:33 -0800 | [diff] [blame] | 614 | |
| 615 | /** |
| 616 | * Return a list of {@link ApplicationExitInfo} records. |
| 617 | * |
| 618 | * <p class="note"> Note: System stores these historical information in a ring buffer, older |
| 619 | * records would be overwritten by newer records. </p> |
| 620 | * |
| 621 | * <p class="note"> Note: In the case that this application bound to an external service with |
| 622 | * flag {@link android.content.Context#BIND_EXTERNAL_SERVICE}, the process of that external |
| 623 | * service will be included in this package's exit info. </p> |
| 624 | * |
| 625 | * @param packageName Optional, an empty value means match all packages belonging to the |
| 626 | * caller's UID. If this package belongs to another UID, you must hold |
| 627 | * {@link android.Manifest.permission#DUMP} in order to retrieve it. |
| 628 | * @param pid Optional, it could be a process ID that used to belong to this package but |
| 629 | * died later; A value of 0 means to ignore this parameter and return all |
| 630 | * matching records. |
| 631 | * @param maxNum Optional, the maximum number of results should be returned; A value of 0 |
| 632 | * means to ignore this parameter and return all matching records |
| 633 | * @param userId The userId in the multi-user environment. |
| 634 | * |
| 635 | * @return a list of {@link ApplicationExitInfo} records with the matching criteria, sorted in |
| 636 | * the order from most recent to least recent. |
| 637 | */ |
| 638 | ParceledListSlice<ApplicationExitInfo> getHistoricalProcessExitReasons(String packageName, |
| 639 | int pid, int maxNum, int userId); |
Jing Ji | e423f76 | 2019-12-10 15:05:18 -0800 | [diff] [blame] | 640 | |
| 641 | /* |
| 642 | * Kill the given PIDs, but the killing will be delayed until the device is idle |
| 643 | * and the given process is imperceptible. |
| 644 | */ |
| 645 | void killProcessesWhenImperceptible(in int[] pids, String reason); |
Yuliya Kamatkova | 48c3807 | 2020-01-09 15:43:25 -0800 | [diff] [blame] | 646 | |
| 647 | /** |
| 648 | * Set locus context for a given activity. |
| 649 | * @param activity |
| 650 | * @param locusId a unique, stable id that identifies this activity instance from others. |
| 651 | * @param appToken ActivityRecord's appToken. |
| 652 | */ |
| 653 | void setActivityLocusContext(in ComponentName activity, in LocusId locusId, |
| 654 | in IBinder appToken); |
Winson Chung | b5c41b7 | 2016-12-07 15:00:47 -0800 | [diff] [blame] | 655 | } |