Chinaunix首页 | 论坛 | 博客
  • 博客访问: 353434
  • 博文数量: 570
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2015-11-17 10:38
文章分类

全部博文(570)

文章存档

2015年(570)

我的朋友

分类: LINUX

2015-11-17 10:50:07

--- 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) |
给主人留下些什么吧!~~