Skip to content

Commit

Permalink
Merge branch 'development' into add-air-actions
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/org/secuso/privacyfriendly2048/activities/GameActivity.java
#	app/src/main/java/org/secuso/privacyfriendly2048/activities/helper/BaseActivityWithoutNavBar.java
#	app/src/main/res/values/strings.xml
  • Loading branch information
udenr committed Sep 3, 2024
2 parents 7f5335e + 1cb49b6 commit 3cf2627
Show file tree
Hide file tree
Showing 116 changed files with 1,326 additions and 1,174 deletions.
88 changes: 27 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,72 +1,38 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex
/*/build/
build/*

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
# Crashlytics configuations
com_crashlytics_export_strings.xml

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

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/
# Gradle generated files
.gradle/

# Android Studio captures folder
captures/
# Signing files
.signing/

# IntelliJ
# User-specific configurations
.idea/*
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# OS-specific files
.DS_Store
.gradle/4.4/fileHashes/fileHashes.lock
*.bin
*.lock
*.lock
.idea/misc.xml
.idea/workspace.xml
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

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

# APKs
*.apk

21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

<a name="v1.3.1"></a>
## [2048 (Privacy Friendly) v1.3.1](https://github.com/SecUSo/privacy-friendly-2048/releases/tag/v1.3.1) - 02 Apr 2024

## What's Changed
* documentation: Added info re: Privacy Friendly Backup to resolve Issue [#27](https://github.com/SecUSo/privacy-friendly-2048/issues/27) by [@jahway603](https://github.com/jahway603) in https://github.com/SecUSo/privacy-friendly-2048/pull/28
* Update dependencies and sdk by [@udenr](https://github.com/udenr) in https://github.com/SecUSo/privacy-friendly-2048/pull/29
* Reformat code by [@udenr](https://github.com/udenr) in https://github.com/SecUSo/privacy-friendly-2048/pull/30
* Updates Copyright by [@coderPaddyS](https://github.com/coderPaddyS) in https://github.com/SecUSo/privacy-friendly-2048/pull/36

## New Contributors
* [@jahway603](https://github.com/jahway603) made their first contribution in https://github.com/SecUSo/privacy-friendly-2048/pull/28
* [@udenr](https://github.com/udenr) made their first contribution in https://github.com/SecUSo/privacy-friendly-2048/pull/29

**Full Changelog**: https://github.com/SecUSo/privacy-friendly-2048/compare/v1.3...v1.3.1

[Changes][v1.3.1]


<a name="v1.3"></a>
## [2048 (Privacy Friendly) v1.3](https://github.com/SecUSo/privacy-friendly-2048/releases/tag/v1.3) - 26 Sep 2023

Expand Down Expand Up @@ -42,9 +60,10 @@
[Changes][v1.0]


[v1.3.1]: https://github.com/SecUSo/privacy-friendly-2048/compare/v1.3...v1.3.1
[v1.3]: https://github.com/SecUSo/privacy-friendly-2048/compare/v1.2...v1.3
[v1.2]: https://github.com/SecUSo/privacy-friendly-2048/compare/v1.1...v1.2
[v1.1]: https://github.com/SecUSo/privacy-friendly-2048/compare/v1.0...v1.1
[v1.0]: https://github.com/SecUSo/privacy-friendly-2048/tree/v1.0

<!-- Generated by https://github.com/rhysd/changelog-from-release v3.7.1 -->
<!-- Generated by https://github.com/rhysd/changelog-from-release v3.7.2 -->
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![PFA](https://img.shields.io/static/v1?label=Privacy%20Friendly%20Apps&message=Project%20Page&style=flat-square&color=3680BB&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDAzNUZBOTQ0M0IyMTFFQzk4QURGMzg0MzM0MDlCODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDAzNUZBOTU0M0IyMTFFQzk4QURGMzg0MzM0MDlCODYiPiA8eG1wTU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LjuzMzE8VpGTIE/gOwNDO/UtO07dIWAFBVAXr0xY3T9al7axcPM34J1y5WhgW4Jq/iZs/w3irPG6q+8iRLB1pqn5xxQmlpYfby29IhsNVAVVWTe9Tvz/Nr+kKrjKvq4jFd3W/0+aDqW9CXOqbpi6yCvvSJIWea0cd4OC7VarwFWQRSdI0VGHErQbsAbyQ/2xmOyQbck20w+BISY4MKyyQ48rOH/TVCLwE88/EzJarxxYFNCGsKKOBrSoAFNyV4kwjAlkBRUfZYhEupxI54EbEK6Y32eGqNPvM9EU143e7AIuu1ikLp1SgP3Df6GNWOvnZ8nEV4G75Rq0V8mmlMCPkGEv2I2wFovg8AAAAASUVORK5CYII=)][PFA]
[![Twitter](https://img.shields.io/badge/twitter-@SECUSOResearch-%231DA1F2.svg?&style=flat-square&logo=twitter&logoColor=1DA1F2)][Twitter]
[![Mastodon](https://img.shields.io/badge/mastodon-@SECUSO__Research@baw%C3%BC.social-%233088D4.svg?&style=flat-square&logo=mastodon&logoColor=3088D4)][Mastodon]
[![Translation status](https://hosted.weblate.org/widget/privacy-friendly-2048/svg-badge.svg)](https://hosted.weblate.org/engage/privacy-friendly-2048/)
[![Translation status](https://hosted.weblate.org/widget/pfa/2048/2048-android-app/svg-badge.svg)](https://hosted.weblate.org/engage/pfa/)

[PFA]: https://secuso.org/pfa
[Mastodon]: https://xn--baw-joa.social/@SECUSO_Research
Expand Down Expand Up @@ -41,7 +41,11 @@ You can use the [Privacy Friendly Backup app](https://github.com/SecUSo/privacy-

## Translation

If you want to help translate this app, you can use [Weblate](https://hosted.weblate.org/projects/privacy-friendly-2048/).
If you want to help translate this app, you can use [Weblate](https://hosted.weblate.org/engage/pfa/).

<a href="https://hosted.weblate.org/engage/pfa/">
<img src="https://hosted.weblate.org/widget/pfa/2048/2048-android-app/multi-auto.svg" alt="Translation status" />
</a>

## License

Expand Down
57 changes: 41 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.devtools.ksp'
}

android {
compileSdk 34
namespace 'org.secuso.privacyfriendly2048'
defaultConfig {
applicationId 'org.secuso.privacyfriendly2048'
minSdkVersion 21
targetSdkVersion 33
versionCode 5
versionName "1.3"
targetSdkVersion 34
compileSdk 34
versionCode 8
versionName "1.4.0"
}
buildTypes {
release {
Expand All @@ -18,32 +23,52 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

kotlin {
jvmToolchain(17)
}

android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
def appName = "pfa-2048"
outputFileName = appName + "-${variant.name}-v${variant.versionName}.apk"
}
}

dataBinding {
enabled = true
}
namespace 'org.secuso.privacyfriendly2048'

lint {
lintConfig = file("lint.xml")
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

// Backup
implementation project(path: ':backup-api')
def work_version = "2.4.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"
implementation 'androidx.sqlite:sqlite-ktx:2.3.1'
implementation 'androidx.sqlite:sqlite-ktx:2.4.0'

constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
Expand Down
10 changes: 10 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Disable the NotificationPermission check for glide -->
<issue id="NotificationPermission">
<ignore regexp="com.bumptech.glide.request.target.NotificationTarget" />
</issue>

<!-- Set the severity of missing translations to warning instead of error -->
<issue id="MissingTranslation" severity="warning" />
</lint>
16 changes: 7 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.secuso.privacyfriendly2048">
xmlns:tools="http://schemas.android.com/tools">

<supports-screens
android:anyDensity="true"
Expand Down Expand Up @@ -38,7 +37,7 @@
<activity
android:name=".activities.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"></activity>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".activities.AboutActivity"
android:label="@string/about"
Expand All @@ -59,9 +58,9 @@
<activity
android:name="org.secuso.privacyfriendly2048.activities.StatsActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
</activity>
<activity
android:name=".activities.SettingsActivity"
Expand All @@ -76,8 +75,7 @@
android:exported="true"
android:name=".activities.GameActivity"
android:label="@string/title_activity_game"
android:parentActivityName=".activities.MainActivity"
>
android:parentActivityName=".activities.MainActivity">
<intent-filter>
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
</intent-filter>
Expand Down Expand Up @@ -106,4 +104,4 @@
tools:node="remove" />
</application>

</manifest>
</manifest>
25 changes: 18 additions & 7 deletions app/src/main/java/org/secuso/privacyfriendly2048/PF2048.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
package org.secuso.privacyfriendly2048

import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import android.os.Build
import android.preference.PreferenceManager
import android.util.Log
import androidx.appcompat.app.AppCompatDelegate
import androidx.work.Configuration
Expand All @@ -29,12 +27,25 @@ import org.secuso.privacyfriendlybackup.api.pfa.BackupManager

class PF2048 : Application(), Configuration.Provider {
override fun onCreate() {
super.onCreate()
BackupManager.backupCreator = BackupCreator()
BackupManager.backupRestorer = BackupRestorer()
super.onCreate()
}

override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
when (PreferenceManager.getDefaultSharedPreferences(applicationContext)
.getString("currentTheme", "system")) {
"dark" -> {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
}

"light" -> {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
}

else -> {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
}
}
}

override val workManagerConfiguration = Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
package org.secuso.privacyfriendly2048.activities;

import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import org.secuso.privacyfriendly2048.BuildConfig;
import org.secuso.privacyfriendly2048.R;
import org.secuso.privacyfriendly2048.activities.helper.BaseActivity;
Expand All @@ -43,7 +44,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_about);

ActionBar ab = getSupportActionBar();
if(ab != null) {
if (ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}

Expand All @@ -55,9 +56,9 @@ protected void onCreate(Bundle savedInstanceState) {

overridePendingTransition(0, 0);

((TextView)findViewById(R.id.secusoWebsite)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView)findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView)findViewById(R.id.textFieldVersionName)).setText(getString(R.string.version_number, BuildConfig.VERSION_NAME));
((TextView) findViewById(R.id.secusoWebsite)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView) findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView) findViewById(R.id.textFieldVersionName)).setText(getString(R.string.version_number, BuildConfig.VERSION_NAME));
}

//@Override
Expand Down
Loading

0 comments on commit 3cf2627

Please sign in to comment.