|
发表于 2020-5-23 10:05:49
6362 浏览 0 回复
XY6763CT-E android8.1 相机被策略禁用问题
在该平台,第三方app调用DevicePolicyManager.setCameraDisabled(),禁用相机后,第一次打开相机会提示“相机已被停用”,再次打开相机,就卡死,黑屏。期待相机禁用后,不卡死,退出去就是了
vendor\mediatek\proprietary\packages\apps\Camera2\common\src\com\mediatek\camera\common\device\v1\CameraDeviceManagerImpl.java
private void checkPreconditionsAndOpen(String cameraId,
CameraStateCallback callback, Handler handler,
boolean isSync) throws CameraOpenException {
checkDevicePolicy();
……
修改为:
private void checkPreconditionsAndOpen(String cameraId,
CameraStateCallback callback, Handler handler,
boolean isSync) throws CameraOpenException {
//modify by lzg
try{
checkDevicePolicy();
}catch(CameraOpenException e){
e.printStackTrace();
}
//end lzg
|
|
|
|
|
|
|
登录或注册
|