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.app.servertransaction.ClientTransaction; 24 import android.content.AutofillOptions; 25 import android.content.ComponentName; 26 import android.content.ContentCaptureOptions; 27 import android.content.IIntentReceiver; 28 import android.content.Intent; 29 import android.content.pm.ActivityInfo; 30 import android.content.pm.ApplicationInfo; 31 import android.content.pm.ParceledListSlice; 32 import android.content.pm.ProviderInfo; 33 import android.content.pm.ProviderInfoList; 34 import android.content.pm.ServiceInfo; 35 import android.content.res.CompatibilityInfo; 36 import android.content.res.Configuration; 37 import android.net.Uri; 38 import android.os.Bundle; 39 import android.os.Debug; 40 import android.os.IBinder; 41 import android.os.IInterface; 42 import android.os.ParcelFileDescriptor; 43 import android.os.PersistableBundle; 44 import android.os.RemoteCallback; 45 46 import com.android.internal.app.IVoiceInteractor; 47 import com.android.internal.content.ReferrerIntent; 48 49 import java.util.List; 50 import java.util.Map; 51 52 /** 53 * System private API for communicating with the application. This is given to 54 * the activity manager by an application when it starts up, for the activity 55 * manager to tell the application about things it needs to do. 56 * 57 * {@hide} 58 */ 59 oneway interface IApplicationThread { scheduleReceiver(in Intent intent, in ActivityInfo info, in CompatibilityInfo compatInfo, int resultCode, in String data, in Bundle extras, boolean sync, int sendingUser, int processState)60 void scheduleReceiver(in Intent intent, in ActivityInfo info, 61 in CompatibilityInfo compatInfo, 62 int resultCode, in String data, in Bundle extras, boolean sync, 63 int sendingUser, int processState); 64 @UnsupportedAppUsage scheduleCreateService(IBinder token, in ServiceInfo info, in CompatibilityInfo compatInfo, int processState)65 void scheduleCreateService(IBinder token, in ServiceInfo info, 66 in CompatibilityInfo compatInfo, int processState); 67 @UnsupportedAppUsage scheduleStopService(IBinder token)68 void scheduleStopService(IBinder token); bindApplication(in String packageName, in ApplicationInfo info, in ProviderInfoList providerList, in ComponentName testName, in ProfilerInfo profilerInfo, in Bundle testArguments, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean trackAllocation, boolean restrictedBackupMode, boolean persistent, in Configuration config, in CompatibilityInfo compatInfo, in Map services, in Bundle coreSettings, in String buildSerial, in AutofillOptions autofillOptions, in ContentCaptureOptions contentCaptureOptions, in long[] disabledCompatChanges)69 void bindApplication(in String packageName, in ApplicationInfo info, 70 in ProviderInfoList providerList, in ComponentName testName, 71 in ProfilerInfo profilerInfo, in Bundle testArguments, 72 IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, 73 int debugMode, boolean enableBinderTracking, boolean trackAllocation, 74 boolean restrictedBackupMode, boolean persistent, in Configuration config, 75 in CompatibilityInfo compatInfo, in Map services, 76 in Bundle coreSettings, in String buildSerial, in AutofillOptions autofillOptions, 77 in ContentCaptureOptions contentCaptureOptions, in long[] disabledCompatChanges); runIsolatedEntryPoint(in String entryPoint, in String[] entryPointArgs)78 void runIsolatedEntryPoint(in String entryPoint, in String[] entryPointArgs); scheduleExit()79 void scheduleExit(); scheduleServiceArgs(IBinder token, in ParceledListSlice args)80 void scheduleServiceArgs(IBinder token, in ParceledListSlice args); updateTimeZone()81 void updateTimeZone(); processInBackground()82 void processInBackground(); 83 @UnsupportedAppUsage scheduleBindService(IBinder token, in Intent intent, boolean rebind, int processState)84 void scheduleBindService(IBinder token, 85 in Intent intent, boolean rebind, int processState); 86 @UnsupportedAppUsage scheduleUnbindService(IBinder token, in Intent intent)87 void scheduleUnbindService(IBinder token, 88 in Intent intent); dumpService(in ParcelFileDescriptor fd, IBinder servicetoken, in String[] args)89 void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken, 90 in String[] args); scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent, int resultCode, in String data, in Bundle extras, boolean ordered, boolean sticky, int sendingUser, int processState)91 void scheduleRegisteredReceiver(IIntentReceiver receiver, in Intent intent, 92 int resultCode, in String data, in Bundle extras, boolean ordered, 93 boolean sticky, int sendingUser, int processState); scheduleLowMemory()94 void scheduleLowMemory(); profilerControl(boolean start, in ProfilerInfo profilerInfo, int profileType)95 void profilerControl(boolean start, in ProfilerInfo profilerInfo, int profileType); setSchedulingGroup(int group)96 void setSchedulingGroup(int group); scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo, int backupMode, int userId)97 void scheduleCreateBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo, 98 int backupMode, int userId); scheduleDestroyBackupAgent(in ApplicationInfo app, in CompatibilityInfo compatInfo, int userId)99 void scheduleDestroyBackupAgent(in ApplicationInfo app, 100 in CompatibilityInfo compatInfo, int userId); scheduleOnNewActivityOptions(IBinder token, in Bundle options)101 void scheduleOnNewActivityOptions(IBinder token, in Bundle options); scheduleSuicide()102 void scheduleSuicide(); dispatchPackageBroadcast(int cmd, in String[] packages)103 void dispatchPackageBroadcast(int cmd, in String[] packages); scheduleCrash(in String msg)104 void scheduleCrash(in String msg); dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path, in ParcelFileDescriptor fd, in RemoteCallback finishCallback)105 void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, in String path, 106 in ParcelFileDescriptor fd, in RemoteCallback finishCallback); dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix, in String[] args)107 void dumpActivity(in ParcelFileDescriptor fd, IBinder servicetoken, in String prefix, 108 in String[] args); clearDnsCache()109 void clearDnsCache(); updateHttpProxy()110 void updateHttpProxy(); setCoreSettings(in Bundle coreSettings)111 void setCoreSettings(in Bundle coreSettings); updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info)112 void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info); 113 @UnsupportedAppUsage scheduleTrimMemory(int level)114 void scheduleTrimMemory(int level); dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin, boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, in String[] args)115 void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin, 116 boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, 117 in String[] args); dumpMemInfoProto(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, in String[] args)118 void dumpMemInfoProto(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, 119 boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable, 120 in String[] args); dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args)121 void dumpGfxInfo(in ParcelFileDescriptor fd, in String[] args); dumpCacheInfo(in ParcelFileDescriptor fd, in String[] args)122 void dumpCacheInfo(in ParcelFileDescriptor fd, in String[] args); dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken, in String[] args)123 void dumpProvider(in ParcelFileDescriptor fd, IBinder servicetoken, 124 in String[] args); dumpDbInfo(in ParcelFileDescriptor fd, in String[] args)125 void dumpDbInfo(in ParcelFileDescriptor fd, in String[] args); unstableProviderDied(IBinder provider)126 void unstableProviderDied(IBinder provider); requestAssistContextExtras(IBinder activityToken, IBinder requestToken, int requestType, int sessionId, int flags)127 void requestAssistContextExtras(IBinder activityToken, IBinder requestToken, 128 int requestType, int sessionId, int flags); scheduleTranslucentConversionComplete(IBinder token, boolean timeout)129 void scheduleTranslucentConversionComplete(IBinder token, boolean timeout); setProcessState(int state)130 void setProcessState(int state); scheduleInstallProvider(in ProviderInfo provider)131 void scheduleInstallProvider(in ProviderInfo provider); updateTimePrefs(int timeFormatPreference)132 void updateTimePrefs(int timeFormatPreference); scheduleEnterAnimationComplete(IBinder token)133 void scheduleEnterAnimationComplete(IBinder token); notifyCleartextNetwork(in byte[] firstPacket)134 void notifyCleartextNetwork(in byte[] firstPacket); startBinderTracking()135 void startBinderTracking(); stopBinderTrackingAndDump(in ParcelFileDescriptor fd)136 void stopBinderTrackingAndDump(in ParcelFileDescriptor fd); scheduleLocalVoiceInteractionStarted(IBinder token, IVoiceInteractor voiceInteractor)137 void scheduleLocalVoiceInteractionStarted(IBinder token, 138 IVoiceInteractor voiceInteractor); handleTrustStorageUpdate()139 void handleTrustStorageUpdate(); attachAgent(String path)140 void attachAgent(String path); attachStartupAgents(String dataDir)141 void attachStartupAgents(String dataDir); scheduleApplicationInfoChanged(in ApplicationInfo ai)142 void scheduleApplicationInfoChanged(in ApplicationInfo ai); setNetworkBlockSeq(long procStateSeq)143 void setNetworkBlockSeq(long procStateSeq); scheduleTransaction(in ClientTransaction transaction)144 void scheduleTransaction(in ClientTransaction transaction); requestDirectActions(IBinder activityToken, IVoiceInteractor intractor, in RemoteCallback cancellationCallback, in RemoteCallback callback)145 void requestDirectActions(IBinder activityToken, IVoiceInteractor intractor, 146 in RemoteCallback cancellationCallback, in RemoteCallback callback); performDirectAction(IBinder activityToken, String actionId, in Bundle arguments, in RemoteCallback cancellationCallback, in RemoteCallback resultCallback)147 void performDirectAction(IBinder activityToken, String actionId, 148 in Bundle arguments, in RemoteCallback cancellationCallback, 149 in RemoteCallback resultCallback); 150 } 151