| 1 |
/* |
| 2 |
** |
| 3 |
** Copyright 2009, The Android Open Source Project |
| 4 |
** |
| 5 |
** Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
** you may not use this file except in compliance with the License. |
| 7 |
** You may obtain a copy of the License at |
| 8 |
** |
| 9 |
** http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
** |
| 11 |
** Unless required by applicable law or agreed to in writing, software |
| 12 |
** distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
** See the License for the specific language governing permissions and |
| 15 |
** limitations under the License. |
| 16 |
*/ |
| 17 |
|
| 18 |
package android.app; |
| 19 |
|
| 20 |
import android.content.Intent; |
| 21 |
|
| 22 |
/** |
| 23 |
* Testing interface to monitor what is happening in the activity manager |
| 24 |
* while tests are running. Not for normal application development. |
| 25 |
* {@hide} |
| 26 |
*/ |
| 27 |
interface IActivityController |
| 28 |
{ |
| 29 |
/** |
| 30 |
* The system is trying to start an activity. Return true to allow |
| 31 |
* it to be started as normal, or false to cancel/reject this activity. |
| 32 |
*/ |
| 33 |
boolean activityStarting(in Intent intent, String pkg); |
| 34 |
|
| 35 |
/** |
| 36 |
* The system is trying to return to an activity. Return true to allow |
| 37 |
* it to be resumed as normal, or false to cancel/reject this activity. |
| 38 |
*/ |
| 39 |
boolean activityResuming(String pkg); |
| 40 |
|
| 41 |
/** |
| 42 |
* An application process has crashed (in Java). Return true for the |
| 43 |
* normal error recovery (app crash dialog) to occur, false to kill |
| 44 |
* it immediately. |
| 45 |
*/ |
| 46 |
boolean appCrashed(String processName, int pid, |
| 47 |
String shortMsg, String longMsg, |
| 48 |
long timeMillis, String stackTrace); |
| 49 |
|
| 50 |
/** |
| 51 |
* Early call as soon as an ANR is detected. |
| 52 |
*/ |
| 53 |
int appEarlyNotResponding(String processName, int pid, String annotation); |
| 54 |
|
| 55 |
/** |
| 56 |
* An application process is not responding. Return 0 to show the "app |
| 57 |
* not responding" dialog, 1 to continue waiting, or -1 to kill it |
| 58 |
* immediately. |
| 59 |
*/ |
| 60 |
int appNotResponding(String processName, int pid, String processStats); |
| 61 |
|
| 62 |
/** |
| 63 |
* The system process watchdog has detected that the system seems to be |
| 64 |
* hung. Return 1 to continue waiting, or -1 to let it continue with its |
| 65 |
* normal kill. |
| 66 |
*/ |
| 67 |
int systemNotResponding(String msg); |
| 68 |
} |