blob: 952c900d02b4b23ff155de7561088d5216d37060 [file] [log] [blame]
Dianne Hackbornb06ea702009-07-13 13:07:51 -07001/*
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
18package android.app;
19
20import 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 */
27interface 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 */
Dan Egnorb7f03672009-12-09 16:22:32 -080046 boolean appCrashed(String processName, int pid,
Dan Egnor60d87622009-12-16 16:32:58 -080047 String shortMsg, String longMsg,
Dan Egnorb7f03672009-12-09 16:22:32 -080048 long timeMillis, String stackTrace);
Dianne Hackbornb06ea702009-07-13 13:07:51 -070049
50 /**
Dianne Hackborn287952c2010-09-22 22:34:31 -070051 * Early call as soon as an ANR is detected.
52 */
53 int appEarlyNotResponding(String processName, int pid, String annotation);
54
55 /**
Dianne Hackbornb06ea702009-07-13 13:07:51 -070056 * 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);
Dianne Hackborn5b88a2f2013-05-03 16:25:11 -070061
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);
Dianne Hackbornb06ea702009-07-13 13:07:51 -070068}