Due to Google's requirement, ask user's consent if Android contacts is chosen in Settings
This commit is contained in:
@ -9,6 +9,7 @@ import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.PowerManager
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
@ -321,7 +322,22 @@ class ConfigActivity : AppCompatActivity() {
|
||||
contactsMode = contactsModeKeys[position]
|
||||
if (contactsMode != "baresip" && Build.VERSION.SDK_INT >= 23 &&
|
||||
!Utils.checkPermissions(applicationContext, contactsPermissions))
|
||||
requestPermissions(contactsPermissions, CONTACTS_PERMISSION_REQUEST_CODE)
|
||||
with(MaterialAlertDialogBuilder(this@ConfigActivity, R.style.AlertDialogTheme)) {
|
||||
setTitle(getText(R.string.consent_request))
|
||||
setMessage(getText(R.string.contacts_consent))
|
||||
setPositiveButton(getText(R.string.accept)) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
requestPermissions(contactsPermissions, CONTACTS_PERMISSION_REQUEST_CODE)
|
||||
}
|
||||
setNegativeButton(getText(R.string.deny)) { dialog, _ ->
|
||||
contactsSpinner.setSelection(contactsModeKeys.indexOf(oldContactsMode))
|
||||
dialog.dismiss()
|
||||
}
|
||||
show().apply {
|
||||
findViewById<TextView>(android.R.id.message)
|
||||
?.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
}
|
||||
}
|
||||
override fun onNothingSelected(parent: AdapterView<*>) {}
|
||||
}
|
||||
|
||||
@ -387,6 +387,13 @@
|
||||
<string name="config_restart">baresip täytyy käynnistää uudelleen, jotta saat uudet asetukset
|
||||
käyttöön. Käynnistä nyt?
|
||||
</string>
|
||||
<string name="consent_request">Suostumuspyyntö</string>
|
||||
<string name="contacts_consent">Jos Androidin yhteystiedot on valittu, voit käyttää niitä
|
||||
puheluissa ja viesteissä SIP ja tel URI:en ohella. baresip ei talleta Androidin yhteystietoja
|
||||
eikä jaa niitä kenellekään. Jotta baresip saisi käyttöönsä Androidin yhteystiedot,
|
||||
Google vaatii, että annat siihen siihen suostumuksen hyväksymällä baresip-sovelluksen
|
||||
<a href="https://github.com/juha-h/baresip-studio/blob/master/PrivacyPolicy.txt?">yksityisyyskäytännöt</a>.
|
||||
</string>
|
||||
<!-- Contact Activity -->
|
||||
<string name="contact">Yhteystieto</string>
|
||||
<string name="new_contact">Uusi yhteystieto</string>
|
||||
|
||||
@ -346,6 +346,13 @@
|
||||
<string name="config_restart">You need to restart baresip in order to activate the new
|
||||
settings. Restart now?
|
||||
</string>
|
||||
<string name="consent_request">Consent Request</string>
|
||||
<string name="contacts_consent">If Android contacts is chosen, they can be used
|
||||
in calling and messaging as references to SIP and tel URIs. baresip app does not store Android
|
||||
contacts nor share them with anyone. In order to make Android contacts available in baresip,
|
||||
Google requires that you accept their use as described here and in app\'s
|
||||
<a href="https://github.com/juha-h/baresip-studio/blob/master/PrivacyPolicy.txt?">Privacy Policy</a>.
|
||||
</string>
|
||||
<!-- Contact Activity -->
|
||||
<string name="contact">Contact</string>
|
||||
<string name="new_contact">New Contact</string>
|
||||
|
||||
Reference in New Issue
Block a user