搜索

126

主题

180

帖子

2130

积分

版主

Rank: 7Rank: 7Rank: 7

积分
2130
发表于 2021-10-19 17:52:21 6577 浏览 1 回复

不接摄像头 图标消失

MT6763
vendor/mediatek/proprietary/packages/apps/Camera/src/com/android/camera/DisableCameraReceiver.java


  1. @@ -46,18 +46,18 @@ public class DisableCameraReceiver extends BroadcastReceiver {
  2.     @Override
  3.     public void onReceive(Context context, Intent intent) {
  4.         // Disable camera-related activities if there is no camera.
  5. -        boolean needCameraActivity = FeatureSwitcher.isOnlyCheckBackCamera() ? hasBackCamera()
  6. -                : hasCamera();
  7. +        //boolean needCameraActivity = FeatureSwitcher.isOnlyCheckBackCamera() ? hasBackCamera()
  8. +       //        : hasCamera();

  9. -        if (!needCameraActivity) {
  10. -           Log.d(TAG, "disable all camera activities");
  11. -            for (int i = 0; i < ACTIVITIES.length; i++) {
  12. -                disableComponent(context, ACTIVITIES[i]);
  13. -            }
  14. -        }
  15. +        //if (!needCameraActivity) {
  16. +        //    Log.d(TAG, "disable all camera activities");
  17. +        //    for (int i = 0; i < ACTIVITIES.length; i++) {
  18. +        //        disableComponent(context, ACTIVITIES[i]);
  19. +        //    }
  20. +        //}

  21.         // Disable this receiver so it won't run again.
  22. -        disableComponent(context, "com.android.camera.DisableCameraReceiver");
  23. +       //disableComponent(context, "com.android.camera.DisableCameraReceiver");
  24.     }

  25.     private boolean hasCamera() {
复制代码







回复

使用道具 举报

126

主题

180

帖子

2130

积分

版主

Rank: 7Rank: 7Rank: 7

积分
2130
 楼主| 发表于 2021-10-19 17:54:44
mt8788
  1. +++ b/vendor/mediatek/proprietary/packages/apps/Camera2/host/src/com/mediatek/camera/DisableCameraReceiver.java
  2. @@ -72,7 +72,7 @@ public class DisableCameraReceiver extends BroadcastReceiver {
  3.      @Override
  4.      public void onReceive(final Context context, Intent intent) {
  5.          // Disable camera-related activities if there is no camera.
  6. -        boolean needCameraActivity = hasCamera();
  7. +        /*boolean needCameraActivity = hasCamera();

  8.          if (!needCameraActivity) {
  9.              LogHelper.i(TAG, "disable all camera activities");
  10. @@ -94,7 +94,7 @@ public class DisableCameraReceiver extends BroadcastReceiver {
  11.          if(isLowRam()) {
  12.              LogHelper.i(TAG,"kill process for low ram project");
  13.              Process.killProcess(Process.myPid());
  14. -        }
  15. +        }*/
  16.          /*else {
  17.              if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !isGmoRam()) {
  18.                  Intent appServiceIntent = new Intent(context, CameraAppService.class);
复制代码
回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


登录或注册
快速回复 返回顶部 返回列表