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

百度提交网站入口seo费用价格

百度提交网站入口,seo费用价格,做网站属于什么专业,建设企业网站电话是多少环境 aosp: android-14.0.0_r1 真机&#xff1a;Pixel5 目标 我想把usb连接的两个系统通知屏蔽掉 “正在通过 USB 为此设备充电”“已连接到 USB 调试” 步骤 首先找到这两句内容出现的位置在 frameworks/base/core/res/res/values-zh-rCN/strings.xml <string name&…

环境

aosp: android-14.0.0_r1
真机:Pixel5

目标

我想把usb连接的两个系统通知屏蔽掉

  1. “正在通过 USB 为此设备充电”
  2. “已连接到 USB 调试”

步骤

  1. 首先找到这两句内容出现的位置在
    frameworks/base/core/res/res/values-zh-rCN/strings.xml
<string name="usb_charging_notification_title" msgid="1674124518282666955">"正在通过 USB 为此设备充电"</string><string name="adb_active_notification_title" msgid="408390247354560331">"已连接到 USB 调试"</string>
<string name="adb_active_notification_message" msgid="5617264033476778211">"点按即可关闭 USB 调试"</string>
  1. 然后找到代码实现的位置
    分别是:
    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.khdw.cn/news/26500.html

相关文章:

  • 深圳有几个区哪个区最繁华seo就业
  • 淮安做网站就找卓越凯欣百度手机助手官网下载
  • 网站优化推广平台长春网络营销公司
  • 网站设计 佛山百度快照搜索引擎
  • 做外汇消息面的网站合肥瑶海区房价
  • 苏州网站优化企业腾讯云域名
  • 找人做网站注意哪些成都百度百科
  • 深圳手机商城网站设计公司nba球队排名
  • 淘宝客网站名中山网站建设公司
  • 做么做好网站运营无线网络优化工程师
  • 珠海企业网站网站推广优化公司
  • 医疗行业网站备案抖音seo排名优化公司
  • 谷哇网站建设西安百度百科
  • 重庆做营销型网站公司手机网页设计制作网站
  • 如何做高网站的浏览量360搜索引擎优化
  • 网站如何做su营销型网站制作企业
  • 上海机电设备公司网站建设seo教程免费分享
  • 常用wap网站开发工具 手机网站制作软件品牌推广方案模板
  • 甘肃建设厅网站官网网站空间租用
  • 常见的网站类型有推广网络公司
  • 有哪些公司的网站做的很好看网络媒体推广产品
  • wordpress菜单cssseo标题优化的方法
  • 自己怎么做企业网站建设昆明网络推广
  • 做房地产一级市场的看什么网站百度云搜索引擎入口官网
  • 找设计师网站公众号排名优化软件
  • 如何建立微网站详细网络运营师
  • 数字营销网站建设百度关键词排名原理
  • 娄底营销型网站建设seo 的原理和作用
  • 做黑界头像网站小辉seo
  • 网站布局怎么用dw做百度手游app下载