summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-21 22:52:44 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-21 22:52:44 +0100
commitfb150e40a50b33ab46ce03ab64dea3632e2e3ced (patch)
treedd9cb0a35748c5f34c556a8912953ad450328411
parent228a55be1124ffa085cbe4f4b806d727793862cb (diff)
downloaddevice_samsung_n7100-fb150e40a50b33ab46ce03ab64dea3632e2e3ced.tar.gz
device_samsung_n7100-fb150e40a50b33ab46ce03ab64dea3632e2e3ced.tar.bz2
device_samsung_n7100-fb150e40a50b33ab46ce03ab64dea3632e2e3ced.zip
remove hacks for proprietary ril
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--libsamsung_symbols/Android.mk28
-rw-r--r--libsamsung_symbols/samsung_ril.cpp21
-rw-r--r--n7100.mk7
-rw-r--r--ril-wrapper/Android.mk9
-rw-r--r--ril-wrapper/ril-wrapper.c99
5 files changed, 1 insertions, 163 deletions
diff --git a/libsamsung_symbols/Android.mk b/libsamsung_symbols/Android.mk
deleted file mode 100644
index c2e942e..0000000
--- a/libsamsung_symbols/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2015 The CyanogenMod Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- samsung_ril.cpp
-
-LOCAL_SHARED_LIBRARIES := libbinder
-
-LOCAL_MODULE := libsamsung_symbols
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libsamsung_symbols/samsung_ril.cpp b/libsamsung_symbols/samsung_ril.cpp
deleted file mode 100644
index 404616d..0000000
--- a/libsamsung_symbols/samsung_ril.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* status_t Parcel::writeString16 */
-extern "C" int _ZN7android6Parcel13writeString16EPKDsj();
-extern "C" int _ZN7android6Parcel13writeString16EPKtj() {
- return _ZN7android6Parcel13writeString16EPKDsj();
-}
diff --git a/n7100.mk b/n7100.mk
index a6ca4d5..cf4f9db 100644
--- a/n7100.mk
+++ b/n7100.mk
@@ -62,9 +62,8 @@ PRODUCT_PACKAGES += \
DeviceSettings \
SamsungServiceMode
-# RIL & GPS fix
+# GPS fix
PRODUCT_PACKAGES += \
- ril-wrapper \
libdmitry
# Additional apps
@@ -104,10 +103,6 @@ PRODUCT_PACKAGES += \
$(call inherit-product, vendor/replicant/config/nfc_enhanced.mk)
-# Samsung symbols
-PRODUCT_PACKAGES += \
- libsamsung_symbols
-
# RIL
PRODUCT_PACKAGES += \
libsamsung-ril
diff --git a/ril-wrapper/Android.mk b/ril-wrapper/Android.mk
deleted file mode 100644
index 698e1d3..0000000
--- a/ril-wrapper/Android.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= ril-wrapper.c
-LOCAL_SHARED_LIBRARIES := liblog libbinder
-LOCAL_MODULE:= ril-wrapper
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/ril-wrapper/ril-wrapper.c b/ril-wrapper/ril-wrapper.c
deleted file mode 100644
index 886cb34..0000000
--- a/ril-wrapper/ril-wrapper.c
+++ /dev/null
@@ -1,99 +0,0 @@
-#define LOG_TAG "RilWrapper"
-#define RIL_SHLIB
-#include <telephony/ril_cdma_sms.h>
-#include <sys/system_properties.h>
-#include <telephony/librilutils.h>
-#include <cutils/sockets.h>
-#include <telephony/ril.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <utils/Log.h>
-#include <sys/stat.h>
-#include <pthread.h>
-#include <termios.h>
-#include <alloca.h>
-#include <assert.h>
-#include <getopt.h>
-#include <string.h>
-#include <unistd.h>
-#include <dlfcn.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-#define REAL_RIL_NAME "/system/lib/libsec-ril.so"
-
-
-static RIL_RadioFunctions const *mRealRadioFuncs;
-static const struct RIL_Env *mEnv;
-
-static void rilOnRequest(int request, void *data, size_t datalen, RIL_Token t)
-{
- switch (request) {
- case RIL_REQUEST_GET_RADIO_CAPABILITY:
- RLOGW("Returning NOT_SUPPORTED on GET_RADIO_CAPABILITY");
- mEnv->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
- break;
- default:
- mRealRadioFuncs->onRequest(request, data, datalen, t);
- }
-}
-
-const RIL_RadioFunctions* RIL_Init(const struct RIL_Env *env, int argc, char **argv)
-{
- RIL_RadioFunctions const* (*fRealRilInit)(const struct RIL_Env *env, int argc, char **argv);
- static RIL_RadioFunctions rilInfo;
- void *realRilLibHandle;
- int i;
-
-
- //save the env;
- mEnv = env;
-
- //get the real RIL
- realRilLibHandle = dlopen(REAL_RIL_NAME, RTLD_LOCAL);
- if (!realRilLibHandle) {
- RLOGE("Failed to load the real RIL '" REAL_RIL_NAME "': %s\n", dlerror());
- return NULL;
- }
-
- //remove "-c" command line as Samsung's RIL does not understand it - it just barfs instead
- for (i = 0; i < argc; i++) {
- if (!strcmp(argv[i], "-c") && i != argc -1) { //found it
- memcpy(argv + i, argv + i + 2, sizeof(char*[argc - i - 2]));
- argc -= 2;
- }
- }
-
- //load the real RIL
- fRealRilInit = dlsym(realRilLibHandle, "RIL_Init");
- if (!fRealRilInit) {
- RLOGE("Failed to find the real RIL's entry point\n");
- goto out_fail;
- }
-
- RLOGD("Calling the real RIL's entry point with %u args\n", argc);
- for (i = 0; i < argc; i++)
- RLOGD(" argv[%2d] = '%s'\n", i, argv[i]);
-
- //try to init the real ril
- mRealRadioFuncs = fRealRilInit(env, argc, argv);
- if (!mRealRadioFuncs) {
- RLOGE("The real RIL's entry point failed\n");
- goto out_fail;
- }
-
- //copy the real RIL's info struct, then replace the onRequest pointer with our own
- rilInfo = *mRealRadioFuncs;
- rilInfo.onRequest = rilOnRequest;
-
- RLOGD("Wrapped RIL version is '%s'\n", mRealRadioFuncs->getVersion());
-
- //we're all good - return to caller
- return &rilInfo;
-
-out_fail:
- dlclose(realRilLibHandle);
- return NULL;
-}