Skip to content

Commit

Permalink
Add device patches to tree, huge thanks to grigorig for the awesome s…
Browse files Browse the repository at this point in the history
  • Loading branch information
Daz Jones committed May 18, 2013
1 parent bfd9d29 commit 335e6ee
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 0 deletions.
17 changes: 17 additions & 0 deletions patches/apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

MYABSPATH=$(readlink -f "$0")
PATCHBASE=$(dirname "$MYABSPATH")
CMBASE=$(readlink -f "$PATCHBASE/../../../../")

for i in $(find "$PATCHBASE"/* -type d); do
PATCHNAME=$(basename "$i")
PATCHTARGET=$PATCHNAME
for i in $(seq 4); do
PATCHTARGET=$(echo $PATCHTARGET | sed 's/_/\//')
if [ -d "$CMBASE/$PATCHTARGET" ]; then break; fi
done
echo applying $PATCHNAME to $PATCHTARGET
cd "$CMBASE/$PATCHTARGET" || exit 1
git am -3 "$PATCHBASE/$PATCHNAME"/* || exit 1
done
38 changes: 38 additions & 0 deletions patches/frameworks_av/0001-cameraparameters.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 2162e16110d8a37b923995f3e95d6a3856e8bf4c Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Mon, 18 Feb 2013 01:25:07 +0000
Subject: [PATCH] CameraParameters: add SCENE_MODE_OFF

Change-Id: Id0ace334fee45cbfbc1623cf4597b588918bac95
---
camera/CameraParameters.cpp | 1 +
include/camera/CameraParameters.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp
index 2a5795e..b1591f0 100644
--- a/camera/CameraParameters.cpp
+++ b/camera/CameraParameters.cpp
@@ -236,6 +236,7 @@ const char CameraParameters::SCENE_MODE_BARCODE[] = "barcode";
const char CameraParameters::SCENE_MODE_HDR[] = "hdr";
#ifdef QCOM_HARDWARE
const char CameraParameters::SCENE_MODE_AR[] = "AR";
+const char CameraParameters::SCENE_MODE_OFF[] = "off";
#ifdef QCOM_SONY_HARDWARE
const char CameraParameters::EX_SCENE_MODE_DOCUMENT[] = "document";
#endif
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index e282b28..aa9cef2 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -735,6 +735,7 @@ public:
static const char SCENE_MODE_BACKLIGHT[];
static const char SCENE_MODE_FLOWERS[];
static const char SCENE_MODE_AR[];
+ static const char SCENE_MODE_OFF[];
#ifdef QCOM_SONY_HARDWARE
static const char EX_SCENE_MODE_DOCUMENT[];
#endif
--
1.7.10.4

26 changes: 26 additions & 0 deletions patches/frameworks_base/0001-camera-areas.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From bfc17428c13b7f40aaa44735750f3a5f0d44e368 Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Thu, 24 Jan 2013 22:30:52 +0000
Subject: [PATCH] Camera: hack default values to fix areas

Change-Id: I7829ff64e714ecaab1f3323f33b5340d17460cfc
---
core/java/android/hardware/Camera.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 5c074ed..93454a2 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -2122,7 +2122,7 @@ public class Camera {

private void set(String key, List<Area> areas) {
if (areas == null) {
- set(key, "(0,0,0,0,0)");
+ set(key, "(-1000,-1000,1000,1000,1000)");
} else {
StringBuilder buffer = new StringBuilder();
for (int i = 0; i < areas.size(); i++) {
--
1.7.10.4

26 changes: 26 additions & 0 deletions patches/frameworks_base/0002-audioservice-voice-call.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 5d765a55f8dd4fee3abaf634eaabf7b0df285fee Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Sat, 16 Feb 2013 22:19:36 +0000
Subject: [PATCH] AudioService: change voice call max stream volume

Change-Id: I7dd39cdb30d5e417738619b0205da7f6fcb3fcd0
---
media/java/android/media/AudioService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 4cfdf82..4101aca 100755
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -228,7 +228,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {

/** @hide Maximum volume index values for audio streams */
private final int[] MAX_STREAM_VOLUME = new int[] {
- 5, // STREAM_VOICE_CALL
+ 7, // STREAM_VOICE_CALL
7, // STREAM_SYSTEM
7, // STREAM_RING
15, // STREAM_MUSIC
--
1.7.10.4

33 changes: 33 additions & 0 deletions patches/hardware_libhardware_legacy/0001-custom-wifi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From f4d93a7890ce81848352336d32a763e75dffd273 Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Sat, 9 Mar 2013 12:26:45 +0000
Subject: [PATCH] libhardware_legacy: add support for custom Wi-Fi
implementations

Change-Id: Ifb3530495dd1c804cefe4fcdcf2039d9f20b1395
---
wifi/Android.mk | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/wifi/Android.mk b/wifi/Android.mk
index 51afe3a..788520f 100644
--- a/wifi/Android.mk
+++ b/wifi/Android.mk
@@ -43,7 +43,13 @@ ifdef WIFI_EXT_MODULE_NAME
LOCAL_CFLAGS += -DWIFI_EXT_MODULE_NAME=\"$(WIFI_EXT_MODULE_NAME)\"
endif

-LOCAL_SRC_FILES += wifi/wifi.c
+ifeq ($(TARGET_CUSTOM_WIFI),)
+ LOCAL_SRC_FILES += \
+ wifi/wifi.c
+else
+ LOCAL_SRC_FILES += \
+ $(TARGET_CUSTOM_WIFI)
+endif

ifeq ($(BOARD_HAVE_SAMSUNG_WIFI),true)
LOCAL_CFLAGS += -DSAMSUNG_WIFI
--
1.7.10.4

26 changes: 26 additions & 0 deletions patches/hardware_libhardware_legacy/0002-audio-formats.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From eb6b717694837a0650edcd39fbb55e18b652a2d3 Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Fri, 25 Jan 2013 15:18:02 +0000
Subject: [PATCH] audio policy: Add EVRCB and EVRCWB for 7x27a HAL compilation

Change-Id: I01e8bd9bb67b972ad72eab3bbb00d59793d2b51c
---
include/hardware_legacy/AudioSystemLegacy.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h
index a1e9c64..9ec5b29 100644
--- a/include/hardware_legacy/AudioSystemLegacy.h
+++ b/include/hardware_legacy/AudioSystemLegacy.h
@@ -135,6 +135,8 @@ public:
VORBIS = 0x07000000,
EVRC = 0x08000000,
QCELP = 0x09000000,
+ EVRCB = 0x10000000,
+ EVRCWB = 0x11000000,
MAIN_FORMAT_MASK = 0xFF000000,
SUB_FORMAT_MASK = 0x00FFFFFF,
// Aliases
--
1.7.2.5

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 3d9a18f36d74a3342c7ce7569828277e562694b9 Mon Sep 17 00:00:00 2001
From: Daz Jones <yuki@thebronasium.com>
Date: Sat, 16 Feb 2013 19:09:04 +0000
Subject: [PATCH] AdapterService: nasty hack to fix null jstring jni crash for now

Change-Id: Iaba4dd8fb8fd82e84f19fd3e3816fdcd233ca041
---
jni/com_android_bluetooth_btservice_AdapterService.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp
index 5989c79..36f0a22 100755
--- a/jni/com_android_bluetooth_btservice_AdapterService.cpp
+++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp
@@ -873,6 +873,10 @@ static int createSocketChannelNative(JNIEnv *env, jobject object, jint type,

if (!sBluetoothSocketInterface) return NULL;

+ if (name_str == NULL) {
+ ALOGE("cannot get service name - name_str is null");
+ goto Fail;
+ }
service_name = env->GetStringUTFChars(name_str, NULL);

uuid = env->GetByteArrayElements(uuidObj, NULL);
@@ -896,7 +900,7 @@ static int createSocketChannelNative(JNIEnv *env, jobject object, jint type,
return socket_fd;

Fail:
- if (service_name) env->ReleaseStringUTFChars(name_str, service_name);
+ if (service_name && name_str) env->ReleaseStringUTFChars(name_str, service_name);
if (uuid) env->ReleaseByteArrayElements(uuidObj, uuid, 0);

return -1;
--
1.7.10.4

2 changes: 2 additions & 0 deletions vendorsetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Run device patches on the tree. I'm lazy and this is easy for nightly builds.
sh device/huawei/u8815/patches/apply.sh

0 comments on commit 335e6ee

Please sign in to comment.