From 69445bffe7a17055ac47a41df5d33fe09b9aff3c Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 8 Dec 2020 16:04:48 +0100 Subject: context: read configuration from and write logs and temp files to private app storage The external app public storage directory is no longer reliably accessible on Android 11 and above. This makes editing the configuration and accessing the log files impossible in some cases. Let's move to the app private storage, to be made accessible to the user by some other mean. This has the benefit of also protecting the private keys that need to be stored encrypted otherwise. We also split the configuration and cache directory into specialised sub-directories. GitHub: related to #103 --- .../org/pacien/tincapp/activities/start/NetworkListFragment.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt') diff --git a/app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt b/app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt index d3cc803..b0bbddf 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt @@ -1,6 +1,6 @@ /* * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon - * Copyright (C) 2017-2019 Pacien TRAN-GIRARD + * Copyright (C) 2017-2020 Pacien TRAN-GIRARD * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,7 +37,6 @@ import org.pacien.tincapp.extensions.setElements * @author pacien */ class NetworkListFragment : BaseFragment() { - private val appPaths = AppPaths private val networkListViewModel by lazy { NetworkListViewModel() } private val networkListAdapter by lazy { ArrayAdapter(requireContext(), R.layout.start_network_list_item) } var connectToNetworkAction = { _: String -> Unit } @@ -72,13 +71,8 @@ class NetworkListFragment : BaseFragment() { } private fun updatePlaceholder() { - val placeholderTextResource = when (appPaths.storageAvailable()) { - true -> R.string.start_network_list_empty_none_found - false -> R.string.start_network_list_empty_storage_not_available - } - start_network_list_placeholder.post { - start_network_list_placeholder_text?.text = getString(placeholderTextResource) + start_network_list_placeholder_text?.text = getString(R.string.start_network_list_empty_none_found) } } } -- cgit v1.2.3