屏蔽应用报错弹框和无响应弹框
16lz
2021-01-23
diff --git a/frameworks/base/services/java/com/android/server/am/ActivityManagerService.java b/frameworks/base/services/java/com/android/server/am/ActivityManagerService.javaindex f33ee52..d6dfde5 100755--- a/frameworks/base/services/java/com/android/server/am/ActivityManagerService.java+++ b/frameworks/base/services/java/com/android/server/am/ActivityManagerService.java@@ -1139,7 +1139,12 @@ public final class ActivityManagerService extends ActivityManagerNative } return; }- if (mShowDialogs && !mSleeping && !mShuttingDown) {++if (res != null) {+ res.set(0);+ }+ //delete by cxs+ /*if (mShowDialogs && !mSleeping && !mShuttingDown) { Dialog d = new AppErrorDialog(mContext, ActivityManagerService.this, res, proc); d.show();@@ -1150,7 +1155,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (res != null) { res.set(0); }- }+ }*/ } ensureBootCompleted();@@ -1173,7 +1178,9 @@ public final class ActivityManagerService extends ActivityManagerNative null, null, 0, null, null, null, AppOpsManager.OP_NONE, false, false, MY_PID, Process.SYSTEM_UID, 0 /* TODO: Verify */); - if (mShowDialogs) {+ killAppAtUsersRequest(proc, null);+//delete by cxs+ /* if (mShowDialogs) { Dialog d = new AppNotRespondingDialog(ActivityManagerService.this, mContext, proc, (ActivityRecord)data.get("activity"), msg.arg1 != 0);@@ -1182,7 +1189,7 @@ public final class ActivityManagerService extends ActivityManagerNative } else { // Just kill the app if there is no dialog to be shown. killAppAtUsersRequest(proc, null);- }+ }*/ } ensureBootCompleted();
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer