Skip to content

Commit

Permalink
Merge pull request #29 from SecUSo/development
Browse files Browse the repository at this point in the history
Update to version 1.3.2
  • Loading branch information
coderPaddyS authored Oct 21, 2024
2 parents 76c0bf4 + 3fcb299 commit 52d63c4
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 232 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Changelog Generation

on:
release:
types: [published, released]
types: [published]
workflow_dispatch:

jobs:
Expand All @@ -16,6 +16,7 @@ jobs:
- uses: rhysd/changelog-from-release/action@v3
with:
file: CHANGELOG.md
pull_request: true
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_summary_template: 'update changelog for %s changes'
args: -l 2
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,23 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run lint check
run: bash ./gradlew lint

- name: Upload lint result
uses: actions/upload-artifact@v4
with:
name: lint-results-debug
path: BackupApp/build/reports/lint-results-debug.html

- name: Build the app
run: bash ./gradlew build --stacktrace

- name: Build debug apk
run: bash ./gradlew assembleDebug

- name: Upload debug apk
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: BackupApp/build/outputs/apk/debug/*.apk
42 changes: 34 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
# Built application files
/*/build/
build/*

# Local configuration file (sdk path, etc)
local.properties

# Gradle generated files
.gradle/

# Signing files
.signing/

# User-specific configurations
.idea/*
*.iml
.gradle
/local.properties
.idea/
misc.xml

# OS-specific files
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Documents
*.pdf
*.doc
*.docx
*.odt

# APKs
*.apk
/pfa.properties
/.idea/
/BackupApp/release
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "BackupAPI"]
path = BackupAPI
url = https://github.com/SecUSo/privacy-friendly-backup-api.git
[submodule "openpgp-api"]
path = openpgp-api
url = https://github.com/open-keychain/openpgp-api
24 changes: 12 additions & 12 deletions BackupApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ android {
applicationId "org.secuso.privacyfriendlybackup"
minSdkVersion 21
targetSdkVersion 34
versionCode 5
versionName "1.3.1"
versionCode 6
versionName "1.3.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation": "$projectDir/schemas".toString(),
"room.incremental":"true",
"room.expandProjection":"true"
"room.schemaLocation" : "$projectDir/schemas".toString(),
"room.incremental" : "true",
"room.expandProjection": "true"
]
}
}
Expand Down Expand Up @@ -106,10 +106,10 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

// OpenPGP API
implementation 'org.sufficientlysecure:openpgp-api:12.0'

//implementation 'org.sufficientlysecure:openpgp-api:12.0'
implementation(project(':openpgp-api'))
// WorkManager
def work_version = "2.9.0"
def work_version = "2.9.1"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-runtime-ktx:$work_version"
androidTestImplementation "androidx.work:work-testing:$work_version"
Expand All @@ -123,10 +123,10 @@ dependencies {
implementation "androidx.room:room-ktx:$roomVersion"

// Lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3"
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.3'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6"
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.6'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.8.3'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.8.6'

// Preferences
def preference_version = "1.2.1"
Expand All @@ -136,7 +136,7 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:4.11.0'

// JSON Viewer
implementation 'com.yuyh.json:jsonviewer:1.0.6'
implementation 'com.github.smuyyh:JsonViewer:1.0.7'

// Retrofit for Google Drive Test
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
Expand Down

This file was deleted.

9 changes: 1 addition & 8 deletions BackupApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<!-- If you are using androidx.startup to initialize other components -->
<meta-data
android:name="androidx.work.impl.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
tools:node="remove" />

<activity android:name=".ui.importbackup.ImportBackupActivity"
android:theme="@style/AppTheme.TranslucentOverlay"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.secuso.privacyfriendlybackup.ui.encryption

import android.Manifest
import android.animation.Animator
import android.animation.ValueAnimator
import android.content.Intent
Expand All @@ -8,6 +9,7 @@ import android.os.Bundle
import androidx.annotation.ColorInt
import androidx.annotation.StringRes
import androidx.appcompat.widget.Toolbar
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.fragment.app.DialogFragment
import androidx.preference.EditTextPreference
Expand All @@ -16,6 +18,7 @@ import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import com.google.android.material.appbar.AppBarLayout
import org.secuso.privacyfriendlybackup.R
import org.secuso.privacyfriendlybackup.preference.PreferenceKeys
import org.secuso.privacyfriendlybackup.preference.PreferenceKeys.PREF_ENCRYPTION_CRYPTO_PROVIDER
import org.secuso.privacyfriendlybackup.preference.PreferenceKeys.PREF_ENCRYPTION_ENABLE
import org.secuso.privacyfriendlybackup.preference.PreferenceKeys.PREF_ENCRYPTION_KEY
Expand All @@ -28,6 +31,7 @@ class EncryptionSettingsFragment : PreferenceFragmentCompat() {
companion object {
// TODO: Add Dialog or warning box that tells the user to tur encryption on
const val DIALOG_FRAGMENT_TAG = "EncryptionSettingsFragment.DIALOG_FRAGMENT_TAG"
const val REQUEST_CODE_POST_NOTIFICATION = 1

fun newInstance() : EncryptionSettingsFragment {
return EncryptionSettingsFragment()
Expand Down Expand Up @@ -145,6 +149,14 @@ class EncryptionSettingsFragment : PreferenceFragmentCompat() {
// true
// }
// }

val encryptionEnabled : SwitchPreferenceCompat? = findPreference(PREF_ENCRYPTION_ENABLE)
encryptionEnabled?.setOnPreferenceChangeListener { _, newValue ->
if (newValue.equals(true)) {
ActivityCompat.requestPermissions(requireActivity(), arrayOf(Manifest.permission.POST_NOTIFICATIONS), REQUEST_CODE_POST_NOTIFICATION)
}
return@setOnPreferenceChangeListener true
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Loading

0 comments on commit 52d63c4

Please sign in to comment.