当前位置: 首页 > news >正文

西安网站开发方案温江网站开发

西安网站开发方案,温江网站开发,晋城市新闻,合肥到黄山旅游攻略环境 aosp: android-14.0.0_r1 真机#xff1a;Pixel5 目标 我想把usb连接的两个系统通知屏蔽掉 “正在通过 USB 为此设备充电”“已连接到 USB 调试” 步骤 首先找到这两句内容出现的位置在 frameworks/base/core/res/res/values-zh-rCN/strings.xml string namePixel5 目标 我想把usb连接的两个系统通知屏蔽掉 “正在通过 USB 为此设备充电”“已连接到 USB 调试” 步骤 首先找到这两句内容出现的位置在 frameworks/base/core/res/res/values-zh-rCN/strings.xml string nameusb_charging_notification_title msgid1674124518282666955正在通过 USB 为此设备充电/stringstring nameadb_active_notification_title msgid408390247354560331已连接到 USB 调试/string string nameadb_active_notification_message msgid5617264033476778211点按即可关闭 USB 调试/string然后找到代码实现的位置 分别是 frameworks/base/core/java/android/debug/AdbNotifications.java frameworks/base/services/usb/java/com/android/server/usb/UsbDeviceManager.java Notification.Builder builder new Notification.Builder(mContext, channel).setSmallIcon(com.android.internal.R.drawable.stat_sys_adb).setWhen(0).setOngoing(true).setTicker(title).setDefaults(0) // please be quiet.setColor(mContext.getColor(com.android.internal.R.color.system_notification_accent_color)).setContentTitle(title).setContentText(message).setContentIntent(pi).setVisibility(Notification.VISIBILITY_PUBLIC);if (titleRes com.android.internal.R.string.usb_unsupported_audio_accessory_title) {builder.setStyle(new Notification.BigTextStyle().bigText(message));}Notification notification builder.build();mNotificationManager.notifyAsUser(null, id, notification,UserHandle.ALL);Slog.d(TAG, push notification: title);Log.w(TAG, push notification:title title ;message message);mUsbNotificationId id;if (!mAdbNotificationShown) {Notification notification AdbNotifications.createNotification(mContext,AdbTransportType.USB);mAdbNotificationShown true;Log.w(TAG, updateAdbNotification:id id);mNotificationManager.notifyAsUser(null, id, notification, UserHandle.ALL); }主要是mNotificationManager.notifyAsUser()这个方法它会把内容都通知出去。所以处理它就行如果不想要所有的系统通知屏蔽掉它就行。但我只是不想要两个内容。 修改如下 Notification notification builder.build(); if(message ! null !message.equals(r.getText(com.android.internal.R.string.usb_notification_message))) {mNotificationManager.notifyAsUser(null, id, notification,UserHandle.ALL); }if (!mAdbNotificationShown) {Notification notification AdbNotifications.createNotification(mContext, AdbTransportType.USB);mAdbNotificationShown true;//mNotificationManager.notifyAsUser(null, id, notification, UserHandle.ALL); }很简单吧最后测试通过
http://www.hkea.cn/news/14262000/

相关文章:

  • 一起做网站下载数据包网站营销与推广方案
  • 丰台做网站公司腾讯广告投放端提供的建站工具有
  • 制作公司网站流程建筑工程网格化管理实施方案
  • 网站美工费用网站建设的想法和意见
  • 中山网页建站模板网络广告策划的流程顺序为
  • 电商网站 cms云南网络营销seo
  • 免费建立平台网站把插钉机子拍下怎么做网站
  • 网站怎么建设商城织梦网站下载
  • 17网站一起做网店官网网站备案密码重置申请表
  • 速卖通网站怎么做推广广州十大软件公司排名
  • 新沂徐州网站开发浙江今天的新消息
  • 装饰公司网站开发做网站链接
  • 海南建设大厅网站合肥网站建设程序
  • 如何进行电子商务网站建设西湖区网站建设
  • 怎么做网站的步骤wordpress get请求参数
  • 佛山外贸网站制作公司设计网站意味着什么
  • 网站建设技术流程图奔驰高端品牌
  • 个体户做网站杭州建设监理行业协会
  • 网站机房建设图台州路桥做网站的公司有哪些
  • 公司做个网站广东建设工程备案网站
  • app软件制作网站怎样做网站广告
  • 新网站快速收录我要做自媒体要怎么开始
  • 网站百度文库google推广技巧
  • 网站流量站怎么做的购物网站策划方案
  • 公司做零申报在哪个网站上鲜花网站设计
  • 自己开网站工作室焦作建设网站哪家好
  • 东莞网站建设 环保设备网站做好了如何发布
  • 购物网站及app开发网站的建设与维护怎么弄
  • 曲阜网站建设公司图片制作工具
  • 新闻类的网站如何做优化、口碑好的网站建设价格