Merge "Fix issue #27385109: control activity behavior without triggering..." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
391be47296
@@ -77,7 +77,7 @@ public class BadBehaviorActivity extends Activity {
|
|||||||
|
|
||||||
public boolean activityStarting(Intent intent, String pkg) {
|
public boolean activityStarting(Intent intent, String pkg) {
|
||||||
try {
|
try {
|
||||||
ActivityManagerNative.getDefault().setActivityController(null);
|
ActivityManagerNative.getDefault().setActivityController(null, false);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ public class BadBehaviorActivity extends Activity {
|
|||||||
Log.i(TAG, "ANR system pressed -- about to engage");
|
Log.i(TAG, "ANR system pressed -- about to engage");
|
||||||
try {
|
try {
|
||||||
ActivityManagerNative.getDefault().setActivityController(
|
ActivityManagerNative.getDefault().setActivityController(
|
||||||
new BadController(20000));
|
new BadController(20000), false);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
||||||
}
|
}
|
||||||
@@ -233,7 +233,7 @@ public class BadBehaviorActivity extends Activity {
|
|||||||
Log.i(TAG, "Wedge system pressed -- about to engage");
|
Log.i(TAG, "Wedge system pressed -- about to engage");
|
||||||
try {
|
try {
|
||||||
ActivityManagerNative.getDefault().setActivityController(
|
ActivityManagerNative.getDefault().setActivityController(
|
||||||
new BadController(300000));
|
new BadController(300000), false);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
Log.e(TAG, "Can't call IActivityManager.setActivityController", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -669,7 +669,7 @@ public class Monkey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mAm.setActivityController(null);
|
mAm.setActivityController(null, true);
|
||||||
mNetworkMonitor.unregister(mAm);
|
mNetworkMonitor.unregister(mAm);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// just in case this was latent (after mCount cycles), make sure
|
// just in case this was latent (after mCount cycles), make sure
|
||||||
@@ -952,7 +952,7 @@ public class Monkey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mAm.setActivityController(new ActivityController());
|
mAm.setActivityController(new ActivityController(), true);
|
||||||
mNetworkMonitor.register(mAm);
|
mNetworkMonitor.register(mAm);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
System.err.println("** Failed talking with activity manager!");
|
System.err.println("** Failed talking with activity manager!");
|
||||||
|
|||||||
Reference in New Issue
Block a user