diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md
new file mode 100644
index 0000000..7850868
--- /dev/null
+++ b/PRIVACY_POLICY.md
@@ -0,0 +1,20 @@
+# Overview
+
+Nextcloud SMS is a free software developed by its contributors. This privacy policy
+is intended to inform you about data gathered by this application."
+
+Information we collect
+
+Only SMS and call log are collected by the application.
+
+Where information is sent.
+
+Information is neither sent to Nextcloud team servers nor Nextcloud SMS team servers nor
+any government nor another entity you don't want.
+
+When you configure a Nextcloud account in the application, you agree with the Nextcloud
+instance owner that your SMS and call log data will be stored in his infrastructure
+under his responsibility.
+
+We don't recommend to use a public or a company Nextcloud instance account. Your privacy
+must be under your control on your own Nextcloud instance.
\ No newline at end of file
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index 513f453..7a9f8d0 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -1,43 +1,43 @@
-
-
-
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -46,55 +46,59 @@
android:exported="true"
android:process=":sync">
-
+
+ android:resource="@xml/sync_adapter" />
-
+ android:label="@string/pref_title_sync">
-
+
+ android:resource="@xml/owncloud_account_authenticator" />
-
+
-
+
-
+
+
-
+
+
+
@@ -103,12 +107,15 @@
-
+
+
+
@@ -118,45 +125,43 @@
-
+
-
+ android:theme="@style/OcSmsTheme.Login">
-
+ android:label="@string/title_activity_select_account">
-
+ android:label="@string/title_activity_general_settings">
-
+
-
+
-
+ android:label="@string/title_activity_select_contact">
-
+ android:label="@string/account_actions">
-
+ android:label="@string/restore_all_messages">
+
-
+
\ No newline at end of file
diff --git a/src/main/java/fr/unix_experience/owncloud_sms/activities/MainActivity.java b/src/main/java/fr/unix_experience/owncloud_sms/activities/MainActivity.java
index 7428838..585d579 100644
--- a/src/main/java/fr/unix_experience/owncloud_sms/activities/MainActivity.java
+++ b/src/main/java/fr/unix_experience/owncloud_sms/activities/MainActivity.java
@@ -73,8 +73,10 @@ public class MainActivity extends AppCompatActivity
setContentView(R.layout.activity_main);
setupToolbar();
- getSupportActionBar().setHomeButtonEnabled(true);
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ if (getSupportActionBar() != null) {
+ getSupportActionBar().setHomeButtonEnabled(true);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
drawer = findViewById(R.id.drawer_layout);
setupDrawer();
@@ -153,7 +155,7 @@ public class MainActivity extends AppCompatActivity
}
@Override
- public boolean onNavigationItemSelected(MenuItem item) {
+ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
int id = item.getItemId();
boolean res = true;
@@ -176,6 +178,11 @@ public class MainActivity extends AppCompatActivity
case R.id.nav_appinfo_perms:
res = openAppInfos();
break;
+ case R.id.nav_appinfo_privacy_policy:
+ res = openPrivacyPolicy();
+ break;
+ default:
+ Log.e(TAG, "Unhandled navigation item " + Integer.toString(id));
}
closeDrawer();
return res;
@@ -218,7 +225,7 @@ public class MainActivity extends AppCompatActivity
Intent intent;
try {
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + getPackageName()));
- } catch (android.content.ActivityNotFoundException anfe) {
+ } catch (android.content.ActivityNotFoundException e) {
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + getPackageName()));
}
@@ -235,6 +242,11 @@ public class MainActivity extends AppCompatActivity
return true;
}
+ private boolean openPrivacyPolicy() {
+ startActivity(new Intent(this, PrivacyPolicyActivity.class));
+ return true;
+ }
+
/*
* Permissions
*/
diff --git a/src/main/java/fr/unix_experience/owncloud_sms/activities/PrivacyPolicyActivity.java b/src/main/java/fr/unix_experience/owncloud_sms/activities/PrivacyPolicyActivity.java
new file mode 100644
index 0000000..e0a9de4
--- /dev/null
+++ b/src/main/java/fr/unix_experience/owncloud_sms/activities/PrivacyPolicyActivity.java
@@ -0,0 +1,21 @@
+package fr.unix_experience.owncloud_sms.activities;
+
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+
+import fr.unix_experience.owncloud_sms.R;
+
+public class PrivacyPolicyActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_privacy_policy);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ }
+}
diff --git a/src/main/res/layout/activity_privacy_policy.xml b/src/main/res/layout/activity_privacy_policy.xml
new file mode 100644
index 0000000..36cba10
--- /dev/null
+++ b/src/main/res/layout/activity_privacy_policy.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/res/layout/content_privacy_policy.xml b/src/main/res/layout/content_privacy_policy.xml
new file mode 100644
index 0000000..bbdd4a3
--- /dev/null
+++ b/src/main/res/layout/content_privacy_policy.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/res/menu/activity_main_drawer.xml b/src/main/res/menu/activity_main_drawer.xml
index 3a7c424..562a55c 100644
--- a/src/main/res/menu/activity_main_drawer.xml
+++ b/src/main/res/menu/activity_main_drawer.xml
@@ -22,6 +22,10 @@
android:id="@+id/nav_appinfo_perms"
android:icon="@drawable/ic_information"
android:title="@string/action_appinfo_perms"/>
+
-
diff --git a/src/main/res/menu/menu_privacy_policy.xml b/src/main/res/menu/menu_privacy_policy.xml
new file mode 100644
index 0000000..134188f
--- /dev/null
+++ b/src/main/res/menu/menu_privacy_policy.xml
@@ -0,0 +1,10 @@
+
diff --git a/src/main/res/values-en-rGB/strings.xml b/src/main/res/values-en-rGB/strings.xml
index 8c05649..b79bb81 100644
--- a/src/main/res/values-en-rGB/strings.xml
+++ b/src/main/res/values-en-rGB/strings.xml
@@ -185,4 +185,5 @@
Synchronisation complete
Error #19: Failed to write HTTP stream when pushing data to server.
Error #20: Failed to properly set HTTP protocol version.
+ Privacy policy
diff --git a/src/main/res/values-en/strings.xml b/src/main/res/values-en/strings.xml
new file mode 100644
index 0000000..b2746c0
--- /dev/null
+++ b/src/main/res/values-en/strings.xml
@@ -0,0 +1,4 @@
+
+
+ Privacy policy
+
\ No newline at end of file
diff --git a/src/main/res/values-es-rUS/strings.xml b/src/main/res/values-es-rUS/strings.xml
index dd30de7..ad0a923 100644
--- a/src/main/res/values-es-rUS/strings.xml
+++ b/src/main/res/values-es-rUS/strings.xml
@@ -185,4 +185,5 @@
Sincronización completa
Error #19: Falla al escribir al flujo HTTP al enviar datos al servidor.
Error #20: Falla al establecer correctamente la versión del protocolo HTTP.
+ Privacy policy
diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml
index a94b9b3..c3e9857 100644
--- a/src/main/res/values-fr/strings.xml
+++ b/src/main/res/values-fr/strings.xml
@@ -185,4 +185,29 @@
Synchronisation terminée
Erreur #19: Echec de l\'écriture du flux HTTP lors de l\'envoi de données au serveur.
Erreur #20: Impossible de définir correctement la version du protocole HTTP.
+ Politique de confidentialité
+
+ "Généralités\n\n"
+
+ "Nextcloud SMS est un logiciel libre développé par ses contributeurs. Cette politque de "
+ "confidentialité vous informe du traîtement appliqué aux données collectées par cette "
+ "application.\n\n"
+
+ "Les informations que nous récupérons\n\n"
+
+ "Nous récupérons uniquement les SMS et le journal d'appel.\n\n"
+
+ "Où sont envoyées mes données.\n\n"
+
+ "Les données ne sont ni envoyées à l'équipe en charge de Nextcloud, ni à l'équipe en "
+ "charge de Nextcloud SMS ni à aucun gouvernement ou aucune entité auquel vous ne souhaitez "
+ "pas les donner.\n\n"
+
+ "Lorsque vous configurez un compte Nextcloud sur l'application, vous acceptez "
+ "implicitement que vos SMS et votre journal d'appel soit stocké sur l'infrastructure du "
+ "propriétaire de l'instance Nextcloud et sous sa responsabilité.\n\n"
+
+ "Nous ne vous recommandons pas d'utiliser un compte sur instance publique ou d'entreprise. "
+ "Votre vie privée doit être sous votre contrôle sur votre propre instance Nextcloud.\n\n"
+
diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml
index 5e2ea1f..6c5bd8c 100644
--- a/src/main/res/values/dimens.xml
+++ b/src/main/res/values/dimens.xml
@@ -9,5 +9,7 @@
8dp
140dp
16dp
+ 180dp
+ 16dp
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index fa1930e..3f8b471 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -1,5 +1,4 @@
-
-
-
+
7
@@ -274,4 +271,28 @@
Synchronization complete
Error #19: Failed to write HTTP stream when pushing data to server.
Error #20: Failed to properly set HTTP protocol version.
+ Privacy policy
+
+ "Overview\n\n"
+
+ "Nextcloud SMS is a free software developed by its contributors. This privacy policy "
+ "is intended to inform you about data gathered by this application."
+
+ "Information we collect\n\n"
+
+ "Only SMS and call log are collected by the application.\n\n"
+
+ "Where information is sent.\n\n"
+
+ "Information is neither sent to Nextcloud team servers nor Nextcloud SMS team servers nor "
+ "any government nor another entity you don't want.\n\n"
+
+ "When you configure a Nextcloud account in the application, you agree with the Nextcloud "
+ "instance owner that your SMS and call log data will be stored in his infrastructure "
+ "under his responsibility.\n\n"
+
+ "We don't recommend to use a public or a company Nextcloud instance account. Your privacy "
+ "must be under your control on your own Nextcloud instance.\n\n"
+
+
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
index 0c459f2..88f6cb9 100644
--- a/src/main/res/values/styles.xml
+++ b/src/main/res/values/styles.xml
@@ -81,8 +81,8 @@
- true
-
+
-
+