File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,7 @@ class MainActivity : AppCompatActivity() {
135135 @RequiresApi(Build .VERSION_CODES .Q )
136136 private fun requestRoleForQAndAbove () {
137137 val roleManager = getSystemService(Context .ROLE_SERVICE ) as RoleManager
138- if (roleManager.isRoleHeld(RoleManager .ROLE_CALL_SCREENING )) {
139- showToast(this , getString(R .string.call_screening_role_already_granted))
140- } else {
138+ if (! roleManager.isRoleHeld(RoleManager .ROLE_CALL_SCREENING )) {
141139 val intent = roleManager.createRequestRoleIntent(RoleManager .ROLE_CALL_SCREENING )
142140 intentLauncher.launch(intent)
143141 showToast(this , getString(R .string.call_screening_role_prompt), Toast .LENGTH_LONG )
Original file line number Diff line number Diff line change 11<resources >
22 <string name =" app_name" >ListaSpam</string >
33 <string name =" call_screening_role_prompt" >Please grant Call Screening role to this app.</string >
4- <string name =" call_screening_role_already_granted" >Call Screening role is already granted.</string >
54 <string name =" telecom_manager_unavailable" >TelecomManager not available.</string >
65 <string name =" role_manager_unavailable" >RoleManager is not available on this device.</string >
76
You can’t perform that action at this time.
0 commit comments