全部转换为小写,因为有的机型显示的大小写不规定
String manufacturer = Build.MANUFACTURER;if (manufacturer != null && manufacturer.length()>0){String phone_type = manufacturer.toLowerCase();Log.i("manufacturer", "initView: " + phone_type);switch (phone_type){case "huawei":registerBroadcast();initPush();break;case "xiaomi":break;}}