From 976d7da4c16f9ddc87f0cd7c67cd2eefc9f260b1 Mon Sep 17 00:00:00 2001
From: Soren Stoutner
Date: Mon, 27 Sep 2021 14:26:12 -0700
Subject: [PATCH] Add a realtime monitoring service.
https://redmine.stoutner.com/issues/750
---
app/build.gradle | 2 +-
app/src/main/AndroidManifest.xml | 21 ++-
app/src/main/assets/en/changelog.html | 4 +-
app/src/main/assets/en/contributors.html | 1 +
app/src/main/assets/en/licenses.html | 8 +-
app/src/main/assets/en/permissions.html | 8 +
app/src/main/assets/es/changelog.html | 4 +-
app/src/main/assets/es/contributors.html | 1 +
app/src/main/assets/es/licenses.html | 8 +-
app/src/main/assets/es/permissions.html | 8 +
app/src/main/assets/fr/changelog.html | 4 +-
app/src/main/assets/fr/contributors.html | 1 +
app/src/main/assets/fr/licenses.html | 8 +-
app/src/main/assets/fr/permissions.html | 8 +
.../assets/images/insecure_notification.svg | 31 ++++
.../assets/images/secure_notification.svg | 31 ++++
app/src/main/assets/it/changelog.html | 4 +-
app/src/main/assets/it/contributors.html | 1 +
app/src/main/assets/it/licenses.html | 45 ++---
app/src/main/assets/it/permissions.html | 8 +
app/src/main/assets/it/privacy_policy.html | 84 ++++-----
.../activities/PrivacyCellActivity.kt | 25 ++-
.../privacycell/fragments/SettingsFragment.kt | 53 +++++-
.../receivers/OnBootCompletedReceiver.kt | 45 +++++
.../services/RealtimeMonitoringService.kt | 170 ++++++++++++++++++
.../res/drawable/insecure_notification.xml | 31 ++++
.../drawable/realtime_monitoring_disabled.xml | 31 ++++
.../drawable/realtime_monitoring_enabled.xml | 31 ++++
.../main/res/drawable/secure_notification.xml | 31 ++++
app/src/main/res/values/strings.xml | 20 +++
app/src/main/res/xml/preferences.xml | 38 +++-
build.gradle | 2 +-
32 files changed, 669 insertions(+), 98 deletions(-)
create mode 100644 app/src/main/assets/images/insecure_notification.svg
create mode 100644 app/src/main/assets/images/secure_notification.svg
create mode 100644 app/src/main/java/com/stoutner/privacycell/receivers/OnBootCompletedReceiver.kt
create mode 100644 app/src/main/java/com/stoutner/privacycell/services/RealtimeMonitoringService.kt
create mode 100644 app/src/main/res/drawable/insecure_notification.xml
create mode 100644 app/src/main/res/drawable/realtime_monitoring_disabled.xml
create mode 100644 app/src/main/res/drawable/realtime_monitoring_enabled.xml
create mode 100644 app/src/main/res/drawable/secure_notification.xml
diff --git a/app/build.gradle b/app/build.gradle
index a6d9998..f49f3b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -55,7 +55,7 @@ dependencies {
implementation 'androidx.webkit:webkit:1.4.0'
// Include the Kotlin standard libraries. This should be the same version number listed in project build.gradle.
- implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30'
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31'
// Include the Google material library.
implementation 'com.google.android.material:material:1.4.0'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a510530..4400b2c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -27,6 +27,12 @@
+
+
+
+
+
+
@@ -39,7 +45,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.PrivacyCell" >
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/en/changelog.html b/app/src/main/assets/en/changelog.html
index c29906d..6bd4d4d 100644
--- a/app/src/main/assets/en/changelog.html
+++ b/app/src/main/assets/en/changelog.html
@@ -27,8 +27,8 @@
- 1.2 (version code 3)
- 15 September 2021 - minimum API 30, target API 30.
+ 1.2 (version code 3)
+ 15 September 2021 - minimum API 30, target API 30.
- Add the option to use a bottom app bar.
- First full Spanish translation contributed by Jose A. León.
diff --git a/app/src/main/assets/en/contributors.html b/app/src/main/assets/en/contributors.html
index 412a912..d3f91b1 100644
--- a/app/src/main/assets/en/contributors.html
+++ b/app/src/main/assets/en/contributors.html
@@ -32,6 +32,7 @@
Translators
Kévin L.: French
+ Bernhard G. Keller: German
Francesco Buratti: Italian
Jose A. León: Spanish
diff --git a/app/src/main/assets/en/licenses.html b/app/src/main/assets/en/licenses.html
index afd34e5..a370ba5 100644
--- a/app/src/main/assets/en/licenses.html
+++ b/app/src/main/assets/en/licenses.html
@@ -41,14 +41,14 @@
which are released under the Apache License 2.0. The full text of the license is below.
Icons
- is derived from security
and 5g
,
+
are derived from security
and 5g
,
which are part of the Android Material icon set and are released under the Apache License 2.0.
The full text of the license is below. Modifications copyright © 2016,2021 Soren Stoutner.
- The resulting image is released under the GPLv3+ license.
- is derived from security
and do_not_disturb
,
+ The resulting images are released under the GPLv3+ license.
+ are derived from security
and do_not_disturb
,
which are part of the Android Material icon set and are released under the Apache License 2.0.
Modifications copyright © 2016,2021 Soren Stoutner.
- The resulting image is released under the GPLv3+ license.
+ The resulting images are released under the GPLv3+ license.
The following icons come from the Android Material icon set,
which is released under the Apache License 2.0.
They are unchanged except for layout information like color and size. Some of them have been renamed to match their use in the code. The original icons and names are shown below.
diff --git a/app/src/main/assets/en/permissions.html b/app/src/main/assets/en/permissions.html
index b97caa5..f5483ba 100644
--- a/app/src/main/assets/en/permissions.html
+++ b/app/src/main/assets/en/permissions.html
@@ -32,5 +32,13 @@
Read phone status and identity
android.permission. READ_PHONE_STATE
Required to determine which protocols are being used by the cell phone network.
+
+ Run foreground service
+ android.permission. FOREGROUND_SERVICE
+ Allows Privacy Cell to display a realtime monitoring notification icon in the status bar.
+
+ Run at startup
+ android.permission. RECEIVE_BOOT_COMPLETED
+ Allows Privacy Cell to enable the realtime monitoring service when the phone boots.