Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / communicate-dev / src / test / java / com / vayunmathur / communicate / rcs / RcsSlice3Pass2TelephonyShadow.kt

RcsSlice3Pass2TelephonyShadow.kt19 lines · 754 BRaw
1package com.vayunmathur.communicate.rcs
2
3import android.telephony.TelephonyManager
4import org.robolectric.annotation.Implementation
5import org.robolectric.annotation.Implements
6import 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)
14class 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}