blob: 4fc649e0443e121a60298c5467c3ca2ebd6566cb [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;
66import android.service.voice.IVoiceInteractionSession;
67import com.android.internal.app.IVoiceInteractor;
68import com.android.internal.os.IResultReceiver;
Jorim Jaggi241ae102016-11-02 21:57:33 -070069import com.android.internal.policy.IKeyguardDismissCallback;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070070
71import java.util.List;
72
73/**
74 * System private API for talking with the activity manager service. This
75 * provides calls from the application back to the activity manager.
76 *
77 * {@hide}
78 */
79interface IActivityManager {
Sudheer Shankaee148f92016-11-14 16:21:07 -080080 // WARNING: when these transactions are updated, check if they are any callers on the native
Sudheer Shanka027a33d2016-11-23 15:24:51 -080081 // side. If so, make sure they are using the correct transaction ids and arguments.
Sudheer Shankaee148f92016-11-14 16:21:07 -080082 // If a transaction which will also be used on the native side is being inserted, add it to
83 // below block of transactions.
84
Sudheer Shanka027a33d2016-11-23 15:24:51 -080085 // Since these transactions are also called from native code, these must be kept in sync with
Peter Visontaycee76322017-09-05 11:43:36 +010086 // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h
Sudheer Shankaee148f92016-11-14 16:21:07 -080087 // =============== Beginning of transactions used on native side as well ======================
88 ParcelFileDescriptor openContentUri(in String uriString);
89 // =============== End of transactions used on native side as well ============================
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070090
91 // Special low-level communication with activity manager.
92 void handleApplicationCrash(in IBinder app,
Sudheer Shankaee148f92016-11-14 16:21:07 -080093 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070094 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
95 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -080096 int flags, in ProfilerInfo profilerInfo, in Bundle options);
97 void unhandledBack();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070098
Sudheer Shankaee148f92016-11-14 16:21:07 -080099 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700100 Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
101 in IIntentReceiver receiver, in IntentFilter filter,
Chad Brubaker6d6015f2017-04-18 11:25:16 -0700102 in String requiredPermission, int userId, int flags);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800103 void unregisterReceiver(in IIntentReceiver receiver);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700104 int broadcastIntent(in IApplicationThread caller, in Intent intent,
105 in String resolvedType, in IIntentReceiver resultTo, int resultCode,
106 in String resultData, in Bundle map, in String[] requiredPermissions,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800107 int appOp, in Bundle options, boolean serialized, boolean sticky, int userId);
108 void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700109 oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800110 boolean abortBroadcast, int flags);
111 void attachApplication(in IApplicationThread app);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700112 oneway void activityIdle(in IBinder token, in Configuration config,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800113 in boolean stopProfiling);
114 void activityPaused(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700115 oneway void activityStopped(in IBinder token, in Bundle state,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800116 in PersistableBundle persistentState, in CharSequence description);
117 String getCallingPackage(in IBinder token);
118 ComponentName getCallingActivity(in IBinder token);
Winson Chung61c9e5a2017-10-11 10:39:32 -0700119 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
120 List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
121 int ignoreWindowingMode);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800122 void moveTaskToFront(int task, int flags, in Bundle options);
123 void moveTaskBackwards(int task);
124 int getTaskForActivity(in IBinder token, in boolean onlyRoot);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700125 ContentProviderHolder getContentProvider(in IApplicationThread caller,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800126 in String name, int userId, boolean stable);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700127 void publishContentProviders(in IApplicationThread caller,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800128 in List<ContentProviderHolder> providers);
129 boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
130 void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
131 PendingIntent getRunningServiceControlPanel(in ComponentName service);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700132 ComponentName startService(in IApplicationThread caller, in Intent service,
Christopher Tate242ba3e92017-04-14 15:07:06 -0700133 in String resolvedType, boolean requireForeground, in String callingPackage, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700134 int stopService(in IApplicationThread caller, in Intent service,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800135 in String resolvedType, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700136 int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
137 in String resolvedType, in IServiceConnection connection, int flags,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800138 in String callingPackage, int userId);
139 boolean unbindService(in IServiceConnection connection);
140 void publishService(in IBinder token, in Intent intent, in IBinder service);
141 void activityResumed(in IBinder token);
142 void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
143 void setAlwaysFinish(boolean enabled);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700144 boolean startInstrumentation(in ComponentName className, in String profileFile,
145 int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
146 in IUiAutomationConnection connection, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800147 in String abiOverride);
Dianne Hackborn34041732017-01-31 15:27:13 -0800148 void addInstrumentationResults(in IApplicationThread target, in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700149 void finishInstrumentation(in IApplicationThread target, int resultCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800150 in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700151 /**
152 * @return A copy of global {@link Configuration}, contains general settings for the entire
153 * system. Corresponds to the configuration of the default display.
154 * @throws RemoteException
155 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800156 Configuration getConfiguration();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700157 /**
158 * Updates global configuration and applies changes to the entire system.
159 * @param values Update values for global configuration. If null is passed it will request the
160 * Window Manager to compute new config for the default display.
161 * @throws RemoteException
162 * @return Returns true if the configuration was updated.
163 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800164 boolean updateConfiguration(in Configuration values);
165 boolean stopServiceToken(in ComponentName className, in IBinder token, int startId);
166 ComponentName getActivityClassForToken(in IBinder token);
167 String getPackageForToken(in IBinder token);
168 void setProcessLimit(int max);
169 int getProcessLimit();
170 int checkPermission(in String permission, int pid, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700171 int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800172 in IBinder callerToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700173 void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800174 int mode, int userId);
Dianne Hackborna47223f2017-03-30 13:49:13 -0700175 void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
176 int mode, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800177 void setActivityController(in IActivityController watcher, boolean imAMonkey);
178 void showWaitingForDebugger(in IApplicationThread who, boolean waiting);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700179 /*
180 * This will deliver the specified signal to all the persistent processes. Currently only
181 * SIGUSR1 is delivered. All others are ignored.
182 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800183 void signalPersistentProcesses(int signal);
Winson Chung5fa39752017-10-04 14:50:15 -0700184
185 ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800186 oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
187 oneway void activityDestroyed(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700188 IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
189 in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800190 int flags, in Bundle options, int userId);
191 void cancelIntentSender(in IIntentSender sender);
192 String getPackageForIntentSender(in IIntentSender sender);
Dianne Hackbornf66adfd2017-04-13 11:01:48 -0700193 void registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
194 void unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800195 void enterSafeMode();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700196 boolean startNextMatchingActivity(in IBinder callingActivity,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800197 in Intent intent, in Bundle options);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700198 void noteWakeupAlarm(in IIntentSender sender, int sourceUid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800199 in String sourcePkg, in String tag);
200 void removeContentProvider(in IBinder connection, boolean stable);
201 void setRequestedOrientation(in IBinder token, int requestedOrientation);
202 int getRequestedOrientation(in IBinder token);
203 void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
Dianne Hackbornf965f402017-05-04 23:27:23 -0700204 void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason);
Sudheer Shankac9d94072017-02-22 22:13:55 +0000205 void setServiceForeground(in ComponentName className, in IBinder token,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800206 int id, in Notification notification, int flags);
207 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
208 void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
209 List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700210 boolean clearApplicationUserData(in String packageName,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800211 in IPackageDataObserver observer, int userId);
212 void forceStopPackage(in String packageName, int userId);
213 boolean killPids(in int[] pids, in String reason, boolean secure);
214 List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
Robin Lee3c82d3d2017-01-19 17:09:28 +0000215 ActivityManager.TaskDescription getTaskDescription(int taskId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700216 // Retrieve running application processes in the system
Sudheer Shankaee148f92016-11-14 16:21:07 -0800217 List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700218 // Get device configuration
Sudheer Shankaee148f92016-11-14 16:21:07 -0800219 ConfigurationInfo getDeviceConfigurationInfo();
220 IBinder peekService(in Intent service, in String resolvedType, in String callingPackage);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700221 // Turn on/off profiling in a particular process.
222 boolean profileControl(in String process, int userId, boolean start,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800223 in ProfilerInfo profilerInfo, int profileType);
224 boolean shutdown(int timeout);
225 void stopAppSwitches();
226 void resumeAppSwitches();
227 boolean bindBackupAgent(in String packageName, int backupRestoreMode, int userId);
228 void backupAgentCreated(in String packageName, in IBinder agent);
229 void unbindBackupAgent(in ApplicationInfo appInfo);
230 int getUidForIntentSender(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700231 int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800232 boolean requireFull, in String name, in String callerPackage);
233 void addPackageDependency(in String packageName);
234 void killApplication(in String pkg, int appId, int userId, in String reason);
Winson Chung84deaa22017-11-02 15:57:28 -0700235 void closeSystemDialogs(in String reason);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800236 Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids);
237 void killApplicationProcess(in String processName, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700238 int startActivityIntentSender(in IApplicationThread caller,
Dianne Hackborn3e6e3852017-05-19 16:12:08 -0700239 in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
240 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800241 int flagsMask, int flagsValues, in Bundle options);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700242 void overridePendingTransition(in IBinder token, in String packageName,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800243 int enterAnim, int exitAnim);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700244 // Special low-level communication with activity manager.
245 boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800246 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
247 void killBackgroundProcesses(in String packageName, int userId);
248 boolean isUserAMonkey();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700249 WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
250 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
251 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800252 int userId);
253 boolean willActivityBeVisible(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700254 int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
255 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
256 int requestCode, int startFlags, in Configuration newConfig,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800257 in Bundle options, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700258 // Retrieve info of applications installed on external media that are currently
259 // running.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800260 List<ApplicationInfo> getRunningExternalApplications();
261 void finishHeavyWeightApp();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700262 // A StrictMode violation to be handled. The violationMask is a
263 // subset of the original StrictMode policy bitmask, with only the
264 // bit violated and penalty bits to be executed by the
265 // ActivityManagerService remaining set.
266 void handleApplicationStrictModeViolation(in IBinder app, int violationMask,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800267 in StrictMode.ViolationInfo crashInfo);
268 boolean isImmersive(in IBinder token);
269 void setImmersive(in IBinder token, boolean immersive);
270 boolean isTopActivityImmersive();
Christopher Tate8aa8fe12017-01-20 17:50:32 -0800271 void crashApplication(int uid, int initialPid, in String packageName, int userId, in String message);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800272 String getProviderMimeType(in Uri uri, int userId);
273 IBinder newUriPermissionOwner(in String name);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700274 void grantUriPermissionFromOwner(in IBinder owner, int fromUid, in String targetPkg,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800275 in Uri uri, int mode, int sourceUserId, int targetUserId);
276 void revokeUriPermissionFromOwner(in IBinder owner, in Uri uri, int mode, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700277 int checkGrantUriPermission(int callingUid, in String targetPkg, in Uri uri,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800278 int modeFlags, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700279 // Cause the specified process to dump the specified heap.
Christopher Ferris8d652f82017-04-11 16:29:18 -0700280 boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo,
281 boolean runGc, in String path, in ParcelFileDescriptor fd);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700282 int startActivities(in IApplicationThread caller, in String callingPackage,
283 in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800284 in Bundle options, int userId);
285 boolean isUserRunning(int userid, int flags);
286 oneway void activitySlept(in IBinder token);
287 int getFrontActivityScreenCompatMode();
288 void setFrontActivityScreenCompatMode(int mode);
289 int getPackageScreenCompatMode(in String packageName);
290 void setPackageScreenCompatMode(in String packageName, int mode);
291 boolean getPackageAskScreenCompat(in String packageName);
292 void setPackageAskScreenCompat(in String packageName, boolean ask);
293 boolean switchUser(int userid);
294 void setFocusedTask(int taskId);
295 boolean removeTask(int taskId);
296 void registerProcessObserver(in IProcessObserver observer);
297 void unregisterProcessObserver(in IProcessObserver observer);
298 boolean isIntentSenderTargetedToPackage(in IIntentSender sender);
299 void updatePersistentConfiguration(in Configuration values);
300 long[] getProcessPss(in int[] pids);
301 void showBootMessage(in CharSequence msg, boolean always);
302 void killAllBackgroundProcesses();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700303 ContentProviderHolder getContentProviderExternal(in String name, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800304 in IBinder token);
305 void removeContentProviderExternal(in String name, in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700306 // Get memory information about the calling process.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800307 void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
308 boolean killProcessesBelowForeground(in String reason);
309 UserInfo getCurrentUser();
310 boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700311 boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800312 in Intent resultData);
David Stevens53a39ea2017-08-23 18:41:49 -0700313 /**
314 * Informs ActivityManagerService that the keyguard is showing.
315 *
316 * @param showing True if the keyguard is showing, false otherwise.
317 * @param secondaryDisplayShowing The displayId of the secondary display on which the keyguard
318 * is showing, or INVALID_DISPLAY if there is no such display. Only meaningful if
319 * showing is true.
320 */
321 void setLockScreenShown(boolean showing, int secondaryDisplayShowing);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800322 boolean finishActivityAffinity(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700323 // This is not public because you need to be very careful in how you
324 // manage your activity to make sure it is always the uid you expect.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800325 int getLaunchedFromUid(in IBinder activityToken);
326 void unstableProviderDied(in IBinder connection);
327 boolean isIntentSenderAnActivity(in IIntentSender sender);
Suprabh Shukladb6bf662017-08-30 15:41:53 -0700328 boolean isIntentSenderAForegroundService(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700329 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
330 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
331 int requestCode, int flags, in ProfilerInfo profilerInfo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800332 in Bundle options, int userId);
333 int stopUser(int userid, boolean force, in IStopUserCallback callback);
334 void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name);
335 void unregisterUserSwitchObserver(in IUserSwitchObserver observer);
336 int[] getRunningUserIds();
Felipe Leme10bb9b52016-12-20 09:10:14 -0800337
338 // Deprecated - This method is only used by a few internal components and it will soon be
339 // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
340 // No new code should be calling it.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800341 void requestBugReport(int bugreportType);
Felipe Leme10bb9b52016-12-20 09:10:14 -0800342
Naveen Kallaca3d5432017-03-16 19:15:04 -0700343 /**
344 * Takes a telephony bug report and notifies the user with the title and description
345 * that are passed to this API as parameters
346 *
347 * @param shareTitle should be a valid legible string less than 50 chars long
348 * @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
349 *
350 * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
351 * paremeters cannot be encoding to an UTF-8 charset.
352 */
353 void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
354
Sudheer Shankaee148f92016-11-14 16:21:07 -0800355 long inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason);
356 void clearPendingBackup();
357 Intent getIntentForIntentSender(in IIntentSender sender);
358 Bundle getAssistContextExtras(int requestType);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700359 void reportAssistContextExtras(in IBinder token, in Bundle extras,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800360 in AssistStructure structure, in AssistContent content, in Uri referrer);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700361 // This is not public because you need to be very careful in how you
362 // manage your activity to make sure it is always the uid you expect.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800363 String getLaunchedFromPackage(in IBinder activityToken);
364 void killUid(int appId, int userId, in String reason);
365 void setUserIsMonkey(boolean monkey);
366 void hang(in IBinder who, boolean allowRestart);
Wale Ogunwale388945c2017-10-04 12:13:46 -0700367
368 /**
369 * Sets the windowing mode for a specific task. Only works on tasks of type
370 * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD}
371 * @param taskId The id of the task to set the windowing mode for.
372 * @param windowingMode The windowing mode to set for the task.
373 * @param toTop If the task should be moved to the top once the windowing mode changes.
374 */
375 void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800376 void moveTaskToStack(int taskId, int stackId, boolean toTop);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700377 /**
378 * Resizes the input stack id to the given bounds.
379 *
380 * @param stackId Id of the stack to resize.
381 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
382 * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
383 * active.
384 * @param preserveWindows True if the windows of activities contained in the stack should be
385 * preserved.
386 * @param animate True if the stack resize should be animated.
387 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
388 * default animation duration should be used.
389 * @throws RemoteException
390 */
391 void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800392 boolean preserveWindows, boolean animate, int animationDuration);
393 List<ActivityManager.StackInfo> getAllStackInfos();
394 void setFocusedStack(int stackId);
Wale Ogunwale68278562017-09-23 17:13:55 -0700395 ActivityManager.StackInfo getFocusedStackInfo();
396 ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800397 boolean convertFromTranslucent(in IBinder token);
398 boolean convertToTranslucent(in IBinder token, in Bundle options);
399 void notifyActivityDrawn(in IBinder token);
Jorim Jaggi4d27b842017-08-17 17:22:26 +0200400 void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800401 void restart();
402 void performIdleMaintenance();
403 void takePersistableUriPermission(in Uri uri, int modeFlags, int userId);
404 void releasePersistableUriPermission(in Uri uri, int modeFlags, int userId);
405 ParceledListSlice getPersistedUriPermissions(in String packageName, boolean incoming);
406 void appNotRespondingViaProvider(in IBinder connection);
407 Rect getTaskBounds(int taskId);
408 int getActivityDisplayId(in IBinder activityToken);
409 boolean setProcessMemoryTrimLevel(in String process, int uid, int level);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700410
411
412 // Start of L transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800413 String getTagForIntentSender(in IIntentSender sender, in String prefix);
414 boolean startUserInBackground(int userid);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800415 void startLockTaskModeByToken(in IBinder token);
Charles Heff9b4dff2017-09-22 10:18:37 +0100416 void stopLockTaskModeByToken(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800417 boolean isInLockTaskMode();
418 void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700419 int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
420 in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
421 in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800422 in Bundle options, int userId);
Winson Chung83471632016-12-13 11:02:12 -0800423 int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
424 in Intent intent, in String resolvedType, in Bundle options, int userId);
Winson Chungec1ef092017-10-25 16:22:34 -0700425 int startRecentsActivity(in IAssistDataReceiver assistDataReceiver, in Bundle options,
Winson Chunge2104682017-11-08 17:31:14 -0800426 in Bundle activityOptions, int userId);
Winson Chungec1ef092017-10-25 16:22:34 -0700427 int startActivityFromRecents(int taskId, in Bundle options);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800428 Bundle getActivityOptions(in IBinder token);
429 List<IBinder> getAppTasks(in String callingPackage);
430 void startSystemLockTaskMode(int taskId);
431 void stopSystemLockTaskMode();
432 void finishVoiceTask(in IVoiceInteractionSession session);
433 boolean isTopOfTask(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800434 void notifyLaunchTaskBehindComplete(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800435 void notifyEnterAnimationComplete(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700436 int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
437 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
438 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800439 boolean ignoreTargetSecurity, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700440 int addAppTask(in IBinder activityToken, in Intent intent,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800441 in ActivityManager.TaskDescription description, in Bitmap thumbnail);
442 Point getAppTaskThumbnailSize();
443 boolean releaseActivityInstance(in IBinder token);
444 void releaseSomeActivities(in IApplicationThread app);
445 void bootAnimationComplete();
446 Bitmap getTaskDescriptionIcon(in String filename, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700447 boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800448 in Bundle args);
449 void startInPlaceAnimationOnFrontMostApplication(in Bundle opts);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700450 int checkPermissionWithToken(in String permission, int pid, int uid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800451 in IBinder callerToken);
452 void registerTaskStackListener(in ITaskStackListener listener);
Winson Chungaa357452017-10-31 11:35:30 -0700453 void unregisterTaskStackListener(in ITaskStackListener listener);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700454
Sudheer Shankaee148f92016-11-14 16:21:07 -0800455 void notifyCleartextNetwork(int uid, in byte[] firstPacket);
Andrii Kulian94e82d9b02017-07-13 15:33:06 -0700456 int createStackOnDisplay(int displayId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800457 void setTaskResizeable(int taskId, int resizeableMode);
Winson Chungda2818f2017-10-23 16:25:49 -0700458 boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver,
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700459 in Bundle receiverExtras, in IBinder activityToken,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800460 boolean focused, boolean newSessionId);
461 void resizeTask(int taskId, in Rect bounds, int resizeMode);
462 int getLockTaskModeState();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700463 void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800464 in String reportPackage);
465 void dumpHeapFinished(in String path);
466 void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
467 void updateLockTaskPackages(int userId, in String[] packages);
468 void noteAlarmStart(in IIntentSender sender, int sourceUid, in String tag);
469 void noteAlarmFinish(in IIntentSender sender, int sourceUid, in String tag);
470 int getPackageProcessState(in String packageName, in String callingPackage);
471 oneway void showLockTaskEscapeMessage(in IBinder token);
472 void updateDeviceOwner(in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700473 /**
474 * Notify the system that the keyguard is going away.
475 *
476 * @param flags See {@link android.view.WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
477 * etc.
478 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800479 void keyguardGoingAway(int flags);
Dianne Hackborn83249ec2017-04-12 10:54:03 -0700480 int getUidProcessState(int uid, in String callingPackage);
Dianne Hackborn5614bf52016-11-07 17:26:41 -0800481 void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800482 String callingPackage);
483 void unregisterUidObserver(in IUidObserver observer);
484 boolean isAssistDataAllowedOnCurrentActivity();
485 boolean showAssistFromActivity(in IBinder token, in Bundle args);
486 boolean isRootVoiceInteraction(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700487
488
489 // Start of N transactions
490 // Start Binder transaction tracking for all applications.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800491 boolean startBinderTracking();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700492 // Stop Binder transaction tracking for all applications and dump trace data to the given file
493 // descriptor.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800494 boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
Andrii Kuliand2765632016-12-12 22:26:34 -0800495 /**
496 * Try to place task to provided position. The final position might be different depending on
497 * current user and stacks state. The task will be moved to target stack if it's currently in
498 * different stack.
499 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800500 void positionTaskInStack(int taskId, int stackId, int position);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800501 void exitFreeformMode(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700502 void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800503 in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
Matthew Ngbf155872017-10-27 15:24:39 -0700504 boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
505 boolean animate, in Rect initialBounds);
Wale Ogunwale89be5762017-10-04 13:27:49 -0700506 /**
507 * Dismisses split-screen multi-window mode.
508 * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
509 */
510 void dismissSplitScreenMode(boolean toTop);
511 /**
512 * Dismisses PiP
513 * @param animate True if the dismissal should be animated.
514 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
515 * default animation duration should be used.
516 */
517 void dismissPip(boolean animate, int animationDuration);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800518 void suppressResizeConfigChanges(boolean suppress);
519 void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
520 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
Dianne Hackbornc3af19a2017-01-20 17:00:44 -0800521 boolean isAppStartModeDisabled(int uid, in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700522 boolean unlockUser(int userid, in byte[] token, in byte[] secret,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800523 in IProgressListener listener);
524 boolean isInMultiWindowMode(in IBinder token);
525 boolean isInPictureInPictureMode(in IBinder token);
526 void killPackageDependents(in String packageName, int userId);
Winson Chung709904f2017-04-25 11:00:48 -0700527 boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
528 void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
529 int getMaxNumPictureInPictureActions(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800530 void activityRelaunched(in IBinder token);
531 IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700532 /**
533 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
534 *
535 * @param dockedBounds The bounds for the docked stack.
536 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
537 * might be different from the stack bounds to allow more
538 * flexibility while resizing, or {@code null} if they should be the
539 * same as the stack bounds.
540 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
541 * When resizing, we usually "freeze" the layout of a task. To
542 * achieve that, we also need to "freeze" the insets, which
543 * gets achieved by changing task bounds but not bounds used
544 * to calculate the insets in this transient state
545 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
546 * {@code null} if they should be the same as the stack bounds.
547 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
548 * stacks.
549 * @throws RemoteException
550 */
551 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
552 in Rect tempDockedTaskInsetBounds,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800553 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
554 int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700555 // Gets the URI permissions granted to an arbitrary package.
556 // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
557 // granted to another packages (instead of those granted to it).
Sudheer Shankaee148f92016-11-14 16:21:07 -0800558 ParceledListSlice getGrantedUriPermissions(in String packageName, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700559 // Clears the URI permissions granted to an arbitrary package.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800560 void clearGrantedUriPermissions(in String packageName, int userId);
561 boolean isAppForeground(int uid);
562 void startLocalVoiceInteraction(in IBinder token, in Bundle options);
563 void stopLocalVoiceInteraction(in IBinder token);
564 boolean supportsLocalVoiceInteraction();
Winson Chung85d39982017-02-24 15:21:25 -0800565 void notifyPinnedStackAnimationStarted();
Sudheer Shankaee148f92016-11-14 16:21:07 -0800566 void notifyPinnedStackAnimationEnded();
567 void removeStack(int stackId);
Wale Ogunwale68278562017-09-23 17:13:55 -0700568 /**
569 * Removes stacks in the input windowing modes from the system if they are of activity type
570 * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
571 */
572 void removeStacksInWindowingModes(in int[] windowingModes);
573 /** Removes stack of the activity types from the system. */
574 void removeStacksWithActivityTypes(in int[] activityTypes);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800575 void makePackageIdle(String packageName, int userId);
576 int getMemoryTrimLevel();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700577 /**
578 * Resizes the pinned stack.
579 *
580 * @param pinnedBounds The bounds for the pinned stack.
581 * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
582 * might be different from the stack bounds to allow more
583 * flexibility while resizing, or {@code null} if they should be the
584 * same as the stack bounds.
585 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800586 void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
587 boolean isVrModePackageEnabled(in ComponentName packageName);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800588 void notifyLockedProfile(int userId);
Robin Lee5d592422017-01-18 13:48:15 +0000589 void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800590 void sendIdleJobTrigger();
Dianne Hackborn98305522017-05-05 17:53:53 -0700591 int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code,
592 in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800593 in String requiredPermission, in Bundle options);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700594
595
596 // Start of N MR1 transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800597 void setVrThread(int tid);
598 void setRenderThread(int tid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700599 /**
600 * Lets activity manager know whether the calling process is currently showing "top-level" UI
601 * that is not an activity, i.e. windows on the screen the user is currently interacting with.
602 *
603 * <p>This flag can only be set for persistent processes.
604 *
605 * @param hasTopUi Whether the calling process has "top-level" UI.
606 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800607 void setHasTopUi(boolean hasTopUi);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700608
609 // Start of O transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800610 void requestActivityRelaunch(in IBinder token);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700611 /**
612 * Updates override configuration applied to specific display.
613 * @param values Update values for display configuration. If null is passed it will request the
614 * Window Manager to compute new config for the specified display.
615 * @param displayId Id of the display to apply the config to.
616 * @throws RemoteException
617 * @return Returns true if the configuration was updated.
618 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800619 boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800620 void moveStackToDisplay(int stackId, int displayId);
Winson Chungda2818f2017-10-23 16:25:49 -0700621 boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras,
Svet Ganovfd31f852017-04-26 15:54:27 -0700622 in IBinder activityToken, int flags);
Jorim Jaggi241ae102016-11-02 21:57:33 -0700623 void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback);
Andrew Scull85a63bc2016-10-24 13:47:47 +0100624 int restartUserInBackground(int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700625
Wale Ogunwalee1fe7fa22016-12-15 18:27:00 -0800626 /** Cancels the window transitions for the given task. */
627 void cancelTaskWindowTransition(int taskId);
628
629 /** Cancels the thumbnail transitions for the given task. */
630 void cancelTaskThumbnailTransition(int taskId);
631
Jorim Jaggi02886a82016-12-06 09:10:06 -0800632 /**
Svet Ganovfd31f852017-04-26 15:54:27 -0700633 * @param taskId the id of the task to retrieve the sAutoapshots for
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100634 * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
635 * a reduced resolution of it, which is much faster
Jorim Jaggi02886a82016-12-06 09:10:06 -0800636 * @return a graphic buffer representing a screenshot of a task
637 */
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100638 ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
Jorim Jaggi02886a82016-12-06 09:10:06 -0800639
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100640 void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
Craig Donnerdc4796c2017-03-08 09:51:47 -0800641 void setPersistentVrThread(int tid);
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100642
Sudheer Shanka84a48952017-03-08 18:19:01 -0800643 void waitForNetworkStateUpdate(long procStateSeq);
644
Jorim Jaggi0fe7ce962017-02-22 16:45:48 +0100645 /**
646 * See {@link android.app.Activity#setDisablePreviewScreenshots}
647 */
648 void setDisablePreviewScreenshots(IBinder token, boolean disable);
649
Tony Makec319ab2017-03-28 18:50:01 +0100650 /**
651 * Return the user id of last resumed activity.
652 */
653 int getLastResumedActivityUserId();
654
Christopher Tate424b03f2017-04-04 14:23:44 -0700655 /**
656 * Add a bare uid to the background restrictions whitelist. Only the system uid may call this.
657 */
Charles Hee078db72017-10-19 18:03:20 +0100658 void backgroundWhitelistUid(int uid);
659
660 // Start of P transactions
661 void updateLockTaskFeatures(int userId, int flags);
Christopher Tate424b03f2017-04-04 14:23:44 -0700662
Sudheer Shankaee148f92016-11-14 16:21:07 -0800663 // WARNING: when these transactions are updated, check if they are any callers on the native
Sudheer Shanka027a33d2016-11-23 15:24:51 -0800664 // side. If so, make sure they are using the correct transaction ids and arguments.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800665 // If a transaction which will also be used on the native side is being inserted, add it
666 // alongside with other transactions of this kind at the top of this file.
chaviw59b98852017-06-13 12:05:44 -0700667
668 void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
669 void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
Winson Chungb5c41b72016-12-07 15:00:47 -0800670}