Skip to content

Commit 0afef71

Browse files
committed
Fix bug when disabling sticky notification
1 parent ec688fe commit 0afef71

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

android/app/src/main/java/com/httpsms/LoginActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class LoginActivity : AppCompatActivity() {
5555
sim2Layout.visibility = LinearLayout.VISIBLE
5656
return
5757
}
58-
Timber.e("is dual sim ${SmsManagerService.isDualSIM(this)}")
5958
val sim2Layout = findViewById<LinearLayout>(R.id.loginPhoneNumberLayoutSIM2)
6059
sim2Layout.visibility = View.GONE
6160
}

android/app/src/main/java/com/httpsms/Settings.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,14 @@ object Settings {
130130
if (sim == Constants.SIM2) {
131131
setting = this.SETTINGS_SIM2_ACTIVE
132132
}
133-
val activeStatus = PreferenceManager
133+
var activeStatus = PreferenceManager
134134
.getDefaultSharedPreferences(context)
135135
.getBoolean(setting,true)
136136

137+
if (sim == Constants.SIM2) {
138+
activeStatus = activeStatus && isDualSIM(context)
139+
}
140+
137141
Timber.d("SETTINGS_${sim}_ACTIVE: [$activeStatus]")
138142
return activeStatus
139143
}

0 commit comments

Comments
 (0)