|
发表于 2021-10-19 17:52:21
6577 浏览 1 回复
不接摄像头 图标消失
MT6763
vendor/mediatek/proprietary/packages/apps/Camera/src/com/android/camera/DisableCameraReceiver.java
- @@ -46,18 +46,18 @@ public class DisableCameraReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- // Disable camera-related activities if there is no camera.
- - boolean needCameraActivity = FeatureSwitcher.isOnlyCheckBackCamera() ? hasBackCamera()
- - : hasCamera();
- + //boolean needCameraActivity = FeatureSwitcher.isOnlyCheckBackCamera() ? hasBackCamera()
- + // : hasCamera();
- - if (!needCameraActivity) {
- - Log.d(TAG, "disable all camera activities");
- - for (int i = 0; i < ACTIVITIES.length; i++) {
- - disableComponent(context, ACTIVITIES[i]);
- - }
- - }
- + //if (!needCameraActivity) {
- + // Log.d(TAG, "disable all camera activities");
- + // for (int i = 0; i < ACTIVITIES.length; i++) {
- + // disableComponent(context, ACTIVITIES[i]);
- + // }
- + //}
- // Disable this receiver so it won't run again.
- - disableComponent(context, "com.android.camera.DisableCameraReceiver");
- + //disableComponent(context, "com.android.camera.DisableCameraReceiver");
- }
- private boolean hasCamera() {
复制代码
|
|
|
|
|
|
|
|
楼主|
发表于 2021-10-19 17:54:44
mt8788
- +++ b/vendor/mediatek/proprietary/packages/apps/Camera2/host/src/com/mediatek/camera/DisableCameraReceiver.java
- @@ -72,7 +72,7 @@ public class DisableCameraReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(final Context context, Intent intent) {
- // Disable camera-related activities if there is no camera.
- - boolean needCameraActivity = hasCamera();
- + /*boolean needCameraActivity = hasCamera();
- if (!needCameraActivity) {
- LogHelper.i(TAG, "disable all camera activities");
- @@ -94,7 +94,7 @@ public class DisableCameraReceiver extends BroadcastReceiver {
- if(isLowRam()) {
- LogHelper.i(TAG,"kill process for low ram project");
- Process.killProcess(Process.myPid());
- - }
- + }*/
- /*else {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !isGmoRam()) {
- Intent appServiceIntent = new Intent(context, CameraAppService.class);
复制代码 |
|
|
|
|
|
|
登录或注册
|