出厂修改默认显示大小
tspi_3m:/ $ wm density
Physical density: 320
Override density: 272
tspi_3m:/ $ wm density 320
tspi_3m:/ $ wm density
Physical density: 320
tspi_3m:/ $ wm density 272
tspi_3m:/ $ wm density
Physical density: 320
Override density: 272
tspi_3m:/ $ wm density 320
tspi_3m:/ $ wm density
Physical density: 320
Override density: 360
tspi_3m:/ $ wm density 320
tspi_3m:/ $ wm density
Physical density: 320
Override density: 400
参考「设置 → 显示 → 显示大小和文字」界面,系统一共支持 4 个档位:
- 初始值:320
- 最小值:272
- 第三档:360
- 最大值:400
wm density 的临时设置即时生效;若需调整出厂默认值,则需要修改设备配置:
device/rockchip/rk3576/tspi_3m/tspi_3m.mk
PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=320
USB 通知 heads-up 弹出去除
需求: 设备每次上电启动后,Android 系统都会弹出「已连接到 USB 调试」的通知。需要使其不再以弹窗形式弹出,但仍保留在通知栏中,便于用户下拉查看。
关键词: heads-up 弹出
frameworks/base/core/java/android/debug/AdbNotifications.java
修改前:
// Use the LOW-importance developer channel so the "USB debugging connected"
// notification no longer pops up as a heads-up, while remaining visible in the
// notification shade.
return new Notification.Builder(context, SystemNotificationChannels.DEVELOPER_IMPORTANT)
修改后:
// Use the LOW-importance developer channel so the "USB debugging connected"
// notification no longer pops up as a heads-up, while remaining visible in the
// notification shade.
return new Notification.Builder(context, SystemNotificationChannels.DEVELOPER)