Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c7ae9771a | ||
|
|
f1c6f3e36f | ||
|
|
a04da0801a | ||
|
|
9ef38cb086 | ||
|
|
3fe29db05b | ||
|
|
09626a9226 | ||
|
|
e822b18624 | ||
|
|
5bb7ba9399 | ||
|
|
c794ea0b60 | ||
|
|
4a72f8dbc0 | ||
|
|
ef61d3b028 | ||
|
|
ead7bd36fe | ||
|
|
240f30b187 | ||
|
|
24eb0bc20c | ||
|
|
b0bf5d875a | ||
|
|
cea07a185b | ||
|
|
2db9a330ad | ||
|
|
3f952796a3 | ||
|
|
350addbefa | ||
|
|
23c8a82390 | ||
|
|
c063814b93 | ||
|
|
3c4fa741c6 | ||
|
|
49da709574 | ||
|
|
177f3e21bf | ||
|
|
82ce78fc0e | ||
|
|
346a4640c1 | ||
|
|
d9998715cb | ||
|
|
842a77b8c5 | ||
|
|
4b235d07ba | ||
|
|
f615dfe527 | ||
|
|
92e530432f | ||
|
|
4a0f0f371a | ||
|
|
333d0692e8 | ||
|
|
241d0ce861 | ||
|
|
77d2deae0c | ||
|
|
7cc31f43b1 | ||
|
|
bdd89a27b9 | ||
|
|
77481770a6 | ||
|
|
c9f616e1c0 | ||
|
|
167f82edea | ||
|
|
8032f13f0e | ||
|
|
71fe478d54 | ||
|
|
e3af22bbeb | ||
|
|
87ee6b7041 | ||
|
|
b6b26f6732 | ||
|
|
ab1a9ab5af | ||
|
|
0fe8dc724e | ||
|
|
b5836bea95 | ||
|
|
3fd427afc1 | ||
|
|
d2bd26ba38 | ||
|
|
6ffeebb6a2 | ||
|
|
ccd4bab93d | ||
|
|
bbaa0cf9ee | ||
|
|
19b65999fd | ||
|
|
04ef14e5f1 | ||
|
|
c500fb773e | ||
|
|
8c325ed5de | ||
|
|
4fde150bbe | ||
|
|
cebb14e60b | ||
|
|
0fc6a38b12 | ||
|
|
17340fb74e | ||
|
|
9ec4c5d20b | ||
|
|
a8164da137 | ||
|
|
886b7cb27e | ||
|
|
9f67243f0d | ||
|
|
78d7e0972b | ||
|
|
683f434030 | ||
|
|
df0ac6191f | ||
|
|
1d3ad86341 | ||
|
|
bac5c662ef | ||
|
|
8d447f0068 | ||
|
|
7a2b67ed57 | ||
|
|
c55b8f44f0 | ||
|
|
43806aa694 | ||
|
|
90efcaaae1 | ||
|
|
8fdb0920e6 | ||
|
|
e74f6a258a | ||
|
|
54e8b1816f | ||
|
|
efa3cbc6e1 | ||
|
|
12165d41c2 | ||
|
|
fe3aa1bda8 | ||
|
|
83ae1c721e | ||
|
|
50cae3e04e | ||
|
|
e6b2a2af18 | ||
|
|
02671c0804 | ||
|
|
a3c57bf6ef | ||
|
|
72c8d1313f | ||
|
|
89ca480c0c | ||
|
|
b2a6b17c5a | ||
|
|
a6926f25bc | ||
|
|
335a3f7084 | ||
|
|
58c35c1bbb | ||
|
|
27000d9fa2 | ||
|
|
c5ed7684cf | ||
|
|
d8b92d5cdb | ||
|
|
c7989db3c7 | ||
|
|
353e3c3610 |
No files matched your search
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[Bug] <BUG_NAME>"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. Pixel 32 Pro]
|
||||
- OS: [e.g. OneUI 21]
|
||||
- Version [e.g. v2.1.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature request] <FEATURE_NAME>"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
<div align="center">
|
||||
<img style="display: block; border-radius: 9999px;" src="https://github.com/user-attachments/assets/e8fb14f5-ec8e-440e-a2ac-8065322b0e28">
|
||||
<h1>Paperize</h1>
|
||||
<h1>
|
||||
Paperize
|
||||
<p><img style="display: block; border-radius: 9999px;" src="https://img.shields.io/github/downloads/Anthonyy232/Paperize/total"></p>
|
||||
</h1>
|
||||
<p align="center"></p>
|
||||
<p>Paperize is a dynamic wallpaper changer application designed to keep your device's aesthetic fresh and exciting</p>
|
||||
</div>
|
||||
@@ -45,7 +48,7 @@ I would love some help translating the app! Help me out with that [here](https:/
|
||||
|
||||
- [Kotlin](https://kotlinlang.org/) - A programming language that is used for Android app development
|
||||
- [Jetpack Compose](https://developer.android.com/develop/ui/compose) - A declarative UI toolkit for building native Android UI
|
||||
- [Material 3](https://m3.material.io/) - A UI design system git for modern UI guidelines
|
||||
- [Material 3](https://m3.material.io/) - A UI design system for modern UI guidelines
|
||||
- [Dagger Hilt](https://dagger.dev/hilt/) - A dependency injection library
|
||||
- [Room](https://developer.android.com/training/data-storage/room) - A persistence library that provides an abstraction layer over SQLite interfacing with Kotlin
|
||||
- [AboutLibraries](https://github.com/mikepenz/AboutLibraries) - A library to offer some information of libraries
|
||||
|
||||
+24
-23
@@ -20,7 +20,7 @@ android {
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 31
|
||||
versionName = "2.1.0"
|
||||
versionName = "2.2.0"
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
useSupportLibrary = true
|
||||
@@ -84,48 +84,49 @@ androidComponents {
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.13.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.4")
|
||||
implementation("androidx.activity:activity-compose:1.9.1")
|
||||
implementation(platform("androidx.compose:compose-bom:2024.08.00"))
|
||||
implementation("androidx.compose.ui:ui:1.7.0-rc01")
|
||||
implementation("androidx.compose.ui:ui-graphics:1.7.0-rc01")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.7.0-rc01")
|
||||
implementation("androidx.compose.material3:material3:1.3.0-rc01")
|
||||
implementation("androidx.navigation:navigation-compose:2.8.0-rc01")
|
||||
implementation("androidx.compose.material:material:1.7.0-rc01")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.6")
|
||||
implementation("androidx.activity:activity-compose:1.9.2")
|
||||
implementation(platform("androidx.compose:compose-bom:2024.09.02"))
|
||||
implementation("androidx.compose.ui:ui:1.7.2")
|
||||
implementation("androidx.compose.ui:ui-graphics:1.7.2")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.7.2")
|
||||
implementation("androidx.compose.material3:material3:1.3.0")
|
||||
implementation("androidx.navigation:navigation-compose:2.8.1")
|
||||
implementation("androidx.compose.material:material:1.7.2")
|
||||
implementation("androidx.datastore:datastore:1.1.1")
|
||||
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
||||
implementation("androidx.compose.material:material-icons-extended:1.7.0-rc01")
|
||||
implementation("androidx.compose.material:material-icons-extended:1.7.2")
|
||||
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
|
||||
implementation("androidx.compose.animation:animation:1.7.0-rc01")
|
||||
implementation("androidx.core:core-splashscreen:1.2.0-alpha01")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.4")
|
||||
implementation("androidx.compose.animation:animation:1.7.2")
|
||||
implementation("androidx.core:core-splashscreen:1.2.0-alpha02")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.6")
|
||||
implementation("com.google.code.gson:gson:2.11.0")
|
||||
implementation("androidx.documentfile:documentfile:1.1.0-alpha01")
|
||||
implementation("net.engawapg.lib:zoomable:2.0.0-beta01")
|
||||
implementation("com.github.skydoves:landscapist-glide:2.3.6")
|
||||
implementation("androidx.work:work-runtime-ktx:2.10.0-alpha02")
|
||||
implementation("com.github.skydoves:landscapist-glide:2.3.8")
|
||||
implementation("androidx.work:work-runtime-ktx:2.10.0-alpha04")
|
||||
implementation("androidx.hilt:hilt-work:1.2.0")
|
||||
implementation("com.airbnb.android:lottie-compose:6.5.1")
|
||||
implementation("com.google.accompanist:accompanist-permissions:0.35.0-alpha")
|
||||
implementation("com.airbnb.android:lottie-compose:6.5.2")
|
||||
implementation("com.google.accompanist:accompanist-permissions:0.36.0")
|
||||
implementation("com.mikepenz:aboutlibraries-core:11.2.3")
|
||||
implementation("com.mikepenz:aboutlibraries-compose-m3:11.2.3")
|
||||
implementation("androidx.compose.foundation:foundation:1.7.0-rc01")
|
||||
implementation("androidx.compose.foundation:foundation:1.7.2")
|
||||
implementation("com.github.nanihadesuka:LazyColumnScrollbar:2.2.0")
|
||||
implementation("com.joaomgcd:taskerpluginlibrary:0.4.10")
|
||||
implementation("com.google.ar.sceneform:filament-android:1.17.1")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.0-rc01")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.7.0-rc01")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.0-rc01")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.2")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.7.2")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.2")
|
||||
implementation("com.google.dagger:hilt-android:2.52")
|
||||
ksp("com.google.dagger:hilt-android-compiler:2.52")
|
||||
implementation("androidx.room:room-runtime:2.6.1")
|
||||
ksp("androidx.room:room-compiler:2.6.1")
|
||||
implementation("androidx.room:room-ktx:2.6.1")
|
||||
implementation("com.lazygeniouz:dfc:1.0.8")
|
||||
implementation ("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.2")
|
||||
implementation ("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
|
||||
implementation("com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3")
|
||||
}
|
||||
|
||||
|
||||
@@ -3,5 +3,6 @@ package com.anthonyla.paperize.core
|
||||
enum class ScalingConstants {
|
||||
FIT,
|
||||
FILL,
|
||||
STRETCH
|
||||
STRETCH,
|
||||
NONE
|
||||
}
|
||||
@@ -84,7 +84,6 @@ object ScreenMetricsCompat {
|
||||
private val api: Api =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) ApiLevel30() else Api()
|
||||
fun getScreenSize(context: Context): Size = api.getScreenSize(context)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private open class Api {
|
||||
open fun getScreenSize(context: Context): Size {
|
||||
@@ -457,6 +456,7 @@ fun processBitmap(
|
||||
ScalingConstants.FILL -> fillBitmap(processedBitmap, width, height)
|
||||
ScalingConstants.FIT -> fitBitmap(processedBitmap, width, height)
|
||||
ScalingConstants.STRETCH -> stretchBitmap(processedBitmap, width, height)
|
||||
ScalingConstants.NONE -> processedBitmap
|
||||
}
|
||||
|
||||
// Apply brightness effect
|
||||
|
||||
+2
-1
@@ -54,9 +54,10 @@ fun PreviewItem(
|
||||
ScalingConstants.FILL -> ContentScale.FillHeight
|
||||
ScalingConstants.FIT -> ContentScale.FillWidth
|
||||
ScalingConstants.STRETCH -> ContentScale.FillBounds
|
||||
ScalingConstants.NONE -> ContentScale.Crop
|
||||
},
|
||||
requestSize = IntSize(300, 300),
|
||||
alignment = Alignment.Center,
|
||||
alignment = if (scaling == ScalingConstants.NONE) Alignment.CenterStart else Alignment.Center,
|
||||
colorFilter = if (darken && darkenPercentage < 100) {
|
||||
ColorFilter.tint(
|
||||
Color.Black.copy(alpha = (100 - darkenPercentage).toFloat().div(100f)),
|
||||
|
||||
+11
-3
@@ -61,13 +61,15 @@ fun WallpaperPreviewAndScale(
|
||||
ScalingConstants.FILL -> 0
|
||||
ScalingConstants.FIT -> 1
|
||||
ScalingConstants.STRETCH -> 2
|
||||
ScalingConstants.NONE -> 3
|
||||
}
|
||||
)
|
||||
}
|
||||
val options = listOf(
|
||||
stringResource(R.string.fill),
|
||||
stringResource(R.string.fit),
|
||||
stringResource(R.string.stretch)
|
||||
stringResource(R.string.stretch),
|
||||
stringResource(R.string.none)
|
||||
)
|
||||
|
||||
Surface(
|
||||
@@ -87,9 +89,13 @@ fun WallpaperPreviewAndScale(
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
val modifier = if (lockEnabled && homeEnabled) {
|
||||
Modifier.weight(1f).padding(8.dp)
|
||||
Modifier
|
||||
.weight(1f)
|
||||
.padding(8.dp)
|
||||
} else {
|
||||
Modifier.fillMaxSize(0.5f).padding(8.dp)
|
||||
Modifier
|
||||
.fillMaxSize(0.5f)
|
||||
.padding(8.dp)
|
||||
}
|
||||
|
||||
if (lockEnabled) {
|
||||
@@ -150,6 +156,7 @@ fun WallpaperPreviewAndScale(
|
||||
0 -> ScalingConstants.FILL
|
||||
1 -> ScalingConstants.FIT
|
||||
2 -> ScalingConstants.STRETCH
|
||||
3 -> ScalingConstants.NONE
|
||||
else -> ScalingConstants.FILL
|
||||
}
|
||||
) },
|
||||
@@ -164,6 +171,7 @@ fun WallpaperPreviewAndScale(
|
||||
0 -> painterResource(id = R.drawable.fill)
|
||||
1 -> painterResource(id = R.drawable.fit)
|
||||
2 -> painterResource(id = R.drawable.stretch)
|
||||
3 -> painterResource(id = R.drawable.none)
|
||||
else -> painterResource(id = R.drawable.fill)
|
||||
},
|
||||
contentDescription = null,
|
||||
|
||||
+9
-2
@@ -4,6 +4,8 @@ import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import com.anthonyla.paperize.feature.wallpaper.wallpaper_alarmmanager.WallpaperBootAndChangeReceiver
|
||||
import com.joaomgcd.taskerpluginlibrary.action.TaskerPluginRunnerActionNoOutputOrInput
|
||||
import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfig
|
||||
@@ -18,6 +20,9 @@ import com.joaomgcd.taskerpluginlibrary.runner.TaskerPluginResultSucess
|
||||
*/
|
||||
class ShortcutHelper(config: TaskerPluginConfig<Unit>) : TaskerPluginConfigHelperNoOutputOrInput<ShortcutActionRunner>(config) {
|
||||
override val runnerClass: Class<ShortcutActionRunner> get() = ShortcutActionRunner::class.java
|
||||
override fun addToStringBlurb(input: TaskerInput<Unit>, blurbBuilder: StringBuilder) {
|
||||
blurbBuilder.append("Changes the wallpaper")
|
||||
}
|
||||
}
|
||||
|
||||
class ActivityConfigBasicAction : Activity(), TaskerPluginConfigNoInput {
|
||||
@@ -31,8 +36,10 @@ class ActivityConfigBasicAction : Activity(), TaskerPluginConfigNoInput {
|
||||
|
||||
class ShortcutActionRunner : TaskerPluginRunnerActionNoOutputOrInput() {
|
||||
override fun run(context: Context, input: TaskerInput<Unit>): TaskerPluginResult<Unit> {
|
||||
val intent = Intent(context, WallpaperBootAndChangeReceiver::class.java)
|
||||
context.sendBroadcast(intent)
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
val intent = Intent(context, WallpaperBootAndChangeReceiver::class.java)
|
||||
context.sendBroadcast(intent)
|
||||
}
|
||||
return TaskerPluginResultSucess()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -15,5 +15,5 @@ data class WallpaperAlarmItem(
|
||||
val lockInterval: Int = SettingsConstants.WALLPAPER_CHANGE_INTERVAL_DEFAULT,
|
||||
val scheduleSeparately: Boolean = false,
|
||||
val setHome : Boolean = false,
|
||||
val setLock : Boolean = false
|
||||
val setLock : Boolean = false,
|
||||
)
|
||||
+1
-1
@@ -8,7 +8,7 @@ interface WallpaperAlarmScheduler {
|
||||
* @param changeImmediate whether to change the wallpaper immediately or just schedule the alarm
|
||||
* @param cancelImmediate whether to cancel all alarms before scheduling the new one
|
||||
*/
|
||||
fun scheduleWallpaperAlarm(wallpaperAlarmItem: WallpaperAlarmItem, origin: Int? = null, changeImmediate: Boolean = false, cancelImmediate: Boolean = false)
|
||||
fun scheduleWallpaperAlarm(wallpaperAlarmItem: WallpaperAlarmItem, origin: Int? = null, changeImmediate: Boolean = false, cancelImmediate: Boolean = false, setAlarm: Boolean = true)
|
||||
|
||||
/**
|
||||
* Update the wallpaper alarm with new times without changing the wallpaper
|
||||
|
||||
+14
-6
@@ -24,7 +24,13 @@ class WallpaperAlarmSchedulerImpl (
|
||||
/**
|
||||
* Schedules the wallpaper alarm based on the origin and changeImmediate
|
||||
*/
|
||||
override fun scheduleWallpaperAlarm(wallpaperAlarmItem: WallpaperAlarmItem, origin: Int?, changeImmediate: Boolean, cancelImmediate: Boolean) {
|
||||
override fun scheduleWallpaperAlarm(
|
||||
wallpaperAlarmItem: WallpaperAlarmItem,
|
||||
origin: Int?,
|
||||
changeImmediate: Boolean,
|
||||
cancelImmediate: Boolean,
|
||||
setAlarm: Boolean,
|
||||
) {
|
||||
// Cancel previous alarms before setting new ones to prevent stale alarms
|
||||
if (cancelImmediate) cancelWallpaperAlarm()
|
||||
else {
|
||||
@@ -44,25 +50,27 @@ class WallpaperAlarmSchedulerImpl (
|
||||
when (origin) {
|
||||
Type.LOCK.ordinal -> {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.LOCK)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, origin)
|
||||
if (setAlarm) scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, origin)
|
||||
}
|
||||
Type.HOME.ordinal -> {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, origin)
|
||||
if (setAlarm) scheduleWallpaper(wallpaperAlarmItem, Type.HOME, origin)
|
||||
}
|
||||
null -> {
|
||||
if (changeImmediate) {
|
||||
changeWallpaperImmediate(wallpaperAlarmItem, Type.LOCK)
|
||||
changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
}
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, Type.LOCK.ordinal)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, Type.HOME.ordinal)
|
||||
if (setAlarm) {
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, Type.LOCK.ordinal)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, Type.HOME.ordinal)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.SINGLE)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.SINGLE)
|
||||
if (setAlarm) scheduleWallpaper(wallpaperAlarmItem, Type.SINGLE)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-6
@@ -25,7 +25,9 @@ class WallpaperBootAndChangeReceiver : BroadcastReceiver() {
|
||||
try {
|
||||
val scheduler = WallpaperAlarmSchedulerImpl(context)
|
||||
val toggleChanger = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_CHANGER) ?: false
|
||||
if (toggleChanger) {
|
||||
val selectedAlbum = settingsDataStoreImpl.getString(SettingsConstants.HOME_ALBUM_NAME) ?: settingsDataStoreImpl.getString(SettingsConstants.LOCK_ALBUM_NAME) ?: ""
|
||||
|
||||
if (selectedAlbum.isNotEmpty()) {
|
||||
val homeInterval = settingsDataStoreImpl.getInt(SettingsConstants.HOME_WALLPAPER_CHANGE_INTERVAL) ?: SettingsConstants.WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val lockInterval = settingsDataStoreImpl.getInt(SettingsConstants.LOCK_WALLPAPER_CHANGE_INTERVAL) ?: SettingsConstants.WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val scheduleSeparately = settingsDataStoreImpl.getBoolean(SettingsConstants.SCHEDULE_SEPARATELY) ?: false
|
||||
@@ -38,11 +40,14 @@ class WallpaperBootAndChangeReceiver : BroadcastReceiver() {
|
||||
setLock = setLock,
|
||||
setHome = setHome
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(
|
||||
wallpaperAlarmItem = it,
|
||||
origin = null,
|
||||
changeImmediate = true,
|
||||
cancelImmediate = true)
|
||||
alarmItem.let{
|
||||
scheduler.scheduleWallpaperAlarm(
|
||||
wallpaperAlarmItem = it,
|
||||
origin = null,
|
||||
changeImmediate = true,
|
||||
cancelImmediate = true,
|
||||
setAlarm = toggleChanger
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
+4
-3
@@ -42,6 +42,7 @@ import java.time.format.DateTimeFormatter
|
||||
import java.time.format.FormatStyle
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
/**
|
||||
* Service for changing home screen
|
||||
*/
|
||||
@@ -182,10 +183,9 @@ class HomeWallpaperService: Service() {
|
||||
return
|
||||
}
|
||||
else {
|
||||
val enableChanger = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_CHANGER) ?: false
|
||||
val setHome = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_HOME_WALLPAPER) ?: false
|
||||
val setLock = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_LOCK_WALLPAPER) ?: false
|
||||
if (!enableChanger || (!setHome && !setLock)) {
|
||||
if (!setHome && !setLock) {
|
||||
onDestroy()
|
||||
return
|
||||
}
|
||||
@@ -571,7 +571,7 @@ class HomeWallpaperService: Service() {
|
||||
val size = getDeviceScreenSize(context)
|
||||
val bitmap = retrieveBitmap(context, wallpaper, size.width, size.height)
|
||||
if (bitmap == null) return false
|
||||
else {
|
||||
else if (wallpaperManager.isSetWallpaperAllowed) {
|
||||
processBitmap(size.width, size.height, bitmap, darken, darkenPercent, scaling, blur, blurPercent, vignette, vignettePercent)?.let { image ->
|
||||
wallpaperManager.setBitmap(image, null, true, WallpaperManager.FLAG_SYSTEM)
|
||||
wallpaperManager.forgetLoadedWallpaper()
|
||||
@@ -580,6 +580,7 @@ class HomeWallpaperService: Service() {
|
||||
bitmap.recycle()
|
||||
return true
|
||||
}
|
||||
else return false
|
||||
} catch (e: IOException) {
|
||||
Log.e("PaperizeWallpaperChanger", "Error setting wallpaper", e)
|
||||
return false
|
||||
|
||||
+3
-3
@@ -181,10 +181,9 @@ class LockWallpaperService: Service() {
|
||||
return
|
||||
}
|
||||
else {
|
||||
val enableChanger = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_CHANGER) ?: false
|
||||
val setHome = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_HOME_WALLPAPER) ?: false
|
||||
val setLock = settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_LOCK_WALLPAPER) ?: false
|
||||
if (!enableChanger || (!setHome && !setLock)) {
|
||||
if (!setHome && !setLock) {
|
||||
onDestroy()
|
||||
return
|
||||
}
|
||||
@@ -494,7 +493,7 @@ class LockWallpaperService: Service() {
|
||||
val size = getDeviceScreenSize(context)
|
||||
val bitmap = retrieveBitmap(context, wallpaper, size.width, size.height)
|
||||
if (bitmap == null) return false
|
||||
else {
|
||||
else if (wallpaperManager.isSetWallpaperAllowed) {
|
||||
processBitmap(size.width, size.height, bitmap, darken, darkenPercent, scaling, blur, blurPercent, vignette, vignettePercent)?.let { image ->
|
||||
wallpaperManager.setBitmap(image, null, true, WallpaperManager.FLAG_LOCK)
|
||||
wallpaperManager.forgetLoadedWallpaper()
|
||||
@@ -503,6 +502,7 @@ class LockWallpaperService: Service() {
|
||||
bitmap.recycle()
|
||||
return true
|
||||
}
|
||||
else return false
|
||||
} catch (e: IOException) {
|
||||
Log.e("PaperizeWallpaperChanger", "Error setting wallpaper", e)
|
||||
return false
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:viewportWidth="128"
|
||||
android:viewportHeight="128">
|
||||
<path
|
||||
android:pathData="M29.66,113.89L29.66,113.89L98.34,113.89L98.34,113.89L98.34,15.04L98.34,15.04L29.66,15.04L29.66,15.04L29.66,113.89Z"
|
||||
android:fillColor="#e1e0a6"/>
|
||||
<path
|
||||
android:pathData="M79.94,109.3C79.94,111.06 78.5,112.5 76.74,112.5L38.39,112.5C36.63,112.5 35.19,111.06 35.19,109.3C35.19,109.3 55.8,82.13 57.56,82.13C59.32,82.13 79.93,109.3 79.93,109.3Z"
|
||||
android:fillColor="#b8ca43"/>
|
||||
<path
|
||||
android:pathData="M76.14,113.89L37.91,113.89C35.26,113.89 33.12,111.74 33.12,109.1L33.12,108.62C33.12,108.62 33.44,108.14 33.44,108.14C54.47,80.33 56.07,80.33 57.02,80.33C57.98,80.33 59.57,80.33 80.6,108.14L80.92,108.62L80.92,109.1C80.92,111.82 78.85,113.89 76.14,113.89L76.14,113.89ZM36.18,109.53C36.34,110.17 36.98,110.65 37.78,110.65L76.13,110.65C76.93,110.65 77.41,110.17 77.73,109.53C70.38,99.94 59.99,86.68 56.96,83.8C53.92,86.68 43.54,99.94 36.19,109.53Z"
|
||||
android:fillColor="#231c1c"/>
|
||||
<path
|
||||
android:pathData="M93.63,108.73C93.63,110.38 92.27,111.83 90.5,111.83L53.46,111.83C51.79,111.83 50.33,110.49 50.33,108.73C50.33,108.73 70.26,82.81 71.93,82.81C73.7,82.81 93.63,108.73 93.63,108.73Z"
|
||||
android:fillColor="#b8ca43"/>
|
||||
<path
|
||||
android:pathData="M90.84,113.89L52.87,113.89C50.52,113.89 48.6,111.97 48.6,109.62L48.6,109.3C48.6,109.3 48.81,108.98 48.81,108.98C69.56,81.75 71.16,81.75 71.8,81.75C72.44,81.75 74.05,81.75 94.79,108.98L95,109.3L95,109.62C95.11,111.97 93.18,113.89 90.83,113.89ZM50.91,109.76C51.02,110.72 51.98,111.58 52.94,111.58L90.85,111.58C91.92,111.58 92.77,110.83 92.88,109.76C84.23,98.33 74.3,85.84 71.95,83.81C69.6,85.84 59.67,98.33 50.91,109.76Z"
|
||||
android:fillColor="#231c1c"/>
|
||||
<path
|
||||
android:pathData="M53.55,45.67C58.25,45.67 61.79,40.68 59.14,35.7C58.13,33.81 56.12,32.67 53.98,32.67L53.37,32.67C50.82,32.67 48.48,34.19 47.55,36.57C45.72,41.24 49.11,45.67 53.54,45.67L53.54,45.67Z"
|
||||
android:fillColor="#f29b54"/>
|
||||
<path
|
||||
android:pathData="M60.87,39.62C60.87,44.09 57.35,47.61 52.88,47.61C48.41,47.61 44.89,44.09 44.89,39.62C44.89,35.15 48.41,31.63 52.88,31.63C57.35,31.63 60.87,35.15 60.87,39.62ZM48.09,39.62C48.09,42.34 50.17,44.41 52.88,44.41C55.59,44.41 57.67,42.33 57.67,39.62C57.67,36.91 55.59,34.83 52.88,34.83C50.17,34.83 48.09,36.91 48.09,39.62Z"
|
||||
android:fillColor="#231c1c"/>
|
||||
</vector>
|
||||
@@ -163,4 +163,5 @@
|
||||
<string name="unselected_album">Unselected album</string>
|
||||
<string name="lock">Lock</string>
|
||||
<string name="change_vignette">Change Vignette</string>
|
||||
<string name="none">None</string>
|
||||
</resources>
|
||||
+3
-3
@@ -6,12 +6,12 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.android.application") version "8.6.0" apply false
|
||||
id("com.android.library") version "8.6.0" apply false
|
||||
id("com.android.application") version "8.6.1" apply false
|
||||
id("com.android.library") version "8.6.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
|
||||
id ("org.jetbrains.kotlin.plugin.compose") version "2.0.20" apply false
|
||||
id("com.google.dagger.hilt.android") version "2.52" apply false
|
||||
id("com.google.devtools.ksp") version "2.0.20-1.0.24" apply false
|
||||
id("com.google.devtools.ksp") version "2.0.20-1.0.25" apply false
|
||||
id ("com.mikepenz.aboutlibraries.plugin") version "11.2.3" apply false
|
||||
id ("org.jetbrains.kotlin.plugin.serialization") version "2.0.20" apply false
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
distributionSha256Sum=1541fa36599e12857140465f3c91a97409b4512501c26f9631fb113e392c5bd1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in new issue
Block a user