diff options
author | pacien | 2020-12-08 18:03:20 +0100 |
---|---|---|
committer | pacien | 2020-12-08 18:03:20 +0100 |
commit | 355251694d63640f028f3e2c17235d12a8573df6 (patch) | |
tree | 966ffd45ec29797afb440ead00586f4fcdf15589 /app/src/main/res | |
parent | 2760703484f9b12f8c21c395915f9780b1ae7e9e (diff) | |
download | tincapp-355251694d63640f028f3e2c17235d12a8573df6.tar.gz |
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.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml | 29 | ||||
-rw-r--r-- | app/src/main/res/layout/configure_activity.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/configure_tools_configuration_access_fragment.xml (renamed from app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml) | 0 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 6 |
4 files changed, 36 insertions, 3 deletions
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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | |||
3 | <!-- | ||
4 | * Material design icon | ||
5 | * Copyright 2017 Google Inc. | ||
6 | * | ||
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
8 | * you may not use this file except in compliance with the License. | ||
9 | * You may obtain a copy of the License at | ||
10 | * | ||
11 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
12 | * | ||
13 | * Unless required by applicable law or agreed to in writing, software | ||
14 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
16 | * See the License for the specific language governing permissions and | ||
17 | * limitations under the License. | ||
18 | --> | ||
19 | |||
20 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
21 | android:width="24dp" | ||
22 | android:height="24dp" | ||
23 | android:tint="?attr/colorControlNormal" | ||
24 | android:viewportWidth="24" | ||
25 | android:viewportHeight="24"> | ||
26 | <path | ||
27 | android:fillColor="@color/textTitle" | ||
28 | android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z" /> | ||
29 | </vector> | ||
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 @@ | |||
30 | 30 | ||
31 | <TextView | 31 | <TextView |
32 | style="@style/AppTheme.SectionTitle" | 32 | style="@style/AppTheme.SectionTitle" |
33 | android:text="@string/configure_activity_title_configuration_server"/> | 33 | android:text="@string/configure_activity_title_configuration_access"/> |
34 | 34 | ||
35 | <fragment | 35 | <fragment |
36 | android:id="@+id/configure_activity_configuration_sftp_server_fragment" | 36 | android:id="@+id/configure_activity_configuration_sftp_server_fragment" |
37 | android:name="org.pacien.tincapp.activities.configure.ConfigurationFtpServerFragment" | 37 | android:name="org.pacien.tincapp.activities.configure.ConfigurationAccessServerFragment" |
38 | android:layout_width="match_parent" | 38 | android:layout_width="match_parent" |
39 | android:layout_height="wrap_content"/> | 39 | android:layout_height="wrap_content"/> |
40 | 40 | ||
diff --git a/app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml b/app/src/main/res/layout/configure_tools_configuration_access_fragment.xml index 24f3c36..24f3c36 100644 --- a/app/src/main/res/layout/configure_tools_configuration_ftp_server_fragment.xml +++ b/app/src/main/res/layout/configure_tools_configuration_access_fragment.xml | |||
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 @@ | |||
75 | <string name="notification_error_message_network_config_invalid_format">Invalid network configuration in network.conf:\n%1$s</string> | 75 | <string name="notification_error_message_network_config_invalid_format">Invalid network configuration in network.conf:\n%1$s</string> |
76 | <string name="notification_error_message_could_not_decrypt_private_keys_format">Could not decrypt private keys:\n%1$s</string> | 76 | <string name="notification_error_message_could_not_decrypt_private_keys_format">Could not decrypt private keys:\n%1$s</string> |
77 | 77 | ||
78 | <string name="notification_config_access_channel_name">Configuration access</string> | ||
79 | <string name="notification_config_access_server_running_title">Configuration access server active</string> | ||
80 | <string name="notification_config_access_server_running_message">The configuration directory is accessible through FTP.</string> | ||
81 | |||
78 | <!-- Start activity --> | 82 | <!-- Start activity --> |
79 | <string name="start_activity_menu_configure">Configure</string> | 83 | <string name="start_activity_menu_configure">Configure</string> |
80 | <string name="start_network_list_title">Connect to network</string> | 84 | <string name="start_network_list_title">Connect to network</string> |
@@ -85,7 +89,7 @@ | |||
85 | <string name="configure_tools_message_invalid_network_name">Invalid network name.</string> | 89 | <string name="configure_tools_message_invalid_network_name">Invalid network name.</string> |
86 | <string name="configure_tools_message_network_configuration_written">Network configuration written.</string> | 90 | <string name="configure_tools_message_network_configuration_written">Network configuration written.</string> |
87 | 91 | ||
88 | <string name="configure_activity_title_configuration_server">Configuration server</string> | 92 | <string name="configure_activity_title_configuration_access">Configuration access</string> |
89 | <string name="configure_configuration_server_ftp_access">FTP access</string> | 93 | <string name="configure_configuration_server_ftp_access">FTP access</string> |
90 | <string name="configure_configuration_server_ftp_access_endpoint_format">User: %1$s, password: %2$s, port: %3$d</string> | 94 | <string name="configure_configuration_server_ftp_access_endpoint_format">User: %1$s, password: %2$s, port: %3$d</string> |
91 | <string name="configure_configuration_server_ftp_access_not_active">Not active</string> | 95 | <string name="configure_configuration_server_ftp_access_not_active">Not active</string> |