blob: d63d37be9f2dfb63d6537b5bf1c09ca4dc48e4bf [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;
23import android.app.IActivityContainer;
24import android.app.IActivityContainerCallback;
25import android.app.IActivityController;
26import android.app.IAppTask;
27import android.app.IInstrumentationWatcher;
28import android.app.IProcessObserver;
29import android.app.IServiceConnection;
30import android.app.IStopUserCallback;
31import android.app.ITaskStackListener;
32import android.app.IUiAutomationConnection;
33import android.app.IUidObserver;
34import android.app.IUserSwitchObserver;
35import android.app.Notification;
36import android.app.PendingIntent;
37import 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;
55import android.graphics.Point;
56import android.graphics.Rect;
57import android.net.Uri;
58import android.os.Bundle;
59import android.os.Debug;
60import android.os.IBinder;
61import android.os.IProgressListener;
62import android.os.ParcelFileDescriptor;
63import android.os.PersistableBundle;
64import android.os.StrictMode;
65import android.service.voice.IVoiceInteractionSession;
66import com.android.internal.app.IVoiceInteractor;
67import com.android.internal.os.IResultReceiver;
68
69import java.util.List;
70
71/**
72 * System private API for talking with the activity manager service. This
73 * provides calls from the application back to the activity manager.
74 *
75 * {@hide}
76 */
77interface IActivityManager {
78 // Please keep these transaction codes the same -- they are also
79 // sent by C++ code. when a new method is added, use the next available transaction id.
80
81 // Special low-level communication with activity manager.
82 void handleApplicationCrash(in IBinder app,
83 in ApplicationErrorReport.ParcelableCrashInfo crashInfo) = 1;
84 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
85 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
86 int flags, in ProfilerInfo profilerInfo, in Bundle options) = 2;
87 void unhandledBack() = 3;
88 ParcelFileDescriptor openContentUri(in String uriString) = 4;
89
90 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask) = 10;
91 Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
92 in IIntentReceiver receiver, in IntentFilter filter,
93 in String requiredPermission, int userId) = 11;
94 void unregisterReceiver(in IIntentReceiver receiver) = 12;
95 int broadcastIntent(in IApplicationThread caller, in Intent intent,
96 in String resolvedType, in IIntentReceiver resultTo, int resultCode,
97 in String resultData, in Bundle map, in String[] requiredPermissions,
98 int appOp, in Bundle options, boolean serialized, boolean sticky, int userId) = 13;
99 void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId) = 14;
100 oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map,
101 boolean abortBroadcast, int flags) = 15;
102 void attachApplication(in IApplicationThread app) = 16;
103 oneway void activityIdle(in IBinder token, in Configuration config,
104 in boolean stopProfiling) = 17;
105 void activityPaused(in IBinder token) = 18;
106 oneway void activityStopped(in IBinder token, in Bundle state,
107 in PersistableBundle persistentState, in CharSequence description) = 19;
108 String getCallingPackage(in IBinder token) = 20;
109 ComponentName getCallingActivity(in IBinder token) = 21;
110 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum, int flags) = 22;
111 void moveTaskToFront(int task, int flags, in Bundle options) = 23;
112 void moveTaskBackwards(int task) = 25;
113 int getTaskForActivity(in IBinder token, in boolean onlyRoot) = 26;
114 ContentProviderHolder getContentProvider(in IApplicationThread caller,
115 in String name, int userId, boolean stable) = 28;
116 void publishContentProviders(in IApplicationThread caller,
117 in List<ContentProviderHolder> providers) = 29;
118 boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta) = 30;
119 void finishSubActivity(in IBinder token, in String resultWho, int requestCode) = 31;
120 PendingIntent getRunningServiceControlPanel(in ComponentName service) = 32;
121 ComponentName startService(in IApplicationThread caller, in Intent service,
122 in String resolvedType, in String callingPackage, int userId) = 33;
123 int stopService(in IApplicationThread caller, in Intent service,
124 in String resolvedType, int userId) = 34;
125 int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
126 in String resolvedType, in IServiceConnection connection, int flags,
127 in String callingPackage, int userId) = 35;
128 boolean unbindService(in IServiceConnection connection) = 36;
129 void publishService(in IBinder token, in Intent intent, in IBinder service) = 37;
130 void activityResumed(in IBinder token) = 38;
131 void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent) = 41;
132 void setAlwaysFinish(boolean enabled) = 42;
133 boolean startInstrumentation(in ComponentName className, in String profileFile,
134 int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
135 in IUiAutomationConnection connection, int userId,
136 in String abiOverride) = 43;
137 void finishInstrumentation(in IApplicationThread target, int resultCode,
138 in Bundle results) = 44;
139 /**
140 * @return A copy of global {@link Configuration}, contains general settings for the entire
141 * system. Corresponds to the configuration of the default display.
142 * @throws RemoteException
143 */
144 Configuration getConfiguration() = 45;
145 /**
146 * Updates global configuration and applies changes to the entire system.
147 * @param values Update values for global configuration. If null is passed it will request the
148 * Window Manager to compute new config for the default display.
149 * @throws RemoteException
150 * @return Returns true if the configuration was updated.
151 */
152 boolean updateConfiguration(in Configuration values) = 46;
153 boolean stopServiceToken(in ComponentName className, in IBinder token, int startId) = 47;
154 ComponentName getActivityClassForToken(in IBinder token) = 48;
155 String getPackageForToken(in IBinder token) = 49;
156 void setProcessLimit(int max) = 50;
157 int getProcessLimit() = 51;
158 int checkPermission(in String permission, int pid, int uid) = 52;
159 int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
160 in IBinder callerToken) = 53;
161 void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
162 int mode, int userId) = 54;
163 void revokeUriPermission(in IApplicationThread caller, in Uri uri, int mode, int userId) = 55;
164 void setActivityController(in IActivityController watcher, boolean imAMonkey) = 56;
165 void showWaitingForDebugger(in IApplicationThread who, boolean waiting) = 57;
166 /*
167 * This will deliver the specified signal to all the persistent processes. Currently only
168 * SIGUSR1 is delivered. All others are ignored.
169 */
170 void signalPersistentProcesses(int signal) = 58;
171 ParceledListSlice getRecentTasks(int maxNum,
172 int flags, int userId) = 59;
173 oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res) = 60;
174 oneway void activityDestroyed(in IBinder token) = 61;
175 IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
176 in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
177 int flags, in Bundle options, int userId) = 62;
178 void cancelIntentSender(in IIntentSender sender) = 63;
179 String getPackageForIntentSender(in IIntentSender sender) = 64;
180 void enterSafeMode() = 65;
181 boolean startNextMatchingActivity(in IBinder callingActivity,
182 in Intent intent, in Bundle options) = 66;
183 void noteWakeupAlarm(in IIntentSender sender, int sourceUid,
184 in String sourcePkg, in String tag) = 67;
185 void removeContentProvider(in IBinder connection, boolean stable) = 68;
186 void setRequestedOrientation(in IBinder token, int requestedOrientation) = 69;
187 int getRequestedOrientation(in IBinder token) = 70;
188 void unbindFinished(in IBinder token, in Intent service, boolean doRebind) = 71;
189 void setProcessForeground(in IBinder token, int pid, boolean isForeground) = 72;
190 void setServiceForeground(in ComponentName className, in IBinder token,
191 int id, in Notification notification, int flags) = 73;
192 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot) = 74;
193 void getMemoryInfo(out ActivityManager.MemoryInfo outInfo) = 75;
194 List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState() = 76;
195 boolean clearApplicationUserData(in String packageName,
196 in IPackageDataObserver observer, int userId) = 77;
197 void forceStopPackage(in String packageName, int userId) = 78;
198 boolean killPids(in int[] pids, in String reason, boolean secure) = 79;
199 List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags) = 80;
200 ActivityManager.TaskThumbnail getTaskThumbnail(int taskId) = 81;
201 // Retrieve running application processes in the system
202 List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses() = 82;
203 // Get device configuration
204 ConfigurationInfo getDeviceConfigurationInfo() = 83;
205 IBinder peekService(in Intent service, in String resolvedType, in String callingPackage) = 84;
206 // Turn on/off profiling in a particular process.
207 boolean profileControl(in String process, int userId, boolean start,
208 in ProfilerInfo profilerInfo, int profileType) = 85;
209 boolean shutdown(int timeout) = 86;
210 void stopAppSwitches() = 87;
211 void resumeAppSwitches() = 88;
212 boolean bindBackupAgent(in String packageName, int backupRestoreMode, int userId) = 89;
213 void backupAgentCreated(in String packageName, in IBinder agent) = 90;
214 void unbindBackupAgent(in ApplicationInfo appInfo) = 91;
215 int getUidForIntentSender(in IIntentSender sender) = 92;
216 int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
217 boolean requireFull, in String name, in String callerPackage) = 93;
218 void addPackageDependency(in String packageName) = 94;
219 void killApplication(in String pkg, int appId, int userId, in String reason) = 95;
220 void closeSystemDialogs(in String reason) = 96;
221 Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids) = 97;
222 void killApplicationProcess(in String processName, int uid) = 98;
223 int startActivityIntentSender(in IApplicationThread caller,
224 in IntentSender intent, in Intent fillInIntent, in String resolvedType,
225 in IBinder resultTo, in String resultWho, int requestCode,
226 int flagsMask, int flagsValues, in Bundle options) = 99;
227 void overridePendingTransition(in IBinder token, in String packageName,
228 int enterAnim, int exitAnim) = 100;
229 // Special low-level communication with activity manager.
230 boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
231 in ApplicationErrorReport.ParcelableCrashInfo crashInfo) = 101;
232 void killBackgroundProcesses(in String packageName, int userId) = 102;
233 boolean isUserAMonkey() = 103;
234 WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
235 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
236 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
237 int userId) = 104;
238 boolean willActivityBeVisible(in IBinder token) = 105;
239 int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
240 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
241 int requestCode, int startFlags, in Configuration newConfig,
242 in Bundle options, int userId) = 106;
243 // Retrieve info of applications installed on external media that are currently
244 // running.
245 List<ApplicationInfo> getRunningExternalApplications() = 107;
246 void finishHeavyWeightApp() = 108;
247 // A StrictMode violation to be handled. The violationMask is a
248 // subset of the original StrictMode policy bitmask, with only the
249 // bit violated and penalty bits to be executed by the
250 // ActivityManagerService remaining set.
251 void handleApplicationStrictModeViolation(in IBinder app, int violationMask,
252 in StrictMode.ViolationInfo crashInfo) = 109;
253 boolean isImmersive(in IBinder token) = 110;
254 void setImmersive(in IBinder token, boolean immersive) = 111;
255 boolean isTopActivityImmersive() = 112;
256 void crashApplication(int uid, int initialPid, in String packageName, in String message) = 113;
257 String getProviderMimeType(in Uri uri, int userId) = 114;
258 IBinder newUriPermissionOwner(in String name) = 115;
259 void grantUriPermissionFromOwner(in IBinder owner, int fromUid, in String targetPkg,
260 in Uri uri, int mode, int sourceUserId, int targetUserId) = 116;
261 void revokeUriPermissionFromOwner(in IBinder owner, in Uri uri, int mode, int userId) = 117;
262 int checkGrantUriPermission(int callingUid, in String targetPkg, in Uri uri,
263 int modeFlags, int userId) = 118;
264 // Cause the specified process to dump the specified heap.
265 boolean dumpHeap(in String process, int userId, boolean managed, in String path,
266 in ParcelFileDescriptor fd) = 119;
267 int startActivities(in IApplicationThread caller, in String callingPackage,
268 in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
269 in Bundle options, int userId) = 120;
270 boolean isUserRunning(int userid, int flags) = 121;
271 oneway void activitySlept(in IBinder token) = 122;
272 int getFrontActivityScreenCompatMode() = 123;
273 void setFrontActivityScreenCompatMode(int mode) = 124;
274 int getPackageScreenCompatMode(in String packageName) = 125;
275 void setPackageScreenCompatMode(in String packageName, int mode) = 126;
276 boolean getPackageAskScreenCompat(in String packageName) = 127;
277 void setPackageAskScreenCompat(in String packageName, boolean ask) = 128;
278 boolean switchUser(int userid) = 129;
279 void setFocusedTask(int taskId) = 130;
280 boolean removeTask(int taskId) = 131;
281 void registerProcessObserver(in IProcessObserver observer) = 132;
282 void unregisterProcessObserver(in IProcessObserver observer) = 133;
283 boolean isIntentSenderTargetedToPackage(in IIntentSender sender) = 134;
284 void updatePersistentConfiguration(in Configuration values) = 135;
285 long[] getProcessPss(in int[] pids) = 136;
286 void showBootMessage(in CharSequence msg, boolean always) = 137;
287 void killAllBackgroundProcesses() = 139;
288 ContentProviderHolder getContentProviderExternal(in String name, int userId,
289 in IBinder token) = 140;
290 void removeContentProviderExternal(in String name, in IBinder token) = 141;
291 // Get memory information about the calling process.
292 void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo) = 142;
293 boolean killProcessesBelowForeground(in String reason) = 143;
294 UserInfo getCurrentUser() = 144;
295 boolean shouldUpRecreateTask(in IBinder token, in String destAffinity) = 145;
296 boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
297 in Intent resultData) = 146;
298 void setLockScreenShown(boolean showing) = 147;
299 boolean finishActivityAffinity(in IBinder token) = 148;
300 // This is not public because you need to be very careful in how you
301 // manage your activity to make sure it is always the uid you expect.
302 int getLaunchedFromUid(in IBinder activityToken) = 149;
303 void unstableProviderDied(in IBinder connection) = 150;
304 boolean isIntentSenderAnActivity(in IIntentSender sender) = 151;
305 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
306 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
307 int requestCode, int flags, in ProfilerInfo profilerInfo,
308 in Bundle options, int userId) = 152;
309 int stopUser(int userid, boolean force, in IStopUserCallback callback) = 153;
310 void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name) = 154;
311 void unregisterUserSwitchObserver(in IUserSwitchObserver observer) = 155;
312 int[] getRunningUserIds() = 156;
313 void requestBugReport(int bugreportType) = 157;
314 long inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason) = 158;
315 void clearPendingBackup() = 159;
316 Intent getIntentForIntentSender(in IIntentSender sender) = 160;
317 Bundle getAssistContextExtras(int requestType) = 161;
318 void reportAssistContextExtras(in IBinder token, in Bundle extras,
319 in AssistStructure structure, in AssistContent content, in Uri referrer) = 162;
320 // This is not public because you need to be very careful in how you
321 // manage your activity to make sure it is always the uid you expect.
322 String getLaunchedFromPackage(in IBinder activityToken) = 163;
323 void killUid(int appId, int userId, in String reason) = 164;
324 void setUserIsMonkey(boolean monkey) = 165;
325 void hang(in IBinder who, boolean allowRestart) = 166;
326 IActivityContainer createVirtualActivityContainer(in IBinder parentActivityToken,
327 in IActivityContainerCallback callback) = 167;
328 void moveTaskToStack(int taskId, int stackId, boolean toTop) = 168;
329 /**
330 * Resizes the input stack id to the given bounds.
331 *
332 * @param stackId Id of the stack to resize.
333 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
334 * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
335 * active.
336 * @param preserveWindows True if the windows of activities contained in the stack should be
337 * preserved.
338 * @param animate True if the stack resize should be animated.
339 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
340 * default animation duration should be used.
341 * @throws RemoteException
342 */
343 void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
344 boolean preserveWindows, boolean animate, int animationDuration) = 169;
345 List<ActivityManager.StackInfo> getAllStackInfos() = 170;
346 void setFocusedStack(int stackId) = 171;
347 ActivityManager.StackInfo getStackInfo(int stackId) = 172;
348 boolean convertFromTranslucent(in IBinder token) = 173;
349 boolean convertToTranslucent(in IBinder token, in Bundle options) = 174;
350 void notifyActivityDrawn(in IBinder token) = 175;
351 void reportActivityFullyDrawn(in IBinder token) = 176;
352 void restart() = 177;
353 void performIdleMaintenance() = 178;
354 void takePersistableUriPermission(in Uri uri, int modeFlags, int userId) = 179;
355 void releasePersistableUriPermission(in Uri uri, int modeFlags, int userId) = 180;
356 ParceledListSlice getPersistedUriPermissions(in String packageName, boolean incoming) = 181;
357 void appNotRespondingViaProvider(in IBinder connection) = 182;
358 Rect getTaskBounds(int taskId) = 183;
359 int getActivityDisplayId(in IBinder activityToken) = 184;
360 boolean setProcessMemoryTrimLevel(in String process, int uid, int level) = 186;
361
362
363 // Start of L transactions
364 String getTagForIntentSender(in IIntentSender sender, in String prefix) = 210;
365 boolean startUserInBackground(int userid) = 211;
366 boolean isInHomeStack(int taskId) = 212;
367 void startLockTaskModeById(int taskId) = 213;
368 void startLockTaskModeByToken(in IBinder token) = 214;
369 void stopLockTaskMode() = 215;
370 boolean isInLockTaskMode() = 216;
371 void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values) = 217;
372 int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
373 in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
374 in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
375 in Bundle options, int userId) = 218;
376 Bundle getActivityOptions(in IBinder token) = 219;
377 List<IBinder> getAppTasks(in String callingPackage) = 220;
378 void startSystemLockTaskMode(int taskId) = 221;
379 void stopSystemLockTaskMode() = 222;
380 void finishVoiceTask(in IVoiceInteractionSession session) = 223;
381 boolean isTopOfTask(in IBinder token) = 224;
382 boolean requestVisibleBehind(in IBinder token, boolean visible) = 225;
383 boolean isBackgroundVisibleBehind(in IBinder token) = 226;
384 void backgroundResourcesReleased(in IBinder token) = 227;
385 void notifyLaunchTaskBehindComplete(in IBinder token) = 228;
386 int startActivityFromRecents(int taskId, in Bundle options) = 229;
387 void notifyEnterAnimationComplete(in IBinder token) = 230;
388 int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
389 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
390 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
391 boolean ignoreTargetSecurity, int userId) = 232;
392 int addAppTask(in IBinder activityToken, in Intent intent,
393 in ActivityManager.TaskDescription description, in Bitmap thumbnail) = 233;
394 Point getAppTaskThumbnailSize() = 234;
395 boolean releaseActivityInstance(in IBinder token) = 235;
396 void releaseSomeActivities(in IApplicationThread app) = 236;
397 void bootAnimationComplete() = 237;
398 Bitmap getTaskDescriptionIcon(in String filename, int userId) = 238;
399 boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
400 in Bundle args) = 239;
401 void startInPlaceAnimationOnFrontMostApplication(in Bundle opts) = 240;
402 int checkPermissionWithToken(in String permission, int pid, int uid,
403 in IBinder callerToken) = 241;
404 void registerTaskStackListener(in ITaskStackListener listener) = 242;
405
406
407 // Start of M transactions
408 void notifyCleartextNetwork(int uid, in byte[] firstPacket) = 280;
409 IActivityContainer createStackOnDisplay(int displayId) = 281;
410 int getFocusedStackId() = 282;
411 void setTaskResizeable(int taskId, int resizeableMode) = 283;
412 boolean requestAssistContextExtras(int requestType, in IResultReceiver receiver,
413 in Bundle receiverExtras, in IBinder activityToken,
414 boolean focused, boolean newSessionId) = 284;
415 void resizeTask(int taskId, in Rect bounds, int resizeMode) = 285;
416 int getLockTaskModeState() = 286;
417 void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
418 in String reportPackage) = 287;
419 void dumpHeapFinished(in String path) = 288;
420 void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake) = 289;
421 void updateLockTaskPackages(int userId, in String[] packages) = 290;
422 void noteAlarmStart(in IIntentSender sender, int sourceUid, in String tag) = 291;
423 void noteAlarmFinish(in IIntentSender sender, int sourceUid, in String tag) = 292;
424 int getPackageProcessState(in String packageName, in String callingPackage) = 293;
425 oneway void showLockTaskEscapeMessage(in IBinder token) = 294;
426 void updateDeviceOwner(in String packageName) = 295;
427 /**
428 * Notify the system that the keyguard is going away.
429 *
430 * @param flags See {@link android.view.WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
431 * etc.
432 */
433 void keyguardGoingAway(int flags) = 296;
Dianne Hackborn5614bf52016-11-07 17:26:41 -0800434 void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
435 String callingPackage) = 297;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700436 void unregisterUidObserver(in IUidObserver observer) = 298;
437 boolean isAssistDataAllowedOnCurrentActivity() = 299;
438 boolean showAssistFromActivity(in IBinder token, in Bundle args) = 300;
439 boolean isRootVoiceInteraction(in IBinder token) = 301;
440
441
442 // Start of N transactions
443 // Start Binder transaction tracking for all applications.
444 boolean startBinderTracking() = 340;
445 // Stop Binder transaction tracking for all applications and dump trace data to the given file
446 // descriptor.
447 boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd) = 341;
448 void positionTaskInStack(int taskId, int stackId, int position) = 342;
449 int getActivityStackId(in IBinder token) = 343;
450 void exitFreeformMode(in IBinder token) = 344;
451 void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
452 in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations) = 345;
453 boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
454 in Rect initialBounds, boolean moveHomeStackFront) = 346;
455 void suppressResizeConfigChanges(boolean suppress) = 347;
456 void moveTasksToFullscreenStack(int fromStackId, boolean onTop) = 348;
457 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds) = 349;
458 int getAppStartMode(int uid, in String packageName) = 350;
459 boolean unlockUser(int userid, in byte[] token, in byte[] secret,
460 in IProgressListener listener) = 351;
461 boolean isInMultiWindowMode(in IBinder token) = 352;
462 boolean isInPictureInPictureMode(in IBinder token) = 353;
463 void killPackageDependents(in String packageName, int userId) = 354;
464 void enterPictureInPictureMode(in IBinder token) = 355;
465 void activityRelaunched(in IBinder token) = 356;
466 IBinder getUriPermissionOwnerForActivity(in IBinder activityToken) = 357;
467 /**
468 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
469 *
470 * @param dockedBounds The bounds for the docked stack.
471 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
472 * might be different from the stack bounds to allow more
473 * flexibility while resizing, or {@code null} if they should be the
474 * same as the stack bounds.
475 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
476 * When resizing, we usually "freeze" the layout of a task. To
477 * achieve that, we also need to "freeze" the insets, which
478 * gets achieved by changing task bounds but not bounds used
479 * to calculate the insets in this transient state
480 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
481 * {@code null} if they should be the same as the stack bounds.
482 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
483 * stacks.
484 * @throws RemoteException
485 */
486 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
487 in Rect tempDockedTaskInsetBounds,
488 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds) = 358;
489 int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName) = 359;
490 // Gets the URI permissions granted to an arbitrary package.
491 // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
492 // granted to another packages (instead of those granted to it).
493 ParceledListSlice getGrantedUriPermissions(in String packageName, int userId) = 360;
494 // Clears the URI permissions granted to an arbitrary package.
495 void clearGrantedUriPermissions(in String packageName, int userId) = 361;
496 boolean isAppForeground(int uid) = 362;
497 void startLocalVoiceInteraction(in IBinder token, in Bundle options) = 363;
498 void stopLocalVoiceInteraction(in IBinder token) = 364;
499 boolean supportsLocalVoiceInteraction() = 365;
500 void notifyPinnedStackAnimationEnded() = 366;
501 void removeStack(int stackId) = 367;
Dianne Hackborne07641d2016-11-09 15:07:23 -0800502 void makePackageIdle(String packageName, int userId) = 368;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700503 int getMemoryTrimLevel() = 369;
504 /**
505 * Resizes the pinned stack.
506 *
507 * @param pinnedBounds The bounds for the pinned stack.
508 * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
509 * might be different from the stack bounds to allow more
510 * flexibility while resizing, or {@code null} if they should be the
511 * same as the stack bounds.
512 */
513 void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds) = 370;
514 boolean isVrModePackageEnabled(in ComponentName packageName) = 371;
515 /**
516 * Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the
517 * fullscreen stack into the docked stack.
518 */
519 void swapDockedAndFullscreenStack() = 372;
520 void notifyLockedProfile(int userId) = 373;
521 void startConfirmDeviceCredentialIntent(in Intent intent) = 374;
522 void sendIdleJobTrigger() = 375;
523 int sendIntentSender(in IIntentSender target, int code, in Intent intent,
524 in String resolvedType, in IIntentReceiver finishedReceiver,
525 in String requiredPermission, in Bundle options) = 376;
526
527
528 // Start of N MR1 transactions
529 void setVrThread(int tid) = 377;
530 void setRenderThread(int tid) = 378;
531 /**
532 * Lets activity manager know whether the calling process is currently showing "top-level" UI
533 * that is not an activity, i.e. windows on the screen the user is currently interacting with.
534 *
535 * <p>This flag can only be set for persistent processes.
536 *
537 * @param hasTopUi Whether the calling process has "top-level" UI.
538 */
539 void setHasTopUi(boolean hasTopUi) = 379;
540 /**
541 * Returns if the target of the PendingIntent can be fired directly, without triggering
542 * a work profile challenge. This can happen if the PendingIntent is to start direct-boot
543 * aware activities, and the target user is in RUNNING_LOCKED state, i.e. we should allow
544 * direct-boot aware activity to bypass work challenge when the user hasn't unlocked yet.
545 * @param intent the {@link PendingIntent} to be tested.
546 * @return {@code true} if the intent should not trigger a work challenge, {@code false}
547 * otherwise.
548 * @throws RemoteException
549 */
550 boolean canBypassWorkChallenge(in PendingIntent intent) = 380;
551
552 // Start of O transactions
553 void requestActivityRelaunch(in IBinder token) = 400;
554 /**
555 * Updates override configuration applied to specific display.
556 * @param values Update values for display configuration. If null is passed it will request the
557 * Window Manager to compute new config for the specified display.
558 * @param displayId Id of the display to apply the config to.
559 * @throws RemoteException
560 * @return Returns true if the configuration was updated.
561 */
562 boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId) = 401;
563 void unregisterTaskStackListener(ITaskStackListener listener) = 402;
564 void moveStackToDisplay(int stackId, int displayId) = 403;
Winson Chung84a38342016-11-08 16:15:10 -0800565 void enterPictureInPictureModeWithAspectRatio(in IBinder token, float aspectRatio) = 404;
566 void setPictureInPictureAspectRatio(in IBinder token, float aspectRatio) = 405;
Felipe Leme29a5b0d2016-10-25 14:57:11 -0700567 boolean requestAutoFillData(in IResultReceiver receiver, in Bundle receiverExtras,
568 in IBinder activityToken) = 406;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700569
570 // Please keep these transaction codes the same -- they are also
571 // sent by C++ code. when a new method is added, use the next available transaction id.
Winson Chung84a38342016-11-08 16:15:10 -0800572}