Skip to content

Commit 335e6ee

Browse files
author
Daz Jones
committedMay 18, 2013
Add device patches to tree, huge thanks to grigorig for the awesome script
https://github.com/grigorig/android_device_zte_blade/tree/jellybean/patches
1 parent bfd9d29 commit 335e6ee

File tree

8 files changed

+205
-0
lines changed

8 files changed

+205
-0
lines changed
 

‎patches/apply.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
MYABSPATH=$(readlink -f "$0")
4+
PATCHBASE=$(dirname "$MYABSPATH")
5+
CMBASE=$(readlink -f "$PATCHBASE/../../../../")
6+
7+
for i in $(find "$PATCHBASE"/* -type d); do
8+
PATCHNAME=$(basename "$i")
9+
PATCHTARGET=$PATCHNAME
10+
for i in $(seq 4); do
11+
PATCHTARGET=$(echo $PATCHTARGET | sed 's/_/\//')
12+
if [ -d "$CMBASE/$PATCHTARGET" ]; then break; fi
13+
done
14+
echo applying $PATCHNAME to $PATCHTARGET
15+
cd "$CMBASE/$PATCHTARGET" || exit 1
16+
git am -3 "$PATCHBASE/$PATCHNAME"/* || exit 1
17+
done
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 2162e16110d8a37b923995f3e95d6a3856e8bf4c Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Mon, 18 Feb 2013 01:25:07 +0000
4+
Subject: [PATCH] CameraParameters: add SCENE_MODE_OFF
5+
6+
Change-Id: Id0ace334fee45cbfbc1623cf4597b588918bac95
7+
---
8+
camera/CameraParameters.cpp | 1 +
9+
include/camera/CameraParameters.h | 1 +
10+
2 files changed, 2 insertions(+)
11+
12+
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp
13+
index 2a5795e..b1591f0 100644
14+
--- a/camera/CameraParameters.cpp
15+
+++ b/camera/CameraParameters.cpp
16+
@@ -236,6 +236,7 @@ const char CameraParameters::SCENE_MODE_BARCODE[] = "barcode";
17+
const char CameraParameters::SCENE_MODE_HDR[] = "hdr";
18+
#ifdef QCOM_HARDWARE
19+
const char CameraParameters::SCENE_MODE_AR[] = "AR";
20+
+const char CameraParameters::SCENE_MODE_OFF[] = "off";
21+
#ifdef QCOM_SONY_HARDWARE
22+
const char CameraParameters::EX_SCENE_MODE_DOCUMENT[] = "document";
23+
#endif
24+
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
25+
index e282b28..aa9cef2 100644
26+
--- a/include/camera/CameraParameters.h
27+
+++ b/include/camera/CameraParameters.h
28+
@@ -735,6 +735,7 @@ public:
29+
static const char SCENE_MODE_BACKLIGHT[];
30+
static const char SCENE_MODE_FLOWERS[];
31+
static const char SCENE_MODE_AR[];
32+
+ static const char SCENE_MODE_OFF[];
33+
#ifdef QCOM_SONY_HARDWARE
34+
static const char EX_SCENE_MODE_DOCUMENT[];
35+
#endif
36+
--
37+
1.7.10.4
38+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From bfc17428c13b7f40aaa44735750f3a5f0d44e368 Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Thu, 24 Jan 2013 22:30:52 +0000
4+
Subject: [PATCH] Camera: hack default values to fix areas
5+
6+
Change-Id: I7829ff64e714ecaab1f3323f33b5340d17460cfc
7+
---
8+
core/java/android/hardware/Camera.java | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
12+
index 5c074ed..93454a2 100644
13+
--- a/core/java/android/hardware/Camera.java
14+
+++ b/core/java/android/hardware/Camera.java
15+
@@ -2122,7 +2122,7 @@ public class Camera {
16+
17+
private void set(String key, List<Area> areas) {
18+
if (areas == null) {
19+
- set(key, "(0,0,0,0,0)");
20+
+ set(key, "(-1000,-1000,1000,1000,1000)");
21+
} else {
22+
StringBuilder buffer = new StringBuilder();
23+
for (int i = 0; i < areas.size(); i++) {
24+
--
25+
1.7.10.4
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 5d765a55f8dd4fee3abaf634eaabf7b0df285fee Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Sat, 16 Feb 2013 22:19:36 +0000
4+
Subject: [PATCH] AudioService: change voice call max stream volume
5+
6+
Change-Id: I7dd39cdb30d5e417738619b0205da7f6fcb3fcd0
7+
---
8+
media/java/android/media/AudioService.java | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
12+
index 4cfdf82..4101aca 100755
13+
--- a/media/java/android/media/AudioService.java
14+
+++ b/media/java/android/media/AudioService.java
15+
@@ -228,7 +228,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
16+
17+
/** @hide Maximum volume index values for audio streams */
18+
private final int[] MAX_STREAM_VOLUME = new int[] {
19+
- 5, // STREAM_VOICE_CALL
20+
+ 7, // STREAM_VOICE_CALL
21+
7, // STREAM_SYSTEM
22+
7, // STREAM_RING
23+
15, // STREAM_MUSIC
24+
--
25+
1.7.10.4
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From f4d93a7890ce81848352336d32a763e75dffd273 Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Sat, 9 Mar 2013 12:26:45 +0000
4+
Subject: [PATCH] libhardware_legacy: add support for custom Wi-Fi
5+
implementations
6+
7+
Change-Id: Ifb3530495dd1c804cefe4fcdcf2039d9f20b1395
8+
---
9+
wifi/Android.mk | 8 +++++++-
10+
1 file changed, 7 insertions(+), 1 deletion(-)
11+
12+
diff --git a/wifi/Android.mk b/wifi/Android.mk
13+
index 51afe3a..788520f 100644
14+
--- a/wifi/Android.mk
15+
+++ b/wifi/Android.mk
16+
@@ -43,7 +43,13 @@ ifdef WIFI_EXT_MODULE_NAME
17+
LOCAL_CFLAGS += -DWIFI_EXT_MODULE_NAME=\"$(WIFI_EXT_MODULE_NAME)\"
18+
endif
19+
20+
-LOCAL_SRC_FILES += wifi/wifi.c
21+
+ifeq ($(TARGET_CUSTOM_WIFI),)
22+
+ LOCAL_SRC_FILES += \
23+
+ wifi/wifi.c
24+
+else
25+
+ LOCAL_SRC_FILES += \
26+
+ $(TARGET_CUSTOM_WIFI)
27+
+endif
28+
29+
ifeq ($(BOARD_HAVE_SAMSUNG_WIFI),true)
30+
LOCAL_CFLAGS += -DSAMSUNG_WIFI
31+
--
32+
1.7.10.4
33+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From eb6b717694837a0650edcd39fbb55e18b652a2d3 Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Fri, 25 Jan 2013 15:18:02 +0000
4+
Subject: [PATCH] audio policy: Add EVRCB and EVRCWB for 7x27a HAL compilation
5+
6+
Change-Id: I01e8bd9bb67b972ad72eab3bbb00d59793d2b51c
7+
---
8+
include/hardware_legacy/AudioSystemLegacy.h | 2 ++
9+
1 files changed, 2 insertions(+), 0 deletions(-)
10+
11+
diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h
12+
index a1e9c64..9ec5b29 100644
13+
--- a/include/hardware_legacy/AudioSystemLegacy.h
14+
+++ b/include/hardware_legacy/AudioSystemLegacy.h
15+
@@ -135,6 +135,8 @@ public:
16+
VORBIS = 0x07000000,
17+
EVRC = 0x08000000,
18+
QCELP = 0x09000000,
19+
+ EVRCB = 0x10000000,
20+
+ EVRCWB = 0x11000000,
21+
MAIN_FORMAT_MASK = 0xFF000000,
22+
SUB_FORMAT_MASK = 0x00FFFFFF,
23+
// Aliases
24+
--
25+
1.7.2.5
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 3d9a18f36d74a3342c7ce7569828277e562694b9 Mon Sep 17 00:00:00 2001
2+
From: Daz Jones <yuki@thebronasium.com>
3+
Date: Sat, 16 Feb 2013 19:09:04 +0000
4+
Subject: [PATCH] AdapterService: nasty hack to fix null jstring jni crash for now
5+
6+
Change-Id: Iaba4dd8fb8fd82e84f19fd3e3816fdcd233ca041
7+
---
8+
jni/com_android_bluetooth_btservice_AdapterService.cpp | 6 +++++-
9+
1 file changed, 5 insertions(+), 1 deletion(-)
10+
11+
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp
12+
index 5989c79..36f0a22 100755
13+
--- a/jni/com_android_bluetooth_btservice_AdapterService.cpp
14+
+++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp
15+
@@ -873,6 +873,10 @@ static int createSocketChannelNative(JNIEnv *env, jobject object, jint type,
16+
17+
if (!sBluetoothSocketInterface) return NULL;
18+
19+
+ if (name_str == NULL) {
20+
+ ALOGE("cannot get service name - name_str is null");
21+
+ goto Fail;
22+
+ }
23+
service_name = env->GetStringUTFChars(name_str, NULL);
24+
25+
uuid = env->GetByteArrayElements(uuidObj, NULL);
26+
@@ -896,7 +900,7 @@ static int createSocketChannelNative(JNIEnv *env, jobject object, jint type,
27+
return socket_fd;
28+
29+
Fail:
30+
- if (service_name) env->ReleaseStringUTFChars(name_str, service_name);
31+
+ if (service_name && name_str) env->ReleaseStringUTFChars(name_str, service_name);
32+
if (uuid) env->ReleaseByteArrayElements(uuidObj, uuid, 0);
33+
34+
return -1;
35+
--
36+
1.7.10.4
37+

‎vendorsetup.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Run device patches on the tree. I'm lazy and this is easy for nightly builds.
2+
sh device/huawei/u8815/patches/apply.sh

0 commit comments

Comments
 (0)
Please sign in to comment.