第一篇

Android | 2019-05-07 17:29:54 | 阅读 707 次 | 评论(3)

横空出世,噔噔噔噔~


    private boolean isCameraDisabledByDpm() {
        final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
        if (dpm != null) {
            try {
                final int userId = ActivityManagerNative.getDefault().getCurrentUser().id;
                final int disabledFlags = dpm.getKeyguardDisabledFeatures(null, userId);
                final boolean disabledBecauseKeyguardSecure = (disabledFlags & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) != 0
                       /* && mCallback.isSecure()*/;
                /* && mPhoneStatusBar.isKeyguardSecure() */;
                return dpm.getCameraDisabled(null) || disabledBecauseKeyguardSecure;
            } catch (RemoteException e) {
                Log.e("camera", "Can't get userId", e);
            }
        }
        return false;
    }

第二段:

-------------------------------- 作者在 2019-05-07 17:32:59 补充以下内容 --------------------------------

Screenshot_20190312_163630.png (上传于2019-05-07 17:29:54)
Screenshot_20190312_163630.png
文章评论,共3条
扫地小僧
2019-05-07 17:30
1
呵呵,自己的楼自己镇
bill98
2019-05-25 10:46
2
额,解释一下?
布阿走波(游客)
2019-07-05 11:12
3
啥东西???????
游客请输入验证码
文章归档
阅读排行