--- a/mediatek/source/packages/FMRadio/src/com/mediatek/FMRadio/FMRadioActivity.java
+++ b/mediatek/source/packages/FMRadio/src/com/mediatek/FMRadio/FMRadioActivity.java
@@ -2848,6 +2848,18 @@ Log.d(TAG,"********* ACTION_AIRPLANE_MODE_CHANGED ***");
}
refreshButtonStatus();
} else {
+ if (!mIsPlaying) {
+ mIsExitPressed = true;
+ // use handler post to finish, because on ICS character dismiss first,
+ // if not do this, pop menu will blank about 1 second, because pop menu
+ // will recycle when activity finish
+ mHandler.post(new Runnable() {
+ public void run() {
+ finish();
+ }
+ });
+ }
super.onBackPressed();
}
@@ -3815,4 +3827,21 @@ Log.d(TAG,"********* ACTION_AIRPLANE_MODE_CHANGED ***");
FMRadioLogUtils.d(TAG, "unmount sd card is recording sd card: " + result);
return result;
}
+ @Override
+ protected void onUserLeaveHint() {
+ // TODO Auto-generated method stub
+ if (!mIsPlaying) {
+ mIsExitPressed = true;
+ // use handler post to finish, because on ICS character dismiss first,
+ // if not do this, pop menu will blank about 1 second, because pop menu
+ // will recycle when activity finish
+ mHandler.post(new Runnable() {
+ public void run() {
+ finish();
+ }
+ });
+ }
+ super.onUserLeaveHint();
+ }
}
阅读(181) | 评论(0) | 转发(0) |