blob: aeed7e1287d28c6ea108acae325d8bf86ade3d25 [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);
88 void scheduleExit();
89 void scheduleConfigurationChanged(in Configuration config);
Dianne Hackborn3f7c9f22017-04-04 15:36:33 -070090 void scheduleServiceArgs(IBinder token, in ParceledListSlice args);
Sudheer Shanka3052f852016-11-14 18:42:20 -080091 void updateTimeZone();
92 void processInBackground();
Sudheer Shankacc6418f2016-10-13 12:03:44 -070093 void scheduleBindService(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -080094 in Intent intent, boolean rebind, int processState);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070095 void scheduleUnbindService(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -080096 in Intent intent);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070097 void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken,
Sudheer Shanka3052f852016-11-14 18:42:20 -080098 in String[] args);
Sudheer Shankacc6418f2016-10-13 12:03:44 -070099 void scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent,
100 int resultCode, in String data, in Bundle extras, boolean ordered,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800101 boolean sticky, int sendingUser, int processState);
102 void scheduleLowMemory();
Andrii Kulianb047b8b2017-02-08 18:38:26 -0800103 void scheduleActivityConfigurationChanged(IBinder token, in Configuration overrideConfig);
104 void scheduleActivityMovedToDisplay(IBinder token, int displayId,
105 in Configuration overrideConfig);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700106 void scheduleRelaunchActivity(IBinder token, in List<ResultInfo> pendingResults,
107 in List<ReferrerIntent> pendingNewIntents, int configChanges, boolean notResumed,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800108 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 Shankacc6418f2016-10-13 12:03:44 -0700112 void scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800113 int backupMode);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700114 void scheduleDestroyBackupAgent(in ApplicationInfo app,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800115 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 Ferris8d652f82017-04-11 16:29:18 -0700120 void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path,
121 in ParcelFileDescriptor fd);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700122 void dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800123 in String[] args);
124 void clearDnsCache();
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700125 void setHttpProxy(in String proxy, in String port, in String exclList,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800126 in Uri pacFileUrl);
127 void setCoreSettings(in Bundle coreSettings);
128 void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info);
129 void scheduleTrimMemory(int level);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700130 void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin,
131 boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800132 in String[] args);
133 void dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700134 void dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800135 in String[] args);
136 void dumpDbInfo(in ParcelFileDescriptor fd, in String[] args);
137 void unstableProviderDied(IBinder provider);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700138 void requestAssistContextExtras(IBinder activityToken, IBinder requestToken,
Svet Ganovfd31f852017-04-26 15:54:27 -0700139 int requestType, int sessionId, int flags);
Sudheer Shanka3052f852016-11-14 18:42:20 -0800140 void scheduleTranslucentConversionComplete(IBinder token, boolean timeout);
141 void setProcessState(int state);
142 void scheduleInstallProvider(in ProviderInfo provider);
Neil Fullerb7146fe2016-11-15 16:52:15 +0000143 void updateTimePrefs(int timeFormatPreference);
Sudheer Shanka3052f852016-11-14 18:42:20 -0800144 void scheduleEnterAnimationComplete(IBinder token);
145 void notifyCleartextNetwork(in byte[] firstPacket);
146 void startBinderTracking();
147 void stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
Winson Chung5af42fc2017-03-24 17:11:33 -0700148 void scheduleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode,
149 in Configuration newConfig);
150 void schedulePictureInPictureModeChanged(IBinder token, boolean isInPictureInPictureMode,
151 in Configuration newConfig);
Sudheer Shankacc6418f2016-10-13 12:03:44 -0700152 void scheduleLocalVoiceInteractionStarted(IBinder token,
Sudheer Shanka3052f852016-11-14 18:42:20 -0800153 IVoiceInteractor voiceInteractor);
154 void handleTrustStorageUpdate();
155 void attachAgent(String path);
MÃ¥rten Kongstad49a4a1d2017-01-12 08:36:37 +0100156 void scheduleApplicationInfoChanged(in ApplicationInfo ai);
Sudheer Shanka84a48952017-03-08 18:19:01 -0800157 void setNetworkBlockSeq(long procStateSeq);
Neil Fullerb7146fe2016-11-15 16:52:15 +0000158}