MTK会在开机后检测是否有摄像头,如果没有检测到,会把相机APP隐藏起来。
这个问题出现的原因应该是某一次开机时系统没有检查到相机,导致相机被隐藏了。而MTK代码有问题,即使后面重启又检测到相机了,也不会把相机APP恢复出来。
解决办法:去掉隐藏相机APP的代码
--- a/alps/vendor/mediatek/proprietary/packages/apps/Camera2/host/src/com/mediatek/camera/DisableCameraReceiver.java
+++ b/alps/vendor/mediatek/proprietary/packages/apps/Camera2/host/src/com/mediatek/camera/DisableCameraReceiver.java
@@ -73,7 +73,7 @@ public class DisableCameraReceiver extends BroadcastReceiver {
public void onReceive(final Context context, Intent intent) {
// Disable camera-related activities if there is no camera.
boolean needCameraActivity = hasCamera();
- if (!needCameraActivity) {
+ if (false) { //(!needCameraActivity) {
LogHelper.i(TAG, "camera2 repo: disable all camera activities");
for (int i = 0; i < ACTIVITIES.length; i++) {
disableComponent(context, ACTIVITIES[i]);