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; 28 import android.content.pm.ParceledListSlice; 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 { 55 void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving, 56 int configChanges, boolean dontReport); 57 void scheduleStopActivity(IBinder token, boolean showWindow, 58 int configChanges); 59 void scheduleWindowVisibility(IBinder token, boolean showWindow); 60 void scheduleResumeActivity(IBinder token, int procState, boolean isForward, 61 in Bundle resumeArgs); 62 void scheduleSendResult(IBinder token, in List<ResultInfo> results); 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, 68 boolean notResumed, boolean isForward, in ProfilerInfo profilerInfo); 69 void scheduleNewIntent( 70 in List<ReferrerIntent> intent, IBinder token, boolean andPause); 71 void scheduleDestroyActivity(IBinder token, boolean finished, 72 int configChanges); 73 void scheduleReceiver(in Intent intent, in ActivityInfo info, 74 in CompatibilityInfo compatInfo, 75 int resultCode, in String data, in Bundle extras, boolean sync, 76 int sendingUser, int processState); 77 void scheduleCreateService(IBinder token, in ServiceInfo info, 78 in CompatibilityInfo compatInfo, int processState); 79 void scheduleStopService(IBinder token); 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, 87 in Bundle coreSettings, in String buildSerial); 88 void scheduleExit(); 89 void scheduleConfigurationChanged(in Configuration config); 90 void scheduleServiceArgs(IBinder token, in ParceledListSlice args); 91 void updateTimeZone(); 92 void processInBackground(); 93 void scheduleBindService(IBinder token, 94 in Intent intent, boolean rebind, int processState); 95 void scheduleUnbindService(IBinder token, 96 in Intent intent); 97 void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken, 98 in String[] args); 99 void scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent, 100 int resultCode, in String data, in Bundle extras, boolean ordered, 101 boolean sticky, int sendingUser, int processState); 102 void scheduleLowMemory(); 103 void scheduleActivityConfigurationChanged(IBinder token, in Configuration overrideConfig); 104 void scheduleActivityMovedToDisplay(IBinder token, int displayId, 105 in Configuration overrideConfig); 106 void scheduleRelaunchActivity(IBinder token, in List<ResultInfo> pendingResults, 107 in List<ReferrerIntent> pendingNewIntents, int configChanges, boolean notResumed, 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); 112 void scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo, 113 int backupMode); 114 void scheduleDestroyBackupAgent(in ApplicationInfo app, 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); 120 void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path, 121 in ParcelFileDescriptor fd); 122 void dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix, 123 in String[] args); 124 void clearDnsCache(); 125 void setHttpProxy(in String proxy, in String port, in String exclList, 126 in Uri pacFileUrl); 127 void setCoreSettings(in Bundle coreSettings); 128 void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info); 129 void scheduleTrimMemory(int level); 130 void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin, 131 boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, 132 in String[] args); 133 void dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args); 134 void dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken, 135 in String[] args); 136 void dumpDbInfo(in ParcelFileDescriptor fd, in String[] args); 137 void unstableProviderDied(IBinder provider); 138 void requestAssistContextExtras(IBinder activityToken, IBinder requestToken, 139 int requestType, int sessionId, int flags); 140 void scheduleTranslucentConversionComplete(IBinder token, boolean timeout); 141 void setProcessState(int state); 142 void scheduleInstallProvider(in ProviderInfo provider); 143 void updateTimePrefs(int timeFormatPreference); 144 void scheduleEnterAnimationComplete(IBinder token); 145 void notifyCleartextNetwork(in byte[] firstPacket); 146 void startBinderTracking(); 147 void stopBinderTrackingAndDump(in ParcelFileDescriptor fd); 148 void scheduleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode, 149 in Configuration newConfig); 150 void schedulePictureInPictureModeChanged(IBinder token, boolean isInPictureInPictureMode, 151 in Configuration newConfig); 152 void scheduleLocalVoiceInteractionStarted(IBinder token, 153 IVoiceInteractor voiceInteractor); 154 void handleTrustStorageUpdate(); 155 void attachAgent(String path); 156 void scheduleApplicationInfoChanged(in ApplicationInfo ai); 157 void setNetworkBlockSeq(long procStateSeq); 158 } 159