blob: 5f5d834425b63bb211241b36bd5473f154022995 [file] [log] [blame]
Sudheer Shankafc46e9b2016-10-21 17:55:27 -07001/*
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
17package android.app;
18
19import android.app.ActivityManager;
20import android.app.ApplicationErrorReport;
21import android.app.ContentProviderHolder;
22import android.app.IApplicationThread;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070023import android.app.IActivityController;
24import android.app.IAppTask;
Winson Chunge2104682017-11-08 17:31:14 -080025import android.app.IAssistDataReceiver;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070026import android.app.IInstrumentationWatcher;
27import android.app.IProcessObserver;
28import android.app.IServiceConnection;
29import android.app.IStopUserCallback;
30import android.app.ITaskStackListener;
31import android.app.IUiAutomationConnection;
32import android.app.IUidObserver;
33import android.app.IUserSwitchObserver;
34import android.app.Notification;
35import android.app.PendingIntent;
Winson Chung709904f2017-04-25 11:00:48 -070036import android.app.PictureInPictureParams;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070037import android.app.ProfilerInfo;
38import android.app.WaitResult;
39import android.app.assist.AssistContent;
40import android.app.assist.AssistStructure;
41import android.content.ComponentName;
42import android.content.IIntentReceiver;
43import android.content.IIntentSender;
44import android.content.Intent;
45import android.content.IntentFilter;
46import android.content.IntentSender;
47import android.content.pm.ApplicationInfo;
48import android.content.pm.ConfigurationInfo;
49import android.content.pm.IPackageDataObserver;
50import android.content.pm.ParceledListSlice;
51import android.content.pm.ProviderInfo;
52import android.content.pm.UserInfo;
53import android.content.res.Configuration;
54import android.graphics.Bitmap;
Jorim Jaggi02886a82016-12-06 09:10:06 -080055import android.graphics.GraphicBuffer;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070056import android.graphics.Point;
57import android.graphics.Rect;
58import android.net.Uri;
59import android.os.Bundle;
60import android.os.Debug;
61import android.os.IBinder;
62import android.os.IProgressListener;
63import android.os.ParcelFileDescriptor;
64import android.os.PersistableBundle;
65import android.os.StrictMode;
Narayan Kamath695cf722017-12-21 18:32:47 +000066import android.os.WorkSource;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070067import android.service.voice.IVoiceInteractionSession;
Jorim Jaggif84e2f62018-01-16 14:17:59 +010068import android.view.RemoteAnimationDefinition;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070069import com.android.internal.app.IVoiceInteractor;
70import com.android.internal.os.IResultReceiver;
Jorim Jaggi241ae102016-11-02 21:57:33 -070071import com.android.internal.policy.IKeyguardDismissCallback;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070072
73import java.util.List;
74
75/**
76 * System private API for talking with the activity manager service. This
77 * provides calls from the application back to the activity manager.
78 *
79 * {@hide}
80 */
81interface IActivityManager {
Sudheer Shankaee148f92016-11-14 16:21:07 -080082 // WARNING: when these transactions are updated, check if they are any callers on the native
Sudheer Shanka027a33d2016-11-23 15:24:51 -080083 // side. If so, make sure they are using the correct transaction ids and arguments.
Sudheer Shankaee148f92016-11-14 16:21:07 -080084 // If a transaction which will also be used on the native side is being inserted, add it to
85 // below block of transactions.
86
Sudheer Shanka027a33d2016-11-23 15:24:51 -080087 // Since these transactions are also called from native code, these must be kept in sync with
Peter Visontaycee76322017-09-05 11:43:36 +010088 // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h
Sudheer Shankaee148f92016-11-14 16:21:07 -080089 // =============== Beginning of transactions used on native side as well ======================
90 ParcelFileDescriptor openContentUri(in String uriString);
Svet Ganov14ab9672017-11-22 18:49:32 -080091 void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
92 String callingPackage);
93 void unregisterUidObserver(in IUidObserver observer);
Sudheer Shankaee148f92016-11-14 16:21:07 -080094 // =============== End of transactions used on native side as well ============================
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070095
96 // Special low-level communication with activity manager.
97 void handleApplicationCrash(in IBinder app,
Sudheer Shankaee148f92016-11-14 16:21:07 -080098 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070099 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
100 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800101 int flags, in ProfilerInfo profilerInfo, in Bundle options);
102 void unhandledBack();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700103
Sudheer Shankaee148f92016-11-14 16:21:07 -0800104 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700105 Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
106 in IIntentReceiver receiver, in IntentFilter filter,
Chad Brubaker6d6015f2017-04-18 11:25:16 -0700107 in String requiredPermission, int userId, int flags);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800108 void unregisterReceiver(in IIntentReceiver receiver);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700109 int broadcastIntent(in IApplicationThread caller, in Intent intent,
110 in String resolvedType, in IIntentReceiver resultTo, int resultCode,
111 in String resultData, in Bundle map, in String[] requiredPermissions,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800112 int appOp, in Bundle options, boolean serialized, boolean sticky, int userId);
113 void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700114 oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800115 boolean abortBroadcast, int flags);
Sudheer Shankaf6690102017-10-16 10:20:32 -0700116 void attachApplication(in IApplicationThread app, long startSeq);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700117 oneway void activityIdle(in IBinder token, in Configuration config,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800118 in boolean stopProfiling);
119 void activityPaused(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700120 oneway void activityStopped(in IBinder token, in Bundle state,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800121 in PersistableBundle persistentState, in CharSequence description);
122 String getCallingPackage(in IBinder token);
123 ComponentName getCallingActivity(in IBinder token);
Winson Chung61c9e5a2017-10-11 10:39:32 -0700124 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
125 List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
126 int ignoreWindowingMode);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800127 void moveTaskToFront(int task, int flags, in Bundle options);
128 void moveTaskBackwards(int task);
129 int getTaskForActivity(in IBinder token, in boolean onlyRoot);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700130 ContentProviderHolder getContentProvider(in IApplicationThread caller,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800131 in String name, int userId, boolean stable);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700132 void publishContentProviders(in IApplicationThread caller,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800133 in List<ContentProviderHolder> providers);
134 boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
135 void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
136 PendingIntent getRunningServiceControlPanel(in ComponentName service);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700137 ComponentName startService(in IApplicationThread caller, in Intent service,
Christopher Tate242ba3e92017-04-14 15:07:06 -0700138 in String resolvedType, boolean requireForeground, in String callingPackage, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700139 int stopService(in IApplicationThread caller, in Intent service,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800140 in String resolvedType, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700141 int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
142 in String resolvedType, in IServiceConnection connection, int flags,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800143 in String callingPackage, int userId);
144 boolean unbindService(in IServiceConnection connection);
145 void publishService(in IBinder token, in Intent intent, in IBinder service);
146 void activityResumed(in IBinder token);
147 void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
148 void setAlwaysFinish(boolean enabled);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700149 boolean startInstrumentation(in ComponentName className, in String profileFile,
150 int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
151 in IUiAutomationConnection connection, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800152 in String abiOverride);
Dianne Hackborn34041732017-01-31 15:27:13 -0800153 void addInstrumentationResults(in IApplicationThread target, in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700154 void finishInstrumentation(in IApplicationThread target, int resultCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800155 in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700156 /**
157 * @return A copy of global {@link Configuration}, contains general settings for the entire
158 * system. Corresponds to the configuration of the default display.
159 * @throws RemoteException
160 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800161 Configuration getConfiguration();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700162 /**
163 * Updates global configuration and applies changes to the entire system.
164 * @param values Update values for global configuration. If null is passed it will request the
165 * Window Manager to compute new config for the default display.
166 * @throws RemoteException
167 * @return Returns true if the configuration was updated.
168 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800169 boolean updateConfiguration(in Configuration values);
170 boolean stopServiceToken(in ComponentName className, in IBinder token, int startId);
171 ComponentName getActivityClassForToken(in IBinder token);
172 String getPackageForToken(in IBinder token);
173 void setProcessLimit(int max);
174 int getProcessLimit();
175 int checkPermission(in String permission, int pid, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700176 int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800177 in IBinder callerToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700178 void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800179 int mode, int userId);
Dianne Hackborna47223f2017-03-30 13:49:13 -0700180 void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
181 int mode, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800182 void setActivityController(in IActivityController watcher, boolean imAMonkey);
183 void showWaitingForDebugger(in IApplicationThread who, boolean waiting);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700184 /*
185 * This will deliver the specified signal to all the persistent processes. Currently only
186 * SIGUSR1 is delivered. All others are ignored.
187 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800188 void signalPersistentProcesses(int signal);
Winson Chung5fa39752017-10-04 14:50:15 -0700189
190 ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800191 oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
192 oneway void activityDestroyed(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700193 IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
194 in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800195 int flags, in Bundle options, int userId);
196 void cancelIntentSender(in IIntentSender sender);
197 String getPackageForIntentSender(in IIntentSender sender);
Dianne Hackbornf66adfd2017-04-13 11:01:48 -0700198 void registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
199 void unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800200 void enterSafeMode();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700201 boolean startNextMatchingActivity(in IBinder callingActivity,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800202 in Intent intent, in Bundle options);
Narayan Kamath695cf722017-12-21 18:32:47 +0000203 void noteWakeupAlarm(in IIntentSender sender, in WorkSource workSource, int sourceUid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800204 in String sourcePkg, in String tag);
205 void removeContentProvider(in IBinder connection, boolean stable);
206 void setRequestedOrientation(in IBinder token, int requestedOrientation);
207 int getRequestedOrientation(in IBinder token);
208 void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
Dianne Hackbornf965f402017-05-04 23:27:23 -0700209 void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason);
Sudheer Shankac9d94072017-02-22 22:13:55 +0000210 void setServiceForeground(in ComponentName className, in IBinder token,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800211 int id, in Notification notification, int flags);
212 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
213 void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
214 List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
Christopher Tate1d99c392017-12-07 16:54:04 -0800215 boolean clearApplicationUserData(in String packageName, boolean keepState,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800216 in IPackageDataObserver observer, int userId);
217 void forceStopPackage(in String packageName, int userId);
218 boolean killPids(in int[] pids, in String reason, boolean secure);
219 List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
Robin Lee3c82d3d2017-01-19 17:09:28 +0000220 ActivityManager.TaskDescription getTaskDescription(int taskId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700221 // Retrieve running application processes in the system
Sudheer Shankaee148f92016-11-14 16:21:07 -0800222 List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700223 // Get device configuration
Sudheer Shankaee148f92016-11-14 16:21:07 -0800224 ConfigurationInfo getDeviceConfigurationInfo();
225 IBinder peekService(in Intent service, in String resolvedType, in String callingPackage);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700226 // Turn on/off profiling in a particular process.
227 boolean profileControl(in String process, int userId, boolean start,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800228 in ProfilerInfo profilerInfo, int profileType);
229 boolean shutdown(int timeout);
230 void stopAppSwitches();
231 void resumeAppSwitches();
232 boolean bindBackupAgent(in String packageName, int backupRestoreMode, int userId);
233 void backupAgentCreated(in String packageName, in IBinder agent);
234 void unbindBackupAgent(in ApplicationInfo appInfo);
235 int getUidForIntentSender(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700236 int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800237 boolean requireFull, in String name, in String callerPackage);
238 void addPackageDependency(in String packageName);
239 void killApplication(in String pkg, int appId, int userId, in String reason);
Winson Chung84deaa22017-11-02 15:57:28 -0700240 void closeSystemDialogs(in String reason);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800241 Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids);
242 void killApplicationProcess(in String processName, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700243 int startActivityIntentSender(in IApplicationThread caller,
Dianne Hackborn3e6e3852017-05-19 16:12:08 -0700244 in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
245 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800246 int flagsMask, int flagsValues, in Bundle options);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700247 void overridePendingTransition(in IBinder token, in String packageName,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800248 int enterAnim, int exitAnim);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700249 // Special low-level communication with activity manager.
250 boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800251 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
252 void killBackgroundProcesses(in String packageName, int userId);
253 boolean isUserAMonkey();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700254 WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
255 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
256 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800257 int userId);
258 boolean willActivityBeVisible(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700259 int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
260 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
261 int requestCode, int startFlags, in Configuration newConfig,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800262 in Bundle options, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700263 // Retrieve info of applications installed on external media that are currently
264 // running.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800265 List<ApplicationInfo> getRunningExternalApplications();
266 void finishHeavyWeightApp();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700267 // A StrictMode violation to be handled. The violationMask is a
268 // subset of the original StrictMode policy bitmask, with only the
269 // bit violated and penalty bits to be executed by the
270 // ActivityManagerService remaining set.
271 void handleApplicationStrictModeViolation(in IBinder app, int violationMask,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800272 in StrictMode.ViolationInfo crashInfo);
273 boolean isImmersive(in IBinder token);
274 void setImmersive(in IBinder token, boolean immersive);
275 boolean isTopActivityImmersive();
Christopher Tate8aa8fe12017-01-20 17:50:32 -0800276 void crashApplication(int uid, int initialPid, in String packageName, int userId, in String message);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800277 String getProviderMimeType(in Uri uri, int userId);
278 IBinder newUriPermissionOwner(in String name);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700279 void grantUriPermissionFromOwner(in IBinder owner, int fromUid, in String targetPkg,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800280 in Uri uri, int mode, int sourceUserId, int targetUserId);
281 void revokeUriPermissionFromOwner(in IBinder owner, in Uri uri, int mode, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700282 int checkGrantUriPermission(int callingUid, in String targetPkg, in Uri uri,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800283 int modeFlags, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700284 // Cause the specified process to dump the specified heap.
Christopher Ferris8d652f82017-04-11 16:29:18 -0700285 boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo,
286 boolean runGc, in String path, in ParcelFileDescriptor fd);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700287 int startActivities(in IApplicationThread caller, in String callingPackage,
288 in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800289 in Bundle options, int userId);
290 boolean isUserRunning(int userid, int flags);
291 oneway void activitySlept(in IBinder token);
292 int getFrontActivityScreenCompatMode();
293 void setFrontActivityScreenCompatMode(int mode);
294 int getPackageScreenCompatMode(in String packageName);
295 void setPackageScreenCompatMode(in String packageName, int mode);
296 boolean getPackageAskScreenCompat(in String packageName);
297 void setPackageAskScreenCompat(in String packageName, boolean ask);
298 boolean switchUser(int userid);
299 void setFocusedTask(int taskId);
300 boolean removeTask(int taskId);
301 void registerProcessObserver(in IProcessObserver observer);
302 void unregisterProcessObserver(in IProcessObserver observer);
303 boolean isIntentSenderTargetedToPackage(in IIntentSender sender);
304 void updatePersistentConfiguration(in Configuration values);
305 long[] getProcessPss(in int[] pids);
306 void showBootMessage(in CharSequence msg, boolean always);
307 void killAllBackgroundProcesses();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700308 ContentProviderHolder getContentProviderExternal(in String name, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800309 in IBinder token);
310 void removeContentProviderExternal(in String name, in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700311 // Get memory information about the calling process.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800312 void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
313 boolean killProcessesBelowForeground(in String reason);
314 UserInfo getCurrentUser();
315 boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700316 boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800317 in Intent resultData);
David Stevens53a39ea2017-08-23 18:41:49 -0700318 /**
319 * Informs ActivityManagerService that the keyguard is showing.
320 *
321 * @param showing True if the keyguard is showing, false otherwise.
322 * @param secondaryDisplayShowing The displayId of the secondary display on which the keyguard
323 * is showing, or INVALID_DISPLAY if there is no such display. Only meaningful if
324 * showing is true.
325 */
326 void setLockScreenShown(boolean showing, int secondaryDisplayShowing);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800327 boolean finishActivityAffinity(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700328 // This is not public because you need to be very careful in how you
329 // manage your activity to make sure it is always the uid you expect.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800330 int getLaunchedFromUid(in IBinder activityToken);
331 void unstableProviderDied(in IBinder connection);
332 boolean isIntentSenderAnActivity(in IIntentSender sender);
Suprabh Shukladb6bf662017-08-30 15:41:53 -0700333 boolean isIntentSenderAForegroundService(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700334 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
335 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
336 int requestCode, int flags, in ProfilerInfo profilerInfo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800337 in Bundle options, int userId);
338 int stopUser(int userid, boolean force, in IStopUserCallback callback);
339 void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name);
340 void unregisterUserSwitchObserver(in IUserSwitchObserver observer);
341 int[] getRunningUserIds();
Felipe Leme10bb9b52016-12-20 09:10:14 -0800342
343 // Deprecated - This method is only used by a few internal components and it will soon be
344 // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
345 // No new code should be calling it.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800346 void requestBugReport(int bugreportType);
Felipe Leme10bb9b52016-12-20 09:10:14 -0800347
Naveen Kallaca3d5432017-03-16 19:15:04 -0700348 /**
349 * Takes a telephony bug report and notifies the user with the title and description
350 * that are passed to this API as parameters
351 *
352 * @param shareTitle should be a valid legible string less than 50 chars long
353 * @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
354 *
355 * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
356 * paremeters cannot be encoding to an UTF-8 charset.
357 */
358 void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
359
Sudheer Shankaee148f92016-11-14 16:21:07 -0800360 long inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason);
361 void clearPendingBackup();
362 Intent getIntentForIntentSender(in IIntentSender sender);
363 Bundle getAssistContextExtras(int requestType);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700364 void reportAssistContextExtras(in IBinder token, in Bundle extras,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800365 in AssistStructure structure, in AssistContent content, in Uri referrer);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700366 // This is not public because you need to be very careful in how you
367 // manage your activity to make sure it is always the uid you expect.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800368 String getLaunchedFromPackage(in IBinder activityToken);
369 void killUid(int appId, int userId, in String reason);
370 void setUserIsMonkey(boolean monkey);
371 void hang(in IBinder who, boolean allowRestart);
Wale Ogunwale388945c2017-10-04 12:13:46 -0700372
373 /**
374 * Sets the windowing mode for a specific task. Only works on tasks of type
375 * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD}
376 * @param taskId The id of the task to set the windowing mode for.
377 * @param windowingMode The windowing mode to set for the task.
378 * @param toTop If the task should be moved to the top once the windowing mode changes.
379 */
380 void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800381 void moveTaskToStack(int taskId, int stackId, boolean toTop);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700382 /**
383 * Resizes the input stack id to the given bounds.
384 *
385 * @param stackId Id of the stack to resize.
386 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
387 * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
388 * active.
389 * @param preserveWindows True if the windows of activities contained in the stack should be
390 * preserved.
391 * @param animate True if the stack resize should be animated.
392 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
393 * default animation duration should be used.
394 * @throws RemoteException
395 */
396 void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800397 boolean preserveWindows, boolean animate, int animationDuration);
398 List<ActivityManager.StackInfo> getAllStackInfos();
399 void setFocusedStack(int stackId);
Wale Ogunwale68278562017-09-23 17:13:55 -0700400 ActivityManager.StackInfo getFocusedStackInfo();
401 ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800402 boolean convertFromTranslucent(in IBinder token);
403 boolean convertToTranslucent(in IBinder token, in Bundle options);
404 void notifyActivityDrawn(in IBinder token);
Jorim Jaggi4d27b842017-08-17 17:22:26 +0200405 void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800406 void restart();
407 void performIdleMaintenance();
408 void takePersistableUriPermission(in Uri uri, int modeFlags, int userId);
409 void releasePersistableUriPermission(in Uri uri, int modeFlags, int userId);
410 ParceledListSlice getPersistedUriPermissions(in String packageName, boolean incoming);
411 void appNotRespondingViaProvider(in IBinder connection);
412 Rect getTaskBounds(int taskId);
413 int getActivityDisplayId(in IBinder activityToken);
414 boolean setProcessMemoryTrimLevel(in String process, int uid, int level);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700415
416
417 // Start of L transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800418 String getTagForIntentSender(in IIntentSender sender, in String prefix);
419 boolean startUserInBackground(int userid);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800420 void startLockTaskModeByToken(in IBinder token);
Charles Heff9b4dff2017-09-22 10:18:37 +0100421 void stopLockTaskModeByToken(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800422 boolean isInLockTaskMode();
423 void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700424 int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
425 in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
426 in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800427 in Bundle options, int userId);
Winson Chung83471632016-12-13 11:02:12 -0800428 int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
429 in Intent intent, in String resolvedType, in Bundle options, int userId);
Winson Chungec1ef092017-10-25 16:22:34 -0700430 int startRecentsActivity(in IAssistDataReceiver assistDataReceiver, in Bundle options,
Winson Chunge2104682017-11-08 17:31:14 -0800431 in Bundle activityOptions, int userId);
Winson Chungec1ef092017-10-25 16:22:34 -0700432 int startActivityFromRecents(int taskId, in Bundle options);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800433 Bundle getActivityOptions(in IBinder token);
434 List<IBinder> getAppTasks(in String callingPackage);
435 void startSystemLockTaskMode(int taskId);
436 void stopSystemLockTaskMode();
437 void finishVoiceTask(in IVoiceInteractionSession session);
438 boolean isTopOfTask(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800439 void notifyLaunchTaskBehindComplete(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800440 void notifyEnterAnimationComplete(in IBinder token);
Geoffrey Pitsch88f3d4d2017-11-22 13:31:11 -0500441 IBinder requestStartActivityPermissionToken(in IBinder delegatorToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700442 int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
443 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
444 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Geoffrey Pitsch88f3d4d2017-11-22 13:31:11 -0500445 in IBinder permissionToken, boolean ignoreTargetSecurity, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700446 int addAppTask(in IBinder activityToken, in Intent intent,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800447 in ActivityManager.TaskDescription description, in Bitmap thumbnail);
448 Point getAppTaskThumbnailSize();
449 boolean releaseActivityInstance(in IBinder token);
450 void releaseSomeActivities(in IApplicationThread app);
451 void bootAnimationComplete();
452 Bitmap getTaskDescriptionIcon(in String filename, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700453 boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800454 in Bundle args);
455 void startInPlaceAnimationOnFrontMostApplication(in Bundle opts);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700456 int checkPermissionWithToken(in String permission, int pid, int uid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800457 in IBinder callerToken);
458 void registerTaskStackListener(in ITaskStackListener listener);
Winson Chungaa357452017-10-31 11:35:30 -0700459 void unregisterTaskStackListener(in ITaskStackListener listener);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700460
Sudheer Shankaee148f92016-11-14 16:21:07 -0800461 void notifyCleartextNetwork(int uid, in byte[] firstPacket);
Andrii Kulian94e82d9b02017-07-13 15:33:06 -0700462 int createStackOnDisplay(int displayId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800463 void setTaskResizeable(int taskId, int resizeableMode);
Winson Chungda2818f2017-10-23 16:25:49 -0700464 boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver,
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700465 in Bundle receiverExtras, in IBinder activityToken,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800466 boolean focused, boolean newSessionId);
467 void resizeTask(int taskId, in Rect bounds, int resizeMode);
468 int getLockTaskModeState();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700469 void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800470 in String reportPackage);
471 void dumpHeapFinished(in String path);
472 void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
473 void updateLockTaskPackages(int userId, in String[] packages);
Narayan Kamath695cf722017-12-21 18:32:47 +0000474 void noteAlarmStart(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
475 void noteAlarmFinish(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800476 int getPackageProcessState(in String packageName, in String callingPackage);
477 oneway void showLockTaskEscapeMessage(in IBinder token);
478 void updateDeviceOwner(in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700479 /**
480 * Notify the system that the keyguard is going away.
481 *
Adrian Roose99bc052017-11-20 17:55:31 +0100482 * @param flags See {@link android.view.WindowManagerPolicyConstants#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700483 * etc.
484 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800485 void keyguardGoingAway(int flags);
Dianne Hackborn83249ec2017-04-12 10:54:03 -0700486 int getUidProcessState(int uid, in String callingPackage);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800487 boolean isAssistDataAllowedOnCurrentActivity();
488 boolean showAssistFromActivity(in IBinder token, in Bundle args);
489 boolean isRootVoiceInteraction(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700490
491
492 // Start of N transactions
493 // Start Binder transaction tracking for all applications.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800494 boolean startBinderTracking();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700495 // Stop Binder transaction tracking for all applications and dump trace data to the given file
496 // descriptor.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800497 boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
Andrii Kuliand2765632016-12-12 22:26:34 -0800498 /**
499 * Try to place task to provided position. The final position might be different depending on
500 * current user and stacks state. The task will be moved to target stack if it's currently in
501 * different stack.
502 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800503 void positionTaskInStack(int taskId, int stackId, int position);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800504 void exitFreeformMode(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700505 void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800506 in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
Matthew Ngbf155872017-10-27 15:24:39 -0700507 boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
Wale Ogunwalec59b4f62017-11-30 11:05:43 -0800508 boolean animate, in Rect initialBounds, boolean showRecents);
Wale Ogunwale89be5762017-10-04 13:27:49 -0700509 /**
510 * Dismisses split-screen multi-window mode.
511 * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
512 */
513 void dismissSplitScreenMode(boolean toTop);
514 /**
515 * Dismisses PiP
516 * @param animate True if the dismissal should be animated.
517 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
518 * default animation duration should be used.
519 */
520 void dismissPip(boolean animate, int animationDuration);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800521 void suppressResizeConfigChanges(boolean suppress);
522 void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
523 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
Dianne Hackbornc3af19a2017-01-20 17:00:44 -0800524 boolean isAppStartModeDisabled(int uid, in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700525 boolean unlockUser(int userid, in byte[] token, in byte[] secret,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800526 in IProgressListener listener);
527 boolean isInMultiWindowMode(in IBinder token);
528 boolean isInPictureInPictureMode(in IBinder token);
529 void killPackageDependents(in String packageName, int userId);
Winson Chung709904f2017-04-25 11:00:48 -0700530 boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
531 void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
532 int getMaxNumPictureInPictureActions(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800533 void activityRelaunched(in IBinder token);
534 IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700535 /**
536 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
537 *
538 * @param dockedBounds The bounds for the docked stack.
539 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
540 * might be different from the stack bounds to allow more
541 * flexibility while resizing, or {@code null} if they should be the
542 * same as the stack bounds.
543 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
544 * When resizing, we usually "freeze" the layout of a task. To
545 * achieve that, we also need to "freeze" the insets, which
546 * gets achieved by changing task bounds but not bounds used
547 * to calculate the insets in this transient state
548 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
549 * {@code null} if they should be the same as the stack bounds.
550 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
551 * stacks.
552 * @throws RemoteException
553 */
554 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
555 in Rect tempDockedTaskInsetBounds,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800556 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
557 int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700558 // Gets the URI permissions granted to an arbitrary package.
559 // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
560 // granted to another packages (instead of those granted to it).
Sudheer Shankaee148f92016-11-14 16:21:07 -0800561 ParceledListSlice getGrantedUriPermissions(in String packageName, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700562 // Clears the URI permissions granted to an arbitrary package.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800563 void clearGrantedUriPermissions(in String packageName, int userId);
564 boolean isAppForeground(int uid);
565 void startLocalVoiceInteraction(in IBinder token, in Bundle options);
566 void stopLocalVoiceInteraction(in IBinder token);
567 boolean supportsLocalVoiceInteraction();
Winson Chung85d39982017-02-24 15:21:25 -0800568 void notifyPinnedStackAnimationStarted();
Sudheer Shankaee148f92016-11-14 16:21:07 -0800569 void notifyPinnedStackAnimationEnded();
570 void removeStack(int stackId);
Wale Ogunwale68278562017-09-23 17:13:55 -0700571 /**
572 * Removes stacks in the input windowing modes from the system if they are of activity type
573 * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
574 */
575 void removeStacksInWindowingModes(in int[] windowingModes);
576 /** Removes stack of the activity types from the system. */
577 void removeStacksWithActivityTypes(in int[] activityTypes);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800578 void makePackageIdle(String packageName, int userId);
579 int getMemoryTrimLevel();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700580 /**
581 * Resizes the pinned stack.
582 *
583 * @param pinnedBounds The bounds for the pinned stack.
584 * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
585 * might be different from the stack bounds to allow more
586 * flexibility while resizing, or {@code null} if they should be the
587 * same as the stack bounds.
588 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800589 void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
590 boolean isVrModePackageEnabled(in ComponentName packageName);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800591 void notifyLockedProfile(int userId);
Robin Lee5d592422017-01-18 13:48:15 +0000592 void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800593 void sendIdleJobTrigger();
Dianne Hackborn98305522017-05-05 17:53:53 -0700594 int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code,
595 in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800596 in String requiredPermission, in Bundle options);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700597
598
599 // Start of N MR1 transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800600 void setVrThread(int tid);
601 void setRenderThread(int tid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700602 /**
603 * Lets activity manager know whether the calling process is currently showing "top-level" UI
604 * that is not an activity, i.e. windows on the screen the user is currently interacting with.
605 *
606 * <p>This flag can only be set for persistent processes.
607 *
608 * @param hasTopUi Whether the calling process has "top-level" UI.
609 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800610 void setHasTopUi(boolean hasTopUi);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700611
612 // Start of O transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800613 void requestActivityRelaunch(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700614 /**
615 * Updates override configuration applied to specific display.
616 * @param values Update values for display configuration. If null is passed it will request the
617 * Window Manager to compute new config for the specified display.
618 * @param displayId Id of the display to apply the config to.
619 * @throws RemoteException
620 * @return Returns true if the configuration was updated.
621 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800622 boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800623 void moveStackToDisplay(int stackId, int displayId);
Winson Chungda2818f2017-10-23 16:25:49 -0700624 boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras,
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800625 in IBinder activityToken, int flags);
626 void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback,
627 in CharSequence message);
Andrew Scull85a63bc2016-10-24 13:47:47 +0100628 int restartUserInBackground(int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700629
Wale Ogunwalee1fe7fa22016-12-15 18:27:00 -0800630 /** Cancels the window transitions for the given task. */
631 void cancelTaskWindowTransition(int taskId);
632
Jorim Jaggi02886a82016-12-06 09:10:06 -0800633 /**
Svet Ganovfd31f852017-04-26 15:54:27 -0700634 * @param taskId the id of the task to retrieve the sAutoapshots for
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100635 * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
636 * a reduced resolution of it, which is much faster
Jorim Jaggi02886a82016-12-06 09:10:06 -0800637 * @return a graphic buffer representing a screenshot of a task
638 */
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100639 ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
Jorim Jaggi02886a82016-12-06 09:10:06 -0800640
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100641 void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
Craig Donnerdc4796c2017-03-08 09:51:47 -0800642 void setPersistentVrThread(int tid);
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100643
Sudheer Shanka84a48952017-03-08 18:19:01 -0800644 void waitForNetworkStateUpdate(long procStateSeq);
645
Jorim Jaggi0fe7ce962017-02-22 16:45:48 +0100646 /**
647 * See {@link android.app.Activity#setDisablePreviewScreenshots}
648 */
649 void setDisablePreviewScreenshots(IBinder token, boolean disable);
650
Tony Makec319ab2017-03-28 18:50:01 +0100651 /**
652 * Return the user id of last resumed activity.
653 */
654 int getLastResumedActivityUserId();
655
Christopher Tate424b03f2017-04-04 14:23:44 -0700656 /**
657 * Add a bare uid to the background restrictions whitelist. Only the system uid may call this.
658 */
Charles Hee078db72017-10-19 18:03:20 +0100659 void backgroundWhitelistUid(int uid);
660
661 // Start of P transactions
662 void updateLockTaskFeatures(int userId, int flags);
Christopher Tate424b03f2017-04-04 14:23:44 -0700663
Sudheer Shankaee148f92016-11-14 16:21:07 -0800664 // WARNING: when these transactions are updated, check if they are any callers on the native
Sudheer Shanka027a33d2016-11-23 15:24:51 -0800665 // side. If so, make sure they are using the correct transaction ids and arguments.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800666 // If a transaction which will also be used on the native side is being inserted, add it
667 // alongside with other transactions of this kind at the top of this file.
chaviw59b98852017-06-13 12:05:44 -0700668
669 void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
670 void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
Tony Mak64fd8c02017-12-01 19:11:59 +0000671
672 /**
673 * Similar to {@link #startUserInBackground(int userId), but with a listener to report
674 * user unlock progress.
675 */
676 boolean startUserInBackgroundWithListener(int userid, IProgressListener unlockProgressListener);
Jorim Jaggif84e2f62018-01-16 14:17:59 +0100677
678 /**
679 * Registers remote animations for a specific activity.
680 */
681 void registerRemoteAnimations(in IBinder token, in RemoteAnimationDefinition definition);
Winson Chungb5c41b72016-12-07 15:00:47 -0800682}