mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-03-15 02:40:18 +01:00
Setup calls import and export settings handled separately
This commit is contained in:
parent
5e75ea700c
commit
58eb9585b4
@ -81,7 +81,8 @@ class SettingsActivity : SimpleActivity() {
|
||||
setupDisableProximitySensor()
|
||||
setupDisableSwipeToAnswer()
|
||||
setupAlwaysShowFullscreen()
|
||||
setupCallsImportExport()
|
||||
setupCallsExport()
|
||||
setupCallsImport()
|
||||
updateTextColors(settings_holder)
|
||||
|
||||
arrayOf(
|
||||
@ -291,11 +292,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupCallsImportExport() {
|
||||
settings_calls_import_holder.setOnClickListener {
|
||||
getContent.launch(callHistoryFileType)
|
||||
}
|
||||
|
||||
private fun setupCallsExport() {
|
||||
settings_calls_export_holder.setOnClickListener {
|
||||
ExportCallHistoryDialog(this) { filename ->
|
||||
saveDocument.launch(filename)
|
||||
@ -303,6 +300,12 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupCallsImport() {
|
||||
settings_calls_import_holder.setOnClickListener {
|
||||
getContent.launch(callHistoryFileType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun importCallHistory(uri: Uri) {
|
||||
try {
|
||||
val jsonString = contentResolver.openInputStream(uri)!!.use { inputStream ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user