merge in jb-mr1-release history after reset to jb-mr1-dev
diff --git a/charger/Android.mk b/charger/Android.mk
index 5367a98..de9b184 100644
--- a/charger/Android.mk
+++ b/charger/Android.mk
@@ -17,7 +17,7 @@
LOCAL_C_INCLUDES := bootable/recovery
LOCAL_STATIC_LIBRARIES := libminui libpixelflinger_static libpng
-LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils libc
+LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils libm libc
include $(BUILD_EXECUTABLE)
diff --git a/include/system/graphics.h b/include/system/graphics.h
index e0ad257..82b5fcc 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -124,6 +124,22 @@
*/
HAL_PIXEL_FORMAT_BLOB = 0x21,
+ /*
+ * Android format indicating that the choice of format is entirely up to the
+ * device-specific Gralloc implementation.
+ *
+ * The Gralloc implementation should examine the usage bits passed in when
+ * allocating a buffer with this format, and it should derive the pixel
+ * format from those usage flags. This format will never be used with any
+ * of the GRALLOC_USAGE_SW_* usage flags.
+ *
+ * If a buffer of this format is to be used as an OpenGL ES texture, the
+ * framework will assume that sampling the texture will always return an
+ * alpha value of 1.0 (i.e. the buffer contains only opaque pixel values).
+ *
+ */
+ HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED = 0x22,
+
/* Legacy formats (deprecated), used by ImageFormat.java */
HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, // NV16
HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, // NV21
diff --git a/libcorkscrew/arch-arm/backtrace-arm.c b/libcorkscrew/arch-arm/backtrace-arm.c
index 5b91164..ff6c192 100644
--- a/libcorkscrew/arch-arm/backtrace-arm.c
+++ b/libcorkscrew/arch-arm/backtrace-arm.c
@@ -62,21 +62,19 @@
#include <sys/exec_elf.h>
#include <cutils/log.h>
+#if !defined(__BIONIC_HAVE_UCONTEXT_T)
+/* Old versions of the Android <signal.h> didn't define ucontext_t. */
+#include <asm/sigcontext.h> /* Ensure 'struct sigcontext' is defined. */
+
/* Machine context at the time a signal was raised. */
typedef struct ucontext {
uint32_t uc_flags;
struct ucontext* uc_link;
stack_t uc_stack;
- struct sigcontext {
- uint32_t trap_no;
- uint32_t error_code;
- uint32_t oldmask;
- uint32_t gregs[16];
- uint32_t arm_cpsr;
- uint32_t fault_address;
- } uc_mcontext;
+ struct sigcontext uc_mcontext;
uint32_t uc_sigmask;
} ucontext_t;
+#endif /* !__BIONIC_HAVE_UCONTEXT_T */
/* Unwind state. */
typedef struct {
@@ -560,9 +558,23 @@
const ucontext_t* uc = (const ucontext_t*)sigcontext;
unwind_state_t state;
- for (int i = 0; i < 16; i++) {
- state.gregs[i] = uc->uc_mcontext.gregs[i];
- }
+
+ state.gregs[0] = uc->uc_mcontext.arm_r0;
+ state.gregs[1] = uc->uc_mcontext.arm_r1;
+ state.gregs[2] = uc->uc_mcontext.arm_r2;
+ state.gregs[3] = uc->uc_mcontext.arm_r3;
+ state.gregs[4] = uc->uc_mcontext.arm_r4;
+ state.gregs[5] = uc->uc_mcontext.arm_r5;
+ state.gregs[6] = uc->uc_mcontext.arm_r6;
+ state.gregs[7] = uc->uc_mcontext.arm_r7;
+ state.gregs[8] = uc->uc_mcontext.arm_r8;
+ state.gregs[9] = uc->uc_mcontext.arm_r9;
+ state.gregs[10] = uc->uc_mcontext.arm_r10;
+ state.gregs[11] = uc->uc_mcontext.arm_fp;
+ state.gregs[12] = uc->uc_mcontext.arm_ip;
+ state.gregs[13] = uc->uc_mcontext.arm_sp;
+ state.gregs[14] = uc->uc_mcontext.arm_lr;
+ state.gregs[15] = uc->uc_mcontext.arm_pc;
memory_t memory;
init_memory(&memory, map_info_list);
diff --git a/libcorkscrew/arch-x86/backtrace-x86.c b/libcorkscrew/arch-x86/backtrace-x86.c
index 6cdb0c8..fb79a0c 100644
--- a/libcorkscrew/arch-x86/backtrace-x86.c
+++ b/libcorkscrew/arch-x86/backtrace-x86.c
@@ -35,18 +35,50 @@
#if defined(__BIONIC__)
+#if defined(__BIONIC_HAVE_UCONTEXT_T)
+
// Bionic offers the Linux kernel headers.
#include <asm/sigcontext.h>
#include <asm/ucontext.h>
typedef struct ucontext ucontext_t;
-#else
+#else /* __BIONIC_HAVE_UCONTEXT_T */
+
+/* Old versions of the Android <signal.h> didn't define ucontext_t. */
+
+typedef struct {
+ uint32_t gregs[32];
+ void* fpregs;
+ uint32_t oldmask;
+ uint32_t cr2;
+} mcontext_t;
+
+enum {
+ REG_GS = 0, REG_FS, REG_ES, REG_DS,
+ REG_EDI, REG_ESI, REG_EBP, REG_ESP,
+ REG_EBX, REG_EDX, REG_ECX, REG_EAX,
+ REG_TRAPNO, REG_ERR, REG_EIP, REG_CS,
+ REG_EFL, REG_UESP, REG_SS
+};
+
+/* Machine context at the time a signal was raised. */
+typedef struct ucontext {
+ uint32_t uc_flags;
+ struct ucontext* uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ uint32_t uc_sigmask;
+} ucontext_t;
+
+#endif /* __BIONIC_HAVE_UCONTEXT_T */
+
+#else /* __BIONIC__ */
// glibc has its own renaming of the Linux kernel's structures.
#define __USE_GNU // For REG_EBP, REG_ESP, and REG_EIP.
#include <ucontext.h>
-#endif
+#endif /* __ BIONIC__ */
/* Unwind state. */
typedef struct {
@@ -96,15 +128,9 @@
const ucontext_t* uc = (const ucontext_t*)sigcontext;
unwind_state_t state;
-#if defined(__BIONIC__)
- state.ebp = uc->uc_mcontext.ebp;
- state.esp = uc->uc_mcontext.esp;
- state.eip = uc->uc_mcontext.eip;
-#else
state.ebp = uc->uc_mcontext.gregs[REG_EBP];
state.esp = uc->uc_mcontext.gregs[REG_ESP];
state.eip = uc->uc_mcontext.gregs[REG_EIP];
-#endif
memory_t memory;
init_memory(&memory, map_info_list);
diff --git a/rootdir/init.rc b/rootdir/init.rc
index f9f98a2..ac36ff5 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -324,8 +324,12 @@
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,262144,4096,16384,262144
+ setprop net.tcp.buffersize.hsupa 4094,87380,262144,4096,16384,262144
+ setprop net.tcp.buffersize.hsdpa 4094,87380,262144,4096,16384,262144
+ setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
+ setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0