Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / communicate-dev / src / test / java / com / vayunmathur / communicate / rcs / RcsSlice3Pass2TelephonyShadow.kt
RcsSlice3Pass2TelephonyShadow.kt19 lines · 754 BRaw
| 1 | package com.vayunmathur.communicate.rcs |
| 2 | |
| 3 | import android.telephony.TelephonyManager |
| 4 | import org.robolectric.annotation.Implementation |
| 5 | import org.robolectric.annotation.Implements |
| 6 | import org.robolectric.shadows.ShadowTelephonyManager |
| 7 | |
| 8 | /** |
| 9 | * TelephonyManager stand-in whose ISIM AKA challenge succeeds with a fixed |
| 10 | * base64 RES||CK||IK blob, so the direct-SIP digest registration flow can |
| 11 | * run end to end on the JVM. |
| 12 | */ |
| 13 | @Implements(TelephonyManager::class) |
| 14 | class RcsSlice3Pass2TelephonyShadow : ShadowTelephonyManager() { |
| 15 | @Implementation |
| 16 | override fun getIccAuthentication(appType: Int, authType: Int, data: String?): String = |
| 17 | // "resresre" || "ckckckck" || "ikikikik" as one base64 blob. |
| 18 | "cmVzcmVzcmVja2NrY2tjY2tpbmlraWtpaw==" |
| 19 | } |