public static boolean isHarmonyOs(){
    try {
        Class<?> buildExClass = Class.forName("com.huawei.system.BuildEx");
        Object osBrand = buildExClass.getMethod("getOsBrand").invoke(buildExClass);
        return "harmony".equalsIgnoreCase(osBrand.toString());
    }catch (Throwable e){
	return false;
    }
}

相关文章:

  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-05-02
  • 2021-06-29
  • 2023-01-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2021-12-01
  • 2021-11-07
  • 2021-04-09
  • 2021-05-17
  • 2022-12-23
相关资源
相似解决方案