{"id":1880,"date":"2022-11-25T18:00:34","date_gmt":"2022-11-25T10:00:34","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/1880.html"},"modified":"2022-11-25T18:00:34","modified_gmt":"2022-11-25T10:00:34","slug":"%e5%b0%8f%e7%b1%b3%e5%bc%80%e5%8f%91%e5%b9%b3%e5%8f%b0%e5%ba%94%e7%94%a8%e5%88%a0%e9%99%a4%e5%89%8d%e5%8f%b0%e6%9c%8d%e5%8a%a1%e9%80%9a%e7%9f%a5%e5%af%bc%e8%87%b4%e7%9a%84%e9%97%aa%e9%80%80%e9%97%ae","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/1880.html","title":{"rendered":"\u5c0f\u7c73\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u5220\u9664\u524d\u53f0\u670d\u52a1\u901a\u77e5\u5bfc\u81f4\u7684\u95ea\u9000\u95ee\u9898\u8bf4\u660e"},"content":{"rendered":"<p><span class=\"wpcom_tag_link\">\u5c0f\u7c73\u5f00\u53d1\u5e73\u53f0<\/span>\u5e94\u7528\u5220\u9664<span class=\"wpcom_tag_link\">\u524d\u53f0<\/span><span class=\"wpcom_tag_link\">\u670d\u52a1\u901a\u77e5<\/span>\u5bfc\u81f4\u7684<span class=\"wpcom_tag_link\">\u95ea\u9000<\/span>\u95ee\u9898\u8bf4\u660e<\/p>\n<ul>\n<li>\u8fd1\u671f\u53d1\u73b0\u8f83\u591a\u5e94\u7528\u51fa\u73b0\u95ea\u9000\u73b0\u8c61\uff0c\u5177\u4f53<span class=\"wpcom_tag_link\">trace<\/span>\u5982\u4e0b\uff1a<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code>AndroidRuntime: FATAL EXCEPTION: main\nAndroidRuntime: Process: com.xxx.app, PID: 25339\nAndroidRuntime: java.lang.SecurityException: Not allowed to delete channel XXX with a foreground service\nAndroidRuntime:         at android.os.Parcel.createExceptionOrNull(Parcel.java:2376)\nAndroidRuntime:         at android.os.Parcel.createException(Parcel.java:2360)\nAndroidRuntime:         at android.os.Parcel.readException(Parcel.java:2343)\nAndroidRuntime:         at android.os.Parcel.readException(Parcel.java:2285)\nAndroidRuntime:         at android.app.INotificationManager$Stub$Proxy.deleteNotificationChannel(INotificationManager.java:4040)\nAndroidRuntime:         at android.app.NotificationManager.deleteNotificationChannel(NotificationManager.java:909)\nAndroidRuntime:         at androidx.core.app.NotificationManagerCompat.deleteNotificationChannel(SourceFile:2)\nAndroidRuntime:         at com.gyf.cactus.ext.c$a.run(SourceFile:1)\nAndroidRuntime:         at android.os.Handler.handleCallback(Handler.java:938)\nAndroidRuntime:         at android.os.Handler.dispatchMessage(Handler.java:99)\nAndroidRuntime:         at android.os.Looper.loop(Looper.java:236)\nAndroidRuntime:         at android.app.ActivityThread.main(ActivityThread.java:8142)\nAndroidRuntime:         at java.lang.reflect.Method.invoke(Native Method)\nAndroidRuntime:         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)\nAndroidRuntime:         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)\nAndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:\n<a href=\"https:\/\/app.applebyme.cn\/shengcheng-59.html\">app\u751f\u6210\u5668\u6709\u54ea\u4e9b<\/a>AndroidRuntime:         at com.android.server.notification.NotificationManagerService$10.enforceDeletingChann<a href=\"https:\/\/app.applebyme.cn\/shengcheng-100.html\">app\u53d1\u5e03\u9875\u751f\u6210<\/a>elHasNoFgService(NotificationManagerService.java:3427)\nAndroidRuntime:         at com.android.server.notification.NotificationManagerService$10.deleteNotificationChannel(NotificationManagerService.java:3440)\nAndroidRuntime:         at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:1737)\nAndroidRuntime:         at android.os.Binder.execTransactInternal(Binder.java:1160)\nAndroidRuntime:         at android.os.Binder.execTransact(Binder.java:1129)<\/code><\/pre>\n<ul>\n<li>\u539f\u56e0\u662f\u53d7Google\u7684\u4e00\u7b14\u5b89\u5168\u6821\u9a8cPatch\u5f71\u54cd\uff1ahttps:\/\/cs.android.com\/android\/platform\/superproject\/+\/master:frameworks\/base\/services\/core\/java\/com\/android\/server\/notification\/NotificationManagerService.java;l=3413<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code><strong>private<\/strong> <strong>void<\/strong> <strong>enforceDeletingChannelHasNoFgService<\/strong>(String pkg, <strong>int<\/strong> userId,\n                String channelId) {\n            <strong>if<\/strong> (mAmi.hasForegroundServiceNotification(pkg, userId, channelId)) {\n                Slog.w(TAG, \"Package u\" + userId + \"\/\" + pkg\n                        + \" may not delete notification channel '\"\n                        + channelId + \"' with fg service\");\n                <strong>throw<\/strong> <strong>new<\/strong> SecurityException(\"Not allowed to delete channel \" + channelId\n                        + \" with a foreground service\");\n            }\n        }<\/code><\/pre>\n<p>\u4e5f\u5c31\u662fGoogle\u9650\u5236\u4e86\u5b58\u5728<span class=\"wpcom_tag_link\">\u524d\u53f0\u670d\u52a1<\/span>\u65f6\uff0c\u4e0d\u5141\u8bb8\u5e94\u7528\u5220\u9664\u4e0e\u524d\u53f0\u670d\u52a1\u7ed1\u5b9a\u7684channel\u3002<\/p>\n<p>\u4ee5\u4e0a\uff0c\u8bf7\u5f00\u53d1\u8005\u68c0\u67e5\u5904\u7406\uff0c\u611f\u8c22\u652f\u6301\uff01<\/p>\n<p>\u7f16\u8f91\uff1ayimen\uff0c\u5982\u82e5\u8f6c\u8f7d\uff0c\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttps:\/\/www.yimenapp.com\/kb-yimen\/12687\/<\/p>\n<p>\u90e8\u5206\u5185\u5bb9\u6765\u81ea\u7f51\u7edc\u6295\u7a3f\uff0c\u5982\u6709\u4fb5\u6743\u8054\u7cfb\u7acb\u5220<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0f\u7c73\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u5220\u9664\u524d\u53f0\u670d\u52a1\u901a\u77e5\u5bfc\u81f4\u7684\u95ea\u9000\u95ee\u9898\u8bf4\u660e\u8fd1\u671f\u53d1\u73b0\u8f83\u591a\u5e94\u7528\u51fa\u73b0\u95ea\u9000\u73b0\u8c61\uff0c\u5177\u4f53trace\u5982\u4e0b\uff1aAndroidRuntime: FATAL EXCEPTION: main<br \/>\nAndroidRuntime: Process: com.xxx.app, PID: 25339<br \/>\nAndroidRuntim<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[1312,548,922],"class_list":["post-1880","post","type-post","status-publish","format-standard","hentry","category-appshangjia","tag-1312","tag-548","tag-922"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/1880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=1880"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/1880\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=1880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=1880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=1880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}