Android系統耳機圖示顯示
Android系統耳機圖示顯示
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
public static ArraySet<String> getIconBlacklist(String blackListStr) {
ArraySet<String> ret = new ArraySet<>();
if (blackListStr == null) {
blackListStr = "rotate,headset";//headset耳機在黑名單中,移除可顯示
}
String[] blacklist = blackListStr.split(",");
for (String slot : blacklist) {
if (!TextUtils.isEmpty(slot)) {
ret.add(slot);
}
}
return ret;
}
原始碼
//配置檔案中新增需要顯示的圖示
frameworks/base/core/res/res/values/config.xml
<!-- Do not translate. Defines the slots for the right-hand side icons. That is to say, the
icons in the status bar that are not notifications. -->
<string-array name="config_statusBarIcons">
<item><xliff:g id="id">@string/status_bar_alarm_clock</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_rotate</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_headset</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_data_saver</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_ime</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_sync_failing</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_sync_active</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_nfc</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_tty</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_speakerphone</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_cdma_eri</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_data_connection</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_phone_evdo_signal</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_phone_signal</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_secure</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_managed_profile</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_cast</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_screen_record</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_vpn</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_bluetooth</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_camera</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_microphone</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_location</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_mute</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_volume</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_zen</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_ethernet</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_wifi</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_hotspot</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_mobile</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_airplane</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_battery</xliff:g></item>
<item><xliff:g id="id">@string/status_bar_sensors_off</xliff:g></item>
</string-array>
<string translatable="false" name="status_bar_rotate">rotate</string>
<string translatable="false" name="status_bar_headset">headset</string>
<string translatable="false" name="status_bar_data_saver">data_saver</string>
<string translatable="false" name="status_bar_managed_profile">managed_profile</string>
<string translatable="false" name="status_bar_ime">ime</string>
<string translatable="false" name="status_bar_sync_failing">sync_failing</string>
<string translatable="false" name="status_bar_sync_active">sync_active</string>
<string translatable="false" name="status_bar_cast">cast</string>
<string translatable="false" name="status_bar_hotspot">hotspot</string>
<string translatable="false" name="status_bar_location">location</string>
<string translatable="false" name="status_bar_bluetooth">bluetooth</string>
<string translatable="false" name="status_bar_nfc">nfc</string>
<string translatable="false" name="status_bar_tty">tty</string>
<string translatable="false" name="status_bar_speakerphone">speakerphone</string>
<string translatable="false" name="status_bar_zen">zen</string>
<string translatable="false" name="status_bar_mute">mute</string>
<string translatable="false" name="status_bar_volume">volume</string>
<string translatable="false" name="status_bar_wifi">wifi</string>
<string translatable="false" name="status_bar_cdma_eri">cdma_eri</string>
<string translatable="false" name="status_bar_data_connection">data_connection</string>
<string translatable="false" name="status_bar_phone_evdo_signal">phone_evdo_signal</string>
<string translatable="false" name="status_bar_phone_signal">phone_signal</string>
<string translatable="false" name="status_bar_battery">battery</string>
<string translatable="false" name="status_bar_alarm_clock">alarm_clock</string>
<string translatable="false" name="status_bar_secure">secure</string>
<string translatable="false" name="status_bar_clock">clock</string>
<string translatable="false" name="status_bar_mobile">mobile</string>
<string translatable="false" name="status_bar_vpn">vpn</string>
<string translatable="false" name="status_bar_ethernet">ethernet</string>
<string translatable="false" name="status_bar_microphone">microphone</string>
<string translatable="false" name="status_bar_camera">camera</string>
<string translatable="false" name="status_bar_airplane">airplane</string>
<string translatable="false" name="status_bar_sensors_off">sensors_off</string>
<string translatable="false" name="status_bar_screen_record">screen_record</string>
相關文章
- Android 12(S) 圖形顯示系統 - 開篇Android
- Android 12(S) 圖形顯示系統 - 示例應用(二)Android
- Android 12(S) 圖形顯示系統 - 基本概念(一)Android
- Android 12(S) 圖形顯示系統 - createSurface的流程(五)Android
- win10系統顯示桌面圖示的方法Win10
- Android 12(S) 影像顯示系統 - GraphicBuffer同步機制 - FenceAndroid
- Android 12(S) 圖形顯示系統 - BufferQueue/BLASTBufferQueue之初識(六)AndroidAST
- Android 12(S) 圖形顯示系統 - BufferQueue的工作流程(十一)Android
- Android 12(S) 圖形顯示系統 - BufferQueue的工作流程(十)Android
- Android 12(S) 圖形顯示系統 - BufferQueue的工作流程(八)Android
- Android 12(S) 圖形顯示系統 - 初識ANativeWindow/Surface/SurfaceControl(七)Android
- mac系統桌面怎麼顯示CD圖示等裝置?Mac
- windows10照片大圖示不顯示怎麼辦_win10系統不顯示圖示的解決方法WindowsWin10
- Android6.0 顯示系統(五) SurfaceFlinger服務Android
- Android顯示子系統相關基礎概念Android
- Win10系統如何建立顯示桌面圖示_win10怎麼新增顯示桌面Win10
- linux系統lcd顯示jpg格式圖片Linux
- win10 office圖示無法顯示怎麼辦 w10系統office圖示顯示不出來處理方法Win10
- android7.0以上呼叫系統相機拍照並顯示到ImageView上AndroidView
- win10程式圖示顯示不正常怎麼辦_win10系統圖示顯示不正常的解決方法Win10
- Mac OS系統如何把我的電腦計算機圖示顯示在桌面上Mac計算機
- Android優化——繪製優化之android系統顯示原理(一)Android優化
- win10電腦怎樣設定顯示圖示和通知 win10系統設定顯示圖示和通知的步驟Win10
- Activity背景顯示app圖示APP
- win10 能顯示耳機音量 但耳機沒聲音怎麼解決Win10
- qt 使用qmake pro檔案新增 ico圖示,程式執行時顯示圖示,exe也顯示圖示QT
- Android Libgdx 顯示文字Android
- Android 12(S) 影像顯示系統 - SurfaceFlinger 之 VSync - 中篇(十七)Android
- win10系統工作列圖示名稱不顯示如何解決Win10
- win10 開機桌面圖示顯示慢如何處理 win10電腦開機顯示桌面圖示慢解決方法Win10
- vue 滑鼠移入顯示圖示 ,滑鼠移出隱藏圖示Vue
- win10系統開機鎖屏介面只顯示一張圖片不顯示日期時間如何解決Win10
- Android 12(S) 圖形顯示系統 - SurfaceFlinger的啟動和訊息佇列處理機制(四)Android佇列
- win10 如何顯示隱藏圖示_win10系統右下角的圖示怎麼隱藏Win10
- Win10系統工作列沒有顯示音量圖示的解決方法Win10
- Android 12(S) 圖形顯示系統 - 簡單聊聊 SurfaceView 與 BufferQueue的關聯(十三)AndroidView
- 影片直播系統原始碼,Android EditText不顯示提示文字hint原始碼Android
- Android 12(S) 影像顯示系統 - SurfaceFlinger之VSync-上篇(十六)Android