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