blob: 487a94a05f7a3fda79d3662aefa4292ed319b0c6 [file] [log] [blame]
Sudheer Shankacc6418f2016-10-13 12:03:44 -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.IInstrumentationWatcher;
20import android.app.IUiAutomationConnection;
21import android.app.ProfilerInfo;
22import android.app.ResultInfo;
23import android.content.ComponentName;
24import android.content.IIntentReceiver;
25import android.content.Intent;
26import android.content.pm.ActivityInfo;
27import android.content.pm.ApplicationInfo;
Dianne Hackborn3f7c9f22017-04-04 15:36:33 -070028import android.content.pm.ParceledListSlice;
Sudheer Shankacc6418f2016-10-13 12:03:44 -070029import android.content.pm.ProviderInfo;
30import android.content.pm.ServiceInfo;
31import android.content.res.CompatibilityInfo;
32import android.content.res.Configuration;
33import android.net.Uri;
34import android.os.Bundle;
35import android.os.Debug;
36import android.os.IBinder;
37import android.os.IInterface;
38import android.os.ParcelFileDescriptor;
39import android.os.PersistableBundle;
40
41import com.android.internal.app.IVoiceInteractor;
42import com.android.internal.content.ReferrerIntent;
43
44import java.util.List;
45import 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 */
54oneway interface IApplicationThread {
Sudheer Shankacc6418f2016-10-13 12:03:44 -070055 void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving,
Sudheer Shanka3052f852016-11-14 18:42:20 -080056 int configChanges, boolean dontReport);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070057 void scheduleStopActivity(IBinder token, boolean showWindow,
Sudheer Shanka3052f852016-11-14 18:42:20 -080058 int configChanges);
59 void scheduleWindowVisibility(IBinder token, boolean showWindow);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070060 void scheduleResumeActivity(IBinder token, int procState, boolean isForward,
Sudheer Shanka3052f852016-11-14 18:42:20 -080061 in Bundle resumeArgs);
62 void scheduleSendResult(IBinder token, in List<ResultInfo> results);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070063 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 Shanka3052f852016-11-14 18:42:20 -080068 boolean notResumed, boolean isForward, in ProfilerInfo profilerInfo);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070069 void scheduleNewIntent(
Sudheer Shanka3052f852016-11-14 18:42:20 -080070 in List<ReferrerIntent> intent, IBinder token, boolean andPause);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070071 void scheduleDestroyActivity(IBinder token, boolean finished,
Sudheer Shanka3052f852016-11-14 18:42:20 -080072 int configChanges);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070073 void scheduleReceiver(in Intent intent, in ActivityInfo info,
74 in CompatibilityInfo compatInfo,
75 int resultCode, in String data, in Bundle extras, boolean sync,
Sudheer Shanka3052f852016-11-14 18:42:20 -080076 int sendingUser, int processState);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070077 void scheduleCreateService(IBinder token, in ServiceInfo info,
Sudheer Shanka3052f852016-11-14 18:42:20 -080078 in CompatibilityInfo compatInfo, int processState);
79 void scheduleStopService(IBinder token);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070080 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 Shanka3052f852016-11-14 18:42:20 -080087 in Bundle coreSettings, in String buildSerial);
Torne (Richard Coles)466cbe42017-05-31 14:09:14 -040088 void runIsolatedEntryPoint(in String entryPoint, in String[] entryPointArgs);
Sudheer Shanka3052f852016-11-14 18:42:20 -080089 void scheduleExit();
90 void scheduleConfigurationChanged(in Configuration config);
Dianne Hackborn3f7c9f22017-04-04 15:36:33 -070091 void scheduleServiceArgs(IBinder token, in ParceledListSlice args);
Sudheer Shanka3052f852016-11-14 18:42:20 -080092 void updateTimeZone();
93 void processInBackground();
Sudheer Shankacc6418f2016-10-13 12:03:44 -070094 void scheduleBindService(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -080095 in Intent intent, boolean rebind, int processState);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070096 void scheduleUnbindService(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -080097 in Intent intent);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070098 void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken,
Sudheer Shanka3052f852016-11-14 18:42:20 -080099 in String[] args);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700100 void scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent,
101 int resultCode, in String data, in Bundle extras, boolean ordered,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800102 boolean sticky, int sendingUser, int processState);
103 void scheduleLowMemory();
Andrii Kulianb047b8b2017-02-08 18:38:26 -0800104 void scheduleActivityConfigurationChanged(IBinder token, in Configuration overrideConfig);
105 void scheduleActivityMovedToDisplay(IBinder token, int displayId,
106 in Configuration overrideConfig);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700107 void scheduleRelaunchActivity(IBinder token, in List<ResultInfo> pendingResults,
108 in List<ReferrerIntent> pendingNewIntents, int configChanges, boolean notResumed,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800109 in Configuration config, in Configuration overrideConfig, boolean preserveWindow);
110 void scheduleSleeping(IBinder token, boolean sleeping);
111 void profilerControl(boolean start, in ProfilerInfo profilerInfo, int profileType);
112 void setSchedulingGroup(int group);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700113 void scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800114 int backupMode);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700115 void scheduleDestroyBackupAgent(in ApplicationInfo app,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800116 in CompatibilityInfo compatInfo);
117 void scheduleOnNewActivityOptions(IBinder token, in Bundle options);
118 void scheduleSuicide();
119 void dispatchPackageBroadcast(int cmd, in String[] packages);
120 void scheduleCrash(in String msg);
Christopher Ferris8d652f82017-04-11 16:29:18 -0700121 void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path,
122 in ParcelFileDescriptor fd);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700123 void dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800124 in String[] args);
125 void clearDnsCache();
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700126 void setHttpProxy(in String proxy, in String port, in String exclList,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800127 in Uri pacFileUrl);
128 void setCoreSettings(in Bundle coreSettings);
129 void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info);
130 void scheduleTrimMemory(int level);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700131 void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin,
132 boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800133 in String[] args);
134 void dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700135 void dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800136 in String[] args);
137 void dumpDbInfo(in ParcelFileDescriptor fd, in String[] args);
138 void unstableProviderDied(IBinder provider);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700139 void requestAssistContextExtras(IBinder activityToken, IBinder requestToken,
Svet Ganovfd31f852017-04-26 15:54:27 -0700140 int requestType, int sessionId, int flags);
Sudheer Shanka3052f852016-11-14 18:42:20 -0800141 void scheduleTranslucentConversionComplete(IBinder token, boolean timeout);
142 void setProcessState(int state);
143 void scheduleInstallProvider(in ProviderInfo provider);
Neil Fullerb7146fe2016-11-15 16:52:15 +0000144 void updateTimePrefs(int timeFormatPreference);
Sudheer Shanka3052f852016-11-14 18:42:20 -0800145 void scheduleEnterAnimationComplete(IBinder token);
146 void notifyCleartextNetwork(in byte[] firstPacket);
147 void startBinderTracking();
148 void stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
Winson Chung5af42fc2017-03-24 17:11:33 -0700149 void scheduleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode,
150 in Configuration newConfig);
151 void schedulePictureInPictureModeChanged(IBinder token, boolean isInPictureInPictureMode,
152 in Configuration newConfig);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700153 void scheduleLocalVoiceInteractionStarted(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800154 IVoiceInteractor voiceInteractor);
155 void handleTrustStorageUpdate();
156 void attachAgent(String path);
MÃ¥rten Kongstad49a4a1d2017-01-12 08:36:37 +0100157 void scheduleApplicationInfoChanged(in ApplicationInfo ai);
Sudheer Shanka84a48952017-03-08 18:19:01 -0800158 void setNetworkBlockSeq(long procStateSeq);
Neil Fullerb7146fe2016-11-15 16:52:15 +0000159}