summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2023-01-15 14:58:06 -0800
committerLinux Build Service Account <lnxbuild@localhost>2023-01-15 14:58:06 -0800
commit935f994d020e3b98aa6274728c49f86fc8c67eb1 (patch)
treedd0af4afe908c6aa3fed94e7e4acdc18ae486f87
parent020f5bec9d1f1f26b7224d60bd474e920743bcfb (diff)
parent5fdc92cc816e262b0fd349fbbfc21555b0d7bf3c (diff)
Merge 5fdc92cc816e262b0fd349fbbfc21555b0d7bf3c on remote branch
Change-Id: I0051ef225c9bf7a20a080bda88db6f2c04d1f2b1
-rw-r--r--Android.bp16
-rw-r--r--PREUPLOAD.cfg2
-rw-r--r--TEST_MAPPING12
-rwxr-xr-xbuild.gradle98
-rw-r--r--gradle.properties3
-rw-r--r--ktfmt_includes.txt9
-rw-r--r--res/drawable/section_divider.xml19
-rwxr-xr-xres/layout/fragment_customization_picker.xml2
-rw-r--r--res/layout/lock_screen_preview.xml2
-rw-r--r--res/layout/wallpaper_info_view.xml4
-rw-r--r--res/values-fa/strings.xml4
-rw-r--r--res/values-kk/strings.xml14
-rw-r--r--res/values-ne/strings.xml6
-rw-r--r--res/values-or/strings.xml20
-rw-r--r--res/values-ro/strings.xml70
-rw-r--r--res/values-te/strings.xml8
-rwxr-xr-xres/values/dimens.xml4
-rwxr-xr-xsrc/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java2
-rwxr-xr-xsrc/com/android/wallpaper/backup/MissingHashCodeGeneratorJobService.java55
-rw-r--r--src/com/android/wallpaper/effects/EffectsController.java13
-rwxr-xr-xsrc/com/android/wallpaper/model/LiveWallpaperInfo.java5
-rwxr-xr-xsrc/com/android/wallpaper/module/DailyLoggingAlarmReceiver.java57
-rwxr-xr-xsrc/com/android/wallpaper/module/DefaultWallpaperPersister.java2
-rwxr-xr-xsrc/com/android/wallpaper/module/DefaultWallpaperPreferences.java14
-rwxr-xr-xsrc/com/android/wallpaper/module/WallpaperPreferenceKeys.java1
-rwxr-xr-xsrc/com/android/wallpaper/module/WallpaperPreferences.java12
-rwxr-xr-xsrc/com/android/wallpaper/picker/ImagePreviewFragment.java13
-rw-r--r--src/com/android/wallpaper/picker/LivePreviewFragment.java5
-rwxr-xr-xsrc/com/android/wallpaper/picker/PreviewFragment.java18
-rw-r--r--src/com/android/wallpaper/picker/WallpaperPickerDelegate.java9
-rw-r--r--src/com/android/wallpaper/widget/GridRowSpacerDecoration.kt40
-rw-r--r--src/com/android/wallpaper/widget/WallpaperInfoView.java66
-rw-r--r--tests/Android.bp36
-rw-r--r--tests/AndroidManifest.xml22
-rw-r--r--tests/AndroidTest.xml28
-rw-r--r--tests/src/com/android/wallpaper/picker/PreviewActivityTest.java27
-rw-r--r--tests/src/com/android/wallpaper/testing/TestAsset.java10
-rw-r--r--tests/src/com/android/wallpaper/testing/TestCurrentWallpaperInfoFactory.java2
-rw-r--r--tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java2
-rw-r--r--tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java11
40 files changed, 406 insertions, 337 deletions
diff --git a/Android.bp b/Android.bp
index 8dfa7f26..dbffb772 100644
--- a/Android.bp
+++ b/Android.bp
@@ -74,6 +74,16 @@ filegroup {
],
}
+// If these targets are included in WallpaperPicker2_defaults directly instead of in a filegroup,
+// the tests can't find them.
+filegroup {
+ name: "WallpaperPicker2_src_overrides",
+ srcs: [
+ "src_override/**/*.java",
+ "src_override/**/*.kt",
+ ],
+}
+
genrule {
name: "WallpaperPicker2_res",
tools: ["soong_zip"],
@@ -107,8 +117,7 @@ java_defaults {
srcs: [
":WallpaperPicker2_srcs",
- "src_override/**/*.java",
- "src_override/**/*.kt",
+ ":WallpaperPicker2_src_overrides",
],
resource_zips: [":WallpaperPicker2_res"],
@@ -123,8 +132,6 @@ java_defaults {
system_ext_specific: true,
use_embedded_native_libs: true,
-
- manifest: "AndroidManifest.xml",
}
//
@@ -134,6 +141,7 @@ android_app {
name: "WallpaperPicker2",
defaults: ["WallpaperPicker2_defaults"],
+ manifest: ":WallpaperPicker2_Manifest",
platform_apis: true,
}
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index f3db20e3..ace848bd 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,2 +1,4 @@
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
+
+ktfmt_hook = ${REPO_ROOT}/external/ktfmt/ktfmt.py --check -i ${REPO_ROOT}/packages/apps/WallpaperPicker2/ktfmt_includes.txt ${PREUPLOAD_FILES}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 00000000..d413e095
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,12 @@
+{
+ "presubmit": [
+ {
+ "name": "WallpaperPicker2Tests",
+ "options": [
+ {
+ "exclude-annotation": "org.junit.Ignore"
+ }
+ ]
+ }
+ ]
+}
diff --git a/build.gradle b/build.gradle
deleted file mode 100755
index 21484259..00000000
--- a/build.gradle
+++ /dev/null
@@ -1,98 +0,0 @@
-buildscript {
- repositories {
- jcenter()
- mavenCentral()
- google()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.2.0-beta05'
- }
-}
-
-apply plugin: 'com.android.application'
-
-android {
- compileSdkVersion 28
- buildToolsVersion "28.0.0"
- defaultConfig {
- applicationId "com.android.wallpaper"
- minSdkVersion 26
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- debug {
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- flavorDimensions "default"
-
- productFlavors {
- aosp {
- dimension "default"
- applicationId 'com.android.wallpaper'
- testApplicationId 'com.android.wallpaper.tests'
- }
- }
-
- sourceSets {
- main {
- java.srcDirs = ["src", "src_override"]
- res.srcDirs = ["res"]
- manifest.srcFile "AndroidManifest.xml"
- }
-
- androidTest {
- res.srcDirs = ["tests/res"]
- java.srcDirs = ["tests/src"]
- manifest.srcFile "tests/AndroidManifest.xml"
- }
- }
-
- lintOptions {
- abortOnError false
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-}
-
-final String ANDROID_X_VERSION = "1.0.0-alpha1"
-
-repositories {
- maven { url "../../../prebuilts/maven_repo/bumptech" }
- mavenCentral()
- google()
- jcenter()
- mavenCentral()
-}
-
-dependencies {
- implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
- implementation "androidx.cardview:cardview:${ANDROID_X_VERSION}"
- implementation "androidx.appcompat:appcompat:${ANDROID_X_VERSION}"
- implementation "androidx.exifinterface:exifinterface:${ANDROID_X_VERSION}"
- implementation "com.google.android.material:material:${ANDROID_X_VERSION}"
-
- implementation 'com.android.volley:volley:1.1.0'
-
- implementation 'com.github.bumptech.glide:glide:SNAPSHOT'
- implementation 'com.github.bumptech.glide:disklrucache:SNAPSHOT'
- implementation 'com.github.bumptech.glide:gifdecoder:SNAPSHOT'
- implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0'
-
- androidTestImplementation('junit:junit:4.12')
- androidTestImplementation('com.android.support.test:runner:1.0.1')
- androidTestImplementation('org.robolectric:robolectric:3.4.2') {
- exclude group: 'xmlpull'
- }
- androidTestImplementation('com.thoughtworks.xstream:xstream:1.4.8');
- androidTestImplementation 'org.mockito:mockito-core:1.10.19'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
- androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.1'
-}
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index bde62acb..00000000
--- a/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-# Until all the dependencies move to android X
-android.useAndroidX = true
-android.enableJetifier = true
diff --git a/ktfmt_includes.txt b/ktfmt_includes.txt
new file mode 100644
index 00000000..37bbd6aa
--- /dev/null
+++ b/ktfmt_includes.txt
@@ -0,0 +1,9 @@
++src/
++src_override/
++tests/
+-src/com/android/wallpaper/model/WallpaperColorsViewModel.kt
+-src/com/android/wallpaper/model/WorkspaceViewModel.kt
+-src/com/android/wallpaper/module/LargeScreenMultiPanesChecker.kt
+-src/com/android/wallpaper/module/MultiPanesChecker.kt
+-src/com/android/wallpaper/util/DisplayUtils.kt
+-src/com/android/wallpaper/widget/GridRowSpacerDecoration.kt
diff --git a/res/drawable/section_divider.xml b/res/drawable/section_divider.xml
deleted file mode 100644
index b37ec1b4..00000000
--- a/res/drawable/section_divider.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@android:color/transparent"/>
- <size android:height="8dp" android:width="1dp" />
-</shape> \ No newline at end of file
diff --git a/res/layout/fragment_customization_picker.xml b/res/layout/fragment_customization_picker.xml
index 2245d1e2..c95c61cb 100755
--- a/res/layout/fragment_customization_picker.xml
+++ b/res/layout/fragment_customization_picker.xml
@@ -26,7 +26,5 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginVertical="@dimen/section_container_vertical_margin"
- android:divider="@drawable/section_divider"
- android:showDividers="middle"
android:orientation="vertical" />
</androidx.core.widget.NestedScrollView>
diff --git a/res/layout/lock_screen_preview.xml b/res/layout/lock_screen_preview.xml
index 8c908777..1387603f 100644
--- a/res/layout/lock_screen_preview.xml
+++ b/res/layout/lock_screen_preview.xml
@@ -47,7 +47,7 @@
android:layout_gravity="center"
android:gravity="center_horizontal"
android:fontFamily="@font/clock"
- android:textColor="?androidprv:attr/colorAccentPrimary"
+ android:textColor="@color/color_accent_primary"
android:typeface="monospace"
android:textSize="@dimen/lock_screen_preview_time_text_size"
android:lineSpacingMultiplier="0.7"
diff --git a/res/layout/wallpaper_info_view.xml b/res/layout/wallpaper_info_view.xml
index bb62ed22..16ee1af9 100644
--- a/res/layout/wallpaper_info_view.xml
+++ b/res/layout/wallpaper_info_view.xml
@@ -36,7 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/wallpaper_info_pane_subtitle1_top_margin"
android:lineHeight="20dp"
- android:textColor="?android:textColorTertiary"
+ android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:visibility="gone" />
@@ -46,7 +46,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/wallpaper_info_pane_subtitle2_top_margin"
android:lineHeight="20dp"
- android:textColor="?android:textColorTertiary"
+ android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:visibility="gone" />
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 20e3df07..37b7f8c9 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -62,8 +62,8 @@
<string name="wallpaper_thumbnail" msgid="569931475923605974">"تصویر کوچک کاغذ‌دیواری"</string>
<string name="explore_home_screen" msgid="8756346794535765482">"کاوش کاغذ‌دیواری صفحه اصلی"</string>
<string name="explore_lock_screen" msgid="268938342103703665">"کاوش کاغذ‌دیواری صفحه در حالت قفل"</string>
- <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"بازخوانی کاغذدیواری روزانه در صفحه اصلی"</string>
- <string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"بازخوانی کاغذدیواری روزانه"</string>
+ <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"بازآوری کاغذدیواری روزانه در صفحه اصلی"</string>
+ <string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"بازآوری کاغذدیواری روزانه"</string>
<string name="refreshing_daily_wallpaper_dialog_message" msgid="1975910873362855761">"درحال بازآوری کاغذدیواری روزانه…"</string>
<string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"کاغذدیواری روزانه بازآوری نشد. لطفاً اتصال شبکه‌تان را بررسی و دوباره امتحان کنید."</string>
<string name="on_device_wallpapers_category_title" msgid="805819102071369004">"کاغذدیواری‌های موجود در دستگاه"</string>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index e1f79052..a5e0e4bd 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -77,7 +77,7 @@
<string name="center_wallpaper_position" msgid="4166894762352288883">"Ортасы"</string>
<string name="center_crop_wallpaper_position" msgid="1681980019815343348">"Ортасынан қию"</string>
<string name="stretch_wallpaper_position" msgid="5002680983147456935">"Созу"</string>
- <string name="preview" msgid="1774602101743861071">"Алдын ала қарау"</string>
+ <string name="preview" msgid="1774602101743861071">"Алдын ала көру"</string>
<string name="tab_info" msgid="818614080690111416">"Ақпарат"</string>
<string name="tab_customize" msgid="2533745409174959960">"Реттеу"</string>
<string name="tab_effects" msgid="3213606157589233901">"Әсерлер"</string>
@@ -94,15 +94,15 @@
<string name="next_page_content_description" msgid="6268461446679584152">"Келесі"</string>
<string name="previous_page_content_description" msgid="1138597031571078429">"Алдыңғы"</string>
<string name="wallpaper_title" msgid="6754214682228331092">"Тұсқағаз"</string>
- <string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Тұсқағазды алдын ала қарау"</string>
+ <string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Тұсқағазды алдын ала көру"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Жинақ жоқ."</string>
<string name="cancel" msgid="4970902691067201584">"Бас тарту"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Алдын ала қарау экранын жасыру"</string>
- <string name="hint_hide_ui_preview" msgid="4527603797714586070">"Пайдаланушы интерфейсі алдын ала қарау режимінде жасырылған. Көрсету үшін екі рет түртіңіз."</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Алдын ала қарау экранын көрсету"</string>
- <string name="hint_show_ui_preview" msgid="2744155435325318349">"Пайдаланушы интерфейсі алдын ала қарау режимінде көрсетілген. Жасыру үшін екі рет түртіңіз."</string>
+ <string name="hide_ui_preview_text" msgid="6766076482511252295">"Алдын ала көру экранын жасыру"</string>
+ <string name="hint_hide_ui_preview" msgid="4527603797714586070">"Пайдаланушы интерфейсі алдын ала көру режимінде жасырылған. Көрсету үшін екі рет түртіңіз."</string>
+ <string name="show_ui_preview_text" msgid="5993063062417070806">"Алдын ала көру экранын көрсету"</string>
+ <string name="hint_show_ui_preview" msgid="2744155435325318349">"Пайдаланушы интерфейсі алдын ала көру режимінде көрсетілген. Жасыру үшін екі рет түртіңіз."</string>
<string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Тұсқағазды өзгерту"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Құлып экраны тұсқағазын алдын ала қарау"</string>
+ <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Құлып экраны тұсқағазын алдын ала көру"</string>
<string name="apply_btn" msgid="5764555565943538528">"Қолдану"</string>
<string name="accessibility_customize_hidden" msgid="6320568529768181691">"Реттеу панелі жасырылған."</string>
<string name="accessibility_customize_shown" msgid="590964727831547651">"Реттеу панелі көрсетілген."</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 4a5bea78..dc7499ff 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -29,11 +29,11 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"हाल सेट गरिएको"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"दैनिक वालपेपर"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"गृह तथा लक स्क्रिन"</string>
- <string name="home_screen_message" msgid="106444102822522813">"गृह स्क्रिन"</string>
+ <string name="home_screen_message" msgid="106444102822522813">"होम स्क्रिन"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"लक स्क्रिन"</string>
- <string name="home_and_lock_short_label" msgid="2937922943541927983">"गृह स्क्रिन &amp; लक स्क्रिन"</string>
+ <string name="home_and_lock_short_label" msgid="2937922943541927983">"होम स्क्रिन &amp; लक स्क्रिन"</string>
<string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"यहाँ वालपेपर सेट गर्नुहोस्"</string>
- <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"गृह स्क्रिन"</string>
+ <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"होम स्क्रिन"</string>
<string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"लक स्क्रिन"</string>
<string name="set_wallpaper_both_destination" msgid="2536004558738350775">"होम र लक स्क्रिन"</string>
<string name="no_backup_image_wallpaper_label" msgid="6316627676107284851">"छवि परिवर्तन हुने वालपेपर"</string>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 68d2a5a2..fbca74a2 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -28,14 +28,14 @@
<string name="load_wallpaper_error_message" msgid="7913278480467707374">"ୱାଲପେପର୍ ଲୋଡ୍ କରିବାରେ ଅସମର୍ଥ। ଇମେଜ୍‌ଟି ନଷ୍ଟ ହୋଇଯାଇଛି କିମ୍ବା ଉପଲବ୍ଧ ନାହିଁ।"</string>
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"ଏହିକ୍ଷଣି ସେଟ୍ ହୋଇଛି"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"ଦୈନିକ ୱାଲପେପର୍"</string>
- <string name="wallpaper_destination_both" msgid="1124197176741944063">"ହୋମ୍ ଓ ଲକ୍ ସ୍କ୍ରିନ୍"</string>
- <string name="home_screen_message" msgid="106444102822522813">"ହୋମ୍‍ ସ୍କ୍ରୀନ୍‍"</string>
+ <string name="wallpaper_destination_both" msgid="1124197176741944063">"ହୋମ ଓ ଲକ ସ୍କ୍ରିନ"</string>
+ <string name="home_screen_message" msgid="106444102822522813">"ହୋମ ସ୍କ୍ରିନ"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"ଲକ୍‌ ସ୍କ୍ରୀନ୍‌"</string>
- <string name="home_and_lock_short_label" msgid="2937922943541927983">"ହୋମ୍ ଓ ଲକ୍"</string>
+ <string name="home_and_lock_short_label" msgid="2937922943541927983">"ହୋମ ଓ ଲକ"</string>
<string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"ଏଥିରେ ୱାଲପେପର୍ ସେଟ୍ କରନ୍ତୁ"</string>
- <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"ହୋମ୍‍ ସ୍କ୍ରୀନ୍‍"</string>
+ <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"ହୋମ ସ୍କ୍ରିନ"</string>
<string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"ଲକ୍‌ ସ୍କ୍ରୀନ୍‌"</string>
- <string name="set_wallpaper_both_destination" msgid="2536004558738350775">"ମୂଳସ୍କ୍ରିନ ଏବଂ ଲକ ସ୍କ୍ରିନ"</string>
+ <string name="set_wallpaper_both_destination" msgid="2536004558738350775">"ହୋମ ଏବଂ ଲକ ସ୍କ୍ରିନ"</string>
<string name="no_backup_image_wallpaper_label" msgid="6316627676107284851">"ୱାଲପେପର୍‌ ଇମେଜ୍‌କୁ ଘୂରାଇବା"</string>
<string name="permission_needed_explanation" msgid="139166837541426823">"ଏଠାରେ ସାମ୍ପ୍ରତିକ ୱାଲପେପର୍‌କୁ ଦେଖାଇବା ପାଇଁ, <xliff:g id="APP_NAME">%1$s</xliff:g> ଆପଣଙ୍କ ଡିଭାଇସ୍‌ ଷ୍ଟୋରେଜ୍‌ର ଆକ୍ସେସ୍ ଆବଶ୍ୟକ।"</string>
<string name="permission_needed_explanation_go_to_settings" msgid="3923551582092599609">"ଏଠାରେ ସାମ୍ପ୍ରତିକ ୱାଲପେପର୍‌କୁ ଦେଖାଇବା ପାଇଁ, ଆପଣଙ୍କ ଡିଭାଇସ୍‌ ଷ୍ଟୋରେଜ୍‌ର ଆକ୍ସେସ୍ ଆବଶ୍ୟକ। \n\n ଏହି ସେଟିଙ୍ଗକୁ ପରିବର୍ତ୍ତନ କରିବା ସକାଶେ ୱାଲପେପର୍‌ର ଆପ୍ ସୂଚନା ଅନୁମତି କ୍ଷେତ୍ରକୁ ଯା’ନ୍ତୁ।"</string>
@@ -56,13 +56,13 @@
<string name="wallpaper_disabled_by_administrator_message" msgid="1551430406714747884">"ୱାଲପେପର୍‌ର ସେଟିଙ୍ଗକୁ ଆପଣଙ୍କ ଡିଭାଇସ୍ ଆଡମିନିଷ୍ଟ୍ରେଟର୍ ଦ୍ଵାରା ଅକ୍ଷମ କରାଯାଇଛି"</string>
<string name="wallpaper_set_successfully_message" msgid="2958998799111688578">"ୱାଲପେପର୍ ସଫଳତାର ସହ ସେଟ୍ ହୋଇଛି"</string>
<string name="wallpapers_unavailable_offline_message" msgid="8136405438621689532">"ୱାଲପେପର୍ ଦେଖିବା ପାଇଁ ଗୋଟିଏ ଇଣ୍ଟର୍ନେଟ୍ କନେକ୍ସନ୍ ଆବଶ୍ୟକ। ଦୟାକରି କନେକ୍ଟ କରି ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
- <string name="currently_set_home_wallpaper_thumbnail" msgid="4022381436821898917">"ବର୍ତ୍ତମାନ ହୋମ୍ ସ୍କ୍ରୀନ୍‌ରେ ଥିବା ୱାଲପେପର୍‌ର ଥମ୍ବନେଲ୍‌କୁ ସେଟ୍ କରନ୍ତୁ"</string>
+ <string name="currently_set_home_wallpaper_thumbnail" msgid="4022381436821898917">"ବର୍ତ୍ତମାନ ହୋମ ସ୍କ୍ରିନରେ ଥିବା ୱାଲପେପର୍‌ର ଥମ୍ବନେଲ୍‌କୁ ସେଟ କରନ୍ତୁ"</string>
<string name="currently_set_lock_wallpaper_thumbnail" msgid="2094209303934569997">"ବର୍ତ୍ତମାନ ଲକ୍ ସ୍କ୍ରୀନ୍‌ରେ ଥିବା ୱାଲପେପର୍‌ର ଥମ୍ବନେଲ୍‌କୁ ଲକ୍ କରନ୍ତୁ"</string>
<string name="currently_set_wallpaper_thumbnail" msgid="8651887838745545107">"ସାମ୍ପ୍ରତିକ ୱାଲପେପର୍‌ ଥମ୍ବନେଲ୍‌କୁ ସେଟ୍ କରନ୍ତୁ"</string>
<string name="wallpaper_thumbnail" msgid="569931475923605974">"ୱାଲପେପର୍‌ ଥମ୍ବନେଲ୍‌"</string>
- <string name="explore_home_screen" msgid="8756346794535765482">"ହୋମ୍ ସ୍କ୍ରୀନ୍ ୱାଲପେପର୍‌କୁ ଏକ୍ସପ୍ଲୋର୍ କରନ୍ତୁ"</string>
+ <string name="explore_home_screen" msgid="8756346794535765482">"ହୋମ ସ୍କ୍ରିନ ୱାଲପେପର୍‌କୁ ଏକ୍ସପ୍ଲୋର କରନ୍ତୁ"</string>
<string name="explore_lock_screen" msgid="268938342103703665">"ଲକ୍ ସ୍କ୍ରୀନ୍ ୱାଲପେପର୍‌କୁ ଏକ୍ସପ୍ଲୋର୍ କରନ୍ତୁ"</string>
- <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"ଦୈନିକ ହୋମ୍ ସ୍କ୍ରୀନ୍ ୱାଲପେପର୍‌କୁ ରିଫ୍ରେଶ୍ କରନ୍ତୁ"</string>
+ <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"ଦୈନିକ ହୋମ ସ୍କ୍ରିନ ୱାଲପେପର୍‌କୁ ରିଫ୍ରେସ କରନ୍ତୁ"</string>
<string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"ଦୈନିକ ୱାଲପେପର୍‌କୁ ରିଫ୍ରେଶ୍ କରନ୍ତୁ"</string>
<string name="refreshing_daily_wallpaper_dialog_message" msgid="1975910873362855761">"ଦୈନିକ ୱାଲପେପର୍ ରିଫ୍ରେଶ୍ ହେଉଛି…"</string>
<string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"ଦୈନିକ ୱାଲପେପର୍‌କୁ ରିଫ୍ରେଶ କରିବାରେ ବିଫଳ ହୋଇଛି। ଦୟାକରି ଆପଣଙ୍କର ନେଟୱର୍କ କନେକ୍ସନ୍‍କୁ ଯାଞ୍ଚ କରିବା ସହିତ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
@@ -86,7 +86,7 @@
<string name="delete_live_wallpaper" msgid="589212696102662329">"ଡିଲିଟ୍ କରନ୍ତୁ"</string>
<string name="delete_wallpaper_confirmation" msgid="33790318361863778">"ଆପଣଙ୍କର ଫୋନ୍‌ରୁ ଏହି ୱାଲ୍‌ପେପର୍‌କୁ ଡିଲିଟ୍ କରିବେ କି?"</string>
<string name="bottom_action_bar_back" msgid="8237013112999946725">"ପଛକୁ ଫେରନ୍ତୁ"</string>
- <string name="bottom_action_bar_edit" msgid="1214742990893082138">"ସମ୍ପାଦନ କରନ୍ତୁ"</string>
+ <string name="bottom_action_bar_edit" msgid="1214742990893082138">"ଏଡିଟ କରନ୍ତୁ"</string>
<string name="bottom_action_bar_download" msgid="3983122338076389421">"ଡାଉନଲୋଡ୍ କରନ୍ତୁ"</string>
<string name="bottom_action_bar_slideshow_wallpaper" msgid="509770525179533154">"ୱାଲପେପରର ସ୍ଲାଇଡଶୋ"</string>
<string name="bottom_action_bar_apply" msgid="2983308349819178932">"ଲାଗୁ କରନ୍ତୁ"</string>
@@ -96,7 +96,7 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ୱାଲପେପର୍"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ୱାଲପେପରର ପ୍ରିଭ୍ୟୁ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ସଂଗ୍ରହ ଉପଲବ୍ଧ ନାହିଁ"</string>
- <string name="cancel" msgid="4970902691067201584">"ବାତିଲ୍ କରନ୍ତୁ"</string>
+ <string name="cancel" msgid="4970902691067201584">"ବାତିଲ କରନ୍ତୁ"</string>
<string name="hide_ui_preview_text" msgid="6766076482511252295">"UI ପ୍ରିଭ୍ୟୁକୁ ଲୁଚାନ୍ତୁ"</string>
<string name="hint_hide_ui_preview" msgid="4527603797714586070">"ପ୍ରିଭ୍ୟୁରେ UI ଲୁଚାଯାଇଛି। ଦେଖାଇବାକୁ ଦୁଇଥର ଟାପ କର"</string>
<string name="show_ui_preview_text" msgid="5993063062417070806">"UI ପ୍ରିଭ୍ୟୁ ଦେଖାନ୍ତୁ"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index ac6d6f64..1ca9cb59 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -21,9 +21,9 @@
<!-- no translation found for app_name (8773648973927541493) -->
<skip />
<string name="select_wallpaper_label" msgid="6989581259339646085">"Categorii de imagini de fundal"</string>
- <string name="set_wallpaper_button_text" msgid="4426286890442731310">"Setați imaginea de fundal"</string>
+ <string name="set_wallpaper_button_text" msgid="4426286890442731310">"Setează imaginea de fundal"</string>
<string name="set_wallpaper_progress_message" msgid="7986528287618716715">"Se setează imaginea de fundal…"</string>
- <string name="try_again" msgid="8278874823700921234">"Încercați din nou"</string>
+ <string name="try_again" msgid="8278874823700921234">"Încearcă din nou"</string>
<string name="set_wallpaper_error_message" msgid="6819986999041085130">"Nu s-a putut seta imaginea de fundal."</string>
<string name="load_wallpaper_error_message" msgid="7913278480467707374">"Imaginea de fundal nu a putut fi încărcată. Imaginea este deteriorată sau nu este disponibilă."</string>
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Setată în prezent"</string>
@@ -32,40 +32,40 @@
<string name="home_screen_message" msgid="106444102822522813">"Ecran de pornire"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ecran de blocare"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"De pornire și de blocare"</string>
- <string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"Setați ca imagine de fundal"</string>
+ <string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"Setează ca imagine de fundal"</string>
<string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"Ecran de pornire"</string>
<string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"Ecran de blocare"</string>
<string name="set_wallpaper_both_destination" msgid="2536004558738350775">"Ecranele de pornire și de blocare"</string>
<string name="no_backup_image_wallpaper_label" msgid="6316627676107284851">"Rotirea imaginilor de fundal"</string>
<string name="permission_needed_explanation" msgid="139166837541426823">"Pentru a afișa aici imaginea de fundal curentă, <xliff:g id="APP_NAME">%1$s</xliff:g> trebuie să poată accesa spațiul de stocare al dispozitivului."</string>
- <string name="permission_needed_explanation_go_to_settings" msgid="3923551582092599609">"Pentru a afișa imaginea de fundal actuală aici, aplicația Imagini de fundal trebuie să poată accesa spațiul de stocare al dispozitivului.\n\nPentru a schimba această setare, accesați zona Permisiuni din informațiile aplicației Imagini de fundal."</string>
- <string name="permission_needed_allow_access_button_label" msgid="1943133660612924306">"Permiteți accesul"</string>
+ <string name="permission_needed_explanation_go_to_settings" msgid="3923551582092599609">"Pentru a afișa imaginea de fundal actuală aici, aplicația Imagini de fundal trebuie să poată accesa spațiul de stocare al dispozitivului.\n\nPentru a schimba această setare, accesează zona Permisiuni din informațiile aplicației Imagini de fundal."</string>
+ <string name="permission_needed_allow_access_button_label" msgid="1943133660612924306">"Permite accesul"</string>
<string name="no_backup_image_wallpaper_description" msgid="8303268619408738057">"Serviciul de imagini de fundal live pentru rotirea imaginilor de fundal"</string>
<string name="daily_refresh_tile_title" msgid="3270456074558525091">"Imaginea de fundal zilnică"</string>
- <string name="daily_refresh_tile_subtitle" msgid="3976682014885446443">"Atingeți pentru a activa"</string>
- <string name="start_rotation_dialog_body_live_wallpaper_needed" msgid="5132580257563846082">"Imaginea de fundal se va schimba automat în fiecare zi. Pentru a finaliza configurarea, atingeți &lt;strong&gt;Setați imaginea de fundal&lt;/strong&gt; în ecranul următor."</string>
- <string name="start_rotation_dialog_wifi_only_option_message" msgid="3126269859713666225">"Descărcați imaginile de fundal ulterioare numai prin Wi-Fi"</string>
- <string name="start_rotation_dialog_continue" msgid="276678987852274872">"Continuați"</string>
+ <string name="daily_refresh_tile_subtitle" msgid="3976682014885446443">"Atinge pentru a activa"</string>
+ <string name="start_rotation_dialog_body_live_wallpaper_needed" msgid="5132580257563846082">"Imaginea de fundal se va schimba automat în fiecare zi. Pentru a finaliza configurarea, atinge &lt;strong&gt;Setează imaginea de fundal&lt;/strong&gt; în ecranul următor."</string>
+ <string name="start_rotation_dialog_wifi_only_option_message" msgid="3126269859713666225">"Descarcă imaginile de fundal ulterioare numai prin Wi-Fi"</string>
+ <string name="start_rotation_dialog_continue" msgid="276678987852274872">"Continuă"</string>
<string name="start_rotation_progress_message" msgid="7872623873682262083">"Se descarcă prima imagine de fundal…"</string>
- <string name="start_rotation_error_message" msgid="3053799836719618972">"Nu se poate descărca prima imagine de fundal. Verificați setările de rețea și încercați din nou."</string>
+ <string name="start_rotation_error_message" msgid="3053799836719618972">"Nu se poate descărca prima imagine de fundal. Verifică setările de rețea și încearcă din nou."</string>
<string name="start_rotation_dialog_body" msgid="7903554799046364916">"Imaginea de fundal se va schimba automat în fiecare zi"</string>
<string name="settings_button_label" msgid="8724734130079207955">"Setări"</string>
- <string name="explore" msgid="7468719504199497281">"Explorați"</string>
+ <string name="explore" msgid="7468719504199497281">"Explorează"</string>
<string name="next_wallpaper" msgid="3911873152952596232">"Următoarea imagine de fundal"</string>
<string name="wallpaper_disabled_message" msgid="7309484130562148185">"Setarea unei imagini de fundal este dezactivată pe dispozitiv"</string>
<string name="wallpaper_disabled_by_administrator_message" msgid="1551430406714747884">"Setarea unei imagini de fundal este dezactivată de administratorul dispozitivului"</string>
<string name="wallpaper_set_successfully_message" msgid="2958998799111688578">"Imaginea de fundal a fost setată"</string>
- <string name="wallpapers_unavailable_offline_message" msgid="8136405438621689532">"Aveți nevoie de o conexiune la internet ca să puteți vedea imagini de fundal. Conectați-vă și încercați din nou."</string>
+ <string name="wallpapers_unavailable_offline_message" msgid="8136405438621689532">"Ai nevoie de o conexiune la internet ca să poți vedea imagini de fundal. Conectează-te și încearcă din nou."</string>
<string name="currently_set_home_wallpaper_thumbnail" msgid="4022381436821898917">"Miniatură a imaginii de fundal setate în prezent pentru ecranul de pornire"</string>
<string name="currently_set_lock_wallpaper_thumbnail" msgid="2094209303934569997">"Miniatură a imaginii de fundal setate în prezent pentru ecranul de blocare"</string>
<string name="currently_set_wallpaper_thumbnail" msgid="8651887838745545107">"Miniatură a imaginii de fundal setate"</string>
<string name="wallpaper_thumbnail" msgid="569931475923605974">"Miniatură a imaginii de fundal"</string>
- <string name="explore_home_screen" msgid="8756346794535765482">"Explorați imaginea de fundal a ecranului de pornire"</string>
- <string name="explore_lock_screen" msgid="268938342103703665">"Explorați imaginea de fundal a ecranului de blocare"</string>
- <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"Actualizați imaginea de fundal zilnică a ecranului de pornire"</string>
- <string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"Actualizați imaginea de fundal zilnică"</string>
+ <string name="explore_home_screen" msgid="8756346794535765482">"Explorează imaginea de fundal a ecranului de pornire"</string>
+ <string name="explore_lock_screen" msgid="268938342103703665">"Explorează imaginea de fundal a ecranului de blocare"</string>
+ <string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"Actualizează imaginea de fundal zilnică a ecranului de pornire"</string>
+ <string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"Actualizează imaginea de fundal zilnică"</string>
<string name="refreshing_daily_wallpaper_dialog_message" msgid="1975910873362855761">"Se actualizează imaginea de fundal zilnică…"</string>
- <string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"Nu s-a putut actualiza imaginea de fundal zilnică. Verificați conexiunea la rețea și încercați din nou."</string>
+ <string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"Nu s-a putut actualiza imaginea de fundal zilnică. Verifică-ți conexiunea la rețea și încearcă din nou."</string>
<string name="on_device_wallpapers_category_title" msgid="805819102071369004">"Imagini fundal pe dispozitiv"</string>
<string name="on_device_wallpapers_category_title_desktop" msgid="316919420410065369">"Pe dispozitiv"</string>
<string name="on_device_wallpaper_title" msgid="5262564748034629524">"Imagine de fundal Android"</string>
@@ -76,39 +76,39 @@
<string name="app_not_found" msgid="4431461707854088231">"Aplicația nu este instalată."</string>
<string name="center_wallpaper_position" msgid="4166894762352288883">"Centru"</string>
<string name="center_crop_wallpaper_position" msgid="1681980019815343348">"Decupare în centru"</string>
- <string name="stretch_wallpaper_position" msgid="5002680983147456935">"Extindeți"</string>
- <string name="preview" msgid="1774602101743861071">"Previzualizați"</string>
+ <string name="stretch_wallpaper_position" msgid="5002680983147456935">"Extinde"</string>
+ <string name="preview" msgid="1774602101743861071">"Previzualizează"</string>
<string name="tab_info" msgid="818614080690111416">"Informații"</string>
- <string name="tab_customize" msgid="2533745409174959960">"Personalizați"</string>
+ <string name="tab_customize" msgid="2533745409174959960">"Personalizează"</string>
<string name="tab_effects" msgid="3213606157589233901">"Efecte"</string>
<string name="my_photos" msgid="8613021349284084982">"Fotografiile mele"</string>
<string name="configure_wallpaper" msgid="849882179182976621">"Setări…"</string>
- <string name="delete_live_wallpaper" msgid="589212696102662329">"Ștergeți"</string>
- <string name="delete_wallpaper_confirmation" msgid="33790318361863778">"Ștergeți această imagine de fundal de pe telefon?"</string>
+ <string name="delete_live_wallpaper" msgid="589212696102662329">"Șterge"</string>
+ <string name="delete_wallpaper_confirmation" msgid="33790318361863778">"Ștergi această imagine de fundal de pe telefon?"</string>
<string name="bottom_action_bar_back" msgid="8237013112999946725">"Înapoi"</string>
- <string name="bottom_action_bar_edit" msgid="1214742990893082138">"Editați"</string>
- <string name="bottom_action_bar_download" msgid="3983122338076389421">"Descărcați"</string>
+ <string name="bottom_action_bar_edit" msgid="1214742990893082138">"Editează"</string>
+ <string name="bottom_action_bar_download" msgid="3983122338076389421">"Descarcă"</string>
<string name="bottom_action_bar_slideshow_wallpaper" msgid="509770525179533154">"Imagine de fundal din slideshow"</string>
- <string name="bottom_action_bar_apply" msgid="2983308349819178932">"Aplicați"</string>
+ <string name="bottom_action_bar_apply" msgid="2983308349819178932">"Aplică"</string>
<string name="accessibility_preview_pager" msgid="1839869637405028575">"Pagina <xliff:g id="ID_1">%1$d</xliff:g> din <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="next_page_content_description" msgid="6268461446679584152">"Înainte"</string>
<string name="previous_page_content_description" msgid="1138597031571078429">"Înapoi"</string>
<string name="wallpaper_title" msgid="6754214682228331092">"Imagine de fundal"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Previzualizarea imaginii de fundal"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Colecția nu există"</string>
- <string name="cancel" msgid="4970902691067201584">"Anulați"</string>
+ <string name="cancel" msgid="4970902691067201584">"Anulează"</string>
<string name="hide_ui_preview_text" msgid="6766076482511252295">"Ascunde previzualizarea IU"</string>
- <string name="hint_hide_ui_preview" msgid="4527603797714586070">"IU ascunsă în previzualizare. Atingeți de 2 ori pentru a reafișa"</string>
+ <string name="hint_hide_ui_preview" msgid="4527603797714586070">"IU ascunsă în previzualizare. Atinge de 2 ori pentru a reafișa"</string>
<string name="show_ui_preview_text" msgid="5993063062417070806">"Afișează previzualizarea IU"</string>
- <string name="hint_show_ui_preview" msgid="2744155435325318349">"IU afișată în previzualizare. Atingeți de 2 ori pentru a ascunde"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Schimbați imaginea de fundal"</string>
+ <string name="hint_show_ui_preview" msgid="2744155435325318349">"IU afișată în previzualizare. Atinge de 2 ori pentru a ascunde"</string>
+ <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Schimbă imaginea de fundal"</string>
<string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Fundal pentru ecranul de blocare"</string>
- <string name="apply_btn" msgid="5764555565943538528">"Aplicați"</string>
- <string name="accessibility_customize_hidden" msgid="6320568529768181691">"Panoul Personalizați ascuns"</string>
- <string name="accessibility_customize_shown" msgid="590964727831547651">"Panoul Personalizați afișat"</string>
+ <string name="apply_btn" msgid="5764555565943538528">"Aplică"</string>
+ <string name="accessibility_customize_hidden" msgid="6320568529768181691">"Panoul Personalizează ascuns"</string>
+ <string name="accessibility_customize_shown" msgid="590964727831547651">"Panoul Personalizează afișat"</string>
<string name="accessibility_info_hidden" msgid="2288603712350168107">"Panoul Informații ascuns"</string>
<string name="accessibility_info_shown" msgid="6626025722456105632">"Panoul Informații afișat"</string>
- <string name="settings_snackbar_description" msgid="890168814524778486">"Activați Fișiere și media în setări."</string>
- <string name="settings_snackbar_enable" msgid="5992112808061426068">"Activați"</string>
- <string name="open_my_photos" msgid="4107196465713868381">"Deschideți Fotografiile mele"</string>
+ <string name="settings_snackbar_description" msgid="890168814524778486">"Activează Fișiere și media în setări."</string>
+ <string name="settings_snackbar_enable" msgid="5992112808061426068">"Activează"</string>
+ <string name="open_my_photos" msgid="4107196465713868381">"Deschide Fotografiile mele"</string>
</resources>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index b860ad44..96b14bed 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -47,7 +47,7 @@
<string name="start_rotation_dialog_wifi_only_option_message" msgid="3126269859713666225">"భవిష్యత్తులో వాల్‌పేపర్‌లను Wi-Fiలో ఉన్నప్పుడు మాత్రమే డౌన్‌లోడ్ చేయండి"</string>
<string name="start_rotation_dialog_continue" msgid="276678987852274872">"కొనసాగించు"</string>
<string name="start_rotation_progress_message" msgid="7872623873682262083">"మొదటి వాల్‌పేపర్‌ను డౌన్‌లోడ్ చేస్తోంది…"</string>
- <string name="start_rotation_error_message" msgid="3053799836719618972">"మొదటి వాల్‌పేపర్‌ను డౌన్‌లోడ్ చేయలేకపోయింది. దయచేసి మీ నెట్‌వర్క్ సెట్టింగ్‌లను తనిఖీ చేసి, ఆపై మళ్లీ ప్రయత్నించండి."</string>
+ <string name="start_rotation_error_message" msgid="3053799836719618972">"మొదటి వాల్‌పేపర్‌ను డౌన్‌లోడ్ చేయలేకపోయింది. దయచేసి మీ నెట్‌వర్క్ సెట్టింగ్‌లను చెక్ చేసి, ఆపై మళ్లీ ప్రయత్నించండి."</string>
<string name="start_rotation_dialog_body" msgid="7903554799046364916">"వాల్‌పేపర్ ప్రతి రోజు ఆటోమేటిక్‌గా మారుతుంది"</string>
<string name="settings_button_label" msgid="8724734130079207955">"సెట్టింగ్‌లు"</string>
<string name="explore" msgid="7468719504199497281">"అన్వేషించు"</string>
@@ -65,7 +65,7 @@
<string name="refresh_daily_wallpaper_home_content_description" msgid="2770445044556164259">"రోజువారీ హోమ్ స్క్రీన్ వాల్‌పేపర్‌ను రిఫ్రెష్ చేస్తుంది"</string>
<string name="refresh_daily_wallpaper_content_description" msgid="4362142658237147583">"రోజువారీ వాల్‌పేపర్‌ను రిఫ్రెష్ చేస్తుంది"</string>
<string name="refreshing_daily_wallpaper_dialog_message" msgid="1975910873362855761">"రోజువారీ వాల్‌పేపర్‌ను రిఫ్రెష్ చేస్తోంది…"</string>
- <string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"రోజువారీ వాల్‌పేపర్‌ను రిఫ్రెష్ చేయడంలో విఫలమైంది. దయచేసి మీ నెట్‌వర్క్ కనెక్షన్‌ను తనిఖీ చేసుకొని, ఆపై మళ్లీ ప్రయత్నించండి."</string>
+ <string name="refresh_daily_wallpaper_failed_message" msgid="4749879993812557166">"రోజువారీ వాల్‌పేపర్‌ను రిఫ్రెష్ చేయడంలో విఫలమైంది. దయచేసి మీ నెట్‌వర్క్ కనెక్షన్‌ను చెక్ చేసుకొని, ఆపై మళ్లీ ప్రయత్నించండి."</string>
<string name="on_device_wallpapers_category_title" msgid="805819102071369004">"పరికరంలో వాల్‌పేపర్‌లు"</string>
<string name="on_device_wallpapers_category_title_desktop" msgid="316919420410065369">"పరికరంలో"</string>
<string name="on_device_wallpaper_title" msgid="5262564748034629524">"Android వాల్‌పేపర్"</string>
@@ -75,11 +75,11 @@
<string name="fallback_wallpaper_title" msgid="6154655421012506001">"వాల్‌పేపర్"</string>
<string name="app_not_found" msgid="4431461707854088231">"యాప్ ఇన్‌స్టాల్ చేయబడలేదు."</string>
<string name="center_wallpaper_position" msgid="4166894762352288883">"మధ్య"</string>
- <string name="center_crop_wallpaper_position" msgid="1681980019815343348">"మధ్యన కత్తిరించు"</string>
+ <string name="center_crop_wallpaper_position" msgid="1681980019815343348">"మధ్యన కత్తిరించండి"</string>
<string name="stretch_wallpaper_position" msgid="5002680983147456935">"విస్తరించు"</string>
<string name="preview" msgid="1774602101743861071">"ప్రివ్యూ"</string>
<string name="tab_info" msgid="818614080690111416">"సమాచారం"</string>
- <string name="tab_customize" msgid="2533745409174959960">"అనుకూలీకరించండి"</string>
+ <string name="tab_customize" msgid="2533745409174959960">"అనుకూలంగా మార్చండి"</string>
<string name="tab_effects" msgid="3213606157589233901">"ఎఫెక్ట్‌లు"</string>
<string name="my_photos" msgid="8613021349284084982">"నా ఫోటోలు"</string>
<string name="configure_wallpaper" msgid="849882179182976621">"సెట్టింగ్‌లు…"</string>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 892b372a..023aba4f 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -234,4 +234,8 @@
<dimen name="wallpaper_effect_failed_button_background_radius">50dp</dimen>
<dimen name="wallpaper_effect_failed_button_height">36dp</dimen>
<dimen name="wallpaper_effect_failed_button_horizontal_padding">16dp</dimen>
+ <dimen name="wallpaper_effect_failed_container_height">36dp</dimen>
+ <dimen name="wallpaper_effect_failed_container_margin_top">24dp</dimen>
+ <dimen name="wallpaper_effect_failed_button_size">16sp</dimen>
+
</resources>
diff --git a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
index 5d9c1e3e..1f4fb674 100755
--- a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
+++ b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
@@ -77,7 +77,7 @@ public class LiveWallpaperThumbAsset extends Asset {
public void decodeBitmap(int targetWidth, int targetHeight,
BitmapReceiver receiver) {
sExecutorService.execute(() -> {
- Drawable thumb = mInfo.loadThumbnail(mContext.getPackageManager());
+ Drawable thumb = getThumbnailDrawable();
// Live wallpaper components may or may not specify a thumbnail drawable.
if (thumb instanceof BitmapDrawable) {
diff --git a/src/com/android/wallpaper/backup/MissingHashCodeGeneratorJobService.java b/src/com/android/wallpaper/backup/MissingHashCodeGeneratorJobService.java
index 558e5180..ebca7663 100755
--- a/src/com/android/wallpaper/backup/MissingHashCodeGeneratorJobService.java
+++ b/src/com/android/wallpaper/backup/MissingHashCodeGeneratorJobService.java
@@ -30,6 +30,9 @@ import android.graphics.drawable.Drawable;
import android.os.ParcelFileDescriptor;
import android.util.Log;
+import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
+
import com.android.wallpaper.asset.BitmapUtils;
import com.android.wallpaper.compat.WallpaperManagerCompat;
import com.android.wallpaper.module.Injector;
@@ -42,9 +45,6 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-
/**
* {@link android.app.job.JobScheduler} job for generating missing hash codes for static wallpapers
* on N+ devices.
@@ -57,7 +57,7 @@ public class MissingHashCodeGeneratorJobService extends JobService {
private Thread mWorkerThread;
public static void schedule(Context context) {
- JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ JobScheduler scheduler = context.getSystemService(JobScheduler.class);
JobInfo newJob = new JobInfo.Builder(
JobSchedulerJobIds.JOB_ID_GENERATE_MISSING_HASH_CODES,
new ComponentName(context, MissingHashCodeGeneratorJobService.class))
@@ -76,29 +76,34 @@ public class MissingHashCodeGeneratorJobService extends JobService {
final WallpaperManager wallpaperManager = (WallpaperManager) context.getSystemService(
Context.WALLPAPER_SERVICE);
- // Generate missing hash codes on a plain worker thread because we need to do some long-running
- // disk I/O and can call #jobFinished from a background thread.
+ // Generate missing hash codes on a plain worker thread because we need to do some
+ // long-running disk I/O and can call #jobFinished from a background thread.
mWorkerThread = new Thread(new Runnable() {
@Override
public void run() {
Injector injector = InjectorProvider.getInjector();
- WallpaperManagerCompat wallpaperManagerCompat = injector.getWallpaperManagerCompat(context);
+ WallpaperManagerCompat wallpaperManagerCompat = injector.getWallpaperManagerCompat(
+ context);
WallpaperPreferences wallpaperPreferences = injector.getPreferences(context);
boolean isLiveWallpaperSet = wallpaperManager.getWallpaperInfo() != null;
- // Generate and set a home wallpaper hash code if there's no live wallpaper set and no hash
- // code stored already for the home wallpaper.
+ // Generate and set a home wallpaper hash code if there's no live wallpaper set
+ // and no hash code stored already for the home wallpaper.
if (!isLiveWallpaperSet && wallpaperPreferences.getHomeWallpaperHashCode() == 0) {
wallpaperManager.forgetLoadedWallpaper();
Drawable wallpaperDrawable = wallpaperManagerCompat.getDrawable();
- // No work to do if the drawable returned is null due to an underlying platform issue --
- // being extra defensive with this check due to instability and variability of underlying
- // platform.
+ // No work to do if the drawable returned is null due to an underlying
+ // platform issue -- being extra defensive with this check due to instability
+ // and variability of underlying platform.
if (wallpaperDrawable == null) {
- DiskBasedLogger.e(TAG, "WallpaperManager#getDrawable returned null and there's no live "
- + "wallpaper set", context);
+ DiskBasedLogger.e(
+ TAG,
+ "WallpaperManager#getDrawable returned null and there's no live "
+ + "wallpaper set",
+ context
+ );
jobFinished(jobParameters, false /* needsReschedule */);
return;
}
@@ -112,10 +117,12 @@ public class MissingHashCodeGeneratorJobService extends JobService {
// Generate and set a lock wallpaper hash code if there's none saved.
if (wallpaperPreferences.getLockWallpaperHashCode() == 0) {
ParcelFileDescriptor parcelFd =
- wallpaperManagerCompat.getWallpaperFile(WallpaperManagerCompat.FLAG_LOCK);
+ wallpaperManagerCompat.getWallpaperFile(
+ WallpaperManagerCompat.FLAG_LOCK);
boolean isLockWallpaperSet = parcelFd != null;
- // Copy the home wallpaper's hash code to lock if there's no distinct lock wallpaper set.
+ // Copy the home wallpaper's hash code to lock if there's no distinct lock
+ // wallpaper set.
if (!isLockWallpaperSet) {
wallpaperPreferences.setLockWallpaperHashCode(
wallpaperPreferences.getHomeWallpaperHashCode());
@@ -138,13 +145,17 @@ public class MissingHashCodeGeneratorJobService extends JobService {
try {
fileStream.close();
} catch (IOException e) {
- Log.e(TAG, "IO exception when closing input stream for lock screen wallpaper.", e);
+ Log.e(TAG,
+ "IO exception when closing input stream for lock screen "
+ + "wallpaper.",
+ e);
}
}
}
if (lockBitmap != null) {
- wallpaperPreferences.setLockWallpaperHashCode(BitmapUtils.generateHashCode(lockBitmap));
+ wallpaperPreferences.setLockWallpaperHashCode(
+ BitmapUtils.generateHashCode(lockBitmap));
}
mWorkerThread = null;
@@ -162,15 +173,15 @@ public class MissingHashCodeGeneratorJobService extends JobService {
@Override
public boolean onStopJob(JobParameters jobParameters) {
// This job has no special execution parameters (i.e., network capability, device idle or
- // charging), so Android should never call this method to stop the execution of this job early.
- // Return "false" to indicate that this job should not be rescheduled when it's stopped because
- // we have to provide an implementation of this method.
+ // charging), so Android should never call this method to stop the execution of this job
+ // early. Return "false" to indicate that this job should not be rescheduled when it's
+ // stopped because we have to provide an implementation of this method.
return false;
}
@Nullable
@VisibleForTesting
- /* package */ Thread getWorkerThread() {
+ /* package */ Thread getWorkerThread() {
return mWorkerThread;
}
}
diff --git a/src/com/android/wallpaper/effects/EffectsController.java b/src/com/android/wallpaper/effects/EffectsController.java
index 2ba61f49..c0d3d567 100644
--- a/src/com/android/wallpaper/effects/EffectsController.java
+++ b/src/com/android/wallpaper/effects/EffectsController.java
@@ -22,8 +22,11 @@ import android.os.Bundle;
* Utility class to provide methods to generate effects for the wallpaper.
*/
public abstract class EffectsController {
- public static final int EFFECT_FAILED = 1;
-
+ public static final int RESULT_SUCCESS = 0;
+ public static final int RESULT_ERROR_TRY_ANOTHER_PHOTO = 1;
+ public static final int RESULT_ERROR_TRY_AGAIN_LATER = 2;
+ public static final int RESULT_ERROR_CONTINUE = 4;
+ public static final int RESULT_ERROR_DISCONNECT_NO_BUTTON = 8;
/**
* Interface of the Effect enum.
*/
@@ -74,8 +77,10 @@ public abstract class EffectsController {
*
* @param effect The effect that was generated.
* @param bundle The data that the Service might have sent to the picker.
- * @param error The error code. if there's an error, value is greater than zero.
+ * @param error The error code. if there's an error, value is greater than zero.
+ * @param errorMessage The error message.
*/
- void onEffectFinished(EffectEnumInterface effect, Bundle bundle, int error);
+ void onEffectFinished(EffectEnumInterface effect, Bundle bundle, int error,
+ String errorMessage);
}
}
diff --git a/src/com/android/wallpaper/model/LiveWallpaperInfo.java b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
index 7b215b56..a952ed57 100755
--- a/src/com/android/wallpaper/model/LiveWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
@@ -209,7 +209,7 @@ public class LiveWallpaperInfo extends WallpaperInfo {
*/
public static List<WallpaperInfo> getFromSpecifiedPackage(
Context context, String packageName, @Nullable List<String> serviceNames,
- boolean shouldShowTitle) {
+ boolean shouldShowTitle, String collectionId) {
List<ResolveInfo> resolveInfos;
if (serviceNames != null) {
resolveInfos = getAllContainingServiceNames(context, serviceNames);
@@ -242,7 +242,8 @@ public class LiveWallpaperInfo extends WallpaperInfo {
continue;
}
- wallpaperInfos.add(factory.getLiveWallpaperInfo(wallpaperInfo, shouldShowTitle, null));
+ wallpaperInfos.add(
+ factory.getLiveWallpaperInfo(wallpaperInfo, shouldShowTitle, collectionId));
}
return wallpaperInfos;
diff --git a/src/com/android/wallpaper/module/DailyLoggingAlarmReceiver.java b/src/com/android/wallpaper/module/DailyLoggingAlarmReceiver.java
index 20d57f2d..fb1ba31a 100755
--- a/src/com/android/wallpaper/module/DailyLoggingAlarmReceiver.java
+++ b/src/com/android/wallpaper/module/DailyLoggingAlarmReceiver.java
@@ -22,6 +22,8 @@ import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.util.Log;
+import androidx.annotation.Nullable;
+
import com.android.wallpaper.model.WallpaperMetadata;
import com.android.wallpaper.module.WallpaperPreferences.PresentationMode;
import com.android.wallpaper.module.WallpaperRefresher.RefreshListener;
@@ -29,8 +31,6 @@ import com.android.wallpaper.util.DiskBasedLogger;
import java.util.Calendar;
-import androidx.annotation.Nullable;
-
/**
* Performs daily logging operations when alarm is received.
*/
@@ -75,10 +75,10 @@ public class DailyLoggingAlarmReceiver extends BroadcastReceiver {
* last 24 hours then log a "not attempted" status to the UserEventLogger.
*/
private void logDailyWallpaperRotationStatus(Context appContext) {
- // Acquire a partial wakelock because logging the daily rotation requires doing some work on
- // another thread (via AsyncTask) after #onReceive returns, after which the kernel may power
- // down and prevent our daily rotation log from being sent.
- PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);
+ // Acquire a partial wakelock because logging the daily rotation requires doing some work
+ // on another thread (via AsyncTask) after #onReceive returns, after which the kernel may
+ // power down and prevent our daily rotation log from being sent.
+ PowerManager powerManager = appContext.getSystemService(PowerManager.class);
final WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
wakeLock.acquire(10000 /* timeout */);
@@ -88,8 +88,8 @@ public class DailyLoggingAlarmReceiver extends BroadcastReceiver {
injector.getWallpaperRefresher(appContext).refresh(new RefreshListener() {
@Override
public void onRefreshed(WallpaperMetadata homeWallpaperMetadata,
- @Nullable WallpaperMetadata lockWallpaperMetadata,
- @PresentationMode int presentationMode) {
+ @Nullable WallpaperMetadata lockWallpaperMetadata,
+ @PresentationMode int presentationMode) {
// Don't log or do anything else if presentation mode is not rotating.
if (presentationMode != WallpaperPreferences.PRESENTATION_MODE_ROTATING) {
releaseWakeLock(wakeLock);
@@ -98,7 +98,8 @@ public class DailyLoggingAlarmReceiver extends BroadcastReceiver {
WallpaperPreferences preferences = injector.getPreferences(appContext);
- long dailyWallpaperEnabledTimestamp = preferences.getDailyWallpaperEnabledTimestamp();
+ long dailyWallpaperEnabledTimestamp =
+ preferences.getDailyWallpaperEnabledTimestamp();
// Validate the daily wallpaper enabled timestamp.
if (dailyWallpaperEnabledTimestamp < 0) {
Log.e(TAG, "There's no valid daily wallpaper enabled timestamp");
@@ -111,8 +112,8 @@ public class DailyLoggingAlarmReceiver extends BroadcastReceiver {
midnightYesterday.set(Calendar.HOUR_OF_DAY, 0);
midnightYesterday.set(Calendar.MINUTE, 0);
- // Exclude rotations that were put into affect later than midnight yesterday because the
- // background task may not have had a chance to execute yet.
+ // Exclude rotations that were put into affect later than midnight yesterday
+ // because the background task may not have had a chance to execute yet.
if (dailyWallpaperEnabledTimestamp > midnightYesterday.getTimeInMillis()) {
releaseWakeLock(wakeLock);
return;
@@ -124,38 +125,44 @@ public class DailyLoggingAlarmReceiver extends BroadcastReceiver {
UserEventLogger logger = injector.getUserEventLogger(appContext);
- // If a rotation status was reported more recently than midnight yesterday, then log it.
- // Otherwise, log a "not attempted" rotation status.
+ // If a rotation status was reported more recently than midnight yesterday,
+ // then log it. Otherwise, log a "not attempted" rotation status.
if (lastRotationStatusTimestamp > midnightYesterday.getTimeInMillis()) {
int lastDailyWallpaperRotationStatus =
preferences.getDailyWallpaperLastRotationStatus();
logger.logDailyWallpaperRotationStatus(lastDailyWallpaperRotationStatus);
- // If the daily rotation status is "failed", increment the num days failed in
- // SharedPreferences and log it, otherwise reset the counter in SharedPreferences to 0.
- if (UserEventLogger.ROTATION_STATUS_FAILED == lastDailyWallpaperRotationStatus) {
+ // If the daily rotation status is "failed", increment the num days
+ // failed in SharedPreferences and log it, otherwise reset the counter in
+ // SharedPreferences to 0.
+ if (UserEventLogger.ROTATION_STATUS_FAILED
+ == lastDailyWallpaperRotationStatus) {
preferences.incrementNumDaysDailyRotationFailed();
- logger.logNumDaysDailyRotationFailed(preferences.getNumDaysDailyRotationFailed());
+ logger.logNumDaysDailyRotationFailed(
+ preferences.getNumDaysDailyRotationFailed());
} else {
preferences.resetNumDaysDailyRotationFailed();
}
- // If there was a valid rotation status reported since midnight yesterday, then reset
- // the counter for consecutive days of "not attempted".
+ // If there was a valid rotation status reported since midnight
+ // yesterday, then reset the counter for consecutive days of "not
+ // attempted".
preferences.resetNumDaysDailyRotationNotAttempted();
} else {
- logger.logDailyWallpaperRotationStatus(UserEventLogger.ROTATION_STATUS_NOT_ATTEMPTED);
+ logger.logDailyWallpaperRotationStatus(
+ UserEventLogger.ROTATION_STATUS_NOT_ATTEMPTED);
- // Increment and log the consecutive # days in a row that daily rotation was not
- // attempted.
+ // Increment and log the consecutive # days in a row that daily rotation
+ // was not attempted.
preferences.incrementNumDaysDailyRotationNotAttempted();
logger.logNumDaysDailyRotationNotAttempted(
preferences.getNumDaysDailyRotationNotAttempted());
- // Reset the disk-based counter for number of consecutive days daily rotation failed
- // because if rotation was not attempted but restarts tomorrow after a boot and fails
- // then, we want to report that as 1 day of failure instead of 3 consecutive days.
+ // Reset the disk-based counter for number of consecutive days daily
+ // rotation failed because if rotation was not attempted but restarts
+ // tomorrow after a boot and fails then, we want to report that as 1 day
+ // of failure instead of 3 consecutive days.
preferences.resetNumDaysDailyRotationFailed();
}
} finally {
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
index 43130c4f..89cc09b3 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -595,6 +595,7 @@ public class DefaultWallpaperPersister implements WallpaperPersister {
mWallpaperPreferences.setWallpaperPresentationMode(
WallpaperPreferences.PRESENTATION_MODE_STATIC);
mWallpaperPreferences.clearDailyRotations();
+ mWallpaperPreferences.setWallpaperEffects(mWallpaperInfoInPreview.getEffectNames());
}
private class SetWallpaperTask extends AsyncTask<Void, Void, Boolean> {
@@ -773,6 +774,7 @@ public class DefaultWallpaperPersister implements WallpaperPersister {
private void setImageWallpaperMetadata(@Destination int destination, int wallpaperId) {
if (destination == DEST_HOME_SCREEN || destination == DEST_BOTH) {
mWallpaperPreferences.clearHomeWallpaperMetadata();
+ mWallpaperPreferences.setWallpaperEffects(null);
setImageWallpaperHomeMetadata(wallpaperId);
// Reset presentation mode to STATIC if an individual wallpaper is set to the
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java b/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
index 5431267b..c2cd07b4 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
@@ -942,6 +942,20 @@ public class DefaultWallpaperPreferences implements WallpaperPreferences {
setLockWallpaperCollectionId(collectionId);
setLockWallpaperRemoteId(wallpaperId);
}
+ setWallpaperEffects(null);
+ }
+
+ @Override
+ public String getWallpaperEffects() {
+ return mNoBackupPrefs.getString(
+ NoBackupKeys.KEY_WALLPAPER_EFFECTS, null);
+ }
+
+ @Override
+ public void setWallpaperEffects(String effects) {
+ mNoBackupPrefs.edit().putString(
+ NoBackupKeys.KEY_WALLPAPER_EFFECTS, effects)
+ .apply();
}
private int getCurrentDate() {
diff --git a/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java b/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
index a1f283b0..4b0e5da2 100755
--- a/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
+++ b/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
@@ -76,5 +76,6 @@ public class WallpaperPreferenceKeys {
String KEY_HOME_WALLPAPER_PACKAGE_NAME = "home_wallpaper_package_name";
String KEY_HOME_WALLPAPER_SERVICE_NAME = "home_wallpaper_service_name";
String KEY_PREVIEW_WALLPAPER_COLOR_ID = "preview_wallpaper_color_id";
+ String KEY_WALLPAPER_EFFECTS = "wallpaper_effects";
}
}
diff --git a/src/com/android/wallpaper/module/WallpaperPreferences.java b/src/com/android/wallpaper/module/WallpaperPreferences.java
index d33c775b..184972b1 100755
--- a/src/com/android/wallpaper/module/WallpaperPreferences.java
+++ b/src/com/android/wallpaper/module/WallpaperPreferences.java
@@ -505,6 +505,18 @@ public interface WallpaperPreferences {
String wallpaperId);
/**
+ * Gets the wallpaper's effects.
+ */
+ String getWallpaperEffects();
+
+ /**
+ * Sets the wallpaper's effects to SharedPreferences.
+ *
+ * @param wallpaperEffects The wallpaper effects.
+ */
+ void setWallpaperEffects(String wallpaperEffects);
+
+ /**
* The possible wallpaper presentation modes, i.e., either "static" or "rotating".
*/
@IntDef({
diff --git a/src/com/android/wallpaper/picker/ImagePreviewFragment.java b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
index ad9ca7db..e2524ab2 100755
--- a/src/com/android/wallpaper/picker/ImagePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
@@ -66,6 +66,7 @@ import com.android.wallpaper.model.WallpaperInfo.ColorInfo;
import com.android.wallpaper.module.BitmapCropper;
import com.android.wallpaper.module.Injector;
import com.android.wallpaper.module.InjectorProvider;
+import com.android.wallpaper.module.LargeScreenMultiPanesChecker;
import com.android.wallpaper.module.WallpaperPersister.Destination;
import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.util.FullScreenAnimation;
@@ -107,8 +108,6 @@ public class ImagePreviewFragment extends PreviewFragment {
private final AtomicInteger mRecalculateColorCounter = new AtomicInteger(0);
private final Injector mInjector = InjectorProvider.getInjector();
- private SubsamplingScaleImageView mFullResImageView;
- private Asset mWallpaperAsset;
/**
* Size of the screen considered for cropping the wallpaper (typically the same as
* {@link #mScreenSize} but it could be different on multi-display)
@@ -118,8 +117,8 @@ public class ImagePreviewFragment extends PreviewFragment {
* The size of the current screen
*/
private Point mScreenSize;
- private Point mRawWallpaperSize; // Native size of wallpaper image.
- private ImageView mLowResImageView;
+ protected Point mRawWallpaperSize; // Native size of wallpaper image.
+ protected ImageView mLowResImageView;
protected TouchForwardingLayout mTouchForwardingLayout;
protected ConstraintLayout mContainer;
protected SurfaceView mWallpaperSurface;
@@ -131,6 +130,8 @@ public class ImagePreviewFragment extends PreviewFragment {
protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
protected ViewGroup mLockPreviewContainer;
protected LockScreenPreviewer mLockScreenPreviewer;
+ protected SubsamplingScaleImageView mFullResImageView;
+ protected Asset mWallpaperAsset;
private Future<ColorInfo> mColorFuture;
@Override
@@ -269,7 +270,9 @@ public class ImagePreviewFragment extends PreviewFragment {
mBottomActionBar.bindBottomSheetContentWithAction(
new WallpaperInfoContent(getContext()), INFORMATION);
Activity activity = getActivity();
- if (activity != null && activity.isInMultiWindowMode()) {
+ LargeScreenMultiPanesChecker checker = new LargeScreenMultiPanesChecker();
+ if (activity != null
+ && (activity.isInMultiWindowMode() || checker.isMultiPanesEnabled(getContext()))) {
mBottomActionBar.showActionsOnly(INFORMATION, APPLY);
} else {
mBottomActionBar.showActionsOnly(INFORMATION, EDIT, APPLY);
diff --git a/src/com/android/wallpaper/picker/LivePreviewFragment.java b/src/com/android/wallpaper/picker/LivePreviewFragment.java
index 4c3c0dfe..ccc17405 100644
--- a/src/com/android/wallpaper/picker/LivePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/LivePreviewFragment.java
@@ -68,6 +68,7 @@ import androidx.slice.widget.SliceView;
import com.android.wallpaper.R;
import com.android.wallpaper.model.SetWallpaperViewModel;
import com.android.wallpaper.model.WallpaperInfo.ColorInfo;
+import com.android.wallpaper.module.LargeScreenMultiPanesChecker;
import com.android.wallpaper.util.FullScreenAnimation;
import com.android.wallpaper.util.ResourceUtils;
import com.android.wallpaper.util.ScreenSizeCalculator;
@@ -371,7 +372,9 @@ public class LivePreviewFragment extends PreviewFragment implements
protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
super.onBottomActionBarReady(bottomActionBar);
Activity activity = getActivity();
- if (activity != null && activity.isInMultiWindowMode()) {
+ LargeScreenMultiPanesChecker checker = new LargeScreenMultiPanesChecker();
+ if (activity != null
+ && (activity.isInMultiWindowMode() || checker.isMultiPanesEnabled(getContext()))) {
mBottomActionBar.showActionsOnly(INFORMATION, DELETE, CUSTOMIZE, APPLY);
} else {
mBottomActionBar.showActionsOnly(INFORMATION, DELETE, EDIT, CUSTOMIZE, APPLY);
diff --git a/src/com/android/wallpaper/picker/PreviewFragment.java b/src/com/android/wallpaper/picker/PreviewFragment.java
index 57971165..0b26ca79 100755
--- a/src/com/android/wallpaper/picker/PreviewFragment.java
+++ b/src/com/android/wallpaper/picker/PreviewFragment.java
@@ -186,12 +186,6 @@ public abstract class PreviewFragment extends AppbarFragment implements
mViewModelProvider = new ViewModelProvider(requireActivity());
mSetWallpaperViewModel = mViewModelProvider.get(SetWallpaperViewModel.class);
-
- Activity activity = getActivity();
- List<String> attributions = getAttributions(activity);
- if (attributions.size() > 0 && attributions.get(0) != null) {
- activity.setTitle(attributions.get(0));
- }
}
@Override
@@ -304,7 +298,7 @@ public abstract class PreviewFragment extends AppbarFragment implements
}
);
container.findViewById(R.id.set_as_wallpaper_button).setOnClickListener(
- unused -> onSetWallpaperClicked(null, mWallpaper));
+ unused -> onSetWallpaperClicked(null, getCurrentWallpaperInfo()));
} else {
container.findViewById(R.id.hide_ui_preview_button).setVisibility(View.GONE);
container.findViewById(R.id.set_as_wallpaper_button).setVisibility(View.GONE);
@@ -329,6 +323,10 @@ public abstract class PreviewFragment extends AppbarFragment implements
mFullScreenAnimation.ensureBottomActionBarIsCorrectlyLocated();
}
+ protected WallpaperInfo getCurrentWallpaperInfo() {
+ return mWallpaper;
+ }
+
protected List<String> getAttributions(Context context) {
return mWallpaper.getAttributions(context);
}
@@ -468,12 +466,16 @@ public abstract class PreviewFragment extends AppbarFragment implements
} catch (NotFoundException e) {
Log.e(TAG, "Could not show toast " + e);
}
- activity.setResult(Activity.RESULT_OK);
+ setResult(activity);
}
activity.finish();
activity.overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
+ protected void setResult(Activity activity) {
+ activity.setResult(Activity.RESULT_OK);
+ }
+
protected void showSetWallpaperErrorDialog(@Destination int wallpaperDestination) {
SetWallpaperErrorDialogFragment newFragment = SetWallpaperErrorDialogFragment.newInstance(
R.string.set_wallpaper_error_message, wallpaperDestination);
diff --git a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
index 6c2b1b65..5b60c064 100644
--- a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
+++ b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
@@ -63,6 +63,7 @@ public class WallpaperPickerDelegate implements MyPhotosStarter {
public static final int VIEW_ONLY_PREVIEW_WALLPAPER_REQUEST_CODE = 2;
public static final int READ_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE = 3;
public static final int PREVIEW_LIVE_WALLPAPER_REQUEST_CODE = 4;
+ public static final String IS_LIVE_WALLPAPER = "isLiveWallpaper";
private InlinePreviewIntentFactory mPreviewIntentFactory;
private InlinePreviewIntentFactory mViewOnlyPreviewIntentFactory;
@@ -468,11 +469,15 @@ public class WallpaperPickerDelegate implements MyPhotosStarter {
case PREVIEW_LIVE_WALLPAPER_REQUEST_CODE:
mWallpaperPersister.onLiveWallpaperSet();
populateCategories(/* forceRefresh= */ true);
- // Fall through.
+ return true;
case VIEW_ONLY_PREVIEW_WALLPAPER_REQUEST_CODE:
- // Fall through.
+ return true;
case PREVIEW_WALLPAPER_REQUEST_CODE:
// User previewed and selected a wallpaper, so finish this activity.
+ if (data != null && data.getBooleanExtra(IS_LIVE_WALLPAPER, false)) {
+ mWallpaperPersister.onLiveWallpaperSet();
+ populateCategories(/* forceRefresh= */ true);
+ }
return true;
default:
return false;
diff --git a/src/com/android/wallpaper/widget/GridRowSpacerDecoration.kt b/src/com/android/wallpaper/widget/GridRowSpacerDecoration.kt
new file mode 100644
index 00000000..8b1fcdb5
--- /dev/null
+++ b/src/com/android/wallpaper/widget/GridRowSpacerDecoration.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.wallpaper.widget
+
+import android.graphics.Rect
+import android.view.View
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+
+/**
+ * RecyclerView ItemDecorator that adds a vertical space between grid rows.
+ */
+class GridRowSpacerDecoration(private val padding: Int) : RecyclerView.ItemDecoration() {
+ override fun getItemOffsets(
+ outRect: Rect,
+ view: View,
+ parent: RecyclerView,
+ state: RecyclerView.State) {
+ val layoutManager = parent.layoutManager
+ if (layoutManager is GridLayoutManager) {
+ val position = parent.getChildAdapterPosition(view)
+ if (position >= layoutManager.spanCount) {
+ outRect.top = padding
+ }
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/widget/WallpaperInfoView.java b/src/com/android/wallpaper/widget/WallpaperInfoView.java
index 109279ca..c7e4d878 100644
--- a/src/com/android/wallpaper/widget/WallpaperInfoView.java
+++ b/src/com/android/wallpaper/widget/WallpaperInfoView.java
@@ -16,6 +16,8 @@
package com.android.wallpaper.widget;
import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
@@ -29,9 +31,12 @@ import com.android.wallpaper.R;
import com.android.wallpaper.model.WallpaperInfo;
import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
/** A view for displaying wallpaper info. */
public class WallpaperInfoView extends LinearLayout {
+ private static final ExecutorService sExecutorService = Executors.newCachedThreadPool();
private TextView mTitle;
private TextView mSubtitle1;
private TextView mSubtitle2;
@@ -55,39 +60,42 @@ public class WallpaperInfoView extends LinearLayout {
CharSequence actionLabel,
boolean shouldShowExploreButton,
OnClickListener exploreButtonClickListener) {
- final List<String> attributions = wallpaperInfo.getAttributions(getContext());
+ sExecutorService.execute(() -> {
+ final List<String> attributions = wallpaperInfo.getAttributions(getContext());
+ new Handler(Looper.getMainLooper()).post(() -> {
+ // Reset wallpaper information UI
+ mTitle.setText(null);
+ mSubtitle1.setText(null);
+ mSubtitle1.setVisibility(View.GONE);
+ mSubtitle2.setText(null);
+ mSubtitle2.setVisibility(View.GONE);
+ mExploreButton.setText(null);
+ mExploreButton.setOnClickListener(null);
+ mExploreButton.setVisibility(View.GONE);
- // Reset
- mTitle.setText(null);
- mSubtitle1.setText(null);
- mSubtitle1.setVisibility(View.GONE);
- mSubtitle2.setText(null);
- mSubtitle2.setVisibility(View.GONE);
- mExploreButton.setText(null);
- mExploreButton.setOnClickListener(null);
- mExploreButton.setVisibility(View.GONE);
+ if (attributions.size() > 0 && attributions.get(0) != null) {
+ mTitle.setText(attributions.get(0));
+ }
- if (attributions.size() > 0 && attributions.get(0) != null) {
- mTitle.setText(attributions.get(0));
- }
+ if (shouldShowMetadata(wallpaperInfo)) {
+ if (attributions.size() > 1 && attributions.get(1) != null) {
+ mSubtitle1.setVisibility(View.VISIBLE);
+ mSubtitle1.setText(attributions.get(1));
+ }
- if (shouldShowMetadata(wallpaperInfo)) {
- if (attributions.size() > 1 && attributions.get(1) != null) {
- mSubtitle1.setVisibility(View.VISIBLE);
- mSubtitle1.setText(attributions.get(1));
- }
+ if (attributions.size() > 2 && attributions.get(2) != null) {
+ mSubtitle2.setVisibility(View.VISIBLE);
+ mSubtitle2.setText(attributions.get(2));
+ }
- if (attributions.size() > 2 && attributions.get(2) != null) {
- mSubtitle2.setVisibility(View.VISIBLE);
- mSubtitle2.setText(attributions.get(2));
- }
-
- if (shouldShowExploreButton) {
- mExploreButton.setVisibility(View.VISIBLE);
- mExploreButton.setText(actionLabel);
- mExploreButton.setOnClickListener(exploreButtonClickListener);
- }
- }
+ if (shouldShowExploreButton) {
+ mExploreButton.setVisibility(View.VISIBLE);
+ mExploreButton.setText(actionLabel);
+ mExploreButton.setOnClickListener(exploreButtonClickListener);
+ }
+ }
+ });
+ });
}
private boolean shouldShowMetadata(WallpaperInfo wallpaperInfo) {
diff --git a/tests/Android.bp b/tests/Android.bp
index 5d291be8..54a3842e 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -23,33 +23,29 @@ package {
android_test {
name: "WallpaperPicker2Tests",
+ defaults: ["WallpaperPicker2_defaults"],
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ ],
static_libs: [
"androidx.annotation_annotation",
- "androidx.test.core",
- "androidx.test.runner",
- "androidx.test.rules",
+ "androidx.test.espresso.core",
"androidx.test.espresso.contrib",
"androidx.test.espresso.intents",
- "mockito-target-minus-junit4",
- "androidx.test.espresso.core",
+ "androidx.test.rules",
"hamcrest-library",
"hamcrest",
- "wallpaper-common-deps",
+ "mockito-target-minus-junit4",
+ "ub-uiautomator",
+ "junit",
],
-
- platform_apis: true,
-
-
- optimize: {
- enabled: false,
- },
-
- srcs: [
- "src/**/*.java",
- "src/**/*.kt",
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
],
- manifest: "AndroidManifest.xml",
-
- instrumentation_for: "WallpaperPicker2",
+ platform_apis: true,
+ test_suites: ["device-tests"],
}
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 1e35c922..5292f000 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -13,21 +13,19 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- package="com.android.wallpaper.tests">
-
- <uses-sdk android:targetSdkVersion="29" android:minSdkVersion="29"/>
+ package="com.android.wallpaper">
<application>
- <uses-library android:name="android.test.runner"/>
+ <uses-library android:name="android.test.runner" />
+
+ <activity android:name="com.android.wallpaper.picker.PreviewActivity"
+ android:resizeableActivity="false">
+ </activity>
</application>
- <instrumentation
- android:functionalTest="false"
- android:handleProfiling="false"
- android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.wallpaper">
- </instrumentation>
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.wallpaper"
+ android:label="Tests for WallpaperPicker2" />
+
</manifest>
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
new file mode 100644
index 00000000..ae72b077
--- /dev/null
+++ b/tests/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs Tests for WallpaperPicker2.">
+ <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+ <option name="test-file-name" value="WallpaperPicker2Tests.apk" />
+ </target_preparer>
+
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-tag" value="WallpaperPicker2Tests" />
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="com.android.wallpaper" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
diff --git a/tests/src/com/android/wallpaper/picker/PreviewActivityTest.java b/tests/src/com/android/wallpaper/picker/PreviewActivityTest.java
index b90ebbf3..20ba718d 100644
--- a/tests/src/com/android/wallpaper/picker/PreviewActivityTest.java
+++ b/tests/src/com/android/wallpaper/picker/PreviewActivityTest.java
@@ -19,6 +19,7 @@ import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.pressBack;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.RootMatchers.isDialog;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
@@ -64,6 +65,7 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -99,7 +101,7 @@ public class PreviewActivityTest {
Intents.init();
- mMockWallpaper = new TestWallpaperInfo(TestWallpaperInfo.COLOR_BLACK);
+ mMockWallpaper = new TestWallpaperInfo(TestWallpaperInfo.COLOR_DEFAULT);
List<String> attributions = new ArrayList<>();
attributions.add("Title");
attributions.add("Subtitle 1");
@@ -133,11 +135,14 @@ public class PreviewActivityTest {
private void finishSettingWallpaperThenDo(Runnable runnable) {
final WallpaperChangedNotifier wallpaperChangedNotifier =
WallpaperChangedNotifier.getInstance();
- wallpaperChangedNotifier.registerListener(() -> {
- wallpaperChangedNotifier.unregisterListener(
- (WallpaperChangedNotifier.Listener) this);
- runnable.run();
- });
+ WallpaperChangedNotifier.Listener listener = new WallpaperChangedNotifier.Listener() {
+ @Override
+ public void onWallpaperChanged() {
+ wallpaperChangedNotifier.unregisterListener(this);
+ runnable.run();
+ }
+ };
+ wallpaperChangedNotifier.registerListener(listener);
try {
mActivityRule.runOnUiThread(() -> mWallpaperPersister.finishSettingWallpaper());
@@ -355,8 +360,7 @@ public class PreviewActivityTest {
mEventLogger.getLastWallpaperSetResult());
// Set next call to succeed and current wallpaper bitmap should not be null and
- // equals to
- // the mock wallpaper bitmap after clicking "try again".
+ // equals to the mock wallpaper bitmap after clicking "try again".
mWallpaperPersister.setFailNextCall(false);
onView(withText(R.string.try_again)).perform(click());
@@ -376,6 +380,7 @@ public class PreviewActivityTest {
}
@Test
+ @Ignore("b/248538709")
public void testClickSetWallpaper_CropsAndScalesWallpaper() {
launchActivityIntentWithMockWallpaper();
// Scale should not have a meaningful value before clicking "set wallpaper".
@@ -399,7 +404,6 @@ public class PreviewActivityTest {
Rect cropRect = mWallpaperPersister.getCropRect();
// Crop rect should be greater or equal than screen size in both directions.
- //TODO failing as the height is less than the maxDim
assertTrue(cropRect.width() >= maxDim);
assertTrue(cropRect.height() >= maxDim);
}
@@ -429,6 +433,7 @@ public class PreviewActivityTest {
}
@Test
+ @Ignore("b/248538709")
public void testSetsDefaultWallpaperZoomAndScroll() {
float expectedWallpaperZoom;
int expectedWallpaperScrollX;
@@ -451,7 +456,6 @@ public class PreviewActivityTest {
// Current zoom should match the minimum zoom required to fit wallpaper
// completely on the crop surface.
- // TODO failing as the fullResImageView.getScale() is "infinite".
assertEquals(expectedWallpaperZoom, fullResImageView.getScale(), FLOAT_ERROR_MARGIN);
Point scaledWallpaperSize = new Point(
@@ -534,7 +538,8 @@ public class PreviewActivityTest {
mMockWallpaper.corruptAssets();
launchActivityIntentWithMockWallpaper();
- onView(withText(R.string.load_wallpaper_error_message)).check(matches(isDisplayed()));
+ onView(withText(R.string.load_wallpaper_error_message)).inRoot(isDialog()).check(
+ matches(isDisplayed()));
onView(withText(android.R.string.ok)).perform(click());
diff --git a/tests/src/com/android/wallpaper/testing/TestAsset.java b/tests/src/com/android/wallpaper/testing/TestAsset.java
index 505946a8..7352f4ac 100644
--- a/tests/src/com/android/wallpaper/testing/TestAsset.java
+++ b/tests/src/com/android/wallpaper/testing/TestAsset.java
@@ -21,6 +21,7 @@ import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Point;
import android.graphics.Rect;
+import android.os.Handler;
import android.widget.ImageView;
import androidx.annotation.Nullable;
@@ -57,18 +58,21 @@ public final class TestAsset extends Asset {
@Override
public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) {
- receiver.onBitmapDecoded(mBitmap);
+ Handler.getMain().post(() ->
+ receiver.onBitmapDecoded(mBitmap));
}
@Override
public void decodeBitmapRegion(Rect unused, int targetWidth, int targetHeight,
boolean shouldAdjustForRtl, BitmapReceiver receiver) {
- receiver.onBitmapDecoded(mBitmap);
+ Handler.getMain().post(() ->
+ receiver.onBitmapDecoded(mBitmap));
}
@Override
public void decodeRawDimensions(Activity unused, DimensionsReceiver receiver) {
- receiver.onDimensionsDecoded(mIsCorrupt ? null : new Point(1, 1));
+ Handler.getMain().post(() ->
+ receiver.onDimensionsDecoded(mIsCorrupt ? null : new Point(1, 1)));
}
@Override
diff --git a/tests/src/com/android/wallpaper/testing/TestCurrentWallpaperInfoFactory.java b/tests/src/com/android/wallpaper/testing/TestCurrentWallpaperInfoFactory.java
index 63cdf294..8d4b929a 100644
--- a/tests/src/com/android/wallpaper/testing/TestCurrentWallpaperInfoFactory.java
+++ b/tests/src/com/android/wallpaper/testing/TestCurrentWallpaperInfoFactory.java
@@ -61,7 +61,7 @@ public class TestCurrentWallpaperInfoFactory implements CurrentWallpaperInfoFact
private static WallpaperInfo createTestWallpaperInfo(List<String> attributions,
String actionUrl, String collectionId) {
- TestWallpaperInfo wallpaper = new TestWallpaperInfo(TestWallpaperInfo.COLOR_BLACK);
+ TestWallpaperInfo wallpaper = new TestWallpaperInfo(TestWallpaperInfo.COLOR_DEFAULT);
wallpaper.setAttributions(attributions);
wallpaper.setActionUrl(actionUrl);
wallpaper.setCollectionId(collectionId);
diff --git a/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java b/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
index c4328c54..0c20456a 100644
--- a/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
+++ b/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
@@ -32,7 +32,7 @@ import java.util.List;
* Test model object for a wallpaper coming from local drawable resources.
*/
public class TestWallpaperInfo extends WallpaperInfo {
- public static final int COLOR_BLACK = 0;
+ public static final int COLOR_DEFAULT = 0xff000000;
public static final Parcelable.Creator<TestWallpaperInfo> CREATOR =
new Parcelable.Creator<TestWallpaperInfo>() {
@Override
diff --git a/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java b/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
index 09c58f8e..5faede46 100644
--- a/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
+++ b/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
@@ -82,6 +82,7 @@ public class TestWallpaperPreferences implements WallpaperPreferences {
private int mLockWallpaperActionLabelRes;
private int mLockWallpaperActionIconRes;
private HashMap<String, String> mWallStoredColor;
+ private String mWallpaperEffects;
public TestWallpaperPreferences() {
mWallpaperPresentationMode = WallpaperPreferences.PRESENTATION_MODE_STATIC;
@@ -600,6 +601,16 @@ public class TestWallpaperPreferences implements WallpaperPreferences {
}
}
+ @Override
+ public String getWallpaperEffects() {
+ return mWallpaperEffects;
+ }
+
+ @Override
+ public void setWallpaperEffects(String effects) {
+ mWallpaperEffects = effects;
+ }
+
private int getCurrentDate() {
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd", Locale.US);