The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 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.content.ComponentName; |
| 20 | import android.content.Intent; |
| 21 | import android.content.pm.ActivityInfo; |
| 22 | import android.content.pm.ApplicationInfo; |
| 23 | import android.content.pm.ProviderInfo; |
| 24 | import android.content.pm.ServiceInfo; |
| 25 | import android.content.res.Configuration; |
| 26 | import android.os.Bundle; |
| 27 | import android.os.RemoteException; |
| 28 | import android.os.IBinder; |
| 29 | import android.os.IInterface; |
| 30 | |
| 31 | import java.io.FileDescriptor; |
| 32 | import java.util.List; |
| 33 | import java.util.Map; |
| 34 | |
| 35 | /** |
| 36 | * System private API for communicating with the application. This is given to |
| 37 | * the activity manager by an application when it starts up, for the activity |
| 38 | * manager to tell the application about things it needs to do. |
| 39 | * |
| 40 | * {@hide} |
| 41 | */ |
| 42 | public interface IApplicationThread extends IInterface { |
| 43 | void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving, |
| 44 | int configChanges) throws RemoteException; |
| 45 | void scheduleStopActivity(IBinder token, boolean showWindow, |
| 46 | int configChanges) throws RemoteException; |
| 47 | void scheduleWindowVisibility(IBinder token, boolean showWindow) throws RemoteException; |
| 48 | void scheduleResumeActivity(IBinder token, boolean isForward) throws RemoteException; |
| 49 | void scheduleSendResult(IBinder token, List<ResultInfo> results) throws RemoteException; |
| 50 | void scheduleLaunchActivity(Intent intent, IBinder token, |
| 51 | ActivityInfo info, Bundle state, List<ResultInfo> pendingResults, |
| 52 | List<Intent> pendingNewIntents, boolean notResumed, boolean isForward) |
| 53 | throws RemoteException; |
| 54 | void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults, |
| 55 | List<Intent> pendingNewIntents, int configChanges, |
| 56 | boolean notResumed) throws RemoteException; |
| 57 | void scheduleNewIntent(List<Intent> intent, IBinder token) throws RemoteException; |
| 58 | void scheduleDestroyActivity(IBinder token, boolean finished, |
| 59 | int configChanges) throws RemoteException; |
| 60 | void scheduleReceiver(Intent intent, ActivityInfo info, int resultCode, |
| 61 | String data, Bundle extras, boolean sync) throws RemoteException; |
| 62 | void scheduleCreateService(IBinder token, ServiceInfo info) throws RemoteException; |
| 63 | void scheduleBindService(IBinder token, |
| 64 | Intent intent, boolean rebind) throws RemoteException; |
| 65 | void scheduleUnbindService(IBinder token, |
| 66 | Intent intent) throws RemoteException; |
| 67 | void scheduleServiceArgs(IBinder token, int startId, Intent args) throws RemoteException; |
| 68 | void scheduleStopService(IBinder token) throws RemoteException; |
| 69 | static final int DEBUG_OFF = 0; |
| 70 | static final int DEBUG_ON = 1; |
| 71 | static final int DEBUG_WAIT = 2; |
| 72 | void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, |
| 73 | ComponentName testName, String profileName, Bundle testArguments, |
| 74 | IInstrumentationWatcher testWatcher, int debugMode, Configuration config, Map<String, |
| 75 | IBinder> services) throws RemoteException; |
| 76 | void scheduleExit() throws RemoteException; |
| 77 | void requestThumbnail(IBinder token) throws RemoteException; |
| 78 | void scheduleConfigurationChanged(Configuration config) throws RemoteException; |
| 79 | void updateTimeZone() throws RemoteException; |
| 80 | void processInBackground() throws RemoteException; |
| 81 | void dumpService(FileDescriptor fd, IBinder servicetoken, String[] args) |
| 82 | throws RemoteException; |
| 83 | void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent, |
| 84 | int resultCode, String data, Bundle extras, boolean ordered) |
| 85 | throws RemoteException; |
| 86 | void scheduleLowMemory() throws RemoteException; |
| 87 | void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException; |
| 88 | void requestPss() throws RemoteException; |
The Android Open Source Project | f5b4b98 | 2009-03-05 20:00:43 -0800 | [diff] [blame] | 89 | void profilerControl(boolean start, String path) throws RemoteException; |
Dianne Hackborn | 06de2ea | 2009-05-21 12:56:43 -0700 | [diff] [blame^] | 90 | void setSchedulingGroup(int group) throws RemoteException; |
| 91 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 92 | String descriptor = "android.app.IApplicationThread"; |
| 93 | |
| 94 | int SCHEDULE_PAUSE_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION; |
| 95 | int SCHEDULE_STOP_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+2; |
| 96 | int SCHEDULE_WINDOW_VISIBILITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+3; |
| 97 | int SCHEDULE_RESUME_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+4; |
| 98 | int SCHEDULE_SEND_RESULT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+5; |
| 99 | int SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+6; |
| 100 | int SCHEDULE_NEW_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+7; |
| 101 | int SCHEDULE_FINISH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+8; |
| 102 | int SCHEDULE_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+9; |
| 103 | int SCHEDULE_CREATE_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+10; |
| 104 | int SCHEDULE_STOP_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+11; |
| 105 | int BIND_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+12; |
| 106 | int SCHEDULE_EXIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+13; |
| 107 | int REQUEST_THUMBNAIL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+14; |
| 108 | int SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+15; |
| 109 | int SCHEDULE_SERVICE_ARGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+16; |
| 110 | int UPDATE_TIME_ZONE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+17; |
| 111 | int PROCESS_IN_BACKGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+18; |
| 112 | int SCHEDULE_BIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+19; |
| 113 | int SCHEDULE_UNBIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+20; |
| 114 | int DUMP_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+21; |
| 115 | int SCHEDULE_REGISTERED_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+22; |
| 116 | int SCHEDULE_LOW_MEMORY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23; |
| 117 | int SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+24; |
| 118 | int SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25; |
| 119 | int REQUEST_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26; |
The Android Open Source Project | f5b4b98 | 2009-03-05 20:00:43 -0800 | [diff] [blame] | 120 | int PROFILER_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27; |
Dianne Hackborn | 06de2ea | 2009-05-21 12:56:43 -0700 | [diff] [blame^] | 121 | int SET_SCHEDULING_GROUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 122 | } |