SysteUI(MTK SystemUI,Android O1)的小图标加载
SystemUI对通知栏小图标排序和加载主要改下面两个配置:
这个值定义在
config.xml
<!--全部图标,编辑的时候显示 -->
<string name="quick_settings_tiles_stock" translatable="false">
wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location,hotspot,inversion,saver,work,cast,night
</string>
<!--显示图标-->
<string name="quick_settings_tiles_default" translatable="false">
wifi,cell,battery,dnd,flashlight,rotation
</string>
Systemui在加载小图标之前,要知道加载哪些小图。这个定义在:
TileQueryHelper.java
public class TileQueryHelper {
...
private void addStockTiles(Handler mainHandler, Handler bgHandler) {
String possible = mContext.getString(R.string.quick_settings_tiles_stock);
possible = qs_tile_view + "," + qs_tile_view_edit;
//TINNO END
String[] possibleTiles = possible.split(",");
for (int i = 0; i < possibleTiles.length; i++) {
final String spec = possibleTiles[i];
final QSTile tile = mHost.createTile(spec);
if (tile == null) {
continue;
} else if (!tile.isAvailable()) {
tile.destroy();
continue;