Skip to content

Commit

Permalink
Merge pull request #3 from anonaddy/5.4.1
Browse files Browse the repository at this point in the history
5.4.1
  • Loading branch information
Stjin authored Nov 11, 2024
2 parents a54fcb5 + 2cd4c20 commit c4db356
Show file tree
Hide file tree
Showing 77 changed files with 427 additions and 493 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

329 changes: 0 additions & 329 deletions .idea/other.xml

This file was deleted.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [v5.4.1] - 2024-11-12

### addy.io

##### Fixed/Improved

- Fixed margin error
- Fixed a crash when editing a rule containing a deleted recipient
- Allow for refreshing every page in the app
- Optimized refresh token flow by locking in the username
- Check if the new token belongs to the same account

### addy.io for Android wearables _(v1.4.8)_

##### Fixed/Improved

- Performance improvements and other things to make the app even smoother

## [v5.4.0] - 2024-11-03

### addy.io
Expand Down
2 changes: 1 addition & 1 deletion anonaddy_shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
Expand Down
6 changes: 5 additions & 1 deletion anonaddy_shared/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
This library gets override because the shared_anonaddy library implements this library but in practice
It only gets used on the WearOS module
-->
<uses-sdk tools:overrideLibrary="androidx.wear.compose.material, androidx.wear.compose.foundation, androidx.wear.compose.material.core" />
<uses-sdk tools:overrideLibrary="com.google.android.horologist.compose.layout,
androidx.wear.compose.*,
androidx.wear.tiles.*,
androidx.wear.protolayout.*
" />

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class NetworkHelper(private val context: Context) {
}
}

suspend fun verifyApiKey(baseUrl: String, apiKey: String, callback: (String?) -> Unit) {
suspend fun verifyApiKey(baseUrl: String, apiKey: String, callback: (UserResource?, String?) -> Unit) {
if (BuildConfig.DEBUG) {
println("${object {}.javaClass.enclosingMethod?.name} called from ${Thread.currentThread().stackTrace[3].className};${Thread.currentThread().stackTrace[3].methodName}")
}
Expand All @@ -583,7 +583,10 @@ class NetworkHelper(private val context: Context) {

when (response.statusCode) {
200 -> {
callback("200")
val data = result.get()
val gson = Gson()
val addyIoData = gson.fromJson(data, SingleUserResource::class.java)
callback(addyIoData.data, null)
}
// Do not check for a 401 since the UI will take care of it
else -> {
Expand All @@ -599,8 +602,9 @@ class NetworkHelper(private val context: Context) {
)
)
callback(
null,
ErrorHelper.getErrorMessage(
fuelResponse
fuelResponse,
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class SettingsManager(encrypt: Boolean, private val context: Context) {
NOTIFY_DOMAIN_ERROR(false, PREFTYPES.BOOLEAN, "notify_domain_error"),
NOTIFY_SUBSCRIPTION_EXPIRY(false, PREFTYPES.BOOLEAN, "notify_subscription_expiry"),
MAILTO_ACTIVITY_SHOW_SUGGESTIONS(false, PREFTYPES.BOOLEAN, "mailto_activity_show_suggestions"),
TIMES_THE_APP_HAS_BEEN_OPENED(false, PREFTYPES.INT, "times_the_app_has_been_opened"),

// Sorting and Filtering for aliasFragment
ALIAS_SORT_FILTER(false, PREFTYPES.STRING, "alias_sort_filter"),
Expand Down
16 changes: 9 additions & 7 deletions app-wearos/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ android {
Reserve the last two digits for a multi-APK variant, 00 for app, 01 for wearOS
*/

// SDK 33 + v1.4.7 + release 01 + 01 (for wearos)
versionCode = 341470101
versionName = "1.4.7"
// SDK 34 + v1.4.8 + release 01 + 01 (for wearos)
versionCode = 341480101
versionName = "1.4.8"
vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -100,16 +100,18 @@ android {
*/
}

dependencies {
implementation(project(mapOf("path" to ":anonaddy_shared")))
}

dependencies {
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.compose.material3:material3:$compose_material_version")

implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.core:core-ktx:1.15.0")
implementation("com.google.android.gms:play-services-wearable:18.2.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.wear:wear:1.3.0")
implementation(project(mapOf("path" to ":anonaddy_shared")))

compileOnly("com.google.android.wearable:wearable:2.9.0")
implementation("com.google.android.support:wearable:2.9.0")
Expand Down Expand Up @@ -147,7 +149,7 @@ dependencies {

// For updating widgets and caching data
dependencies {
implementation("androidx.work:work-runtime-ktx:2.9.1")
implementation("androidx.work:work-runtime-ktx:2.10.0")
}

// For parsing wearOSSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class WearableListenerService : WearableListenerService() {
Toast.makeText(this, this.resources.getString(R.string.app_reset_requested_by, String(p0.data)), Toast.LENGTH_LONG).show()

Handler(Looper.getMainLooper()).postDelayed({
(this.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).clearApplicationUserData()
(this.getSystemService(ACTIVITY_SERVICE) as ActivityManager).clearApplicationUserData()
}, 2500)
}
"/showAlias" -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ class AddyIoWatchFace : CanvasWatchFaceService() {
override fun onPropertiesChanged(properties: Bundle) {
super.onPropertiesChanged(properties)
mLowBitAmbient = properties.getBoolean(
WatchFaceService.PROPERTY_LOW_BIT_AMBIENT, false
PROPERTY_LOW_BIT_AMBIENT, false
)
mBurnInProtection = properties.getBoolean(
WatchFaceService.PROPERTY_BURN_IN_PROTECTION, false
PROPERTY_BURN_IN_PROTECTION, false
)
}

Expand Down Expand Up @@ -297,7 +297,7 @@ class AddyIoWatchFace : CanvasWatchFaceService() {
mRegisteredTimeZoneReceiver = true
val filter = IntentFilter(Intent.ACTION_TIMEZONE_CHANGED)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
this@AddyIoWatchFace.registerReceiver(mTimeZoneReceiver, filter, Context.RECEIVER_EXPORTED)
this@AddyIoWatchFace.registerReceiver(mTimeZoneReceiver, filter, RECEIVER_EXPORTED)
} else {
this@AddyIoWatchFace.registerReceiver(mTimeZoneReceiver, filter)
}
Expand Down
20 changes: 10 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("org.jetbrains.kotlin.android")
}

android {
Expand All @@ -18,10 +18,10 @@ android {
Reserve the last two digits for a multi-APK variant, 00 for app, 01 for wearOS
*/

// SDK 35 + v5.4.0 + release 01 + 00 (for app) //TODO set back to 01
versionCode = 355400600 // https://developer.android.com/training/wearables/packaging
// SDK 35 + v5.4.1 + release 01 + 00 (for app)
versionCode = 355410200 // https://developer.android.com/training/wearables/packaging //TODO Set back to 01
// The "v" is important, as the updater class compares with the RSS feed on Github
versionName = "v5.4.0"
versionName = "v5.4.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down Expand Up @@ -89,16 +89,16 @@ dependencies {

dependencies {
implementation(project(mapOf("path" to ":anonaddy_shared")))
wearApp(project(":app-wearos"))
}

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.21")
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.3")
implementation("androidx.navigation:navigation-ui-ktx:2.8.3")
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
Expand All @@ -111,7 +111,7 @@ dependencies {
//https://developer.android.com/studio/write/java8-support#library-desugaring
// For using java.time pre-oreo
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.2")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.3")
}


Expand Down Expand Up @@ -140,12 +140,12 @@ dependencies {

// For updating widgets and caching data
dependencies {
implementation("androidx.work:work-runtime-ktx:2.9.1")
implementation("androidx.work:work-runtime-ktx:2.10.0")
}

// For the donut in the aliasview
dependencies {
implementation("app.futured.donut:donut:2.2.4")
implementation("app.futured.donut:donut:2.2.3") // FIXME: https://github.com/futuredapp/donut/pull/96
}

// Loading spinners when execution actions from eg. bottomsheets
Expand Down
Binary file modified app/gplayless/release/app-gplayless-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/gplayless/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 355400600,
"versionName": "v5.4.0",
"versionCode": 355410200,
"versionName": "v5.4.1",
"outputFile": "app-gplayless-release.apk"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ManageSubscriptionActivity : BaseActivity(), BillingClientStateListener, P

private var currentSubscriptionSku: String? = null
private var currentSubscriptionPurchaseToken: String? = null
private var hasNewSubscription = false

private lateinit var binding: ActivityManageSubscriptionBinding
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -333,6 +334,7 @@ class ManageSubscriptionActivity : BaseActivity(), BillingClientStateListener, P
.build()
billingClient.acknowledgePurchase(acknowledgePurchaseParams) { billingResult ->
if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) {
hasNewSubscription = true
finish()
}
}
Expand All @@ -346,7 +348,7 @@ class ManageSubscriptionActivity : BaseActivity(), BillingClientStateListener, P

override fun finish() {
val resultIntent = Intent()
resultIntent.putExtra("hasNewSubscription", true)
resultIntent.putExtra("hasNewSubscription", hasNewSubscription)
setResult(RESULT_OK, resultIntent)
super.finish()
}
Expand Down
10 changes: 9 additions & 1 deletion app/src/gplay/java/host/stjin/anonaddy/utils/ReviewHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ import android.app.Activity
import android.content.Intent
import android.net.Uri
import com.google.android.play.core.review.ReviewManagerFactory
import com.google.android.play.core.review.testing.FakeReviewManager
import host.stjin.anonaddy.BuildConfig

class ReviewHelper {
fun launchReviewFlow(activity: Activity){
val manager = ReviewManagerFactory.create(activity)
val manager = if (BuildConfig.DEBUG){
FakeReviewManager(activity)
} else {
ReviewManagerFactory.create(activity)
}

val request = manager.requestReviewFlow()
request.addOnCompleteListener { task ->
if (task.isSuccessful) {
Expand All @@ -21,5 +28,6 @@ class ReviewHelper {
activity.startActivity(i)
}
}

}
}
4 changes: 2 additions & 2 deletions app/src/main/java/host/stjin/anonaddy/BaseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ abstract class BaseActivity : AppCompatActivity() {
override fun onResume() {
super.onResume()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(mScrollUpBroadcastReceiver, IntentFilter("scroll_up"), Context.RECEIVER_EXPORTED)
registerReceiver(mScrollUpBroadcastReceiver, IntentFilter("scroll_up"), RECEIVER_EXPORTED)
} else {
registerReceiver(mScrollUpBroadcastReceiver, IntentFilter("scroll_up"))
}
Expand Down Expand Up @@ -257,7 +257,7 @@ abstract class BaseActivity : AppCompatActivity() {
},
positiveButtonText = this@BaseActivity.resources.getString(R.string.reset_app),
positiveButtonAction = {
(getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).clearApplicationUserData()
(getSystemService(ACTIVITY_SERVICE) as ActivityManager).clearApplicationUserData()
}
).setCancelable(false).show()
}
Expand Down
Loading

0 comments on commit c4db356

Please sign in to comment.