Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e20f211f2 | ||
|
|
6f4a2bec97 | ||
|
|
85e5e3007b | ||
|
|
4760ab01d5 | ||
|
|
d8fc106a89 | ||
|
|
f4bf2786de | ||
|
|
c2e7e38f97 | ||
|
|
343d358d22 | ||
|
|
c219aa2b30 | ||
|
|
5ba325b93f | ||
|
|
dc1a65f234 | ||
|
|
48a198091e | ||
|
|
81020c9ba0 | ||
|
|
c47f3957bf |
No files matched your search
Generated
+1
-1
@@ -4,6 +4,6 @@
|
||||
<option name="jvmTarget" value="1.8" />
|
||||
</component>
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.22" />
|
||||
<option name="version" value="2.0.0" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+263
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="direct_access_persist.xml">
|
||||
<option name="deviceSelectionList">
|
||||
<list>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="27" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="F01L" />
|
||||
<option name="id" value="F01L" />
|
||||
<option name="manufacturer" value="FUJITSU" />
|
||||
<option name="name" value="F-01L" />
|
||||
<option name="screenDensity" value="360" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1280" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="28" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="SH-01L" />
|
||||
<option name="id" value="SH-01L" />
|
||||
<option name="manufacturer" value="SHARP" />
|
||||
<option name="name" value="AQUOS sense2 SH-01L" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2160" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="a51" />
|
||||
<option name="id" value="a51" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy A51" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="akita" />
|
||||
<option name="id" value="akita" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="b0q" />
|
||||
<option name="id" value="b0q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S22 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="32" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="bluejay" />
|
||||
<option name="id" value="bluejay" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="crownqlteue" />
|
||||
<option name="id" value="crownqlteue" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Note9" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2220" />
|
||||
<option name="screenY" value="1080" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="dm3q" />
|
||||
<option name="id" value="dm3q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S23 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix" />
|
||||
<option name="id" value="felix" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix_camera" />
|
||||
<option name="id" value="felix_camera" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="gts8uwifi" />
|
||||
<option name="id" value="gts8uwifi" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Tab S8 Ultra" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1848" />
|
||||
<option name="screenY" value="2960" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="husky" />
|
||||
<option name="id" value="husky" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8 Pro" />
|
||||
<option name="screenDensity" value="390" />
|
||||
<option name="screenX" value="1008" />
|
||||
<option name="screenY" value="2244" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="motorola" />
|
||||
<option name="codename" value="java" />
|
||||
<option name="id" value="java" />
|
||||
<option name="manufacturer" value="Motorola" />
|
||||
<option name="name" value="G20" />
|
||||
<option name="screenDensity" value="280" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1600" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="lynx" />
|
||||
<option name="id" value="lynx" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="oriole" />
|
||||
<option name="id" value="oriole" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="panther" />
|
||||
<option name="id" value="panther" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="q2q" />
|
||||
<option name="id" value="q2q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Z Fold3" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1768" />
|
||||
<option name="screenY" value="2208" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="q5q" />
|
||||
<option name="id" value="q5q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Z Fold5" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1812" />
|
||||
<option name="screenY" value="2176" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="r11" />
|
||||
<option name="id" value="r11" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Watch" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="384" />
|
||||
<option name="screenY" value="384" />
|
||||
<option name="type" value="WEAR_OS" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="redfin" />
|
||||
<option name="id" value="redfin" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 5" />
|
||||
<option name="screenDensity" value="440" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2340" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="shiba" />
|
||||
<option name="id" value="shiba" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="tangorpro" />
|
||||
<option name="id" value="tangorpro" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Tablet" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1600" />
|
||||
<option name="screenY" value="2560" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="x1q" />
|
||||
<option name="id" value="x1q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S20" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3200" />
|
||||
</PersistentDeviceSelectionData>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -12,7 +12,7 @@
|
||||
## Features
|
||||
- **Dynamic Wallpaper Changer**: Set your wallpaper to change at specific time intervals
|
||||
- **Supports Various Image Types**: Paperize can handle a wide range of image types
|
||||
- JPEG, PNG, AVIF, WEBP
|
||||
- Including: JPEG, PNG, AVIF, WEBP
|
||||
- **Folder Support**: Organize your wallpapers into folders for auto-updating
|
||||
- **Home and Lock Screen Wallpaper**: Choose to change either your home screen, lock screen, or both
|
||||
- **On-Device Storage**: All your wallpapers and settings are stored on your device
|
||||
|
||||
+28
-21
@@ -3,8 +3,9 @@ plugins {
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("com.google.devtools.ksp")
|
||||
id("com.google.dagger.hilt.android")
|
||||
id ("com.mikepenz.aboutlibraries.plugin")
|
||||
id ("org.jetbrains.kotlin.plugin.serialization")
|
||||
id("com.mikepenz.aboutlibraries.plugin")
|
||||
id("org.jetbrains.kotlin.plugin.serialization")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
ksp {
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
@@ -18,8 +19,8 @@ android {
|
||||
applicationId = "com.anthonyla.paperize"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 19
|
||||
versionName = "1.5.1"
|
||||
versionCode = 23
|
||||
versionName = "1.5.5"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
@@ -60,6 +61,12 @@ android {
|
||||
androidResources {
|
||||
generateLocaleConfig = true
|
||||
}
|
||||
ndkVersion = "26.3.11579264"
|
||||
buildToolsVersion = "34.0.0"
|
||||
|
||||
aboutLibraries {
|
||||
excludeFields = arrayOf("generated")
|
||||
}
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
@@ -70,47 +77,47 @@ androidComponents {
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.13.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.2")
|
||||
implementation("androidx.activity:activity-compose:1.9.0")
|
||||
implementation(platform("androidx.compose:compose-bom:2024.05.00"))
|
||||
implementation("androidx.compose.ui:ui:1.7.0-beta02")
|
||||
implementation("androidx.compose.ui:ui-graphics:1.7.0-beta02")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.7.0-beta02")
|
||||
implementation("androidx.compose.material3:material3:1.3.0-beta02")
|
||||
implementation("androidx.navigation:navigation-compose:2.8.0-beta02")
|
||||
implementation("androidx.compose.material:material:1.7.0-beta02")
|
||||
implementation(platform("androidx.compose:compose-bom:2024.06.00"))
|
||||
implementation("androidx.compose.ui:ui:1.7.0-beta03")
|
||||
implementation("androidx.compose.ui:ui-graphics:1.7.0-beta03")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.7.0-beta03")
|
||||
implementation("androidx.compose.material3:material3:1.3.0-beta03")
|
||||
implementation("androidx.navigation:navigation-compose:2.8.0-beta03")
|
||||
implementation("androidx.compose.material:material:1.7.0-beta03")
|
||||
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-beta02")
|
||||
implementation("androidx.compose.material:material-icons-extended:1.7.0-beta03")
|
||||
implementation("com.google.accompanist:accompanist-adaptive:0.34.0")
|
||||
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
|
||||
implementation("androidx.compose.animation:animation:1.7.0-beta02")
|
||||
implementation("androidx.compose.animation:animation:1.7.0-beta03")
|
||||
implementation("androidx.core:core-splashscreen:1.2.0-alpha01")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.2")
|
||||
implementation("com.google.code.gson:gson:2.11.0")
|
||||
implementation("androidx.documentfile:documentfile:1.1.0-alpha01")
|
||||
implementation("net.engawapg.lib:zoomable:1.7.0-beta02")
|
||||
implementation("com.github.skydoves:landscapist-glide:2.3.3")
|
||||
implementation("com.github.skydoves:landscapist-glide:2.3.4")
|
||||
implementation("androidx.work:work-runtime-ktx:2.10.0-alpha02")
|
||||
implementation("androidx.hilt:hilt-work:1.2.0")
|
||||
implementation("com.airbnb.android:lottie-compose:6.4.1")
|
||||
implementation("com.google.accompanist:accompanist-permissions:0.35.0-alpha")
|
||||
implementation("com.mikepenz:aboutlibraries-core:11.2.1")
|
||||
implementation("com.mikepenz:aboutlibraries-compose-m3:11.2.1")
|
||||
implementation("androidx.compose.foundation:foundation:1.7.0-beta02")
|
||||
implementation("androidx.compose.foundation:foundation:1.7.0-beta03")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.0-rc01")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.0-beta02")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.7.0-beta02")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.0-beta02")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.0-beta03")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.7.0-beta03")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.0-beta03")
|
||||
implementation("com.google.dagger:hilt-android:2.51.1")
|
||||
ksp("com.google.dagger:hilt-android-compiler:2.51.1")
|
||||
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.6.3")
|
||||
implementation ("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0")
|
||||
implementation("com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3")
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:allowBackup="false"
|
||||
android:name=".App"
|
||||
android:persistent="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.anthonyla.paperize.core
|
||||
import android.app.WallpaperManager
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
@@ -18,7 +19,7 @@ import com.anthonyla.paperize.feature.wallpaper.domain.model.Wallpaper
|
||||
import com.google.android.renderscript.Toolkit
|
||||
import com.lazygeniouz.dfc.file.DocumentFileCompat
|
||||
|
||||
enum class Type { HOME, LOCK, BOTH }
|
||||
enum class Type { HOME, LOCK, BOTH, REFRESH }
|
||||
|
||||
/**
|
||||
* Get the dimensions of the image from the uri
|
||||
@@ -156,7 +157,6 @@ fun getWallpaperFromFolder(folderUri: String, context: Context): List<String> {
|
||||
val folderDocumentFile = DocumentFile.fromTreeUri(context, folderUri.toUri())
|
||||
return listFilesRecursive(folderDocumentFile, context)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -198,16 +198,30 @@ fun listFilesRecursive(parent: DocumentFile?, context: Context): List<String> {
|
||||
*/
|
||||
fun findFirstValidUri(context: Context, wallpapers: List<Wallpaper>, folders: List<Folder>): String? {
|
||||
wallpapers.forEach { wallpaper ->
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper.wallpaperUri
|
||||
try {
|
||||
val file = DocumentFileCompat.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper.wallpaperUri
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper.wallpaperUri
|
||||
}
|
||||
}
|
||||
}
|
||||
folders.forEach { folder ->
|
||||
folder.wallpapers.forEach { wallpaper ->
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper
|
||||
try {
|
||||
val file = DocumentFileCompat.fromSingleUri(context, wallpaper.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.toUri())
|
||||
if (file?.exists() == true) {
|
||||
return wallpaper
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,3 +253,11 @@ fun isValidUri(context: Context, uriString: String?): Boolean {
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if device uses a live wallpaper
|
||||
*/
|
||||
fun isLiveWallpaperSet(context: Context): Boolean {
|
||||
val wallpaperManager = WallpaperManager.getInstance(context)
|
||||
return wallpaperManager.wallpaperInfo != null
|
||||
}
|
||||
|
||||
+1
@@ -85,6 +85,7 @@ class MainActivity : ComponentActivity() {
|
||||
val settingsState = settingsViewModel.state.collectAsStateWithLifecycle()
|
||||
val isFirstLaunch = runBlocking { settingsDataStoreImpl.getBoolean(SettingsConstants.FIRST_LAUNCH) } ?: true
|
||||
if (isFirstLaunch) {
|
||||
scheduler.cancelWallpaperAlarm()
|
||||
wallpaperScreenViewModel.onEvent(WallpaperEvent.Reset)
|
||||
settingsViewModel.onEvent(SettingsEvent.Reset)
|
||||
albumsViewModel.onEvent(AlbumsEvent.Reset)
|
||||
|
||||
+50
-7
@@ -258,6 +258,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -272,6 +273,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -287,6 +289,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.updateWallpaperAlarm(it)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,6 +306,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.updateWallpaperAlarm(it)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,10 +332,23 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately,
|
||||
blur = settingsState.value.blur,
|
||||
blurPercentage = settingsState.value.blurPercentage,
|
||||
firstSet = settingsState.value.firstSet,
|
||||
onToggleChanger = { enableWallpaperChanger ->
|
||||
settingsViewModel.onEvent(SettingsEvent.SetChangerToggle(enableWallpaperChanger))
|
||||
if (selectedState.value.selectedAlbum!= null && enableWallpaperChanger && (settingsState.value.setHomeWallpaper || settingsState.value.setLockWallpaper)) {
|
||||
if (selectedState.value.selectedAlbum != null && enableWallpaperChanger && (settingsState.value.setHomeWallpaper || settingsState.value.setLockWallpaper)) {
|
||||
wallpaperScreenViewModel.onEvent(
|
||||
WallpaperEvent.UpdateSelectedAlbum(
|
||||
selectedState.value.selectedAlbum!!.copy(
|
||||
album = selectedState.value.selectedAlbum!!.album.copy(
|
||||
currentHomeWallpaper = if (settingsState.value.setHomeWallpaper) selectedState.value.selectedAlbum!!.album.homeWallpapersInQueue.firstOrNull() else null,
|
||||
currentLockWallpaper = if (settingsState.value.scheduleSeparately && settingsState.value.setLockWallpaper) selectedState.value.selectedAlbum!!.album.lockWallpapersInQueue.firstOrNull() else if (settingsState.value.setLockWallpaper) selectedState.value.selectedAlbum!!.album.homeWallpapersInQueue.firstOrNull() else null
|
||||
)
|
||||
),
|
||||
null,
|
||||
settingsState.value.scheduleSeparately,
|
||||
settingsState.value.setHomeWallpaper,
|
||||
settingsState.value.setLockWallpaper
|
||||
)
|
||||
)
|
||||
job?.cancel()
|
||||
job = scope.launch {
|
||||
delay(2000)
|
||||
@@ -341,16 +358,22 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
else { scheduler.cancelWallpaperAlarm() }
|
||||
},
|
||||
onSelectAlbum = {album ->
|
||||
settingsViewModel.onEvent(SettingsEvent.SetChangerToggle(true))
|
||||
wallpaperScreenViewModel.onEvent(WallpaperEvent.UpdateSelectedAlbum(null, album, settingsState.value.scheduleSeparately))
|
||||
if (settingsState.value.firstSet) {
|
||||
settingsViewModel.onEvent(SettingsEvent.SetFirstSet)
|
||||
}
|
||||
wallpaperScreenViewModel.onEvent(
|
||||
WallpaperEvent.UpdateSelectedAlbum(
|
||||
null,
|
||||
album,
|
||||
settingsState.value.scheduleSeparately,
|
||||
settingsState.value.setHomeWallpaper,
|
||||
settingsState.value.setLockWallpaper
|
||||
)
|
||||
)
|
||||
job?.cancel()
|
||||
job = scope.launch {
|
||||
val alarmItem = WallpaperAlarmItem(
|
||||
@@ -359,6 +382,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = settingsState.value.scheduleSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
},
|
||||
onDarkenPercentage = {
|
||||
@@ -414,6 +438,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = false
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
else if (selectedState.value.selectedAlbum != null && settingsState.value.enableChanger) {
|
||||
@@ -443,7 +468,9 @@ fun PaperizeApp(
|
||||
timeInMinutes2 = settingsState.value.lockInterval,
|
||||
scheduleSeparately = false
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}}
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
else if (selectedState.value.selectedAlbum != null && settingsState.value.enableChanger) {
|
||||
job?.cancel()
|
||||
@@ -456,6 +483,21 @@ fun PaperizeApp(
|
||||
onScheduleSeparatelyChange = { changeSeparately ->
|
||||
settingsViewModel.onEvent(SettingsEvent.SetScheduleSeparately(changeSeparately))
|
||||
if (selectedState.value.selectedAlbum!= null && settingsState.value.enableChanger) {
|
||||
wallpaperScreenViewModel.onEvent(
|
||||
WallpaperEvent.UpdateSelectedAlbum(
|
||||
selectedState.value.selectedAlbum!!.copy(
|
||||
album = selectedState.value.selectedAlbum!!.album.copy(
|
||||
currentHomeWallpaper = if (settingsState.value.setHomeWallpaper) selectedState.value.selectedAlbum!!.album.homeWallpapersInQueue.firstOrNull() else null,
|
||||
currentLockWallpaper = if (changeSeparately && settingsState.value.setLockWallpaper) selectedState.value.selectedAlbum!!.album.lockWallpapersInQueue.firstOrNull() else if (settingsState.value.setLockWallpaper) selectedState.value.selectedAlbum!!.album.homeWallpapersInQueue.firstOrNull() else null
|
||||
)
|
||||
|
||||
),
|
||||
null,
|
||||
settingsState.value.scheduleSeparately,
|
||||
settingsState.value.setHomeWallpaper,
|
||||
settingsState.value.setLockWallpaper
|
||||
)
|
||||
)
|
||||
job?.cancel()
|
||||
job = scope.launch {
|
||||
delay(2000)
|
||||
@@ -465,6 +507,7 @@ fun PaperizeApp(
|
||||
scheduleSeparately = changeSeparately
|
||||
)
|
||||
alarmItem.let{scheduler.scheduleWallpaperAlarm(it, null, true, true)}
|
||||
scheduler.scheduleRefresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+99
-33
@@ -86,8 +86,17 @@ class AlbumsViewModel @Inject constructor (
|
||||
albumWithWallpapers.forEach { albumWithWallpaper ->
|
||||
// Delete wallpaper if the URI is invalid
|
||||
val invalidWallpapers = albumWithWallpaper.wallpapers.filterNot { wallpaper ->
|
||||
val file = DocumentFileCompat.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
file?.exists() == true
|
||||
try {
|
||||
val file = DocumentFileCompat.fromSingleUri(
|
||||
context,
|
||||
wallpaper.wallpaperUri.toUri()
|
||||
)
|
||||
file?.exists() == true
|
||||
} catch (e: Exception) {
|
||||
val file =
|
||||
DocumentFile.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
file?.exists() == true
|
||||
}
|
||||
}
|
||||
if (invalidWallpapers.isNotEmpty()) {
|
||||
repository.deleteWallpaperList(invalidWallpapers)
|
||||
@@ -96,42 +105,99 @@ class AlbumsViewModel @Inject constructor (
|
||||
// Update folder cover uri and wallpapers uri
|
||||
albumWithWallpaper.folders.forEach { folder ->
|
||||
try {
|
||||
DocumentFileCompat.fromTreeUri(context, folder.folderUri.toUri())?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory()) {
|
||||
repository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
repository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
DocumentFileCompat.fromTreeUri(context, folder.folderUri.toUri())
|
||||
?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory()) {
|
||||
repository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers =
|
||||
getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let {
|
||||
DocumentFileCompat.fromSingleUri(
|
||||
context,
|
||||
it.toUri()
|
||||
)
|
||||
}
|
||||
val folderCover =
|
||||
folderCoverFile?.takeIf { it.exists() }?.uri?.toString()
|
||||
?: wallpapers.randomOrNull()
|
||||
repository.updateFolder(
|
||||
folder.copy(
|
||||
coverUri = folderCover,
|
||||
wallpapers = wallpapers
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
DocumentFile.fromTreeUri(context, folder.folderUri.toUri())?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory) {
|
||||
repository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
repository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
DocumentFile.fromTreeUri(context, folder.folderUri.toUri())
|
||||
?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory) {
|
||||
repository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers =
|
||||
getWallpaperFromFolder(folder.folderUri, context)
|
||||
try {
|
||||
val folderCoverFile = folder.coverUri?.let {
|
||||
DocumentFileCompat.fromSingleUri(
|
||||
context,
|
||||
it.toUri()
|
||||
)
|
||||
}
|
||||
val folderCover =
|
||||
folderCoverFile?.takeIf { it.exists() }?.uri?.toString()
|
||||
?: wallpapers.randomOrNull()
|
||||
repository.updateFolder(
|
||||
folder.copy(
|
||||
coverUri = folderCover,
|
||||
wallpapers = wallpapers
|
||||
)
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
val folderCoverFile = folder.coverUri?.let {
|
||||
DocumentFile.fromSingleUri(
|
||||
context,
|
||||
it.toUri()
|
||||
)
|
||||
}
|
||||
val folderCover =
|
||||
folderCoverFile?.takeIf { it.exists() }?.uri?.toString()
|
||||
?: wallpapers.randomOrNull()
|
||||
repository.updateFolder(
|
||||
folder.copy(
|
||||
coverUri = folderCover,
|
||||
wallpapers = wallpapers
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
albumWithWallpapers = repository.getAlbumsWithWallpaperAndFolder().first()
|
||||
albumWithWallpapers.forEach { albumWithWallpaper ->
|
||||
// Delete empty albums
|
||||
if (albumWithWallpaper.wallpapers.isEmpty() && albumWithWallpaper.folders.all { it.wallpapers.isEmpty() }) {
|
||||
repository.deleteAlbum(albumWithWallpaper.album)
|
||||
}
|
||||
else {
|
||||
// Update album cover uri if null or invalid
|
||||
val albumCoverFile = albumWithWallpaper.album.coverUri?.toUri()?.let { DocumentFile.fromSingleUri(context, it) }
|
||||
if (albumCoverFile == null || !albumCoverFile.exists()) {
|
||||
val newCoverUri = findFirstValidUri(context, albumWithWallpaper.wallpapers, albumWithWallpaper.folders)
|
||||
repository.updateAlbum(albumWithWallpaper.album.copy(coverUri = newCoverUri))
|
||||
albumWithWallpapers = repository.getAlbumsWithWallpaperAndFolder().first()
|
||||
albumWithWallpapers.forEach { album ->
|
||||
// Delete empty albums
|
||||
if (album.wallpapers.isEmpty() && album.folders.all { it.wallpapers.isEmpty() }) {
|
||||
repository.deleteAlbum(album.album)
|
||||
} else {
|
||||
// Update album cover uri if null or invalid
|
||||
try {
|
||||
val albumCoverFile = album.album.coverUri?.toUri()
|
||||
?.let { DocumentFileCompat.fromSingleUri(context, it) }
|
||||
if (albumCoverFile == null || !albumCoverFile.exists()) {
|
||||
val newCoverUri =
|
||||
findFirstValidUri(context, album.wallpapers, album.folders)
|
||||
repository.updateAlbum(album.album.copy(coverUri = newCoverUri))
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
val albumCoverFile = album.album.coverUri?.toUri()
|
||||
?.let { DocumentFile.fromSingleUri(context, it) }
|
||||
if (albumCoverFile == null || !albumCoverFile.exists()) {
|
||||
val newCoverUri =
|
||||
findFirstValidUri(context, album.wallpapers, album.folders)
|
||||
repository.updateAlbum(album.album.copy(coverUri = newCoverUri))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+19
-30
@@ -19,7 +19,6 @@ import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.anthonyla.paperize.core.ScalingConstants
|
||||
@@ -66,17 +65,23 @@ fun HomeScreen(
|
||||
onBlurPercentageChange: (Int) -> Unit,
|
||||
onBlurChange: (Boolean) -> Unit,
|
||||
blurPercentage: Int,
|
||||
firstSet: Boolean
|
||||
) {
|
||||
var tabIndex by rememberSaveable { mutableIntStateOf(0) }
|
||||
val tabItems = getTabItems()
|
||||
val pagerState = rememberPagerState { tabItems.size }
|
||||
val pagerState = rememberPagerState(0) { tabItems.size }
|
||||
var tabIndex by rememberSaveable { mutableIntStateOf(pagerState.currentPage) }
|
||||
var addAlbumDialog by rememberSaveable { mutableStateOf(false) }
|
||||
if (addAlbumDialog) AddAlbumDialog(
|
||||
onDismissRequest = { addAlbumDialog = false },
|
||||
onConfirmation = { navigateToAddWallpaperScreen(it) }
|
||||
)
|
||||
|
||||
LaunchedEffect(tabIndex) {
|
||||
pagerState.animateScrollToPage(tabIndex)
|
||||
}
|
||||
LaunchedEffect(pagerState.currentPage) {
|
||||
tabIndex = pagerState.currentPage
|
||||
}
|
||||
|
||||
Scaffold (
|
||||
topBar = {
|
||||
HomeTopBar(
|
||||
@@ -85,20 +90,8 @@ fun HomeScreen(
|
||||
onSettingsClick = onSettingsClick,
|
||||
)
|
||||
}
|
||||
) { padding ->
|
||||
LaunchedEffect(tabIndex) {
|
||||
if (tabIndex in tabItems.indices) {
|
||||
pagerState.animateScrollToPage(tabIndex)
|
||||
}
|
||||
}
|
||||
LaunchedEffect(pagerState) {
|
||||
snapshotFlow { pagerState.currentPage }.collect { page ->
|
||||
if (page in tabItems.indices) {
|
||||
tabIndex = page
|
||||
}
|
||||
}
|
||||
}
|
||||
Column(modifier = Modifier.padding(padding)) {
|
||||
) {
|
||||
Column(modifier = Modifier.padding(it)) {
|
||||
TabRow(
|
||||
selectedTabIndex = tabIndex,
|
||||
indicator = { tabPositions ->
|
||||
@@ -124,10 +117,8 @@ fun HomeScreen(
|
||||
icon = {
|
||||
Icon(
|
||||
imageVector =
|
||||
if (index == tabIndex)
|
||||
item.filledIcon
|
||||
else
|
||||
item.unfilledIcon,
|
||||
if (index == tabIndex) item.filledIcon
|
||||
else item.unfilledIcon,
|
||||
contentDescription = item.title
|
||||
)
|
||||
}
|
||||
@@ -136,8 +127,7 @@ fun HomeScreen(
|
||||
}
|
||||
HorizontalPager(
|
||||
state = pagerState,
|
||||
beyondViewportPageCount = 1,
|
||||
userScrollEnabled = true,
|
||||
beyondViewportPageCount = 1
|
||||
) { index ->
|
||||
when(index) {
|
||||
0 -> WallpaperScreen(
|
||||
@@ -155,23 +145,22 @@ fun HomeScreen(
|
||||
onDarkenPercentage = onDarkenPercentage,
|
||||
onHomeCheckedChange = onHomeCheckedChange,
|
||||
onLockCheckedChange = onLockCheckedChange,
|
||||
scheduleSeparately = scheduleSeparately,
|
||||
onScheduleSeparatelyChange = onScheduleSeparatelyChange,
|
||||
onScheduleWallpaperChanger1 = onScheduleWallpaperChanger1,
|
||||
onScheduleWallpaperChanger2 = onScheduleWallpaperChanger2,
|
||||
onScalingChange = onScalingChange,
|
||||
onSelectAlbum = onSelectAlbum,
|
||||
onTimeChange1 = onTimeChange1,
|
||||
onTimeChange2 = onTimeChange2,
|
||||
onStop = onStop,
|
||||
onToggleChanger = onToggleChanger,
|
||||
scaling = scaling,
|
||||
selectedAlbum = selectedAlbum,
|
||||
scheduleSeparately = scheduleSeparately,
|
||||
onScheduleSeparatelyChange = onScheduleSeparatelyChange,
|
||||
onTimeChange1 = onTimeChange1,
|
||||
onTimeChange2 = onTimeChange2,
|
||||
blur = blur,
|
||||
onBlurPercentageChange = onBlurPercentageChange,
|
||||
onBlurChange = onBlurChange,
|
||||
blurPercentage = blurPercentage,
|
||||
firstSet = firstSet
|
||||
blurPercentage = blurPercentage
|
||||
)
|
||||
1 -> LibraryScreen(
|
||||
onAddNewAlbumClick = { addAlbumDialog = true },
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ sealed class SettingsEvent {
|
||||
data object Refresh: SettingsEvent()
|
||||
data object Reset: SettingsEvent()
|
||||
data object SetFirstLaunch: SettingsEvent()
|
||||
data object SetFirstSet: SettingsEvent()
|
||||
data object RefreshNextSetTime: SettingsEvent()
|
||||
data class SetDarkMode(val darkMode: Boolean?): SettingsEvent()
|
||||
data class SetDynamicTheming(val dynamicTheming: Boolean): SettingsEvent()
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ import com.anthonyla.paperize.core.SettingsConstants.WALLPAPER_CHANGE_INTERVAL_D
|
||||
|
||||
data class SettingsState(
|
||||
val firstLaunch: Boolean = true,
|
||||
val firstSet: Boolean = true,
|
||||
// App settings
|
||||
val darkMode: Boolean? = null,
|
||||
val dynamicTheming: Boolean = false,
|
||||
|
||||
+1
-17
@@ -35,7 +35,6 @@ class SettingsViewModel @Inject constructor (
|
||||
init {
|
||||
currentGetJob = viewModelScope.launch(Dispatchers.IO) {
|
||||
val firstLaunch = async { settingsDataStoreImpl.getBoolean(SettingsConstants.FIRST_LAUNCH) ?: true }
|
||||
val firstSet = async { settingsDataStoreImpl.getBoolean(SettingsConstants.FIRST_SET) ?: false }
|
||||
val darkMode = async { settingsDataStoreImpl.getBoolean(SettingsConstants.DARK_MODE_TYPE) }
|
||||
val dynamicTheming = async { settingsDataStoreImpl.getBoolean(SettingsConstants.DYNAMIC_THEME_TYPE) ?: false }
|
||||
val enableChanger = async { settingsDataStoreImpl.getBoolean(SettingsConstants.ENABLE_CHANGER) ?: true }
|
||||
@@ -60,7 +59,6 @@ class SettingsViewModel @Inject constructor (
|
||||
homeInterval = homeWallpaperInterval.await(),
|
||||
lockInterval = lockWallpaperInterval.await(),
|
||||
firstLaunch = firstLaunch.await(),
|
||||
firstSet = firstSet.await(),
|
||||
lastSetTime = lastSetTime.await(),
|
||||
nextSetTime = nextSetTime.await(),
|
||||
animate = animate.await(),
|
||||
@@ -121,7 +119,6 @@ class SettingsViewModel @Inject constructor (
|
||||
val scheduleSeparately = async { settingsDataStoreImpl.getBoolean(SettingsConstants.SCHEDULE_SEPARATELY) ?: false }
|
||||
val blur = async { settingsDataStoreImpl.getBoolean(SettingsConstants.BLUR) ?: false }
|
||||
val blurPercentage = async { settingsDataStoreImpl.getInt(SettingsConstants.BLUR_PERCENTAGE) ?: 0 }
|
||||
val firstSet = async { settingsDataStoreImpl.getBoolean(SettingsConstants.FIRST_SET) ?: true }
|
||||
_state.update {
|
||||
it.copy(
|
||||
darkMode = darkMode.await(),
|
||||
@@ -140,7 +137,6 @@ class SettingsViewModel @Inject constructor (
|
||||
scheduleSeparately = scheduleSeparately.await(),
|
||||
blur = blur.await(),
|
||||
blurPercentage = blurPercentage.await(),
|
||||
firstSet = firstSet.await()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -183,17 +179,6 @@ class SettingsViewModel @Inject constructor (
|
||||
}
|
||||
}
|
||||
|
||||
is SettingsEvent.SetFirstSet -> {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
settingsDataStoreImpl.putBoolean(SettingsConstants.FIRST_SET, false)
|
||||
_state.update {
|
||||
it.copy(
|
||||
firstSet = false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is SettingsEvent.SetHomeWallpaperInterval -> {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
settingsDataStoreImpl.putInt(SettingsConstants.HOME_WALLPAPER_CHANGE_INTERVAL, event.interval)
|
||||
@@ -407,8 +392,7 @@ class SettingsViewModel @Inject constructor (
|
||||
homeInterval = SettingsConstants.WALLPAPER_CHANGE_INTERVAL_DEFAULT,
|
||||
scheduleSeparately = false,
|
||||
blur = false,
|
||||
blurPercentage = 0,
|
||||
firstSet = true
|
||||
blurPercentage = 0
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+5
-3
@@ -7,8 +7,10 @@ sealed class WallpaperEvent {
|
||||
data class UpdateSelectedAlbum(
|
||||
val selectedAlbum: SelectedAlbum?,
|
||||
val album: AlbumWithWallpaperAndFolder?,
|
||||
val scheduleSeparately: Boolean = false
|
||||
val scheduleSeparately: Boolean = false,
|
||||
val setHome: Boolean = false,
|
||||
val setLock: Boolean = false
|
||||
): WallpaperEvent()
|
||||
object Reset : WallpaperEvent()
|
||||
object Refresh : WallpaperEvent()
|
||||
data object Reset : WallpaperEvent()
|
||||
data object Refresh : WallpaperEvent()
|
||||
}
|
||||
+4
-19
@@ -46,7 +46,6 @@ import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.co
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.CurrentAndNextChange
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.CurrentSelectedAlbum
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.DarkenSwitchAndSlider
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.ShowDelayNoticeDialog
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.ShowLiveWallpaperEnabledDialog
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.TimeSliders
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components.WallpaperPreviewAndScale
|
||||
@@ -84,8 +83,7 @@ fun WallpaperScreen(
|
||||
blur: Boolean,
|
||||
onBlurPercentageChange: (Int) -> Unit,
|
||||
onBlurChange: (Boolean) -> Unit,
|
||||
blurPercentage: Int,
|
||||
firstSet: Boolean
|
||||
blurPercentage: Int
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val albumState = albumsViewModel.state.collectAsStateWithLifecycle()
|
||||
@@ -93,22 +91,14 @@ fun WallpaperScreen(
|
||||
val scope = rememberCoroutineScope()
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
val openLiveDialog = rememberSaveable { mutableStateOf(false) }
|
||||
val openNoticeDialog = rememberSaveable { mutableStateOf(false) }
|
||||
val showInterval = rememberSaveable { mutableStateOf(false) }
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
if (openLiveDialog.value) {
|
||||
ShowLiveWallpaperEnabledDialog(
|
||||
onDismissRequest = { openLiveDialog.value = false }
|
||||
)
|
||||
}
|
||||
if (openNoticeDialog.value) {
|
||||
ShowDelayNoticeDialog(
|
||||
onDismissRequest = {
|
||||
openNoticeDialog.value = false
|
||||
openBottomSheet = true
|
||||
}
|
||||
)
|
||||
}
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
Scaffold(
|
||||
snackbarHost = {
|
||||
@@ -145,12 +135,7 @@ fun WallpaperScreen(
|
||||
if (isLiveWallpaperSet(context)) {
|
||||
openLiveDialog.value = true
|
||||
} else {
|
||||
if (firstSet) {
|
||||
openNoticeDialog.value = true
|
||||
}
|
||||
else {
|
||||
openBottomSheet = true
|
||||
}
|
||||
openBottomSheet = true
|
||||
}
|
||||
} else {
|
||||
scope.launch {
|
||||
|
||||
+3
-2
@@ -43,6 +43,7 @@ class WallpaperScreenViewModel @Inject constructor (
|
||||
when (event) {
|
||||
is WallpaperEvent.UpdateSelectedAlbum -> {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
if (!event.setHome && !event.setLock) return@launch
|
||||
if (event.selectedAlbum != null) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
@@ -67,8 +68,8 @@ class WallpaperScreenViewModel @Inject constructor (
|
||||
album = event.album.album.copy(
|
||||
homeWallpapersInQueue = shuffledWallpapers1,
|
||||
lockWallpapersInQueue = shuffledWallpapers2,
|
||||
currentHomeWallpaper = shuffledWallpapers1.firstOrNull(),
|
||||
currentLockWallpaper = if (event.scheduleSeparately) shuffledWallpapers2.firstOrNull() else shuffledWallpapers1.firstOrNull(),
|
||||
currentHomeWallpaper = if (event.setHome) shuffledWallpapers1.firstOrNull() else null,
|
||||
currentLockWallpaper = if (event.scheduleSeparately && event.setLock) shuffledWallpapers2.firstOrNull() else if (event.setLock) shuffledWallpapers1.firstOrNull() else null,
|
||||
),
|
||||
wallpapers = wallpapers
|
||||
)
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.anthonyla.paperize.feature.wallpaper.presentation.wallpaper_screen.components
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Notifications
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.anthonyla.paperize.R
|
||||
|
||||
/**
|
||||
* Dialog to let the user know of the app's potential delays when it comes to scheduling wallpapers.
|
||||
*/
|
||||
@Composable
|
||||
fun ShowDelayNoticeDialog(
|
||||
onDismissRequest: () -> Unit
|
||||
) {
|
||||
AlertDialog(
|
||||
onDismissRequest = { onDismissRequest() },
|
||||
icon = { Icon(Icons.Filled.Notifications, stringResource(R.string.delay_notice)) },
|
||||
title = {
|
||||
Text(stringResource(R.string.delay_notice_dialog))
|
||||
},
|
||||
text = {
|
||||
Text(stringResource(R.string.to_minimize_battery_usage_changing_wallpapers_may_have_some_delays_once_scheduled_when_the_device_is_asleep_the_wallpaper_may_take_longer_to_apply))
|
||||
},
|
||||
confirmButton = {
|
||||
Button(
|
||||
onClick = { onDismissRequest() }
|
||||
) {
|
||||
Text(stringResource(R.string.ok))
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
+38
-29
@@ -3,7 +3,6 @@ package com.anthonyla.paperize.feature.wallpaper.wallpaper_alarmmanager
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.anthonyla.paperize.core.SettingsConstants.WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
import com.anthonyla.paperize.core.Type
|
||||
import com.anthonyla.paperize.feature.wallpaper.wallpaper_service.WallpaperService1
|
||||
@@ -17,37 +16,47 @@ import dagger.hilt.android.AndroidEntryPoint
|
||||
class WallpaperReceiver: BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (context != null) {
|
||||
val timeInMinutes1 = intent?.getIntExtra("timeInMinutes1", WALLPAPER_CHANGE_INTERVAL_DEFAULT) ?: WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val timeInMinutes2 = intent?.getIntExtra("timeInMinutes2", WALLPAPER_CHANGE_INTERVAL_DEFAULT) ?: WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val scheduleSeparately = intent?.getBooleanExtra("scheduleSeparately", false) ?: false
|
||||
val type = intent?.getIntExtra("type", Type.BOTH.ordinal) ?: Type.BOTH.ordinal
|
||||
val serviceIntent = Intent().apply {
|
||||
putExtra("timeInMinutes1", timeInMinutes1)
|
||||
putExtra("timeInMinutes2", timeInMinutes2)
|
||||
putExtra("scheduleSeparately", scheduleSeparately)
|
||||
putExtra("type", type)
|
||||
}
|
||||
if (type == Type.BOTH.ordinal || type == Type.HOME.ordinal) {
|
||||
serviceIntent.setClass(context, WallpaperService1::class.java).apply {
|
||||
action = WallpaperService1.Actions.START.toString()
|
||||
}
|
||||
} else {
|
||||
serviceIntent.setClass(context, WallpaperService2::class.java).apply {
|
||||
action = WallpaperService2.Actions.START.toString()
|
||||
val refresh = intent?.getBooleanExtra("refresh", false) ?: false
|
||||
if (refresh) {
|
||||
val serviceIntent = Intent(context, WallpaperService1::class.java).apply {
|
||||
action = WallpaperService1.Actions.REFRESH.toString()
|
||||
}
|
||||
context.startService(serviceIntent)
|
||||
WallpaperScheduler(context).scheduleRefresh()
|
||||
}
|
||||
context.startService(serviceIntent)
|
||||
else {
|
||||
val timeInMinutes1 = intent?.getIntExtra("timeInMinutes1", WALLPAPER_CHANGE_INTERVAL_DEFAULT) ?: WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val timeInMinutes2 = intent?.getIntExtra("timeInMinutes2", WALLPAPER_CHANGE_INTERVAL_DEFAULT) ?: WALLPAPER_CHANGE_INTERVAL_DEFAULT
|
||||
val scheduleSeparately = intent?.getBooleanExtra("scheduleSeparately", false) ?: false
|
||||
val type = intent?.getIntExtra("type", Type.BOTH.ordinal) ?: Type.BOTH.ordinal
|
||||
val serviceIntent = Intent().apply {
|
||||
putExtra("timeInMinutes1", timeInMinutes1)
|
||||
putExtra("timeInMinutes2", timeInMinutes2)
|
||||
putExtra("scheduleSeparately", scheduleSeparately)
|
||||
putExtra("type", type)
|
||||
}
|
||||
if (type == Type.BOTH.ordinal || type == Type.HOME.ordinal) {
|
||||
serviceIntent.setClass(context, WallpaperService1::class.java).apply {
|
||||
action = WallpaperService1.Actions.START.toString()
|
||||
}
|
||||
} else {
|
||||
serviceIntent.setClass(context, WallpaperService2::class.java).apply {
|
||||
action = WallpaperService2.Actions.START.toString()
|
||||
}
|
||||
}
|
||||
context.startService(serviceIntent)
|
||||
|
||||
// Schedule next alarm for next wallpaper change
|
||||
val origin = intent?.getIntExtra("origin", -1)?.takeIf { it != -1 }
|
||||
WallpaperScheduler(context).scheduleWallpaperAlarm(
|
||||
WallpaperAlarmItem(
|
||||
timeInMinutes1 = timeInMinutes1,
|
||||
timeInMinutes2 = timeInMinutes2,
|
||||
scheduleSeparately = scheduleSeparately
|
||||
),
|
||||
origin
|
||||
)
|
||||
// Schedule next alarm for next wallpaper change
|
||||
val origin = intent?.getIntExtra("origin", -1)?.takeIf { it != -1 }
|
||||
WallpaperScheduler(context).scheduleWallpaperAlarm(
|
||||
WallpaperAlarmItem(
|
||||
timeInMinutes1 = timeInMinutes1,
|
||||
timeInMinutes2 = timeInMinutes2,
|
||||
scheduleSeparately = scheduleSeparately
|
||||
),
|
||||
origin
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+63
-13
@@ -5,7 +5,6 @@ import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
import com.anthonyla.paperize.core.Type
|
||||
import com.anthonyla.paperize.feature.wallpaper.wallpaper_service.WallpaperService1
|
||||
import com.anthonyla.paperize.feature.wallpaper.wallpaper_service.WallpaperService2
|
||||
@@ -22,6 +21,9 @@ class WallpaperScheduler (
|
||||
): WallpaperAlarmScheduler {
|
||||
private val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
|
||||
/**
|
||||
* Schedules the wallpaper alarm based on the origin and changeImmediate
|
||||
*/
|
||||
override fun scheduleWallpaperAlarm(wallpaperAlarmItem: WallpaperAlarmItem, origin: Int?, changeImmediate: Boolean, cancelImmediate: Boolean) {
|
||||
if (cancelImmediate) cancelWallpaperAlarm()
|
||||
else {
|
||||
@@ -37,21 +39,21 @@ class WallpaperScheduler (
|
||||
}
|
||||
if (wallpaperAlarmItem.scheduleSeparately) {
|
||||
when (origin) {
|
||||
Type.HOME.ordinal -> {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, origin)
|
||||
}
|
||||
Type.LOCK.ordinal -> {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.LOCK)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, origin)
|
||||
}
|
||||
Type.HOME.ordinal -> {
|
||||
if (changeImmediate) changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, origin)
|
||||
}
|
||||
null -> {
|
||||
if (changeImmediate) {
|
||||
changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
changeWallpaperImmediate(wallpaperAlarmItem, Type.LOCK)
|
||||
changeWallpaperImmediate(wallpaperAlarmItem, Type.HOME)
|
||||
}
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, Type.HOME.ordinal)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, Type.LOCK.ordinal)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, Type.HOME.ordinal)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,31 +63,41 @@ class WallpaperScheduler (
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the alarms
|
||||
*/
|
||||
override fun updateWallpaperAlarm(wallpaperAlarmItem: WallpaperAlarmItem) {
|
||||
cancelWallpaperAlarm()
|
||||
if (wallpaperAlarmItem.scheduleSeparately) {
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, null, true)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.LOCK, null, true)
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.HOME, null, true)
|
||||
}
|
||||
else {
|
||||
scheduleWallpaper(wallpaperAlarmItem, Type.BOTH, null, true)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the wallpaper without scheduling alarms
|
||||
*/
|
||||
override fun updateWallpaper(scheduleSeparately: Boolean) {
|
||||
if (scheduleSeparately) {
|
||||
updateWallpaper(Type.HOME)
|
||||
updateWallpaper(Type.LOCK)
|
||||
updateWallpaper(Type.HOME)
|
||||
}
|
||||
else {
|
||||
updateWallpaper(Type.BOTH)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels all active alarms
|
||||
*/
|
||||
override fun cancelWallpaperAlarm() {
|
||||
cancelAlarm(Type.HOME)
|
||||
cancelAlarm(Type.LOCK)
|
||||
cancelAlarm(Type.BOTH)
|
||||
cancelAlarm(Type.REFRESH)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,6 +107,7 @@ class WallpaperScheduler (
|
||||
val nextTime = when (type) {
|
||||
Type.HOME, Type.BOTH -> LocalDateTime.now().plusMinutes(wallpaperAlarmItem.timeInMinutes1.toLong())
|
||||
Type.LOCK -> LocalDateTime.now().plusMinutes(wallpaperAlarmItem.timeInMinutes2.toLong())
|
||||
else -> LocalDateTime.now()
|
||||
}
|
||||
val intent = Intent(context, WallpaperReceiver::class.java).apply {
|
||||
putExtra("timeInMinutes1", wallpaperAlarmItem.timeInMinutes1)
|
||||
@@ -106,10 +119,7 @@ class WallpaperScheduler (
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if (!alarmManager.canScheduleExactAlarms()) {
|
||||
Intent().also {
|
||||
it.action = Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM
|
||||
context.startActivity(it)
|
||||
}
|
||||
cancelWallpaperAlarm()
|
||||
}
|
||||
else {
|
||||
alarmManager.setExactAndAllowWhileIdle(
|
||||
@@ -156,6 +166,46 @@ class WallpaperScheduler (
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules a refresh alarm every 24hrs
|
||||
*/
|
||||
fun scheduleRefresh() {
|
||||
cancelAlarm(Type.REFRESH)
|
||||
val intent = Intent(context, WallpaperReceiver::class.java).apply {
|
||||
putExtra("refresh", true)
|
||||
}
|
||||
val nextMidnight = LocalDateTime.now().plusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if (!alarmManager.canScheduleExactAlarms()) {
|
||||
cancelWallpaperAlarm()
|
||||
}
|
||||
else {
|
||||
alarmManager.setExact(
|
||||
AlarmManager.RTC_WAKEUP,
|
||||
nextMidnight.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000,
|
||||
PendingIntent.getBroadcast(
|
||||
context,
|
||||
Type.REFRESH.ordinal,
|
||||
intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
else {
|
||||
alarmManager.setExact(
|
||||
AlarmManager.RTC_WAKEUP,
|
||||
nextMidnight.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000,
|
||||
PendingIntent.getBroadcast(
|
||||
context,
|
||||
Type.REFRESH.ordinal,
|
||||
intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the service to change the wallpaper
|
||||
*/
|
||||
|
||||
+26
-24
@@ -72,7 +72,8 @@ class WallpaperService1: Service() {
|
||||
enum class Actions {
|
||||
START,
|
||||
REQUEUE,
|
||||
UPDATE
|
||||
UPDATE,
|
||||
REFRESH
|
||||
}
|
||||
|
||||
override fun onBind(p0: Intent?): IBinder? {
|
||||
@@ -110,6 +111,9 @@ class WallpaperService1: Service() {
|
||||
Actions.UPDATE.toString() -> {
|
||||
workerTaskUpdate()
|
||||
}
|
||||
Actions.REFRESH.toString() -> {
|
||||
workerTaskRefresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
@@ -124,8 +128,7 @@ class WallpaperService1: Service() {
|
||||
private fun workerTaskStart(setHomeOrLock: Boolean? = null) {
|
||||
workerHandler.post {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
refreshAlbum(this@WallpaperService1)
|
||||
delay(2000)
|
||||
if (scheduleSeparately) delay(5000)
|
||||
changeWallpaper(this@WallpaperService1, setHomeOrLock)
|
||||
}
|
||||
stopSelf()
|
||||
@@ -155,6 +158,15 @@ class WallpaperService1: Service() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun workerTaskRefresh() {
|
||||
workerHandler.post {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
refreshAlbum(this@WallpaperService1)
|
||||
}
|
||||
stopSelf()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a notification for the wallpaper service
|
||||
*/
|
||||
@@ -252,9 +264,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = if (setHomeOrLock) it.album.homeWallpapersInQueue.drop(1) else it.album.homeWallpapersInQueue,
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) it.album.lockWallpapersInQueue.drop(1) else it.album.lockWallpapersInQueue,
|
||||
currentHomeWallpaper = if (setHomeOrLock) wallpaper else it.album.currentHomeWallpaper,
|
||||
currentLockWallpaper = if (!setHomeOrLock) wallpaper else it.album.currentLockWallpaper
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) it.album.lockWallpapersInQueue.drop(1) else it.album.lockWallpapersInQueue
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -299,9 +309,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = if (setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.homeWallpapersInQueue,
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.lockWallpapersInQueue,
|
||||
currentHomeWallpaper = if (setHomeOrLock) wallpaper else it.album.currentHomeWallpaper,
|
||||
currentLockWallpaper = if (!setHomeOrLock) wallpaper else it.album.currentLockWallpaper
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.lockWallpapersInQueue
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 }
|
||||
)
|
||||
@@ -344,9 +352,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.drop(1),
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper },
|
||||
currentHomeWallpaper = null,
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -391,9 +397,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.drop(1),
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper },
|
||||
currentHomeWallpaper = null,
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 }
|
||||
)
|
||||
@@ -468,8 +472,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.filter { it != wallpaper1 },
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 },
|
||||
currentHomeWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -498,8 +501,7 @@ class WallpaperService1: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.filter { it != wallpaper1 },
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 },
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -527,14 +529,14 @@ class WallpaperService1: Service() {
|
||||
setHome: Boolean, setLock: Boolean,
|
||||
setLockOrHome: Boolean? = null,
|
||||
blur: Boolean = false,
|
||||
blurPercent: Int
|
||||
blurPercent: Int,
|
||||
): Boolean {
|
||||
val wallpaperManager = WallpaperManager.getInstance(context)
|
||||
try {
|
||||
val imageSize = wallpaper.getImageDimensions(context) ?: return false
|
||||
val aspectRatio = imageSize.height.toFloat() / imageSize.width.toFloat()
|
||||
val device = context.resources.displayMetrics
|
||||
val targetWidth = min(4 * device.widthPixels, imageSize.width)
|
||||
val targetWidth = min(device.widthPixels, imageSize.width)
|
||||
val targetHeight = (targetWidth * aspectRatio).toInt()
|
||||
|
||||
val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
@@ -631,7 +633,7 @@ class WallpaperService1: Service() {
|
||||
albumWithWallpapers.forEach { albumWithWallpaper ->
|
||||
// Delete wallpaper if the URI is invalid
|
||||
val invalidWallpapers = albumWithWallpaper.wallpapers.filterNot { wallpaper ->
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
val file = DocumentFileCompat.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
file?.exists() == true
|
||||
}
|
||||
if (invalidWallpapers.isNotEmpty()) {
|
||||
@@ -646,7 +648,7 @@ class WallpaperService1: Service() {
|
||||
albumRepository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFileCompat.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
albumRepository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
}
|
||||
@@ -657,7 +659,7 @@ class WallpaperService1: Service() {
|
||||
albumRepository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFileCompat.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
albumRepository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
}
|
||||
|
||||
+12
-127
@@ -19,7 +19,6 @@ import android.util.DisplayMetrics
|
||||
import android.util.Log
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.net.toUri
|
||||
import androidx.documentfile.provider.DocumentFile
|
||||
import com.anthonyla.paperize.R
|
||||
import com.anthonyla.paperize.core.ScalingConstants
|
||||
import com.anthonyla.paperize.core.SettingsConstants
|
||||
@@ -30,19 +29,14 @@ import com.anthonyla.paperize.core.darkenBitmap
|
||||
import com.anthonyla.paperize.core.fillBitmap
|
||||
import com.anthonyla.paperize.core.fitBitmap
|
||||
import com.anthonyla.paperize.core.getImageDimensions
|
||||
import com.anthonyla.paperize.core.getWallpaperFromFolder
|
||||
import com.anthonyla.paperize.core.stretchBitmap
|
||||
import com.anthonyla.paperize.data.settings.SettingsDataStore
|
||||
import com.anthonyla.paperize.feature.wallpaper.domain.model.SelectedAlbum
|
||||
import com.anthonyla.paperize.feature.wallpaper.domain.model.Wallpaper
|
||||
import com.anthonyla.paperize.feature.wallpaper.domain.repository.AlbumRepository
|
||||
import com.anthonyla.paperize.feature.wallpaper.domain.repository.SelectedAlbumRepository
|
||||
import com.anthonyla.paperize.feature.wallpaper.presentation.MainActivity
|
||||
import com.lazygeniouz.dfc.file.DocumentFileCompat
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.IOException
|
||||
@@ -124,9 +118,6 @@ class WallpaperService2: Service() {
|
||||
private fun workerTaskStart(setHomeOrLock: Boolean? = null) {
|
||||
workerHandler.post {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
delay(3000)
|
||||
refreshAlbum(this@WallpaperService2)
|
||||
delay(2000)
|
||||
changeWallpaper(this@WallpaperService2, setHomeOrLock)
|
||||
}
|
||||
stopSelf()
|
||||
@@ -247,7 +238,7 @@ class WallpaperService2: Service() {
|
||||
setLock = setLock,
|
||||
setLockOrHome = setHomeOrLock,
|
||||
blur = blur,
|
||||
blurPercent = blurPercentage
|
||||
blurPercent = blurPercentage,
|
||||
)) {
|
||||
selectedAlbum.wallpapers.firstOrNull { it.wallpaperUri == wallpaper }
|
||||
?.let { it1 ->
|
||||
@@ -257,8 +248,6 @@ class WallpaperService2: Service() {
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = if (setHomeOrLock) it.album.homeWallpapersInQueue.drop(1) else it.album.homeWallpapersInQueue,
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) it.album.lockWallpapersInQueue.drop(1) else it.album.lockWallpapersInQueue,
|
||||
currentHomeWallpaper = if (setHomeOrLock) wallpaper else it.album.currentHomeWallpaper,
|
||||
currentLockWallpaper = if (!setHomeOrLock) wallpaper else it.album.currentLockWallpaper
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -303,9 +292,7 @@ class WallpaperService2: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = if (setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.homeWallpapersInQueue,
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.lockWallpapersInQueue,
|
||||
currentHomeWallpaper = if (setHomeOrLock) wallpaper else it.album.currentHomeWallpaper,
|
||||
currentLockWallpaper = if (!setHomeOrLock) wallpaper else it.album.currentLockWallpaper
|
||||
lockWallpapersInQueue = if (!setHomeOrLock) newWallpaperInQueue.drop(1) else it.album.lockWallpapersInQueue
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 }
|
||||
)
|
||||
@@ -339,7 +326,7 @@ class WallpaperService2: Service() {
|
||||
setHome = setHome,
|
||||
setLock = setLock,
|
||||
blur = blur,
|
||||
blurPercent = blurPercentage
|
||||
blurPercent = blurPercentage,
|
||||
)) {
|
||||
selectedAlbum.wallpapers.firstOrNull { it.wallpaperUri == wallpaper }
|
||||
?.let { it1 ->
|
||||
@@ -348,9 +335,7 @@ class WallpaperService2: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.drop(1),
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper },
|
||||
currentHomeWallpaper = null,
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -364,7 +349,7 @@ class WallpaperService2: Service() {
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.drop(1),
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper },
|
||||
currentHomeWallpaper = wallpaper,
|
||||
currentLockWallpaper = wallpaper
|
||||
currentLockWallpaper = wallpaper,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -385,7 +370,7 @@ class WallpaperService2: Service() {
|
||||
setLock = setLock,
|
||||
setLockOrHome = setHomeOrLock,
|
||||
blur = blur,
|
||||
blurPercent = blurPercentage
|
||||
blurPercent = blurPercentage,
|
||||
)
|
||||
) {
|
||||
selectedAlbum.wallpapers.firstOrNull { it.wallpaperUri == wallpaper }
|
||||
@@ -395,9 +380,7 @@ class WallpaperService2: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.drop(1),
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper },
|
||||
currentHomeWallpaper = null,
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 }
|
||||
)
|
||||
@@ -472,8 +455,7 @@ class WallpaperService2: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.filter { it != wallpaper1 },
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 },
|
||||
currentHomeWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -502,8 +484,7 @@ class WallpaperService2: Service() {
|
||||
it.copy(
|
||||
album = it.album.copy(
|
||||
homeWallpapersInQueue = it.album.homeWallpapersInQueue.filter { it != wallpaper1 },
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 },
|
||||
currentLockWallpaper = null
|
||||
lockWallpapersInQueue = it.album.lockWallpapersInQueue.filter { it != wallpaper1 }
|
||||
),
|
||||
wallpapers = it.wallpapers.filter { it == it1 },
|
||||
)
|
||||
@@ -531,14 +512,15 @@ class WallpaperService2: Service() {
|
||||
setHome: Boolean, setLock: Boolean,
|
||||
setLockOrHome: Boolean? = null,
|
||||
blur: Boolean = false,
|
||||
blurPercent: Int
|
||||
blurPercent: Int,
|
||||
lastHomeWallpaper: Uri? = null,
|
||||
): Boolean {
|
||||
val wallpaperManager = WallpaperManager.getInstance(context)
|
||||
try {
|
||||
val imageSize = wallpaper.getImageDimensions(context) ?: return false
|
||||
val aspectRatio = imageSize.height.toFloat() / imageSize.width.toFloat()
|
||||
val device = context.resources.displayMetrics
|
||||
val targetWidth = min(4 * device.widthPixels, imageSize.width)
|
||||
val targetWidth = min(device.widthPixels, imageSize.width)
|
||||
val targetHeight = (targetWidth * aspectRatio).toInt()
|
||||
|
||||
val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
@@ -627,101 +609,4 @@ class WallpaperService2: Service() {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
private fun refreshAlbum(context: Context) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
var albumWithWallpapers = albumRepository.getAlbumsWithWallpaperAndFolder().first()
|
||||
albumWithWallpapers.forEach { albumWithWallpaper ->
|
||||
// Delete wallpaper if the URI is invalid
|
||||
val invalidWallpapers = albumWithWallpaper.wallpapers.filterNot { wallpaper ->
|
||||
val file = DocumentFile.fromSingleUri(context, wallpaper.wallpaperUri.toUri())
|
||||
file?.exists() == true
|
||||
}
|
||||
if (invalidWallpapers.isNotEmpty()) {
|
||||
albumRepository.deleteWallpaperList(invalidWallpapers)
|
||||
}
|
||||
|
||||
// Update folder cover uri and wallpapers uri
|
||||
albumWithWallpaper.folders.forEach { folder ->
|
||||
try {
|
||||
DocumentFileCompat.fromTreeUri(context, folder.folderUri.toUri())?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory()) {
|
||||
albumRepository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
albumRepository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
DocumentFile.fromTreeUri(context, folder.folderUri.toUri())?.let { folderDirectory ->
|
||||
if (!folderDirectory.isDirectory) {
|
||||
albumRepository.deleteFolder(folder)
|
||||
} else {
|
||||
val wallpapers = getWallpaperFromFolder(folder.folderUri, context)
|
||||
val folderCoverFile = folder.coverUri?.let { DocumentFile.fromSingleUri(context, it.toUri()) }
|
||||
val folderCover = folderCoverFile?.takeIf { it.exists() }?.uri?.toString() ?: wallpapers.randomOrNull()
|
||||
albumRepository.updateFolder(folder.copy(coverUri = folderCover, wallpapers = wallpapers))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete empty albums
|
||||
if (albumWithWallpaper.wallpapers.isEmpty() && albumWithWallpaper.folders.all { it.wallpapers.isEmpty() }) {
|
||||
albumRepository.deleteAlbum(albumWithWallpaper.album)
|
||||
}
|
||||
}
|
||||
|
||||
// Update selected album
|
||||
albumWithWallpapers = albumRepository.getAlbumsWithWallpaperAndFolder().first()
|
||||
val selectedAlbum = selectedRepository.getSelectedAlbum().first().firstOrNull()
|
||||
if (selectedAlbum != null) {
|
||||
albumWithWallpapers.find { it.album.initialAlbumName == selectedAlbum.album.initialAlbumName }
|
||||
?.let { foundAlbum ->
|
||||
val albumNameHashCode = foundAlbum.album.initialAlbumName.hashCode()
|
||||
val wallpapers: List<Wallpaper> =
|
||||
foundAlbum.wallpapers + foundAlbum.folders.flatMap { folder ->
|
||||
folder.wallpapers.map { wallpaper ->
|
||||
Wallpaper(
|
||||
initialAlbumName = foundAlbum.album.initialAlbumName,
|
||||
wallpaperUri = wallpaper,
|
||||
key = wallpaper.hashCode() + albumNameHashCode,
|
||||
)
|
||||
}
|
||||
}
|
||||
val wallpapersUri = wallpapers.map { it.wallpaperUri }.toSet()
|
||||
if (wallpapersUri.isEmpty()) {
|
||||
selectedRepository.deleteAll()
|
||||
onDestroy()
|
||||
}
|
||||
else {
|
||||
val newSelectedAlbum = SelectedAlbum(
|
||||
album = foundAlbum.album.copy(
|
||||
homeWallpapersInQueue = if (selectedAlbum.album.homeWallpapersInQueue.firstOrNull() in wallpapersUri) {
|
||||
val firstElement = selectedAlbum.album.homeWallpapersInQueue.first()
|
||||
val modifiedWallpapersUri = wallpapersUri.filter { it != firstElement }
|
||||
listOf(firstElement) + modifiedWallpapersUri.shuffled()
|
||||
} else { wallpapersUri.shuffled() },
|
||||
lockWallpapersInQueue = if (selectedAlbum.album.lockWallpapersInQueue.firstOrNull() in wallpapersUri) {
|
||||
val firstElement = selectedAlbum.album.lockWallpapersInQueue.first()
|
||||
val modifiedWallpapersUri = wallpapersUri.filter { it != firstElement }
|
||||
listOf(firstElement) + modifiedWallpapersUri.shuffled()
|
||||
} else { wallpapersUri.shuffled() },
|
||||
currentHomeWallpaper = if (selectedAlbum.album.currentHomeWallpaper in wallpapersUri) selectedAlbum.album.currentHomeWallpaper else selectedAlbum.album.homeWallpapersInQueue.firstOrNull { it in wallpapersUri },
|
||||
currentLockWallpaper = if (selectedAlbum.album.currentLockWallpaper in wallpapersUri) selectedAlbum.album.currentLockWallpaper else selectedAlbum.album.lockWallpapersInQueue.firstOrNull { it in wallpapersUri }
|
||||
),
|
||||
wallpapers = wallpapers
|
||||
)
|
||||
selectedRepository.upsertSelectedAlbum(newSelectedAlbum)
|
||||
}
|
||||
} ?: run { onDestroy() }
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("PaperizeWallpaperChanger", "Error refreshing album", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Paperize</string>
|
||||
<string name="SettingsIcon">اختيارات</string>
|
||||
<string name="dropdownmenu_settings">الإعدادات</string>
|
||||
<string name="home_screen">الرئيسية</string>
|
||||
<string name="wallpaper_screen">الخلفية</string>
|
||||
<string name="library_screen">المكتبة</string>
|
||||
<string name="settings_screen">الإعدادات</string>
|
||||
<string name="settings_back">ارجع</string>
|
||||
<string name="LibraryFloatingButton">ضيف للمكتبة</string>
|
||||
<string name="set_wallpaper_description">شغٌَل الخلفية المتحركة</string>
|
||||
<string name="add_wallpaper">حط خلفية</string>
|
||||
<string name="add_images">حط صور</string>
|
||||
<string name="add_folder">حط مجلد</string>
|
||||
<string name="contact_button">اتصل</string>
|
||||
<string name="image_is_selected">اختارت الصورة</string>
|
||||
<string name="image_is_not_selected">ما اختارتش الصورة</string>
|
||||
<string name="select_all_images_for_deletion">عَلٌِم على كل الصور للمسح</string>
|
||||
<string name="delete_confirmation">متأكد عايز تمسح</string>
|
||||
<string name="all_images_selected_for_deletion">كل الصور متعلِّم عليهم للمسح</string>
|
||||
<string name="add_album">حط ألبوم</string>
|
||||
<string name="add_wallpaper_screen">حط شاشة للخلفية</string>
|
||||
<string name="enter_the_name_of_the_album">دخَّل اسم الألبوم</string>
|
||||
<string name="album_name">اسم الألبوم</string>
|
||||
<string name="cancel">الغى</string>
|
||||
<string name="save">احفظ</string>
|
||||
<string name="delete_album">امسح</string>
|
||||
<string name="change_name">عَدِّل الاسم</string>
|
||||
<string name="click_to_select_a_different_album">اضغط عشان تختار ألبوم تانى</string>
|
||||
<string name="no_icon">مافيش أيقونة</string>
|
||||
<string name="no_album_selected">مافيش ألبوم مُختَار</string>
|
||||
<string name="currently_selected_album">الألبوم المخُتَار</string>
|
||||
<string name="stop_the_album">وَقَّف الألبوم</string>
|
||||
<string name="more_options">اختيارات أكتر</string>
|
||||
<string name="startup">ابدأ</string>
|
||||
<string name="agree">موافق</string>
|
||||
<string name="welcome">أهلاً</string>
|
||||
<string name="notifications">الإشعارات</string>
|
||||
<string name="continue_button">ياللا بينا</string>
|
||||
<string name="notification_permission_is_required_for_this_app_to_work_properly">لازم إذن الإشعارات عشان يشتغل البرنامج كويس</string>
|
||||
<string name="allow">اسمح</string>
|
||||
<string name="notification_info_message">ممكن تِشَغَّل الإشعارات عشان تعرف لما البرنامج يبقى شغًَال فى الخلفية.</string>
|
||||
<string name="set_as_lock_screen">ثبت لشاشة القفل</string>
|
||||
<string name="lock_screen">شاشة القفل</string>
|
||||
<string name="home">الشاشة الرئيسية</string>
|
||||
<string name="last_change">آخر تغيير</string>
|
||||
<string name="next_change">التغيير الجاى</string>
|
||||
<string name="privacy_policy">سياسة الخصوصية</string>
|
||||
<string name="privacy_screen">شاشة الخصوصية</string>
|
||||
<string name="licenses">التراخيص</string>
|
||||
<string name="licenses_screen">شاشة التراخيص</string>
|
||||
<string name="contact">اتصل</string>
|
||||
<string name="contact_the_author_by_email">ابعت لصاحب البرنامج على البريد الالكترونى</string>
|
||||
<string name="reset_to_default">ارجع للوضع الافتراضى</string>
|
||||
<string name="reset_all_data">عيد ظبط كل البيانات</string>
|
||||
<string name="are_you_sure_you_want_to_reset_all_settings_and_data_to_default">متأكد إنك عايز تعيد ظبط كل الإعدادات و البيانات للوضع الافتراضى؟</string>
|
||||
<string name="confirm">أيوة</string>
|
||||
<string name="spotlight_animation">تحريك بقعة الضوء</string>
|
||||
<string name="circle_2_animation">تحريك الدايرة ٢</string>
|
||||
<string name="circle_1_animation">تحريك الدايرة ١</string>
|
||||
<string name="circle_3_animation">تحريك الدايرة ٣</string>
|
||||
<string name="wallpaper_changer_has_been_enabled">مُغَيِّر الخلفية شغَّال.</string>
|
||||
<string name="wallpaper_changer_has_been_disabled">مُغَيِّر الخلفية مَطفى.</string>
|
||||
<string name="dismiss">الغى</string>
|
||||
<string name="has_been_unselected">%1$s مش متعَلِّم عليه.</string>
|
||||
<string name="interval_home">الشاشة الرئيسية | %1$s</string>
|
||||
<string name="interval_lock">شاشة القفل | %1$s</string>
|
||||
<string name="interval">الفترة | %1$s</string>
|
||||
<plurals name="minutes">
|
||||
<item quantity="zero">ولا دقيقة (%d)</item>
|
||||
<item quantity="one">دقيقة واحدة (%d)</item>
|
||||
<item quantity="two">دقيقتين (%d)</item>
|
||||
<item quantity="few">%d دقايق</item>
|
||||
<item quantity="many">%d دقايق</item>
|
||||
<item quantity="other">%d دقيقة</item>
|
||||
</plurals>
|
||||
<plurals name="hours">
|
||||
<item quantity="zero">ولا ساعة (%d)</item>
|
||||
<item quantity="one">ساعة واحدة (%d)</item>
|
||||
<item quantity="two">ساعتين (%d)</item>
|
||||
<item quantity="few">%d ساعات</item>
|
||||
<item quantity="many">%d ساعات</item>
|
||||
<item quantity="other">%d ساعة</item>
|
||||
</plurals>
|
||||
<plurals name="days">
|
||||
<item quantity="zero">ولا يوم (%d)</item>
|
||||
<item quantity="one">يوم واحد (%d)</item>
|
||||
<item quantity="two">يومين (%d)</item>
|
||||
<item quantity="few">%d أيام</item>
|
||||
<item quantity="many">%d أيام</item>
|
||||
<item quantity="other">%d يوم</item>
|
||||
</plurals>
|
||||
<string name="selected_count">%1$s متعَلِّم عليه</string>
|
||||
<string name="please_read_and_agree_to_the_following_privacy_notice_to_use_the_app">لو سمحت اقرا و وافق على إشعار الخصوصية الجاى عشان تستخدم البرنامج.</string>
|
||||
<string name="privacy_notice">إشعار الخصوصية</string>
|
||||
<string name="please_read_and_agree_to_the_privacy_notice">لو سمحت اقرا و وافق على إشعار الخصوصية.</string>
|
||||
<string name="view">ورينى</string>
|
||||
<string name="welcome_animation">حركة الترحيب</string>
|
||||
<string name="notification_bell_animation">تحريك جرز الإشعارات</string>
|
||||
<string name="delete_these">امسح دول؟</string>
|
||||
<string name="are_you_sure_you_want_to_delete_these_wallpapers">انت متأكد إنك عايز تمسح الخلفيات دى؟</string>
|
||||
<string name="are_you_sure_you_want_to_delete_this">انت متأكد إنك عايز تمسح ده؟</string>
|
||||
<string name="delete_album_question">امسح الألبوم؟</string>
|
||||
<string name="animation">التحريك</string>
|
||||
<string name="increase_visual_appeal">زيادة الجاذبية البصرية</string>
|
||||
<string name="dark_mode">الوضع الغامق</string>
|
||||
<string name="automatic_device_mode">وضع الجهاز التلقائى</string>
|
||||
<string name="light_mode">الوضع الفاتح</string>
|
||||
<string name="easier_on_the_eyes">أسهل على العيون</string>
|
||||
<string name="dynamic_theme">السيم الديناميكى</string>
|
||||
<string name="material_you">ألوان متماشية مع النظام</string>
|
||||
<string name="dynamic_theming">التسييم الديناميكى</string>
|
||||
<string name="click_here_to_view_the_licenses">اضغط هنا عشان تشوف التراخيص</string>
|
||||
<string name="click_here_to_view_our_privacy_policy">اضغط عشان تشوف سياسة الخصوصية بتاعتنا</string>
|
||||
<string name="add_images_btn">حط صورة</string>
|
||||
<string name="add_folder_btn">حط مجلد</string>
|
||||
<string name="version">الإصدار %1$s</string>
|
||||
<string name="appearance">المظهر</string>
|
||||
<string name="about">عَنَّا</string>
|
||||
<string name="coming_soon">قريباً</string>
|
||||
<string name="new_album">ألبوم جديد</string>
|
||||
<string name="wallpapers">الخلفيات</string>
|
||||
<string name="translation">الترجمة</string>
|
||||
<string name="help_translate_the_app_on_crowdin">ساعد على ترجمة البرنامج على Crowdin!</string>
|
||||
<plurals name="wallpaper_count">
|
||||
<item quantity="zero">ولا خلفية (%d)</item>
|
||||
<item quantity="one">خلفية واحدة (%d)</item>
|
||||
<item quantity="two">خلفيتين (%d)</item>
|
||||
<item quantity="few">%d خلفيات</item>
|
||||
<item quantity="many">%d خلفيات</item>
|
||||
<item quantity="other">%d خلفية</item>
|
||||
</plurals>
|
||||
<string name="privacy_intro_title">المقدمة</string>
|
||||
<string name="privacy_intro_content">أهلاً بيك فى %1$s! إشعار الخصوصية ده بيوضح ازاى إحنا بنجَمَّع، و نستخدم، و نحمى معلوماتك الشخصية لما تستخدم برنامج التيليفون بتاعنا. باستخدامك لـ %1$s، بتوافق على الشروط اللى متوضَّحَة فى الإشعار ده.</string>
|
||||
<string name="privacy_data_collection_title">جمع البيانات</string>
|
||||
<string name="privacy_data_collection_content">استخدام الإشعارات: %1$s عايز يستخدم الإشعارات عشان يبعت لك توصيات خلفية مُخَصَّصَة بناءً على إشعاراتك. إحنا مش بنخَزِّن أي محتوى إشعارات أو معلومات تعريف شخصية (م ت ش) برى جهازك.\n\nالملفات المحلية: %1$s بيستخدم الملفات المِتخَزِّنَة على جهازك عشان تحطها كخلفيات. إحنا مش بنحَمِّل أو ننقل الملفات دى لأي خوادم خارجية.</string>
|
||||
<string name="privacy_information_usage_title">استخدام المعلومات</string>
|
||||
<string name="privacy_information_usage_content">البيانات الشخصية: احنا مش بنجَمَّع أو نخزن أي بيانات شخصية زى الأسماء أو عناوين البريد الإلكترونى أو أرقام التليفونات.\n\nتحليلات الاستخدام: %1$s مش بيتَّبع سلوك الاستخدام بتاعك أو يجَمَّع بيانات التحليلات.</string>
|
||||
<string name="privacy_data_security_title">أمن البيانات</string>
|
||||
<string name="privacy_data_security_content">التخزين على الجهاز: كل البيانات التي بيستخدمها %1$s بتفضل على جهازك. احنا مش بننقل أو نخَزِّن أي بيانات برى.</string>
|
||||
<string name="privacy_third_party_services_title">خدمات من جهات تانية</string>
|
||||
<string name="privacy_third_party_services_content">الإعلانات: %1$s مش بيعرض إعلانات من جهات تانية.\n\nالروابط الخارجية: برنامجنا ممكن يكون فيه روابط لمواقع خارجية. خلى بالك احنا مش مسؤولين عن ممارسات الخصوصية للمواقع دى.</string>
|
||||
<string name="privacy_children_privacy_title">خصوصية الأطفال</string>
|
||||
<string name="privacy_children_privacy_content">%1$s مش مُخَصَّص للأطفال تحت ١٣ سنة. احنا مش بنجَمَّع أى معلومات من الأطفال عن قصد.</string>
|
||||
<string name="privacy_changes_notice_title">اللى اتغير فى الإشعار ده</string>
|
||||
<string name="privacy_changes_notice_content">احنا ممكن نحدِّث إشعار الخصوصية ده من وقت للتانى. أى تغييرات هتبان فى الرنامج وعلى موقعنا.</string>
|
||||
<string name="privacy_contact_us_title">اتصل بينا</string>
|
||||
<string name="privacy_contact_us_content">لو عندك أى أسئلة أو استفسارات بشأن إشعار الخصوصية ده، اتصل بيا على %1$s.</string>
|
||||
<string name="no_albums_found">مافيش ألبومات موجودة</string>
|
||||
<string name="disable_live_wallpaper">وَقَّف الخلفية المتحركة</string>
|
||||
<string name="live_wallpaper_detected">دى خلفية متحركة</string>
|
||||
<string name="please_disable_your_live_wallpaper_to_use_the_wallpaper_changer">لو سمحت وَقَّ خلفية الشاشة المتحركة عشان تستخدم مُغَيِّر الخلفية.</string>
|
||||
<string name="ok">ماشى، تمام</string>
|
||||
<string name="percentage">%1$s٪</string>
|
||||
<string name="fill">املى</string>
|
||||
<string name="fit">قَيِّفها</string>
|
||||
<string name="stretch">مِدَّها</string>
|
||||
<string name="wallpaper_scaling">حجم الخلفية</string>
|
||||
<string name="change_brightness">غَيَّر السطوع</string>
|
||||
<string name="home_screen_btn">الشاشة الرئيسية</string>
|
||||
<string name="lock_screen_btn">شاشة القفل</string>
|
||||
<string name="individual_scheduling">جدولة فردية</string>
|
||||
<string name="show_interval_sliders">بَيِّن شريط الفترات</string>
|
||||
<string name="interval_text">فترة زمنية</string>
|
||||
<string name="change_blur">غَيَّر التغييم</string>
|
||||
<string name="paperize_is_running">توريق شغال</string>
|
||||
<string name="next_wallpaper_change">تغيير الخلفية الجاى: %1$s</string>
|
||||
<string name="delay_notice">إشعار التأخير</string>
|
||||
<string name="delay_notice_dialog">إشعار التأخير</string>
|
||||
<string name="to_minimize_battery_usage_changing_wallpapers_may_have_some_delays_once_scheduled_when_the_device_is_asleep_the_wallpaper_may_take_longer_to_apply">عشان نقلل استخدام البطارية، ممكن يحصل شوية تأخير في تغيير خلفيات الشاشة بمجرد جدولتها. لما يكون الجهاز في وضع السكون، تفعيل خلفية الشاشة ممكن ياخد وقت أطول.</string>
|
||||
</resources>
|
||||
File renamed without changes.
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Paperize</string>
|
||||
<string name="SettingsIcon">选项</string>
|
||||
<string name="dropdownmenu_settings">设置</string>
|
||||
<string name="home_screen">首页</string>
|
||||
<string name="wallpaper_screen">壁纸</string>
|
||||
<string name="library_screen">库</string>
|
||||
<string name="settings_screen">设置</string>
|
||||
<string name="settings_back">返回</string>
|
||||
<string name="LibraryFloatingButton">添加新库</string>
|
||||
<string name="set_wallpaper_description">启用动态壁纸</string>
|
||||
<string name="add_wallpaper">添加壁纸</string>
|
||||
<string name="add_images">添加图片</string>
|
||||
<string name="add_folder">添加文件夹</string>
|
||||
<string name="contact_button">联系我们</string>
|
||||
<string name="image_is_selected">已选择图片</string>
|
||||
<string name="image_is_not_selected">未选择图片</string>
|
||||
<string name="select_all_images_for_deletion">选择要删除的所有图片</string>
|
||||
<string name="delete_confirmation">确认删除</string>
|
||||
<string name="all_images_selected_for_deletion">已选择删除所有图片</string>
|
||||
<string name="add_album">添加相册</string>
|
||||
<string name="add_wallpaper_screen">添加壁纸屏幕</string>
|
||||
<string name="enter_the_name_of_the_album">输入相册名称</string>
|
||||
<string name="album_name">相册名称</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="save">保存</string>
|
||||
<string name="delete_album">删除</string>
|
||||
<string name="change_name">编辑名称</string>
|
||||
<string name="click_to_select_a_different_album">单击选择其他相册</string>
|
||||
<string name="no_icon">没有图标</string>
|
||||
<string name="no_album_selected">未选择相册</string>
|
||||
<string name="currently_selected_album">当前选定的相册</string>
|
||||
<string name="stop_the_album">停止相册</string>
|
||||
<string name="more_options">更多选项</string>
|
||||
<string name="startup">启动</string>
|
||||
<string name="agree">同意</string>
|
||||
<string name="welcome">欢迎</string>
|
||||
<string name="notifications">通知</string>
|
||||
<string name="continue_button">我在</string>
|
||||
<string name="notification_permission_is_required_for_this_app_to_work_properly">此应用需要通知权限才能正常运行</string>
|
||||
<string name="allow">允许</string>
|
||||
<string name="notification_info_message">可以启用通知来显示应用程序在后台运行时的情况。</string>
|
||||
<string name="set_as_lock_screen">设置为锁屏</string>
|
||||
<string name="lock_screen">锁屏</string>
|
||||
<string name="home">主屏幕</string>
|
||||
<string name="last_change">上次更改</string>
|
||||
<string name="next_change">下一个更改</string>
|
||||
<string name="privacy_policy">隐私政策</string>
|
||||
<string name="privacy_screen">隐私屏幕</string>
|
||||
<string name="licenses">许可证</string>
|
||||
<string name="licenses_screen">许可证屏幕</string>
|
||||
<string name="contact">联系我们</string>
|
||||
<string name="contact_the_author_by_email">透過電子郵件聯繫作者</string>
|
||||
<string name="reset_to_default">重設為預設</string>
|
||||
<string name="reset_all_data">重置所有數據</string>
|
||||
<string name="are_you_sure_you_want_to_reset_all_settings_and_data_to_default">您確定要將所有設定和資料重設為預設值嗎?</string>
|
||||
<string name="confirm">確認</string>
|
||||
<string name="spotlight_animation">聚光燈動畫</string>
|
||||
<string name="circle_2_animation">圈2動畫</string>
|
||||
<string name="circle_1_animation">圈1動畫</string>
|
||||
<string name="circle_3_animation">圈3動畫</string>
|
||||
<string name="wallpaper_changer_has_been_enabled">壁紙更換器已啟用。</string>
|
||||
<string name="wallpaper_changer_has_been_disabled">壁紙更換器已停用。</string>
|
||||
<string name="dismiss">解僱</string>
|
||||
<string name="has_been_unselected">%1$s 已取消選擇。</string>
|
||||
<string name="interval_home">Home Screen | %1$s</string>
|
||||
<string name="interval_lock">Lock Screen | %1$s</string>
|
||||
<string name="interval">Interval | %1$s</string>
|
||||
<plurals name="minutes">
|
||||
<item quantity="other">%d 分鐘</item>
|
||||
</plurals>
|
||||
<plurals name="hours">
|
||||
<item quantity="other">%d 小時</item>
|
||||
</plurals>
|
||||
<plurals name="days">
|
||||
<item quantity="other">%d 天</item>
|
||||
</plurals>
|
||||
<string name="selected_count">%1$s 已選擇</string>
|
||||
<string name="please_read_and_agree_to_the_following_privacy_notice_to_use_the_app">請閱讀並同意以下隱私權聲明才能使用該應用程式。</string>
|
||||
<string name="privacy_notice">隱私權聲明</string>
|
||||
<string name="please_read_and_agree_to_the_privacy_notice">請閱讀並同意隱私權聲明。</string>
|
||||
<string name="view">看法</string>
|
||||
<string name="welcome_animation">歡迎動畫</string>
|
||||
<string name="notification_bell_animation">通知鈴聲動畫</string>
|
||||
<string name="delete_these">刪除這些?</string>
|
||||
<string name="are_you_sure_you_want_to_delete_these_wallpapers">您確定要刪除這些桌布嗎?</string>
|
||||
<string name="are_you_sure_you_want_to_delete_this">你確定要刪除這個嗎?</string>
|
||||
<string name="delete_album_question">刪除相簿?</string>
|
||||
<string name="animation">卡通</string>
|
||||
<string name="increase_visual_appeal">增加視覺吸引力</string>
|
||||
<string name="dark_mode">深色模式</string>
|
||||
<string name="automatic_device_mode">自動設備模式</string>
|
||||
<string name="light_mode">燈光模式</string>
|
||||
<string name="easier_on_the_eyes">對眼睛更容易</string>
|
||||
<string name="dynamic_theme">動態主題</string>
|
||||
<string name="material_you">物質的你</string>
|
||||
<string name="dynamic_theming">動態主題</string>
|
||||
<string name="click_here_to_view_the_licenses">按一下此處查看許可證</string>
|
||||
<string name="click_here_to_view_our_privacy_policy">點擊這裡查看我們的隱私權政策</string>
|
||||
<string name="add_images_btn">新增圖片</string>
|
||||
<string name="add_folder_btn">新增資料夾</string>
|
||||
<string name="version">版本: %1$s</string>
|
||||
<string name="appearance">外貌</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="coming_soon">即將推出</string>
|
||||
<string name="new_album">新唱片</string>
|
||||
<string name="wallpapers">壁紙</string>
|
||||
<string name="translation">翻譯</string>
|
||||
<string name="help_translate_the_app_on_crowdin">在 Crowdin 上帮助翻译应用程序!</string>
|
||||
<plurals name="wallpaper_count">
|
||||
<item quantity="other">%d 壁纸</item>
|
||||
</plurals>
|
||||
<string name="privacy_intro_title">介绍</string>
|
||||
<string name="privacy_intro_content">欢迎来到 %1$s!本隐私声明概述了当您使用我们的移动应用程序时我们如何收集、使用和保护您的个人信息。使用 %1$s即表示您同意本声明中描述的条款。</string>
|
||||
<string name="privacy_data_collection_title">数据采集</string>
|
||||
<string name="privacy_data_collection_content">通知访问: %1$s 请求通知访问,以便根据您的通知向您提供个性化壁纸推荐。我们不会在您的设备之外存储任何通知内容或个人身份信息 (PII)。\n\n本地文件: %1$s 访问存储在您设备上的文件,以便您将它们设置为壁纸。我们不会将这些文件上传或传输到任何外部服务器。</string>
|
||||
<string name="privacy_information_usage_title">信息使用</string>
|
||||
<string name="privacy_information_usage_content">个人数据:我们不会收集或存储任何个人数据,例如姓名、电子邮件地址或电话号码。\n\n使用情况分析: %1$s 不会跟踪您的使用行为或收集分析数据。</string>
|
||||
<string name="privacy_data_security_title">数据安全</string>
|
||||
<string name="privacy_data_security_content">设备存储: %1$s 使用的所有数据都保留在您的设备上。我们不会向外部传输或存储任何数据。</string>
|
||||
<string name="privacy_third_party_services_title">第三方服务</string>
|
||||
<string name="privacy_third_party_services_content">广告: %1$s 不显示第三方广告。\n\n外部链接:我们的应用可能包含外部网站的链接。请注意,我们对这些网站的隐私保护不承担任何责任。</string>
|
||||
<string name="privacy_children_privacy_title">儿童隐私</string>
|
||||
<string name="privacy_children_privacy_content">%1$s 不适合 13 岁以下的儿童。我们不会故意收集儿童的任何信息。</string>
|
||||
<string name="privacy_changes_notice_title">本通知的变更</string>
|
||||
<string name="privacy_changes_notice_content">我们可能会不时更新本隐私声明。任何更改都将反映在应用程序和我们的网站上。</string>
|
||||
<string name="privacy_contact_us_title">联系我们</string>
|
||||
<string name="privacy_contact_us_content">如果您对本隐私声明有任何疑问或疑虑,请通过 %1$s与我联系。</string>
|
||||
<string name="no_albums_found">未找到相册</string>
|
||||
<string name="disable_live_wallpaper">禁用动态壁纸</string>
|
||||
<string name="live_wallpaper_detected">检测到动态壁纸</string>
|
||||
<string name="please_disable_your_live_wallpaper_to_use_the_wallpaper_changer">请禁用动态壁纸才能使用壁纸更换器。</string>
|
||||
<string name="ok">确定</string>
|
||||
<string name="percentage">%1$s%%</string>
|
||||
<string name="fill">填充</string>
|
||||
<string name="fit">适合</string>
|
||||
<string name="stretch">拉伸</string>
|
||||
<string name="wallpaper_scaling">壁纸缩放</string>
|
||||
<string name="change_brightness">改变亮度</string>
|
||||
<string name="home_screen_btn">主屏幕</string>
|
||||
<string name="lock_screen_btn">锁定屏幕</string>
|
||||
<string name="individual_scheduling">个人排程</string>
|
||||
<string name="show_interval_sliders">显示间隔滑块</string>
|
||||
<string name="interval_text">时间间隔</string>
|
||||
<string name="change_blur">更改模糊</string>
|
||||
<string name="paperize_is_running">Paperize 正在运行</string>
|
||||
<string name="next_wallpaper_change">下一个壁纸更改: %1$s</string>
|
||||
<string name="delay_notice">延迟通知</string>
|
||||
<string name="delay_notice_dialog">延迟通知</string>
|
||||
<string name="to_minimize_battery_usage_changing_wallpapers_may_have_some_delays_once_scheduled_when_the_device_is_asleep_the_wallpaper_may_take_longer_to_apply">为了最大限度地减少电池消耗,更换壁纸可能会有一些延迟。当设备处于睡眠状态时,壁纸可能需要更长时间才能应用。</string>
|
||||
</resources>
|
||||
@@ -1,152 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Paperize</string>
|
||||
<string name="SettingsIcon">選項</string>
|
||||
<string name="dropdownmenu_settings">設定</string>
|
||||
<string name="home_screen">家</string>
|
||||
<string name="wallpaper_screen">壁紙</string>
|
||||
<string name="library_screen">圖書館</string>
|
||||
<string name="settings_screen">設定</string>
|
||||
<string name="settings_back">後退</string>
|
||||
<string name="LibraryFloatingButton">新增庫</string>
|
||||
<string name="set_wallpaper_description">啟用動態桌布</string>
|
||||
<string name="add_wallpaper">添加壁紙</string>
|
||||
<string name="add_images">新增圖片</string>
|
||||
<string name="add_folder">新增資料夾</string>
|
||||
<string name="contact_button">接觸</string>
|
||||
<string name="image_is_selected">影像已選擇</string>
|
||||
<string name="image_is_not_selected">未選擇影像</string>
|
||||
<string name="select_all_images_for_deletion">選擇所有要刪除的影像</string>
|
||||
<string name="delete_confirmation">刪除確認</string>
|
||||
<string name="all_images_selected_for_deletion">選擇刪除的所有影像</string>
|
||||
<string name="add_album">添加相簿</string>
|
||||
<string name="add_wallpaper_screen">添加壁紙螢幕</string>
|
||||
<string name="enter_the_name_of_the_album">輸入專輯名稱</string>
|
||||
<string name="album_name">專輯名稱</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="save">節省</string>
|
||||
<string name="delete_album">刪除</string>
|
||||
<string name="change_name">編輯姓名</string>
|
||||
<string name="click_to_select_a_different_album">點擊以選擇不同的專輯</string>
|
||||
<string name="no_icon">無圖示</string>
|
||||
<string name="no_album_selected">未選擇專輯</string>
|
||||
<string name="currently_selected_album">目前選擇的專輯</string>
|
||||
<string name="stop_the_album">停止專輯</string>
|
||||
<string name="more_options">更多的選擇</string>
|
||||
<string name="startup">啟動</string>
|
||||
<string name="agree">同意</string>
|
||||
<string name="welcome">歡迎</string>
|
||||
<string name="notifications">通知</string>
|
||||
<string name="continue_button">算我一個</string>
|
||||
<string name="notification_permission_is_required_for_this_app_to_work_properly">此應用程式需要通知權限才能正常運行</string>
|
||||
<string name="allow">允許</string>
|
||||
<string name="notification_info_message">可以啟用通知以顯示應用程式在背景運行時的情況。</string>
|
||||
<string name="set_as_lock_screen">設定為鎖定螢幕</string>
|
||||
<string name="lock_screen">鎖定畫面</string>
|
||||
<string name="home">主螢幕</string>
|
||||
<string name="last_change">最後一次變更</string>
|
||||
<string name="next_change">下一步更改</string>
|
||||
<string name="privacy_policy">隱私權政策</string>
|
||||
<string name="privacy_screen">隱私螢幕</string>
|
||||
<string name="licenses">許可證</string>
|
||||
<string name="licenses_screen">許可證螢幕</string>
|
||||
<string name="contact">接觸</string>
|
||||
<string name="contact_the_author_by_email">透過電子郵件聯繫作者</string>
|
||||
<string name="reset_to_default">重設為預設</string>
|
||||
<string name="reset_all_data">重置所有數據</string>
|
||||
<string name="are_you_sure_you_want_to_reset_all_settings_and_data_to_default">您確定要將所有設定和資料重設為預設值嗎?</string>
|
||||
<string name="confirm">確認</string>
|
||||
<string name="spotlight_animation">聚光燈動畫</string>
|
||||
<string name="circle_2_animation">圈2動畫</string>
|
||||
<string name="circle_1_animation">圈1動畫</string>
|
||||
<string name="circle_3_animation">圈3動畫</string>
|
||||
<string name="wallpaper_changer_has_been_enabled">壁紙更換器已啟用。</string>
|
||||
<string name="wallpaper_changer_has_been_disabled">壁紙更換器已停用。</string>
|
||||
<string name="dismiss">解僱</string>
|
||||
<string name="has_been_unselected">%1$s 已取消選擇。</string>
|
||||
<string name="interval_home">Home Screen | %1$s</string>
|
||||
<string name="interval_lock">Lock Screen | %1$s</string>
|
||||
<string name="interval">Interval | %1$s</string>
|
||||
<plurals name="minutes">
|
||||
<item quantity="other">%d 分鐘</item>
|
||||
</plurals>
|
||||
<plurals name="hours">
|
||||
<item quantity="other">%d 小時</item>
|
||||
</plurals>
|
||||
<plurals name="days">
|
||||
<item quantity="other">%d 天</item>
|
||||
</plurals>
|
||||
<string name="selected_count">%1$s 已選擇</string>
|
||||
<string name="please_read_and_agree_to_the_following_privacy_notice_to_use_the_app">請閱讀並同意以下隱私權聲明才能使用該應用程式。</string>
|
||||
<string name="privacy_notice">隱私權聲明</string>
|
||||
<string name="please_read_and_agree_to_the_privacy_notice">請閱讀並同意隱私權聲明。</string>
|
||||
<string name="view">看法</string>
|
||||
<string name="welcome_animation">歡迎動畫</string>
|
||||
<string name="notification_bell_animation">通知鈴聲動畫</string>
|
||||
<string name="delete_these">刪除這些?</string>
|
||||
<string name="are_you_sure_you_want_to_delete_these_wallpapers">您確定要刪除這些桌布嗎?</string>
|
||||
<string name="are_you_sure_you_want_to_delete_this">你確定要刪除這個嗎?</string>
|
||||
<string name="delete_album_question">刪除相簿?</string>
|
||||
<string name="animation">卡通</string>
|
||||
<string name="increase_visual_appeal">增加視覺吸引力</string>
|
||||
<string name="dark_mode">深色模式</string>
|
||||
<string name="automatic_device_mode">自動設備模式</string>
|
||||
<string name="light_mode">燈光模式</string>
|
||||
<string name="easier_on_the_eyes">對眼睛更容易</string>
|
||||
<string name="dynamic_theme">動態主題</string>
|
||||
<string name="material_you">物質的你</string>
|
||||
<string name="dynamic_theming">動態主題</string>
|
||||
<string name="click_here_to_view_the_licenses">按一下此處查看許可證</string>
|
||||
<string name="click_here_to_view_our_privacy_policy">點擊這裡查看我們的隱私權政策</string>
|
||||
<string name="add_images_btn">新增圖片</string>
|
||||
<string name="add_folder_btn">新增資料夾</string>
|
||||
<string name="version">版本: %1$s</string>
|
||||
<string name="appearance">外貌</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="coming_soon">即將推出</string>
|
||||
<string name="new_album">新唱片</string>
|
||||
<string name="wallpapers">壁紙</string>
|
||||
<string name="translation">翻譯</string>
|
||||
<string name="help_translate_the_app_on_crowdin">幫忙翻譯 Crowdin 上的應用程式!</string>
|
||||
<plurals name="wallpaper_count">
|
||||
<item quantity="other">%d 壁紙</item>
|
||||
</plurals>
|
||||
<string name="privacy_intro_title">介紹</string>
|
||||
<string name="privacy_intro_content">歡迎來到 %1$s!本隱私權聲明概述了當您使用我們的行動應用程式時我們如何收集、使用和保護您的個人資訊。使用 %1$s即表示您同意本通知中所述的條款。</string>
|
||||
<string name="privacy_data_collection_title">數據採集</string>
|
||||
<string name="privacy_data_collection_content">通知訪問: %1$s 要求通知訪問,以便根據您的通知為您提供個人化壁紙推薦。我們不會在您的裝置之外儲存任何通知內容或個人識別資訊 (PII)。\n\n本地文件: %1$s 存取裝置上儲存的文件,以便您將它們設定為桌布。我們不會將這些文件上傳或傳輸到任何外部伺服器。</string>
|
||||
<string name="privacy_information_usage_title">資訊使用</string>
|
||||
<string name="privacy_information_usage_content">個人資料:我們不收集或儲存任何個人數據,例如姓名、電子郵件地址或電話號碼。\n\n使用狀況分析: %1$s 不會追蹤您的使用行為或收集分析資料。</string>
|
||||
<string name="privacy_data_security_title">資料安全</string>
|
||||
<string name="privacy_data_security_content">設備上儲存: %1$s 使用的所有資料都保留在您的裝置上。我們不會向外部傳輸或儲存任何資料。</string>
|
||||
<string name="privacy_third_party_services_title">第三方服務</string>
|
||||
<string name="privacy_third_party_services_content">Advertisements: %1$s does not display third-party ads.\n\nExternal Links: Our app may contain links to external websites. Please note that we are not responsible for the privacy practices of these sites.</string>
|
||||
<string name="privacy_children_privacy_title">兒童隱私</string>
|
||||
<string name="privacy_children_privacy_content">%1$s 不適合 13 歲以下的兒童。</string>
|
||||
<string name="privacy_changes_notice_title">本通知的變更</string>
|
||||
<string name="privacy_changes_notice_content">我們可能會不時更新本隱私權聲明。任何更改都將反映在應用程式和我們的網站上。</string>
|
||||
<string name="privacy_contact_us_title">聯絡我們</string>
|
||||
<string name="privacy_contact_us_content">如果您對此隱私權聲明有任何疑問或疑慮,請透過 %1$s與我聯絡。</string>
|
||||
<string name="no_albums_found">沒有找到專輯</string>
|
||||
<string name="disable_live_wallpaper">停用動態壁紙</string>
|
||||
<string name="live_wallpaper_detected">偵測到動態壁紙</string>
|
||||
<string name="please_disable_your_live_wallpaper_to_use_the_wallpaper_changer">請停用您的動態桌布以使用壁紙更換器。</string>
|
||||
<string name="ok">好的</string>
|
||||
<string name="percentage">%1$s%%</string>
|
||||
<string name="fill">充滿</string>
|
||||
<string name="fit">合身</string>
|
||||
<string name="stretch">拉緊</string>
|
||||
<string name="wallpaper_scaling">壁紙縮放</string>
|
||||
<string name="change_brightness">改變亮度</string>
|
||||
<string name="home_screen_btn">主螢幕</string>
|
||||
<string name="lock_screen_btn">鎖定畫面</string>
|
||||
<string name="individual_scheduling">個人安排</string>
|
||||
<string name="show_interval_sliders">顯示間隔滑桿</string>
|
||||
<string name="interval_text">時間間隔</string>
|
||||
<string name="change_blur">改變模糊</string>
|
||||
<string name="paperize_is_running">Paperize 正在運行</string>
|
||||
<string name="next_wallpaper_change">下次更換壁紙: %1$s</string>
|
||||
<string name="delay_notice">延誤通知</string>
|
||||
<string name="delay_notice_dialog">延誤通知</string>
|
||||
<string name="to_minimize_battery_usage_changing_wallpapers_may_have_some_delays_once_scheduled_when_the_device_is_asleep_the_wallpaper_may_take_longer_to_apply">為了最大限度地減少電池使用量,更換壁紙可能會在預定後出現一些延遲。當設備處於睡眠狀態時,壁紙可能需要更長的時間才能應用。</string>
|
||||
</resources>
|
||||
+5
-4
@@ -8,10 +8,11 @@ buildscript {
|
||||
plugins {
|
||||
id("com.android.application") version "8.4.1" apply false
|
||||
id("com.android.library") version "8.4.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
|
||||
id("com.google.dagger.hilt.android") version "2.50" apply false
|
||||
id("com.google.devtools.ksp") version "1.9.0-1.0.13" apply false
|
||||
id ("com.mikepenz.aboutlibraries.plugin") version "11.1.3" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
|
||||
id ("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false
|
||||
id("com.google.dagger.hilt.android") version "2.51" apply false
|
||||
id("com.google.devtools.ksp") version "2.0.0-1.0.21" apply false
|
||||
id ("com.mikepenz.aboutlibraries.plugin") version "11.2.1" apply false
|
||||
id ("org.jetbrains.kotlin.plugin.serialization") version "1.9.22" apply false
|
||||
}
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+3
-1
@@ -1,6 +1,8 @@
|
||||
#Mon Jun 03 14:51:19 PDT 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,99 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,9 +119,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -98,88 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+19
-16
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,7 +25,8 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
@@ -6,7 +6,7 @@ Advanced Image Manipulation: Paperize isn’t just about changing wallpapers; it
|
||||
|
||||
Home and Lock Screen Customization: With Paperize, you have the freedom to set your home screen and lock screen wallpapers together or separately, and at the same time or not. This gives you the ultimate control over your device’s look and feel.
|
||||
|
||||
Supports Various Image Types: Paperize can handle a wide range of image types, offering you flexibility in your wallpaper choices. Whether it’s a JPEG, PNG, or a GIF, Paperize has got you covered.
|
||||
Supports Various Image Types: Paperize can handle a wide range of image types, offering you flexibility in your wallpaper choices. Whether it’s a JPEG, PNG, AVIF or a WEBP, Paperize has got you covered.
|
||||
|
||||
Folder Support: Organize your wallpapers into folders for auto-updating. This feature allows you to categorize your wallpapers and have them change automatically, keeping your device’s look organized and cohesive.
|
||||
|
||||
|
||||
Reference in new issue
Block a user