blob: b262a006a545cd3fb3dcedce5f4c189d518a41b6 [file] [log] [blame]
Wale Ogunwale6767eae2018-05-03 15:52:51 -07001/*
2 * Copyright (C) 2018 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
Wale Ogunwale9e4f3e02018-05-17 09:35:39 -070017package com.android.server.wm;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070018
19import android.annotation.NonNull;
20import android.annotation.Nullable;
Wale Ogunwale31913b52018-10-13 08:29:31 -070021import android.annotation.UserIdInt;
Winson Chung3fb0f252019-01-08 17:41:55 -080022import android.app.ActivityManager;
Wale Ogunwale9e4f3e02018-05-17 09:35:39 -070023import android.app.AppProtoEnums;
24import android.app.IActivityManager;
25import android.app.IApplicationThread;
Wale Ogunwale1f5e53d2018-11-05 05:12:46 -080026import android.app.ProfilerInfo;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070027import android.content.ComponentName;
Wale Ogunwaleee6eca12018-09-19 20:37:53 -070028import android.content.IIntentSender;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070029import android.content.Intent;
Wale Ogunwale53783742018-09-16 10:21:51 -070030import android.content.pm.ApplicationInfo;
31import android.content.res.CompatibilityInfo;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070032import android.os.Bundle;
33import android.os.IBinder;
Wale Ogunwale31913b52018-10-13 08:29:31 -070034import android.os.RemoteException;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070035import android.os.SystemClock;
36import android.service.voice.IVoiceInteractionSession;
37import android.util.SparseIntArray;
Wale Ogunwale31913b52018-10-13 08:29:31 -070038import android.util.proto.ProtoOutputStream;
Louis Chang89f43fc2018-10-05 10:59:14 +080039
Wale Ogunwale6767eae2018-05-03 15:52:51 -070040import com.android.internal.app.IVoiceInteractor;
Wale Ogunwaleee6eca12018-09-19 20:37:53 -070041import com.android.server.am.PendingIntentRecord;
Wale Ogunwale31913b52018-10-13 08:29:31 -070042import com.android.server.am.UserState;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070043
Wale Ogunwale31913b52018-10-13 08:29:31 -070044import java.io.FileDescriptor;
45import java.io.PrintWriter;
Wale Ogunwaleee6eca12018-09-19 20:37:53 -070046import java.lang.ref.WeakReference;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070047import java.util.List;
Wale Ogunwale31913b52018-10-13 08:29:31 -070048import java.util.Set;
Wale Ogunwale6767eae2018-05-03 15:52:51 -070049
50/**
51 * Activity Task manager local system service interface.
52 * @hide Only for use within system server
53 */
54public abstract class ActivityTaskManagerInternal {
55
56 /**
57 * Type for {@link #notifyAppTransitionStarting}: The transition was started because we drew
58 * the splash screen.
59 */
60 public static final int APP_TRANSITION_SPLASH_SCREEN =
61 AppProtoEnums.APP_TRANSITION_SPLASH_SCREEN; // 1
62
63 /**
64 * Type for {@link #notifyAppTransitionStarting}: The transition was started because we all
65 * app windows were drawn
66 */
67 public static final int APP_TRANSITION_WINDOWS_DRAWN =
68 AppProtoEnums.APP_TRANSITION_WINDOWS_DRAWN; // 2
69
70 /**
71 * Type for {@link #notifyAppTransitionStarting}: The transition was started because of a
72 * timeout.
73 */
74 public static final int APP_TRANSITION_TIMEOUT =
75 AppProtoEnums.APP_TRANSITION_TIMEOUT; // 3
76
77 /**
78 * Type for {@link #notifyAppTransitionStarting}: The transition was started because of a
79 * we drew a task snapshot.
80 */
81 public static final int APP_TRANSITION_SNAPSHOT =
82 AppProtoEnums.APP_TRANSITION_SNAPSHOT; // 4
83
84 /**
85 * Type for {@link #notifyAppTransitionStarting}: The transition was started because it was a
86 * recents animation and we only needed to wait on the wallpaper.
87 */
88 public static final int APP_TRANSITION_RECENTS_ANIM =
89 AppProtoEnums.APP_TRANSITION_RECENTS_ANIM; // 5
90
91 /**
92 * The bundle key to extract the assist data.
93 */
94 public static final String ASSIST_KEY_DATA = "data";
95
96 /**
97 * The bundle key to extract the assist structure.
98 */
99 public static final String ASSIST_KEY_STRUCTURE = "structure";
100
101 /**
102 * The bundle key to extract the assist content.
103 */
104 public static final String ASSIST_KEY_CONTENT = "content";
105
106 /**
107 * The bundle key to extract the assist receiver extras.
108 */
109 public static final String ASSIST_KEY_RECEIVER_EXTRAS = "receiverExtras";
110
111 public interface ScreenObserver {
112 void onAwakeStateChanged(boolean isAwake);
113 void onKeyguardStateChanged(boolean isShowing);
114 }
115
116 /**
117 * Sleep tokens cause the activity manager to put the top activity to sleep.
118 * They are used by components such as dreams that may hide and block interaction
119 * with underlying activities.
120 */
121 public static abstract class SleepToken {
122
123 /** Releases the sleep token. */
124 public abstract void release();
125 }
126
127 /**
128 * Acquires a sleep token for the specified display with the specified tag.
129 *
130 * @param tag A string identifying the purpose of the token (eg. "Dream").
131 * @param displayId The display to apply the sleep token to.
132 */
133 public abstract SleepToken acquireSleepToken(@NonNull String tag, int displayId);
134
135 /**
136 * Returns home activity for the specified user.
137 *
138 * @param userId ID of the user or {@link android.os.UserHandle#USER_ALL}
139 */
140 public abstract ComponentName getHomeActivityForUser(int userId);
141
142 public abstract void onLocalVoiceInteractionStarted(IBinder callingActivity,
143 IVoiceInteractionSession mSession,
144 IVoiceInteractor mInteractor);
145
146 /**
147 * Callback for window manager to let activity manager know that we are finally starting the
148 * app transition;
149 *
150 * @param reasons A map from windowing mode to a reason integer why the transition was started,
151 * which must be one of the APP_TRANSITION_* values.
152 * @param timestamp The time at which the app transition started in
153 * {@link SystemClock#uptimeMillis()} timebase.
154 */
155 public abstract void notifyAppTransitionStarting(SparseIntArray reasons, long timestamp);
156
157 /**
158 * Callback for window manager to let activity manager know that the app transition was
159 * cancelled.
160 */
161 public abstract void notifyAppTransitionCancelled();
162
163 /**
164 * Callback for window manager to let activity manager know that the app transition is finished.
165 */
166 public abstract void notifyAppTransitionFinished();
167
168 /**
169 * Returns the top activity from each of the currently visible stacks. The first entry will be
170 * the focused activity.
171 */
172 public abstract List<IBinder> getTopVisibleActivities();
173
174 /**
175 * Callback for window manager to let activity manager know that docked stack changes its
176 * minimized state.
177 */
178 public abstract void notifyDockedStackMinimizedChanged(boolean minimized);
179
180 /**
181 * Start activity {@code intents} as if {@code packageName} on user {@code userId} did it.
182 *
183 * - DO NOT call it with the calling UID cleared.
184 * - All the necessary caller permission checks must be done at callsites.
185 *
186 * @return error codes used by {@link IActivityManager#startActivity} and its siblings.
187 */
188 public abstract int startActivitiesAsPackage(String packageName,
189 int userId, Intent[] intents, Bundle bOptions);
190
191 /**
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700192 * Start intents as a package.
193 *
194 * @param uid Make a call as if this UID did.
Michal Karpinski84d9ebd2019-01-17 18:28:59 +0000195 * @param realCallingPid PID of the real caller.
196 * @param realCallingUid UID of the real caller.
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700197 * @param callingPackage Make a call as if this package did.
198 * @param intents Intents to start.
199 * @param userId Start the intents on this user.
200 * @param validateIncomingUser Set true to skip checking {@code userId} with the calling UID.
201 * @param originatingPendingIntent PendingIntentRecord that originated this activity start or
202 * null if not originated by PendingIntent
Michal Karpinskiac116df2018-12-10 17:51:42 +0000203 * @param allowBackgroundActivityStart Whether the background activity start should be allowed
204 * from originatingPendingIntent
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700205 */
Michal Karpinski84d9ebd2019-01-17 18:28:59 +0000206 public abstract int startActivitiesInPackage(int uid, int realCallingPid, int realCallingUid,
207 String callingPackage, Intent[] intents, String[] resolvedTypes, IBinder resultTo,
208 SafeActivityOptions options, int userId, boolean validateIncomingUser,
209 PendingIntentRecord originatingPendingIntent,
Michal Karpinskiac116df2018-12-10 17:51:42 +0000210 boolean allowBackgroundActivityStart);
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700211
212 public abstract int startActivityInPackage(int uid, int realCallingPid, int realCallingUid,
213 String callingPackage, Intent intent, String resolvedType, IBinder resultTo,
214 String resultWho, int requestCode, int startFlags, SafeActivityOptions options,
215 int userId, TaskRecord inTask, String reason, boolean validateIncomingUser,
Michal Karpinskiac116df2018-12-10 17:51:42 +0000216 PendingIntentRecord originatingPendingIntent, boolean allowBackgroundActivityStart);
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700217
218 /**
Wale Ogunwale6767eae2018-05-03 15:52:51 -0700219 * Start activity {@code intent} without calling user-id check.
220 *
221 * - DO NOT call it with the calling UID cleared.
222 * - The caller must do the calling user ID check.
223 *
224 * @return error codes used by {@link IActivityManager#startActivity} and its siblings.
225 */
226 public abstract int startActivityAsUser(IApplicationThread caller, String callingPackage,
227 Intent intent, @Nullable Bundle options, int userId);
228
229 /**
230 * Called when Keyguard flags might have changed.
231 *
232 * @param callback Callback to run after activity visibilities have been reevaluated. This can
233 * be used from window manager so that when the callback is called, it's
234 * guaranteed that all apps have their visibility updated accordingly.
lumark588a3e82018-07-20 18:53:54 +0800235 * @param displayId The id of the display where the keyguard flags changed.
Wale Ogunwale6767eae2018-05-03 15:52:51 -0700236 */
lumark588a3e82018-07-20 18:53:54 +0800237 public abstract void notifyKeyguardFlagsChanged(@Nullable Runnable callback, int displayId);
Wale Ogunwale6767eae2018-05-03 15:52:51 -0700238
239 /**
240 * Called when the trusted state of Keyguard has changed.
241 */
242 public abstract void notifyKeyguardTrustedChanged();
243
244 /**
245 * Called after virtual display Id is updated by
246 * {@link com.android.server.vr.Vr2dDisplay} with a specific
247 * {@param vr2dDisplayId}.
248 */
249 public abstract void setVr2dDisplayId(int vr2dDisplayId);
250
251 /**
252 * Set focus on an activity.
253 * @param token The IApplicationToken for the activity
254 */
255 public abstract void setFocusedActivity(IBinder token);
256
Wale Ogunwale6767eae2018-05-03 15:52:51 -0700257 public abstract void registerScreenObserver(ScreenObserver observer);
258
259 /**
260 * Returns is the caller has the same uid as the Recents component
261 */
262 public abstract boolean isCallerRecents(int callingUid);
263
264 /**
265 * Returns whether the recents component is the home activity for the given user.
266 */
267 public abstract boolean isRecentsComponentHomeActivity(int userId);
268
269 /**
270 * Cancels any currently running recents animation.
271 */
272 public abstract void cancelRecentsAnimation(boolean restoreHomeStackPosition);
273
274 /**
275 * This enforces {@code func} can only be called if either the caller is Recents activity or
276 * has {@code permission}.
277 */
278 public abstract void enforceCallerIsRecentsOrHasPermission(String permission, String func);
279
Wale Ogunwaled0412b32018-05-08 09:25:50 -0700280 /**
281 * Called after the voice interaction service has changed.
282 */
283 public abstract void notifyActiveVoiceInteractionServiceChanged(ComponentName component);
284
Wale Ogunwalea6191b42018-05-09 07:41:32 -0700285 /**
286 * Set a uid that is allowed to bypass stopped app switches, launching an app
287 * whenever it wants.
288 *
289 * @param type Type of the caller -- unique string the caller supplies to identify itself
290 * and disambiguate with other calles.
291 * @param uid The uid of the app to be allowed, or -1 to clear the uid for this type.
292 * @param userId The user it is allowed for.
293 */
294 public abstract void setAllowAppSwitches(@NonNull String type, int uid, int userId);
295
296 /**
297 * Called when a user has been deleted. This can happen during normal device usage
298 * or just at startup, when partially removed users are purged. Any state persisted by the
299 * ActivityManager should be purged now.
300 *
301 * @param userId The user being cleaned up.
302 */
303 public abstract void onUserStopped(int userId);
304 public abstract boolean isGetTasksAllowed(String caller, int callingPid, int callingUid);
Wale Ogunwale9e4f3e02018-05-17 09:35:39 -0700305
306 public abstract void onProcessAdded(WindowProcessController proc);
307 public abstract void onProcessRemoved(String name, int uid);
308 public abstract void onCleanUpApplicationRecord(WindowProcessController proc);
Wale Ogunwalef6733932018-06-27 05:14:34 -0700309 public abstract int getTopProcessState();
Wale Ogunwale53783742018-09-16 10:21:51 -0700310 public abstract boolean isHeavyWeightProcess(WindowProcessController proc);
311 public abstract void clearHeavyWeightProcessIfEquals(WindowProcessController proc);
312 public abstract void finishHeavyWeightApp();
Wale Ogunwalef6733932018-06-27 05:14:34 -0700313
314 public abstract boolean isSleeping();
315 public abstract boolean isShuttingDown();
316 public abstract boolean shuttingDown(boolean booted, int timeout);
317 public abstract void enableScreenAfterBoot(boolean booted);
318 public abstract boolean showStrictModeViolationDialog();
319 public abstract void showSystemReadyErrorDialogsIfNeeded();
Wale Ogunwale906f9c62018-07-23 11:23:44 -0700320
Wale Ogunwale906f9c62018-07-23 11:23:44 -0700321 public abstract void onProcessMapped(int pid, WindowProcessController proc);
322 public abstract void onProcessUnMapped(int pid);
Wale Ogunwale008163e2018-07-23 23:11:08 -0700323
324 public abstract void onPackageDataCleared(String name);
325 public abstract void onPackageUninstalled(String name);
Wale Ogunwale53783742018-09-16 10:21:51 -0700326 public abstract void onPackageAdded(String name, boolean replacing);
Wale Ogunwale31913b52018-10-13 08:29:31 -0700327 public abstract void onPackageReplaced(ApplicationInfo aInfo);
Wale Ogunwale53783742018-09-16 10:21:51 -0700328
329 public abstract CompatibilityInfo compatibilityInfoForPackage(ApplicationInfo ai);
Yunfan Chen75157d72018-07-27 14:47:21 +0900330
331 /**
332 * Set the corresponding display information for the process global configuration. To be called
333 * when we need to show IME on a different display.
334 *
335 * @param pid The process id associated with the IME window.
336 * @param displayId The ID of the display showing the IME.
337 */
338 public abstract void onImeWindowSetOnDisplay(int pid, int displayId);
Wale Ogunwaleee6eca12018-09-19 20:37:53 -0700339
340 public abstract void sendActivityResult(int callingUid, IBinder activityToken,
341 String resultWho, int requestCode, int resultCode, Intent data);
342 public abstract void clearPendingResultForActivity(
343 IBinder activityToken, WeakReference<PendingIntentRecord> pir);
344 public abstract IIntentSender getIntentSender(int type, String packageName,
345 int callingUid, int userId, IBinder token, String resultWho,
346 int requestCode, Intent[] intents, String[] resolvedTypes, int flags,
347 Bundle bOptions);
Wale Ogunwalec4e63a42018-10-02 13:19:54 -0700348
349 /** @return the service connection holder for a given activity token. */
350 public abstract ActivityServiceConnectionsHolder getServiceConnectionsHolder(IBinder token);
Wale Ogunwale214f3482018-10-04 11:00:47 -0700351
352 /** @return The intent used to launch the home activity. */
353 public abstract Intent getHomeIntent();
354 public abstract boolean startHomeActivity(int userId, String reason);
Chilun8b1f1be2019-03-13 17:14:36 +0800355 /**
356 * This starts home activity on displays that can have system decorations based on displayId -
357 * Default display always use primary home component.
358 * For Secondary displays, the home activity must have category SECONDARY_HOME and then resolves
359 * according to the priorities listed below.
360 * - If default home is not set, always use the secondary home defined in the config.
361 * - Use currently selected primary home activity.
362 * - Use the activity in the same package as currently selected primary home activity.
363 * If there are multiple activities matched, use first one.
364 * - Use the secondary home defined in the config.
365 */
366 public abstract boolean startHomeOnDisplay(int userId, String reason, int displayId,
367 boolean fromHomeKey);
Louis Chang89f43fc2018-10-05 10:59:14 +0800368 /** Start home activities on all displays that support system decorations. */
369 public abstract boolean startHomeOnAllDisplays(int userId, String reason);
Wale Ogunwale214f3482018-10-04 11:00:47 -0700370 /** @return true if the given process is the factory test process. */
371 public abstract boolean isFactoryTestProcess(WindowProcessController wpc);
372 public abstract void updateTopComponentForFactoryTest();
Wale Ogunwale31913b52018-10-13 08:29:31 -0700373 public abstract void handleAppDied(WindowProcessController wpc, boolean restarting,
374 Runnable finishInstrumentationCallback);
375 public abstract void closeSystemDialogs(String reason);
376
377 /** Removes all components (e.g. activities, recents, ...) belonging to a disabled package. */
378 public abstract void cleanupDisabledPackageComponents(
379 String packageName, Set<String> disabledClasses, int userId, boolean booted);
380
381 /** Called whenever AM force stops a package. */
382 public abstract boolean onForceStopPackage(String packageName, boolean doit,
383 boolean evenPersistent, int userId);
384 /**
385 * Resumes all top activities in the system if they aren't resumed already.
386 * @param scheduleIdle If the idle message should be schedule after the top activities are
387 * resumed.
388 */
389 public abstract void resumeTopActivities(boolean scheduleIdle);
390
391 /** Called by AM just before it binds to an application process. */
392 public abstract void preBindApplication(WindowProcessController wpc);
393
394 /** Called by AM when an application process attaches. */
395 public abstract boolean attachApplication(WindowProcessController wpc) throws RemoteException;
396
397 /** @see IActivityManager#notifyLockedProfile(int) */
398 public abstract void notifyLockedProfile(@UserIdInt int userId, int currentUserId);
399
400 /** @see IActivityManager#startConfirmDeviceCredentialIntent(Intent, Bundle) */
401 public abstract void startConfirmDeviceCredentialIntent(Intent intent, Bundle options);
402
403 /** Writes current activity states to the proto stream. */
404 public abstract void writeActivitiesToProto(ProtoOutputStream proto);
405
406 /**
407 * Saves the current activity manager state and includes the saved state in the next dump of
408 * activity manager.
409 */
410 public abstract void saveANRState(String reason);
411
412 /** Clears the previously saved activity manager ANR state. */
413 public abstract void clearSavedANRState();
414
415 /** Dump the current state based on the command. */
416 public abstract void dump(String cmd, FileDescriptor fd, PrintWriter pw, String[] args,
417 int opti, boolean dumpAll, boolean dumpClient, String dumpPackage);
418
419 /** Dump the current state for inclusion in process dump. */
420 public abstract boolean dumpForProcesses(FileDescriptor fd, PrintWriter pw, boolean dumpAll,
421 String dumpPackage, int dumpAppId, boolean needSep, boolean testPssMode,
422 int wakefulness);
423
424 /** Writes the current window process states to the proto stream. */
sanryhuang498e77e2018-12-06 14:57:01 +0800425 public abstract void writeProcessesToProto(ProtoOutputStream proto, String dumpPackage,
426 int wakeFullness, boolean testPssMode);
Wale Ogunwale31913b52018-10-13 08:29:31 -0700427
428 /** Dump the current activities state. */
429 public abstract boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name,
430 String[] args, int opti, boolean dumpAll, boolean dumpVisibleStacksOnly,
431 boolean dumpFocusedStackOnly);
432
Wale Ogunwaled4d67d02018-10-25 18:09:39 -0700433 /** Dump the current state for inclusion in oom dump. */
434 public abstract void dumpForOom(PrintWriter pw);
435
Wale Ogunwale31913b52018-10-13 08:29:31 -0700436 /** @return true if it the activity management system is okay with GC running now. */
437 public abstract boolean canGcNow();
438
439 /** @return the process for the top-most resumed activity in the system. */
440 public abstract WindowProcessController getTopApp();
441
442 /** Generate oom-score-adjustment rank for all tasks in the system based on z-order. */
443 public abstract void rankTaskLayersIfNeeded();
444
445 /** Destroy all activities. */
446 public abstract void scheduleDestroyAllActivities(String reason);
447
448 /** Remove user association with activities. */
449 public abstract void removeUser(int userId);
450
451 /** Switch current focused user for activities. */
452 public abstract boolean switchUser(int userId, UserState userState);
453
454 /** Called whenever an app crashes. */
455 public abstract void onHandleAppCrash(WindowProcessController wpc);
Wale Ogunwale64258362018-10-16 15:13:37 -0700456
457 /**
458 * Finish the topmost activities in all stacks that belong to the crashed app.
459 * @param crashedApp The app that crashed.
460 * @param reason Reason to perform this action.
461 * @return The task id that was finished in this stack, or INVALID_TASK_ID if none was finished.
462 */
463 public abstract int finishTopCrashedActivities(
464 WindowProcessController crashedApp, String reason);
Wale Ogunwalebff2df42018-10-18 17:09:19 -0700465
466 public abstract void onUidActive(int uid, int procState);
467 public abstract void onUidInactive(int uid);
468 public abstract void onActiveUidsCleared();
469 public abstract void onUidProcStateChanged(int uid, int procState);
Wale Ogunwale9de19442018-10-18 19:05:03 -0700470
471 public abstract void onUidAddedToPendingTempWhitelist(int uid, String tag);
472 public abstract void onUidRemovedFromPendingTempWhitelist(int uid);
Wale Ogunwalee2172292018-10-25 10:11:10 -0700473
474 /** Handle app crash event in {@link android.app.IActivityController} if there is one. */
475 public abstract boolean handleAppCrashInActivityController(String processName, int pid,
476 String shortMsg, String longMsg, long timeMillis, String stackTrace,
477 Runnable killCrashingAppCallback);
Wale Ogunwaled7889f52018-10-25 11:03:20 -0700478
479 public abstract void removeRecentTasksByPackageName(String packageName, int userId);
480 public abstract void cleanupRecentTasksForUser(int userId);
481 public abstract void loadRecentTasksForUser(int userId);
482 public abstract void onPackagesSuspendedChanged(String[] packages, boolean suspended,
483 int userId);
484 /** Flush recent tasks to disk. */
485 public abstract void flushRecentTasks();
Wale Ogunwaled4d67d02018-10-25 18:09:39 -0700486
487 public abstract WindowProcessController getHomeProcess();
488 public abstract WindowProcessController getPreviousProcess();
Wale Ogunwale27c48ae2018-10-25 19:01:01 -0700489
490 public abstract void clearLockedTasks(String reason);
491 public abstract void updateUserConfiguration();
Wale Ogunwale387b34c2018-10-25 19:59:40 -0700492 public abstract boolean canShowErrorDialogs();
Wale Ogunwale1f5e53d2018-11-05 05:12:46 -0800493
494 public abstract void setProfileApp(String profileApp);
495 public abstract void setProfileProc(WindowProcessController wpc);
496 public abstract void setProfilerInfo(ProfilerInfo profilerInfo);
Igor Murashkinc0b47e42018-11-07 15:54:18 -0800497
498 public abstract ActivityMetricsLaunchObserverRegistry getLaunchObserverRegistry();
Winson Chung3fb0f252019-01-08 17:41:55 -0800499
500 /**
501 * Gets bitmap snapshot of the provided task id.
502 */
503 public abstract ActivityManager.TaskSnapshot getTaskSnapshot(int taskId,
504 boolean reducedResolution);
Michal Karpinskicc88d7e2019-01-24 15:32:12 +0000505
506 /** Returns true if uid has a visible window or its process is in a top state. */
507 public abstract boolean isUidForeground(int uid);
Michal Karpinski4026cae2019-02-12 11:51:47 +0000508
509 /**
510 * Called by DevicePolicyManagerService to set the package name of the device owner.
511 */
512 public abstract void setDeviceOwnerPackageName(String deviceOwnerPkg);
Wale Ogunwale6767eae2018-05-03 15:52:51 -0700513}