ImmersionBar
ImmersionBar copied to clipboard
APP隐私合规检测出SDK自启动,这是为什么啊,没明白
@@
请问楼主知道为什么吗?
问下你解决了吗
- 使用了反射获取了系统信息 实在不行 应该可以考虑移除这部分代码
/**
* 小米刘海屏判断.
* Has notch at xiao mi int.
*
* @param context the context
* @return the int
*/
@SuppressLint("PrivateApi")
private static boolean hasNotchAtXiaoMi(Context context) {
int result = 0;
if (OSUtils.isXiaoMi()) {
try {
ClassLoader classLoader = context.getClassLoader();
Class<?> aClass = classLoader.loadClass(SYSTEM_PROPERTIES);
Method method = aClass.getMethod("getInt", String.class, int.class);
Object o = method.invoke(aClass, NOTCH_XIAO_MI, 0);
if (o != null) {
result = (Integer) o;
}
} catch (NoSuchMethodException ignored) {
} catch (IllegalAccessException ignored) {
} catch (InvocationTargetException ignored) {
} catch (ClassNotFoundException ignored) {
}
}
return result == 1;
}