DivestOS/Patches/LineageOS-17.1/android_packages_apps_Nfc/0001-constify_JNINativeMethod.patch

93 lines
4.4 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
Add the JNINativeMethod table constification patchsets from GrapheneOS 11 https://github.com/GrapheneOS/platform_frameworks_base/commit/63b9f96a121648ce0815b4ff21a670af9d643203 11 https://github.com/GrapheneOS/platform_packages_apps_Bluetooth/commit/d8a62b5156007c507e6de4ced1e0db8c271504ee 11 https://github.com/GrapheneOS/platform_libcore/commit/e3a4d64f29c9a0cad11fe06af6ff378c9ea9dbea 11 https://github.com/GrapheneOS/platform_packages_apps_Nfc/commit/e41f1d7f8eee4f6af7ad1f9c0b6cbf1aef94f3cd 11 https://github.com/GrapheneOS/platform_frameworks_ex/commit/c34b037486b38bed7a45b26f736e9fe4a8c931f2 11 https://github.com/GrapheneOS/platform_external_conscrypt/commit/dce2d0f64f68739fed38483948095621506ca244 11 https://github.com/GrapheneOS/platform_art/commit/c99c35cb2a323896d64708fcae5d01f83f937d1e 10 https://github.com/GrapheneOS/platform_frameworks_base/commit/07071814db0786252ddcb6149c61ea78be22f858 10 https://github.com/GrapheneOS/platform_packages_apps_Bluetooth/commit/a48ba29b986ad67a5388f4a053080263ac4a438b 10 https://github.com/GrapheneOS/platform_libcore/commit/157fa7811544321cc61b9aae0218aaa5f13d4f6f 10 https://github.com/GrapheneOS/platform_frameworks_opt_net_wifi/commit/b914409e0582f093957b3f9f1d151fffdecc5136 10 https://github.com/GrapheneOS/platform_packages_apps_Nfc/commit/20a51f508b32b64cc60f2fc300372442a4ce0dc2 10 https://github.com/GrapheneOS/platform_external_conscrypt/commit/b8afb8af3773d630550354bd3da95da947fbb81e 10 https://github.com/GrapheneOS/platform_art/commit/e1b6653db794da9beaa0ea1f23ced5306e887fa9 9 https://github.com/GrapheneOS/platform_frameworks_base/commit/ff688b68a7df485c5628bda976bc5cc84999e81b 9 https://github.com/GrapheneOS/platform_packages_apps_Bluetooth/commit/866f0df315bb1172d73648b61999af01a1130971 9 https://github.com/GrapheneOS/platform_libcore/commit/77c9fa981a7b058ff66f5d19929c54ca7d298e4e 9 https://github.com/GrapheneOS/platform_frameworks_opt_net_wifi/commit/fbf620e59c16915a2a277ed934bc9a77fbcce4ac 9 https://github.com/GrapheneOS/platform_packages_apps_Nfc/commit/ceaf63c790b0ef23cf5f25d1b5c361aafd2925b5 9 https://github.com/GrapheneOS/platform_external_conscrypt/commit/253247fc3955ecf18ff42bf8b73d075134e8f1f2 9 https://github.com/GrapheneOS/platform_art/commit/76bf4c46f0090423ead013f02c6b0b4e58b33c95 Signed-off-by: Tad <tad@spotco.us>
2022-03-15 14:57:53 -04:00
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:58:37 -0400
Subject: [PATCH] constify JNINativeMethod tables
---
nci/jni/NativeLlcpConnectionlessSocket.cpp | 2 +-
nci/jni/NativeLlcpServiceSocket.cpp | 2 +-
nci/jni/NativeLlcpSocket.cpp | 2 +-
nci/jni/NativeNfcManager.cpp | 2 +-
nci/jni/NativeNfcTag.cpp | 2 +-
nci/jni/NativeP2pDevice.cpp | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/nci/jni/NativeLlcpConnectionlessSocket.cpp b/nci/jni/NativeLlcpConnectionlessSocket.cpp
index e43dbff3..78e33285 100644
--- a/nci/jni/NativeLlcpConnectionlessSocket.cpp
+++ b/nci/jni/NativeLlcpConnectionlessSocket.cpp
@@ -280,7 +280,7 @@ static jboolean nativeLlcpConnectionlessSocket_doClose(JNIEnv* e, jobject o) {
** Description: JNI functions
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doSendTo", "(I[B)Z", (void*)nativeLlcpConnectionlessSocket_doSendTo},
{"doReceiveFrom", "(I)Lcom/android/nfc/LlcpPacket;",
(void*)nativeLlcpConnectionlessSocket_doReceiveFrom},
diff --git a/nci/jni/NativeLlcpServiceSocket.cpp b/nci/jni/NativeLlcpServiceSocket.cpp
index 76ffeea5..4d2297c4 100644
--- a/nci/jni/NativeLlcpServiceSocket.cpp
+++ b/nci/jni/NativeLlcpServiceSocket.cpp
@@ -128,7 +128,7 @@ static jboolean nativeLlcpServiceSocket_doClose(JNIEnv* e, jobject o) {
** Description: JNI functions
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doAccept", "(III)Lcom/android/nfc/dhimpl/NativeLlcpSocket;",
(void*)nativeLlcpServiceSocket_doAccept},
{"doClose", "()Z", (void*)nativeLlcpServiceSocket_doClose},
diff --git a/nci/jni/NativeLlcpSocket.cpp b/nci/jni/NativeLlcpSocket.cpp
index 0ee0d248..fa49ec94 100644
--- a/nci/jni/NativeLlcpSocket.cpp
+++ b/nci/jni/NativeLlcpSocket.cpp
@@ -214,7 +214,7 @@ static jint nativeLlcpSocket_doGetRemoteSocketRW(JNIEnv* e, jobject o) {
** Description: JNI functions
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doConnect", "(I)Z", (void*)nativeLlcpSocket_doConnect},
{"doConnectBy", "(Ljava/lang/String;)Z",
(void*)nativeLlcpSocket_doConnectBy},
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
index 65f006f6..0ac30607 100644
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -1964,7 +1964,7 @@ static jboolean nfcManager_doSetNfcSecure(JNIEnv* e, jobject o,
** JNI functions for android-4.0.1_r1
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doDownload", "()Z", (void*)nfcManager_doDownload},
{"initializeNativeStructure", "()Z", (void*)nfcManager_initNativeStruc},
diff --git a/nci/jni/NativeNfcTag.cpp b/nci/jni/NativeNfcTag.cpp
index cd9f2327..d9038952 100644
--- a/nci/jni/NativeNfcTag.cpp
+++ b/nci/jni/NativeNfcTag.cpp
@@ -1804,7 +1804,7 @@ void nativeNfcTag_releaseRfInterfaceMutexLock() {
** JNI functions for Android 4.0.3
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doConnect", "(I)I", (void*)nativeNfcTag_doConnect},
{"doDisconnect", "()Z", (void*)nativeNfcTag_doDisconnect},
{"doReconnect", "()I", (void*)nativeNfcTag_doReconnect},
diff --git a/nci/jni/NativeP2pDevice.cpp b/nci/jni/NativeP2pDevice.cpp
index 23f5db41..396c6d0c 100644
--- a/nci/jni/NativeP2pDevice.cpp
+++ b/nci/jni/NativeP2pDevice.cpp
@@ -58,7 +58,7 @@ static jboolean nativeP2pDeviceDoSend(JNIEnv*, jobject, jbyteArray) {
** Description: JNI functions
**
*****************************************************************************/
-static JNINativeMethod gMethods[] = {
+static const JNINativeMethod gMethods[] = {
{"doConnect", "()Z", (void*)nativeP2pDeviceDoConnect},
{"doDisconnect", "()Z", (void*)nativeP2pDeviceDoDisconnect},
{"doTransceive", "([B)[B", (void*)nativeP2pDeviceDoTransceive},