Skip to content

Commit 4c07479

Browse files
committed
Merge branch 'mzorz/update-targetsdk-35' into mzorz/remove-cwac-anddown-library
2 parents e6b4124 + 065c25c commit 4c07479

File tree

12 files changed

+38
-80
lines changed

12 files changed

+38
-80
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ steps:
1616
- wait
1717

1818
- label: ":hammer_and_pick: Build and Test"
19-
command: ./gradlew --stacktrace testReleaseTest
19+
command: ./gradlew --stacktrace testDebugUnitTest
2020
plugins: [$CI_TOOLKIT_PLUGIN]
2121
notify:
2222
- github_commit_status:
@@ -36,7 +36,7 @@ steps:
3636
context: Danger - PR Check
3737

3838
- label: ":microscope: Lint"
39-
command: ./gradlew --stacktrace lintRelease
39+
command: ./gradlew --stacktrace lintDebug
4040
plugins: [$CI_TOOLKIT_PLUGIN]
4141
notify:
4242
- github_commit_status:

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
17.0
1+
21.0

PasscodeLock/build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ android {
2626
shrinkResources false
2727
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2828
}
29-
releaseTest {
30-
initWith release
31-
minifyEnabled false
32-
shrinkResources false
33-
}
3429
}
3530
compileOptions {
3631
sourceCompatibility JavaVersion.VERSION_11

PasscodeLock/consumer-rules.pro

Lines changed: 0 additions & 4 deletions
This file was deleted.

Simplenote/build.gradle

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ android {
2121
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2222
}
2323

24-
// New build type for CI testing without minification to avoid ClassNotFoundException
25-
releaseTest {
26-
initWith release
27-
minifyEnabled false
28-
shrinkResources false
29-
}
30-
3124
// Dedicated build type for screenshots so that we can add the special
3225
// permissions only to it, keeping debug and release closer together to
3326
// make bug hunting easier.
@@ -49,8 +42,6 @@ android {
4942

5043
minSdkVersion 23
5144
targetSdkVersion 35
52-
53-
testInstrumentationRunner 'com.automattic.simplenote.SimplenoteAppRunner'
5445
}
5546

5647

@@ -85,7 +76,7 @@ buildscript {
8576

8677
repositories {
8778
google()
88-
jcenter()
79+
mavenCentral()
8980
}
9081
}
9182

@@ -169,7 +160,7 @@ repositories {
169160
}
170161
maven { url "https://maven.google.com" }
171162
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
172-
jcenter()
163+
mavenCentral()
173164
maven {
174165
url 'https://jitpack.io'
175166
content {

Simplenote/proguard-rules.pro

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,3 @@
3434

3535
# AndroidAsync lib compiles these classes
3636
-dontwarn org.bouncycastle.**
37-
38-
# PasscodeLock classes - needed for tests that trigger analytics which instantiate AppLock
39-
-keep class org.wordpress.passcodelock.** { *; }
40-
-dontwarn org.wordpress.passcodelock.**
41-
42-
# Keep specific classes that are failing in tests
43-
-keep class org.wordpress.passcodelock.AbstractAppLock { *; }
44-
-keep class org.wordpress.passcodelock.DefaultAppLock { *; }
45-
-keep class org.wordpress.passcodelock.AppLockManager { *; }
46-
47-
# Keep the SimplenoteAppLock and related analytics classes
48-
-keep class com.automattic.simplenote.SimplenoteAppLock { *; }
49-
-keep class com.automattic.simplenote.analytics.** { *; }
50-
-keep class com.automattic.simplenote.Simplenote { *; }

Simplenote/src/main/java/com/automattic/simplenote/AddTagActivity.kt

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import android.widget.TextView
1111
import androidx.activity.viewModels
1212
import androidx.appcompat.app.AlertDialog
1313
import androidx.appcompat.app.AppCompatActivity
14-
import androidx.core.view.WindowCompat
15-
import androidx.core.view.WindowInsetsControllerCompat
14+
import androidx.core.view.ViewCompat
15+
import androidx.core.view.WindowInsetsCompat
1616
import androidx.core.widget.doAfterTextChanged
1717
import com.automattic.simplenote.databinding.ActivityTagAddBinding
1818
import com.automattic.simplenote.utils.DisplayUtils
1919
import com.automattic.simplenote.utils.HtmlCompat
20+
import com.automattic.simplenote.utils.SystemBarUtils
2021
import com.automattic.simplenote.utils.ThemeUtils
2122
import com.automattic.simplenote.viewmodels.AddTagViewModel
2223
import com.automattic.simplenote.widgets.MorphCircleToRectangle
@@ -30,28 +31,29 @@ class AddTagActivity : AppCompatActivity() {
3031
override fun onCreate(savedInstanceState: Bundle?) {
3132
ThemeUtils.setTheme(this)
3233
super.onCreate(savedInstanceState)
33-
val binding: ActivityTagAddBinding = ActivityTagAddBinding.inflate(layoutInflater)
3434

35-
binding.setObservers()
36-
binding.setupLayout()
37-
binding.setupViews()
35+
with(ActivityTagAddBinding.inflate(layoutInflater)) {
36+
setContentView(root)
37+
setupLayout()
38+
setupViews()
39+
setObservers()
3840

39-
viewModel.start()
41+
viewModel.start()
4042

41-
setContentView(binding.root)
42-
43-
// Setup edge-to-edge display for Android 15+ compatibility
44-
// This is a transparent dialog activity without toolbar
45-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
46-
WindowCompat.setDecorFitsSystemWindows(window, false)
47-
48-
val controller = WindowCompat.getInsetsController(window, window.decorView)
49-
controller?.let {
50-
// Light status bar appearance for the transparent dialog
51-
it.isAppearanceLightStatusBars = true
52-
it.isAppearanceLightNavigationBars = true
43+
44+
// Setup edge-to-edge display with proper WindowInsets handling
45+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
46+
SystemBarUtils.setupEdgeToEdgeWithAutoTheming(this@AddTagActivity, root, null, null)
47+
}
48+
49+
// Add minimal IME (keyboard) insets handling for dialog positioning
50+
ViewCompat.setOnApplyWindowInsetsListener(root) { view, insets ->
51+
val imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime())
52+
view.setPadding(view.paddingLeft, view.paddingTop, view.paddingRight, imeInsets.bottom)
53+
insets
5354
}
5455
}
56+
5557
}
5658

5759
private fun ActivityTagAddBinding.setupViews() {

Simplenote/src/main/java/com/automattic/simplenote/DeepLinkActivity.kt

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class DeepLinkActivity : AppCompatActivity() {
2929
VERIFIED_WEB_SCHEME -> {
3030
// Check if this is a password reset URL
3131
if (uri.path?.contains("/account/") == true && uri.path?.contains("/reset") == true) {
32-
handlePasswordReset(uri)
32+
// launch the app if they tapped on a password reset link on app.simplenote.com
33+
handlePasswordReset()
3334
} else {
3435
// New MagicLink
3536
startMagicLinkConfirmation(uri)
@@ -93,19 +94,10 @@ class DeepLinkActivity : AppCompatActivity() {
9394
}
9495
}
9596

96-
private fun handlePasswordReset(uri: Uri) {
97-
val redirectParam = uri.getQueryParameter("redirect")
98-
if (redirectParam == "simplenote://launch") {
99-
// Handle the redirect to launch the app
100-
val intent = IntentUtils.maybeAliasedIntent(applicationContext)
101-
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
102-
startActivity(intent)
103-
} else {
104-
// Default behavior for reset URLs without redirect
105-
val intent = IntentUtils.maybeAliasedIntent(applicationContext)
106-
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
107-
startActivity(intent)
108-
}
97+
private fun handlePasswordReset() {
98+
val intent = IntentUtils.maybeAliasedIntent(applicationContext)
99+
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
100+
startActivity(intent)
109101
}
110102

111103
private fun queryParamContainsData(path: String?, otherString: String) : Boolean = path?.contains(otherString, true) == true

Simplenote/src/main/java/com/automattic/simplenote/widgets/SimplenoteEditText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public boolean enoughToFilter() {
7676
// solves a crash after updating dependencies in which this method
7777
// gets called in super() instantiation before the mTokenizer variable
7878
// is instantiated
79-
if (mTokenizer == null) {
79+
if (mTokenizer == null) {
8080
return false;
8181
}
8282

Wear/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66
}
77
apply plugin: 'com.android.application'
@@ -16,11 +16,6 @@ android {
1616
shrinkResources false
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1818
}
19-
releaseTest {
20-
initWith release
21-
minifyEnabled false
22-
shrinkResources false
23-
}
2419
}
2520

2621
defaultConfig {
@@ -40,7 +35,7 @@ dependencies {
4035
}
4136

4237
repositories {
43-
jcenter()
38+
mavenCentral()
4439
maven {
4540
url "https://maven.google.com"
4641
}

0 commit comments

Comments
 (0)