Merge "shamu: Fix BOARD_MKBOOTIMG_ARGS"
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 00a65da..4c0c461 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -5328,11 +5328,31 @@
break;
}
-
info->orientation = gCamCapability[cameraId]->sensor_mount_angle;
info->device_version = CAMERA_DEVICE_API_VERSION_3_2;
info->static_camera_characteristics = gStaticMetadata[cameraId];
+ //For now assume both cameras can operate independently.
+ info->conflicting_devices = NULL;
+ info->conflicting_devices_length = 0;
+
+ //resource cost is 100 * MIN(1.0, m/M),
+ //where m is throughput requirement with maximum stream configuration
+ //and M is CPP maximum throughput.
+ float max_fps = 0.0;
+ for (uint32_t i = 0;
+ i < gCamCapability[cameraId]->fps_ranges_tbl_cnt; i++) {
+ if (max_fps < gCamCapability[cameraId]->fps_ranges_tbl[i].max_fps)
+ max_fps = gCamCapability[cameraId]->fps_ranges_tbl[i].max_fps;
+ }
+ float ratio = 1.0 * MAX_PROCESSED_STREAMS *
+ gCamCapability[cameraId]->active_array_size.width *
+ gCamCapability[cameraId]->active_array_size.height * max_fps /
+ gCamCapability[cameraId]->max_pixel_bandwidth;
+ info->resource_cost = 100 * MIN(1.0, ratio);
+ ALOGI("%s: camera %d resource cost is %d", __func__, cameraId,
+ info->resource_cost);
+
return rc;
}
diff --git a/camera/QCamera2/stack/common/cam_intf.h b/camera/QCamera2/stack/common/cam_intf.h
index 82d0757..f700775 100644
--- a/camera/QCamera2/stack/common/cam_intf.h
+++ b/camera/QCamera2/stack/common/cam_intf.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -342,6 +342,9 @@
cam_dimension_t max_viewfinder_size;
uint8_t flash_dev_name[QCAMERA_MAX_FILEPATH_LENGTH];
+
+ /* maximum pixel bandwidth shared between cameras */
+ uint64_t max_pixel_bandwidth;
} cam_capability_t;
typedef enum {
diff --git a/init.shamu.rc b/init.shamu.rc
index a59fda2..6bebb32 100644
--- a/init.shamu.rc
+++ b/init.shamu.rc
@@ -602,6 +602,7 @@
user system
group system radio
-service cnd /system/bin/cnd
- class late_start
- socket cnd stream 660 root inet
+# STOPSHIP: Required for WiFi Calling
+#service cnd /system/bin/cnd
+# class late_start
+# socket cnd stream 660 root inet
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index a3232c8..22f9ad1 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -274,7 +274,8 @@
<bool name="config_device_volte_available">true</bool>
<!-- Flag specifying whether WFC over IMS is availasble on device -->
- <bool name="config_device_wfc_ims_available">true</bool>
+ <!-- STOPSHIP if disabled -->
+ <bool name="config_device_wfc_ims_available">false</bool>
<!-- Configure mobile tcp buffer sizes in the form:
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
diff --git a/sepolicy/camera.te b/sepolicy/camera.te
index 40e9c39..77cb8ef 100644
--- a/sepolicy/camera.te
+++ b/sepolicy/camera.te
@@ -5,7 +5,7 @@
# Started by init
init_daemon_domain(camera)
-allow camera self:process execmem;
+allow camera system_file:file execmod;
# Interact with other media devices
allow camera camera_device:dir search;