mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 11:55:31 -04:00
universal7885: FMRadio: Switch to FM V3 aidl interface
This commit is contained in:
parent
66f5fdcfcc
commit
95e7624f55
3 changed files with 5 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ android_app {
|
|||
"com.google.android.material_stable",
|
||||
"androidx.transition_transition",
|
||||
"androidx.coordinatorlayout_coordinatorlayout",
|
||||
"vendor.eureka.hardware.fmradio-V2-java",
|
||||
"vendor.eureka.hardware.fmradio-V3-java",
|
||||
],
|
||||
required: [
|
||||
"vendor.eureka.hardware.fmradio-service",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ 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
|
||||
|
|
@ -23,6 +24,7 @@ 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
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
private lateinit var mIntent: Intent
|
||||
|
|
@ -55,6 +57,7 @@ class MainActivity : AppCompatActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_navigation)
|
||||
DynamicColors.applyToActivitiesIfAvailable(application)
|
||||
mFMInterface.mDevCtl.setValue(SetType.SET_TYPE_FM_APP_PID, Process.myPid())
|
||||
mFMInterface.mDevCtl.open()
|
||||
mAudioManager = getSystemService(AUDIO_SERVICE) as AudioManager
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import vendor.eureka.hardware.fmradio.SetType
|
|||
|
||||
class ListViewAdapter(private val mContext: Context) : BaseAdapter() {
|
||||
private val mFMInterface = NativeFMInterface()
|
||||
private val mListChannel = mFMInterface.mDefaultCtl.getFreqsList().sort()
|
||||
private val mListChannel = mFMInterface.mDefaultCtl.getFreqsList().apply{ sort() }
|
||||
private var mListofViews = HashMap<Int, View>(30)
|
||||
private var mInitDoneArray = Array(30){ false }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue