From 355251694d63640f028f3e2c17235d12a8573df6 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 8 Dec 2020 18:03:20 +0100 Subject: ConfigurationAccessService: prevent service from being stopped when app loses focus This makes the ConfigurationAccessService (formerly ConfigurationFtpService) start in foreground through the use of a persistent notification so that it isn't stopped by the system after the app loses the focus on the user's screen, which happens when the user switches to an FTP client application on the same device. --- .../ic_baseline_folder_open_primary_24dp.xml | 29 ++++++++ app/src/main/res/layout/configure_activity.xml | 4 +- ...nfigure_tools_configuration_access_fragment.xml | 86 ++++++++++++++++++++++ ...ure_tools_configuration_ftp_server_fragment.xml | 86 ---------------------- app/src/main/res/values/strings.xml | 6 +- 5 files changed, 122 insertions(+), 89 deletions(-) create mode 100644 app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml create mode 100644 app/src/main/res/layout/configure_tools_configuration_access_fragment.xml delete mode 100644 app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml b/app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml new file mode 100644 index 0000000..da24678 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml @@ -0,0 +1,29 @@ + + + + + + + diff --git a/app/src/main/res/layout/configure_activity.xml b/app/src/main/res/layout/configure_activity.xml index 2fde4a2..08f29af 100644 --- a/app/src/main/res/layout/configure_activity.xml +++ b/app/src/main/res/layout/configure_activity.xml @@ -30,11 +30,11 @@ + android:text="@string/configure_activity_title_configuration_access"/> diff --git a/app/src/main/res/layout/configure_tools_configuration_access_fragment.xml b/app/src/main/res/layout/configure_tools_configuration_access_fragment.xml new file mode 100644 index 0000000..24f3c36 --- /dev/null +++ b/app/src/main/res/layout/configure_tools_configuration_access_fragment.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml b/app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml deleted file mode 100644 index 24f3c36..0000000 --- a/app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cae7fe5..6c1a934 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -75,6 +75,10 @@ Invalid network configuration in network.conf:\n%1$s Could not decrypt private keys:\n%1$s + Configuration access + Configuration access server active + The configuration directory is accessible through FTP. + Configure Connect to network @@ -85,7 +89,7 @@ Invalid network name. Network configuration written. - Configuration server + Configuration access FTP access User: %1$s, password: %2$s, port: %3$d Not active -- cgit v1.2.3