[android-developers] Re: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

2012-01-29 Thread Teo Yan
Thx Murphy. I try to fix it by like this: boolean activityActive = true; protected void onResume() { // do something activityActive = true; } protected void onPause() { // do something activityActive = false; } public boolean onKeyUp(int keyCode, KeyEvent event) { if

[android-developers] java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

2012-01-13 Thread Teo Yan
Hi, I'm using a stability tool to test my app(my app is developed before ICS, but currently running on ICS), the tool is similar with the monkey. And this exception happen to me, but only 15% to reproduce. Here's the exception stack: java.lang.IllegalStateException: Can not perform this action