Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.app; |
| 18 | |
| 19 | import android.app.IInstrumentationWatcher; |
| 20 | import android.app.IUiAutomationConnection; |
| 21 | import android.app.ProfilerInfo; |
| 22 | import android.app.ResultInfo; |
| 23 | import android.content.ComponentName; |
| 24 | import android.content.IIntentReceiver; |
| 25 | import android.content.Intent; |
| 26 | import android.content.pm.ActivityInfo; |
| 27 | import android.content.pm.ApplicationInfo; |
Dianne Hackborn | 3f7c9f2 | 2017-04-04 15:36:33 -0700 | [diff] [blame] | 28 | import android.content.pm.ParceledListSlice; |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 29 | import android.content.pm.ProviderInfo; |
| 30 | import android.content.pm.ServiceInfo; |
| 31 | import android.content.res.CompatibilityInfo; |
| 32 | import android.content.res.Configuration; |
| 33 | import android.net.Uri; |
| 34 | import android.os.Bundle; |
| 35 | import android.os.Debug; |
| 36 | import android.os.IBinder; |
| 37 | import android.os.IInterface; |
| 38 | import android.os.ParcelFileDescriptor; |
| 39 | import android.os.PersistableBundle; |
| 40 | |
| 41 | import com.android.internal.app.IVoiceInteractor; |
| 42 | import com.android.internal.content.ReferrerIntent; |
| 43 | |
| 44 | import java.util.List; |
| 45 | import java.util.Map; |
| 46 | |
| 47 | /** |
| 48 | * System private API for communicating with the application. This is given to |
| 49 | * the activity manager by an application when it starts up, for the activity |
| 50 | * manager to tell the application about things it needs to do. |
| 51 | * |
| 52 | * {@hide} |
| 53 | */ |
| 54 | oneway interface IApplicationThread { |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 55 | void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 56 | int configChanges, boolean dontReport); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 57 | void scheduleStopActivity(IBinder token, boolean showWindow, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 58 | int configChanges); |
| 59 | void scheduleWindowVisibility(IBinder token, boolean showWindow); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 60 | void scheduleResumeActivity(IBinder token, int procState, boolean isForward, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 61 | in Bundle resumeArgs); |
| 62 | void scheduleSendResult(IBinder token, in List<ResultInfo> results); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 63 | void scheduleLaunchActivity(in Intent intent, IBinder token, int ident, |
| 64 | in ActivityInfo info, in Configuration curConfig, in Configuration overrideConfig, |
| 65 | in CompatibilityInfo compatInfo, in String referrer, IVoiceInteractor voiceInteractor, |
| 66 | int procState, in Bundle state, in PersistableBundle persistentState, |
| 67 | in List<ResultInfo> pendingResults, in List<ReferrerIntent> pendingNewIntents, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 68 | boolean notResumed, boolean isForward, in ProfilerInfo profilerInfo); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 69 | void scheduleNewIntent( |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 70 | in List<ReferrerIntent> intent, IBinder token, boolean andPause); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 71 | void scheduleDestroyActivity(IBinder token, boolean finished, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 72 | int configChanges); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 73 | void scheduleReceiver(in Intent intent, in ActivityInfo info, |
| 74 | in CompatibilityInfo compatInfo, |
| 75 | int resultCode, in String data, in Bundle extras, boolean sync, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 76 | int sendingUser, int processState); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 77 | void scheduleCreateService(IBinder token, in ServiceInfo info, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 78 | in CompatibilityInfo compatInfo, int processState); |
| 79 | void scheduleStopService(IBinder token); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 80 | void bindApplication(in String packageName, in ApplicationInfo info, |
| 81 | in List<ProviderInfo> providers, in ComponentName testName, |
| 82 | in ProfilerInfo profilerInfo, in Bundle testArguments, |
| 83 | IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, |
| 84 | int debugMode, boolean enableBinderTracking, boolean trackAllocation, |
| 85 | boolean restrictedBackupMode, boolean persistent, in Configuration config, |
| 86 | in CompatibilityInfo compatInfo, in Map services, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 87 | in Bundle coreSettings, in String buildSerial); |
| 88 | void scheduleExit(); |
| 89 | void scheduleConfigurationChanged(in Configuration config); |
Dianne Hackborn | 3f7c9f2 | 2017-04-04 15:36:33 -0700 | [diff] [blame] | 90 | void scheduleServiceArgs(IBinder token, in ParceledListSlice args); |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 91 | void updateTimeZone(); |
| 92 | void processInBackground(); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 93 | void scheduleBindService(IBinder token, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 94 | in Intent intent, boolean rebind, int processState); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 95 | void scheduleUnbindService(IBinder token, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 96 | in Intent intent); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 97 | void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 98 | in String[] args); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 99 | void scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent, |
| 100 | int resultCode, in String data, in Bundle extras, boolean ordered, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 101 | boolean sticky, int sendingUser, int processState); |
| 102 | void scheduleLowMemory(); |
Andrii Kulian | b047b8b | 2017-02-08 18:38:26 -0800 | [diff] [blame] | 103 | void scheduleActivityConfigurationChanged(IBinder token, in Configuration overrideConfig); |
| 104 | void scheduleActivityMovedToDisplay(IBinder token, int displayId, |
| 105 | in Configuration overrideConfig); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 106 | void scheduleRelaunchActivity(IBinder token, in List<ResultInfo> pendingResults, |
| 107 | in List<ReferrerIntent> pendingNewIntents, int configChanges, boolean notResumed, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 108 | in Configuration config, in Configuration overrideConfig, boolean preserveWindow); |
| 109 | void scheduleSleeping(IBinder token, boolean sleeping); |
| 110 | void profilerControl(boolean start, in ProfilerInfo profilerInfo, int profileType); |
| 111 | void setSchedulingGroup(int group); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 112 | void scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 113 | int backupMode); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 114 | void scheduleDestroyBackupAgent(in ApplicationInfo app, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 115 | in CompatibilityInfo compatInfo); |
| 116 | void scheduleOnNewActivityOptions(IBinder token, in Bundle options); |
| 117 | void scheduleSuicide(); |
| 118 | void dispatchPackageBroadcast(int cmd, in String[] packages); |
| 119 | void scheduleCrash(in String msg); |
Christopher Ferris | 8d652f8 | 2017-04-11 16:29:18 -0700 | [diff] [blame] | 120 | void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path, |
| 121 | in ParcelFileDescriptor fd); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 122 | void dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 123 | in String[] args); |
| 124 | void clearDnsCache(); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 125 | void setHttpProxy(in String proxy, in String port, in String exclList, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 126 | in Uri pacFileUrl); |
| 127 | void setCoreSettings(in Bundle coreSettings); |
| 128 | void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info); |
| 129 | void scheduleTrimMemory(int level); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 130 | void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin, |
| 131 | boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 132 | in String[] args); |
| 133 | void dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 134 | void dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 135 | in String[] args); |
| 136 | void dumpDbInfo(in ParcelFileDescriptor fd, in String[] args); |
| 137 | void unstableProviderDied(IBinder provider); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 138 | void requestAssistContextExtras(IBinder activityToken, IBinder requestToken, |
Svet Ganov | fd31f85 | 2017-04-26 15:54:27 -0700 | [diff] [blame] | 139 | int requestType, int sessionId, int flags); |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 140 | void scheduleTranslucentConversionComplete(IBinder token, boolean timeout); |
| 141 | void setProcessState(int state); |
| 142 | void scheduleInstallProvider(in ProviderInfo provider); |
Neil Fuller | b7146fe | 2016-11-15 16:52:15 +0000 | [diff] [blame] | 143 | void updateTimePrefs(int timeFormatPreference); |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 144 | void scheduleEnterAnimationComplete(IBinder token); |
| 145 | void notifyCleartextNetwork(in byte[] firstPacket); |
| 146 | void startBinderTracking(); |
| 147 | void stopBinderTrackingAndDump(in ParcelFileDescriptor fd); |
Winson Chung | 5af42fc | 2017-03-24 17:11:33 -0700 | [diff] [blame] | 148 | void scheduleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode, |
| 149 | in Configuration newConfig); |
| 150 | void schedulePictureInPictureModeChanged(IBinder token, boolean isInPictureInPictureMode, |
| 151 | in Configuration newConfig); |
Sudheer Shanka | cc6418f | 2016-10-13 12:03:44 -0700 | [diff] [blame] | 152 | void scheduleLocalVoiceInteractionStarted(IBinder token, |
Sudheer Shanka | 3052f85 | 2016-11-14 18:42:20 -0800 | [diff] [blame] | 153 | IVoiceInteractor voiceInteractor); |
| 154 | void handleTrustStorageUpdate(); |
| 155 | void attachAgent(String path); |
MÃ¥rten Kongstad | 49a4a1d | 2017-01-12 08:36:37 +0100 | [diff] [blame] | 156 | void scheduleApplicationInfoChanged(in ApplicationInfo ai); |
Sudheer Shanka | 84a4895 | 2017-03-08 18:19:01 -0800 | [diff] [blame] | 157 | void setNetworkBlockSeq(long procStateSeq); |
Neil Fuller | b7146fe | 2016-11-15 16:52:15 +0000 | [diff] [blame] | 158 | } |