Skip to content

Commit 65a2f66

Browse files
authored
feat: prepare Paperize v4.1.0 (#598)
1 parent 93af870 commit 65a2f66

33 files changed

Lines changed: 1022 additions & 142 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- name: Checkout repository source code
44-
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
44+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4545

4646
- name: Set up JDK 17
47-
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5
47+
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6
4848
with:
4949
java-version: '17'
5050
distribution: 'temurin'
@@ -70,10 +70,10 @@ jobs:
7070
if: github.event_name == 'push'
7171
steps:
7272
- name: Checkout repository source code
73-
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
73+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
7474

7575
- name: Set up JDK 17
76-
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5
76+
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6
7777
with:
7878
java-version: '17'
7979
distribution: 'temurin'
@@ -154,7 +154,7 @@ jobs:
154154
- name: Create Draft Release
155155
# Publishes a new release to GitHub. `draft: true` ensures the release is not made
156156
# public until it has been manually reviewed and published.
157-
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3
157+
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3
158158
with:
159159
files: ./apk-artifact/paperize-v*.apk
160160
draft: true

.github/workflows/codeql.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,33 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout repository source code
21-
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
21+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2222

2323
- name: Initialize CodeQL
24-
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
24+
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
2525
with:
2626
languages: actions
2727
build-mode: none
2828

2929
- name: Perform CodeQL analysis
30-
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
30+
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
3131

3232
analyze-java-kotlin:
3333
name: Analyze Java and Kotlin
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Checkout repository source code
37-
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
37+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
3838

3939
- name: Set up JDK 17
40-
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5
40+
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6
4141
with:
4242
java-version: "17"
4343
distribution: temurin
4444
cache: gradle
4545

4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
47+
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
4848
with:
4949
languages: java-kotlin
5050
build-mode: manual
@@ -56,4 +56,4 @@ jobs:
5656
run: ./gradlew assembleDebug
5757

5858
- name: Perform CodeQL analysis
59-
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
59+
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## v4.1.0
2+
3+
- Added a Set wallpaper action to image previews, with separate home, lock, and
4+
combined home-and-lock targets that preserve each screen's scaling and effects.
5+
- Reset the affected automatic countdown after a successful manual change from
6+
Paperize, its launcher shortcut, or its Quick Settings tile.
7+
- Added live-wallpaper intervals as short as one minute while the wallpaper is
8+
visible, with lifecycle-aware pausing and timer resets after manual changes.
9+
- Replaced the undersized status-bar asset with a dedicated notification icon.
10+
- Updated Paperize for the Android 17 SDK and refreshed Kotlin, Gradle, Compose,
11+
AndroidX, Material, Coil, Zoomable, and GitHub Actions dependencies.
12+
- Expanded emulator coverage for Android wallpaper colors, every static and live
13+
visual effect, OpenGL shaders, scheduling policy, and foldable display sizing.
14+
15+
**Full Changelog**: https://github.com/Anthonyy232/Paperize/compare/v4.0.3...v4.1.0
16+
117
## v4.0.3
218

319
- Kept scheduled static changes in the device's natural orientation, even when a

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ksp {
1414

1515
android {
1616
namespace = "com.anthonyla.paperize"
17-
compileSdk = 36
17+
compileSdk = 37
1818

1919
signingConfigs {
2020
create("release") {
@@ -32,8 +32,8 @@ android {
3232
applicationId = "com.anthonyla.paperize"
3333
minSdk = 31
3434
targetSdk = 36
35-
versionCode = 54
36-
versionName = "4.0.3"
35+
versionCode = 55
36+
versionName = "4.1.0"
3737

3838
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3939
vectorDrawables {

app/src/androidTest/java/com/anthonyla/paperize/core/util/WallpaperUtilInstrumentedTest.kt

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package com.anthonyla.paperize.core.util
22

3+
import android.app.WallpaperManager
4+
import android.content.res.Configuration
35
import android.graphics.Bitmap
46
import android.graphics.Color
57
import android.hardware.display.DisplayManager
68
import android.net.Uri
79
import android.os.Build
8-
import android.content.res.Configuration
10+
import android.os.SystemClock
911
import androidx.exifinterface.media.ExifInterface
1012
import androidx.test.core.app.ApplicationProvider
1113
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -225,6 +227,55 @@ class WallpaperUtilInstrumentedTest {
225227
result.recycle()
226228
}
227229

230+
@Test
231+
fun staticWallpaperChangesRefreshAospWallpaperColors() {
232+
assumeTrue(
233+
"Wallpaper color extraction test is destructive and must run only on an emulator",
234+
Build.FINGERPRINT.contains("/emu") ||
235+
Build.FINGERPRINT.contains("generic") ||
236+
Build.MODEL.contains("Emulator", ignoreCase = true) ||
237+
Build.MODEL.contains("sdk", ignoreCase = true)
238+
)
239+
val wallpaperManager = WallpaperManager.getInstance(context)
240+
val red = mutableBitmap(256, 256, Color.rgb(230, 20, 20))
241+
val blue = mutableBitmap(256, 256, Color.rgb(20, 20, 230))
242+
243+
try {
244+
wallpaperManager.setBitmapChecked(red, WallpaperManager.FLAG_SYSTEM)
245+
val redPrimary = awaitPrimaryWallpaperColor(wallpaperManager) { color ->
246+
Color.red(color) > Color.blue(color) * 2
247+
}
248+
249+
wallpaperManager.setBitmapChecked(blue, WallpaperManager.FLAG_SYSTEM)
250+
val bluePrimary = awaitPrimaryWallpaperColor(wallpaperManager) { color ->
251+
Color.blue(color) > Color.red(color) * 2
252+
}
253+
254+
assertTrue(Color.red(redPrimary) > Color.blue(redPrimary))
255+
assertTrue(Color.blue(bluePrimary) > Color.red(bluePrimary))
256+
} finally {
257+
red.recycle()
258+
blue.recycle()
259+
}
260+
}
261+
262+
private fun awaitPrimaryWallpaperColor(
263+
wallpaperManager: WallpaperManager,
264+
predicate: (Int) -> Boolean
265+
): Int {
266+
val deadline = SystemClock.uptimeMillis() + 10_000L
267+
var lastColor: Int? = null
268+
while (SystemClock.uptimeMillis() < deadline) {
269+
lastColor = wallpaperManager
270+
.getWallpaperColors(WallpaperManager.FLAG_SYSTEM)
271+
?.primaryColor
272+
?.toArgb()
273+
if (lastColor != null && predicate(lastColor)) return lastColor
274+
SystemClock.sleep(100L)
275+
}
276+
throw AssertionError("Wallpaper colors did not refresh; last primary color was $lastColor")
277+
}
278+
228279
private fun mutableBitmap(width: Int, height: Int, color: Int): Bitmap =
229280
Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).apply {
230281
eraseColor(color)

0 commit comments

Comments
 (0)