universal7885: FMRadio: jni: remove unused function

* device/samsung/universal7885/apps/FMRadio/jni/fm_ioctl.cpp:65:12: error: unused function 'fm_radio_get_control' [-Werror,-Wunused-funct
ion]
static int fm_radio_get_control(int fd, unsigned int id, long *val)
           ^
1 error generated.
06:47:41 ninja failed with: exit status 1

* Also, fix wrong native lib name (fmradioioctl_jni -> fmioctl_jni)
This commit is contained in:
roynatech2544 2022-02-18 15:49:04 +09:00
commit becd136bbb
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
3 changed files with 2 additions and 25 deletions

View file

@ -1,10 +1,7 @@
cc_library_shared {
name: "libfmioctl_jni",
cflags: [
"-Wall",
"-Wextra",
"-Wno-unused-parameter",
"-Werror",
],
srcs: ["fm_ioctl.cpp"],
header_libs: ["jni_headers"],

View file

@ -62,26 +62,6 @@ static int fm_radio_set_frequency(int fd, long channel)
return FM_SUCCESS;
}
static int fm_radio_get_control(int fd, unsigned int id, long *val)
{
struct v4l2_control ctrl{};
int ret;
#ifdef DEBUG
printf("FmRadioController:fm_radio_get_control: id(%d)\n", id);
#endif
ctrl.id = id;
ret = ioctl(fd, VIDIOC_G_CTRL, &ctrl);
if (ret < 0) {
printf("FmRadioController: failed to get control\n");
return FM_FAILURE;
}
*val = (long)ctrl.value;
return FM_SUCCESS;
}
static int fm_radio_set_control(int fd, unsigned int id, long val)
{
struct v4l2_control ctrl{};
@ -481,4 +461,4 @@ JNIEXPORT void JNICALL
Java_com_eurekateam_fmradio_NativeFMInterface_closeFMDevice
(__unused JNIEnv *env, __unused jobject thiz, jint fd) {
close(fd);
}
}

View file

@ -63,7 +63,7 @@ class MainActivity : AppCompatActivity(),
private val mMainHandler : Handler = Handler(Looper.getMainLooper())
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
System.loadLibrary("fmradioioctl_jni")
System.loadLibrary("fmioctl_jni")
setContentView(R.layout.activity_main)
mContext = this
mFilePath = mContext.filesDir