merge in jb-release history after reset to master
diff --git a/include/cutils/sched_policy.h b/include/cutils/sched_policy.h
index 753a08c..c6e4fc4 100644
--- a/include/cutils/sched_policy.h
+++ b/include/cutils/sched_policy.h
@@ -21,21 +21,26 @@
extern "C" {
#endif
+/* Keep in sync with THREAD_GROUP_* in frameworks/base/core/java/android/os/Process.java */
typedef enum {
+ SP_DEFAULT = -1,
SP_BACKGROUND = 0,
SP_FOREGROUND = 1,
SP_CNT,
SP_MAX = SP_CNT - 1,
+ SP_SYSTEM_DEFAULT = SP_FOREGROUND,
} SchedPolicy;
/* Assign thread tid to the cgroup associated with the specified policy.
* If the thread is a thread group leader, that is it's gettid() == getpid(),
* then the other threads in the same thread group are _not_ affected.
+ * On platforms which support gettid(), zero tid means current thread.
* Return value: 0 for success, or -errno for error.
*/
extern int set_sched_policy(int tid, SchedPolicy policy);
/* Return the policy associated with the cgroup of thread tid via policy pointer.
+ * On platforms which support gettid(), zero tid means current thread.
* Return value: 0 for success, or -1 for error and set errno.
*/
extern int get_sched_policy(int tid, SchedPolicy *policy);
diff --git a/include/netutils/dhcp.h b/include/netutils/dhcp.h
index bd16240..d25e58f 100644
--- a/include/netutils/dhcp.h
+++ b/include/netutils/dhcp.h
@@ -30,7 +30,8 @@
char *dns1,
char *dns2,
char *server,
- uint32_t *lease);
+ uint32_t *lease,
+ char *vendorInfo);
extern int dhcp_stop(const char *ifname);
extern int dhcp_release_lease(const char *ifname);
extern char *dhcp_get_errmsg();
diff --git a/include/system/audio.h b/include/system/audio.h
index 382fc36..3807317 100644
--- a/include/system/audio.h
+++ b/include/system/audio.h
@@ -351,16 +351,17 @@
* (when getOuput() is called) to an available output stream.
*/
typedef enum {
- AUDIO_OUTPUT_FLAG_NONE = 0x0, // no attributes
- AUDIO_OUTPUT_FLAG_DIRECT = 0x1, // this output directly connects a track
- // to one output stream: no software mixer
- AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, // this output is the primary output of
- // the device. It is unique and must be
- // present. It is opened by default and
- // receives routing, audio mode and volume
- // controls related to voice calls.
- AUDIO_OUTPUT_FLAG_FAST = 0x4, // output supports "fast tracks",
- // defined elsewhere
+ AUDIO_OUTPUT_FLAG_NONE = 0x0, // no attributes
+ AUDIO_OUTPUT_FLAG_DIRECT = 0x1, // this output directly connects a track
+ // to one output stream: no software mixer
+ AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, // this output is the primary output of
+ // the device. It is unique and must be
+ // present. It is opened by default and
+ // receives routing, audio mode and volume
+ // controls related to voice calls.
+ AUDIO_OUTPUT_FLAG_FAST = 0x4, // output supports "fast tracks",
+ // defined elsewhere
+ AUDIO_OUTPUT_FLAG_DEEP_BUFFER = 0x8 // use deep audio buffers
} audio_output_flags_t;
static inline bool audio_is_output_device(audio_devices_t device)
diff --git a/include/system/graphics.h b/include/system/graphics.h
index 729e92c..e206e3e 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -86,7 +86,27 @@
*/
HAL_PIXEL_FORMAT_YV12 = 0x32315659, // YCrCb 4:2:0 Planar
-
+ /*
+ * Android RAW sensor format:
+ *
+ * This format is exposed outside of the HAL to applications.
+ *
+ * RAW_SENSOR is a single-channel 16-bit format, typically representing raw
+ * Bayer-pattern images from an image sensor, with minimal processing.
+ *
+ * The exact pixel layout of the data in the buffer is sensor-dependent, and
+ * needs to be queried from the camera device.
+ *
+ * Generally, not all 16 bits are used; more common values are 10 or 12
+ * bits. All parameters to interpret the raw data (black and white points,
+ * color space, etc) must be queried from the camera device.
+ *
+ * This format assumes
+ * - an even width
+ * - an even height
+ * - a horizontal stride multiple of 16 pixels (32 bytes).
+ */
+ HAL_PIXEL_FORMAT_RAW_SENSOR = 0x20,
/* Legacy formats (deprecated), used by ImageFormat.java */
HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, // NV16
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index 35d362a..345532b 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -189,6 +189,11 @@
int get_sched_policy(int tid, SchedPolicy *policy)
{
+#ifdef HAVE_GETTID
+ if (tid == 0) {
+ tid = gettid();
+ }
+#endif
pthread_once(&the_once, __initialize);
if (__sys_supports_schedgroups) {
@@ -219,8 +224,23 @@
return 0;
}
+/* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged.
+ * Call this any place a SchedPolicy is used as an input parameter.
+ * Returns the possibly re-mapped policy.
+ */
+static inline SchedPolicy _policy(SchedPolicy p)
+{
+ return p == SP_DEFAULT ? SP_SYSTEM_DEFAULT : p;
+}
+
int set_sched_policy(int tid, SchedPolicy policy)
{
+#ifdef HAVE_GETTID
+ if (tid == 0) {
+ tid = gettid();
+ }
+#endif
+ policy = _policy(policy);
pthread_once(&the_once, __initialize);
#if POLICY_DEBUG
@@ -275,6 +295,7 @@
const char *get_sched_policy_name(SchedPolicy policy)
{
+ policy = _policy(policy);
static const char * const strings[SP_CNT] = {
[SP_BACKGROUND] = "bg",
[SP_FOREGROUND] = "fg",
diff --git a/libnetutils/dhcp_utils.c b/libnetutils/dhcp_utils.c
index d18931b..398d9c4 100644
--- a/libnetutils/dhcp_utils.c
+++ b/libnetutils/dhcp_utils.c
@@ -70,7 +70,8 @@
char *dns1,
char *dns2,
char *server,
- uint32_t *lease)
+ uint32_t *lease,
+ char *vendorInfo)
{
char prop_name[PROPERTY_KEY_MAX];
char prop_value[PROPERTY_VALUE_MAX];
@@ -122,6 +123,10 @@
if (property_get(prop_name, prop_value, NULL)) {
*lease = atol(prop_value);
}
+
+ snprintf(prop_name, sizeof(prop_name), "%s.%s.vendorInfo", DHCP_PROP_NAME_PREFIX, interface);
+ property_get(prop_name, vendorInfo, NULL);
+
return 0;
}
@@ -158,7 +163,8 @@
char *dns1,
char *dns2,
char *server,
- uint32_t *lease)
+ uint32_t *lease,
+ char *vendorInfo)
{
char result_prop_name[PROPERTY_KEY_MAX];
char daemon_prop_name[PROPERTY_KEY_MAX];
@@ -207,8 +213,8 @@
}
if (strcmp(prop_value, "ok") == 0) {
char dns_prop_name[PROPERTY_KEY_MAX];
- if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns1, dns2, server, lease)
- == -1) {
+ if (fill_ip_info(interface, ipaddr, gateway, prefixLength,
+ dns1, dns2, server, lease, vendorInfo) == -1) {
return -1;
}
@@ -305,7 +311,8 @@
in_addr_t *dns1,
in_addr_t *dns2,
in_addr_t *server,
- uint32_t *lease)
+ uint32_t *lease,
+ char *vendorInfo)
{
char result_prop_name[PROPERTY_KEY_MAX];
char prop_value[PROPERTY_VALUE_MAX] = {'\0'};
@@ -341,7 +348,8 @@
return -1;
}
if (strcmp(prop_value, "ok") == 0) {
- fill_ip_info(interface, ipaddr, gateway, prefixLength, dns1, dns2, server, lease);
+ fill_ip_info(interface, ipaddr, gateway, prefixLength,
+ dns1, dns2, server, lease, vendorInfo);
return 0;
} else {
snprintf(errmsg, sizeof(errmsg), "DHCP Renew result was %s", prop_value);
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 8f93b49..69b8e44 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -247,6 +247,8 @@
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq