Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getActiveSubscriptionInfoList Method is not exists when use sdk 35 #329

Open
safwa1 opened this issue Dec 23, 2024 · 0 comments
Open

getActiveSubscriptionInfoList Method is not exists when use sdk 35 #329

safwa1 opened this issue Dec 23, 2024 · 0 comments

Comments

@safwa1
Copy link

safwa1 commented Dec 23, 2024

val subscriptions: List<SubscriptionInfo>
        get() {
            val sub = this.loadCachedInterface { sub }
            return try {
                sub.getActiveSubscriptionInfoList(null, null, true)
            } catch (e: NoSuchMethodError) {
                // FIXME: lift up reflect as soon as official source code releases
                val getActiveSubscriptionInfoListMethod = sub.javaClass.getMethod(
                    "getActiveSubscriptionInfoList",
                    String::class.java,
                    String::class.java,
                    Boolean::class.java,
                )
                (getActiveSubscriptionInfoListMethod.invoke(sub, null, null, false) as List<SubscriptionInfo>)
            }
        }

exception
W java.lang.NoSuchMethodException: com.android.internal.telephony.ISub$Stub$Proxy.getActiveSubscriptionInfoList [class java.lang.String, class java.lang.String, boolean]
2024-12-24 02:33:08.583 11630-11630 System.err com.uft.app.volte W at java.lang.Class.getMethod(Class.java:2103)
2024-12-24 02:33:08.583 11630-11630 System.err com.uft.app.volte W at java.lang.Class.getMethod(Class.java:1724)
2024-12-24 02:33:08.583 11630-11630 System.err com.uft.app.volte W at com.uft.app.volte.services.CarrierModer.getSubscriptions(CarrierModer.kt:22)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant