diff --git a/README.md b/README.md index 521f91a7559a4b9f2be5e3c560218be16a4031e7..693964011e9b010d68958dcaca194ae75b4e5b21 100644 --- a/README.md +++ b/README.md @@ -23,18 +23,18 @@ The following features are currently part of AdvancedPrivacy app. This app comes in two flavours, one for /e/OS and second one for other android (where app doesn't have system access) # Testing -Need to write test and add code coverage. + +A Debug tools activity is accessible through adb, for debugging and QA + +``` +adb shell am start -n foundation.e.advancedprivacy/.features.debug.DebugActivity +``` # Development ## Setup You can use any latest stable version of android studio to be able to build this app. -## Supported Versions -- Minimum SDK: 26 (Android O) -- Compile SDK: 34 (Android U) -- Target SDK: 33 (Android T) - ## API Keys This project uses [Sentry](https://sentry.io) for telemetry and crash reports, [Mapbox](https://docs.mapbox.com/android/maps/guides/install/) sdk as maps tiles provider. To compile the project, you need to set keys for them: diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index aa3e518c35fc4eeff8a3ea8932195fcfee657667..667891d7758dd6e36c9387ddeb724cf99171f31e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -104,5 +104,13 @@ android:launchMode="singleInstance" android:theme="@style/Theme.InvisibleActivity" /> + + diff --git a/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugActivity.kt b/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..911436e0e30ed15efd6d7873fd34c253ec0b9a03 --- /dev/null +++ b/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugActivity.kt @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2025 E FOUNDATION + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package foundation.e.advancedprivacy.features.debug + +import android.os.Bundle +import androidx.fragment.app.FragmentActivity +import foundation.e.advancedprivacy.databinding.DebugActivityBinding + +// Hidden debug tools activity for AdvancedPrivacy +// Centralize collection of tools for debuging and QA +// especially for feature which involve delayed (like weekly) workers. +class DebugActivity : FragmentActivity() { + private lateinit var binding: DebugActivityBinding + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + binding = DebugActivityBinding.inflate(layoutInflater) + setContentView(binding.root) + } +} diff --git a/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugWeeklyReportFragment.kt b/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugWeeklyReportFragment.kt new file mode 100644 index 0000000000000000000000000000000000000000..3ca369c593ddd10cdf89909171ae03d4deb6de35 --- /dev/null +++ b/app/src/main/java/foundation/e/advancedprivacy/features/debug/DebugWeeklyReportFragment.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2025 E FOUNDATION + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package foundation.e.advancedprivacy.features.debug + +import android.os.Bundle +import android.view.View +import androidx.fragment.app.Fragment +import foundation.e.advancedprivacy.R +import foundation.e.advancedprivacy.databinding.DebugWeeklyReportFragmentBinding + +class DebugWeeklyReportFragment : Fragment(R.layout.debug_weekly_report_fragment) { + private lateinit var binding: DebugWeeklyReportFragmentBinding + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + binding = DebugWeeklyReportFragmentBinding.bind(view) + } +} diff --git a/app/src/main/res/layout/debug_activity.xml b/app/src/main/res/layout/debug_activity.xml new file mode 100644 index 0000000000000000000000000000000000000000..d3cdea8ea715939ce807a4e271cefe68adb3bc11 --- /dev/null +++ b/app/src/main/res/layout/debug_activity.xml @@ -0,0 +1,36 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/debug_weekly_report_fragment.xml b/app/src/main/res/layout/debug_weekly_report_fragment.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5cd35988c677803d1fbccdc50a6da354ff95219 --- /dev/null +++ b/app/src/main/res/layout/debug_weekly_report_fragment.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f7728bd7ae6ae414c4cb29c09b0095061e2f8bf5..148986322ff97f01c7cd0b531eee12759d9f47d3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -218,4 +218,8 @@ Tracker control is on This could impact the functioning of some applications. + + + AdvancedPrivacy debug tools + Weekly Report debug tools