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