You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param savedInstanceState If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in onSaveInstanceState(Bundle). Otherwise it is null.
43
-
*/
44
36
overridefunonCreate(savedInstanceState:Bundle?) {
45
37
super.onCreate(savedInstanceState)
46
38
setContentView(R.layout.activity_main)
47
39
setupWindowInsets()
48
40
setupIntentLauncher()
49
41
}
50
42
51
-
/**
52
-
* Initializes the activity by checking permissions, requesting the call screening role, and refreshing the call logs if the necessary permissions are granted.
53
-
*/
54
43
privatefuninit() {
55
44
checkPermissionsAndRequest()
56
45
57
-
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.Q) {
58
-
requestCallScreeningRole()
59
-
}
46
+
requestCallScreeningRole()
60
47
61
48
if (ContextCompat.checkSelfPermission(
62
49
this,
@@ -67,9 +54,6 @@ class MainActivity : AppCompatActivity() {
67
54
}
68
55
}
69
56
70
-
/**
71
-
* Called when the activity comes to the foreground.
72
-
*/
73
57
overridefunonResume() {
74
58
super.onResume()
75
59
init()
@@ -89,9 +73,6 @@ class MainActivity : AppCompatActivity() {
<stringname="permissions_required_message">Los siguientes permisos son necesarios para que la aplicación funcione correctamente:\n\n%s\n\nPor favor, ve a los ajustes del sistema y otorga los permisos manualmente.</string>
9
+
<stringname="go_to_settings">Ir a ajustes</string>
10
+
<stringname="permission_read_call_log">Acceso al registro de llamadas</string>
11
+
<stringname="permission_read_phone_state">Acceso al estado del teléfono</string>
12
+
<stringname="permission_read_contacts">Acceso a los contactos</string>
<stringname="permissions_required_message">The following permissions are required for the app to function properly:\n\n%s\n\nPlease go to system settings and grant the permissions manually.</string>
9
+
<stringname="go_to_settings">Go to settings</string>
0 commit comments