Chinaunix首页 | 论坛 | 博客
  • 博客访问: 823386
  • 博文数量: 860
  • 博客积分: 425
  • 博客等级: 下士
  • 技术积分: 1464
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-20 19:57
个人简介

对技术执着

文章分类

全部博文(860)

文章存档

2019年(16)

2018年(12)

2015年(732)

2013年(85)

2012年(15)

我的朋友

分类: LINUX

2015-07-08 17:20:12

--- 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();
+    }
}
阅读(327) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册