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