File tree Expand file tree Collapse file tree
android/app/src/main/java/com/httpsms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class LogzTree(val context: Context): Timber.DebugTree() {
3737
3838 val body = Klaxon ().toJsonString(logEntry).toRequestBody(" application/x-www-form-urlencoded" .toMediaType())
3939 val request: Request = Request .Builder ()
40- .url(" https://listener.logz.io:8071?token=cTCUVJoTDrPjaFcanAPRzIsYyThyrIDw &type=http-bulk" )
40+ .url(" https://listener.logz.io:8071?token=xPDQiZOOfemERsCaVsJXtMbhKfWdVyNk &type=http-bulk" )
4141 .post(body)
4242 .header(" Content-Type" , " application/x-www-form-urlencoded" )
4343 .build()
Original file line number Diff line number Diff line change @@ -54,16 +54,17 @@ class SmsManagerService {
5454
5555 @Suppress(" DEPRECATION" )
5656 @SuppressLint(" MissingPermission" )
57- private fun getSmsManager (context : Context , sim : String = " DEFAULT " ): SmsManager {
57+ private fun getSmsManager (context : Context , sim : String = Constants . SIM1 ): SmsManager {
5858 val localSubscriptionManager: SubscriptionManager = if (Build .VERSION .SDK_INT < 31 ) {
5959 SubscriptionManager .from(context)
6060 } else {
6161 context.getSystemService(SubscriptionManager ::class .java)
6262 }
6363
64- val subscriptionId = if (sim == " SIM1" && localSubscriptionManager.activeSubscriptionInfoList.size > 0 ) {
64+ Timber .d(" active subscription info size: [${localSubscriptionManager.activeSubscriptionInfoList.size} ]" )
65+ val subscriptionId = if (sim == Constants .SIM1 && localSubscriptionManager.activeSubscriptionInfoList.size > 0 ) {
6566 localSubscriptionManager.activeSubscriptionInfoList[0 ].subscriptionId
66- } else if (sim == " SIM2" && localSubscriptionManager.activeSubscriptionInfoList.size > 1 ) {
67+ } else if (sim == Constants . SIM2 && localSubscriptionManager.activeSubscriptionInfoList.size > 1 ) {
6768 localSubscriptionManager.activeSubscriptionInfoList[1 ].subscriptionId
6869 } else {
6970 SubscriptionManager .getDefaultSmsSubscriptionId()
You can’t perform that action at this time.
0 commit comments