修改framework android policy

在PhoneWindowmanager.java中做如下修改即可

if (keyCode == KeyEvent.KEYCODE_HOME) {
// If we have released the home key, and didn't do anything else
// while it was pressed, then it is time to go home!
+/* Thu, 29 Jan 2015 17:24:38 +0800
+ *
+ */
+ WindowManager.LayoutParams attrs = win != null ? win.getAttrs() : null;
+ if (attrs != null
+ && "com.android.xxxx/com.android.xxxx.xxxxx".equals(attrs.getTitle())) {
+ return 0;
+ }
+// End
if (!down) {
cancelPreloadRecentApps();

@@ -2406,7 +2415,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {

// If a system window has focus, then it doesn't make sense
// right now to interact with applications.
+/* Thu, 29 Jan 2015 17:23:40 +0800
+ *
WindowManager.LayoutParams attrs = win != null ? win.getAttrs() : null;
+ */
+// End
if (attrs != null) {
final int type = attrs.type;
if (type == WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android设置在ListView中让TextView滚动
  2. Android 源代码结构
  3. android 电容屏(一):电容屏基本原理篇
  4. android:gravity 和 android:layout_Grav
  5. android图片涂鸦,具有设置画笔,撤销,缩放移
  6. Android(安卓)学习笔记 ——第二行代码
  7. Android使用AudioRecord遇到的问题与解决
  8. Android ANR问题分析思路
  9. Android(安卓)Message 及其使用
  10. android 电容屏(三):驱动调试之驱动程序分析