Reputation: 33
I am trying to disable SIM Slot 1 in an application built in Kotlin. This application is for API Level 27(Android 8.1, will be part of built-in app in the ROM), and you can assume that I can gain whatever permissions from the system as we are dealing with the ROM build-in app.
In the Android source code of "android/telephony/TelephonyManager.java" I see this function.
setSimPowerStateForSlot(getSlotIndex(), powerUp)
But appearantly, I cannot get access to this method by calling
telephonyManager = this.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
telephonyManager!!.setSimPowerStateForSlot(0, powerDown)
I saw in another post that somebody have done this successfully, but can anybody to guide me how to do this?
Again, my goal is:
Upvotes: 3
Views: 1725