diff --git a/universal7885-common/apps/CameraLightSensor/Android.bp b/universal7885-common/apps/CameraLightSensor/Android.bp
deleted file mode 100644
index 65d09ec..0000000
--- a/universal7885-common/apps/CameraLightSensor/Android.bp
+++ /dev/null
@@ -1,18 +0,0 @@
-android_app {
- name: "CameraLightSensor",
- srcs: [
- "src/**/*.kt",
- "src/**/I*.aidl",
- ],
- platform_apis: true,
- privileged: true,
- certificate: "platform",
- static_libs: ["androidx.core_core"],
- required: ["privapp_whitelist_com.eurekateam.cameralightsensor.xml"],
-}
-
-prebuilt_etc {
- name: "privapp_whitelist_com.eurekateam.cameralightsensor.xml",
- src: "privapp_whitelist_com.eurekateam.cameralightsensor.xml",
- sub_dir: "permissions",
-}
diff --git a/universal7885-common/apps/CameraLightSensor/AndroidManifest.xml b/universal7885-common/apps/CameraLightSensor/AndroidManifest.xml
deleted file mode 100644
index 2bd17d8..0000000
--- a/universal7885-common/apps/CameraLightSensor/AndroidManifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/universal7885-common/apps/CameraLightSensor/privapp_whitelist_com.eurekateam.cameralightsensor.xml b/universal7885-common/apps/CameraLightSensor/privapp_whitelist_com.eurekateam.cameralightsensor.xml
deleted file mode 100644
index e3fbb73..0000000
--- a/universal7885-common/apps/CameraLightSensor/privapp_whitelist_com.eurekateam.cameralightsensor.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
diff --git a/universal7885-common/apps/CameraLightSensor/res/drawable/ic_brightness.xml b/universal7885-common/apps/CameraLightSensor/res/drawable/ic_brightness.xml
deleted file mode 100644
index ac448f4..0000000
--- a/universal7885-common/apps/CameraLightSensor/res/drawable/ic_brightness.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/universal7885-common/apps/CameraLightSensor/res/values/strings.xml b/universal7885-common/apps/CameraLightSensor/res/values/strings.xml
deleted file mode 100644
index 11a5cb3..0000000
--- a/universal7885-common/apps/CameraLightSensor/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- CameraLightSensor
-
diff --git a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/camera/IAutoBrightness.aidl b/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/camera/IAutoBrightness.aidl
deleted file mode 100644
index 58f8be1..0000000
--- a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/camera/IAutoBrightness.aidl
+++ /dev/null
@@ -1,6 +0,0 @@
-// IAutoBrightness.aidl - Copied from camera app
-package com.eurekateam.camera;
-
-interface IAutoBrightness {
- boolean CameraIsFree();
-}
\ No newline at end of file
diff --git a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/BootReceiver.kt b/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/BootReceiver.kt
deleted file mode 100755
index be1c0a9..0000000
--- a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/BootReceiver.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.eurekateam.cameralightsensor
-
-import android.content.BroadcastReceiver
-import android.content.Context
-import android.content.Intent
-
-class BootReceiver : BroadcastReceiver() {
- override fun onReceive(context: Context, intent: Intent) {
- if (intent.action.equals(Intent.ACTION_BOOT_COMPLETED, ignoreCase = true)) {
- val i = Intent(context, CameraLightSensorService::class.java)
- context.startForegroundService(i)
- }
- }
-}
diff --git a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/CameraLightSensorService.kt b/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/CameraLightSensorService.kt
deleted file mode 100755
index 2bca323..0000000
--- a/universal7885-common/apps/CameraLightSensor/src/com/eurekateam/cameralightsensor/CameraLightSensorService.kt
+++ /dev/null
@@ -1,350 +0,0 @@
-package com.eurekateam.cameralightsensor
-
-import android.annotation.SuppressLint
-import android.app.*
-import android.content.*
-import android.content.pm.ServiceInfo
-import android.database.ContentObserver
-import android.graphics.Bitmap
-import android.graphics.BitmapFactory
-import android.graphics.Color
-import android.graphics.ImageFormat
-import android.hardware.camera2.*
-import android.hardware.camera2.params.OutputConfiguration
-import android.hardware.camera2.params.SessionConfiguration
-import android.media.Image
-import android.media.ImageReader
-import android.os.*
-import android.provider.Settings
-import android.provider.Settings.SettingNotFoundException
-import android.util.Log
-import androidx.core.app.NotificationCompat
-import com.eurekateam.camera.IAutoBrightness
-import java.util.concurrent.Executors
-import java.util.concurrent.ScheduledThreadPoolExecutor
-import java.util.concurrent.TimeUnit
-
-class CameraLightSensorService : Service() {
- private lateinit var screenStateFilter: IntentFilter
- private lateinit var mContext: Context
- private lateinit var cameraDevice: CameraDevice
- private lateinit var mSession: CameraCaptureSession
- private val manager: CameraManager by lazy {
- getSystemService(CAMERA_SERVICE) as CameraManager
- }
- private lateinit var mCameraHandler: Handler
- private val mExecutor = Executors.newSingleThreadExecutor()
- private fun pushNotification(): Notification {
- val nm = mContext.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
- val channel = NotificationChannel(
- mContext.packageName,
- "CameraLightSensor",
- NotificationManager.IMPORTANCE_NONE
- )
- channel.isBlockable = true
- nm.createNotificationChannel(channel)
- val builder = NotificationCompat.Builder(mContext, mContext.packageName)
- val notificationIntent = Intent(mContext, CameraLightSensorService::class.java)
- val contentIntent = PendingIntent.getActivity(
- mContext,
- 50,
- notificationIntent,
- PendingIntent.FLAG_IMMUTABLE
- )
-
- builder.setContentIntent(contentIntent)
- builder.setSmallIcon(R.drawable.ic_brightness)
- builder.setContentTitle("Camera Light Sensor Service")
- builder.setChannelId(mContext.packageName)
- return builder.build()
- }
-
- override fun onDestroy() {
- if (DEBUG) Log.d(TAG, "Destroying service")
- if (mRegistered) contentResolver!!.unregisterContentObserver(mSettingsObserver)
- mRegistered = false
- imageReader.close()
- stopForeground(true)
- unbindService(mConnection)
- super.onDestroy()
- }
-
- override fun onBind(intent: Intent): IBinder? {
- return null
- }
-
- private var mIAutoBrightness: IAutoBrightness? = null
-
- private val mConnection = object : ServiceConnection {
- override fun onServiceConnected(p0: ComponentName?, service: IBinder?) {
- mIAutoBrightness = IAutoBrightness.Stub.asInterface(service)
- }
-
- override fun onServiceDisconnected(p0: ComponentName?) {
- mIAutoBrightness = null
- }
- }
-
- private val mScreenStateReceiver: BroadcastReceiver = object : BroadcastReceiver() {
- override fun onReceive(context: Context, intent: Intent) {
- if (intent.action == Intent.ACTION_USER_PRESENT) {
- if (mPoolExecutor == null) {
- mPoolExecutor = ScheduledThreadPoolExecutor(4)
- mPoolExecutor!!.scheduleWithFixedDelay(
- mScheduler,
- 0,
- 2,
- TimeUnit.SECONDS
- )
- }
- } else if (intent.action == Intent.ACTION_SCREEN_OFF) {
- if (mPoolExecutor != null) {
- mPoolExecutor!!.shutdown()
- mPoolExecutor = null
- }
- }
- }
- }
- private val mScheduler = Runnable { readyCamera() }
-
- // Make a listener for settings
- private var mSettingsObserver: ContentObserver =
- object : ContentObserver(Handler(Looper.getMainLooper())) {
- override fun onChange(selfChange: Boolean) {
- super.onChange(selfChange)
- Log.i(TAG, "observer: Brightness Settings Changed")
- try {
- if (Settings.System.getInt(
- contentResolver,
- Settings.System.SCREEN_BRIGHTNESS_MODE
- )
- == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
- ) {
- registerReceiver(mScreenStateReceiver, screenStateFilter)
- mRegistered = true
- if (mPoolExecutor == null) {
- mPoolExecutor = ScheduledThreadPoolExecutor(4)
- mPoolExecutor!!.scheduleWithFixedDelay(
- mScheduler,
- 0,
- 2,
- TimeUnit.SECONDS
- )
- }
- } else {
- if (mRegistered) unregisterReceiver(mScreenStateReceiver)
- mRegistered = false
- if (mPoolExecutor != null) {
- mPoolExecutor!!.shutdown()
- mPoolExecutor = null
- }
- }
- } catch (e: SettingNotFoundException) {
- e.printStackTrace()
- }
- }
-
- override fun deliverSelfNotifications(): Boolean {
- return true
- }
- }
- private var cameraStateCallback: CameraDevice.StateCallback =
- object : CameraDevice.StateCallback() {
- override fun onOpened(camera: CameraDevice) {
- Log.d(TAG, "CameraDevice.StateCallback onOpened")
- cameraDevice = camera
- actOnReadyCameraDevice()
- }
-
- override fun onDisconnected(camera: CameraDevice) {
- Log.w(TAG, "CameraDevice.StateCallback onDisconnected")
- }
-
- override fun onError(camera: CameraDevice, error: Int) {
- Log.e(TAG, "CameraDevice.StateCallback onError $error")
- }
- }
- private var sessionStateCallback: CameraCaptureSession.StateCallback =
- object : CameraCaptureSession.StateCallback() {
- override fun onReady(session: CameraCaptureSession) {
- this@CameraLightSensorService.mSession = session
- try {
- if (createCaptureRequest() == null) return
- try {
- session.capture(createCaptureRequest()!!, null, mCameraHandler)
- } catch (e: CameraAccessException) {
- e.printStackTrace()
- } catch (e: IllegalStateException) {
- Log.w(TAG, "onReady: Session is NULL")
- }
- cameraDevice.close()
- session.close()
- } catch (e: Exception) {
- Log.e(TAG, "Camera is in use")
- e.printStackTrace()
- }
- }
- override fun onConfigured(session: CameraCaptureSession) {}
- override fun onConfigureFailed(session: CameraCaptureSession) {}
- }
- private var onImageAvailableListener =
- ImageReader.OnImageAvailableListener { reader: ImageReader ->
- if (DEBUG) Log.d(TAG, "onImageAvailable: Capturing")
- val img = reader.acquireLatestImage()
- if (img != null) {
- try {
- processImage(img)
- } catch (e: SettingNotFoundException) {
- e.printStackTrace()
- } catch (e: InterruptedException) {
- e.printStackTrace()
- }
- img.close()
- }
- }
-
- @SuppressLint("MissingPermission")
- fun readyCamera() {
- if (mIAutoBrightness != null) {
- if (!mIAutoBrightness!!.CameraIsFree()) return
- }
- try {
- manager.openCamera("1", cameraStateCallback, mCameraHandler)
- imageReader.setOnImageAvailableListener(onImageAvailableListener, mCameraHandler)
- if (DEBUG) Log.d(TAG, "imageReader created")
- } catch (e: CameraAccessException) {
- e.printStackTrace()
- }
- }
-
- override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
- val mCameraHandlerThread = HandlerThread("CameraLightSensor")
- mCameraHandlerThread.start()
- mCameraHandler = Handler(mCameraHandlerThread.looper)
- mContext = this
- bindService(
- Intent(mContext, IAutoBrightness::class.java).apply {
- setClassName("com.eurekateam.camera", "com.eurekateam.camera.CameraAIDL")
- },
- mConnection,
- Context.BIND_AUTO_CREATE
- )
- @Suppress("SameParameterValue")
- startForeground(50, pushNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA)
- mRegistered = false
- screenStateFilter = IntentFilter(Intent.ACTION_USER_PRESENT)
- screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF)
- try {
- if (Settings.System.getInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS_MODE)
- == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
- ) {
- registerReceiver(mScreenStateReceiver, screenStateFilter)
- mRegistered = true
- }
- } catch (e: SettingNotFoundException) {
- e.printStackTrace()
- }
- val setting = Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS_MODE)
- contentResolver?.registerContentObserver(setting, false, mSettingsObserver)
- if (DEBUG) Log.d(TAG, "onStartCommand flags $flags startId $startId")
- startForeground(50, pushNotification())
- return START_STICKY
- }
-
- override fun onCreate() {
- if (DEBUG) Log.d(TAG, "onCreate service")
- mContext = this
- startForeground(50, pushNotification())
- super.onCreate()
- }
-
- fun actOnReadyCameraDevice() {
- try {
- cameraDevice.createCaptureSession(
- SessionConfiguration(
- SessionConfiguration.SESSION_REGULAR,
- listOf(OutputConfiguration(imageReader.surface)),
- mExecutor,
- sessionStateCallback
- )
- )
- } catch (e: CameraAccessException) {
- e.printStackTrace()
- }
- }
-
- @Throws(SettingNotFoundException::class, InterruptedException::class)
- private fun processImage(image: Image) {
- val buffer = image.planes[0].buffer
- val bytes = ByteArray(buffer.capacity())
- buffer[bytes]
- val bitmapImage = BitmapFactory.decodeByteArray(bytes, 0, bytes.size, null)
- val brightness = calculateBrightnessEstimate(bitmapImage, 2)
- adjustBrightness(brightness)
- }
-
- fun createCaptureRequest(): CaptureRequest? {
- return try {
- val builder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD)
- builder.addTarget(imageReader.surface)
- builder.build()
- } catch (e: CameraAccessException) {
- e.printStackTrace()
- null
- }
- }
- private fun calculateBrightnessEstimate(bitmap: Bitmap, pixelSpacing: Int): Int {
- var r = 0
- var g = 0
- var b = 0
- val height = bitmap.height
- val width = bitmap.width
- var n = 0
- val pixels = IntArray(width * height)
- bitmap.getPixels(pixels, 0, width, 0, 0, width, height)
- var i = 0
- while (i < pixels.size) {
- val color = pixels[i]
- r += Color.red(color)
- g += Color.green(color)
- b += Color.blue(color)
- n++
- i += pixelSpacing
- }
- return (r + g + b) / (n * 3)
- }
-
- @Throws(SettingNotFoundException::class)
- private fun adjustBrightness(brightness: Int) {
- if (DEBUG) Log.i(TAG, "AdjustBrightness: Received Brightness Value $brightness")
- val oldbrightness =
- Settings.System.getInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS)
- if (DEBUG) {
- Log.i(
- TAG,
- "AdjustBrightness: OldVal = " + oldbrightness + " NewVal = " +
- brightness + " Adjusting.."
- )
- }
- var newbrightness = 2 * brightness - oldbrightness
- if (newbrightness > 255) {
- newbrightness = 255
- } else if (newbrightness < 0) {
- newbrightness = 0
- }
- Settings.System.putInt(
- contentResolver,
- Settings.System.SCREEN_BRIGHTNESS,
- newbrightness
- )
- }
-
- companion object {
- private val imageReader =
- ImageReader.newInstance(50, 50, ImageFormat.JPEG, 2 /* images buffered */)
- val TAG: String = CameraLightSensorService::class.java.simpleName
- const val DEBUG = false
- private var mPoolExecutor: ScheduledThreadPoolExecutor? = null
- private var mRegistered = false
- }
-}
diff --git a/universal7885-common/apps/FMRadio/Android.bp b/universal7885-common/apps/FMRadio/Android.bp
deleted file mode 100644
index aeadcde..0000000
--- a/universal7885-common/apps/FMRadio/Android.bp
+++ /dev/null
@@ -1,20 +0,0 @@
-android_app {
- name: "FMRadio",
- srcs: [
- "src/**/*.kt",
- ],
- platform_apis: true,
- certificate: "platform",
- static_libs: [
- "androidx.core_core",
- "androidx.appcompat_appcompat",
- "androidx.preference_preference",
- "com.google.android.material_stable",
- "androidx.transition_transition",
- "androidx.coordinatorlayout_coordinatorlayout",
- "vendor.eureka.hardware.fmradio-V3-java",
- ],
- required: [
- "vendor.eureka.hardware.fmradio-service",
- ],
-}
diff --git a/universal7885-common/apps/FMRadio/AndroidManifest.xml b/universal7885-common/apps/FMRadio/AndroidManifest.xml
deleted file mode 100644
index d739b65..0000000
--- a/universal7885-common/apps/FMRadio/AndroidManifest.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/lib/Android.bp b/universal7885-common/apps/FMRadio/lib/Android.bp
deleted file mode 100644
index c380efa..0000000
--- a/universal7885-common/apps/FMRadio/lib/Android.bp
+++ /dev/null
@@ -1,22 +0,0 @@
-android_library_import {
- name: "com.google.android.material_stable",
- aars: ["material-1.6.0.aar"],
- sdk_version: "current",
- min_sdk_version: "21",
- static_libs: [
- "androidx.annotation_annotation",
- "androidx.appcompat_appcompat",
- "androidx.cardview_cardview",
- "androidx.coordinatorlayout_coordinatorlayout",
- "androidx-constraintlayout_constraintlayout",
- "androidx.core_core",
- "androidx.dynamicanimation_dynamicanimation",
- "androidx.annotation_annotation-experimental",
- "androidx.fragment_fragment",
- "androidx.lifecycle_lifecycle-runtime",
- "androidx.recyclerview_recyclerview",
- "androidx.transition_transition",
- "androidx.vectordrawable_vectordrawable",
- "androidx.viewpager2_viewpager2",
- ],
-}
diff --git a/universal7885-common/apps/FMRadio/lib/material-1.6.0.aar b/universal7885-common/apps/FMRadio/lib/material-1.6.0.aar
deleted file mode 100644
index e4a8b4c..0000000
Binary files a/universal7885-common/apps/FMRadio/lib/material-1.6.0.aar and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_close.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_close.png
deleted file mode 100644
index 6a4814b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_close.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_error.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_error.png
deleted file mode 100644
index f305259..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_error.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_first.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_first.png
deleted file mode 100644
index 7ea4bbd..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_first.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_forward.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_forward.png
deleted file mode 100644
index 8e31602..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_forward.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_headphones.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_headphones.png
deleted file mode 100644
index de99f8b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_headphones.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_last.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_last.png
deleted file mode 100644
index fcf082b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_last.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_list.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_list.png
deleted file mode 100644
index 27783be..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_list.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_no_image.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_no_image.png
deleted file mode 100644
index 701c865..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_no_image.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_pause.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_pause.png
deleted file mode 100644
index 6c2d2ca..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_pause.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_play.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_play.png
deleted file mode 100644
index 8d1fca0..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_play.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_power.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_power.png
deleted file mode 100644
index 6482494..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_power.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_radio.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_radio.png
deleted file mode 100644
index a0cb119..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_radio.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_refresh.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_refresh.png
deleted file mode 100644
index a917b82..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_refresh.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_rewind.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_rewind.png
deleted file mode 100644
index 7af0c22..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_rewind.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star.png
deleted file mode 100644
index 90354e0..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star_filled.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star_filled.png
deleted file mode 100644
index 4a3cc9d..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star_filled.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_down.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_down.png
deleted file mode 100644
index a046615..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_down.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_up.png b/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_up.png
deleted file mode 100644
index 3730624..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_volume_up.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_close.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_close.png
deleted file mode 100644
index cc49537..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_close.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_error.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_error.png
deleted file mode 100644
index f59c748..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_error.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_first.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_first.png
deleted file mode 100644
index 9d1ed85..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_first.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_forward.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_forward.png
deleted file mode 100644
index 070fcb5..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_forward.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_headphones.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_headphones.png
deleted file mode 100644
index 38aa7d5..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_headphones.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_last.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_last.png
deleted file mode 100644
index 7b2623e..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_last.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_list.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_list.png
deleted file mode 100644
index d1b42e8..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_list.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_no_image.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_no_image.png
deleted file mode 100644
index 45ad809..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_no_image.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_pause.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_pause.png
deleted file mode 100644
index 1630f4f..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_pause.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_play.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_play.png
deleted file mode 100644
index fa2bb89..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_play.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_power.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_power.png
deleted file mode 100644
index 719838c..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_power.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_radio.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_radio.png
deleted file mode 100644
index 6514b77..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_radio.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_refresh.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_refresh.png
deleted file mode 100644
index 88454f7..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_refresh.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_rewind.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_rewind.png
deleted file mode 100644
index 0798f8b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_rewind.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star.png
deleted file mode 100644
index 547c93b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star_filled.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star_filled.png
deleted file mode 100644
index bac8b50..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star_filled.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_down.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_down.png
deleted file mode 100644
index 26d11fe..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_down.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_up.png b/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_up.png
deleted file mode 100644
index e822bc3..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_volume_up.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_close.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_close.png
deleted file mode 100644
index f4f9445..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_close.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_error.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_error.png
deleted file mode 100644
index 720d17c..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_error.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_first.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_first.png
deleted file mode 100644
index 317ed52..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_first.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_forward.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_forward.png
deleted file mode 100644
index c8a3e7f..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_forward.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_headphones.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_headphones.png
deleted file mode 100644
index d70491b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_headphones.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_last.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_last.png
deleted file mode 100644
index fa179dd..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_last.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_list.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_list.png
deleted file mode 100644
index d94b45a..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_list.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_no_image.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_no_image.png
deleted file mode 100644
index 02617ff..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_no_image.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_pause.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_pause.png
deleted file mode 100644
index bb707ea..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_pause.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_play.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_play.png
deleted file mode 100644
index b41105f..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_play.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_power.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_power.png
deleted file mode 100644
index 9f4042d..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_power.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_radio.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_radio.png
deleted file mode 100644
index 98530fd..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_radio.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_refresh.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_refresh.png
deleted file mode 100644
index 22fec5e..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_refresh.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_rewind.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_rewind.png
deleted file mode 100644
index 7821c6c..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_rewind.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star.png
deleted file mode 100644
index 957ce0d..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star_filled.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star_filled.png
deleted file mode 100644
index 6bce0e1..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star_filled.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_down.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_down.png
deleted file mode 100644
index f016945..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_down.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_up.png b/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_up.png
deleted file mode 100644
index 6da6c1a..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_volume_up.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_close.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_close.png
deleted file mode 100644
index cdd306b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_close.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_error.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_error.png
deleted file mode 100644
index 082598b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_error.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_first.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_first.png
deleted file mode 100644
index 633f606..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_first.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_forward.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_forward.png
deleted file mode 100644
index bd8059c..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_forward.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_headphones.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_headphones.png
deleted file mode 100644
index 1c540cc..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_headphones.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_last.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_last.png
deleted file mode 100644
index d93050c..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_last.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_list.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_list.png
deleted file mode 100644
index 20909eb..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_list.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_no_image.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_no_image.png
deleted file mode 100644
index 50d1adf..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_no_image.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_pause.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_pause.png
deleted file mode 100644
index d169f23..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_pause.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_play.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_play.png
deleted file mode 100644
index d926c13..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_play.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_power.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_power.png
deleted file mode 100644
index 2430124..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_power.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_radio.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_radio.png
deleted file mode 100644
index ce10f35..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_radio.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_refresh.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_refresh.png
deleted file mode 100644
index 884fcd1..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_refresh.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_rewind.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_rewind.png
deleted file mode 100644
index 8662446..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_rewind.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star.png
deleted file mode 100644
index 0cd4248..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star_filled.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star_filled.png
deleted file mode 100644
index 179f934..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_star_filled.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_down.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_down.png
deleted file mode 100644
index c6c138a..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_down.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_up.png b/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_up.png
deleted file mode 100644
index c4facef..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxhdpi/ic_volume_up.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_close.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_close.png
deleted file mode 100644
index 8d88f15..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_close.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_error.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_error.png
deleted file mode 100644
index 772590a..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_error.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_first.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_first.png
deleted file mode 100644
index f2c26a0..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_first.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_forward.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_forward.png
deleted file mode 100644
index 72c39b7..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_forward.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_headphones.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_headphones.png
deleted file mode 100644
index 3b12f14..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_headphones.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_last.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_last.png
deleted file mode 100644
index 98b0a2a..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_last.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_list.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_list.png
deleted file mode 100644
index 7ddaf52..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_list.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_no_image.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_no_image.png
deleted file mode 100644
index 2136e9b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_no_image.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_pause.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_pause.png
deleted file mode 100644
index dc63538..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_pause.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_play.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_play.png
deleted file mode 100644
index fc02009..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_play.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_power.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_power.png
deleted file mode 100644
index 63cf05b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_power.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_radio.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_radio.png
deleted file mode 100644
index 5946b64..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_radio.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_refresh.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_refresh.png
deleted file mode 100644
index cd1bbdd..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_refresh.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_rewind.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_rewind.png
deleted file mode 100644
index 4b5395d..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_rewind.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star.png
deleted file mode 100644
index 2c67ccd..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star_filled.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star_filled.png
deleted file mode 100644
index bf4fe37..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_star_filled.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_down.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_down.png
deleted file mode 100644
index fafc1e9..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_down.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_up.png b/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_up.png
deleted file mode 100644
index 11cac5b..0000000
Binary files a/universal7885-common/apps/FMRadio/res/drawable-xxxhdpi/ic_volume_up.png and /dev/null differ
diff --git a/universal7885-common/apps/FMRadio/res/drawable/ic_launcher.xml b/universal7885-common/apps/FMRadio/res/drawable/ic_launcher.xml
deleted file mode 100644
index 4d62316..0000000
--- a/universal7885-common/apps/FMRadio/res/drawable/ic_launcher.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/drawable/ic_launcher_foreground.xml b/universal7885-common/apps/FMRadio/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index e93e9aa..0000000
--- a/universal7885-common/apps/FMRadio/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar.xml b/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar.xml
deleted file mode 100644
index c1bb1d9..0000000
--- a/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
- -
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar_thumb.xml b/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar_thumb.xml
deleted file mode 100644
index 485d0b3..0000000
--- a/universal7885-common/apps/FMRadio/res/drawable/ic_seekbar_thumb.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/activity_channel_list.xml b/universal7885-common/apps/FMRadio/res/layout/activity_channel_list.xml
deleted file mode 100644
index 96b7478..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/activity_channel_list.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/activity_navigation.xml b/universal7885-common/apps/FMRadio/res/layout/activity_navigation.xml
deleted file mode 100644
index b3e25fb..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/activity_navigation.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/alertdialog.xml b/universal7885-common/apps/FMRadio/res/layout/alertdialog.xml
deleted file mode 100644
index 6494908..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/alertdialog.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/channel_list_items.xml b/universal7885-common/apps/FMRadio/res/layout/channel_list_items.xml
deleted file mode 100644
index fa1ca38..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/channel_list_items.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/favorite_channel_items.xml b/universal7885-common/apps/FMRadio/res/layout/favorite_channel_items.xml
deleted file mode 100644
index e477cbb..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/favorite_channel_items.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/fragment_fav_list.xml b/universal7885-common/apps/FMRadio/res/layout/fragment_fav_list.xml
deleted file mode 100644
index 70d4628..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/fragment_fav_list.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/universal7885-common/apps/FMRadio/res/layout/fragment_main.xml b/universal7885-common/apps/FMRadio/res/layout/fragment_main.xml
deleted file mode 100644
index 8b02ef7..0000000
--- a/universal7885-common/apps/FMRadio/res/layout/fragment_main.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/universal7885-common/apps/FMRadio/res/menu/bottom_navigation_menu.xml b/universal7885-common/apps/FMRadio/res/menu/bottom_navigation_menu.xml
deleted file mode 100644
index 62b20e8..0000000
--- a/universal7885-common/apps/FMRadio/res/menu/bottom_navigation_menu.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/universal7885-common/apps/FMRadio/res/values/dimens.xml b/universal7885-common/apps/FMRadio/res/values/dimens.xml
deleted file mode 100644
index 558b29c..0000000
--- a/universal7885-common/apps/FMRadio/res/values/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- 10dp
- 20dp
- 25dp
- 35dp
-
diff --git a/universal7885-common/apps/FMRadio/res/values/strings.xml b/universal7885-common/apps/FMRadio/res/values/strings.xml
deleted file mode 100644
index 7725abf..0000000
--- a/universal7885-common/apps/FMRadio/res/values/strings.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
- FM Radio
- FM Radio
- OK
- Output Modes
- FM Power
- Disabled
- Enabled
- Speaker
- Wired Earphones
- Radio Channel
- Refresh
- Seek Down
- Seek Up
- Scan
- Stop
- Mhz
- Quit
- Album Art
- Previous Radio Channel
- Next Radio Channel
- Play Pause
- Close Radio
- Failed to open radio chr device!!
- The FM radio app needs to call ioctl()
- to radio chr device (/dev/radio0). If SELinux is enforcing, try making
- it permissive
- Failed to check if array != null!!
- Most likely because FM device couldn\'t
- find radio channels, if you are sure it should find channels, contact the devs
- Failed to find wired headset
- Insert Headphones and try again
- Radio Controls
- FM Radio Station
- FM
- 000.0
- Channel List
- Favorites
- Warning!
- Retry
- Exit App
- FM %s Mhz
- Updating channel freqs list
-
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/FMRadioService.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/FMRadioService.kt
deleted file mode 100644
index ba025f9..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/FMRadioService.kt
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.eurekateam.fmradio
-
-import android.app.Service
-import android.app.PendingIntent
-import android.app.Notification
-import android.app.NotificationManager
-import android.app.NotificationChannel
-import androidx.core.app.NotificationCompat
-import android.content.Context
-import android.content.Intent
-import android.os.IBinder
-
-import com.eurekateam.fmradio.NativeFMInterface
-import com.eurekateam.fmradio.R
-
-import vendor.eureka.hardware.fmradio.GetType
-
-import java.text.DecimalFormat
-
-class FMRadioService : Service() {
- private val mFMInterface = NativeFMInterface()
- private val mCleanFormat = DecimalFormat("0.#")
- private fun pushNotification(mContext: Context): Notification {
- val nm = mContext.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
- val channel = NotificationChannel(
- mContext.packageName,
- "FM Radio",
- NotificationManager.IMPORTANCE_DEFAULT
- )
- nm.createNotificationChannel(channel)
- val builder = NotificationCompat.Builder(mContext, mContext.packageName)
- val notificationIntent = Intent(mContext, FMRadioService::class.java)
- val contentIntent = PendingIntent.getActivity(
- mContext,
- 50,
- notificationIntent,
- PendingIntent.FLAG_IMMUTABLE
- )
- val mCurrFreq = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_FREQ)
-
- builder.setContentIntent(contentIntent)
- builder.setOngoing(true)
- builder.setSmallIcon(R.drawable.ic_radio)
- builder.setContentTitle("FMRadio is running - ${mCleanFormat.format(mCurrFreq.toFloat() / 1000)} Mhz")
- builder.setChannelId(mContext.packageName)
- return builder.build()
- }
- override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
- if (intent?.action == "com.eurekateam.fmradio.STOP") {
- stopSelf()
- return super.onStartCommand(intent, flags, startId)
- } else {
- startForeground(50, pushNotification(this))
- return START_STICKY
- }
- }
- override fun onBind(intent: Intent?): IBinder? {
- return null
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/MainActivity.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/MainActivity.kt
deleted file mode 100644
index 86969aa..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/MainActivity.kt
+++ /dev/null
@@ -1,183 +0,0 @@
-package com.eurekateam.fmradio
-
-import android.content.*
-import android.graphics.drawable.Icon
-import android.media.AudioDeviceInfo
-import android.media.AudioManager
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.os.Process
-import android.view.LayoutInflater
-import android.view.View
-import androidx.appcompat.app.AlertDialog
-import androidx.appcompat.app.AppCompatActivity
-import androidx.appcompat.widget.AppCompatImageView
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
-import com.eurekateam.fmradio.enums.HeadsetState
-import com.eurekateam.fmradio.enums.PowerState
-import com.eurekateam.fmradio.fragments.ChannelListFragment
-import com.eurekateam.fmradio.fragments.FavoriteFragment
-import com.eurekateam.fmradio.fragments.MainFragment
-import com.eurekateam.fmradio.utils.Log
-import com.google.android.material.bottomnavigation.BottomNavigationView
-import com.google.android.material.color.DynamicColors
-import com.google.android.material.textview.MaterialTextView
-import vendor.eureka.hardware.fmradio.SetType
-import vendor.eureka.hardware.fmradio.GetType
-
-class MainActivity : AppCompatActivity() {
- private lateinit var mIntent: Intent
-
- /**
- * Function to change current [Fragment] to other [Fragment]
- * @param [fragment] [Fragment] to change to
- * @param [tagFragmentName] Tag for the changing [fragment]
- */
- private fun changeFragment(fragment: Fragment?, tagFragmentName: String) {
- supportFragmentManager.beginTransaction().apply {
- replace(R.id.container_view, fragment!!, tagFragmentName)
- setPrimaryNavigationFragment(fragment)
- setReorderingAllowed(true)
- commitNow()
- }
- }
- private val mFMInterface = NativeFMInterface()
- private lateinit var mAlertView: View
- private lateinit var mAlertTitle: MaterialTextView
- private lateinit var mAlertDesc: MaterialTextView
- private lateinit var mAlertImage: AppCompatImageView
- private lateinit var mAudioManager: AudioManager
- override fun onCreate(savedInstanceState: Bundle?) {
- mAlertView = (getSystemService(LAYOUT_INFLATER_SERVICE) as LayoutInflater)
- .inflate(R.layout.alertdialog, null)
- mAlertTitle = mAlertView.findViewById(R.id.alert_title)
- mAlertImage = mAlertView.findViewById(R.id.alert_image)
- mAlertDesc = mAlertView.findViewById(R.id.alert_desc)
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_navigation)
- DynamicColors.applyToActivitiesIfAvailable(application)
- mFMInterface.mDevCtl.open()
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_APP_PID, Process.myPid())
- mAudioManager = getSystemService(AUDIO_SERVICE) as AudioManager
-
- /**
- * Detects whether wired headphones is connected to this device or no
- * @see AudioManager.getDevices
- */
- val mAudioDeviceInfo = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)
-
- for (i in mAudioDeviceInfo.indices) {
- if (mAudioDeviceInfo[i].type == AudioDeviceInfo.TYPE_WIRED_HEADSET ||
- mAudioDeviceInfo[i].type == AudioDeviceInfo.TYPE_WIRED_HEADPHONES
- ) {
- MainFragment.mHeadSetPlugged = HeadsetState.HEADSET_STATE_CONNECTED
- Log.i("Wired Headphones detected")
- }
- }
-
- if (MainFragment.mHeadSetPlugged != HeadsetState.HEADSET_STATE_CONNECTED) {
- mAlertTitle.text = getString(R.string.no_headphones_error)
- mAlertDesc.text = getString(R.string.no_headphones_error_desc)
- mAlertImage.setImageIcon(
- Icon.createWithResource(
- mAlertView.context,
- R.drawable.ic_headphones
- )
- )
- AlertDialog.Builder(mAlertView.context)
- .setCancelable(false)
- .setView(mAlertView)
- .setNegativeButton(R.string.ok) { v: DialogInterface, _: Int ->
- mAudioManager.setParameters(PowerState.FM_POWER_OFF.mAudioParam)
- v.dismiss()
- Handler(Looper.getMainLooper()).postDelayed({
- finish()
- }, 500)
- }
- .show()
- return
- }
- val receiverFilter = IntentFilter(Intent.ACTION_HEADSET_PLUG)
- registerReceiver(mWiredHeadsetReceiver, receiverFilter)
- val mRadioMainFragment = MainFragment()
- val mRadioChannelListFragment = ChannelListFragment()
- val mFavoriteFragment = FavoriteFragment()
- changeFragment(mRadioMainFragment, MainFragment::class.java.name)
- mIntent = Intent(this, FMRadioService::class.java)
- findViewById(R.id.bottom_nav_bar).setOnItemSelectedListener {
- when (it.itemId) {
- R.id.radio_main -> changeFragment(mRadioMainFragment, MainFragment::class.java.name)
- R.id.channel_list -> changeFragment(mRadioChannelListFragment, ChannelListFragment::class.java.name)
- R.id.fav_list -> changeFragment(mFavoriteFragment, FavoriteFragment::class.java.name)
- }
- true
- }
- }
-
- /**
- * Register a [BroadcastReceiver] for listening to headset events
- */
- private val mWiredHeadsetReceiver: BroadcastReceiver = object : BroadcastReceiver() {
- override fun onReceive(context: Context, intent: Intent) {
- if (intent.action == AudioManager.ACTION_HEADSET_PLUG) {
- MainFragment.mHeadSetPlugged = HeadsetState.HEADSET_STATE_DISCONNECTED
- val mAudioDeviceInfo = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)
- for (i in mAudioDeviceInfo.indices) {
- if (mAudioDeviceInfo[i].type == AudioDeviceInfo.TYPE_WIRED_HEADSET ||
- mAudioDeviceInfo[i].type == AudioDeviceInfo.TYPE_WIRED_HEADPHONES
- ) {
- MainFragment.mHeadSetPlugged = HeadsetState.HEADSET_STATE_CONNECTED
- }
- }
- if (MainFragment.mHeadSetPlugged != HeadsetState.HEADSET_STATE_CONNECTED) {
- Log.w("onReceive: Headset Unplugged")
- mAlertTitle.text = getString(R.string.no_headphones_error)
- mAlertDesc.text = getString(R.string.no_headphones_error_desc)
- mAlertImage.setImageIcon(
- Icon.createWithResource(
- mAlertView.context,
- R.drawable.ic_headphones
- )
- )
- val mAlertDialog = AlertDialog.Builder(mAlertView.context)
- mAlertDialog
- .setCancelable(false)
- .setView(mAlertView)
- .setNegativeButton(R.string.ok) { v: DialogInterface, _: Int ->
- v.dismiss()
- mAudioManager.setParameters(PowerState.FM_POWER_OFF.mAudioParam)
- Handler(Looper.getMainLooper()).postDelayed({
- finish()
- }, 500)
- }
- .show()
- }
- }
- }
- }
-
- /**
- * Helper function to get [MainActivity]'s [FragmentManager] to sub [Fragment]
- * @return [FragmentManager] supplied to this activity
- */
- fun getMySupportFragmentManager(): FragmentManager {
- return supportFragmentManager
- }
-
- override fun onPause() {
- super.onPause()
- Log.i("Application onPause")
- if (mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_MUTEX_LOCKED) == 0) {
- mIntent.action = null
- startService(mIntent)
- }
- }
-
- override fun onRestart() {
- super.onRestart()
- mIntent.action = "com.eurekateam.fmradio.STOP"
- startService(mIntent)
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/NativeFMInterface.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/NativeFMInterface.kt
deleted file mode 100644
index d6d0d54..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/NativeFMInterface.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.eurekateam.fmradio
-
-import android.os.ServiceManager
-import vendor.eureka.hardware.fmradio.GetType
-import vendor.eureka.hardware.fmradio.IFMDevControl
-
-class NativeFMInterface {
- val mDevCtl: IFMDevControl
- val mSysfsCtl: IFMDevControl
- val mDefaultCtl: IFMDevControl
-
- init {
- mDevCtl = IFMDevControl.Stub.asInterface(ServiceManager.waitForDeclaredService("vendor.eureka.hardware.fmradio.IFMDevControl/default"))
- mSysfsCtl = IFMDevControl.Stub.asInterface(ServiceManager.waitForDeclaredService("vendor.eureka.hardware.fmradio.IFMDevControl/support"))
- mDefaultCtl = if (mSysfsCtl.getValue(GetType.GET_TYPE_FM_SYSFS_IF) == 0) mSysfsCtl else mDevCtl
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/PebbleTextView.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/PebbleTextView.kt
deleted file mode 100644
index 2921a38..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/PebbleTextView.kt
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.eurekateam.fmradio
-
-import android.content.Context
-import android.graphics.*
-import android.util.AttributeSet
-import android.view.View
-
-class PebbleTextView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : View(context, attrs, defStyleAttr) {
- constructor (context: Context) : this(context, null)
- constructor (context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
-
- var mText: String = "102.7"
- var mColor: Int = Color.GREEN
-
- private val mPaint = Paint()
- private val mRectf = RectF(25F, 25F, 350F, 270F)
- private val mRectfAnother = RectF(10F, 25F, 250F, 235F)
- override fun onDraw(canvas: Canvas) {
- super.onDraw(canvas)
- mPaint.color = mColor
- mPaint.style = Paint.Style.FILL
- canvas.drawCircle(175F, 175F, 140F, mPaint)
- canvas.drawArc(mRectf, -120F, 180F, true, mPaint)
- canvas.drawArc(mRectfAnother, -240F, 180F, true, mPaint)
- mPaint.color = Color.BLACK
- setTextSizeForWidth(mPaint, 200F, mText)
- canvas.drawText(mText, 75F, 175F, mPaint)
- setTextSizeForWidth(mPaint, 75F, "Mhz")
- canvas.drawText("Mhz", 155F, 235F, mPaint)
- }
-
- /**
- * Sets the text size for a Paint object so a given string of text will be a
- * given width.
- *
- * @param paint
- * the Paint to set the text size for
- * @param desiredWidth
- * the desired width
- * @param text
- * the text that should be that width
- */
- private fun setTextSizeForWidth(
- paint: Paint,
- desiredWidth: Float,
- text: String
- ) {
- // Pick a reasonably large value for the test. Larger values produce
- // more accurate results, but may cause problems with hardware
- // acceleration. But there are workarounds for that, too; refer to
- // http://stackoverflow.com/questions/6253528/font-size-too-large-to-fit-in-cache
- val testTextSize = 48f
-
- // Get the bounds of the text, using our testTextSize.
- paint.textSize = testTextSize
- val bounds = Rect()
- paint.getTextBounds(text, 0, text.length, bounds)
-
- // Calculate the desired size as a proportion of our testTextSize.
- val desiredTextSize: Float = testTextSize * desiredWidth / bounds.width()
-
- // Set the paint for that size.
- paint.textSize = desiredTextSize
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/SharedPreferencesConst.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/SharedPreferencesConst.kt
deleted file mode 100644
index 79e01fd..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/SharedPreferencesConst.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.eurekateam.fmradio
-
-object SharedPreferencesConst {
- const val PREF_VOLUME = "volume"
- private const val PREF_FAV_FREQ_FMT = "fav_%d"
- const val PREF_AUDIO_OUTPUT = "speaker"
- const val PREF_FREQ = "freq"
-
- fun assembleFavFreq(freq: Int) = String.format(PREF_FAV_FREQ_FMT, freq)
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/ListViewAdapter.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/ListViewAdapter.kt
deleted file mode 100644
index 0b76452..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/ListViewAdapter.kt
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.eurekateam.fmradio.adapters
-
-import android.content.Context
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.BaseAdapter
-import androidx.appcompat.widget.AppCompatImageView
-import androidx.core.content.res.ResourcesCompat
-import androidx.preference.PreferenceManager
-import com.eurekateam.fmradio.SharedPreferencesConst
-import com.eurekateam.fmradio.NativeFMInterface
-import com.eurekateam.fmradio.utils.Log
-import com.eurekateam.fmradio.R
-import com.google.android.material.textview.MaterialTextView
-import vendor.eureka.hardware.fmradio.GetType
-import vendor.eureka.hardware.fmradio.SetType
-
-class ListViewAdapter(private val mContext: Context) : BaseAdapter() {
- private val mFMInterface = NativeFMInterface()
- private val mListChannel = mFMInterface.mDefaultCtl.getFreqsList().apply{ sort() }
- private var mListofViews = HashMap(30)
- private var mInitDoneArray = Array(30){ false }
-
- override fun getCount(): Int {
- return mListChannel.size
- }
-
- override fun getItem(p: Int): Any {
- return mListChannel[p]
- }
-
- override fun getItemId(p: Int): Long {
- return p.toLong()
- }
-
- override fun getView(id: Int, mConvertView: View?, parent: ViewGroup?): View {
- val mAnotherConvertView = mConvertView
- ?: (mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater).inflate(
- R.layout.channel_list_items,
- parent,
- false
- )
- mAnotherConvertView.findViewById(R.id.channel_list_title).text =
- String.format(
- mContext.getString(R.string.fm_radio_freq),
- mListChannel[id].toFloat() / 1000
- )
- mAnotherConvertView.findViewById(R.id.channel_list_title).setOnClickListener {
- mFMInterface.mDefaultCtl.setValue(SetType.SET_TYPE_FM_FREQ, mListChannel[id])
- setCurrentFMChannel(id)
- }
- mAnotherConvertView.findViewById(R.id.star_button_list).let {
- val mStar = ResourcesCompat.getDrawable(mContext.resources, R.drawable.ic_star, mContext.theme)
- val mStarFilled = ResourcesCompat.getDrawable(
- mContext.resources,
- R.drawable.ic_star_filled,
- mContext.theme
- )
- val mIndex = mListChannel[id]
- val mSharedPref = PreferenceManager.getDefaultSharedPreferences(mContext)
- val mFav = mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(mIndex), false)
- if (mFav) {
- it.setImageDrawable(mStarFilled)
- } else {
- it.setImageDrawable(mStar)
- }
- }
- if (!mInitDoneArray[id] && mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_FREQ) == mListChannel[id]) {
- setCurrentFMChannel(id)
- }
- mInitDoneArray[id] = true
- mListofViews[id] = mAnotherConvertView!!
- return mAnotherConvertView
- }
-
- private fun setCurrentFMChannel(mPosition: Int) {
- Log.i("Position: $mPosition")
- for (mItem in mListofViews) {
- mItem.value.setBackgroundColor(
- ResourcesCompat.getColor(
- mContext.resources,
- android.R.color.system_accent1_50,
- mContext.theme
- )
- )
- }
- mListofViews[mPosition]?.setBackgroundColor(
- ResourcesCompat.getColor(
- mContext.resources,
- android.R.color.system_accent1_300,
- mContext.theme
- )
- )
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/PebbleLayoutAdapter.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/PebbleLayoutAdapter.kt
deleted file mode 100644
index db20eca..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/adapters/PebbleLayoutAdapter.kt
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.eurekateam.fmradio.adapters
-
-import android.content.Context
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.BaseAdapter
-import androidx.core.content.res.ResourcesCompat
-import androidx.preference.PreferenceManager
-import com.eurekateam.fmradio.SharedPreferencesConst
-import com.eurekateam.fmradio.NativeFMInterface
-import com.eurekateam.fmradio.PebbleTextView
-import com.eurekateam.fmradio.R
-import vendor.eureka.hardware.fmradio.SetType
-
-class PebbleLayoutAdapter(private val mContext: Context) : BaseAdapter() {
- private var mFavoriteList: List = emptyList()
- private val mFMInterface = NativeFMInterface()
- private val mListChannel = mFMInterface.mDefaultCtl.getFreqsList()
- private val mSharedPref = PreferenceManager.getDefaultSharedPreferences(mContext)
-
- init {
- for (k in mListChannel) {
- if (mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(k), false)) mFavoriteList += k
- }
- }
-
- override fun getCount(): Int {
- return mFavoriteList.size
- }
-
- override fun getItem(p: Int): Any {
- return mFavoriteList[p]
- }
-
- override fun getItemId(p: Int): Long {
- return p.toLong()
- }
-
- override fun getView(id: Int, mConvertView: View?, parent: ViewGroup?): View {
- val mAnotherConvertView = mConvertView
- ?: (mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater).inflate(
- R.layout.favorite_channel_items,
- parent,
- false
- )
- mAnotherConvertView.findViewById(R.id.pebble_textview).apply {
- mText = (mFavoriteList[id].toFloat() / 1000).toString()
- mColor = ResourcesCompat.getColor(
- mContext.resources,
- android.R.color.system_accent1_400,
- mContext.theme
- )
- setOnClickListener {
- mFMInterface.mDefaultCtl.setValue(SetType.SET_TYPE_FM_FREQ, mFavoriteList[id])
- }
- }
- return mAnotherConvertView
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/HeadsetState.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/HeadsetState.kt
deleted file mode 100644
index 2c2476a..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/HeadsetState.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.eurekateam.fmradio.enums
-
-/**
- * [HEADSET_STATE_CONNECTED] Headset is connected
- *
- * [HEADSET_STATE_DISCONNECTED] Headset is disconnected
- */
-enum class HeadsetState {
- HEADSET_STATE_CONNECTED,
- HEADSET_STATE_DISCONNECTED
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PlayState.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PlayState.kt
deleted file mode 100644
index b3cf8da..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PlayState.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.eurekateam.fmradio.enums
-
-/***
- * [STATE_PLAYING] : Currently playing
- *
- * [STATE_STOPPED] : Stopped playing
- */
-enum class PlayState {
- STATE_PLAYING,
- STATE_STOPPED
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PowerState.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PowerState.kt
deleted file mode 100644
index 68833d6..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/enums/PowerState.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.eurekateam.fmradio.enums
-
-/**
- * [FM_POWER_OFF] : Turns off fm audio
- *
- * [FM_POWER_ON] : Turns on fm audio
- *
- * This enum includes audio parameter that can be written to A-BOX
- */
-enum class PowerState(val mAudioParam: String) {
- FM_POWER_ON("l_fmradio_mode=on"),
- FM_POWER_OFF("l_fmradio_mode=off")
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/ChannelListFragment.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/ChannelListFragment.kt
deleted file mode 100644
index f9be422..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/ChannelListFragment.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.eurekateam.fmradio.fragments
-
-import android.app.ProgressDialog
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.view.WindowManager
-import android.widget.FrameLayout
-import android.widget.ListView
-import androidx.fragment.app.Fragment
-import com.eurekateam.fmradio.NativeFMInterface
-import com.eurekateam.fmradio.R
-import com.eurekateam.fmradio.MainActivity
-import com.eurekateam.fmradio.adapters.ListViewAdapter
-import com.eurekateam.fmradio.utils.MaterialHelper
-import com.eurekateam.fmradio.utils.IWaitUntil
-import com.eurekateam.fmradio.utils.WaitUntil
-import com.google.android.material.floatingactionbutton.FloatingActionButton
-import vendor.eureka.hardware.fmradio.SetType
-import vendor.eureka.hardware.fmradio.GetType
-
-class ChannelListFragment :
- Fragment(R.layout.activity_channel_list),
- View.OnClickListener {
- private lateinit var mListView: ListView
- private lateinit var mFloatingActionButton: FloatingActionButton
- private val mNativeIF = NativeFMInterface()
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- val mRootView = inflater.inflate(R.layout.activity_channel_list, container, false)
- mListView = mRootView.findViewById(R.id.listview)
- mFloatingActionButton = mRootView.findViewById(R.id.refresh_channel_list)
- mFloatingActionButton.setOnClickListener(this)
- mListView.adapter = ListViewAdapter(requireContext())
- mRootView.findViewById(R.id.channel_list_layout).setBackgroundColor(
- MaterialHelper.build {
- context = requireContext()
- light = android.R.color.system_accent1_50
- dark = android.R.color.system_accent1_100
- }.getValue()
- )
- return mRootView
- }
-
- override fun onClick(v: View?) {
- mNativeIF.mDefaultCtl.setValue(SetType.SET_TYPE_FM_SEARCH_START, 0)
- val loading = ProgressDialog(requireContext())
- loading.setMessage(requireContext().resources.getString(R.string.update_freq))
- loading.setCancelable(false)
- loading.setInverseBackgroundForced(false)
- loading.show()
- WaitUntil.setTimer(
- requireActivity(),
- object : IWaitUntil {
- override fun cond(): Boolean = mNativeIF.mDefaultCtl.getValue(GetType.GET_TYPE_FM_MUTEX_LOCKED) == 0
- override fun todo() {
- if (isAdded()) {
- loading.hide()
- (requireActivity() as MainActivity).getMySupportFragmentManager().apply {
- beginTransaction().remove(this@ChannelListFragment).commit()
- executePendingTransactions()
- beginTransaction().add(R.id.container_view, this@ChannelListFragment).commit()
- }
- }
- }
- }
- )
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/FavoriteFragment.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/FavoriteFragment.kt
deleted file mode 100644
index b591e82..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/FavoriteFragment.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.eurekateam.fmradio.fragments
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.GridView
-import androidx.fragment.app.Fragment
-import com.eurekateam.fmradio.R
-import com.eurekateam.fmradio.utils.MaterialHelper
-import com.eurekateam.fmradio.adapters.PebbleLayoutAdapter
-
-class FavoriteFragment : Fragment(R.layout.fragment_fav_list) {
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- val mRootView = inflater.inflate(R.layout.fragment_fav_list, container, false)
- val mGridView = mRootView.findViewById(R.id.fav_list_grid)
- mGridView.adapter = PebbleLayoutAdapter(requireContext())
- mRootView.findViewById(R.id.fav_list_grid).setBackgroundColor(
- MaterialHelper.build {
- context = requireContext()
- light = android.R.color.system_accent1_100
- dark = android.R.color.system_accent1_50
- }.getValue()
- )
- return mRootView
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/MainFragment.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/MainFragment.kt
deleted file mode 100644
index 27e315e..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/fragments/MainFragment.kt
+++ /dev/null
@@ -1,325 +0,0 @@
-package com.eurekateam.fmradio.fragments
-
-import android.app.ProgressDialog
-import android.content.Context
-import android.content.SharedPreferences
-import android.content.res.Configuration
-import android.graphics.drawable.Drawable
-import android.graphics.drawable.Icon
-import android.media.AudioManager
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.view.WindowManager
-import android.widget.FrameLayout
-import android.widget.SeekBar
-import android.widget.Toast
-import androidx.appcompat.widget.AppCompatSeekBar
-import androidx.core.content.res.ResourcesCompat
-import androidx.fragment.app.Fragment
-import androidx.preference.PreferenceManager
-import com.eurekateam.fmradio.SharedPreferencesConst
-import com.eurekateam.fmradio.NativeFMInterface
-import com.eurekateam.fmradio.R
-import com.eurekateam.fmradio.enums.HeadsetState
-import com.eurekateam.fmradio.enums.PowerState
-import com.eurekateam.fmradio.utils.IWaitUntil
-import com.eurekateam.fmradio.utils.Log
-import com.eurekateam.fmradio.utils.MaterialHelper
-import com.eurekateam.fmradio.utils.WaitUntil
-import com.google.android.material.floatingactionbutton.FloatingActionButton
-import com.google.android.material.textview.MaterialTextView
-import vendor.eureka.hardware.fmradio.SetType
-import vendor.eureka.hardware.fmradio.GetType
-import java.text.DecimalFormat
-
-class MainFragment :
- Fragment(R.layout.fragment_main),
- View.OnClickListener,
- SeekBar.OnSeekBarChangeListener {
- private val mFMInterface = NativeFMInterface()
- private lateinit var mVolumeUp: FloatingActionButton
- private lateinit var mVolumeDown: FloatingActionButton
- private lateinit var mSeekBar: AppCompatSeekBar
- private lateinit var mFavButton: FloatingActionButton
- private lateinit var mFMFreq: MaterialTextView
- private val mCleanFormat: DecimalFormat = DecimalFormat("0.#")
- private lateinit var mOutputSwitch: FloatingActionButton
- private lateinit var mBeforeChannelBtn: FloatingActionButton
- private lateinit var mNextChannelBtn: FloatingActionButton
- private lateinit var mPowerBtn: FloatingActionButton
- private lateinit var mAudioManager: AudioManager
- private lateinit var mStar: Drawable
- private lateinit var mStarFilled: Drawable
- private var mFavList : List = emptyList()
- private lateinit var mSharedPref: SharedPreferences
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- val mRootView = inflater.inflate(R.layout.fragment_main, container, false)
- super.onCreate(savedInstanceState)
- mStar = ResourcesCompat.getDrawable(
- requireContext().resources,
- R.drawable.ic_star,
- requireContext().theme
- )!!
- mStarFilled = ResourcesCompat.getDrawable(
- requireContext().resources,
- R.drawable.ic_star_filled,
- requireContext().theme
- )!!
- mAudioManager = requireContext().getSystemService(Context.AUDIO_SERVICE) as AudioManager
- mVolumeUp = mRootView.findViewById(R.id.volume_up)
- mVolumeDown = mRootView.findViewById(R.id.volume_down)
- mSeekBar = mRootView.findViewById(R.id.volume_seekbar)
- mFMFreq = mRootView.findViewById(R.id.fm_freq)
- mBeforeChannelBtn = mRootView.findViewById(R.id.before_channel)
- mPowerBtn = mRootView.findViewById(R.id.fm_power)
- mFavButton = mRootView.findViewById(R.id.fav_button)
- mNextChannelBtn = mRootView.findViewById(R.id.next_channel)
- mOutputSwitch = mRootView.findViewById(R.id.fm_output_btn)
- mVolumeUp.setOnClickListener(this)
- mVolumeDown.setOnClickListener(this)
- mSeekBar.setOnSeekBarChangeListener(this)
- mBeforeChannelBtn.setOnClickListener(this)
- mPowerBtn.setOnClickListener(this)
- mNextChannelBtn.setOnClickListener(this)
- mOutputSwitch.setOnClickListener(this)
- mFavButton.setOnClickListener(this)
- mSharedPref = PreferenceManager.getDefaultSharedPreferences(requireContext())
- for (mResID in listOf(R.id.app_banner, R.id.fm_freq, R.id.freq_misc)) {
- mRootView.findViewById(mResID).apply {
- setTextColor(MaterialHelper.build {
- context = requireContext()
- light = android.R.color.system_accent2_500
- dark = android.R.color.system_accent2_100
- }.getValue())
- }
- }
- mRootView.findViewById(R.id.main_fragment).apply {
- setBackgroundColor(MaterialHelper.build {
- context = requireContext()
- light = android.R.color.system_accent1_100
- dark = android.R.color.system_accent1_700
- }.getValue())
- }
- val mVolume = mSharedPref.getInt(SharedPreferencesConst.PREF_VOLUME, 8)
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_VOLUME, mVolume)
- mSeekBar.min = 1
- mSeekBar.max = 15
- mSeekBar.progress = mVolume
- updateOutputStatus(false)
- if (!mFreqSearchDone) {
- val mRestoreFreq = mSharedPref.getInt(SharedPreferencesConst.PREF_FREQ, mFMInterface.mDevCtl.getValue(GetType.GET_TYPE_FM_LOWER_LIMIT))
- mFMInterface.mDefaultCtl.setValue(SetType.SET_TYPE_FM_FREQ, mRestoreFreq)
- mFMFreq.text = mCleanFormat.format(mRestoreFreq.toFloat() / 1000)
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_THREAD, 1)
- val loading = ProgressDialog(requireContext())
- loading.setMessage(requireContext().resources.getString(R.string.update_freq))
- loading.setCancelable(false)
- loading.setInverseBackgroundForced(false)
- loading.show()
- mFMInterface.mDefaultCtl.setValue(SetType.SET_TYPE_FM_SEARCH_START, 0)
- WaitUntil.setTimer(
- requireActivity(),
- object : IWaitUntil {
- override fun cond(): Boolean = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_MUTEX_LOCKED) == 0
- override fun todo() {
- val mList = mFMInterface.mDefaultCtl.getFreqsList()
- for (i in mList) {
- if (mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(i), false))
- mFavList += i
- }
- if (!mFMPower) mUpdateEnableDisable(false)
- loading.hide()
- }
- }
- )
- mFreqSearchDone = true
- } else {
- val mNewFreq = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_FREQ)
- mFMFreq.text = mCleanFormat.format(mNewFreq.toFloat() / 1000)
- }
- // Update track list and fav button
- return mRootView
- }
-
- /**
- * Extension function for [View], for Grayed out, disabled View
- * @param mTextView Whether the target view is touchable [FloatingActionButton] or
- * [MaterialTextView] with useless touch attr
- */
- private fun View.disable(mTextView: Boolean = false) {
- alpha = .7f
- if (!mTextView) isEnabled = false
- }
-
- /**
- * Extension function for [View], for reverting Grayed out, disabled View
- * @param mTextView Whether the target view is touchable [FloatingActionButton] or
- * [MaterialTextView] with useless touch attr
- */
- private fun View.enable(mTextView: Boolean = false) {
- alpha = 1.0f
- if (!mTextView) isEnabled = true
- }
-
- /**
- * Uses array of [R] to make the [View] look disabled or enabled
- * @param mEnabled Should we enable the Views or not
- * @param mView The root view we should find views such as [FloatingActionButton].
- * Defaults to [requireView]
- * @see [enable]
- * @see [disable]
- */
- private fun mUpdateEnableDisable(mEnabled: Boolean, mView: View = requireView()) {
- val mTextViewList = listOf(R.id.fm_freq, R.id.freq_misc)
- val mFloatButtonList = listOf(
- R.id.volume_down,
- R.id.volume_up,
- R.id.before_channel,
- R.id.next_channel,
- R.id.fm_output_btn
- )
- for (i in mTextViewList) {
- if (mEnabled) {
- mView.findViewById(i).enable(true)
- } else {
- mView.findViewById(i).disable(true)
- }
- }
- for (i in mFloatButtonList) {
- if (mEnabled) {
- mView.findViewById(i).enable()
- } else {
- mView.findViewById(i).disable()
- }
- }
- }
-
- private fun updateOutputStatus(mInverted : Boolean) {
- var mCurrent = mSharedPref.getBoolean(SharedPreferencesConst.PREF_AUDIO_OUTPUT, false)
- if (mInverted) mCurrent = !mCurrent
- if (mCurrent) {
- mOutputSwitch.setImageIcon(
- Icon.createWithResource(
- requireContext(),
- R.drawable.ic_volume_up
- )
- )
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_SPEAKER_ROUTE, 1)
- } else {
- mOutputSwitch.setImageIcon(
- Icon.createWithResource(
- requireContext(),
- R.drawable.ic_headphones
- )
- )
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_SPEAKER_ROUTE, 0)
- }
- }
-
- override fun onClick(v: View) {
- when (v.id) {
- mOutputSwitch.id -> {
- val mCurrent = mSharedPref.getBoolean(SharedPreferencesConst.PREF_AUDIO_OUTPUT, false)
- updateOutputStatus(true)
- mSharedPref.edit().putBoolean(SharedPreferencesConst.PREF_AUDIO_OUTPUT, !mCurrent).apply()
- }
- mVolumeUp.id -> {
- var mCurrentVolume = mSharedPref.getInt(SharedPreferencesConst.PREF_VOLUME, 8)
- if (mCurrentVolume < 15) {
- mCurrentVolume = mCurrentVolume + 1
- }
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_VOLUME, mCurrentVolume)
- mSeekBar.progress = mCurrentVolume
- Toast.makeText(requireContext(), "Volume set to $mCurrentVolume", Toast.LENGTH_SHORT).show()
- mSharedPref.edit().putInt(SharedPreferencesConst.PREF_VOLUME, mCurrentVolume).apply()
- }
- mVolumeDown.id -> {
- var mCurrentVolume = mSharedPref.getInt(SharedPreferencesConst.PREF_VOLUME, 8)
- if (mCurrentVolume > 0) {
- mCurrentVolume = mCurrentVolume - 1
- }
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_VOLUME, mCurrentVolume)
- mSeekBar.progress = mCurrentVolume
- Toast.makeText(requireContext(), "Volume set to $mCurrentVolume", Toast.LENGTH_SHORT).show()
- mSharedPref.edit().putInt(SharedPreferencesConst.PREF_VOLUME, mCurrentVolume).apply()
- }
- mBeforeChannelBtn.id -> {
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_MUTE, 1)
- val mNewFreq = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_BEFORE_CHANNEL)
- mFMFreq.text = mCleanFormat.format(mNewFreq.toFloat() / 1000)
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_MUTE, 0)
- if (mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(mNewFreq), false)) {
- mFavButton.setImageDrawable(mStarFilled)
- }
- mSharedPref.edit().putInt(SharedPreferencesConst.PREF_FREQ, mNewFreq).apply()
- }
- mPowerBtn.id -> {
- if (mFMPower) {
- mAudioManager.setParameters(PowerState.FM_POWER_OFF.mAudioParam)
- mFMFreq.text = getText(R.string.inital_freq)
- } else {
- mAudioManager.setParameters(PowerState.FM_POWER_ON.mAudioParam)
- mFMFreq.text = mCleanFormat.format(mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_FREQ).toFloat() / 1000)
- }
- mUpdateEnableDisable(!mFMPower)
- mFMPower = !mFMPower
- }
- mNextChannelBtn.id -> {
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_MUTE, 1)
- val mNewFreq = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_NEXT_CHANNEL)
- mFMFreq.text = mCleanFormat.format(mNewFreq.toFloat() / 1000)
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_MUTE, 0)
- if (mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(mNewFreq), false)) {
- mFavButton.setImageDrawable(mStarFilled)
- }
- mSharedPref.edit().putInt(SharedPreferencesConst.PREF_FREQ, mNewFreq).apply()
- }
- mFavButton.id -> {
- val mCurrFreq = mFMInterface.mDefaultCtl.getValue(GetType.GET_TYPE_FM_FREQ)
- val mCurr = mSharedPref.getBoolean(SharedPreferencesConst.assembleFavFreq(mCurrFreq), false)
- if (mCurr) { mFavButton.setImageDrawable(mStar) } else { mFavButton.setImageDrawable(mStarFilled) }
- mSharedPref.edit().putBoolean(SharedPreferencesConst.assembleFavFreq(mCurrFreq), !mCurr).apply()
- }
- }
- }
-
- override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
- mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_VOLUME, p1)
- mSharedPref.edit().putInt("volume", p1).apply()
- }
- override fun onStartTrackingTouch(p0: SeekBar?) {}
- override fun onStopTrackingTouch(p0: SeekBar?) {}
-
- companion object {
- var mFMPower = false
- var mFreqSearchDone = false
- var mHeadSetPlugged: HeadsetState = HeadsetState.HEADSET_STATE_DISCONNECTED
- }
-
- /**
- * Helper function to remove zero values on a [IntArray].
- * Since we don't know the channel count, we initialize it with size 30.
- * But most likely the channel count is less then 30, so remaining values
- * are filled with zero.
- *
- * @param array The target Long array
- * @return Long array with zeros removed
- */
- private fun removeZeros(array: IntArray): IntArray {
- val mArray: MutableList = mutableListOf()
- Log.d("removeZeros: Got array size ${array.size}")
- for (i in array.indices) {
- if (array[i] > 0L) {
- mArray.add(array[i])
- }
- }
- return mArray.toIntArray()
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/IWaitUntil.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/IWaitUntil.kt
deleted file mode 100644
index 7446b39..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/IWaitUntil.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.eurekateam.fmradio.utils
-
-interface IWaitUntil {
- fun cond(): Boolean
- fun todo()
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/Log.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/Log.kt
deleted file mode 100644
index b9d04fb..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/Log.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.eurekateam.fmradio.utils
-
-import android.util.Log
-
-/**
- * Created by willi on 22.03.18.
- */
-object Log {
- private const val TAG = "FMRadio_slsi"
- fun i(message: String) {
- Log.i(TAG, getMessage(message))
- }
-
- fun e(message: String) {
- Log.e(TAG, getMessage(message))
- }
-
- fun d(message: String) {
- Log.d(TAG, getMessage(message))
- }
- private fun getMessage(message: String): String {
- val element = Thread.currentThread().stackTrace[4]
- val className = element.className
- return String.format(
- "[%s][%s] %s",
- className.substring(className.lastIndexOf(".") + 1),
- element.methodName,
- message
- )
- }
-
- fun w(message: String) {
- Log.w(TAG, getMessage(message))
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/MaterialHelper.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/MaterialHelper.kt
deleted file mode 100644
index 6e67a6a..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/MaterialHelper.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.eurekateam.fmradio.utils
-
-import android.content.Context
-import android.content.res.Configuration
-
-class MaterialHelper (private val mContext : Context, private val mOnLight : Int, private val mOnDark : Int)
-{
- private constructor(builder: Builder) : this(builder.context, builder.light, builder.dark)
-
- class Builder {
- lateinit var context: Context
- var light = 0
- var dark = 0
-
- fun build() = MaterialHelper(this)
- }
-
- companion object {
- inline fun build(block: Builder.() -> Unit) = Builder().apply(block).build()
- }
-
- fun getValue() : Int =
- when (mContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
- Configuration.UI_MODE_NIGHT_YES -> mContext.resources.getColor(mOnLight, mContext.theme)
- Configuration.UI_MODE_NIGHT_NO -> mContext.resources.getColor(mOnDark, mContext.theme)
- Configuration.UI_MODE_NIGHT_UNDEFINED -> mContext.resources.getColor(mOnLight, mContext.theme)
- else -> 0
- }
-}
diff --git a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/WaitUntil.kt b/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/WaitUntil.kt
deleted file mode 100644
index 276672b..0000000
--- a/universal7885-common/apps/FMRadio/src/com/eurekateam/fmradio/utils/WaitUntil.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.eurekateam.fmradio.utils
-
-import android.app.Activity
-
-import java.util.Timer
-import java.util.TimerTask
-
-object WaitUntil {
- fun setTimer(act: Activity, todo: IWaitUntil, initdelay: Long = 5000, delay: Long = 500) {
- Timer().schedule(
- object : TimerTask() {
- override fun run() {
- act.runOnUiThread({
- if (todo.cond()) {
- todo.todo()
- cancel()
- }
- })
- }
- },
- initdelay, delay
- )
- }
-}
diff --git a/universal7885-common/apps/aidl-support/Android.bp b/universal7885-common/apps/aidl-support/Android.bp
deleted file mode 100644
index 85a2008..0000000
--- a/universal7885-common/apps/aidl-support/Android.bp
+++ /dev/null
@@ -1,5 +0,0 @@
-cc_library_headers {
- name: "logformat",
- local_include_dirs: ["include"],
- export_include_dirs: ["include"],
-}
diff --git a/universal7885-common/apps/aidl-support/LICENSE b/universal7885-common/apps/aidl-support/LICENSE
deleted file mode 100644
index 00ac597..0000000
--- a/universal7885-common/apps/aidl-support/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
diff --git a/universal7885-common/apps/aidl-support/audio_route/Android.bp b/universal7885-common/apps/aidl-support/audio_route/Android.bp
deleted file mode 100644
index ab8c5d2..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/Android.bp
+++ /dev/null
@@ -1,18 +0,0 @@
-aidl_interface {
- name: "vendor.eureka.hardware.audio_route",
- srcs: ["vendor/eureka/hardware/audio_route/*.aidl"],
- stability: "vintf",
- owner: "Eureka Team",
- backend: {
- ndk: {
- enabled: true,
- },
- },
- versions_with_info: [
- {
- version: "1",
- imports: [],
- },
- ],
-
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/.hash b/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/.hash
deleted file mode 100644
index 437b0fc..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-97491c5753e9408d4a75687169e7b791ec19a907
diff --git a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/vendor/eureka/hardware/audio_route/IAudioRoute.aidl b/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
deleted file mode 100644
index 98baa61..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/1/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.audio_route;
-@VintfStability
-interface IAudioRoute {
- oneway void setParam(String param);
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/current/vendor/eureka/hardware/audio_route/IAudioRoute.aidl b/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/current/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
deleted file mode 100644
index 98baa61..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/aidl_api/vendor.eureka.hardware.audio_route/current/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.audio_route;
-@VintfStability
-interface IAudioRoute {
- oneway void setParam(String param);
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/Android.bp b/universal7885-common/apps/aidl-support/audio_route/default/Android.bp
deleted file mode 100644
index 7cc8edc..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/Android.bp
+++ /dev/null
@@ -1,22 +0,0 @@
-cc_binary {
- name: "vendor.eureka.hardware.audio_route-service",
- srcs: [
- "AudioRoute.cpp",
- "service.cpp",
- ],
- shared_libs: [
- "libbase",
- "libbinder_ndk",
- "liblog",
- "libutils",
- "audioflinger-aidl-cpp",
- "libaudiofoundation",
- "libaudioutils",
- "libaudioclient",
- "libaudiomanager",
- "vendor.eureka.hardware.audio_route-V1-ndk",
- ],
- header_libs: ["libaudioclient_headers"],
- init_rc: ["vendor.eureka.hardware.audio_route-service.rc"],
- vintf_fragments: ["vendor.eureka.hardware.audio_route.xml"],
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.cpp b/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.cpp
deleted file mode 100644
index 2b2c47f..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2021 Soo Hwan Na "Royna"
- *
- * 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.
- */
-
-#include
-#include
-
-#include "AudioRoute.h"
-
-#define IOHANDLE 13
-
-using namespace android;
-
-namespace aidl::vendor::eureka::hardware::audio_route {
-
-ndk::ScopedAStatus AudioRoute::setParam(const std::string& param) {
- const sp &af = AudioSystem::get_audio_flinger();
- if (af == 0)
- return ndk::ScopedAStatus::fromExceptionCode(EX_SECURITY);
- af->setParameters(IOHANDLE, String8(param.c_str()));
- return ndk::ScopedAStatus::ok();;
-}
-
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.h b/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.h
deleted file mode 100644
index 3425442..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/AudioRoute.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#pragma once
-
-#include
-
-namespace aidl::vendor::eureka::hardware::audio_route {
-
-struct AudioRoute : public BnAudioRoute {
- public:
- AudioRoute() = default;
- // Methods from aidl::vendor::eureka::hardware::fmradio::IFMRadio follow.
- ::ndk::ScopedAStatus setParam(const std::string& param) override;
-};
-} // namespace aidl::vendor::eureka::hardware::fmradio
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/service.cpp b/universal7885-common/apps/aidl-support/audio_route/default/service.cpp
deleted file mode 100644
index 4f7b494..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/service.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#include
-#include
-#include
-
-#include "AudioRoute.h"
-
-using ::aidl::vendor::eureka::hardware::audio_route::AudioRoute;
-
-int main() {
- ABinderProcess_setThreadPoolMaxThreadCount(3);
-
- auto service = ndk::SharedRefBase::make();
- const std::string instance = std::string() + AudioRoute::descriptor + "/default";
- binder_status_t status =
- AServiceManager_addService(service->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
- LOG(INFO) << "Register done";
-
- ABinderProcess_joinThreadPool();
- return -1; // should never get here
-}
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route-service.rc b/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route-service.rc
deleted file mode 100644
index e1cfdd5..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route-service.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service audioroute-hal-aidl /system/bin/vendor.eureka.hardware.audio_route-service
- class hal
- user audioserver
- group audio
diff --git a/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route.xml b/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route.xml
deleted file mode 100644
index d3edc6b..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/default/vendor.eureka.hardware.audio_route.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- vendor.eureka.hardware.audio_route
- IAudioRoute/default
-
-
diff --git a/universal7885-common/apps/aidl-support/audio_route/vendor/eureka/hardware/audio_route/IAudioRoute.aidl b/universal7885-common/apps/aidl-support/audio_route/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
deleted file mode 100644
index da0e2bc..0000000
--- a/universal7885-common/apps/aidl-support/audio_route/vendor/eureka/hardware/audio_route/IAudioRoute.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.audio_route;
-
-@VintfStability
-interface IAudioRoute {
- oneway void setParam(String param);
-}
diff --git a/universal7885-common/apps/aidl-support/fm/Android.bp b/universal7885-common/apps/aidl-support/fm/Android.bp
deleted file mode 100644
index 2f7fba3..0000000
--- a/universal7885-common/apps/aidl-support/fm/Android.bp
+++ /dev/null
@@ -1,30 +0,0 @@
-aidl_interface {
- name: "vendor.eureka.hardware.fmradio",
- srcs: ["vendor/eureka/hardware/fmradio/*.aidl"],
- stability: "vintf",
- owner: "Eureka Team",
- backend: {
- ndk: {
- enabled: true,
- },
- java: {
- platform_apis: true,
- },
- },
- versions_with_info: [
- {
- version: "1",
- imports: [],
- },
- {
- version: "2",
- imports: [],
- },
- {
- version: "3",
- imports: [],
- },
-
- ],
-
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/.hash b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/.hash
deleted file mode 100644
index 3669d1e..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-953afbf98105208eed602421a0cb5c39f5e7b69e
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/GetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/GetType.aidl
deleted file mode 100644
index 4bbb328..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/GetType.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-@Backing(type="int")
-@VintfStability
-enum GetType {
- GET_TYPE_FM_FREQ,
- GET_TYPE_FM_UPPER_LIMIT,
- GET_TYPE_FM_LOWER_LIMIT,
- GET_TYPE_FM_RMSSI,
- GET_TYPE_FM_BEFORE_CHANNEL,
- GET_TYPE_FM_NEXT_CHANNEL,
- GET_TYPE_FM_SYSFS_IF,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/IFMDevControl.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
deleted file mode 100644
index 02f095e..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-import vendor.eureka.hardware.fmradio.GetType;
-import vendor.eureka.hardware.fmradio.SetType;
-
-@VintfStability
-interface IFMDevControl {
- oneway void open();
-
- int getValue(in GetType type);
-
- oneway void setValue(in SetType type, int value);
-
- int[] getFreqsList();
-
- oneway void close();
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/SetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/SetType.aidl
deleted file mode 100644
index b1c9d21..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/1/vendor/eureka/hardware/fmradio/SetType.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-@Backing(type="int")
-@VintfStability
-enum SetType {
- SET_TYPE_FM_FREQ,
- SET_TYPE_FM_MUTE,
- SET_TYPE_FM_VOLUME,
- SET_TYPE_FM_THREAD,
- SET_TYPE_FM_RMSSI,
- SET_TYPE_FM_SEARCH_CANCEL,
- SET_TYPE_FM_SPEAKER_ROUTE,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/.hash b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/.hash
deleted file mode 100644
index 036d70f..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/.hash
+++ /dev/null
@@ -1 +0,0 @@
-17bd5198400558a4e2c50e492ac1c3a3f290a577
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/GetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/GetType.aidl
deleted file mode 100644
index 4c5e36e..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/GetType.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum GetType {
- GET_TYPE_FM_FREQ = 0,
- GET_TYPE_FM_UPPER_LIMIT = 1,
- GET_TYPE_FM_LOWER_LIMIT = 2,
- GET_TYPE_FM_RMSSI = 3,
- GET_TYPE_FM_BEFORE_CHANNEL = 4,
- GET_TYPE_FM_NEXT_CHANNEL = 5,
- GET_TYPE_FM_SYSFS_IF = 6,
- GET_TYPE_FM_MUTEX_LOCKED = 7,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/IFMDevControl.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
deleted file mode 100644
index 1737a0b..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@VintfStability
-interface IFMDevControl {
- oneway void open();
- int getValue(in vendor.eureka.hardware.fmradio.GetType type);
- oneway void setValue(in vendor.eureka.hardware.fmradio.SetType type, int value);
- int[] getFreqsList();
- oneway void close();
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/SetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/SetType.aidl
deleted file mode 100644
index 9747a55..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/2/vendor/eureka/hardware/fmradio/SetType.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum SetType {
- SET_TYPE_FM_FREQ = 0,
- SET_TYPE_FM_MUTE = 1,
- SET_TYPE_FM_VOLUME = 2,
- SET_TYPE_FM_THREAD = 3,
- SET_TYPE_FM_RMSSI = 4,
- SET_TYPE_FM_SEARCH_CANCEL = 5,
- SET_TYPE_FM_SPEAKER_ROUTE = 6,
- SET_TYPE_FM_SEARCH_START = 7,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/.hash b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/.hash
deleted file mode 100644
index ce2b7e4..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/.hash
+++ /dev/null
@@ -1 +0,0 @@
-d3dc9e5312012521e5a2324d3182f795648817ec
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/GetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/GetType.aidl
deleted file mode 100644
index 4c5e36e..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/GetType.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum GetType {
- GET_TYPE_FM_FREQ = 0,
- GET_TYPE_FM_UPPER_LIMIT = 1,
- GET_TYPE_FM_LOWER_LIMIT = 2,
- GET_TYPE_FM_RMSSI = 3,
- GET_TYPE_FM_BEFORE_CHANNEL = 4,
- GET_TYPE_FM_NEXT_CHANNEL = 5,
- GET_TYPE_FM_SYSFS_IF = 6,
- GET_TYPE_FM_MUTEX_LOCKED = 7,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/IFMDevControl.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
deleted file mode 100644
index 1737a0b..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@VintfStability
-interface IFMDevControl {
- oneway void open();
- int getValue(in vendor.eureka.hardware.fmradio.GetType type);
- oneway void setValue(in vendor.eureka.hardware.fmradio.SetType type, int value);
- int[] getFreqsList();
- oneway void close();
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/SetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/SetType.aidl
deleted file mode 100644
index 8da5a4a..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/3/vendor/eureka/hardware/fmradio/SetType.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum SetType {
- SET_TYPE_FM_FREQ = 0,
- SET_TYPE_FM_MUTE = 1,
- SET_TYPE_FM_VOLUME = 2,
- SET_TYPE_FM_THREAD = 3,
- SET_TYPE_FM_RMSSI = 4,
- SET_TYPE_FM_SEARCH_CANCEL = 5,
- SET_TYPE_FM_SPEAKER_ROUTE = 6,
- SET_TYPE_FM_SEARCH_START = 7,
- SET_TYPE_FM_APP_PID = 8,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/GetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/GetType.aidl
deleted file mode 100644
index 4c5e36e..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/GetType.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum GetType {
- GET_TYPE_FM_FREQ = 0,
- GET_TYPE_FM_UPPER_LIMIT = 1,
- GET_TYPE_FM_LOWER_LIMIT = 2,
- GET_TYPE_FM_RMSSI = 3,
- GET_TYPE_FM_BEFORE_CHANNEL = 4,
- GET_TYPE_FM_NEXT_CHANNEL = 5,
- GET_TYPE_FM_SYSFS_IF = 6,
- GET_TYPE_FM_MUTEX_LOCKED = 7,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/IFMDevControl.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
deleted file mode 100644
index 1737a0b..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@VintfStability
-interface IFMDevControl {
- oneway void open();
- int getValue(in vendor.eureka.hardware.fmradio.GetType type);
- oneway void setValue(in vendor.eureka.hardware.fmradio.SetType type, int value);
- int[] getFreqsList();
- oneway void close();
-}
diff --git a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/SetType.aidl b/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/SetType.aidl
deleted file mode 100644
index 8da5a4a..0000000
--- a/universal7885-common/apps/aidl-support/fm/aidl_api/vendor.eureka.hardware.fmradio/current/vendor/eureka/hardware/fmradio/SetType.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m -update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package vendor.eureka.hardware.fmradio;
-@Backing(type="int") @VintfStability
-enum SetType {
- SET_TYPE_FM_FREQ = 0,
- SET_TYPE_FM_MUTE = 1,
- SET_TYPE_FM_VOLUME = 2,
- SET_TYPE_FM_THREAD = 3,
- SET_TYPE_FM_RMSSI = 4,
- SET_TYPE_FM_SEARCH_CANCEL = 5,
- SET_TYPE_FM_SPEAKER_ROUTE = 6,
- SET_TYPE_FM_SEARCH_START = 7,
- SET_TYPE_FM_APP_PID = 8,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/default/Android.bp b/universal7885-common/apps/aidl-support/fm/default/Android.bp
deleted file mode 100644
index f93c25d..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/Android.bp
+++ /dev/null
@@ -1,38 +0,0 @@
-cc_defaults {
- name: "fm_aidl_defaults",
- cflags: [
- "-DTRACK_SIZE=30",
- "-DSYSFS_SPACING=3",
- ],
-}
-
-cc_binary {
- name: "vendor.eureka.hardware.fmradio-service",
- srcs: [
- "FMSupport.cpp",
- "FMDevControl.cpp",
- "MiddleState.cpp",
- "service.cpp",
- ],
- defaults: [
- "fm_aidl_defaults",
- ],
- static_libs: ["libfm_slsi-impl"],
- shared_libs: [
- "libbase",
- "libbinder_ndk",
- "liblog",
- "libfileio",
- "vendor.eureka.hardware.fmradio-V3-ndk",
- "vendor.eureka.hardware.audio_route-V1-ndk",
- ],
- header_libs: [
- "libaudioclient_headers",
- "logformat"
- ],
- init_rc: ["vendor.eureka.hardware.fmradio-service.rc"],
- vintf_fragments: ["vendor.eureka.hardware.fmradio.xml"],
- required: [
- "vendor.eureka.hardware.audio_route-service",
- ],
-}
diff --git a/universal7885-common/apps/aidl-support/fm/default/CommonMacro.h b/universal7885-common/apps/aidl-support/fm/default/CommonMacro.h
deleted file mode 100644
index 04e5315..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/CommonMacro.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-#include
-
-#define RETURN_IF_FAILED_LOCK \
- ({ \
- if (!lock.try_lock_for(std::chrono::milliseconds(100))) \
- return ::ndk::ScopedAStatus::fromServiceSpecificError(-ETIME); \
- })
-
-#define NOT_SUPPORTED \
- ({ \
- LOG(ERROR) << __func__ << ": Attempted to invoke unsupported operation"; \
- return ::ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); \
- })
diff --git a/universal7885-common/apps/aidl-support/fm/default/FMDevControl.cpp b/universal7885-common/apps/aidl-support/fm/default/FMDevControl.cpp
deleted file mode 100644
index 8a42f78..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/FMDevControl.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#define LOG_TAG "FMHAL-DevControl"
-
-#include "FMDevControl.h"
-
-#include
-#include
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#include "CommonMacro.h"
-
-#include
-
-namespace aidl::vendor::eureka::hardware::fmradio {
-
-::ndk::ScopedAStatus FMDevControl::open(void) {
- fd = fm_radio_slsi::open_device();
- assert(fd > 0);
- fm_radio_slsi::bootctrl(fd);
- return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FMDevControl::getValue(GetType type, int *_aidl_return) {
- LOG_D("%s: type %d", __func__, type);
- if (type != GetType::GET_TYPE_FM_MUTEX_LOCKED) {
- RETURN_IF_FAILED_LOCK;
- }
- assert(fd > 0);
- switch (type) {
- case GetType::GET_TYPE_FM_FREQ:
- fm_radio_slsi::get_frequency(fd, _aidl_return);
- break;
- case GetType::GET_TYPE_FM_UPPER_LIMIT:
- *_aidl_return = fm_radio_slsi::get_upperband_limit(fd);
- break;
- case GetType::GET_TYPE_FM_LOWER_LIMIT:
- *_aidl_return = fm_radio_slsi::get_lowerband_limit(fd);
- break;
- case GetType::GET_TYPE_FM_RMSSI:
- *_aidl_return = fm_radio_slsi::get_rmssi(fd);
- break;
- case GetType::GET_TYPE_FM_BEFORE_CHANNEL:
- if (index > 0)
- index -= 1;
- if (kMiddleState != nullptr) {
- index = kMiddleState->first;
- delete kMiddleState;
- kMiddleState = nullptr;
- }
- fm_radio_slsi::set_frequency(fd, freqs_list[index]);
- *_aidl_return = freqs_list[index];
- break;
- case GetType::GET_TYPE_FM_NEXT_CHANNEL:
- if (index < freqs_list.size() - 1)
- index += 1;
- if (kMiddleState != nullptr) {
- index = kMiddleState->second;
- delete kMiddleState;
- kMiddleState = nullptr;
- }
- fm_radio_slsi::set_frequency(fd, freqs_list[index]);
- *_aidl_return = freqs_list[index];
- break;
- case GetType::GET_TYPE_FM_SYSFS_IF:
- NOT_SUPPORTED;
- case GetType::GET_TYPE_FM_MUTEX_LOCKED:
- if (lock.try_lock()) {
- *_aidl_return = false;
- lock.unlock();
- } else {
- *_aidl_return = true;
- }
- break;
- default:
- break;
- };
- if (type != GetType::GET_TYPE_FM_MUTEX_LOCKED) {
- lock.unlock();
- }
- LOG_D("%s: returning %d", __func__, *_aidl_return);
-
- return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FMDevControl::setValue(SetType type, int value) {
- using audio_route::IAudioRoute;
-
- LOG_D("%s: type %d, value %d", __func__, type, value);
-
- RETURN_IF_FAILED_LOCK;
- assert(fd > 0);
- switch (type) {
- case SetType::SET_TYPE_FM_FREQ:
- fm_radio_slsi::set_frequency(fd, value);
- if (std::find(freqs_list.begin(), freqs_list.end(), value) ==
- freqs_list.end())
- kMiddleState = saveMiddleState(value, freqs_list);
- break;
- case SetType::SET_TYPE_FM_MUTE:
- fm_radio_slsi::set_mute(fd, value);
- break;
- case SetType::SET_TYPE_FM_VOLUME:
- fm_radio_slsi::set_volume(fd, value);
- break;
- case SetType::SET_TYPE_FM_THREAD:
- fm_radio_slsi::fm_thread_set(fd, value);
- break;
- case SetType::SET_TYPE_FM_RMSSI:
- fm_radio_slsi::set_rssi(fd, value);
- break;
- case SetType::SET_TYPE_FM_SEARCH_CANCEL:
- fm_radio_slsi::stop_search(fd);
- break;
- case SetType::SET_TYPE_FM_SPEAKER_ROUTE: {
- auto svc =
- IAudioRoute::fromBinder(ndk::SpAIBinder(AServiceManager_waitForService(
- "vendor.eureka.hardware.audio_route.IAudioRoute/default")));
- svc->setParam(value ? "routing=2" : "routing=8");
- break;
- }
- case SetType::SET_TYPE_FM_SEARCH_START:
- lock.unlock();
- search_thread = new std::thread([this] {
- const std::lock_guard guard(lock);
- freqs_list = fm_radio_slsi::get_freqs(fd);
- std::sort(freqs_list.begin(), freqs_list.end(), std::less());
- });
- break;
- case SetType::SET_TYPE_FM_APP_PID: {
- client_observe_thread = new std::thread([=] {
- pid_t pid = value;
-
- LOG_D("FM_APP_PID: received value %d", pid);
- while (true) {
- if (kill(pid, 0) < 0 && errno == ESRCH)
- break;
- std::this_thread::sleep_for(std::chrono::seconds(2));
- }
- LOG_W("FM_APP_PID: Starting client death receiver");
- fm_radio_slsi::fm_thread_set(fd, 0);
- close();
- });
- break;
- }
- default:
- break;
- };
- if (type != SetType::SET_TYPE_FM_SEARCH_START)
- lock.unlock();
- return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus
-FMDevControl::getFreqsList(std::vector *_aidl_return) {
- RETURN_IF_FAILED_LOCK;
- *_aidl_return = freqs_list;
- lock.unlock();
- return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FMDevControl::close() {
- if (fd > 0)
- ::close(fd);
- fd = -1;
- return ::ndk::ScopedAStatus::ok();
-}
-} // namespace aidl::vendor::eureka::hardware::fmradio
diff --git a/universal7885-common/apps/aidl-support/fm/default/FMDevControl.h b/universal7885-common/apps/aidl-support/fm/default/FMDevControl.h
deleted file mode 100644
index 8c8a333..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/FMDevControl.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#pragma once
-
-#include
-
-#include
-#include
-
-#include "MiddleState.h"
-
-namespace aidl::vendor::eureka::hardware::fmradio {
-
-struct FMDevControl : public BnFMDevControl {
-public:
- FMDevControl(void) { index = 0; }
- // Methods from aidl::vendor::eureka::hardware::fmradio::IFMRadio follow.
- ::ndk::ScopedAStatus open(void) override;
- ::ndk::ScopedAStatus getValue(GetType type, int *_aidl_return) override;
- ::ndk::ScopedAStatus setValue(SetType type, int value) override;
- ::ndk::ScopedAStatus getFreqsList(std::vector *_aidl_return) override;
- ::ndk::ScopedAStatus close(void) override;
-
-private:
- int fd;
- unsigned int index;
- std::timed_mutex lock;
- std::thread *search_thread, *client_observe_thread;
- std::vector freqs_list;
- middlestate_t *kMiddleState;
-};
-} // namespace aidl::vendor::eureka::hardware::fmradio
diff --git a/universal7885-common/apps/aidl-support/fm/default/FMSupport.cpp b/universal7885-common/apps/aidl-support/fm/default/FMSupport.cpp
deleted file mode 100644
index ed621a4..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/FMSupport.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#include "FMSupport.h"
-
-#include
-
-#include
-#include
-#include
-
-#include
-
-#include "CommonMacro.h"
-
-namespace aidl::vendor::eureka::hardware::fmradio {
-
-#define FM_SYSFS_BASE "/sys/devices/virtual/s610_radio/s610_radio"
-constexpr const char *FM_FREQ_CTL = FM_SYSFS_BASE "/radio_freq_ctrl";
-constexpr const char *FM_FREQ_SEEK = FM_SYSFS_BASE "/radio_freq_seek";
-
-::ndk::ScopedAStatus FMSupport::open(void) { NOT_SUPPORTED; }
-
-::ndk::ScopedAStatus FMSupport::getValue(GetType type, int *_aidl_return) {
- if (type != GetType::GET_TYPE_FM_MUTEX_LOCKED) {
- RETURN_IF_FAILED_LOCK;
- }
- switch (type) {
- case GetType::GET_TYPE_FM_FREQ:
- *_aidl_return = FileIO::readint(FM_FREQ_CTL);
- break;
- case GetType::GET_TYPE_FM_UPPER_LIMIT:
- case GetType::GET_TYPE_FM_LOWER_LIMIT:
- case GetType::GET_TYPE_FM_RMSSI:
- NOT_SUPPORTED;
- case GetType::GET_TYPE_FM_BEFORE_CHANNEL:
- if (index > 0)
- index -= 1;
- if (kMiddleState != nullptr) {
- index = kMiddleState->first;
- delete kMiddleState;
- kMiddleState = nullptr;
- }
- FileIO::writeline(FM_FREQ_CTL, freqs_list[index]);
- *_aidl_return = freqs_list[index];
- break;
- case GetType::GET_TYPE_FM_NEXT_CHANNEL:
- if (index < freqs_list.size() - 1)
- index += 1;
- if (kMiddleState != nullptr) {
- index = kMiddleState->second;
- delete kMiddleState;
- kMiddleState = nullptr;
- }
- FileIO::writeline(FM_FREQ_CTL, freqs_list[index]);
- *_aidl_return = freqs_list[index];
- break;
- case GetType::GET_TYPE_FM_SYSFS_IF:
- *_aidl_return = access(FM_SYSFS_BASE, F_OK);
- break;
- case GetType::GET_TYPE_FM_MUTEX_LOCKED:
- if (lock.try_lock()) {
- *_aidl_return = false;
- lock.unlock();
- } else {
- *_aidl_return = true;
- }
- break;
- default:
- break;
- };
- if (type != GetType::GET_TYPE_FM_MUTEX_LOCKED) {
- lock.unlock();
- }
- return ndk::ScopedAStatus::ok();
-}
-::ndk::ScopedAStatus FMSupport::setValue(SetType type, int value) {
- RETURN_IF_FAILED_LOCK;
- switch (type) {
- case SetType::SET_TYPE_FM_FREQ:
- FileIO::writeline(FM_FREQ_CTL, value);
- if (std::find(freqs_list.begin(), freqs_list.end(), value) ==
- freqs_list.end())
- kMiddleState = saveMiddleState(value, freqs_list);
- break;
- case SetType::SET_TYPE_FM_MUTE:
- case SetType::SET_TYPE_FM_VOLUME:
- case SetType::SET_TYPE_FM_THREAD:
- case SetType::SET_TYPE_FM_RMSSI:
- case SetType::SET_TYPE_FM_SEARCH_CANCEL:
- case SetType::SET_TYPE_FM_SPEAKER_ROUTE:
- case SetType::SET_TYPE_FM_APP_PID:
- NOT_SUPPORTED;
- case SetType::SET_TYPE_FM_SEARCH_START:
- lock.unlock();
- search_thread = new std::thread([this] {
- const std::lock_guard guard(lock);
- for (int i = 0; i < TRACK_SIZE; i++) {
- FileIO::writeline(FM_FREQ_SEEK,
- "1 " + std::to_string(SYSFS_SPACING * 10));
- int freq = FileIO::readint(FM_FREQ_CTL);
- if (std::find(freqs_list.begin(), freqs_list.end(), freq) !=
- freqs_list.end())
- continue;
- freqs_list.push_back(freq);
- }
- std::sort(freqs_list.begin(), freqs_list.end(), std::less());
- });
- break;
- default:
- break;
- };
- if (type != SetType::SET_TYPE_FM_SEARCH_START)
- lock.unlock();
- return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FMSupport::getFreqsList(std::vector *_aidl_return) {
- RETURN_IF_FAILED_LOCK;
- *_aidl_return = freqs_list;
- lock.unlock();
- return ::ndk::ScopedAStatus::ok();
-}
-::ndk::ScopedAStatus FMSupport::close() { NOT_SUPPORTED; }
-} // namespace aidl::vendor::eureka::hardware::fmradio
diff --git a/universal7885-common/apps/aidl-support/fm/default/FMSupport.h b/universal7885-common/apps/aidl-support/fm/default/FMSupport.h
deleted file mode 100644
index 5058487..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/FMSupport.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#pragma once
-
-#include
-
-#include "MiddleState.h"
-#include
-#include
-
-namespace aidl::vendor::eureka::hardware::fmradio {
-
-struct FMSupport : public BnFMDevControl {
-public:
- FMSupport(void) { index = 0; };
- // Methods from aidl::vendor::eureka::hardware::fmradio::IFMRadio follow.
- ::ndk::ScopedAStatus open(void) override;
- ::ndk::ScopedAStatus getValue(GetType type, int *_aidl_return) override;
- ::ndk::ScopedAStatus setValue(SetType type, int value) override;
- ::ndk::ScopedAStatus getFreqsList(std::vector *_aidl_return) override;
- ::ndk::ScopedAStatus close(void) override;
-
-private:
- std::timed_mutex lock;
- std::thread *search_thread;
- std::vector freqs_list;
- unsigned int index;
- middlestate_t *kMiddleState;
-};
-} // namespace aidl::vendor::eureka::hardware::fmradio
diff --git a/universal7885-common/apps/aidl-support/fm/default/MiddleState.cpp b/universal7885-common/apps/aidl-support/fm/default/MiddleState.cpp
deleted file mode 100644
index e5e91ea..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/MiddleState.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "MiddleState.h"
-
-middlestate_t *saveMiddleState(const int value, const std::vector &vec) {
- unsigned int i;
-
- // Bounds checking, we need at least 2 elements on the vector.
- // If it doesn't meet the requirements, return nullptr to keep it
- // as-is.
- if (vec.size() <= 1)
- return nullptr;
-
- for (i = 0; i < vec.size() - 1; i++) {
- const int first = vec[i] - value;
- const int second = vec[i + 1] - value;
- if (first * second < 0)
- break;
- }
-
- return new middlestate_t{i, i + 1};
-}
diff --git a/universal7885-common/apps/aidl-support/fm/default/MiddleState.h b/universal7885-common/apps/aidl-support/fm/default/MiddleState.h
deleted file mode 100644
index 7e57ca5..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/MiddleState.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#include
-
-#pragma once
-
-struct pair {
- unsigned int first;
- unsigned int second;
-};
-
-using middlestate_t = struct pair;
-
-middlestate_t *saveMiddleState(const int value, const std::vector &vec);
diff --git a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Android.bp b/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Android.bp
deleted file mode 100644
index 33c3ce0..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Android.bp
+++ /dev/null
@@ -1,15 +0,0 @@
-cc_library_static {
- name: "libfm_slsi-impl",
- cflags: [
- "-Wno-unused-parameter",
- ],
- srcs: [
- "FMDeviceControl.cpp",
- ],
- shared_libs: ["libbase"],
- export_include_dirs: ["public"],
- defaults: [
- "fm_aidl_defaults"
- ],
- header_libs: ["logformat"],
-}
diff --git a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/FMDeviceControl.cpp b/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/FMDeviceControl.cpp
deleted file mode 100644
index 511bb0c..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/FMDeviceControl.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-#define LOG_TAG "FMHAL-impl-lib"
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include "Radio_S610.h"
-
-namespace fm_radio_slsi {
-
-static std::atomic_bool kShouldRun;
-static std::thread *poll_thread = nullptr;
-
-constexpr const char *FM_DEV_PATH = "/dev/radio0";
-
-#define LOG_IOCTL_ERR(cmd) \
- LOG_E(std::string("Failed to call" cmd "ioctl(), %d (%s)"), errno, strerror(errno))
-
-#define LOG_IOCTL_ERR_ON_COND_NORETURN(cmd, cond) \
-({ \
- if ((cond)) { \
- LOG_IOCTL_ERR(cmd); \
- } \
-})
-
-#define LOG_IOCTL_ERR_ON_COND(cmd, cond) \
-({ \
- if ((cond)) { \
- LOG_IOCTL_ERR(cmd); \
- return; \
- } \
-})
-
-int open_device(void) {
- int fd;
- if ((fd = open(FM_DEV_PATH, O_RDWR | O_CLOEXEC)) < 0) {
- LOG_E("Failed to open %s, %d (%s)", FM_DEV_PATH, errno, strerror(errno));
- return -1;
- }
- LOG_D("Opened %s, fd %d", FM_DEV_PATH, fd);
- return fd;
-}
-
-int get_frequency(const int fd, int *channel) {
- struct v4l2_frequency freq {};
- int ret;
-
- freq.tuner = 0;
- freq.type = V4L2_TUNER_RADIO;
-
- ret = ioctl(fd, VIDIOC_G_FREQUENCY, &freq);
- if (ret < 0) {
- LOG_IOCTL_ERR("VIDIOC_G_FREQUENCY");
- *channel = FM_FAILURE;
- return ret;
- }
-
- *channel = static_cast(freq.frequency) / 16000;
-
- LOG_D("%s: Channel freq: %d", __func__, *channel);
- return ret;
-}
-
-void set_frequency(const int fd, int channel) {
- struct v4l2_frequency freq {};
- int ret;
-
- LOG_D("%s: Channel freq: %d", __func__, channel);
-
- freq.tuner = 0;
- freq.type = V4L2_TUNER_RADIO;
- freq.frequency = (unsigned int)channel * 16000;
-
- ret = ioctl(fd, VIDIOC_S_FREQUENCY, &freq);
-
- LOG_IOCTL_ERR_ON_COND("VIDIOC_S_FREQUENCY", ret < 0);
-}
-
-static int set_control(const int fd, unsigned int id, int val) {
- struct v4l2_control ctrl {};
- int ret;
- ctrl.id = id;
-
- if (val)
- ctrl.value = static_cast(val);
- else
- ctrl.value = 0;
-
- ret = ioctl(fd, VIDIOC_S_CTRL, &ctrl);
-
- LOG_IOCTL_ERR_ON_COND_NORETURN("VIDIOC_S_CTRL", ret < 0);
-
- return ret;
-}
-
-static int seek_frequency(int fd, unsigned int upward, unsigned int wrap_around,
- unsigned int spacing) {
- struct v4l2_hw_freq_seek seek {};
- int ret;
-
- seek.tuner = 0;
- seek.type = V4L2_TUNER_RADIO;
- seek.seek_upward = upward;
- seek.wrap_around = wrap_around;
- seek.spacing = spacing;
-
- ret = ioctl(fd, VIDIOC_S_HW_FREQ_SEEK, &seek);
-
- LOG_IOCTL_ERR_ON_COND_NORETURN("VIDIOC_S_HW_FREQ_SEEK", ret < 0);
-
- return ret;
-}
-
-static void channel_search(const int fd, unsigned int upward,
- unsigned int wrap_around, unsigned int spacing,
- int *channel) {
- int ret;
-
- ret = set_control(fd, V4L2_CID_S610_SEEK_MODE, FM_TUNER_AUTONOMOUS_SEARCH_MODE);
-
- LOG_IOCTL_ERR_ON_COND("V4L2_CID_S610_SEEK_MODE", ret < 0);
-
- ret = seek_frequency(fd, upward, wrap_around, spacing);
- if (ret < 0) return;
-
- ret = get_frequency(fd, channel);
- if (ret < 0) return;
-}
-
-/*
-int next_channel(const int fd) {
- int ret;
- channel_search(fd, 1, 0, FM_CHANNEL_SPACING_100KHZ, &ret);
- return ret;
-}
-int before_channel(const int fd) {
- int ret;
- channel_search(fd, 0, 0, FM_CHANNEL_SPACING_100KHZ, &ret);
- return ret;
-}
-*/
-
-void set_mute(const int fd, bool mute) {
- int ret = set_control(fd, V4L2_CID_AUDIO_MUTE, !mute);
- LOG_IOCTL_ERR_ON_COND("V4L2_CID_AUDIO_MUTE", ret < 0);
-}
-
-void set_volume(int fd, int volume /* 1 ~ 15 */) {
- int ret = set_control(fd, V4L2_CID_AUDIO_VOLUME, volume);
- LOG_IOCTL_ERR_ON_COND("V4L2_CID_AUDIO_VOLUME", ret < 0);
-}
-
-std::vector get_freqs(const int fd) {
- set_mute(fd, true);
-
- auto map = std::vector();
- for (int i = 0; i < TRACK_SIZE; i++) {
- int found = 0;
- channel_search(fd, 1, 0, FM_CHANNEL_SPACING_50KHZ, &found);
- for (auto k : map) {
- if (k == found) continue;
- }
- map.push_back(found);
- }
-
- set_mute(fd, false);
- return map;
-}
-
-static int fm_poll(int fd, struct pollfd *poll_fd) {
- int ret;
-
- poll_fd->fd = fd;
- poll_fd->events = POLLIN;
- poll_fd->revents = 0;
-
- ret = poll(poll_fd, 1, 360);
- if (ret > 0) {
- if (poll_fd->revents & POLLIN) {
- return FM_SUCCESS;
- }
- } else if (ret < 0) {
- return FM_FAILURE - 1;
- }
- return FM_FAILURE;
-}
-
-static int fm_read(int fd, unsigned char *buf) {
- int ret;
-
- ret = read(fd, buf, FM_RADIO_RDS_DATA_MAX);
-
- if (ret < 0) {
- return FM_FAILURE;
- }
-
- return ret;
-}
-
-static void fm_thread(int fd) {
- struct pollfd radio_poll {};
- unsigned char read_buf[FM_RADIO_RDS_DATA_MAX];
- int ret;
-
- while (kShouldRun.load()) {
- ret = fm_poll(fd, &radio_poll);
- if (ret < 0) {
- if (ret < FM_FAILURE)
- break;
- else
- continue;
- }
-
- ret = fm_read(fd, read_buf);
- if (ret < 0) break;
- }
-}
-
-void fm_thread_set(const int fd, const bool enable) {
- kShouldRun.store(enable);
- if (enable) {
- poll_thread = new std::thread(fm_thread, fd);
- } else {
- poll_thread = nullptr;
- }
-}
-
-unsigned int get_upperband_limit(int fd) {
- int ret;
- struct v4l2_tuner tuner {};
- unsigned int freq;
- tuner.index = 0;
- ret = ioctl(fd, VIDIOC_G_TUNER, &tuner);
- if (ret < 0) {
- LOG_IOCTL_ERR("VIDIOC_G_TUNER");
- return FM_FAILURE;
- } else {
- freq = (tuner.rangehigh / 16000);
- return freq;
- }
-}
-
-unsigned int get_lowerband_limit(int fd) {
- int ret;
- unsigned int freq;
- struct v4l2_tuner tuner {};
-
- tuner.index = 0;
- ret = ioctl(fd, VIDIOC_G_TUNER, &tuner);
- if (ret < 0) {
- LOG_IOCTL_ERR("VIDIOC_G_TUNER");
- return FM_FAILURE;
- } else {
- freq = (tuner.rangelow / 16000);
- return freq;
- }
-}
-
-int get_rmssi(int fd) {
- struct v4l2_tuner tuner {};
- int ret;
- tuner.index = 0;
- tuner.signal = 0;
- ret = ioctl(fd, VIDIOC_G_TUNER, &tuner);
- if (ret < 0) {
- LOG_IOCTL_ERR("VIDIOC_G_TUNER");
- ret = FM_FAILURE;
- } else {
- ret = tuner.signal;
- }
- return ret;
-}
-
-void set_rssi(int fd, int rssi) {
- int ret = set_control(fd, V4L2_CID_S610_RSSI_TH, rssi);
- LOG_IOCTL_ERR_ON_COND("V4L2_CID_S610_RSSI_TH", ret < 0);
-}
-
-void bootctrl(const int fd) {
- set_control(fd, V4L2_CID_S610_IF_COUNT1, 4800); // SetIFCount 1
- set_control(fd, V4L2_CID_S610_IF_COUNT2, 5600); // SetIFCount 2
- set_control(fd, V4L2_CID_S610_SOFT_STEREO_BLEND,
- 3172); // Set Soft Stereo Blend
- set_control(fd, V4L2_CID_S610_SOFT_MUTE_COEFF,
- 16); // SetSoftMuteCoeff
- set_control(fd, V4L2_CID_S610_CH_BAND,
- S610_BAND_FM); // Set Band (To FM)
- set_control(fd, V4L2_CID_S610_CH_SPACING,
- FM_CHANNEL_SPACING_50KHZ); // Spacing 5kHz
- set_control(fd, V4L2_CID_S610_RDS_ON, FM_RDS_ENABLE); // RDS on
-}
-
-void stop_search(const int fd) {
- set_control(fd, V4L2_CID_S610_SEEK_CANCEL, 1);
-}
-
-} // namespace fm_radio_slsi
diff --git a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Radio_S610.h b/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Radio_S610.h
deleted file mode 100644
index a5bb850..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/Radio_S610.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#define FM_FAILURE (-1)
-#define FM_SUCCESS 0
-
-#define V4L2_CID_USER_S610_BASE (0x00980900 + 0x1070)
-enum s610_ctrl_id {
- V4L2_CID_S610_CH_SPACING = (V4L2_CID_USER_S610_BASE + 0x01),
- V4L2_CID_S610_CH_BAND = (V4L2_CID_USER_S610_BASE + 0x02),
- V4L2_CID_S610_SOFT_STEREO_BLEND = (V4L2_CID_USER_S610_BASE + 0x03),
- V4L2_CID_S610_SOFT_STEREO_BLEND_COEFF = (V4L2_CID_USER_S610_BASE + 0x04),
- V4L2_CID_S610_SOFT_MUTE_COEFF = (V4L2_CID_USER_S610_BASE + 0x5),
- V4L2_CID_S610_RSSI_CURR = (V4L2_CID_USER_S610_BASE + 0x06),
- V4L2_CID_S610_SNR_CURR = (V4L2_CID_USER_S610_BASE + 0x07),
- V4L2_CID_S610_SEEK_CANCEL = (V4L2_CID_USER_S610_BASE + 0x08),
- V4L2_CID_S610_SEEK_MODE = (V4L2_CID_USER_S610_BASE + 0x09),
- V4L2_CID_S610_RDS_ON = (V4L2_CID_USER_S610_BASE + 0x0A),
- V4L2_CID_S610_IF_COUNT1 = (V4L2_CID_USER_S610_BASE + 0x0B),
- V4L2_CID_S610_IF_COUNT2 = (V4L2_CID_USER_S610_BASE + 0x0C),
- V4L2_CID_S610_RSSI_TH = (V4L2_CID_USER_S610_BASE + 0x0D),
- V4L2_CID_S610_KERNEL_VER = (V4L2_CID_USER_S610_BASE + 0x0E),
- V4L2_CID_S610_SOFT_STEREO_BLEND_REF = (V4L2_CID_USER_S610_BASE + 0x0F),
- V4L2_CID_S610_REG_RW_ADDR = (V4L2_CID_USER_S610_BASE + 0x10),
- V4L2_CID_S610_REG_RW = (V4L2_CID_USER_S610_BASE + 0x11),
-};
-
-/* Tunner modes */
-enum fm_tuner_mode {
- FM_TUNER_STOP_SEARCH_MODE = 0,
- FM_TUNER_PRESET_MODE = 1,
- FM_TUNER_AUTONOMOUS_SEARCH_MODE = 2,
- FM_TUNER_AUTONOMOUS_SEARCH_MODE_NEXT = 10
-};
-
-/* channel spacing */
-enum fm_channel_spacing {
- FM_CHANNEL_SPACING_50KHZ = 1,
- FM_CHANNEL_SPACING_100KHZ = 2,
- FM_CHANNEL_SPACING_200KHZ = 4
-};
-
-/* Mute modes */
-enum fm_mute_mode { FM_MUTE_ON = 0, FM_MUTE_OFF = 1, FM_MUTE_ATTENUATE = 2 };
-
-/* FM RDS modes */
-enum fm_rds_mode { FM_RDS_DISABLE = 0, FM_RDS_ENABLE = 1 };
-
-#define FM_RADIO_RDS_DATA_MAX 48
-
-enum s610_freq_bands {
- S610_BAND_FM = 0,
- S610_BAND_AM = 1,
-};
-
-enum s610_aud_mode {
- S610_AUD_ENABLE = 1,
- S610_AUD_DISABLE = 0,
-};
diff --git a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/public/fm_slsi-impl.h b/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/public/fm_slsi-impl.h
deleted file mode 100644
index a96848b..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/libfm_slsi-impl/public/fm_slsi-impl.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-#include
-
-namespace fm_radio_slsi {
-
-int open_device(void);
-int get_frequency(const int fd, int *channel);
-void set_frequency(const int fd, int channel);
-//int next_channel(const int fd);
-//int before_channel(const int fd);
-void set_mute(const int fd, bool mute);
-void set_volume(int fd, int volume);
-std::vector get_freqs(const int fd);
-void fm_thread_set(const int fd, const bool enable);
-unsigned int get_upperband_limit(int fd);
-unsigned int get_lowerband_limit(int fd);
-int get_rmssi(int fd);
-void set_rssi(int fd, int rssi);
-void bootctrl(const int fd);
-void stop_search(const int fd);
-
-} // namespace fm_radio_slsi
diff --git a/universal7885-common/apps/aidl-support/fm/default/service.cpp b/universal7885-common/apps/aidl-support/fm/default/service.cpp
deleted file mode 100644
index 9cc20ff..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/service.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2021 Eureka Team
-//
-// 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.
-
-#include
-#include
-#include
-
-#include "FMDevControl.h"
-#include "FMSupport.h"
-
-using ::aidl::vendor::eureka::hardware::fmradio::FMDevControl;
-using ::aidl::vendor::eureka::hardware::fmradio::FMSupport;
-
-template
-static void registerAsService(std::shared_ptr service, const char *inst) {
- const std::string instance = std::string() + C::descriptor + "/" + inst;
- binder_status_t status =
- AServiceManager_addService(service->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
- LOG(INFO) << "Register done for instance " << inst;
-}
-
-int main() {
- ABinderProcess_setThreadPoolMaxThreadCount(8);
-
- registerAsService(ndk::SharedRefBase::make(), "support");
- registerAsService(ndk::SharedRefBase::make(), "default");
-
- ABinderProcess_joinThreadPool();
- return -1; // should never get here
-}
diff --git a/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio-service.rc b/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio-service.rc
deleted file mode 100644
index f3d3c1f..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio-service.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service fm-hal-aidl /system/bin/vendor.eureka.hardware.fmradio-service
- class hal
- user root
- group root
diff --git a/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio.xml b/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio.xml
deleted file mode 100644
index f2e5c17..0000000
--- a/universal7885-common/apps/aidl-support/fm/default/vendor.eureka.hardware.fmradio.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- vendor.eureka.hardware.fmradio
- IFMDevControl/support
- IFMDevControl/default
-
-
diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/GetType.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/GetType.aidl
deleted file mode 100644
index 2b9c564..0000000
--- a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/GetType.aidl
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-@Backing(type="int")
-@VintfStability
-enum GetType {
- GET_TYPE_FM_FREQ,
- GET_TYPE_FM_UPPER_LIMIT,
- GET_TYPE_FM_LOWER_LIMIT,
- GET_TYPE_FM_RMSSI,
- GET_TYPE_FM_BEFORE_CHANNEL,
- GET_TYPE_FM_NEXT_CHANNEL,
- GET_TYPE_FM_SYSFS_IF,
- GET_TYPE_FM_MUTEX_LOCKED,
-}
diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMDevControl.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
deleted file mode 100644
index 02f095e..0000000
--- a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMDevControl.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-import vendor.eureka.hardware.fmradio.GetType;
-import vendor.eureka.hardware.fmradio.SetType;
-
-@VintfStability
-interface IFMDevControl {
- oneway void open();
-
- int getValue(in GetType type);
-
- oneway void setValue(in SetType type, int value);
-
- int[] getFreqsList();
-
- oneway void close();
-}
diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/SetType.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/SetType.aidl
deleted file mode 100644
index c37c74c..0000000
--- a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/SetType.aidl
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2022 Eureka Team
-//
-// 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.
-
-package vendor.eureka.hardware.fmradio;
-
-@Backing(type="int")
-@VintfStability
-enum SetType {
- SET_TYPE_FM_FREQ,
- SET_TYPE_FM_MUTE,
- SET_TYPE_FM_VOLUME,
- SET_TYPE_FM_THREAD,
- SET_TYPE_FM_RMSSI,
- SET_TYPE_FM_SEARCH_CANCEL,
- SET_TYPE_FM_SPEAKER_ROUTE,
- SET_TYPE_FM_SEARCH_START,
- SET_TYPE_FM_APP_PID,
-}
diff --git a/universal7885-common/apps/aidl-support/include/LogFormat.h b/universal7885-common/apps/aidl-support/include/LogFormat.h
deleted file mode 100644
index 13b3257..0000000
--- a/universal7885-common/apps/aidl-support/include/LogFormat.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#include
-#include
-
-#ifdef LOG_TAG
-
-#include
-#include
-
-#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
-
-#define make_str(a, ...) _make_str(__FILENAME__, __LINE__, a, ##__VA_ARGS__).c_str()
-
-// Helpers to avoid -Wformat-security
-#define LOG_E(fmt, ...) ALOGE("%s", make_str(fmt, ##__VA_ARGS__))
-#define LOG_W(fmt, ...) ALOGW("%s", make_str(fmt, ##__VA_ARGS__))
-#define LOG_I(fmt, ...) ALOGI("%s", make_str(fmt, ##__VA_ARGS__))
-#define LOG_D(fmt, ...) ALOGD("%s", make_str(fmt, ##__VA_ARGS__))
-#define LOG_V(fmt, ...) ALOGV("%s", make_str(fmt, ##__VA_ARGS__))
-
-template
-std::string _make_str(const std::string& filename, int line, const std::string& fmt, Args... args) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-security"
- const int size = std::snprintf(nullptr, 0, fmt.c_str(), args...);
- std::vector buf(size + 1);
- std::snprintf(buf.data(), buf.size(), fmt.c_str(), args...);
-#pragma clang diagnostic pop
- std::stringstream ss;
- ss << "[" << filename << ":" << line << "] " << std::string(buf.begin(), buf.end());
- return ss.str();
-}
-
-#ifndef __NEED_VERBOSE_LOG__
-
-#undef LOG_I
-#undef LOG_D
-#undef LOG_V
-
-#define LOG_I(...) do {} while(0)
-#define LOG_D(...) do {} while(0)
-#define LOG_V(...) do {} while(0)
-
-#endif
-
-#else
-
-#warning LOG_TAG is not defined, disabling logging.
-
-#define LOG_E(...) do {} while(0)
-#define LOG_W(...) do {} while(0)
-#define LOG_I(...) do {} while(0)
-#define LOG_D(...) do {} while(0)
-#define LOG_V(...) do {} while(0)
-
-#endif
diff --git a/universal7885-common/apps/aidl-support/libfileio/Android.bp b/universal7885-common/apps/aidl-support/libfileio/Android.bp
deleted file mode 100644
index 5a2be10..0000000
--- a/universal7885-common/apps/aidl-support/libfileio/Android.bp
+++ /dev/null
@@ -1,10 +0,0 @@
-cc_library_shared {
- name: "libfileio",
- srcs: ["FileIO.cpp"],
- cppflags: ["-fexceptions"],
- local_include_dirs: ["include"],
- export_include_dirs: ["include"],
- shared_libs: ["liblog"],
- header_libs: ["logformat"],
-}
-
diff --git a/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp b/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp
deleted file mode 100644
index 4132db5..0000000
--- a/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#define LOG_TAG "libFileIO"
-
-#include
-#include
-
-#include
-
-namespace FileIO {
-
-constexpr int ERR = -1;
-
-std::string readline(const char *path) {
- std::ifstream file;
- std::string value;
- file.open(path);
- LOG_D("%s: Opening %s", __func__, path);
- if (file.is_open()) {
- getline(file, value);
- file.close();
- } else {
- LOG_E("%s: Failed to open %s", __func__, path);
- value = std::to_string(ERR);
- }
- return value;
-}
-
-int readint(const char *path) {
- const std::string value = readline(path);
- try {
- return stoi(value);
- } catch (std::invalid_argument const &ex) {
- LOG_E("%s: stoi(): invalid argument: for %s", __func__, value.c_str());
- } catch (std::out_of_range const &ex) {
- LOG_E("%s: stoi(): out of range: for %s", __func__, value.c_str());
- }
- return ERR;
-}
-
-void writeline(const char *path, const std::string& data) {
- std::ofstream file;
- file.open(path);
- LOG_D("%s: Opening %s, will write '%s'", __func__, path, data.c_str());
- if (file.is_open()) {
- file << data;
- file.close();
- return;
- }
- LOG_E("%s: Failed to open %s", __func__, path);
-}
-
-void writeline(const char *path, const int data) {
- writeline(path, std::to_string(data));
-}
-
-} // namespace FileIO
diff --git a/universal7885-common/apps/aidl-support/libfileio/include/FileIO.h b/universal7885-common/apps/aidl-support/libfileio/include/FileIO.h
deleted file mode 100644
index 44c6221..0000000
--- a/universal7885-common/apps/aidl-support/libfileio/include/FileIO.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#include
-
-namespace FileIO {
- std::string readline(const char *path);
- int readint(const char *path);
-
- void writeline(const char *path, const std::string& data);
- void writeline(const char *path, const int data);
-} // namespace FileIO
diff --git a/universal7885-common/sepolicy/private/device.te b/universal7885-common/sepolicy/private/device.te
deleted file mode 100644
index c08235b..0000000
--- a/universal7885-common/sepolicy/private/device.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# FM Radio
-type fm_radio_device, dev_type;
diff --git a/universal7885-common/sepolicy/private/file.te b/universal7885-common/sepolicy/private/file.te
deleted file mode 100644
index bc095b1..0000000
--- a/universal7885-common/sepolicy/private/file.te
+++ /dev/null
@@ -1 +0,0 @@
-type sysfs_fmradio_tune, sysfs_type, rw_fs_type, fs_type;
\ No newline at end of file
diff --git a/universal7885-common/sepolicy/private/file_contexts b/universal7885-common/sepolicy/private/file_contexts
deleted file mode 100644
index 8620ec2..0000000
--- a/universal7885-common/sepolicy/private/file_contexts
+++ /dev/null
@@ -1,6 +0,0 @@
-
-# FMRadio
-/system/bin/vendor\.eureka\.hardware\.fmradio-service u:object_r:hal_fmradio_default_exec:s0
-/system/bin/vendor\.eureka\.hardware\.audio_route-service u:object_r:hal_audio_route_default_exec:s0
-
-/dev/radio0 u:object_r:fm_radio_device:s0
diff --git a/universal7885-common/sepolicy/private/genfs_contexts b/universal7885-common/sepolicy/private/genfs_contexts
deleted file mode 100644
index 5f4d6d2..0000000
--- a/universal7885-common/sepolicy/private/genfs_contexts
+++ /dev/null
@@ -1,2 +0,0 @@
-## FMRadio
-genfscon sysfs /devices/virtual/s610_radio/s610_radio/ u:object_r:sysfs_fmradio_tune:s0
diff --git a/universal7885-common/sepolicy/private/hal_audio_route_default.te b/universal7885-common/sepolicy/private/hal_audio_route_default.te
deleted file mode 100644
index 0d907b6..0000000
--- a/universal7885-common/sepolicy/private/hal_audio_route_default.te
+++ /dev/null
@@ -1,12 +0,0 @@
-type hal_audio_route_default, domain, coredomain;
-type hal_audio_route_default_exec, exec_type, file_type, system_file_type;
-
-add_service(hal_audio_route_default, hal_audio_route_service);
-init_daemon_domain(hal_audio_route_default);
-
-binder_use(hal_audio_route_default);
-
-binder_call(hal_audio_route_default, audioserver)
-binder_call(audioserver, hal_audio_route_default)
-
-allow hal_audio_route_default audioserver_service:service_manager find;
diff --git a/universal7885-common/sepolicy/private/hal_fmradio_default.te b/universal7885-common/sepolicy/private/hal_fmradio_default.te
deleted file mode 100644
index 7f094c4..0000000
--- a/universal7885-common/sepolicy/private/hal_fmradio_default.te
+++ /dev/null
@@ -1,18 +0,0 @@
-type hal_fmradio_default, domain, coredomain;
-type hal_fmradio_default_exec, exec_type, file_type, system_file_type;
-
-add_service(hal_fmradio_default, hal_fmradio_service);
-init_daemon_domain(hal_fmradio_default);
-
-binder_use(hal_fmradio_default);
-
-allow hal_fmradio_default sysfs_fmradio_tune:file rw_file_perms;
-allow hal_fmradio_default sysfs_fmradio_tune:dir search;
-
-allow hal_fmradio_default fm_radio_device:chr_file { read write open ioctl };
-
-allow hal_fmradio_default hal_audio_route_service:service_manager find;
-allow hal_fmradio_default self:capability kill;
-allow hal_fmradio_default system_app:process signull;
-
-binder_call(hal_fmradio_default, hal_audio_route_default)
diff --git a/universal7885-common/sepolicy/private/service.te b/universal7885-common/sepolicy/private/service.te
deleted file mode 100644
index b7cd8f6..0000000
--- a/universal7885-common/sepolicy/private/service.te
+++ /dev/null
@@ -1,2 +0,0 @@
-type hal_fmradio_service, service_manager_type;
-type hal_audio_route_service, service_manager_type;
diff --git a/universal7885-common/sepolicy/private/service_contexts b/universal7885-common/sepolicy/private/service_contexts
deleted file mode 100644
index 7740c7d..0000000
--- a/universal7885-common/sepolicy/private/service_contexts
+++ /dev/null
@@ -1,4 +0,0 @@
-# FMRadio
-vendor.eureka.hardware.fmradio.IFMDevControl/default u:object_r:hal_fmradio_service:s0
-vendor.eureka.hardware.fmradio.IFMDevControl/support u:object_r:hal_fmradio_service:s0
-vendor.eureka.hardware.audio_route.IAudioRoute/default u:object_r:hal_audio_route_service:s0
diff --git a/universal7885-common/sepolicy/private/system_app.te b/universal7885-common/sepolicy/private/system_app.te
deleted file mode 100644
index 741887d..0000000
--- a/universal7885-common/sepolicy/private/system_app.te
+++ /dev/null
@@ -1,4 +0,0 @@
-# FMRadio
-allow system_app hal_fmradio_service:service_manager find;
-
-binder_call(system_app, hal_fmradio_default)
diff --git a/universal7885-common/universal7885-common.mk b/universal7885-common/universal7885-common.mk
index 9282d7e..67742da 100644
--- a/universal7885-common/universal7885-common.mk
+++ b/universal7885-common/universal7885-common.mk
@@ -122,12 +122,6 @@ PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.3-service.samsung
endif
-ifneq ($(TARGET_LOCAL_ARCH),arm)
-# Samsung FMRadio impl
-PRODUCT_PACKAGES += \
- FMRadio
-endif
-
# Gatekeeper
PRODUCT_PACKAGES += \
android.hardware.gatekeeper@1.0-impl \