public final classNotchScreenUtil {/*** 华为start*/
//判断是否是华为刘海屏
public static booleanhasNotchInScreenAtHuawei(Context context) {boolean ret = false;try{
ClassLoader cl=context.getClassLoader();
Class> HwNotchSizeUtil = cl.loadClass("com.huawei.android.util.HwNotchSizeUtil");
Method get= HwNotchSizeUtil.getMethod("hasNotchInScreen");
ret=(Boolean) get.invoke(HwNotchSizeUtil);
Log.d("NotchScreenUtil", "this Huawei device has notch in screen?"+ret);
}catch(ClassNotFoundException e) {
Log.e("NotchScreenUtil", "hasNotchInScreen ClassNotFoundException", e);
}catch(NoSuchMethodException e) {
Log.e("NotchScreenUtil", "hasNotchInScreen NoSuchMethodException", e);
}catch(Exception e) {
Log.e("NotchScreenUtil", &