ImmersionBar icon indicating copy to clipboard operation
ImmersionBar copied to clipboard

APP隐私合规检测出SDK自启动,这是为什么啊,没明白

Open zeroplucky opened this issue 2 years ago • 2 comments

@@image

请问楼主知道为什么吗?

zeroplucky avatar Sep 16 '21 07:09 zeroplucky

问下你解决了吗

originzyf avatar Feb 15 '22 05:02 originzyf

  • 使用了反射获取了系统信息 实在不行 应该可以考虑移除这部分代码
    /**
     * 小米刘海屏判断.
     * 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;
    }

sorrybeman avatar Mar 02 '22 07:03 sorrybeman