[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: a2e88443c9 -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/WallpaperPicker2/+/23126918
Change-Id: Ic1ced4ef34dd1d4a90bdfaedafe07eb4118be2d0
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/TEST_MAPPING b/TEST_MAPPING
index d413e09..72b9f3a 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -7,6 +7,22 @@
"exclude-annotation": "org.junit.Ignore"
}
]
+ },
+ {
+ "name": "ThemePickerTests",
+ "options": [
+ {
+ "exclude-annotation": "org.junit.Ignore"
+ }
+ ]
+ },
+ {
+ "name": "WallpaperPickerGoogleTests",
+ "options": [
+ {
+ "exclude-annotation": "org.junit.Ignore"
+ }
+ ]
}
]
}
diff --git a/res/drawable/bottom_gradient_black_scrim.xml b/res/drawable/bottom_gradient_black_scrim.xml
new file mode 100644
index 0000000..84cafa1
--- /dev/null
+++ b/res/drawable/bottom_gradient_black_scrim.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape>
+ <gradient
+ android:angle="90"
+ android:startColor="@color/wallpaper_preview_scrim_color"
+ android:centerColor="@android:color/transparent"
+ android:endColor="@android:color/transparent"
+ android:centerY="0.2" />
+ </shape>
+ </item>
+</layer-list>
\ No newline at end of file
diff --git a/res/drawable/vertical_divider_24dp.xml b/res/drawable/vertical_divider_8dp.xml
similarity index 95%
rename from res/drawable/vertical_divider_24dp.xml
rename to res/drawable/vertical_divider_8dp.xml
index 22b61ad..eb1d2c0 100644
--- a/res/drawable/vertical_divider_24dp.xml
+++ b/res/drawable/vertical_divider_8dp.xml
@@ -16,6 +16,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
- android:height="24dp"
+ android:height="8dp"
android:width="0dp" />
</shape>
\ No newline at end of file
diff --git a/res/drawable/wallpaper_control_button_on_background_base.xml b/res/drawable/wallpaper_control_button_on_background_base.xml
index 0414188..314e9c3 100644
--- a/res/drawable/wallpaper_control_button_on_background_base.xml
+++ b/res/drawable/wallpaper_control_button_on_background_base.xml
@@ -15,7 +15,6 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="oval">
<padding
android:left="@dimen/wallpaper_control_button_padding"
diff --git a/res/layout/creative_category_holder.xml b/res/layout/creative_category_holder.xml
new file mode 100755
index 0000000..e18e7b8
--- /dev/null
+++ b/res/layout/creative_category_holder.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:clipChildren="false"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/grid_padding"
+ android:orientation="vertical">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recyclerview_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:nestedScrollingEnabled="false"
+ android:clipChildren="false"
+ app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
+ app:spanCount="@integer/rows_creative_category"
+ tools:listitem="@layout/grid_item_image" />
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/creative_wallpaper.xml b/res/layout/creative_wallpaper.xml
new file mode 100644
index 0000000..865d411
--- /dev/null
+++ b/res/layout/creative_wallpaper.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ ~
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/tile_group"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginBottom="5dp">
+
+ <TextView
+ android:id="@+id/tile_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/creative_wallpaper_title"
+ android:textAppearance="@style/CategorySectionTitleTextAppearance"
+ android:layout_gravity="bottom" />
+
+ <LinearLayout
+ android:id="@+id/linear_layout_for_cards"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:layout_marginTop="20dp"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/duo_tabs.xml b/res/layout/duo_tabs.xml
index 9393cb0..07f6477 100644
--- a/res/layout/duo_tabs.xml
+++ b/res/layout/duo_tabs.xml
@@ -17,7 +17,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
android:divider="@drawable/duo_tabs_divider"
android:orientation="horizontal"
android:showDividers="middle">
@@ -25,7 +24,8 @@
<TextView
android:id="@+id/tab_primary"
android:layout_width="match_parent"
- android:layout_height="@dimen/separated_tabs_height"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/separated_tabs_height"
android:layout_weight="1"
android:background="@drawable/duo_tabs_button_background"
android:gravity="center" />
@@ -33,7 +33,8 @@
<TextView
android:id="@+id/tab_secondary"
android:layout_width="match_parent"
- android:layout_height="@dimen/separated_tabs_height"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/separated_tabs_height"
android:layout_weight="1"
android:background="@drawable/duo_tabs_button_background"
android:gravity="center" />
diff --git a/res/layout/duo_tabs_short.xml b/res/layout/duo_tabs_short.xml
new file mode 100644
index 0000000..19a2b34
--- /dev/null
+++ b/res/layout/duo_tabs_short.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:divider="@drawable/duo_tabs_divider"
+ android:orientation="horizontal"
+ android:showDividers="middle">
+
+ <TextView
+ android:id="@+id/tab_primary"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/separated_tabs_height_short"
+ android:layout_weight="1"
+ android:background="@drawable/duo_tabs_button_background"
+ android:gravity="center" />
+
+ <TextView
+ android:id="@+id/tab_secondary"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/separated_tabs_height_short"
+ android:layout_weight="1"
+ android:background="@drawable/duo_tabs_button_background"
+ android:gravity="center" />
+</LinearLayout>
diff --git a/res/layout/fragment_customization_picker.xml b/res/layout/fragment_customization_picker.xml
index 6bef55c..644e7ee 100755
--- a/res/layout/fragment_customization_picker.xml
+++ b/res/layout/fragment_customization_picker.xml
@@ -14,17 +14,39 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/scroll_container"
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/transparent"
- android:overScrollMode="always"
- android:scrollbars="vertical">
- <LinearLayout
- android:id="@+id/section_container"
+ android:layout_height="match_parent">
+ <com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView
+ android:id="@+id/home_scroll_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginVertical="@dimen/section_container_vertical_margin"
- android:orientation="vertical" />
-</com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView>
+ android:background="@android:color/transparent"
+ android:overScrollMode="always"
+ android:scrollbars="vertical">
+ <LinearLayout
+ android:id="@+id/home_section_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginVertical="@dimen/section_container_vertical_margin"
+ android:orientation="vertical" />
+ </com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView>
+
+ <com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView
+ android:id="@+id/lock_scroll_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@android:color/transparent"
+ android:overScrollMode="always"
+ android:scrollbars="vertical"
+ android:visibility="gone">
+ <LinearLayout
+ android:id="@+id/lock_section_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginVertical="@dimen/section_container_vertical_margin"
+ android:orientation="vertical" />
+ </com.android.customization.picker.HorizontalTouchMovementAwareNestedScrollView>
+</FrameLayout>
+
diff --git a/res/layout/fragment_individual_picker.xml b/res/layout/fragment_individual_picker.xml
index 4a64b84..146c851 100755
--- a/res/layout/fragment_individual_picker.xml
+++ b/res/layout/fragment_individual_picker.xml
@@ -29,6 +29,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
+ android:clipChildren="false"
android:paddingTop="@dimen/wallpaper_grid_padding_top"
android:scrollbarSize="@dimen/grid_padding"
android:scrollbarStyle="outsideOverlay"
diff --git a/res/layout/fragment_tabbed_customization_picker.xml b/res/layout/fragment_tabbed_customization_picker.xml
index 0a3eda8..663a4ff 100644
--- a/res/layout/fragment_tabbed_customization_picker.xml
+++ b/res/layout/fragment_tabbed_customization_picker.xml
@@ -15,8 +15,8 @@
~
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -25,8 +25,10 @@
android:id="@+id/duo_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingHorizontal="@dimen/tab_container_horizontal_padding"
- android:paddingVertical="16dp" />
+ app:should_use_short_tabs="true"
+ android:layout_marginHorizontal="@dimen/tab_container_horizontal_padding"
+ android:layout_marginTop="@dimen/tab_container_top_margin"
+ android:layout_marginBottom="@dimen/tab_container_bottom_margin" />
<include
layout="@layout/fragment_customization_picker"
diff --git a/res/layout/grid_item_header.xml b/res/layout/grid_item_header.xml
index eb56993..b292056 100644
--- a/res/layout/grid_item_header.xml
+++ b/res/layout/grid_item_header.xml
@@ -16,6 +16,7 @@
limitations under the License.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/grid_item_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
diff --git a/res/layout/grid_item_image.xml b/res/layout/grid_item_image.xml
index b4e2b1e..bae0d0f 100755
--- a/res/layout/grid_item_image.xml
+++ b/res/layout/grid_item_image.xml
@@ -26,14 +26,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/wallpaper_thumbnail"
+ android:foreground="?attr/selectableItemBackground"
app:cardCornerRadius="?android:dialogCornerRadius"
app:cardBackgroundColor="@android:color/transparent"
app:cardElevation="0dp">
<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:foreground="@drawable/wallpaper_option_border">
+ android:layout_height="match_parent">
<ImageView
android:id="@+id/thumbnail"
diff --git a/res/layout/labeled_grid_item_image.xml b/res/layout/labeled_grid_item_image.xml
new file mode 100755
index 0000000..44e806f
--- /dev/null
+++ b/res/layout/labeled_grid_item_image.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/tile"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/wallpaper_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:contentDescription="@string/wallpaper_thumbnail"
+ android:foreground="?attr/selectableItemBackground"
+ app:cardCornerRadius="?android:dialogCornerRadius"
+ app:cardBackgroundColor="@android:color/transparent"
+ app:cardElevation="@dimen/labeled_grid_item_image_card_elevation">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/thumbnail"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop" />
+
+ <ImageView
+ android:id="@+id/overlay_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true" />
+
+ <ImageView
+ android:id="@+id/indicator_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentEnd="true"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/scrim"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_centerInParent="true"
+ android:src="@drawable/bottom_gradient_black_scrim"/>
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginBottom="@dimen/grid_item_individual_label_padding_bottom"
+ android:layout_marginHorizontal="@dimen/grid_item_individual_label_padding_horizontal"
+ android:ellipsize="end"
+ android:gravity="start|bottom"
+ android:maxLines="2"
+ android:minHeight="@dimen/grid_item_category_label_minimum_height"
+ android:textAppearance="@style/GridLabelTextAppearance"
+ android:visibility="gone"
+ tools:text="Wallpaper" />
+
+ <FrameLayout
+ android:id="@+id/loading_indicator_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone">
+
+ <ProgressBar
+ android:id="@+id/loading_indicator"
+ android:layout_width="@dimen/tile_desktop_progress_bar_size"
+ android:layout_height="@dimen/tile_desktop_progress_bar_size"
+ android:layout_gravity="center"
+ android:indeterminate="true"
+ android:indeterminateTint="?android:colorAccent" />
+
+ </FrameLayout>
+ </RelativeLayout>
+
+ </androidx.cardview.widget.CardView>
+
+</LinearLayout>
diff --git a/res/layout/my_photos.xml b/res/layout/my_photos.xml
new file mode 100644
index 0000000..d3b5a56
--- /dev/null
+++ b/res/layout/my_photos.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ ~
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/tile_group"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginTop="10dp">
+
+ <TextView
+ android:id="@+id/tile_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/choose_a_wallpaper_section_title"
+ android:textAppearance="@style/CategorySectionTitleTextAppearance"
+ android:layout_gravity="bottom" />
+
+ <include android:id="@+id/tile"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
+ layout="@layout/grid_item_category">
+ </include>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/responsive_section.xml b/res/layout/responsive_section.xml
index 444967f..04bd6b1 100644
--- a/res/layout/responsive_section.xml
+++ b/res/layout/responsive_section.xml
@@ -21,5 +21,5 @@
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/tab_container_horizontal_padding"
android:orientation="vertical"
- android:divider="@drawable/vertical_divider_24dp"
+ android:divider="@drawable/vertical_divider_8dp"
android:showDividers="middle" />
diff --git a/res/layout/screen_preview_section.xml b/res/layout/screen_preview_section.xml
index 527c0dc..5a7cd8f 100644
--- a/res/layout/screen_preview_section.xml
+++ b/res/layout/screen_preview_section.xml
@@ -18,31 +18,24 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="16dp">
-
- <FrameLayout
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/screen_preview_section_vertical_space">
+ <com.android.wallpaper.picker.customization.ui.section.ScreenPreviewClickView
+ android:id="@+id/screen_preview_click_view"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/screen_preview_section_vertical_space">
+ <com.android.wallpaper.picker.FixedWidthDisplayRatioFrameLayout
+ android:layout_width="@dimen/screen_preview_width"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center">
- <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout
- android:layout_width="match_parent"
- android:layout_height="@dimen/screen_preview_height">
-
- <include
- android:id="@+id/lock_preview"
+ <include android:id="@+id/preview"
layout="@layout/wallpaper_preview_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
-
- <include
- android:id="@+id/home_preview"
- layout="@layout/wallpaper_preview_card"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center" />
-
- </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout>
+ </com.android.wallpaper.picker.FixedWidthDisplayRatioFrameLayout>
<ViewStub
android:id="@+id/clock_carousel_view_stub"
@@ -55,6 +48,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
- </FrameLayout>
+ </com.android.wallpaper.picker.customization.ui.section.ScreenPreviewClickView>
+ <ViewStub
+ android:id="@+id/clock_color_and_size_button"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_gravity="center" />
</com.android.wallpaper.picker.customization.ui.section.ScreenPreviewView>
+
diff --git a/res/drawable/vertical_divider_24dp.xml b/res/layout/spacer_section_view.xml
similarity index 61%
copy from res/drawable/vertical_divider_24dp.xml
copy to res/layout/spacer_section_view.xml
index 22b61ad..4b43416 100644
--- a/res/drawable/vertical_divider_24dp.xml
+++ b/res/layout/spacer_section_view.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2021 The Android Open Source Project
+ Copyright (C) 2023 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.
@@ -14,8 +14,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <size
- android:height="24dp"
- android:width="0dp" />
-</shape>
\ No newline at end of file
+<com.android.wallpaper.picker.spacer.ui.view.SpacerSectionView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?selectableItemBackground"
+ android:clickable="false"
+ android:orientation="vertical"/>
diff --git a/res/layout/toolbar_container_layout.xml b/res/layout/toolbar_container_layout.xml
index c1fc9a1..b14e001 100644
--- a/res/layout/toolbar_container_layout.xml
+++ b/res/layout/toolbar_container_layout.xml
@@ -14,8 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<LinearLayout
+<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/content_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -26,6 +27,7 @@
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
-</LinearLayout>
\ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/res/layout/wallpaper_preview.xml b/res/layout/wallpaper_preview.xml
index abf1043..9ebc8ef 100644
--- a/res/layout/wallpaper_preview.xml
+++ b/res/layout/wallpaper_preview.xml
@@ -35,8 +35,8 @@
android:layout_height="match_parent"
android:importantForAccessibility="noHideDescendants" />
- <FrameLayout
- android:id="@+id/lock_screen_preview_container"
+ <com.android.wallpaper.picker.FadeAnimationSurfaceView
+ android:id="@+id/lock_screen_overlay_surface"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="noHideDescendants" />
diff --git a/res/layout/wallpaper_quick_switch_section.xml b/res/layout/wallpaper_quick_switch_section.xml
index a7df6f8..170d400 100644
--- a/res/layout/wallpaper_quick_switch_section.xml
+++ b/res/layout/wallpaper_quick_switch_section.xml
@@ -23,7 +23,7 @@
android:orientation="vertical"
android:background="@drawable/bottom_connected_section_background"
android:paddingTop="16dp"
- android:paddingBottom="10dp"
+ android:paddingBottom="16dp"
android:paddingHorizontal="24dp">
<!--
See ResponsiveLayoutSectionController to see whether and how the background is replaced in code.
@@ -42,8 +42,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_marginTop="10dp"
- android:minHeight="48dp"
+ android:layout_marginTop="16dp"
+ android:minHeight="24dp"
android:gravity="center"
android:drawablePadding="12dp"
android:drawableStart="@drawable/ic_nav_wallpaper"
@@ -51,6 +51,7 @@
android:text="@string/more_wallpapers"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
android:textColor="@color/text_color_primary"
+ android:textSize="@dimen/wallpaper_header_text_size"
tools:ignore="UseCompatTextViewDrawableXml" />
</com.android.wallpaper.picker.customization.ui.section.WallpaperQuickSwitchView>
diff --git a/res/menu/undoable_customization_menu.xml b/res/menu/undoable_customization_menu.xml
index 35ee682..6ce3ce9 100644
--- a/res/menu/undoable_customization_menu.xml
+++ b/res/menu/undoable_customization_menu.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--
+<?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");
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 0d974f3..36b1920 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Tans gestel"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daaglikse muurpapier"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Tuis- en sluitskerm"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Kies ’n muurpapier"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Skep ’n muurpapier"</string>
<string name="home_screen_message" msgid="106444102822522813">"Tuisskerm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Sluitskerm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Tuis- en sluitskerm"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Stel terug"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Stel veranderinge terug?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Jou veranderinge sal nie gestoor word nie"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Nog muurpapiere"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Nog muurpapiere"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 891af3b..979a08b 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ልጣፍ ይምረጡ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ልጣፍ ይፍጠሩ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ዳግም አስጀምር"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ለውጦች ዳግም ይጀመሩ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"የእርስዎ ለውጦች አይቀመጡም"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ተጨማሪ ልጣፎች"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ተጨማሪ ልጣፎች"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index b170909..fed4e9b 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"اختيار خلفية"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"إنشاء خلفية"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"إعادة الضبط"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"هل تريد إعادة ضبط التغييرات؟"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"لن يتم حفظ تغييراتك."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"المزيد من الخلفيات"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"المزيد من الخلفيات"</string>
</resources>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 3f78195..cf2bebf 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ৱালপেপাৰ বাছনি কৰক"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ৱালপেপাৰ সৃষ্টি কৰক"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ৰিছেট কৰক"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"সালসলনিসমূহ ৰিছেট কৰিবনে?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"আপোনাৰ সম্পাদনাবোৰ ছেভ কৰা নহ’ব"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"অধিক ৱালপেপাৰ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"অধিক ৱালপেপাৰ"</string>
</resources>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index a7e27b9..78f0202 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Hazırda ayarlanıb"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Günlük divar kağızları"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Əsas səhifə & Ekran kilidi"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Divar kağızı seçin"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Divar kağızı yaradın"</string>
<string name="home_screen_message" msgid="106444102822522813">"Əsas ekran"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ekran kilidi"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Əsas səhifə və Kilid"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Sıfırlayın"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Dəyişikliklər sıfırlansın?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Dəyişiklikləriniz yadda saxlanılmayacaq"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Digər divar kağızları"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Digər divar kağızları"</string>
</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 667590d..a950bae 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Trenutno podešena"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dnevna pozadina"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Početni i zaključani ekran"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Odaberite pozadinu"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Napravite pozadinu"</string>
<string name="home_screen_message" msgid="106444102822522813">"Početni ekran"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Zaključan ekran"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Početni i zaključani ekran"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetuj"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Želite da resetujete promene?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Promene neće biti sačuvane"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Još pozadina"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Još pozadina"</string>
</resources>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 965e877..d9a102d 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Выбраць шпалеры"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Стварыць шпалеры"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Скінуць"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Скінуць змяненні?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Вашы змяненні не будуць захаваны"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Дадатковыя шпалеры"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Дадатковыя шпалеры"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index d3556f3..801dcc3 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Избиране на тапет"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Създаване на тапет"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Нулиране"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Да се нулират ли промените?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Промените ви няма да бъдат запазени"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Още тапети"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Още тапети"</string>
</resources>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index 5a1363c..32e4731 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ওয়ালপেপার বেছে নিন"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ওয়ালপেপার তৈরি করুন"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"রিসেট করুন"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"পরিবর্তন রিসেট করবেন?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"আপনার করা পরিবর্তন সেভ করা হবে না"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"আরও ওয়ালপেপার"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"আরও ওয়ালপেপার"</string>
</resources>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index 2362f93..c7443c7 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Trenutno postavljeno"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dnevna pozadinska slika"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Početni ekran i zaključani ekran"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Odaberite pozadinsku sliku"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Kreirajte pozadinsku sliku"</string>
<string name="home_screen_message" msgid="106444102822522813">"Početni ekran"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Zaključavanje ekrana"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Početni i zaključani ekran"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Poništi"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Poništiti izmjene?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Vaše izmjene se neće sačuvati"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Više pozadinskih slika"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Više pozadinskih slika"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 2fc9d22..3233e71 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Establert actualment"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fons de pantalla diari"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Pantalla d\'inici i de bloqueig"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Tria un fons de pantalla"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crea un fons de pantalla"</string>
<string name="home_screen_message" msgid="106444102822522813">"Pantalla d\'inici"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Pantalla de bloqueig"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Pantalla d\'inici i de bloqueig"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Restableix"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vols restablir els canvis?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Els teus canvis no es desaran"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Més fons de pantalla"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Més fons de pantalla"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index e3385a2..9cd27ff 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Aktuálně nastaveno"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Denní tapeta"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Plocha a obrazovka uzamčení"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Vyberte tapetu"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Vytvořte tapetu"</string>
<string name="home_screen_message" msgid="106444102822522813">"Plocha"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Obrazovka uzamčení"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Plocha a uzamknutí"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetovat"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Resetovat změny?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Změny nebudou uloženy"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Další tapety"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Více tapet"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 4962323..4478c46 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Nuværende"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daglig baggrund"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Start- og låseskærm"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Vælg en baggrund"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Opret en baggrund"</string>
<string name="home_screen_message" msgid="106444102822522813">"Startskærm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Låseskærm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Start- og låseskærm"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Nulstil"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vil du nulstille ændringerne?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Dine ændringer gemmes ikke"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Flere baggrunde"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Flere baggrunde"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 406f1d6..a14bb6c 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Derzeit festgelegt"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Täglicher Hintergrund"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Startbildschirm & Sperrbildschirm"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Hintergrund auswählen"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Hintergrund erstellen"</string>
<string name="home_screen_message" msgid="106444102822522813">"Startbildschirm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Sperrbildschirm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Startbildschirm & Sperrbildschirm"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Zurücksetzen"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Änderungen zurücksetzen?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Änderungen werden nicht gespeichert."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Weitere Hintergründe"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Weitere Hintergrundbilder"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index e66c83d..cf68011 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Επιλέξτε μια ταπετσαρία"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Δημιουργήστε μια ταπετσαρία"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Επαναφορά"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Να γίνει επαναφορά αλλαγών;"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Οι αλλαγές σας δεν θα αποθηκευτούν"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Περισσότερες ταπετσαρίες"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Περισσότερες ταπετσαρίες"</string>
</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 4e073fb..2f85b0a 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Currently set"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daily wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choose a wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Create a wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home & Lock"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Reset changes?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Your changes won\'t be saved"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"More wallpapers"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"More wallpapers"</string>
</resources>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index 56b434f..14e2a07 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -29,6 +29,10 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Currently set"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daily wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <!-- no translation found for choose_a_wallpaper_section_title (1009823506890453891) -->
+ <skip />
+ <!-- no translation found for creative_wallpaper_title (8459226435723103934) -->
+ <skip />
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home & Lock"</string>
@@ -126,6 +130,6 @@
<skip />
<!-- no translation found for reset_confirmation_dialog_message (888669268626289603) -->
<skip />
- <!-- no translation found for more_wallpapers (7585665124282737376) -->
+ <!-- no translation found for more_wallpapers (8116268433411881705) -->
<skip />
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 4e073fb..2f85b0a 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Currently set"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daily wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choose a wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Create a wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home & Lock"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Reset changes?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Your changes won\'t be saved"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"More wallpapers"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"More wallpapers"</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 4e073fb..2f85b0a 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Currently set"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daily wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choose a wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Create a wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home & Lock"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Reset changes?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Your changes won\'t be saved"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"More wallpapers"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"More wallpapers"</string>
</resources>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index 5d48774..aebbd79 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Currently set"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daily wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choose a Wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Create a Wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home & Lock"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Reset changes?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Your changes won\'t be saved"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"More Wallpapers"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"More wallpapers"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 196628a..1f8a802 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Establecido actualmente"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fondo de pantalla diario"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Pantalla principal y de bloqueo"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Elige un fondo de pantalla"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crea un fondo de pantalla"</string>
<string name="home_screen_message" msgid="106444102822522813">"Pantalla principal"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Pantalla de bloqueo"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Pantalla principal y bloqueada"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Restablecer"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"¿Restablecer los cambios?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"No se guardarán los cambios"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Más fondos de pantalla"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Más fondos de pantalla"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 4a231b9..117217d 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Establecido actualmente"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fondo de pantalla diario"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Pantalla de inicio y bloqueo"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Elige un fondo de pantalla"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crea un fondo de pantalla"</string>
<string name="home_screen_message" msgid="106444102822522813">"Pantalla de inicio"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Pantalla de bloqueo"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Inicio y bloqueo"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Restablecer"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"¿Revertir cambios?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Tus cambios no se guardarán"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Más fondos de pantalla"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Más fondos de pantalla"</string>
</resources>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index fbf5177..693b952 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Praegu määratud"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Päeva taustapilt"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ava- ja lukustuskuva"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Taustapildi valimine"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Taustapildi loomine"</string>
<string name="home_screen_message" msgid="106444102822522813">"Avaekraan"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lukustuskuva"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Avaekraan ja lukustuskuva"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Lähtesta"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Kas lähtestada muudatused?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Muudatusi ei salvestata"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Veel taustapilte"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Rohkem taustapilte"</string>
</resources>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 85ae1d4..5ad36f3 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Hau dago ezarrita:"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Eguneko horma-papera"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Hasieran eta pantaila blokeatuan"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Hautatu horma-paper bat"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Sortu horma-paper bat"</string>
<string name="home_screen_message" msgid="106444102822522813">"Hasierako pantaila"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Pantaila blokeatua"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Hasieran + pantaila blokeatuan"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Berrezarri"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Aldaketak berrezarri?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Ez dira gordeko aldaketak"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Horma-paper gehiago"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Horma-paper gehiago"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index d1bf478..f9690a0 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"انتخاب کاغذدیواری"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ایجاد کاغذدیواری"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"بازنشانی"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"تغییرات بازنشانی شود؟"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"تغییرات شما ذخیره نخواهد شد"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"کاغذدیواریهای بیشتر"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"کاغذدیواریهای بیشتر"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 2529f99..46ff647 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Nykyinen taustakuva"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Päivän taustakuva"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Aloitus- ja lukitusnäyttö"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Valitse taustakuva"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Luo taustakuva"</string>
<string name="home_screen_message" msgid="106444102822522813">"Aloitusnäyttö"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lukitusnäyttö"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Aloitus- ja lukitusnäyttö"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Nollaa"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Nollataanko muutokset?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Muutoksia ei tallenneta"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Lisää taustakuvia"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Lisää taustakuvia"</string>
</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 42dd9ba..932a549 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Fond d\'écran actuel"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fond d\'écran quotidien"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Écrans d\'accueil et de verrouillage"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choisir un fond d\'écran"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Créer un fond d\'écran"</string>
<string name="home_screen_message" msgid="106444102822522813">"Écran d\'accueil"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Écran de verrouillage"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Écr. d\'accueil et de verrouill."</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Réinitialiser"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Réinitialiser les modifications?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Vos modifications ne seront pas enregistrées"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Plus de fonds d\'écran"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Plus de fonds d\'écran"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 93e6952..63034c8 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Sélectionné"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fond d\'écran quotidien"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Écran d\'accueil et écran de verrouillage"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Choisir un fond d\'écran"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Créer un fond d\'écran"</string>
<string name="home_screen_message" msgid="106444102822522813">"Écran d\'accueil"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Écran de verrouillage"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Accueil et verrouillage"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Réinitialiser"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Réinitialiser les modifications ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Vos modifications ne seront pas enregistrées"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Autres fonds d\'écran"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Autres fonds d\'écran"</string>
</resources>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index 6b7adba..1063af9 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Establecido actualmente"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Fondo de pantalla diario"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Pantallas de inicio e bloqueo"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Escolle un fondo de pantalla"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crear un fondo de pantalla"</string>
<string name="home_screen_message" msgid="106444102822522813">"Pantalla de inicio"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Pantalla de bloqueo"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Pantallas de inicio e bloqueo"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Restablecer"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Queres restablecer os cambios?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Non se gardarán os cambios"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Máis fondos de pantalla"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Máis fondos de pantalla"</string>
</resources>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index c92893f..2685c71 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"વૉલપેપર પસંદ કરો"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"વૉલપેપર બનાવો"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"રીસેટ કરો"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ફેરફારો રીસેટ કરીએ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"તમારા ફેરફારો સાચવવામાં આવશે નહીં"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"વધુ વૉલપેપર"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"વધુ વૉલપેપર"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index d34b780..afb9dd1 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"कोई वॉलपेपर चुनें"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"कोई वॉलपेपर बनाएं"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"रीसेट करें"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"क्या आपको बदलाव रीसेट करने हैं?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"आपके बदलाव सेव नहीं किए जाएंगे"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"कुछ और वॉलपेपर"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"कुछ और वॉलपेपर"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 75884f7..4f05bb6 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Trenutačno postavljeno"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dnevna pozadina"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Početni i zaključan zaslon"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Odaberite pozadinu"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Izradite pozadinu"</string>
<string name="home_screen_message" msgid="106444102822522813">"Početni zaslon"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Zaključan zaslon"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Početni i zaključan zaslon"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Poništi"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Poništiti promjene?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Promjene se neće spremiti"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Više pozadina"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Više pozadina"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 210833b..4075c5b 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Jelenleg beállított"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Napi háttérkép"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Kezdő- és lezárási képernyő"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Háttérkép kiválasztása"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Háttérkép létrehozása"</string>
<string name="home_screen_message" msgid="106444102822522813">"Kezdőképernyő"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lezárási képernyő"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Kezdő- és lezárási képernyő"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Alaphelyzet"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Visszavonja a módosításokat?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"A módosítások nem lesznek mentve"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"További hátterek"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"További hátterek"</string>
</resources>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 439cbc0..5c59dae 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Ընտրեք պաստառ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Ստեղծեք պաստառ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Զրոյացնել"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Զրոյացնե՞լ փոփոխությունները"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Ձեր փոփոխությունները չեն պահվի"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Այլ պաստառներ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Այլ պաստառներ"</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 95e1080..3327d98 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Yang disetel saat ini"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Wallpaper harian"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Layar utama & layar kunci"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Pilih Wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Buat Wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Layar utama"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Layar kunci"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Beranda & Layar Kunci"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Reset perubahan?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Perubahan tidak akan disimpan"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Wallpaper Lainnya"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Wallpaper lainnya"</string>
</resources>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index 8880f66..03f041c 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Valið núna"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daglegt veggfóður"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Heima- og lásskjár"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Veldu veggfóður"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Búðu til veggfóður"</string>
<string name="home_screen_message" msgid="106444102822522813">"Heimaskjár"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lásskjár"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Heima- og lásskjár"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Endurstilla"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Endurstilla breytingar?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Breytingarnar verða ekki vistaðar"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Fleiri veggfóður"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Fleiri veggfóður"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 003b354..4c4cc0c 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Attualmente impostato"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Sfondo giornaliero"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Schermate Home e di blocco"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Scegli uno sfondo"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crea uno sfondo"</string>
<string name="home_screen_message" msgid="106444102822522813">"Schermata Home"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Schermata di blocco"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Schermate Home e di blocco"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Reimposta"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vuoi reimpostare le modifiche?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Le modifiche non verranno salvate"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Altri sfondi"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Altri sfondi"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index d2f7715..7b19603 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"בחירת טפט"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"יצירת טפט"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"איפוס"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"לאפס את השינויים?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"השינויים שביצעת לא יישמרו"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"טפטים נוספים"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"עוד טפטים"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index a53499d..1c3dd6e 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"壁紙の選択"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"壁紙の作成"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"リセット"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"変更をリセットしますか?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"変更内容は保存されません"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"その他の壁紙"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"その他の壁紙"</string>
</resources>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index ca9e79b..565f27f 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"აირჩიეთ ფონი"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"შექმენით ფონი"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"გადაყენება"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ცვლილებების გადაყენება?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"თქვენი ცვლილებები არ შეინახება"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"მეტი ფონი"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"მეტი ფონი"</string>
</resources>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index e3cf30d..c1b8fec 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Тұсқағаз таңдау"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Тұсқағаз жасау"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Қайтару"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Өзгертулерді қайтару керек пе?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Өзгертулер сақталмайды."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Қосымша тұсқағаздар"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Басқа да тұсқағаздар"</string>
</resources>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index abd1719..d3c73d1 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ជ្រើសរើសផ្ទាំងរូបភាព"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"បង្កើតផ្ទាំងរូបភាព"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"កំណត់ឡើងវិញ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"កំណត់ការផ្លាស់ប្ដូរឡើងវិញឬ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ការផ្លាស់ប្ដូររបស់អ្នកនឹងមិនត្រូវបានរក្សាទុកទេ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ផ្ទាំងរូបភាពច្រើនទៀត"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ផ្ទាំងរូបភាពច្រើនទៀត"</string>
</resources>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index d64ccd3..864b157 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ವಾಲ್ಪೇಪರ್ ಆಯ್ಕೆಮಾಡಿ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ವಾಲ್ಪೇಪರ್ ರಚಿಸಿ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ರೀಸೆಟ್ ಮಾಡಿ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ಬದಲಾವಣೆಗಳನ್ನು ರೀಸೆಟ್ ಮಾಡಬೇಕೆ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ನಿಮ್ಮ ಬದಲಾವಣೆಗಳನ್ನು ಉಳಿಸಲಾಗುವುದಿಲ್ಲ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ಇನ್ನಷ್ಟು ವಾಲ್ಪೇಪರ್ಗಳು"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ಇನ್ನಷ್ಟು ವಾಲ್ಪೇಪರ್ಗಳು"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 8d01472..351bf36 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"배경화면 선택하기"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"배경화면 만들기"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"초기화"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"변경사항을 초기화하시겠습니까?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"변경사항이 저장되지 않습니다."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"배경화면 더보기"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"배경화면 더보기"</string>
</resources>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 0a6cb7b..1e9154c 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Тушкагаз тандоо"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Тушкагаз түзүү"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Баштапкы абалга келтирүү"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Өзгөртүүлөр жоюлсунбу?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Өзгөртүүлөрүңүз сакталбайт"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Дагы башка тушкагаздар"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Дагы башка тушкагаздар"</string>
</resources>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index 57d23bd..dec36c1 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ເລືອກຮູບພື້ນຫຼັງ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ສ້າງຮູບພື້ນຫຼັງ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ຣີເຊັດ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ຣີເຊັດການປ່ຽນແປງບໍ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ການປ່ຽນແປງຂອງທ່ານຈະບໍ່ຖືກບັນທຶກ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ຮູບພື້ນຫຼັງເພີ່ມເຕີມ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ຮູບພື້ນຫຼັງເພີ່ມເຕີມ"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 2fe4e4a..fd69e96 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Šiuo metu nustatytas"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dienos ekrano fonas"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Pagrindinis ir užrakinimo ekranai"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Pasirinkite ekrano foną"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Sukurkite ekrano foną"</string>
<string name="home_screen_message" msgid="106444102822522813">"Pagrindinis ekranas"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Užrakinimo ekranas"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Pagrindinis ir užrakinimo ekr."</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Nust. iš n."</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Nustatyti pakeitimus iš naujo?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Pakeitimai nebus išsaugoti"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Daugiau darbalaukio fonų"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Daugiau darbalaukio fonų"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 5a632e6..4850a0b 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Pašlaik iestatīta"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dienas fona tapete"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Sākuma un bloķēšanas ekrāns"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Fona tapetes izvēle"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Fona tapetes izveide"</string>
<string name="home_screen_message" msgid="106444102822522813">"Sākuma ekrāns"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Bloķēšanas ekrāns"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Sākuma un bloķēšanas ekrāns"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Atiestatīt"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vai atiestatīt izmaiņas?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Jūsu veiktās izmaiņas netiks saglabātas."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Citas tapetes"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Citas fona tapetes"</string>
</resources>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 5c765d4..515658c 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Изберете тапет"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Создајте тапет"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Ресетирај"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Да се ресетираат промените?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Промените нема да се зачуваат"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Повеќе тапети"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Повеќе тапети"</string>
</resources>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index cdb1cd8..b9a7d70 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ഒരു വാൾപേപ്പർ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ഒരു വാൾപേപ്പർ സൃഷ്ടിക്കുക"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"റീസെറ്റ് ചെയ്യൂ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"മാറ്റങ്ങൾ റീസെറ്റ് ചെയ്യണോ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"നിങ്ങളുടെ മാറ്റങ്ങൾ സംരക്ഷിക്കില്ല"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"കൂടുതൽ വാൾപേപ്പറുകൾ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"കൂടുതൽ വാൾപേപ്പറുകൾ"</string>
</resources>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index 41a5f25..9a69c0e 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Дэлгэцийн зураг сонгох"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Дэлгэцийн зураг үүсгэх"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Шинэчлэх"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Өөрчлөлтийг шинэчлэх үү?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Таны өөрчлөлтийг хадгалахгүй"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Дэлгэцийн бусад зураг"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Дэлгэцийн бусад зураг"</string>
</resources>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index a02f11f..c175e13 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"वॉलपेपर निवडा"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"वॉलपेपर तयार करा"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"रीसेट करा"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"बदल रीसेट करायचे आहेत का?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"तुमचे बदल सेव्ह केले जाणार नाहीत"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"आणखी वॉलपेपर"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"अधिक वॉलपेपर"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 3e2f99d..6bf6d85 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Ditetapkan pada masa ini"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Kertas dinding harian"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Skrin utama & Skrin kunci"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Pilih Hiasan latar"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Buat Hiasan latar"</string>
<string name="home_screen_message" msgid="106444102822522813">"Skrin utama"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Kunci skrin"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Skrin Utama & Kunci"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Tetapkan semula"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Tetapkan semula perubahan?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Perubahan anda tidak akan disimpan"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Lagi Hiasan Latar"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Lagi hiasan latar"</string>
</resources>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 64649bd..12a9f33 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"နောက်ခံရွေးရန်"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"နောက်ခံလုပ်ရန်"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ပြင်ဆင်ရန်"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"အပြောင်းအလဲများ ပြန်သတ်မှတ်မလား။"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"သင့်ပြောင်းလဲမှုများအား သိမ်းမည် မဟုတ်ပါ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"နောက်ထပ်နောက်ခံများ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"နောက်ထပ် နောက်ခံပုံများ"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 920427e..20a6895 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Nåværende bakgrunn"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Daglig bakgrunn"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Startskjermen og låseskjermen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Velg en bakgrunn"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Opprett en bakgrunn"</string>
<string name="home_screen_message" msgid="106444102822522813">"Startskjerm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Låseskjerm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Startskjermen og låseskjermen"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Tilbakestill"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vil du tilbakestille endringene?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Endringene lagres ikke"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Flere bakgrunner"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Flere bakgrunner"</string>
</resources>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index d37f317..20f4701 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"वालपेपर छान्नुहोस्"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"वालपेपर बनाउनुहोस्"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"रिसेट गर्नुहोस्"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"परिवर्तनहरू रिसेट गर्ने हो?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"तपाईंले गरेका परिवर्तनहरू सेभ गरिने छैनन्"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"थप वालपेपरहरू"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"थप वालपेपरहरू"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 33c1fc4..83854f7 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Momenteel ingesteld"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dagelijkse achtergrond"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Start- en vergrendelscherm"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Een achtergrond kiezen"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Een achtergrond maken"</string>
<string name="home_screen_message" msgid="106444102822522813">"Startscherm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Vergrendelscherm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home- en vergrendelscherm"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetten"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Wijzigingen resetten?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Je wijzigingen worden niet opgeslagen"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Meer achtergronden"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Meer achtergronden"</string>
</resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 73b3a4c..b64db96 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ଏକ ୱାଲପେପର ବାଛନ୍ତୁ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ଏକ ୱାଲପେପର ତିଆରି କରନ୍ତୁ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ରିସେଟ କରନ୍ତୁ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ପରିବର୍ତ୍ତନଗୁଡ଼ିକୁ ରିସେଟ କରିବେ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ଆପଣଙ୍କର ପରିବର୍ତ୍ତନଗୁଡ଼ିକୁ ସେଭ କରାଯିବ ନାହିଁ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ଅଧିକ ୱାଲପେପର"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ଅଧିକ ୱାଲପେପର"</string>
</resources>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index 7d02d4e..cb2c2ef 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"ਕੋਈ ਵਾਲਪੇਪਰ ਚੁਣੋ"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"ਕੋਈ ਵਾਲਪੇਪਰ ਬਣਾਓ"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ਰੀਸੈੱਟ ਕਰੋ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"ਕੀ ਤਬਦੀਲੀਆਂ ਨੂੰ ਰੀਸੈੱਟ ਕਰਨਾ ਹੈ?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ਤੁਹਾਡੀਆਂ ਤਬਦੀਲੀਆਂ ਨੂੰ ਰੱਖਿਅਤ ਨਹੀਂ ਕੀਤਾ ਜਾਵੇਗਾ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"ਹੋਰ ਵਾਲਪੇਪਰ"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"ਹੋਰ ਵਾਲਪੇਪਰ"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 427d32e..09ec427 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Obecnie ustawiona"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Codzienna tapeta"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ekran główny i ekran blokady"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Wybierz tapetę"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Utwórz tapetę"</string>
<string name="home_screen_message" msgid="106444102822522813">"Ekran główny"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ekran blokady"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Ekran główny i ekran blokady"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetuj"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Zresetować zmiany?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Zmiany nie zostaną zapisane"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Więcej tapet"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Więcej tapet"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index dd227ab..6a5de08 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Definida atualmente"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Imagem de fundo diária"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ecrã principal e de bloqueio"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Escolha uma imagem de fundo"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crie uma imagem de fundo"</string>
<string name="home_screen_message" msgid="106444102822522813">"Ecrã principal"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ecrã de bloqueio"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Ecrã principal e de bloqueio"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Repor"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Repor alterações?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"As suas alterações não vão ser guardadas"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Mais imagens de fundo"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Mais imagens de fundo"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 7c5a7e9..948cc8c 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Atual"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Plano de fundo diário"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Tela inicial e de bloqueio"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Escolha um plano de fundo"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Crie um plano de fundo"</string>
<string name="home_screen_message" msgid="106444102822522813">"Tela inicial"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Tela de bloqueio"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Tela inicial e de bloqueio"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Redefinir"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Redefinir mudanças?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"As mudanças não vão ser salvas"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Mais planos de fundo"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Mais planos de fundo"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index e62da4f..4a157b9 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Setată în prezent"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Imaginea de fundal zilnică"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ecran de pornire și de blocare"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Alege o imagine de fundal"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Creează o imagine de fundal"</string>
<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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetează"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Resetezi modificările?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Modificările nu se vor salva"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Mai multe imagini de fundal"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Mai multe imagini de fundal"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 4a65f09..4753b43 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Выбрать обои"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Создать обои"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Сбросить"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Сбросить изменения?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Изменения не будут сохранены."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Ещё обои"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Ещё обои"</string>
</resources>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index 7da8afb..3bc1ca4 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"වෝල්පේපරයක් තෝරා ගන්න"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"වෝල්පේපරයක් තනන්න"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"යළි සකසන්න"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"වෙනස්කම් යළි සකසන්න ද?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ඔබේ වෙනස්කම් සුරැකෙන්නේ නැත"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"තවත් වෝල්පේපර"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"තවත් වෝල්පේපර"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 5ebc664..c4ab8b8 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Práve nastavená"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Denná tapeta"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Plocha a uzamknutá obrazovka"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Vyberte tapetu"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Vytvorte tapetu"</string>
<string name="home_screen_message" msgid="106444102822522813">"Plocha"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Uzamknutá obrazovka"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Plocha a uzamknutá obrazovka"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Resetovať"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Chcete resetovať zmeny?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Vaše zmeny nebudú uložené"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Ďalšie tapety"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Ďalšie tapety"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index ededc70..36c8f2b 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Trenutno nastavljeno"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dnevno ozadje"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Začetni in zaklenjeni zaslon"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Izberite zaslonsko ozadje"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Ustvarite zaslonsko ozadje"</string>
<string name="home_screen_message" msgid="106444102822522813">"Začetni zaslon"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Zaklenjen zaslon"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Začetni in zaklenjeni zaslon"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Ponastavi"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Želite ponastaviti spremembe?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Spremembe ne bodo shranjene."</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Več zaslonskih ozadij"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Več zaslonskih ozadij"</string>
</resources>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index e72d7fb..554de88 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"E caktuar aktualisht"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Imazh sfondi i përditshëm"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"\"Ekrani bazë\" dhe \"Ekrani i kyçjes\""</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Zgjidh një imazh sfondi"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Krijo një imazh sfondi"</string>
<string name="home_screen_message" msgid="106444102822522813">"Ekrani bazë"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ekrani i kyçjes"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"\"Ekrani bazë\" dhe \"Kyçja\""</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Rivendos"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Të rivendosen ndryshimet?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Ndryshimet e tua nuk do të ruhen"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Më shumë imazhe të sfondit"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Më shumë imazhe të sfondit"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index ee7b7b3..ffdc0fc 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Одаберите позадину"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Направите позадину"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Ресетуј"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Желите да ресетујете промене?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Промене неће бити сачуване"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Још позадина"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Још позадина"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index e66e377..1a75fa5 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Nuvarande bakgrund"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Dagens bakgrund"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Start- och låsskärm"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Välj en bakgrund"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Skapa en bakgrund"</string>
<string name="home_screen_message" msgid="106444102822522813">"Startskärm"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Låsskärm"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Start- och låsskärm"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Återställ"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Vill du återställa ändringarna?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Dina ändringar sparas inte"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Fler bakgrunder"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Fler bakgrunder"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index f891a2f..c27d510 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Mandhari yaliyopo"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Mandhari ya kila siku"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Skrini ya Kwanza na Iliyofungwa"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Chagua Mandhari"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Unda Mandhari"</string>
<string name="home_screen_message" msgid="106444102822522813">"Skrini ya kwanza"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Skrini iliyofungwa"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Skrini ya Kwanza na Iliyofungwa"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Weka upya"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Ungependa kuweka mabadiliko upya?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Mabadiliko yako hayatahifadhiwa"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Mandhari Zaidi"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Mandhari zaidi"</string>
</resources>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 57195c1..946c853 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"வால்பேப்பரைத் தேர்வுசெய்யுங்கள்"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"வால்பேப்பரை உருவாக்குங்கள்"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"மீட்டமை"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"மாற்றங்களை மீட்டமைக்கவா?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"உங்கள் மாற்றங்கள் சேமிக்கப்படாது"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"கூடுதல் வால்பேப்பர்கள்"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"மேலும் வால்பேப்பர்கள்"</string>
</resources>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index 4404233..39a24c5 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"వాల్పేపర్ను ఎంచుకోండి"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"వాల్పేపర్ను క్రియేట్ చేయండి"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"రీసెట్ చేయండి"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"మార్పులను రీసెట్ చేయాలా?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"మీ మార్పులు సేవ్ చేయబడవు"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"మరిన్ని వాల్పేపర్లు"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"మరిన్ని వాల్పేపర్లు"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index c07435c..9844e48 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"เลือกวอลเปเปอร์"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"สร้างวอลเปเปอร์"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"รีเซ็ต"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"รีเซ็ตการเปลี่ยนแปลงไหม"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"ระบบจะไม่บันทึกการเปลี่ยนแปลงของคุณ"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"วอลเปเปอร์เพิ่มเติม"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"วอลเปเปอร์เพิ่มเติม"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index a26eb4e..51ac723 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Kasalukuyang nakatakda"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Pang-araw-araw na wallpaper"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Home & Lock screen"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Pumili ng Wallpaper"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Gumawa ng Wallpaper"</string>
<string name="home_screen_message" msgid="106444102822522813">"Home screen"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Lock screen"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Home at Lock"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"I-reset"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"I-reset ang mga pagbabago?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Hindi mase-save ang iyong mga pagbabago"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Higit Pang Wallpaper"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Higuit pang wallpaper"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index f1bde84..05aefa0 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Şu anda ayarlı"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Günlük duvar kağıdı"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ana Sayfa ve Kilit ekranı"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Duvar kağıdı seçin"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Duvar kağıdı oluşturun"</string>
<string name="home_screen_message" msgid="106444102822522813">"Ana ekran"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Kilit ekranı"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Ana Ekran ve Kilit Ekranı"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Sıfırla"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Değişiklikler sıfırlansın mı?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Değişiklikleriniz kaydedilmeyecek"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Diğer Duvar Kağıtları"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Diğer duvar kağıtları"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 9c6e92e..5149577 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Виберіть фоновий малюнок"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Створіть фоновий малюнок"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Скинути"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Скинути зміни?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Зміни не буде збережено"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Більше фонових малюнків"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Більше фонових малюнків"</string>
</resources>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 94320bd..7fb444c 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"وال پیپر منتخب کریں"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"وال پیپر تخلیق کریں"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"ری سیٹ کریں"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"تبدیلیوں کو ری سیٹ کریں؟"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"آپ کی تبدیلیاں محفوظ نہیں ہوں گی"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"مزید وال پیپرز"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"مزید وال پیپرز"</string>
</resources>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 6b419fc..43004e3 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Hozirda tanlangan"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Kunlik fon rasmi"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Bosh ekran va ekran qulfi"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Fon rasmini tanlang"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Fon rasmi yarating"</string>
<string name="home_screen_message" msgid="106444102822522813">"Bosh ekran"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Ekran qulfi"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Bosh ekran va ekran qulfi"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Yangilash"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Oʻzgarishlar asliga qaytarilsinmi?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Oʻzgarishlar saqlanmaydi"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Boshqa fon rasmlari"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Boshqa fon rasmlari"</string>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 5fff497..c2fadd9 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Hình nền hiện tại"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Hình nền hàng ngày"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Màn hình chính và màn hình khóa"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Chọn hình nền"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Tạo hình nền"</string>
<string name="home_screen_message" msgid="106444102822522813">"Màn hình chính"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Màn hình khóa"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Màn hình chính và khóa"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Đặt lại"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Đặt lại nội dung thay đổi?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Thay đổi của bạn sẽ không được lưu"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Hình nền khác"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Hình nền khác"</string>
</resources>
diff --git a/res/values-w500dp/dimens.xml b/res/values-w500dp/dimens.xml
new file mode 100644
index 0000000..9671a83
--- /dev/null
+++ b/res/values-w500dp/dimens.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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
+ -->
+<resources>
+ <!--
+ Width of the screen preview. The height will be determined based on the aspect ratio of the
+ display.
+ -->
+ <dimen name="screen_preview_width">300dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/res/values-w600dp/dimens.xml b/res/values-w600dp/dimens.xml
new file mode 100644
index 0000000..a16f8df
--- /dev/null
+++ b/res/values-w600dp/dimens.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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
+ -->
+<resources>
+ <!--
+ Width of the screen preview. The height will be determined based on the aspect ratio of the
+ display.
+ -->
+ <dimen name="screen_preview_width">450dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/res/values-w800dp/dimens.xml b/res/values-w800dp/dimens.xml
index 2321787..9498acd 100644
--- a/res/values-w800dp/dimens.xml
+++ b/res/values-w800dp/dimens.xml
@@ -63,4 +63,10 @@
<!-- Clipping of the home screen overlay -->
<dimen name="home_screen_overlay_top_clipping">0dp</dimen>
<dimen name="home_screen_overlay_bottom_clipping">80dp</dimen>
+
+ <!--
+ Width of the screen preview. The height will be determined based on the aspect ratio of the
+ display.
+ -->
+ <dimen name="screen_preview_width">600dp</dimen>
</resources>
\ No newline at end of file
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index cccd0d3..42a4076 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"选择一张壁纸"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"制作一张壁纸"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"重置"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"要重置更改吗?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"您所做的更改将不会保存"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"更多壁纸"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"更多壁纸"</string>
</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index f0e2ef0..3312f99 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"選擇桌布"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"製作桌布"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"重設"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"要重設變更嗎?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"你的變更不會儲存"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"更多桌布"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"更多桌布"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index b37d334..df8c05e 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -29,6 +29,8 @@
<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="choose_a_wallpaper_section_title" msgid="1009823506890453891">"選擇桌布"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"建立桌布"</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>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"重設"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"要重設變更嗎?"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"系統不會儲存你的變更"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"更多桌布"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"更多桌布"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 98f5539..6e1cd8b 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -29,6 +29,8 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"Manje isethiwe"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"Isithombe sangemuva sansuku zonke"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"Ikhaya nesikrini sokukhiya"</string>
+ <string name="choose_a_wallpaper_section_title" msgid="1009823506890453891">"Khetha Isithombe Sangemuva"</string>
+ <string name="creative_wallpaper_title" msgid="8459226435723103934">"Sungula Isithombe Sangemuva"</string>
<string name="home_screen_message" msgid="106444102822522813">"Isikrini sasekhaya"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"Khiya isikrini"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Ikhaya nokukhiya"</string>
@@ -118,5 +120,5 @@
<string name="reset" msgid="4945445169532850631">"Setha kabusha"</string>
<string name="reset_confirmation_dialog_title" msgid="3391905685838213712">"Setha kabusha izinguquko"</string>
<string name="reset_confirmation_dialog_message" msgid="888669268626289603">"Izinguquko zakho ngeke zilondolozwe"</string>
- <string name="more_wallpapers" msgid="7585665124282737376">"Izithombe Zangemuva Ezengeziwe"</string>
+ <string name="more_wallpapers" msgid="8116268433411881705">"Izithombe zangemuva ezengeziwe"</string>
</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index a5bfd66..0d74526 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -27,4 +27,7 @@
</attr>
</declare-styleable>
<item name="linear_layout_horizontal_display_options_max" format="float" type="dimen">4.35</item>
+ <declare-styleable name="DuoTabs">
+ <attr name="should_use_short_tabs" format="boolean" />
+ </declare-styleable>
</resources>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index ec437ad..375c162 100755
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -43,7 +43,6 @@
<color name="myphoto_background_color">@color/white</color>
<color name="myphoto_background_cloud">@color/google_grey200</color>
<color name="preview_toolbar_text_light">@android:color/system_neutral1_50</color>
- <color name="preview_toolbar_text_dark">@android:color/system_neutral1_900</color>
<color name="color_accent_primary">@android:color/system_accent1_100</color>
<color name="color_accent_primary_variant">@android:color/system_accent1_600</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9833237..8f334b1 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -32,6 +32,10 @@
<dimen name="category_grid_edge_space">18dp</dimen>
<dimen name="category_grid_padding_top">32dp</dimen>
+ <!-- Dimensions for creative categoriy tiles. -->
+ <dimen name="creative_category_grid_padding_horizontal">8dp</dimen>
+ <dimen name="creative_category_grid_padding_vertical">0dp</dimen>
+
<!-- Dimensions for featured "category" tiles. -->
<dimen name="grid_item_featured_category_padding_bottom">16dp</dimen>
@@ -40,6 +44,7 @@
<dimen name="grid_item_individual_padding_bottom">8dp</dimen>
<dimen name="grid_item_individual_label_padding_top">6dp</dimen>
<dimen name="grid_item_individual_label_padding_bottom">4dp</dimen>
+ <dimen name="grid_item_individual_label_padding_horizontal">12dp</dimen>
<dimen name="wallpaper_grid_edge_space">20dp</dimen>
<dimen name="wallpaper_grid_padding_top">32dp</dimen>
@@ -183,8 +188,13 @@
<dimen name="option_title_font_text_size">14sp</dimen>
<dimen name="option_title_line_height">20dp</dimen>
+ <dimen name="grid_label_font_text_size">14sp</dimen>
+ <dimen name="grid_label_line_height">20dp</dimen>
+
+
<!-- Dimensions for the separated tabs. -->
<dimen name="separated_tabs_height">56dp</dimen>
+ <dimen name="separated_tabs_height_short">36dp</dimen>
<dimen name="separated_tabs_corner_radius">12dp</dimen>
<dimen name="separated_tabs_inset_horizontal">4dp</dimen>
<!-- Default page horizontal margin (24dp) - separated tabs inset horizontal (4dp) -->
@@ -207,8 +217,8 @@
<dimen name="section_container_vertical_margin">24dp</dimen>
<dimen name="wallpaper_section_horizontal_padding">24dp</dimen>
<dimen name="section_horizontal_padding">24dp</dimen>
- <dimen name="section_vertical_padding">24dp</dimen>
- <dimen name="section_top_padding">24dp</dimen>
+ <dimen name="option_section_vertical_padding">4dp</dimen>
+ <dimen name="section_padding">24dp</dimen>
<dimen name="section_bottom_padding">16dp</dimen>
<!-- For the wallpaper section -->
@@ -219,6 +229,7 @@
<dimen name="wallpaper_picker_entry_horizontal_padding">16dp</dimen>
<dimen name="wallpaper_picker_entry_margin_vertical">16dp</dimen>
<dimen name="wallpaper_picker_entry_card_corner_radius">12dp</dimen>
+ <dimen name="wallpaper_picker_options_section_margin">12dp</dimen>
<dimen name="wallpaper_preview_buttons_elevation">8dp</dimen>
<!-- For the full screen preview activity's hide UI menu item -->
@@ -278,8 +289,14 @@
-->
<dimen name="screen_preview_height">380dp</dimen>
+ <!--
+ Width of the screen preview. The height will be determined based on the aspect ratio of the
+ display.
+ -->
+ <dimen name="screen_preview_width">176dp</dimen>
+
<!-- Height of options in the wallpaper quick switch widget. -->
- <dimen name="wallpaper_quick_switch_selected_option_height">98dp</dimen>
+ <dimen name="wallpaper_quick_switch_selected_option_height">86dp</dimen>
<!-- Maximumn width non-selected options in the wallpaper quick switch widget. -->
<dimen name="wallpaper_quick_switch_max_option_width">@dimen/wallpaper_quick_switch_selected_option_height</dimen>
@@ -288,8 +305,21 @@
<dimen name="spacing_10dp">10dp</dimen>
<!-- Horizontal padding around the "duo tabs" at the top of the screen. -->
- <dimen name="tab_container_horizontal_padding">24dp</dimen>
+ <dimen name="tab_container_horizontal_padding">16dp</dimen>
+
+ <!-- Top margin for the "duo tabs" tab buttons -->
+ <dimen name="tab_container_top_margin">8dp</dimen>
+
+ <!-- Bottom margin for the "duo tabs" tab buttons -->
+ <dimen name="tab_container_bottom_margin">12dp</dimen>
+
<!-- Size for option items. -->
<dimen name="option_item_size">74dp</dimen>
+
+ <!-- Screen preview section -->
+ <dimen name="screen_preview_section_vertical_space">12dp</dimen>
+
+ <!-- Dimensions for labeled grid item image -->
+ <dimen name="labeled_grid_item_image_card_elevation">0dp</dimen>
</resources>
diff --git a/res/drawable/vertical_divider_24dp.xml b/res/values/integers.xml
similarity index 68%
copy from res/drawable/vertical_divider_24dp.xml
copy to res/values/integers.xml
index 22b61ad..ea5bb91 100644
--- a/res/drawable/vertical_divider_24dp.xml
+++ b/res/values/integers.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2021 The Android Open Source Project
+ Copyright (C) 2023 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.
@@ -14,8 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <size
- android:height="24dp"
- android:width="0dp" />
-</shape>
\ No newline at end of file
+<resources>
+ <integer name="rows_creative_category">2</integer>
+ <!-- Padding value for creative category individual item -->
+ <integer name="creative_category_individual_item_padding">15</integer>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0f439c8..e9e825c 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -56,6 +56,13 @@
screen [CHAR LIMIT=100] -->
<string name="wallpaper_destination_both">Home & Lock screen</string>
+ <!-- Label indicating the title for block that allows user to select a on-device
+ wallpaper in the WallpaperPicker screen [CHAR LIMIT=100] -->
+ <string name="choose_a_wallpaper_section_title">Choose a Wallpaper</string>
+
+ <!-- Label indicating the title for Creative Wallpapers block in the WallpaperPicker screen [CHAR LIMIT=100] -->
+ <string name="creative_wallpaper_title">Create a Wallpaper</string>
+
<!-- Label referring to the home screen of the device, i.e. shown behind the launcher.
[CHAR LIMIT=30] -->
<string name="home_screen_message">Home screen</string>
@@ -290,7 +297,7 @@
third_party_app_wallpapers
</string>
- <!-- Label for a checkbox which lets user preview the displayed image as wallpaper. [CHAR LIMIT=30] -->
+ <!-- Title for the toolbar when displaying a wallpaper preview. [CHAR LIMIT=30] -->
<string name="preview">Preview</string>
<!-- Label for the 'Info' tab of view pager in wallpaper preview activity. [CHAR_LIMIT=25] -->
@@ -359,6 +366,9 @@
<!-- Error message of the wallpaper's collection doesn't exist. [CHAR_LIMIT=NONE] -->
<string name="collection_not_exist_msg">The collection doesn\'t exist</string>
+ <!-- Error message advising user to exit our of split screen in order to see preview. [CHAR_LIMIT=NONE] -->
+ <string name="wallpaper_exit_split_screen">Please exit split screen mode and try again</string>
+
<!-- Label for a cancel button of a dialog. [CHAR LIMIT=30] -->
<string name="cancel">Cancel</string>
@@ -458,5 +468,5 @@
[CHAR LIMIT=128].
-->
- <string name="more_wallpapers">More Wallpapers</string>
+ <string name="more_wallpapers">More wallpapers</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index ae7f393..5bc4d7e 100755
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -110,6 +110,13 @@
<item name="android:letterSpacing">0.02</item>
</style>
+ <style name="CategorySectionTitleTextAppearance" parent="TitleTextAppearance">
+ <item name="android:textStyle" />
+ <item name="textAllCaps">false</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:textFontWeight">500</item>
+ </style>
+
<!-- Individual components / Widgets -->
<style name="OutlinedButtonStyle" parent="@android:style/Widget.DeviceDefault.Button">
<item name="android:background">@drawable/btn_transparent</item>
@@ -195,6 +202,15 @@
<item name="android:lineHeight">@dimen/option_title_line_height</item>
</style>
+ <!-- Labeled tiles -->
+ <style name="GridLabelTextAppearance" parent="TitleTextAppearance">
+ <item name="android:textColor">@color/text_color_light</item>
+ <item name="android:textAlignment">center</item>
+ <item name="android:textSize">@dimen/grid_label_font_text_size</item>
+ <item name="android:lineHeight">@dimen/grid_label_line_height</item>
+ <item name="android:textAllCaps">false</item>
+ </style>
+
<!-- Preview header -->
<style name="PreviewHeaderStyle">
<item name="android:paddingBottom">?android:attr/actionBarSize</item>
diff --git a/src/com/android/wallpaper/asset/Asset.java b/src/com/android/wallpaper/asset/Asset.java
index 122c379..436252d 100755
--- a/src/com/android/wallpaper/asset/Asset.java
+++ b/src/com/android/wallpaper/asset/Asset.java
@@ -344,7 +344,7 @@
@Override
public void onError(@Nullable Throwable e) {
-
+ loadDrawable(activity, imageView, placeholderColor);
}
});
});
diff --git a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
index 08486a1..c1ef1a7 100755
--- a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
+++ b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
@@ -90,9 +90,7 @@
// Live wallpaper components may or may not specify a thumbnail drawable.
if (thumb instanceof BitmapDrawable) {
- decodeBitmapCompleted(receiver,
- Bitmap.createScaledBitmap(((BitmapDrawable) thumb).getBitmap(), targetWidth,
- targetHeight, true));
+ decodeBitmapCompleted(receiver, ((BitmapDrawable) thumb).getBitmap());
return;
} else if (thumb != null) {
Bitmap bitmap;
diff --git a/src/com/android/wallpaper/model/Category.java b/src/com/android/wallpaper/model/Category.java
index beb349f..10e16c7 100755
--- a/src/com/android/wallpaper/model/Category.java
+++ b/src/com/android/wallpaper/model/Category.java
@@ -46,6 +46,13 @@
}
/**
+ * Returns whether user created wallpapers are supported or not.
+ */
+ public boolean supportsUserCreatedWallpapers() {
+ return false;
+ }
+
+ /**
* Shows the UI for picking wallpapers within this category.
*
* @param srcActivity
diff --git a/src/com/android/wallpaper/model/CategoryProvider.java b/src/com/android/wallpaper/model/CategoryProvider.java
index 971501f..401b2bb 100755
--- a/src/com/android/wallpaper/model/CategoryProvider.java
+++ b/src/com/android/wallpaper/model/CategoryProvider.java
@@ -70,6 +70,11 @@
boolean resetIfNeeded();
/**
+ * Checks if creative category collection is available or not.
+ */
+ boolean isCreativeCategoryAvailable();
+
+ /**
* Checks if featured collection available.
*/
boolean isFeaturedCollectionAvailable();
diff --git a/src/com/android/wallpaper/model/CustomizationSectionController.kt b/src/com/android/wallpaper/model/CustomizationSectionController.kt
index 76c140e..766b89f 100644
--- a/src/com/android/wallpaper/model/CustomizationSectionController.kt
+++ b/src/com/android/wallpaper/model/CustomizationSectionController.kt
@@ -83,7 +83,4 @@
/** Gets called when the section gets transitioned out. */
@JvmDefault fun onTransitionOut() = Unit
-
- /** Notifies when the screen was switched. */
- @JvmDefault fun onScreenSwitched(isOnLockScreen: Boolean) = Unit
}
diff --git a/src/com/android/wallpaper/model/LiveWallpaperInfo.java b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
index bc1f366..e0ea4fc 100755
--- a/src/com/android/wallpaper/model/LiveWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
@@ -329,6 +329,10 @@
| ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0;
}
+ public void setVisibleTitle(boolean visibleTitle) {
+ mVisibleTitle = visibleTitle;
+ }
+
@Override
public String getTitle(Context context) {
if (mVisibleTitle) {
diff --git a/src/com/android/wallpaper/model/PlaceholderCategory.java b/src/com/android/wallpaper/model/PlaceholderCategory.java
index 76070d0..18fb5a9 100644
--- a/src/com/android/wallpaper/model/PlaceholderCategory.java
+++ b/src/com/android/wallpaper/model/PlaceholderCategory.java
@@ -44,4 +44,5 @@
public Asset getThumbnail(Context context) {
return null;
}
+
}
diff --git a/src/com/android/wallpaper/model/WallpaperSectionController.java b/src/com/android/wallpaper/model/WallpaperSectionController.java
index d61330e..7ced7f8 100644
--- a/src/com/android/wallpaper/model/WallpaperSectionController.java
+++ b/src/com/android/wallpaper/model/WallpaperSectionController.java
@@ -353,9 +353,12 @@
}
private void showPermissionNeededDialog() {
+ if (mActivity == null) {
+ return;
+ }
String permissionNeededMessage = mAppContext.getResources().getString(
R.string.permission_needed_explanation_go_to_settings);
- AlertDialog dialog = new AlertDialog.Builder(mAppContext, R.style.LightDialogTheme)
+ AlertDialog dialog = new AlertDialog.Builder(mActivity, R.style.LightDialogTheme)
.setMessage(permissionNeededMessage)
.setPositiveButton(android.R.string.ok, /* onClickListener= */ null)
.setNegativeButton(
@@ -690,15 +693,12 @@
@Override
public void onTransitionOut() {
if (mHomeWallpaperSurface != null) {
- mHomeWallpaperSurface.setUseAlpha();
mHomeWallpaperSurface.setAlpha(0f);
}
if (mLockWallpaperSurface != null) {
- mLockWallpaperSurface.setUseAlpha();
mLockWallpaperSurface.setAlpha(0f);
}
if (mWorkspaceSurface != null) {
- mWorkspaceSurface.setUseAlpha();
mWorkspaceSurface.setAlpha(0f);
}
if (mLockPreviewContainer != null) {
diff --git a/src/com/android/wallpaper/module/CustomizationSections.java b/src/com/android/wallpaper/module/CustomizationSections.java
index 5fa62f7..44ba911 100644
--- a/src/com/android/wallpaper/module/CustomizationSections.java
+++ b/src/com/android/wallpaper/module/CustomizationSections.java
@@ -12,7 +12,7 @@
import com.android.wallpaper.model.WallpaperColorsViewModel;
import com.android.wallpaper.model.WallpaperPreviewNavigator;
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor;
-import com.android.wallpaper.picker.customization.ui.viewmodel.WallpaperQuickSwitchViewModel;
+import com.android.wallpaper.picker.customization.ui.viewmodel.CustomizationPickerViewModel;
import com.android.wallpaper.util.DisplayUtils;
import java.util.List;
@@ -46,7 +46,7 @@
@Nullable Bundle savedInstanceState,
CurrentWallpaperInfoFactory wallpaperInfoFactory,
DisplayUtils displayUtils,
- WallpaperQuickSwitchViewModel wallpaperQuickSwitchViewModel,
+ CustomizationPickerViewModel customizationPickerViewModel,
WallpaperInteractor wallpaperInteractor);
/**
diff --git a/src/com/android/wallpaper/module/DefaultCategoryProvider.java b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
index 6ba9f6a..72ee907 100755
--- a/src/com/android/wallpaper/module/DefaultCategoryProvider.java
+++ b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
@@ -67,11 +67,14 @@
* Relative category priorities. Lower numbers correspond to higher priorities (i.e., should
* appear higher in the categories list).
*/
- protected static final int PRIORITY_MY_PHOTOS = 1;
+ public static final int PRIORITY_MY_PHOTOS_WHEN_CREATIVE_WALLPAPERS_DISABLED = 1;
+ private static final int PRIORITY_MY_PHOTOS_WHEN_CREATIVE_WALLPAPERS_ENABLED = 51;
private static final int PRIORITY_SYSTEM = 100;
private static final int PRIORITY_ON_DEVICE = 200;
private static final int PRIORITY_LIVE = 300;
private static final int PRIORITY_THIRD_PARTY = 400;
+ public static final int CREATIVE_CATEGORY_PRIORITY = 1;
+
protected static List<Category> sSystemCategories;
protected final Context mAppContext;
@@ -150,11 +153,42 @@
return false;
}
+ /**
+ * This function returns the value of priority of MyPhotos depending on whether
+ * the CreativeWallpaperFlag is enabled or not
+ * @param context
+ * @return the value of priority of MyPhotos
+ */
+ public static int getPriorityMyPhotos(Context context) {
+ boolean isCreativeWallpaperFlagEnabled = InjectorProvider.getInjector().getFlags()
+ .isAIWallpaperEnabled(context);
+ if (isCreativeWallpaperFlagEnabled) {
+ return PRIORITY_MY_PHOTOS_WHEN_CREATIVE_WALLPAPERS_ENABLED;
+ } else
+ return PRIORITY_MY_PHOTOS_WHEN_CREATIVE_WALLPAPERS_DISABLED;
+ }
+
+ /**
+ * Returns an appropriate "my photos" custom photo category for the given device form factor.
+ */
+ private static Category getMyPhotosCategory(Context context) {
+ return new ImageCategory(
+ context.getString(R.string.my_photos_category_title),
+ context.getString(R.string.image_wallpaper_collection_id),
+ getPriorityMyPhotos(context),
+ R.drawable.wallpaperpicker_emptystate /* overlayIconResId */);
+ }
+
@Override
public boolean isFeaturedCollectionAvailable() {
return false;
}
+ @Override
+ public boolean isCreativeCategoryAvailable() {
+ return false;
+ }
+
protected void doFetch(final CategoryReceiver receiver, boolean forceRefresh) {
CategoryReceiver delegatingReceiver = new CategoryReceiver() {
@Override
@@ -197,7 +231,7 @@
mAppContext);
// "My photos" wallpapers
- publishProgress(getMyPhotosCategory());
+ publishProgress(getMyPhotosCategory(mAppContext));
publishDeviceCategories();
@@ -372,17 +406,6 @@
PRIORITY_ON_DEVICE);
}
- /**
- * Returns an appropriate "my photos" custom photo category for the given device form factor.
- */
- private Category getMyPhotosCategory() {
- return new ImageCategory(
- mAppContext.getString(R.string.my_photos_category_title),
- mAppContext.getString(R.string.image_wallpaper_collection_id),
- PRIORITY_MY_PHOTOS,
- R.drawable.wallpaperpicker_emptystate /* overlayIconResId */);
- }
-
@Override
protected void onProgressUpdate(Category... values) {
super.onProgressUpdate(values);
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
index fdfc9be..fcefbd3 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -358,13 +358,12 @@
public boolean finalizeWallpaperForNextRotation(List<String> attributions, String actionUrl,
int actionLabelRes, int actionIconRes, String collectionId, int wallpaperId) {
return saveStaticWallpaperMetadata(attributions, actionUrl, actionLabelRes,
- actionIconRes, collectionId, wallpaperId);
+ actionIconRes, collectionId, wallpaperId, DEST_HOME_SCREEN);
}
/**
* Sets wallpaper image and attributions when a static wallpaper is responsible for presenting
- * the
- * current "daily wallpaper".
+ * the current "daily wallpaper".
*/
private boolean setWallpaperInRotationStatic(Bitmap wallpaperBitmap, List<String> attributions,
String actionUrl, int actionLabelRes, int actionIconRes, String collectionId) {
@@ -376,7 +375,7 @@
}
return saveStaticWallpaperMetadata(attributions, actionUrl, actionLabelRes,
- actionIconRes, collectionId, wallpaperId);
+ actionIconRes, collectionId, wallpaperId, DEST_HOME_SCREEN);
}
@Override
@@ -385,32 +384,32 @@
int actionLabelRes,
int actionIconRes,
String collectionId,
- int wallpaperId) {
- mWallpaperPreferences.clearHomeWallpaperMetadata();
+ int wallpaperId,
+ @Destination int destination) {
+ if (destination == DEST_HOME_SCREEN || destination == DEST_BOTH) {
+ mWallpaperPreferences.clearHomeWallpaperMetadata();
- boolean isLockWallpaperSet = isSeparateLockScreenWallpaperSet();
+ // Persist wallpaper IDs if the rotating wallpaper component
+ mWallpaperPreferences.setHomeWallpaperManagerId(wallpaperId);
- // Persist wallpaper IDs if the rotating wallpaper component
- mWallpaperPreferences.setHomeWallpaperManagerId(wallpaperId);
+ // Only copy over wallpaper ID to lock wallpaper if no explicit lock wallpaper is set
+ // (so metadata isn't lost if a user explicitly sets a home-only wallpaper).
- // Only copy over wallpaper ID to lock wallpaper if no explicit lock wallpaper is set
- // (so metadata isn't lost if a user explicitly sets a home-only wallpaper).
- if (!isLockWallpaperSet) {
- mWallpaperPreferences.setLockWallpaperId(wallpaperId);
+ mWallpaperPreferences.setHomeWallpaperAttributions(attributions);
+ mWallpaperPreferences.setHomeWallpaperActionUrl(actionUrl);
+ mWallpaperPreferences.setHomeWallpaperActionLabelRes(actionLabelRes);
+ mWallpaperPreferences.setHomeWallpaperActionIconRes(actionIconRes);
+ // Only set base image URL for static Backdrop images, not for rotation.
+ mWallpaperPreferences.setHomeWallpaperBaseImageUrl(null);
+ mWallpaperPreferences.setHomeWallpaperCollectionId(collectionId);
}
-
- mWallpaperPreferences.setHomeWallpaperAttributions(attributions);
- mWallpaperPreferences.setHomeWallpaperActionUrl(actionUrl);
- mWallpaperPreferences.setHomeWallpaperActionLabelRes(actionLabelRes);
- mWallpaperPreferences.setHomeWallpaperActionIconRes(actionIconRes);
- // Only set base image URL for static Backdrop images, not for rotation.
- mWallpaperPreferences.setHomeWallpaperBaseImageUrl(null);
- mWallpaperPreferences.setHomeWallpaperCollectionId(collectionId);
-
// Set metadata to lock screen also when the rotating wallpaper so if user sets a home
// screen-only wallpaper later, these attributions will still be available.
- if (!isLockWallpaperSet) {
+ if (destination == DEST_LOCK_SCREEN || destination == DEST_BOTH
+ || !isSeparateLockScreenWallpaperSet()) {
+ mWallpaperPreferences.clearLockWallpaperMetadata();
+ mWallpaperPreferences.setLockWallpaperId(wallpaperId);
mWallpaperPreferences.setLockWallpaperAttributions(attributions);
mWallpaperPreferences.setLockWallpaperActionUrl(actionUrl);
mWallpaperPreferences.setLockWallpaperActionLabelRes(actionLabelRes);
@@ -556,25 +555,10 @@
}
/**
- * Returns whether a separate lock-screen (static) wallpaper is set to the WallpaperManager.
+ * Returns whether a separate lock-screen wallpaper is set to the WallpaperManager.
*/
private boolean isSeparateLockScreenWallpaperSet() {
- ParcelFileDescriptor lockWallpaperFile =
- mWallpaperManagerCompat.getWallpaperFile(WallpaperManagerCompat.FLAG_LOCK);
-
- boolean isLockWallpaperSet = false;
-
- if (lockWallpaperFile != null) {
- isLockWallpaperSet = true;
-
- try {
- lockWallpaperFile.close();
- } catch (IOException e) {
- Log.e(TAG, "Unable to close PFD for lock wallpaper", e);
- }
- }
-
- return isLockWallpaperSet;
+ return mWallpaperManager.getWallpaperId(WallpaperManager.FLAG_LOCK) < 0;
}
@Override
@@ -850,6 +834,16 @@
Bitmap lockBitmap = getLockWallpaperBitmap();
if (lockBitmap != null) {
saveLockWallpaperHashCode(lockBitmap);
+ }
+
+ // If the destination is both, use the home screen bitmap to populate the lock screen
+ // recents list.
+ if (lockBitmap == null
+ && lockWallpaperId == mWallpaperPreferences.getHomeWallpaperManagerId()) {
+ lockBitmap = mBitmap;
+ }
+
+ if (lockBitmap != null) {
mWallpaperPreferences.storeLatestWallpaper(FLAG_LOCK,
TextUtils.isEmpty(mWallpaper.getWallpaperId())
? String.valueOf(mWallpaperPreferences.getLockWallpaperHashCode())
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java b/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
index 6f945a9..4d8f3e3 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPreferences.java
@@ -358,6 +358,22 @@
.apply();
}
+ @Override
+ @Nullable
+ public String getHomeWallpaperRecentsKey() {
+ return mNoBackupPrefs.getString(
+ NoBackupKeys.KEY_HOME_WALLPAPER_RECENTS_KEY,
+ WallpaperPreferences.generateRecentsKey(getHomeWallpaperRemoteId(),
+ getHomeWallpaperHashCode()));
+ }
+
+ @Override
+ public void setHomeWallpaperRecentsKey(String recentsKey) {
+ mNoBackupPrefs.edit().putString(
+ NoBackupKeys.KEY_HOME_WALLPAPER_RECENTS_KEY, recentsKey)
+ .apply();
+ }
+
@Nullable
@Override
public String getHomeWallpaperRemoteId() {
@@ -476,6 +492,22 @@
}
@Override
+ @Nullable
+ public String getLockWallpaperRecentsKey() {
+ return mNoBackupPrefs.getString(
+ NoBackupKeys.KEY_LOCK_WALLPAPER_RECENTS_KEY,
+ WallpaperPreferences.generateRecentsKey(getLockWallpaperRemoteId(),
+ getLockWallpaperHashCode()));
+ }
+
+ @Override
+ public void setLockWallpaperRecentsKey(String recentsKey) {
+ mNoBackupPrefs.edit().putString(
+ NoBackupKeys.KEY_LOCK_WALLPAPER_RECENTS_KEY, recentsKey)
+ .apply();
+ }
+
+ @Override
public String getLockWallpaperRemoteId() {
return mNoBackupPrefs.getString(
NoBackupKeys.KEY_LOCK_WALLPAPER_REMOTE_ID, null);
diff --git a/src/com/android/wallpaper/module/Injector.kt b/src/com/android/wallpaper/module/Injector.kt
index 37b2c20..bfd2b02 100755
--- a/src/com/android/wallpaper/module/Injector.kt
+++ b/src/com/android/wallpaper/module/Injector.kt
@@ -34,12 +34,20 @@
import com.android.wallpaper.picker.undo.domain.interactor.SnapshotRestorer
import com.android.wallpaper.picker.undo.domain.interactor.UndoInteractor
import com.android.wallpaper.util.DisplayUtils
+import kotlinx.coroutines.CoroutineScope
/**
* Interface for a provider of "injected dependencies." (NOTE: The term "injector" is somewhat of a
* misnomer; this is more aptly a service registry as part of a service locator design pattern.)
*/
interface Injector {
+ /**
+ * Returns a [CoroutineScope] that's bound to the lifecycle of the application.
+ *
+ * It starts immediately and is never paused, stopped, or destroyed.
+ */
+ fun getApplicationCoroutineScope(): CoroutineScope
+
fun getAlarmManagerWrapper(context: Context): AlarmManagerWrapper
fun getBitmapCropper(): BitmapCropper
diff --git a/src/com/android/wallpaper/module/LargeScreenMultiPanesChecker.kt b/src/com/android/wallpaper/module/LargeScreenMultiPanesChecker.kt
index 5b4e5ec..d710fc4 100644
--- a/src/com/android/wallpaper/module/LargeScreenMultiPanesChecker.kt
+++ b/src/com/android/wallpaper/module/LargeScreenMultiPanesChecker.kt
@@ -20,6 +20,7 @@
import android.content.Intent.ACTION_SET_WALLPAPER
import android.content.pm.PackageManager.MATCH_DEFAULT_ONLY
import android.provider.Settings.*
+import com.android.wallpaper.util.DisplayUtils
/** Utility class to check the support of multi panes integration (trampoline) */
class LargeScreenMultiPanesChecker : MultiPanesChecker {
@@ -33,8 +34,8 @@
val intent =
getMultiPanesIntent(Intent(ACTION_SET_WALLPAPER).setPackage(context.packageName))
- val resolveInfo = pm.resolveActivity(intent, MATCH_DEFAULT_ONLY)?.activityInfo?.enabled
- return resolveInfo != null
+ val resolveInfo = pm.resolveActivity(intent, MATCH_DEFAULT_ONLY)?.activityInfo
+ return resolveInfo != null && DisplayUtils(context).isLargeScreenDevice()
}
override fun getMultiPanesIntent(intent: Intent): Intent {
diff --git a/src/com/android/wallpaper/module/WallpaperPersister.java b/src/com/android/wallpaper/module/WallpaperPersister.java
index 9b5cae8..a9f2df9 100755
--- a/src/com/android/wallpaper/module/WallpaperPersister.java
+++ b/src/com/android/wallpaper/module/WallpaperPersister.java
@@ -139,7 +139,9 @@
int actionLabelRes,
int actionIconRes,
String collectionId,
- int wallpaperId);
+ int wallpaperId,
+ @Destination int destination
+ );
/**
* @return the flag indicating which wallpaper to set when we're trying to set a wallpaper with
diff --git a/src/com/android/wallpaper/module/WallpaperPicker2Injector.kt b/src/com/android/wallpaper/module/WallpaperPicker2Injector.kt
index db560c4..0a23d6b 100755
--- a/src/com/android/wallpaper/module/WallpaperPicker2Injector.kt
+++ b/src/com/android/wallpaper/module/WallpaperPicker2Injector.kt
@@ -45,10 +45,11 @@
import com.android.wallpaper.settings.data.repository.SecureSettingsRepository
import com.android.wallpaper.settings.data.repository.SecureSettingsRepositoryImpl
import com.android.wallpaper.util.DisplayUtils
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.GlobalScope
-open class WallpaperPicker2Injector() : Injector {
+open class WallpaperPicker2Injector : Injector {
+ private var appScope: CoroutineScope? = null
private var alarmManagerWrapper: AlarmManagerWrapper? = null
private var bitmapCropper: BitmapCropper? = null
private var categoryProvider: CategoryProvider? = null
@@ -79,6 +80,10 @@
private var secureSettingsRepository: SecureSettingsRepository? = null
private var wallpaperColorsViewModel: WallpaperColorsViewModel? = null
+ override fun getApplicationCoroutineScope(): CoroutineScope {
+ return appScope ?: CoroutineScope(Dispatchers.Main).also { appScope = it }
+ }
+
@Synchronized
override fun getAlarmManagerWrapper(context: Context): AlarmManagerWrapper {
return alarmManagerWrapper
@@ -278,9 +283,12 @@
override fun getUndoInteractor(context: Context): UndoInteractor {
return undoInteractor
- ?: UndoInteractor(GlobalScope, UndoRepository(), getSnapshotRestorers(context)).also {
- undoInteractor = it
- }
+ ?: UndoInteractor(
+ getApplicationCoroutineScope(),
+ UndoRepository(),
+ getSnapshotRestorers(context),
+ )
+ .also { undoInteractor = it }
}
override fun getWallpaperInteractor(context: Context): WallpaperInteractor {
@@ -288,8 +296,9 @@
?: WallpaperInteractor(
repository =
WallpaperRepository(
- scope = GlobalScope,
+ scope = getApplicationCoroutineScope(),
client = WallpaperClientImpl(context = context),
+ wallpaperPreferences = getPreferences(context = context),
backgroundDispatcher = Dispatchers.IO,
),
)
@@ -299,7 +308,7 @@
override fun getWallpaperSnapshotRestorer(context: Context): WallpaperSnapshotRestorer {
return wallpaperSnapshotRestorer
?: WallpaperSnapshotRestorer(
- scope = GlobalScope,
+ scope = getApplicationCoroutineScope(),
interactor = getWallpaperInteractor(context),
)
.also { wallpaperSnapshotRestorer = it }
diff --git a/src/com/android/wallpaper/module/WallpaperPickerSections.java b/src/com/android/wallpaper/module/WallpaperPickerSections.java
index a77bf2e..1ebe769 100644
--- a/src/com/android/wallpaper/module/WallpaperPickerSections.java
+++ b/src/com/android/wallpaper/module/WallpaperPickerSections.java
@@ -15,7 +15,7 @@
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor;
import com.android.wallpaper.picker.customization.ui.section.ScreenPreviewSectionController;
import com.android.wallpaper.picker.customization.ui.section.WallpaperQuickSwitchSectionController;
-import com.android.wallpaper.picker.customization.ui.viewmodel.WallpaperQuickSwitchViewModel;
+import com.android.wallpaper.picker.customization.ui.viewmodel.CustomizationPickerViewModel;
import com.android.wallpaper.util.DisplayUtils;
import java.util.ArrayList;
@@ -36,7 +36,7 @@
@Nullable Bundle savedInstanceState,
CurrentWallpaperInfoFactory wallpaperInfoFactory,
DisplayUtils displayUtils,
- WallpaperQuickSwitchViewModel wallpaperQuickSwitchViewModel,
+ CustomizationPickerViewModel customizationPickerViewModel,
WallpaperInteractor wallpaperInteractor) {
List<CustomizationSectionController<?>> sectionControllers = new ArrayList<>();
@@ -48,12 +48,12 @@
wallpaperInfoFactory,
wallpaperColorsViewModel,
displayUtils,
- sectionNavigationController,
+ wallpaperPreviewNavigator,
wallpaperInteractor));
sectionControllers.add(
new WallpaperQuickSwitchSectionController(
screen,
- wallpaperQuickSwitchViewModel,
+ customizationPickerViewModel.getWallpaperQuickSwitchViewModel(screen),
lifecycleOwner,
sectionNavigationController));
diff --git a/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java b/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
index 12929bc..0f4364b 100755
--- a/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
+++ b/src/com/android/wallpaper/module/WallpaperPreferenceKeys.java
@@ -51,9 +51,11 @@
String KEY_HOME_WALLPAPER_BASE_IMAGE_URL =
"home_wallpaper_base_image_url";
String KEY_HOME_WALLPAPER_MANAGER_ID = "home_wallpaper_id";
+ String KEY_HOME_WALLPAPER_RECENTS_KEY = "home_wallpaper_recents_key";
String KEY_HOME_WALLPAPER_REMOTE_ID = "home_wallpaper_remote_id";
String KEY_HOME_WALLPAPER_BACKING_FILE = "home_wallpaper_backing_file";
String KEY_LOCK_WALLPAPER_MANAGER_ID = "lock_wallpaper_id";
+ String KEY_LOCK_WALLPAPER_RECENTS_KEY = "lock_wallpaper_recents_key";
String KEY_LOCK_WALLPAPER_REMOTE_ID = "lock_wallpaper_remote_id";
String KEY_LOCK_WALLPAPER_BACKING_FILE = "lock_wallpaper_backing_file";
String KEY_DAILY_ROTATION_TIMESTAMPS = "daily_rotation_timestamps";
diff --git a/src/com/android/wallpaper/module/WallpaperPreferences.java b/src/com/android/wallpaper/module/WallpaperPreferences.java
index 30bcd72..9edef07 100755
--- a/src/com/android/wallpaper/module/WallpaperPreferences.java
+++ b/src/com/android/wallpaper/module/WallpaperPreferences.java
@@ -20,6 +20,7 @@
import android.app.WallpaperManager.SetWallpaperFlags;
import android.graphics.Bitmap;
import android.os.Build;
+import android.text.TextUtils;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
@@ -175,6 +176,17 @@
void setHomeWallpaperRemoteId(String wallpaperRemoteId);
/**
+ * Gets the home wallpaper's identifier used to index into the list of recent wallpapers.
+ */
+ @Nullable
+ String getHomeWallpaperRecentsKey();
+
+ /**
+ * Sets the home wallpaper's identifier used to index into the list of recent wallpapers.
+ */
+ void setHomeWallpaperRecentsKey(String recentsKey);
+
+ /**
* Gets the home wallpaper's effects.
*/
String getHomeWallpaperEffects();
@@ -299,6 +311,17 @@
void setLockWallpaperRemoteId(String wallpaperRemoteId);
/**
+ * Gets lock home wallpaper's identifier used to index into the list of recent wallpapers.
+ */
+ @Nullable
+ String getLockWallpaperRecentsKey();
+
+ /**
+ * Sets lock home wallpaper's identifier used to index into the list of recent wallpapers.
+ */
+ void setLockWallpaperRecentsKey(String recentsKey);
+
+ /**
* Gets the lock wallpaper's effects.
*/
String getLockWallpaperEffects();
@@ -599,4 +622,24 @@
@NonNull Bitmap croppedWallpaperBitmap, WallpaperColors colors) {
// Do nothing in the default case.
}
+
+ /**
+ * Generates a default key to look up a wallpaper in the list of recent wallpapers.
+ *
+ * <p>This key can be used as a fallback when {@link #getHomeWallpaperRecentsKey()} or
+ * {@link #getLockWallpaperRecentsKey()} return null.
+ * @param remoteId wallpaper's remote id
+ * @param hashCode wallpaper's hash code
+ * @return the recents key
+ */
+ @Nullable
+ static String generateRecentsKey(@Nullable String remoteId, long hashCode) {
+ if (!TextUtils.isEmpty(remoteId)) {
+ return remoteId;
+ } else if (hashCode > 0) {
+ return String.valueOf(hashCode);
+ } else {
+ return null;
+ }
+ }
}
diff --git a/src/com/android/wallpaper/picker/AppbarFragment.java b/src/com/android/wallpaper/picker/AppbarFragment.java
index 749ba0e..029a758 100644
--- a/src/com/android/wallpaper/picker/AppbarFragment.java
+++ b/src/com/android/wallpaper/picker/AppbarFragment.java
@@ -112,9 +112,7 @@
mTitleView = mToolbar.findViewById(R.id.custom_toolbar_title);
// Update toolbar and status bar color.
- mToolbar.setBackgroundResource(getToolbarColorId());
- getActivity().getWindow().setStatusBarColor(
- getActivity().getResources().getColor(getToolbarColorId()));
+ setToolbarColor(getToolbarColorId());
CharSequence title;
if (getArguments() != null) {
@@ -186,6 +184,12 @@
setUpToolbarMenu(menuResId);
}
+ protected void setToolbarColor(int colorId) {
+ mToolbar.setBackgroundResource(colorId);
+ getActivity().getWindow().setStatusBarColor(
+ getActivity().getResources().getColor(colorId));
+ }
+
/**
* Provides a title for this Fragment's toolbar to be used if none is found in
* {@link #getArguments()}.
diff --git a/src/com/android/wallpaper/picker/CategorySelectorFragment.java b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
index fe36592..85a514e 100644
--- a/src/com/android/wallpaper/picker/CategorySelectorFragment.java
+++ b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
@@ -29,12 +29,14 @@
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
+import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -77,6 +79,7 @@
private static final int NUM_NON_CATEGORY_VIEW_HOLDERS = 0;
private static final int SETTINGS_APP_INFO_REQUEST_CODE = 1;
private static final String TAG = "CategorySelectorFragment";
+ private static final String IMAGE_WALLPAPER_COLLECTION_ID = "image_wallpapers";
/**
* Interface to be implemented by an Fragment hosting a {@link CategorySelectorFragment}
@@ -121,17 +124,27 @@
private RecyclerView mImageGrid;
private CategoryAdapter mAdapter;
+ private GroupedCategoryAdapter mGroupedCategoryAdapter;
private CategoryProvider mCategoryProvider;
private ArrayList<Category> mCategories = new ArrayList<>();
private Point mTileSizePx;
private boolean mAwaitingCategories;
+ private ArrayList<Category> mCreativeCategories = new ArrayList<>();
private boolean mIsFeaturedCollectionAvailable;
+ private boolean mIsCreativeCategoryCollectionAvailable;
+ private boolean mIsCreativeWallpaperEnabled = false;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- mAdapter = new CategoryAdapter(mCategories);
mCategoryProvider = InjectorProvider.getInjector().getCategoryProvider(requireContext());
+ mIsCreativeWallpaperEnabled = InjectorProvider.getInjector()
+ .getFlags().isAIWallpaperEnabled(requireContext());
+ if (mIsCreativeWallpaperEnabled) {
+ mGroupedCategoryAdapter = new GroupedCategoryAdapter(mCategories);
+ } else {
+ mAdapter = new CategoryAdapter(mCategories);
+ }
}
@Nullable
@@ -146,12 +159,24 @@
mTileSizePx = SizeCalculator.getCategoryTileSize(getActivity());
- mImageGrid.setAdapter(mAdapter);
+ // In case CreativeWallpapers are enabled, it means we want to show the new view
+ // in the picker for which we have made a new adaptor
+ if (mIsCreativeWallpaperEnabled) {
+ mImageGrid.setAdapter(mGroupedCategoryAdapter);
+ GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),
+ getNumColumns()
+ * GroupedCategorySpanSizeLookup.DEFAULT_CATEGORY_SPAN_SIZE);
+ gridLayoutManager.setSpanSizeLookup(new
+ GroupedCategorySpanSizeLookup(mGroupedCategoryAdapter));
+ mImageGrid.setLayoutManager(gridLayoutManager);
+ } else {
+ mImageGrid.setAdapter(mAdapter);
+ GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),
+ getNumColumns() * CategorySpanSizeLookup.DEFAULT_CATEGORY_SPAN_SIZE);
+ gridLayoutManager.setSpanSizeLookup(new CategorySpanSizeLookup(mAdapter));
+ mImageGrid.setLayoutManager(gridLayoutManager);
+ }
- GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),
- getNumColumns() * CategorySpanSizeLookup.DEFAULT_CATEGORY_SPAN_SIZE);
- gridLayoutManager.setSpanSizeLookup(new CategorySpanSizeLookup(mAdapter));
- mImageGrid.setLayoutManager(gridLayoutManager);
mImageGrid.setAccessibilityDelegateCompat(
new WallpaperPickerRecyclerViewAccessibilityDelegate(
mImageGrid, (BottomSheetHost) getParentFragment(), getNumColumns()));
@@ -192,28 +217,60 @@
void addCategory(Category category, boolean loading) {
// If not previously waiting for categories, enter the waiting state by showing the loading
// indicator.
- if (loading && !mAwaitingCategories) {
- mAdapter.notifyItemChanged(getNumColumns());
- mAdapter.notifyItemInserted(getNumColumns());
- mAwaitingCategories = true;
- }
- // Not add existing category to category list
- if (mCategories.indexOf(category) >= 0) {
- updateCategory(category);
- return;
- }
+ if (mIsCreativeWallpaperEnabled) {
+ if (loading && !mAwaitingCategories) {
+ mGroupedCategoryAdapter.notifyItemChanged(getNumColumns());
+ mGroupedCategoryAdapter.notifyItemInserted(getNumColumns());
+ mAwaitingCategories = true;
+ }
+ // Not add existing category to category list
+ if (mCategories.indexOf(category) >= 0) {
+ updateCategory(category);
+ return;
+ }
- int priority = category.getPriority();
+ int priority = category.getPriority();
+ if (category.supportsUserCreatedWallpapers()) {
+ mCreativeCategories.add(category);
+ }
- int index = 0;
- while (index < mCategories.size() && priority >= mCategories.get(index).getPriority()) {
- index++;
- }
+ int index = 0;
+ while (index < mCategories.size() && priority >= mCategories.get(index).getPriority()) {
+ index++;
+ }
- mCategories.add(index, category);
- if (mAdapter != null) {
- // Offset the index because of the static metadata element at beginning of RecyclerView.
- mAdapter.notifyItemInserted(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ mCategories.add(index, category);
+ if (mGroupedCategoryAdapter != null) {
+ // Offset the index because of the static metadata element
+ // at beginning of RecyclerView.
+ mGroupedCategoryAdapter.notifyItemInserted(index
+ + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ }
+ } else {
+ if (loading && !mAwaitingCategories) {
+ mAdapter.notifyItemChanged(getNumColumns());
+ mAdapter.notifyItemInserted(getNumColumns());
+ mAwaitingCategories = true;
+ }
+ // Not add existing category to category list
+ if (mCategories.indexOf(category) >= 0) {
+ updateCategory(category);
+ return;
+ }
+
+ int priority = category.getPriority();
+
+ int index = 0;
+ while (index < mCategories.size() && priority >= mCategories.get(index).getPriority()) {
+ index++;
+ }
+
+ mCategories.add(index, category);
+ if (mAdapter != null) {
+ // Offset the index because of the static metadata element
+ // at beginning of RecyclerView.
+ mAdapter.notifyItemInserted(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ }
}
}
@@ -221,7 +278,16 @@
int index = mCategories.indexOf(category);
if (index >= 0) {
mCategories.remove(index);
- mAdapter.notifyItemRemoved(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ if (mIsCreativeWallpaperEnabled) {
+ int indexCreativeCategory = mCreativeCategories.indexOf(category);
+ if (indexCreativeCategory >= 0) {
+ mCreativeCategories.remove(indexCreativeCategory);
+ }
+ mGroupedCategoryAdapter
+ .notifyItemRemoved(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ } else {
+ mAdapter.notifyItemRemoved(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ }
}
}
@@ -230,13 +296,28 @@
if (index >= 0) {
mCategories.remove(index);
mCategories.add(index, category);
- mAdapter.notifyItemChanged(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ if (mIsCreativeWallpaperEnabled) {
+ int indexCreativeCategory = mCreativeCategories.indexOf(category);
+ if (indexCreativeCategory >= 0) {
+ mCreativeCategories.remove(indexCreativeCategory);
+ mCreativeCategories.add(indexCreativeCategory, category);
+ }
+ mGroupedCategoryAdapter
+ .notifyItemChanged(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ } else {
+ mAdapter.notifyItemChanged(index + NUM_NON_CATEGORY_VIEW_HOLDERS);
+ }
}
}
void clearCategories() {
mCategories.clear();
- mAdapter.notifyDataSetChanged();
+ if (mIsCreativeWallpaperEnabled) {
+ mCreativeCategories.clear();
+ mGroupedCategoryAdapter.notifyDataSetChanged();
+ } else {
+ mAdapter.notifyDataSetChanged();
+ }
}
/**
@@ -244,15 +325,25 @@
*/
void doneFetchingCategories() {
if (mAwaitingCategories) {
- mAdapter.notifyItemRemoved(mAdapter.getItemCount() - 1);
+ if (mIsCreativeWallpaperEnabled) {
+ mGroupedCategoryAdapter
+ .notifyItemRemoved(mGroupedCategoryAdapter.getItemCount() - 1);
+ } else {
+ mAdapter.notifyItemRemoved(mAdapter.getItemCount() - 1);
+ }
mAwaitingCategories = false;
}
mIsFeaturedCollectionAvailable = mCategoryProvider.isFeaturedCollectionAvailable();
+ mIsCreativeCategoryCollectionAvailable = mCategoryProvider.isCreativeCategoryAvailable();
}
void notifyDataSetChanged() {
- mAdapter.notifyDataSetChanged();
+ if (mIsCreativeWallpaperEnabled) {
+ mGroupedCategoryAdapter.notifyDataSetChanged();
+ } else {
+ mAdapter.notifyDataSetChanged();
+ }
}
private int getNumColumns() {
@@ -346,6 +437,17 @@
mCategory = category;
mTitleView.setText(category.getTitle());
drawThumbnailAndOverlayIcon();
+ // We do this since itemView here refers to the broader LinearLayout defined in
+ // xml layout file of myPhotos block. Doing this allows us to make sure that the
+ // onClickListener is configured only on the CardView of MyPhotos and nowhere else
+ if (mIsCreativeWallpaperEnabled && mCategory != null
+ && TextUtils.equals(mCategory.getCollectionId(),
+ getActivity().getApplicationContext().getString(
+ R.string.image_wallpaper_collection_id))) {
+ itemView.setOnClickListener(null);
+ CardView categoryView = itemView.findViewById(R.id.category);
+ categoryView.setOnClickListener(this);
+ }
}
/**
@@ -392,7 +494,7 @@
layout.setBackgroundResource(R.drawable.snackbar_background);
TypedArray typedArray = getContext().obtainStyledAttributes(
new int[]{android.R.attr.textColorPrimary,
- com.android.internal.R.attr.colorAccentPrimaryVariant});
+ com.android.internal.R.attr.materialColorPrimaryContainer});
textView.setTextColor(typedArray.getColor(0, Color.TRANSPARENT));
snackbar.setActionTextColor(typedArray.getColor(1, Color.TRANSPARENT));
typedArray.recycle();
@@ -418,6 +520,9 @@
startActivityForResult(appInfoIntent, resultCode);
}
+ /*
+ This is for FeaturedCategories and only present in CategoryAdaptor
+ */
private class FeaturedCategoryHolder extends CategoryHolder {
FeaturedCategoryHolder(View itemView) {
@@ -429,6 +534,9 @@
}
}
+ /*
+ This is re-used between both GroupedCategoryAdaptor and CategoryAdaptor
+ */
private class MyPhotosCategoryHolder extends CategoryHolder {
MyPhotosCategoryHolder(View itemView) {
@@ -444,6 +552,146 @@
}
}
+ private class GroupCategoryHolder extends RecyclerView.ViewHolder {
+ private static final float INDIVIDUAL_TILE_WEIGHT = 1.0f;
+ LayoutInflater mLayoutInflater = LayoutInflater.from(getActivity());
+ private ArrayList<Category> mCategories = new ArrayList<>();
+ private ArrayList<ImageView> mImageViews = new ArrayList<>();
+ private ArrayList<ImageView> mOverlayIconViews = new ArrayList<>();
+ private ArrayList<TextView> mTextViews = new ArrayList<>();
+
+ GroupCategoryHolder(View itemView, int mCreativeCategoriesSize) {
+ super(itemView);
+ LinearLayout linearLayout = itemView.findViewById(R.id.linear_layout_for_cards);
+ for (int i = 0; i < mCreativeCategoriesSize; i++) {
+ LinearLayout gridItemCategory = (LinearLayout)
+ mLayoutInflater.inflate(R.layout.grid_item_category, null);
+ if (gridItemCategory != null) {
+ int position = i; //Used in onClickListener
+ mImageViews.add(gridItemCategory.findViewById(R.id.image));
+ mOverlayIconViews.add(gridItemCategory.findViewById(R.id.overlay_icon));
+ mTextViews.add(gridItemCategory.findViewById(R.id.category_title));
+ setLayoutParams(gridItemCategory);
+ linearLayout.addView(gridItemCategory);
+ gridItemCategory.setOnClickListener(view -> {
+ onClickListenerForCreativeCategory(position);
+ });
+ }
+ }
+ }
+
+ private void onClickListenerForCreativeCategory(int position) {
+ Activity activity = getActivity();
+ final UserEventLogger eventLogger =
+ InjectorProvider.getInjector().getUserEventLogger(activity);
+ eventLogger.logCategorySelected(mCategories.get(position)
+ .getCollectionId());
+ if (mCategories.get(position).supportsCustomPhotos()) {
+ getCategorySelectorFragmentHost().requestCustomPhotoPicker(
+ new MyPhotosStarter.PermissionChangedListener() {
+ @Override
+ public void onPermissionsGranted() {
+ drawThumbnailAndOverlayIcon(
+ mOverlayIconViews.get(position),
+ mCategories.get(position),
+ mImageViews.get(position));
+ }
+
+ @Override
+ public void onPermissionsDenied(boolean dontAskAgain) {
+ if (dontAskAgain) {
+ showPermissionSnackbar();
+ }
+ }
+ });
+ return;
+ }
+
+ if (mCategories.get(position).isSingleWallpaperCategory()) {
+ WallpaperInfo wallpaper = mCategories.get(position)
+ .getSingleWallpaper();
+ // Log click on individual wallpaper
+ eventLogger.logIndividualWallpaperSelected(
+ mCategories.get(position).getCollectionId());
+
+ InjectorProvider.getInjector().getWallpaperPersister(activity)
+ .setWallpaperInfoInPreview(wallpaper);
+ wallpaper.showPreview(activity,
+ new PreviewActivity.PreviewActivityIntentFactory(),
+ wallpaper instanceof LiveWallpaperInfo
+ ? PREVIEW_LIVE_WALLPAPER_REQUEST_CODE
+ : PREVIEW_WALLPAPER_REQUEST_CODE);
+ return;
+ }
+
+ getCategorySelectorFragmentHost().show(mCategories.get(position));
+ }
+
+ private void setLayoutParams(LinearLayout gridItemCategory) {
+ LinearLayout.LayoutParams params =
+ (LinearLayout.LayoutParams) gridItemCategory.getLayoutParams();
+ if (params == null) {
+ params =
+ new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.MATCH_PARENT,
+ LinearLayout.LayoutParams.WRAP_CONTENT);
+ }
+ params.setMargins(
+ (int) getResources().getDimension(
+ R.dimen.creative_category_grid_padding_horizontal),
+ (int) getResources().getDimension(
+ R.dimen.creative_category_grid_padding_vertical),
+ (int) getResources().getDimension(
+ R.dimen.creative_category_grid_padding_horizontal),
+ (int) getResources().getDimension(
+ R.dimen.creative_category_grid_padding_vertical));
+ CardView cardView = gridItemCategory.findViewById(R.id.category);
+ cardView.getLayoutParams().height = SizeCalculator
+ .getFeaturedCategoryTileSize(getActivity()).y / 2;
+ cardView.setRadius(getResources().getDimension(R.dimen.grid_item_all_radius));
+ params.weight = INDIVIDUAL_TILE_WEIGHT;
+ gridItemCategory.setLayoutParams(params);
+ }
+
+ private void drawThumbnailAndOverlayIcon(ImageView mOverlayIconView,
+ Category mCategory, ImageView mImageView) {
+ mOverlayIconView.setImageDrawable(mCategory.getOverlayIcon(
+ getActivity().getApplicationContext()));
+ Asset thumbnail = mCategory.getThumbnail(getActivity().getApplicationContext());
+ if (thumbnail != null) {
+ // Size the overlay icon according to the category.
+ int overlayIconDimenDp = mCategory.getOverlayIconSizeDp();
+ DisplayMetrics metrics = DisplayMetricsRetriever.getInstance().getDisplayMetrics(
+ getResources(), getActivity().getWindowManager().getDefaultDisplay());
+ int overlayIconDimenPx = (int) (overlayIconDimenDp * metrics.density);
+ mOverlayIconView.getLayoutParams().width = overlayIconDimenPx;
+ mOverlayIconView.getLayoutParams().height = overlayIconDimenPx;
+ thumbnail.loadDrawable(getActivity(), mImageView,
+ ResourceUtils.getColorAttr(
+ getActivity(),
+ android.R.attr.colorSecondary
+ ));
+ } else {
+ mImageView.setBackgroundColor(
+ getResources().getColor(R.color.myphoto_background_color));
+ Object nullObj = null;
+ Glide.with(getActivity())
+ .asDrawable()
+ .load(nullObj)
+ .into(mImageView);
+ }
+ }
+
+ private void bindCategory(ArrayList<Category> creativeCategories) {
+ for (int i = 0; i < creativeCategories.size(); i++) {
+ mCategories.add(creativeCategories.get(i));
+ mTextViews.get(i).setText(creativeCategories.get(i).getTitle());
+ drawThumbnailAndOverlayIcon(mOverlayIconViews.get(i), mCategories.get(i),
+ mImageViews.get(i));
+ }
+ }
+ }
+
/**
* ViewHolder subclass for the loading indicator ("spinner") shown when categories are being
* fetched.
@@ -461,7 +709,8 @@
}
/**
- * RecyclerView Adapter subclass for the category tiles in the RecyclerView.
+ * RecyclerView Adapter subclass for the category tiles in the RecyclerView. This excludes
+ * CreativeCategory and has FeaturedCategory
*/
private class CategoryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
implements MyPhotosStarter.PermissionChangedListener {
@@ -579,6 +828,145 @@
}
}
+ /**
+ * RecyclerView GroupedCategoryAdaptor subclass for the category tiles in the RecyclerView.
+ * This removes FeaturedCategory and adds CreativeCategory with a slightly different layout
+ */
+ private class GroupedCategoryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
+ implements MyPhotosStarter.PermissionChangedListener {
+ private static final int ITEM_VIEW_TYPE_MY_PHOTOS = 1;
+ private static final int ITEM_VIEW_TYPE_CREATIVE_CATEGORY = 2;
+ private static final int ITEM_VIEW_TYPE_CATEGORY = 3;
+ private static final int ITEM_VIEW_TYPE_LOADING_INDICATOR = 4;
+ private List<Category> mCategories;
+
+ private GroupedCategoryAdapter(List<Category> categories) {
+ mCategories = categories;
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ if (mAwaitingCategories && position == getItemCount() - 1) {
+ return ITEM_VIEW_TYPE_LOADING_INDICATOR;
+ }
+ if (mCategories.stream().anyMatch(Category::supportsUserCreatedWallpapers)) {
+ if (position == 0) {
+ return ITEM_VIEW_TYPE_CREATIVE_CATEGORY;
+ }
+ if (position == 1) {
+ return ITEM_VIEW_TYPE_MY_PHOTOS;
+ }
+ } else {
+ if (position == 0) {
+ return ITEM_VIEW_TYPE_MY_PHOTOS;
+ }
+ }
+ return ITEM_VIEW_TYPE_CATEGORY;
+ }
+
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+ LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
+
+ switch (viewType) {
+ case ITEM_VIEW_TYPE_LOADING_INDICATOR:
+ View view = layoutInflater.inflate(R.layout.grid_item_loading_indicator,
+ parent, /* attachToRoot= */ false);
+ return new LoadingIndicatorHolder(view);
+ case ITEM_VIEW_TYPE_MY_PHOTOS:
+ view = layoutInflater.inflate(R.layout.my_photos,
+ parent, /* attachToRoot= */ false);
+ return new MyPhotosCategoryHolder(view);
+ case ITEM_VIEW_TYPE_CREATIVE_CATEGORY:
+ view = layoutInflater.inflate(R.layout.creative_wallpaper,
+ parent, /* attachToRoot= */ false);
+ return new GroupCategoryHolder(view, mCreativeCategories.size());
+ case ITEM_VIEW_TYPE_CATEGORY:
+ view = layoutInflater.inflate(R.layout.grid_item_category,
+ parent, /* attachToRoot= */ false);
+ return new CategoryHolder(view);
+ default:
+ Log.e(TAG, "Unsupported viewType " + viewType + " in CategoryAdapter");
+ return null;
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
+ int viewType = getItemViewType(position);
+
+ switch (viewType) {
+ case ITEM_VIEW_TYPE_CREATIVE_CATEGORY:
+ ((GroupCategoryHolder) holder).bindCategory(mCreativeCategories);
+ break;
+ case ITEM_VIEW_TYPE_MY_PHOTOS:
+ case ITEM_VIEW_TYPE_CATEGORY:
+ // Offset position to get category index to account for the non-category view
+ // holders.
+ if (mIsCreativeCategoryCollectionAvailable) {
+ int numCreativeCategories = mCreativeCategories.size();
+ int positionRelativeToCreativeCategory = position + numCreativeCategories
+ - 1;
+ Category category = mCategories.get(
+ positionRelativeToCreativeCategory - NUM_NON_CATEGORY_VIEW_HOLDERS);
+ ((CategoryHolder) holder).bindCategory(category);
+ } else {
+ Category category = mCategories.get(position
+ - NUM_NON_CATEGORY_VIEW_HOLDERS);
+ ((CategoryHolder) holder).bindCategory(category);
+ }
+ break;
+ case ITEM_VIEW_TYPE_LOADING_INDICATOR:
+ // No op.
+ break;
+ default:
+ Log.e(TAG, "Unsupported viewType " + viewType + " in CategoryAdapter");
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ // Add to size of categories to account for the metadata related views.
+ // Add 1 more for the loading indicator if not yet done loading.
+ int size = mCategories.size() + NUM_NON_CATEGORY_VIEW_HOLDERS;
+ if (mAwaitingCategories) {
+ size += 1;
+ }
+ // This is done to make sure all CreativeCategories are accounted for
+ // in one single block, therefore subtracted the size of CreativeCategories
+ // from total count
+ if (mCreativeCategories.size() >= 2) {
+ size = size - (mCreativeCategories.size() - 1);
+ }
+ return size;
+ }
+
+ @Override
+ public void onPermissionsGranted() {
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public void onPermissionsDenied(boolean dontAskAgain) {
+ if (!dontAskAgain) {
+ return;
+ }
+
+ String permissionNeededMessage =
+ getString(R.string.permission_needed_explanation_go_to_settings);
+ AlertDialog dialog = new AlertDialog.Builder(getActivity(), R.style.LightDialogTheme)
+ .setMessage(permissionNeededMessage)
+ .setPositiveButton(android.R.string.ok, null /* onClickListener */)
+ .setNegativeButton(
+ R.string.settings_button_label,
+ (dialogInterface, i) -> {
+ startSettings(SETTINGS_APP_INFO_REQUEST_CODE);
+ })
+ .create();
+ dialog.show();
+ }
+ }
+
private class GridPaddingDecoration extends RecyclerView.ItemDecoration {
private final int mPadding;
@@ -598,6 +986,7 @@
RecyclerView.ViewHolder viewHolder = parent.getChildViewHolder(view);
if (viewHolder instanceof MyPhotosCategoryHolder
+ || viewHolder instanceof GroupCategoryHolder
|| viewHolder instanceof FeaturedCategoryHolder) {
outRect.bottom = getResources().getDimensionPixelSize(
R.dimen.grid_item_featured_category_padding_bottom);
@@ -613,9 +1002,11 @@
notifyDataSetChanged();
}
}
+
/**
- * SpanSizeLookup subclass which provides that the item in the first position spans the number
- * of columns in the RecyclerView and all other items only take up a single span.
+ * SpanSizeLookup subclass which works with CategoryAdaptor and provides that the item in the
+ * first position spans the number of columns in the RecyclerView and all other items only
+ * take up a single span.
*/
private class CategorySpanSizeLookup extends GridLayoutManager.SpanSizeLookup {
private static final int DEFAULT_CATEGORY_SPAN_SIZE = 2;
@@ -638,7 +1029,37 @@
== CategoryAdapter.ITEM_VIEW_TYPE_FEATURED_CATEGORY) {
return getNumColumns() * DEFAULT_CATEGORY_SPAN_SIZE / 2;
}
+ return DEFAULT_CATEGORY_SPAN_SIZE;
+ }
+ }
+ /**
+ * SpanSizeLookup subclass which works with GroupCategoryAdaptor and provides that
+ * item of type photos and items of type CreativeCategory spans the number of columns in the
+ * RecyclerView and all other items only take up a single span.
+ */
+ private class GroupedCategorySpanSizeLookup extends GridLayoutManager.SpanSizeLookup {
+ private static final int DEFAULT_CATEGORY_SPAN_SIZE = 2;
+
+ GroupedCategoryAdapter mAdapter;
+
+ private GroupedCategorySpanSizeLookup(GroupedCategoryAdapter adapter) {
+ mAdapter = adapter;
+ }
+
+ @Override
+ public int getSpanSize(int position) {
+ if (position < NUM_NON_CATEGORY_VIEW_HOLDERS || mAdapter.getItemViewType(position)
+ == GroupedCategoryAdapter.ITEM_VIEW_TYPE_LOADING_INDICATOR
+ || mAdapter.getItemViewType(
+ position) == GroupedCategoryAdapter.ITEM_VIEW_TYPE_MY_PHOTOS) {
+ return getNumColumns() * DEFAULT_CATEGORY_SPAN_SIZE;
+ }
+
+ if (mAdapter.getItemViewType(position)
+ == GroupedCategoryAdapter.ITEM_VIEW_TYPE_CREATIVE_CATEGORY) {
+ return getNumColumns() * DEFAULT_CATEGORY_SPAN_SIZE;
+ }
return DEFAULT_CATEGORY_SPAN_SIZE;
}
}
diff --git a/src/com/android/wallpaper/picker/CustomizationPickerActivity.java b/src/com/android/wallpaper/picker/CustomizationPickerActivity.java
index 3f8c2d0..b31f1a6 100644
--- a/src/com/android/wallpaper/picker/CustomizationPickerActivity.java
+++ b/src/com/android/wallpaper/picker/CustomizationPickerActivity.java
@@ -332,6 +332,7 @@
}
+ @SuppressWarnings("MissingSuperCall") // TODO: Fix me
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
diff --git a/src/com/android/wallpaper/picker/CustomizationPickerFragment.java b/src/com/android/wallpaper/picker/CustomizationPickerFragment.java
index cb0820d..edbe3d6 100644
--- a/src/com/android/wallpaper/picker/CustomizationPickerFragment.java
+++ b/src/com/android/wallpaper/picker/CustomizationPickerFragment.java
@@ -40,7 +40,6 @@
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.picker.customization.ui.binder.CustomizationPickerBinder;
import com.android.wallpaper.picker.customization.ui.viewmodel.CustomizationPickerViewModel;
-import com.android.wallpaper.picker.customization.ui.viewmodel.WallpaperQuickSwitchViewModel;
import com.android.wallpaper.util.ActivityUtils;
import java.util.ArrayList;
@@ -73,7 +72,8 @@
// Note that the section views will be displayed by the list ordering.
private final List<CustomizationSectionController<?>> mSectionControllers = new ArrayList<>();
- private NestedScrollView mNestedScrollView;
+ private NestedScrollView mHomeScrollContainer;
+ private NestedScrollView mLockScrollContainer;
@Nullable
private Bundle mBackStackSavedInstanceState;
private final FragmentFactory mFragmentFactory;
@@ -107,7 +107,8 @@
CustomizationPickerViewModel.newFactory(
this,
savedInstanceState,
- injector.getUndoInteractor(requireContext()))
+ injector.getUndoInteractor(requireContext()),
+ injector.getWallpaperInteractor(requireContext()))
).get(CustomizationPickerViewModel.class);
final Bundle arguments = getArguments();
mViewModel.setInitialScreen(
@@ -138,10 +139,33 @@
mBackStackSavedInstanceState = null;
}
- mNestedScrollView = view.findViewById(R.id.scroll_container);
+ mHomeScrollContainer = view.findViewById(R.id.home_scroll_container);
+ mLockScrollContainer = view.findViewById(R.id.lock_scroll_container);
- if (!shouldUseRevampedUi) {
- ViewGroup sectionContainer = view.findViewById(R.id.section_container);
+ if (shouldUseRevampedUi) {
+ mHomeScrollContainer.setOnScrollChangeListener(
+ (NestedScrollView.OnScrollChangeListener) (scrollView, scrollX, scrollY,
+ oldScrollX, oldScrollY) -> {
+ if (scrollY == 0) {
+ setToolbarColor(android.R.color.transparent);
+ } else {
+ setToolbarColor(R.color.toolbar_color);
+ }
+ }
+ );
+ mLockScrollContainer.setOnScrollChangeListener(
+ (NestedScrollView.OnScrollChangeListener) (scrollView, scrollX, scrollY,
+ oldScrollX, oldScrollY) -> {
+ if (scrollY == 0) {
+ setToolbarColor(android.R.color.transparent);
+ } else {
+ setToolbarColor(R.color.toolbar_color);
+ }
+ }
+ );
+ } else {
+ mHomeScrollContainer.setVisibility(View.VISIBLE);
+ ViewGroup sectionContainer = view.findViewById(R.id.home_section_container);
sectionContainer.setOnApplyWindowInsetsListener((v, windowInsets) -> {
v.setPadding(
v.getPaddingLeft(),
@@ -153,7 +177,7 @@
initSections(savedInstanceState);
mSectionControllers.forEach(controller ->
- mNestedScrollView.post(() -> {
+ mHomeScrollContainer.post(() -> {
final Context context = getContext();
if (context == null) {
Log.w(TAG, "Adding section views with null context");
@@ -182,8 +206,8 @@
private void restoreViewState(@Nullable Bundle savedInstanceState) {
if (savedInstanceState != null) {
- mNestedScrollView.post(() ->
- mNestedScrollView.setScrollY(savedInstanceState.getInt(SCROLL_POSITION_Y)));
+ mHomeScrollContainer.post(() ->
+ mHomeScrollContainer.setScrollY(savedInstanceState.getInt(SCROLL_POSITION_Y)));
}
}
@@ -200,7 +224,7 @@
@Override
protected int getToolbarColorId() {
- return shouldUseRevampedUi() ? R.color.toolbar_color : android.R.color.transparent;
+ return android.R.color.transparent;
}
@Override
@@ -253,8 +277,8 @@
/** Saves state of the fragment. */
private void onSaveInstanceStateInternal(Bundle savedInstanceState) {
- if (mNestedScrollView != null) {
- savedInstanceState.putInt(SCROLL_POSITION_Y, mNestedScrollView.getScrollY());
+ if (mHomeScrollContainer != null) {
+ savedInstanceState.putInt(SCROLL_POSITION_Y, mHomeScrollContainer.getScrollY());
}
mSectionControllers.forEach(c -> c.onSaveInstanceState(savedInstanceState));
}
@@ -276,14 +300,6 @@
@Nullable Bundle savedInstanceState) {
final Injector injector = InjectorProvider.getInjector();
- WallpaperQuickSwitchViewModel wallpaperQuickSwitchViewModel = new ViewModelProvider(
- getActivity(),
- WallpaperQuickSwitchViewModel.newFactory(
- this,
- savedInstanceState,
- injector.getWallpaperInteractor(requireContext())))
- .get(WallpaperQuickSwitchViewModel.class);
-
CustomizationSections sections = injector.getCustomizationSections(getActivity());
if (screen == null) {
return sections.getAllSectionControllers(
@@ -307,7 +323,7 @@
savedInstanceState,
injector.getCurrentWallpaperInfoFactory(requireContext()),
injector.getDisplayUtils(getActivity()),
- wallpaperQuickSwitchViewModel,
+ mViewModel,
injector.getWallpaperInteractor(requireContext()));
}
}
diff --git a/src/com/android/wallpaper/picker/FixedWidthDisplayRatioFrameLayout.kt b/src/com/android/wallpaper/picker/FixedWidthDisplayRatioFrameLayout.kt
new file mode 100644
index 0000000..011b9c4
--- /dev/null
+++ b/src/com/android/wallpaper/picker/FixedWidthDisplayRatioFrameLayout.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2023 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.picker
+
+import android.content.Context
+import android.util.AttributeSet
+import android.widget.FrameLayout
+import androidx.core.view.children
+import com.android.wallpaper.util.ScreenSizeCalculator
+
+/**
+ * [FrameLayout] that sizes itself and its children layout with a given fixed width and a calculated
+ * height according to the screen aspect ratio.
+ */
+class FixedWidthDisplayRatioFrameLayout(
+ context: Context,
+ attrs: AttributeSet?,
+) : FrameLayout(context, attrs) {
+
+ override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
+ val screenAspectRatio = ScreenSizeCalculator.getInstance().getScreenAspectRatio(context)
+ val width = MeasureSpec.getSize(widthMeasureSpec)
+ val height = (width * screenAspectRatio).toInt()
+ super.onMeasure(
+ MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY),
+ )
+ children.forEach { child ->
+ child.measure(
+ MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY),
+ )
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/picker/FullPreviewActivity.java b/src/com/android/wallpaper/picker/FullPreviewActivity.java
index 5a22b62..4656c30 100755
--- a/src/com/android/wallpaper/picker/FullPreviewActivity.java
+++ b/src/com/android/wallpaper/picker/FullPreviewActivity.java
@@ -21,6 +21,7 @@
import android.os.Bundle;
import android.transition.Slide;
import android.view.Window;
+import android.widget.Toast;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -110,6 +111,12 @@
? ActivityInfo.SCREEN_ORIENTATION_USER : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
setRequestedOrientation(orientation);
if (isInMultiWindowMode()) {
+ Toast.makeText(
+ this,
+ R.string.wallpaper_exit_split_screen,
+ Toast.LENGTH_SHORT
+ )
+ .show();
onBackPressed();
}
}
diff --git a/src/com/android/wallpaper/picker/PreviewFragment.java b/src/com/android/wallpaper/picker/PreviewFragment.java
index 6671b20..ffdd027 100755
--- a/src/com/android/wallpaper/picker/PreviewFragment.java
+++ b/src/com/android/wallpaper/picker/PreviewFragment.java
@@ -293,7 +293,7 @@
LayerDrawable layerDrawable = (LayerDrawable) ripple.getDrawable(/* index= */ 0);
Drawable backgroundDrawable = layerDrawable.getDrawable(/* index= */ 0);
backgroundDrawable.setTint(!visible ? ResourceUtils.getColorAttr(getActivity(),
- com.android.internal.R.attr.colorAccentSecondary)
+ com.android.internal.R.attr.materialColorSecondary)
: ResourceUtils.getColorAttr(getActivity(),
com.android.internal.R.attr.colorAccentPrimary));
});
diff --git a/src/com/android/wallpaper/picker/StandalonePreviewActivity.java b/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
index 3b65306..ee4dc0c 100755
--- a/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
+++ b/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
@@ -105,6 +105,7 @@
}
}
+ @SuppressWarnings("MissingSuperCall") // TODO: Fix me
@Override
protected void onResume() {
super.onResume();
diff --git a/src/com/android/wallpaper/picker/WallpaperOnlyFragment.java b/src/com/android/wallpaper/picker/WallpaperOnlyFragment.java
index 6d99bed..b59f057 100644
--- a/src/com/android/wallpaper/picker/WallpaperOnlyFragment.java
+++ b/src/com/android/wallpaper/picker/WallpaperOnlyFragment.java
@@ -20,6 +20,8 @@
import com.android.wallpaper.R;
import com.android.wallpaper.model.CustomizationSectionController;
import com.android.wallpaper.model.WallpaperSectionController;
+import com.android.wallpaper.picker.customization.ui.section.ConnectedSectionController;
+import com.android.wallpaper.picker.customization.ui.section.ScreenPreviewSectionController;
import java.util.List;
import java.util.stream.Collectors;
@@ -45,7 +47,9 @@
protected List<CustomizationSectionController<?>> filterAvailableSections(
List<CustomizationSectionController<?>> controllers) {
List<CustomizationSectionController<?>> wallpaperOnlySections = controllers.stream()
- .filter(controller -> controller instanceof WallpaperSectionController)
+ .filter(controller -> controller instanceof WallpaperSectionController
+ || controller instanceof ScreenPreviewSectionController
+ || controller instanceof ConnectedSectionController)
.collect(Collectors.toList());
return super.filterAvailableSections(wallpaperOnlySections);
}
diff --git a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
index 3c788ef..1588da9 100644
--- a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
+++ b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
@@ -58,6 +58,7 @@
private final FragmentActivity mActivity;
private final WallpapersUiContainer mContainer;
+ public static boolean DISABLE_MY_PHOTOS_BLOCK_PREVIEW = false;
public static final int SHOW_CATEGORY_REQUEST_CODE = 0;
public static final int PREVIEW_WALLPAPER_REQUEST_CODE = 1;
public static final int VIEW_ONLY_PREVIEW_WALLPAPER_REQUEST_CODE = 2;
@@ -119,22 +120,25 @@
@Override
public void requestCustomPhotoPicker(PermissionChangedListener listener) {
- if (!isReadExternalStoragePermissionGranted()) {
- PermissionChangedListener wrappedListener = new PermissionChangedListener() {
- @Override
- public void onPermissionsGranted() {
- listener.onPermissionsGranted();
- showCustomPhotoPicker();
- }
+ //TODO (b/282073506): Figure out a better way to have better photos experience
+ if (DISABLE_MY_PHOTOS_BLOCK_PREVIEW) {
+ if (!isReadExternalStoragePermissionGranted()) {
+ PermissionChangedListener wrappedListener = new PermissionChangedListener() {
+ @Override
+ public void onPermissionsGranted() {
+ listener.onPermissionsGranted();
+ showCustomPhotoPicker();
+ }
- @Override
- public void onPermissionsDenied(boolean dontAskAgain) {
- listener.onPermissionsDenied(dontAskAgain);
- }
- };
- requestExternalStoragePermission(wrappedListener);
+ @Override
+ public void onPermissionsDenied(boolean dontAskAgain) {
+ listener.onPermissionsDenied(dontAskAgain);
+ }
+ };
+ requestExternalStoragePermission(wrappedListener);
- return;
+ return;
+ }
}
showCustomPhotoPicker();
diff --git a/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java b/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
index 9c26cc3..d125478 100644
--- a/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
+++ b/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
@@ -48,6 +48,8 @@
private static final String KEY_WALLPAPER_COLORS = "wallpaper_colors";
public static final int MESSAGE_ID_UPDATE_PREVIEW = 1337;
public static final String KEY_HIDE_BOTTOM_ROW = "hide_bottom_row";
+ public static final int MESSAGE_ID_COLOR_OVERRIDE = 1234;
+ public static final String KEY_COLOR_OVERRIDE = "color_override"; // ColorInt Encoded as string
private final SurfaceView mWorkspaceSurface;
private final PreviewUtils mPreviewUtils;
private final boolean mShouldUseWallpaperColors;
@@ -58,6 +60,7 @@
private boolean mIsWallpaperColorsReady;
private Surface mLastSurface;
private Message mCallback;
+ private Message mDelayedMessage;
private WorkspaceRenderListener mListener;
private boolean mNeedsToCleanUp;
@@ -138,17 +141,6 @@
mHideBottomRow = hideBottomRow;
}
- /**
- * Hides the components in the bottom row.
- *
- * @param hide True to hide and false to show.
- */
- public void hideBottomRow(boolean hide) {
- Bundle data = new Bundle();
- data.putBoolean(KEY_HIDE_BOTTOM_ROW, hide);
- send(MESSAGE_ID_UPDATE_PREVIEW, data);
- }
-
public void setListener(WorkspaceRenderListener listener) {
mListener = listener;
}
@@ -168,6 +160,14 @@
mWorkspaceSurface.setChildSurfacePackage(
SurfaceViewUtils.getSurfacePackage(result));
mCallback = SurfaceViewUtils.getCallback(result);
+ if (mCallback != null && mDelayedMessage != null) {
+ try {
+ mCallback.replyTo.send(mDelayedMessage);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Couldn't send message to workspace preview", e);
+ }
+ mDelayedMessage = null;
+ }
if (mNeedsToCleanUp) {
cleanUp();
} else if (mListener != null) {
@@ -193,15 +193,17 @@
* {@link Message#getData()}.
*/
public void send(final int what, @Nullable Bundle bundle) {
+ final Message message = new Message();
+ message.what = what;
+ message.setData(bundle);
if (mCallback != null) {
try {
- final Message message = new Message();
- message.what = what;
- message.setData(bundle);
mCallback.replyTo.send(message);
} catch (RemoteException e) {
Log.w(TAG, "Couldn't send message to workspace preview", e);
}
+ } else {
+ mDelayedMessage = message;
}
}
@@ -237,8 +239,8 @@
Bundle request = SurfaceViewUtils.createSurfaceViewRequest(workspaceSurface, mExtras);
if (mWallpaperColors != null) {
request.putParcelable(KEY_WALLPAPER_COLORS, mWallpaperColors);
- request.putBoolean(KEY_HIDE_BOTTOM_ROW, mHideBottomRow);
}
+ request.putBoolean(KEY_HIDE_BOTTOM_ROW, mHideBottomRow);
mPreviewUtils.renderPreview(request, callback);
}
}
diff --git a/src/com/android/wallpaper/picker/customization/data/content/WallpaperClient.kt b/src/com/android/wallpaper/picker/customization/data/content/WallpaperClient.kt
index e849426..8cc3881 100644
--- a/src/com/android/wallpaper/picker/customization/data/content/WallpaperClient.kt
+++ b/src/com/android/wallpaper/picker/customization/data/content/WallpaperClient.kt
@@ -31,11 +31,6 @@
limit: Int,
): Flow<List<WallpaperModel>>
- /** Returns the selected wallpaper. */
- suspend fun getCurrentWallpaper(
- destination: WallpaperDestination,
- ): WallpaperModel
-
/**
* Asynchronously sets the wallpaper to the one with the given ID.
*
diff --git a/src/com/android/wallpaper/picker/customization/data/content/WallpaperClientImpl.kt b/src/com/android/wallpaper/picker/customization/data/content/WallpaperClientImpl.kt
index e85cdfd..12aa848 100644
--- a/src/com/android/wallpaper/picker/customization/data/content/WallpaperClientImpl.kt
+++ b/src/com/android/wallpaper/picker/customization/data/content/WallpaperClientImpl.kt
@@ -24,6 +24,7 @@
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
+import android.os.Looper
import android.util.Log
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
@@ -42,6 +43,10 @@
limit: Int,
): Flow<List<WallpaperModel>> {
return callbackFlow {
+ // TODO(b/280891780) Remove this check
+ if (Looper.myLooper() == Looper.getMainLooper()) {
+ throw IllegalStateException("Do not call method recentWallpapers() on main thread")
+ }
suspend fun queryAndSend(limit: Int) {
send(queryRecentWallpapers(destination = destination, limit = limit))
}
@@ -64,12 +69,6 @@
}
}
- override suspend fun getCurrentWallpaper(
- destination: WallpaperDestination,
- ): WallpaperModel {
- return queryRecentWallpapers(destination = destination, limit = 1).first()
- }
-
override suspend fun setWallpaper(
destination: WallpaperDestination,
wallpaperId: String,
@@ -92,10 +91,7 @@
context.contentResolver
.query(
LIST_RECENTS_URI.buildUpon().appendPath(destination.asString()).build(),
- arrayOf(
- KEY_ID,
- KEY_PLACEHOLDER_COLOR,
- ),
+ arrayOf(KEY_ID, KEY_PLACEHOLDER_COLOR, KEY_LAST_UPDATED),
null,
null,
)
@@ -107,13 +103,16 @@
return buildList {
val idColumnIndex = cursor.getColumnIndex(KEY_ID)
val placeholderColorColumnIndex = cursor.getColumnIndex(KEY_PLACEHOLDER_COLOR)
+ val lastUpdatedColumnIndex = cursor.getColumnIndex(KEY_LAST_UPDATED)
while (cursor.moveToNext() && size < limit) {
val wallpaperId = cursor.getString(idColumnIndex)
val placeholderColor = cursor.getInt(placeholderColorColumnIndex)
+ val lastUpdated = cursor.getLong(lastUpdatedColumnIndex)
add(
WallpaperModel(
wallpaperId = wallpaperId,
placeholderColor = placeholderColor,
+ lastUpdated = lastUpdated
)
)
}
@@ -182,6 +181,7 @@
private const val KEY_ID = "id"
/** Key for a parameter used to pass the screen to/from the content provider. */
private const val KEY_SCREEN = "screen"
+ private const val KEY_LAST_UPDATED = "last_updated"
private const val SCREEN_ALL = "all_screens"
private const val SCREEN_HOME = "home_screen"
private const val SCREEN_LOCK = "lock_screen"
diff --git a/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepository.kt b/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepository.kt
index 6234fa5..ef5bcf8 100644
--- a/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepository.kt
+++ b/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepository.kt
@@ -18,6 +18,7 @@
package com.android.wallpaper.picker.customization.data.repository
import android.graphics.Bitmap
+import com.android.wallpaper.module.WallpaperPreferences
import com.android.wallpaper.picker.customization.data.content.WallpaperClient
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
@@ -31,13 +32,13 @@
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
-import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
/** Encapsulates access to wallpaper-related data. */
class WallpaperRepository(
private val scope: CoroutineScope,
private val client: WallpaperClient,
+ private val wallpaperPreferences: WallpaperPreferences,
private val backgroundDispatcher: CoroutineDispatcher,
) {
/** The ID of the currently-selected wallpaper. */
@@ -46,17 +47,28 @@
): StateFlow<String> {
return client
.recentWallpapers(destination = destination, limit = 1)
- .map { previews -> previews.first().wallpaperId }
+ .map { previews -> currentWallpaperKey(destination, previews) }
+ .flowOn(backgroundDispatcher)
.stateIn(
scope = scope,
started = SharingStarted.WhileSubscribed(),
- initialValue =
- runBlocking {
- client.getCurrentWallpaper(destination = destination).wallpaperId
- },
+ initialValue = currentWallpaperKey(destination, null)
)
}
+ private fun currentWallpaperKey(
+ destination: WallpaperDestination,
+ previews: List<WallpaperModel>?,
+ ): String {
+ val key =
+ when (destination) {
+ WallpaperDestination.HOME -> wallpaperPreferences.homeWallpaperRecentsKey
+ WallpaperDestination.LOCK -> wallpaperPreferences.lockWallpaperRecentsKey
+ else -> error("Unsupported destination")
+ }
+ return key ?: previews?.firstOrNull()?.wallpaperId ?: DEFAULT_KEY
+ }
+
private val _selectingWallpaperId =
MutableStateFlow<Map<WallpaperDestination, String?>>(emptyMap())
/**
@@ -98,4 +110,8 @@
}
}
}
+
+ companion object {
+ private const val DEFAULT_KEY = "default_missing_key"
+ }
}
diff --git a/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractor.kt b/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractor.kt
index d9e2ef6..06948bd 100644
--- a/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractor.kt
+++ b/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractor.kt
@@ -33,15 +33,15 @@
val shouldHandleReload: () -> Boolean = { true },
) {
/** Returns a flow that is updated whenever the wallpaper has been updated */
- fun wallpaperUpdateEvents(screen: CustomizationSections.Screen): Flow<WallpaperModel> {
+ fun wallpaperUpdateEvents(screen: CustomizationSections.Screen): Flow<WallpaperModel?> {
return when (screen) {
CustomizationSections.Screen.LOCK_SCREEN ->
previews(WallpaperDestination.LOCK, 1).map { recentWallpapers ->
- recentWallpapers[0]
+ if (recentWallpapers.isEmpty()) null else recentWallpapers[0]
}
CustomizationSections.Screen.HOME_SCREEN ->
previews(WallpaperDestination.HOME, 1).map { recentWallpapers ->
- recentWallpapers[0]
+ if (recentWallpapers.isEmpty()) null else recentWallpapers[0]
}
}
}
diff --git a/src/com/android/wallpaper/picker/customization/shared/model/WallpaperModel.kt b/src/com/android/wallpaper/picker/customization/shared/model/WallpaperModel.kt
index a0d8b38..afdfff6 100644
--- a/src/com/android/wallpaper/picker/customization/shared/model/WallpaperModel.kt
+++ b/src/com/android/wallpaper/picker/customization/shared/model/WallpaperModel.kt
@@ -21,4 +21,5 @@
data class WallpaperModel(
val wallpaperId: String,
val placeholderColor: Int,
+ val lastUpdated: Long = -1,
)
diff --git a/src/com/android/wallpaper/picker/customization/ui/binder/CustomizationPickerBinder.kt b/src/com/android/wallpaper/picker/customization/ui/binder/CustomizationPickerBinder.kt
index be036bb..f3d20bb 100644
--- a/src/com/android/wallpaper/picker/customization/ui/binder/CustomizationPickerBinder.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/binder/CustomizationPickerBinder.kt
@@ -17,13 +17,16 @@
package com.android.wallpaper.picker.customization.ui.binder
+import android.content.Context
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.annotation.IdRes
import androidx.core.view.children
+import androidx.core.view.isInvisible
import androidx.core.view.updateLayoutParams
+import androidx.core.widget.NestedScrollView
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
@@ -74,8 +77,11 @@
lifecycleOwner = lifecycleOwner,
)
- val sectionContainer = view.findViewById<ViewGroup>(R.id.section_container)
- sectionContainer.setOnApplyWindowInsetsListener { v: View, windowInsets: WindowInsets ->
+ val lockScrollContainer = view.findViewById<NestedScrollView>(R.id.lock_scroll_container)
+ val homeScrollContainer = view.findViewById<NestedScrollView>(R.id.home_scroll_container)
+
+ val lockSectionContainer = view.findViewById<ViewGroup>(R.id.lock_section_container)
+ lockSectionContainer.setOnApplyWindowInsetsListener { v: View, windowInsets: WindowInsets ->
v.setPadding(
v.paddingLeft,
v.paddingTop,
@@ -84,88 +90,91 @@
)
windowInsets.consumeSystemWindowInsets()
}
- sectionContainer.updateLayoutParams<FrameLayout.LayoutParams> {
+ lockSectionContainer.updateLayoutParams<FrameLayout.LayoutParams> {
// We don't want the top margin from the XML because our tabs have that as padding so
// they can be collapsed into the toolbar with spacing from the actual title text.
topMargin = 0
}
+ val homeSectionContainer = view.findViewById<ViewGroup>(R.id.home_section_container)
+ homeSectionContainer.setOnApplyWindowInsetsListener { v: View, windowInsets: WindowInsets ->
+ v.setPadding(
+ v.paddingLeft,
+ v.paddingTop,
+ v.paddingRight,
+ windowInsets.systemWindowInsetBottom
+ )
+ windowInsets.consumeSystemWindowInsets()
+ }
+ homeSectionContainer.updateLayoutParams<FrameLayout.LayoutParams> {
+ // We don't want the top margin from the XML because our tabs have that as padding so
+ // they can be collapsed into the toolbar with spacing from the actual title text.
+ topMargin = 0
+ }
+
+ // create and add sections to both the lock and home screen tabs ahead of time, since
+ // the lock and home screen preview sections are both needed to load initial wallpaper
+ // colors for the correct functioning of the color picker
+ createAndAddSections(
+ view.context,
+ homeSectionContainer,
+ isOnLockScreen = false,
+ sectionControllerProvider
+ )
+ createAndAddSections(
+ view.context,
+ lockSectionContainer,
+ isOnLockScreen = true,
+ sectionControllerProvider
+ )
+
val job =
lifecycleOwner.lifecycleScope.launch {
lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
launch {
viewModel.isOnLockScreen.collect { isOnLockScreen ->
- // These are the available section controllers we should use now.
- val newSectionControllers =
- sectionControllerProvider.invoke(isOnLockScreen).filter {
- it.isAvailable(view.context)
- }
+ // Offset the scroll position of both tabs
+ lockScrollContainer.scrollTo(0, 0)
+ homeScrollContainer.scrollTo(0, 0)
- check(
- newSectionControllers[0].shouldRetainInstanceWhenSwitchingTabs()
- ) {
- "We are not recreating the first section when the users switching" +
- " between the home screen and lock screen tab. The first" +
- " section should always retain."
- }
-
- val firstTime = sectionContainer.childCount == 0
- if (!firstTime) {
- // Remove all views, except the very first one, which we assume is
- // for
- // the wallpaper preview section.
- sectionContainer.removeViews(1, sectionContainer.childCount - 1)
-
- // The old controllers for the removed views should be released,
- // except
- // for the very first one, which is for the wallpaper preview
- // section;
- // that one we keep but just tell it that we switched screens.
- sectionContainer.children
- .mapNotNull { it.tag as? SectionController }
- .forEachIndexed { index, oldController ->
- if (index == 0) {
- // We assume that index 0 is the wallpaper preview
- // section.
- // We keep it because it's an expensive section (as it
- // needs
- // to maintain a wallpaper connection that seems to be
- // making assumptions about its SurfaceView always
- // remaining
- // attached to the window).
- oldController.onScreenSwitched(isOnLockScreen)
- } else {
- // All other old controllers will be thrown out so let's
- // release them.
- oldController.release()
- }
- }
- }
-
- // Let's add the new controllers and views.
- newSectionControllers.forEachIndexed { index, controller ->
- if (firstTime || index > 0) {
- val addedView =
- controller.createView(
- view.context,
- CustomizationSectionController.ViewCreationParams(
- isOnLockScreen = isOnLockScreen,
- )
- )
- addedView?.tag = controller
- sectionContainer.addView(addedView)
- }
- }
+ lockScrollContainer.isInvisible = !isOnLockScreen
+ homeScrollContainer.isInvisible = isOnLockScreen
}
}
}
// This happens when the lifecycle is stopped.
- sectionContainer.children
+ lockSectionContainer.children
.mapNotNull { it.tag as? CustomizationSectionController<out SectionView> }
.forEach { controller -> controller.release() }
- sectionContainer.removeAllViews()
+ lockSectionContainer.removeAllViews()
+ homeSectionContainer.children
+ .mapNotNull { it.tag as? CustomizationSectionController<out SectionView> }
+ .forEach { controller -> controller.release() }
+ homeSectionContainer.removeAllViews()
}
return DisposableHandle { job.cancel() }
}
+
+ private fun createAndAddSections(
+ context: Context,
+ container: ViewGroup,
+ isOnLockScreen: Boolean,
+ sectionControllerProvider: (isOnLockScreen: Boolean) -> List<SectionController>,
+ ) {
+ sectionControllerProvider
+ .invoke(isOnLockScreen)
+ .filter { it.isAvailable(context) }
+ .forEach { controller ->
+ val viewToAdd =
+ controller.createView(
+ context,
+ CustomizationSectionController.ViewCreationParams(
+ isOnLockScreen,
+ )
+ )
+ viewToAdd.tag = controller
+ container.addView(viewToAdd)
+ }
+ }
}
diff --git a/src/com/android/wallpaper/picker/customization/ui/binder/ScreenPreviewBinder.kt b/src/com/android/wallpaper/picker/customization/ui/binder/ScreenPreviewBinder.kt
index a703b9a..299ca37 100644
--- a/src/com/android/wallpaper/picker/customization/ui/binder/ScreenPreviewBinder.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/binder/ScreenPreviewBinder.kt
@@ -38,7 +38,6 @@
import com.android.wallpaper.asset.CurrentWallpaperAssetVN
import com.android.wallpaper.model.LiveWallpaperInfo
import com.android.wallpaper.model.WallpaperInfo
-import com.android.wallpaper.module.CustomizationSections
import com.android.wallpaper.picker.WorkspaceSurfaceHolderCallback
import com.android.wallpaper.picker.customization.ui.viewmodel.ScreenPreviewViewModel
import com.android.wallpaper.util.ResourceUtils
@@ -55,8 +54,6 @@
@OptIn(ExperimentalCoroutinesApi::class)
object ScreenPreviewBinder {
interface Binding {
- fun show()
- fun hide()
fun sendMessage(
id: Int,
args: Bundle = Bundle.EMPTY,
@@ -79,9 +76,7 @@
lifecycleOwner: LifecycleOwner,
offsetToStart: Boolean,
dimWallpaper: Boolean = false,
- // TODO (b/270193793): add below fields to all usages of this class & remove default values
- screen: CustomizationSections.Screen = CustomizationSections.Screen.LOCK_SCREEN,
- onPreviewDirty: () -> Unit = {},
+ onPreviewDirty: () -> Unit,
): Binding {
val workspaceSurface: SurfaceView = previewView.requireViewById(R.id.workspace_surface)
val wallpaperSurface: SurfaceView = previewView.requireViewById(R.id.wallpaper_surface)
@@ -169,7 +164,7 @@
launch {
lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
var initialWallpaperUpdate = true
- viewModel.wallpaperUpdateEvents(screen)?.collect {
+ viewModel.wallpaperUpdateEvents()?.collect {
// Do not update screen preview on initial update,since the initial
// update results from starting or resuming the activity.
//
@@ -190,33 +185,17 @@
lifecycleOwner.lifecycleScope.launch {
wallpaperInfo = viewModel.getWallpaperInfo()
(wallpaperInfo as? LiveWallpaperInfo)?.let { liveWallpaperInfo ->
- if (WallpaperConnection.isPreviewAvailable()) {
- wallpaperConnection =
- WallpaperConnection(
- Intent(WallpaperService.SERVICE_INTERFACE).apply {
- setClassName(
- liveWallpaperInfo.wallpaperComponent
- .packageName,
- liveWallpaperInfo.wallpaperComponent.serviceName
- )
- },
- previewView.context,
- object :
- WallpaperConnection.WallpaperConnectionListener {
- override fun onWallpaperColorsChanged(
- colors: WallpaperColors?,
- displayId: Int
- ) {
- viewModel.onWallpaperColorsChanged(colors)
- }
- },
- wallpaperSurface,
- null,
- )
-
- wallpaperConnection?.connect()
- wallpaperConnection?.setVisibility(true)
- }
+ val connection =
+ wallpaperConnection
+ ?: createWallpaperConnection(
+ liveWallpaperInfo,
+ previewView,
+ viewModel,
+ wallpaperSurface
+ )
+ .also { wallpaperConnection = it }
+ connection.connect()
+ connection.setVisibility(true)
}
maybeLoadThumbnail(
activity = activity,
@@ -230,18 +209,6 @@
}
return object : Binding {
- override fun show() {
- previewView.isVisible = true
- wallpaperSurface.isVisible = true
- workspaceSurface.isVisible = true
- }
-
- override fun hide() {
- previewView.isVisible = false
- wallpaperSurface.isVisible = false
- workspaceSurface.isVisible = false
- }
-
override fun sendMessage(id: Int, args: Bundle) {
previewSurfaceCallback?.send(id, args)
}
@@ -256,6 +223,29 @@
}
}
+ private fun createWallpaperConnection(
+ liveWallpaperInfo: LiveWallpaperInfo,
+ previewView: CardView,
+ viewModel: ScreenPreviewViewModel,
+ wallpaperSurface: SurfaceView
+ ) =
+ WallpaperConnection(
+ Intent(WallpaperService.SERVICE_INTERFACE).apply {
+ setClassName(
+ liveWallpaperInfo.wallpaperComponent.packageName,
+ liveWallpaperInfo.wallpaperComponent.serviceName
+ )
+ },
+ previewView.context,
+ object : WallpaperConnection.WallpaperConnectionListener {
+ override fun onWallpaperColorsChanged(colors: WallpaperColors?, displayId: Int) {
+ viewModel.onWallpaperColorsChanged(colors)
+ }
+ },
+ wallpaperSurface,
+ null,
+ )
+
private fun removeAndReadd(view: View) {
(view.parent as? ViewGroup)?.let { parent ->
val indexInParent = parent.indexOfChild(view)
diff --git a/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewClickView.kt b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewClickView.kt
new file mode 100644
index 0000000..38d1442
--- /dev/null
+++ b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewClickView.kt
@@ -0,0 +1,88 @@
+/*
+ * 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.picker.customization.ui.section
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.MotionEvent
+import android.view.ViewConfiguration
+import android.widget.FrameLayout
+import kotlin.math.pow
+import kotlin.math.sqrt
+
+class ScreenPreviewClickView(
+ context: Context,
+ attrs: AttributeSet?,
+) :
+ FrameLayout(
+ context,
+ attrs,
+ ) {
+
+ private var downX = 0f
+ private var downY = 0f
+
+ override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
+ if (event.actionMasked == MotionEvent.ACTION_DOWN) {
+ downX = event.x
+ downY = event.y
+ }
+
+ // We want to intercept clicks so the Carousel MotionLayout child doesn't prevent users from
+ // clicking on the screen preview.
+ if (isClick(event, downX, downY)) {
+ return performClick()
+ }
+
+ return super.onInterceptTouchEvent(event)
+ }
+
+ companion object {
+ private fun isClick(event: MotionEvent, downX: Float, downY: Float): Boolean {
+ return when {
+ // It's not a click if the event is not an UP action (though it may become one
+ // later, when/if an UP is received).
+ event.actionMasked != MotionEvent.ACTION_UP -> false
+ // It's not a click if too much time has passed between the down and the current
+ // event.
+ gestureElapsedTime(event) > ViewConfiguration.getTapTimeout() -> false
+ // It's not a click if the touch traveled too far.
+ distanceMoved(event, downX, downY) > ViewConfiguration.getTouchSlop() -> false
+ // Otherwise, this is a click!
+ else -> true
+ }
+ }
+
+ /**
+ * Returns the distance that the pointer traveled in the touch gesture the given event is
+ * part of.
+ */
+ private fun distanceMoved(event: MotionEvent, downX: Float, downY: Float): Float {
+ val deltaX = event.x - downX
+ val deltaY = event.y - downY
+ return sqrt(deltaX.pow(2) + deltaY.pow(2))
+ }
+
+ /**
+ * Returns the elapsed time since the touch gesture the given event is part of has begun.
+ */
+ private fun gestureElapsedTime(event: MotionEvent): Long {
+ return event.eventTime - event.downTime
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewSectionController.kt b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewSectionController.kt
index 821c5bd..8cc5281 100644
--- a/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewSectionController.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewSectionController.kt
@@ -24,7 +24,6 @@
import android.view.LayoutInflater
import android.view.View
import androidx.cardview.widget.CardView
-import androidx.core.view.isVisible
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import com.android.systemui.shared.clocks.shared.model.ClockPreviewConstants
@@ -32,9 +31,9 @@
import com.android.wallpaper.model.CustomizationSectionController
import com.android.wallpaper.model.WallpaperColorsViewModel
import com.android.wallpaper.model.WallpaperInfo
+import com.android.wallpaper.model.WallpaperPreviewNavigator
import com.android.wallpaper.module.CurrentWallpaperInfoFactory
import com.android.wallpaper.module.CustomizationSections
-import com.android.wallpaper.picker.CategorySelectorFragment
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
import com.android.wallpaper.picker.customization.ui.binder.ScreenPreviewBinder
import com.android.wallpaper.picker.customization.ui.viewmodel.ScreenPreviewViewModel
@@ -51,16 +50,17 @@
open class ScreenPreviewSectionController(
private val activity: Activity,
private val lifecycleOwner: LifecycleOwner,
- private val initialScreen: CustomizationSections.Screen,
+ private val screen: CustomizationSections.Screen,
private val wallpaperInfoFactory: CurrentWallpaperInfoFactory,
private val colorViewModel: WallpaperColorsViewModel,
private val displayUtils: DisplayUtils,
- private val navigator: CustomizationSectionController.CustomizationSectionNavigationController,
+ private val wallpaperPreviewNavigator: WallpaperPreviewNavigator,
private val wallpaperInteractor: WallpaperInteractor,
) : CustomizationSectionController<ScreenPreviewView> {
- private lateinit var lockScreenBinding: ScreenPreviewBinder.Binding
- private lateinit var homeScreenBinding: ScreenPreviewBinder.Binding
+ private val isOnLockScreen: Boolean = screen == CustomizationSections.Screen.LOCK_SCREEN
+
+ protected lateinit var previewViewBinding: ScreenPreviewBinder.Binding
/** Override to hide the lock screen clock preview. */
open val hideLockScreenClockPreview = false
@@ -84,34 +84,59 @@
/* parent= */ null,
) as ScreenPreviewView
val onClickListener =
- View.OnClickListener { navigator.navigateTo(CategorySelectorFragment()) }
- view.setOnClickListener(onClickListener)
- val lockScreenView: CardView = view.requireViewById(R.id.lock_preview)
- val homeScreenView: CardView = view.requireViewById(R.id.home_preview)
+ View.OnClickListener {
+ lifecycleOwner.lifecycleScope.launch {
+ getWallpaperInfo()?.let { wallpaperInfo ->
+ wallpaperPreviewNavigator.showViewOnlyPreview(
+ wallpaperInfo,
+ !isOnLockScreen
+ )
+ }
+ }
+ }
+ view
+ .requireViewById<ScreenPreviewClickView>(R.id.screen_preview_click_view)
+ .setOnClickListener(onClickListener)
+ val previewView: CardView = view.requireViewById(R.id.preview)
- lockScreenBinding =
+ previewViewBinding =
ScreenPreviewBinder.bind(
activity = activity,
- previewView = lockScreenView,
+ previewView = previewView,
viewModel =
ScreenPreviewViewModel(
previewUtils =
- PreviewUtils(
- context = context,
- authority =
- context.getString(
- R.string.lock_screen_preview_provider_authority,
- ),
- ),
+ if (isOnLockScreen) {
+ PreviewUtils(
+ context = context,
+ authority =
+ context.getString(
+ R.string.lock_screen_preview_provider_authority,
+ ),
+ )
+ } else {
+ PreviewUtils(
+ context = context,
+ authorityMetadataKey =
+ context.getString(
+ R.string.grid_control_metadata_name,
+ ),
+ )
+ },
wallpaperInfoProvider = {
suspendCancellableCoroutine { continuation ->
wallpaperInfoFactory.createCurrentWallpaperInfos(
{ homeWallpaper, lockWallpaper, _ ->
- val wallpaper = lockWallpaper ?: homeWallpaper
+ val wallpaper =
+ if (isOnLockScreen) {
+ lockWallpaper ?: homeWallpaper
+ } else {
+ homeWallpaper ?: lockWallpaper
+ }
loadInitialColors(
context = context,
wallpaper = wallpaper,
- screen = CustomizationSections.Screen.LOCK_SCREEN,
+ screen = screen,
)
continuation.resume(wallpaper, null)
},
@@ -120,91 +145,23 @@
}
},
onWallpaperColorChanged = { colors ->
- colorViewModel.setLockWallpaperColors(colors)
- },
- initialExtrasProvider = {
- Bundle().apply {
- // Hide the clock from the system UI rendered preview so we can
- // place the carousel on top of it.
- putBoolean(
- ClockPreviewConstants.KEY_HIDE_CLOCK,
- hideLockScreenClockPreview,
- )
+ if (isOnLockScreen) {
+ colorViewModel.setLockWallpaperColors(colors)
+ } else {
+ colorViewModel.setHomeWallpaperColors(colors)
}
},
+ initialExtrasProvider = { getInitialExtras(isOnLockScreen) },
wallpaperInteractor = wallpaperInteractor,
+ screen = screen,
),
lifecycleOwner = lifecycleOwner,
offsetToStart = displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(activity),
- screen = CustomizationSections.Screen.LOCK_SCREEN,
- onPreviewDirty = {
- // only the visible binding should recreate the activity so it's not done twice
- if (lockScreenView.isVisible) {
- activity.recreate()
- }
- },
+ onPreviewDirty = { activity.recreate() },
)
- homeScreenBinding =
- ScreenPreviewBinder.bind(
- activity = activity,
- previewView = homeScreenView,
- viewModel =
- ScreenPreviewViewModel(
- previewUtils =
- PreviewUtils(
- context = context,
- authorityMetadataKey =
- context.getString(
- R.string.grid_control_metadata_name,
- ),
- ),
- wallpaperInfoProvider = {
- suspendCancellableCoroutine { continuation ->
- wallpaperInfoFactory.createCurrentWallpaperInfos(
- { homeWallpaper, lockWallpaper, _ ->
- val wallpaper = homeWallpaper ?: lockWallpaper
- loadInitialColors(
- context = context,
- wallpaper = wallpaper,
- screen = CustomizationSections.Screen.HOME_SCREEN
- )
- continuation.resume(wallpaper, null)
- },
- /* forceRefresh= */ true,
- )
- }
- },
- onWallpaperColorChanged = { colors ->
- colorViewModel.setHomeWallpaperColors(colors)
- },
- wallpaperInteractor = wallpaperInteractor,
- ),
- lifecycleOwner = lifecycleOwner,
- offsetToStart = displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(activity),
- screen = CustomizationSections.Screen.HOME_SCREEN,
- onPreviewDirty = {
- // only the visible binding should recreate the activity so it's not done twice
- if (homeScreenView.isVisible) {
- activity.recreate()
- }
- },
- )
-
- onScreenSwitched(isOnLockScreen = initialScreen == CustomizationSections.Screen.LOCK_SCREEN)
-
return view
}
- override fun onScreenSwitched(isOnLockScreen: Boolean) {
- if (isOnLockScreen) {
- lockScreenBinding.show()
- homeScreenBinding.hide()
- } else {
- lockScreenBinding.hide()
- homeScreenBinding.show()
- }
- }
-
private fun loadInitialColors(
context: Context,
wallpaper: WallpaperInfo?,
@@ -223,4 +180,37 @@
}
}
}
+
+ private suspend fun getWallpaperInfo(): WallpaperInfo? {
+ return suspendCancellableCoroutine { continuation ->
+ wallpaperInfoFactory.createCurrentWallpaperInfos(
+ { homeWallpaper, lockWallpaper, _ ->
+ continuation.resume(
+ if (isOnLockScreen) {
+ lockWallpaper ?: homeWallpaper
+ } else {
+ homeWallpaper
+ },
+ null
+ )
+ },
+ /* forceRefresh= */ true,
+ )
+ }
+ }
+
+ private fun getInitialExtras(isOnLockScreen: Boolean): Bundle? {
+ return if (isOnLockScreen) {
+ Bundle().apply {
+ // Hide the clock from the system UI rendered preview so we can
+ // place the carousel on top of it.
+ putBoolean(
+ ClockPreviewConstants.KEY_HIDE_CLOCK,
+ hideLockScreenClockPreview,
+ )
+ }
+ } else {
+ null
+ }
+ }
}
diff --git a/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewView.kt b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewView.kt
index c9e8022..b211ad5 100644
--- a/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewView.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/section/ScreenPreviewView.kt
@@ -19,11 +19,7 @@
import android.content.Context
import android.util.AttributeSet
-import android.view.MotionEvent
-import android.view.ViewConfiguration
import com.android.wallpaper.picker.SectionView
-import kotlin.math.pow
-import kotlin.math.sqrt
class ScreenPreviewView(
context: Context,
@@ -32,57 +28,4 @@
SectionView(
context,
attrs,
- ) {
-
- private var downX = 0f
- private var downY = 0f
-
- override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
- if (event.actionMasked == MotionEvent.ACTION_DOWN) {
- downX = event.x
- downY = event.y
- }
-
- // We want to intercept clicks so the Carousel MotionLayout child doesn't prevent users from
- // clicking on the screen preview.
- if (isClick(event, downX, downY)) {
- return performClick()
- }
-
- return super.onInterceptTouchEvent(event)
- }
-
- companion object {
- private fun isClick(event: MotionEvent, downX: Float, downY: Float): Boolean {
- return when {
- // It's not a click if the event is not an UP action (though it may become one
- // later, when/if an UP is received).
- event.actionMasked != MotionEvent.ACTION_UP -> false
- // It's not a click if too much time has passed between the down and the current
- // event.
- gestureElapsedTime(event) > ViewConfiguration.getTapTimeout() -> false
- // It's not a click if the touch traveled too far.
- distanceMoved(event, downX, downY) > ViewConfiguration.getTouchSlop() -> false
- // Otherwise, this is a click!
- else -> true
- }
- }
-
- /**
- * Returns the distance that the pointer traveled in the touch gesture the given event is
- * part of.
- */
- private fun distanceMoved(event: MotionEvent, downX: Float, downY: Float): Float {
- val deltaX = event.x - downX
- val deltaY = event.y - downY
- return sqrt(deltaX.pow(2) + deltaY.pow(2))
- }
-
- /**
- * Returns the elapsed time since the touch gesture the given event is part of has begun.
- */
- private fun gestureElapsedTime(event: MotionEvent): Long {
- return event.eventTime - event.downTime
- }
- }
-}
+ ) {}
diff --git a/src/com/android/wallpaper/picker/customization/ui/section/WallpaperQuickSwitchSectionController.kt b/src/com/android/wallpaper/picker/customization/ui/section/WallpaperQuickSwitchSectionController.kt
index d54e9c0..42201a7 100644
--- a/src/com/android/wallpaper/picker/customization/ui/section/WallpaperQuickSwitchSectionController.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/section/WallpaperQuickSwitchSectionController.kt
@@ -48,9 +48,6 @@
R.layout.wallpaper_quick_switch_section,
/* parent= */ null,
) as WallpaperQuickSwitchView
- viewModel.setOnLockScreen(
- isLockScreenSelected = screen == CustomizationSections.Screen.LOCK_SCREEN,
- )
WallpaperQuickSwitchSectionBinder.bind(
view = view,
viewModel = viewModel,
@@ -61,8 +58,4 @@
)
return view
}
-
- override fun onScreenSwitched(isOnLockScreen: Boolean) {
- viewModel.setOnLockScreen(isLockScreenSelected = isOnLockScreen)
- }
}
diff --git a/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModel.kt b/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModel.kt
index 14c0715..c7c87f4 100644
--- a/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModel.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModel.kt
@@ -22,7 +22,11 @@
import androidx.lifecycle.AbstractSavedStateViewModelFactory
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
import androidx.savedstate.SavedStateRegistryOwner
+import com.android.wallpaper.module.CustomizationSections
+import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
+import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.undo.domain.interactor.UndoInteractor
import com.android.wallpaper.picker.undo.ui.viewmodel.UndoViewModel
import kotlinx.coroutines.flow.Flow
@@ -35,6 +39,7 @@
@VisibleForTesting
constructor(
undoInteractor: UndoInteractor,
+ wallpaperInteractor: WallpaperInteractor,
private val savedStateHandle: SavedStateHandle,
) : ViewModel() {
@@ -43,6 +48,28 @@
interactor = undoInteractor,
)
+ private val homeWallpaperQuickSwitchViewModel: WallpaperQuickSwitchViewModel =
+ WallpaperQuickSwitchViewModel(
+ interactor = wallpaperInteractor,
+ destination = WallpaperDestination.HOME,
+ coroutineScope = viewModelScope,
+ )
+
+ private val lockWallpaperQuickSwitchViewModel: WallpaperQuickSwitchViewModel =
+ WallpaperQuickSwitchViewModel(
+ interactor = wallpaperInteractor,
+ destination = WallpaperDestination.LOCK,
+ coroutineScope = viewModelScope,
+ )
+
+ fun getWallpaperQuickSwitchViewModel(
+ screen: CustomizationSections.Screen
+ ): WallpaperQuickSwitchViewModel {
+ return if (screen == CustomizationSections.Screen.LOCK_SCREEN)
+ lockWallpaperQuickSwitchViewModel
+ else homeWallpaperQuickSwitchViewModel
+ }
+
private val _isOnLockScreen = MutableStateFlow(true)
/** Whether we are on the lock screen. If `false`, we are on the home screen. */
val isOnLockScreen: Flow<Boolean> = _isOnLockScreen.asStateFlow()
@@ -105,6 +132,7 @@
owner: SavedStateRegistryOwner,
defaultArgs: Bundle? = null,
undoInteractor: UndoInteractor,
+ wallpaperInteractor: WallpaperInteractor,
): AbstractSavedStateViewModelFactory =
object : AbstractSavedStateViewModelFactory(owner, defaultArgs) {
@Suppress("UNCHECKED_CAST")
@@ -115,6 +143,7 @@
): T {
return CustomizationPickerViewModel(
undoInteractor = undoInteractor,
+ wallpaperInteractor = wallpaperInteractor,
savedStateHandle = handle,
)
as T
diff --git a/src/com/android/wallpaper/picker/customization/ui/viewmodel/ScreenPreviewViewModel.kt b/src/com/android/wallpaper/picker/customization/ui/viewmodel/ScreenPreviewViewModel.kt
index 1ceaa80..6fd7962 100644
--- a/src/com/android/wallpaper/picker/customization/ui/viewmodel/ScreenPreviewViewModel.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/viewmodel/ScreenPreviewViewModel.kt
@@ -32,17 +32,17 @@
private val initialExtrasProvider: () -> Bundle? = { null },
private val wallpaperInfoProvider: suspend () -> WallpaperInfo?,
private val onWallpaperColorChanged: (WallpaperColors?) -> Unit = {},
- // TODO (b/270193793): add below field to all usages, remove default value & make non-nullable
- private val wallpaperInteractor: WallpaperInteractor? = null,
+ private val wallpaperInteractor: WallpaperInteractor,
+ private val screen: CustomizationSections.Screen,
) {
/** Returns whether wallpaper picker should handle reload */
fun shouldHandleReload(): Boolean {
- return wallpaperInteractor?.let { it.shouldHandleReload() } ?: true
+ return wallpaperInteractor.shouldHandleReload()
}
/** Returns a flow that is updated whenever the wallpaper has been updated */
- fun wallpaperUpdateEvents(screen: CustomizationSections.Screen): Flow<WallpaperModel>? {
- return wallpaperInteractor?.wallpaperUpdateEvents(screen)
+ fun wallpaperUpdateEvents(): Flow<WallpaperModel?>? {
+ return wallpaperInteractor.wallpaperUpdateEvents(screen)
}
fun getInitialExtras(): Bundle? {
diff --git a/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModel.kt b/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModel.kt
index 105dcff..94bd099 100644
--- a/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModel.kt
+++ b/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModel.kt
@@ -17,23 +17,15 @@
package com.android.wallpaper.picker.customization.ui.viewmodel
-import android.os.Bundle
-import androidx.annotation.VisibleForTesting
-import androidx.lifecycle.AbstractSavedStateViewModelFactory
-import androidx.lifecycle.SavedStateHandle
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.viewModelScope
-import androidx.savedstate.SavedStateRegistryOwner
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.distinctUntilChangedBy
-import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.shareIn
import kotlinx.coroutines.launch
@@ -41,205 +33,147 @@
/** Models UI state for views that can render wallpaper quick switching. */
@OptIn(ExperimentalCoroutinesApi::class)
class WallpaperQuickSwitchViewModel
-@VisibleForTesting
constructor(
private val interactor: WallpaperInteractor,
- maxOptions: Int,
-) : ViewModel() {
- private val isLockScreenSelected = MutableStateFlow(false)
+ private val destination: WallpaperDestination,
+ private val coroutineScope: CoroutineScope,
+ maxOptions: Int = MAX_OPTIONS,
+) {
private val selectedWallpaperId: Flow<String> =
- isLockScreenSelected
- .flatMapLatest { isOnLockScreen ->
- interactor.selectedWallpaperId(
- destination =
- if (isOnLockScreen) {
- WallpaperDestination.LOCK
- } else {
- WallpaperDestination.HOME
- },
- )
- }
+ interactor
+ .selectedWallpaperId(destination)
.shareIn(
- scope = viewModelScope,
+ scope = coroutineScope,
started = SharingStarted.WhileSubscribed(),
replay = 1,
)
private val selectingWallpaperId: Flow<String?> =
- isLockScreenSelected
- .flatMapLatest { isOnLockScreen ->
- interactor.selectingWallpaperId(
- destination =
- if (isOnLockScreen) {
- WallpaperDestination.LOCK
- } else {
- WallpaperDestination.HOME
- },
- )
- }
+ interactor
+ .selectingWallpaperId(destination)
.shareIn(
- scope = viewModelScope,
+ scope = coroutineScope,
started = SharingStarted.WhileSubscribed(),
replay = 1,
)
val options: Flow<List<WallpaperQuickSwitchOptionViewModel>> =
- isLockScreenSelected
- .flatMapLatest { isOnLockScreen ->
- interactor
- .previews(
- destination =
- if (isOnLockScreen) {
- WallpaperDestination.LOCK
- } else {
- WallpaperDestination.HOME
- },
- maxResults = maxOptions,
- )
- .distinctUntilChangedBy { previews ->
- // Produce a key that's the same if the same set of wallpapers is available,
- // even if in a different order. This is so that the view can keep from
- // moving the wallpaper options around when the sort order changes as the
- // user selects different wallpapers.
- previews.map { preview -> preview.wallpaperId }.sorted().joinToString(",")
- }
- .map { previews ->
- // True if any option is becoming selected following user click.
- val isSomethingBecomingSelectedFlow: Flow<Boolean> =
- selectingWallpaperId.distinctUntilChanged().map { it != null }
+ interactor
+ .previews(
+ destination = destination,
+ maxResults = maxOptions,
+ )
+ .distinctUntilChangedBy { previews ->
+ // Produce a key that's the same if the same set of wallpapers is available,
+ // even if in a different order. This is so that the view can keep from
+ // moving the wallpaper options around when the sort order changes as the
+ // user selects different wallpapers.
+ previews
+ .map { preview -> preview.wallpaperId + preview.lastUpdated }
+ .sorted()
+ .joinToString(",")
+ }
+ .map { previews ->
+ // True if any option is becoming selected following user click.
+ val isSomethingBecomingSelectedFlow: Flow<Boolean> =
+ selectingWallpaperId.distinctUntilChanged().map { it != null }
- previews.map { preview ->
- // True if this option is currently selected.
- val isSelectedFlow: Flow<Boolean> =
- selectedWallpaperId.distinctUntilChanged().map {
- it == preview.wallpaperId
- }
- // True if this option is becoming the selected one following user
- // click.
- val isBecomingSelectedFlow: Flow<Boolean> =
- selectingWallpaperId.distinctUntilChanged().map {
- it == preview.wallpaperId
- }
+ previews.map { preview ->
+ // True if this option is currently selected.
+ val isSelectedFlow: Flow<Boolean> =
+ selectedWallpaperId.distinctUntilChanged().map { it == preview.wallpaperId }
+ // True if this option is becoming the selected one following user click.
+ val isBecomingSelectedFlow: Flow<Boolean> =
+ selectingWallpaperId.distinctUntilChanged().map {
+ it == preview.wallpaperId
+ }
- WallpaperQuickSwitchOptionViewModel(
+ WallpaperQuickSwitchOptionViewModel(
+ wallpaperId = preview.wallpaperId,
+ placeholderColor = preview.placeholderColor,
+ thumbnail = {
+ interactor.loadThumbnail(
wallpaperId = preview.wallpaperId,
- placeholderColor = preview.placeholderColor,
- thumbnail = {
- interactor.loadThumbnail(
- wallpaperId = preview.wallpaperId,
- )
- },
- isLarge =
- combine(
- isSelectedFlow,
- isBecomingSelectedFlow,
- isSomethingBecomingSelectedFlow,
- ) { isSelected, isBecomingSelected, isSomethingBecomingSelected
- ->
- // The large option is the one that's currently selected or
- // the one that is becoming the selected one following user
- // click.
- (isSelected && !isSomethingBecomingSelected) ||
- isBecomingSelected
- },
- // We show the progress indicator if the option is in the process of
- // becoming the selected one following user click.
- isProgressIndicatorVisible = isBecomingSelectedFlow,
- isSelectionBorderVisible =
- combine(
- isSelectedFlow,
- isBecomingSelectedFlow,
- isSomethingBecomingSelectedFlow,
- ) { isSelected, isBeingSelected, isSomethingBecomingSelected ->
- // The selection border is shown for the option that is the
- // one that's currently selected or the one that is becoming
- // the selected one following user click.
- (isSelected && !isSomethingBecomingSelected) ||
- isBeingSelected
- },
- isSelectionIconVisible =
- combine(
- isSelectedFlow,
- isSomethingBecomingSelectedFlow,
- ) { isSelected, isSomethingBecomingSelected ->
- // The selection icon is shown for the option that is
- // currently selected but only if nothing else is becoming
- // selected. If anything is being selected following user
- // click, the selection icon is not shown on any option.
- isSelected && !isSomethingBecomingSelected
- },
- onSelected =
- combine(
- isSelectedFlow,
- isBecomingSelectedFlow,
- isSomethingBecomingSelectedFlow,
- ) { isSelected, isBeingSelected, isSomethingBecomingSelected
- ->
- // An option is selectable if it is not itself becoming
- // selected following user click or if nothing else is
- // becoming selected but this option is not the selected
- // one.
- (isSomethingBecomingSelected && !isBeingSelected) ||
- (!isSomethingBecomingSelected && !isSelected)
- }
- .distinctUntilChanged()
- .map { isSelectable ->
- if (isSelectable) {
- {
- // A selectable option can become selected.
- viewModelScope.launch {
- interactor.setWallpaper(
- destination =
- if (isOnLockScreen) {
- WallpaperDestination.LOCK
- } else {
- WallpaperDestination.HOME
- },
- wallpaperId = preview.wallpaperId,
- )
- }
- }
- } else {
- // A non-selectable option cannot become selected.
- null
+ )
+ },
+ isLarge =
+ combine(
+ isSelectedFlow,
+ isBecomingSelectedFlow,
+ isSomethingBecomingSelectedFlow,
+ ) { isSelected, isBecomingSelected, isSomethingBecomingSelected,
+ ->
+ // The large option is the one that's currently selected or
+ // the one that is becoming the selected one following user
+ // click.
+ (isSelected && !isSomethingBecomingSelected) || isBecomingSelected
+ },
+ // We show the progress indicator if the option is in the process of
+ // becoming the selected one following user click.
+ isProgressIndicatorVisible = isBecomingSelectedFlow,
+ isSelectionBorderVisible =
+ combine(
+ isSelectedFlow,
+ isBecomingSelectedFlow,
+ isSomethingBecomingSelectedFlow,
+ ) { isSelected, isBeingSelected, isSomethingBecomingSelected ->
+ // The selection border is shown for the option that is the
+ // one that's currently selected or the one that is becoming
+ // the selected one following user click.
+ (isSelected && !isSomethingBecomingSelected) || isBeingSelected
+ },
+ isSelectionIconVisible =
+ combine(
+ isSelectedFlow,
+ isSomethingBecomingSelectedFlow,
+ ) { isSelected, isSomethingBecomingSelected ->
+ // The selection icon is shown for the option that is
+ // currently selected but only if nothing else is becoming
+ // selected. If anything is being selected following user
+ // click, the selection icon is not shown on any option.
+ isSelected && !isSomethingBecomingSelected
+ },
+ onSelected =
+ combine(
+ isSelectedFlow,
+ isBecomingSelectedFlow,
+ isSomethingBecomingSelectedFlow,
+ ) { isSelected, isBeingSelected, isSomethingBecomingSelected,
+ ->
+ // An option is selectable if it is not itself becoming
+ // selected following user click or if nothing else is
+ // becoming selected but this option is not the selected
+ // one.
+ (isSomethingBecomingSelected && !isBeingSelected) ||
+ (!isSomethingBecomingSelected && !isSelected)
+ }
+ .distinctUntilChanged()
+ .map { isSelectable ->
+ if (isSelectable) {
+ {
+ // A selectable option can become selected.
+ coroutineScope.launch {
+ interactor.setWallpaper(
+ destination = destination,
+ wallpaperId = preview.wallpaperId,
+ )
}
}
- )
- }
- }
+ } else {
+ // A non-selectable option cannot become selected.
+ null
+ }
+ }
+ )
+ }
}
.shareIn(
- scope = viewModelScope,
+ scope = coroutineScope,
started = SharingStarted.Lazily,
replay = 1,
)
- fun setOnLockScreen(isLockScreenSelected: Boolean) {
- this.isLockScreenSelected.value = isLockScreenSelected
- }
-
companion object {
- @JvmStatic
- fun newFactory(
- owner: SavedStateRegistryOwner,
- defaultArgs: Bundle? = null,
- interactor: WallpaperInteractor,
- ): AbstractSavedStateViewModelFactory =
- object : AbstractSavedStateViewModelFactory(owner, defaultArgs) {
- @Suppress("UNCHECKED_CAST")
- override fun <T : ViewModel> create(
- key: String,
- modelClass: Class<T>,
- handle: SavedStateHandle,
- ): T {
- return WallpaperQuickSwitchViewModel(
- interactor = interactor,
- maxOptions = MAX_OPTIONS,
- )
- as T
- }
- }
-
/** The maximum number of options to show, including the currently-selected one. */
private const val MAX_OPTIONS = 5
}
diff --git a/src/com/android/wallpaper/picker/individual/CreativeCategoryAdapter.kt b/src/com/android/wallpaper/picker/individual/CreativeCategoryAdapter.kt
new file mode 100644
index 0000000..d268f42
--- /dev/null
+++ b/src/com/android/wallpaper/picker/individual/CreativeCategoryAdapter.kt
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2023 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.picker.individual
+
+import android.app.Activity
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
+import com.android.wallpaper.R
+import com.android.wallpaper.model.LiveWallpaperInfo
+import com.android.wallpaper.model.WallpaperInfo
+
+/**
+ * CreativeCategoryAdapter subclass for a creative category wallpaper tile in the RecyclerView which
+ * internally creates the CreativeCategoryIndividualHolder instance for the tile .
+ */
+class CreativeCategoryAdapter(
+ var items: List<WallpaperInfo>,
+ private val activity: Activity,
+ private val tileSizePx: Int,
+) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
+ return createIndividualHolder(parent)
+ }
+
+ override fun getItemCount(): Int {
+ return items.size
+ }
+
+ override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
+ val wallpaperInfo = items[position] as LiveWallpaperInfo
+ wallpaperInfo.setVisibleTitle(true)
+ (holder as CreativeCategoryIndividualHolder?)?.bindWallpaper(wallpaperInfo)
+ }
+
+ private fun createIndividualHolder(parent: ViewGroup): RecyclerView.ViewHolder {
+ val layoutInflater = LayoutInflater.from(activity)
+ val view: View = layoutInflater.inflate(R.layout.labeled_grid_item_image, parent, false)
+
+ return CreativeCategoryIndividualHolder(activity, tileSizePx, view)
+ }
+}
diff --git a/src/com/android/wallpaper/picker/individual/CreativeCategoryHolder.kt b/src/com/android/wallpaper/picker/individual/CreativeCategoryHolder.kt
new file mode 100644
index 0000000..3138435
--- /dev/null
+++ b/src/com/android/wallpaper/picker/individual/CreativeCategoryHolder.kt
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 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.
+ */
+
+import android.app.Activity
+import android.view.View
+import androidx.recyclerview.widget.RecyclerView
+import com.android.wallpaper.R
+import com.android.wallpaper.model.WallpaperInfo
+import com.android.wallpaper.picker.individual.CreativeCategoryAdapter
+import com.android.wallpaper.picker.individual.MarginItemDecoration
+
+/**
+ * CreativeCategoryHolder subclass for a creative category wallpaper tile in the individual
+ * wallpaper picker grid. This helps us create a different view for the creative category tiles in
+ * the individual picker.
+ */
+class CreativeCategoryHolder(private val mActivity: Activity, itemView: View) :
+ RecyclerView.ViewHolder(itemView) {
+ private var recyclerViewCreativeCategory: RecyclerView
+ private var adapter: CreativeCategoryAdapter? = null
+
+ init {
+ recyclerViewCreativeCategory = itemView.findViewById(R.id.recyclerview_container)
+ recyclerViewCreativeCategory.addItemDecoration(
+ MarginItemDecoration(
+ mActivity.resources.getInteger(R.integer.creative_category_individual_item_padding)
+ )
+ )
+ }
+
+ fun bind(items: List<WallpaperInfo>, height: Int) {
+ if (adapter == null) {
+ adapter = CreativeCategoryAdapter(items, mActivity, height)
+ recyclerViewCreativeCategory.adapter = adapter
+ } else {
+ adapter?.items = items
+ adapter?.notifyDataSetChanged()
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/picker/individual/CreativeCategoryIndividualHolder.java b/src/com/android/wallpaper/picker/individual/CreativeCategoryIndividualHolder.java
new file mode 100755
index 0000000..87e438c
--- /dev/null
+++ b/src/com/android/wallpaper/picker/individual/CreativeCategoryIndividualHolder.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2023 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.picker.individual;
+
+import static com.android.wallpaper.picker.WallpaperPickerDelegate.PREVIEW_LIVE_WALLPAPER_REQUEST_CODE;
+import static com.android.wallpaper.picker.WallpaperPickerDelegate.PREVIEW_WALLPAPER_REQUEST_CODE;
+
+import android.app.Activity;
+import android.util.Log;
+import android.view.View;
+
+import com.android.wallpaper.model.InlinePreviewIntentFactory;
+import com.android.wallpaper.model.LiveWallpaperInfo;
+import com.android.wallpaper.model.WallpaperInfo;
+import com.android.wallpaper.module.InjectorProvider;
+import com.android.wallpaper.module.UserEventLogger;
+import com.android.wallpaper.module.WallpaperPersister;
+import com.android.wallpaper.picker.PreviewActivity;
+
+/**
+ * CreativeCategoryIndividualHolder subclass for a creative category wallpaper tile in the
+ * RecyclerView for which a click should show a full-screen preview of the wallpaper.
+ */
+class CreativeCategoryIndividualHolder extends IndividualHolder implements View.OnClickListener {
+ private static final String TAG = "CreativeCategoryIndividualHolder";
+
+ private WallpaperPersister mWallpaperPersister;
+ private InlinePreviewIntentFactory mPreviewIntentFactory;
+
+ // These scale factors allow us to tie up the height and width
+ // of the creative category wallpaper tiles to normal (non-creative)
+ // wallpaper tiles. This is done so that we can have different/varying sizes for
+ // recycler view tiles for creative categories.
+ private static final float TILE_HEIGHT_SCALE_FACTOR = 1.2f;
+ private static final float TILE_WIDTH_SCALE_FACTOR = 0.95f;
+
+ CreativeCategoryIndividualHolder(
+ Activity hostActivity, int tileHeightPx, View itemView) {
+ super(hostActivity, (int) (TILE_HEIGHT_SCALE_FACTOR * tileHeightPx),
+ (int) (TILE_WIDTH_SCALE_FACTOR * tileHeightPx), itemView);
+ mTileLayout.setOnClickListener(this);
+
+ mWallpaperPersister = InjectorProvider.getInjector().getWallpaperPersister(hostActivity);
+ mPreviewIntentFactory = new PreviewActivity.PreviewActivityIntentFactory();
+ }
+
+ @Override
+ public void onClick(View view) {
+ if (mActivity.isFinishing()) {
+ Log.w(TAG, "onClick received on VH on finishing Activity");
+ return;
+ }
+ UserEventLogger eventLogger =
+ InjectorProvider.getInjector().getUserEventLogger(mActivity);
+ eventLogger.logIndividualWallpaperSelected(mWallpaper.getCollectionId(mActivity));
+
+ showPreview(mWallpaper);
+ }
+
+ /**
+ * Shows the preview activity for the given wallpaper.
+ */
+ private void showPreview(WallpaperInfo wallpaperInfo) {
+ mWallpaperPersister.setWallpaperInfoInPreview(wallpaperInfo);
+ wallpaperInfo.showPreview(mActivity, mPreviewIntentFactory,
+ wallpaperInfo instanceof LiveWallpaperInfo ? PREVIEW_LIVE_WALLPAPER_REQUEST_CODE
+ : PREVIEW_WALLPAPER_REQUEST_CODE);
+ }
+
+}
diff --git a/src/com/android/wallpaper/picker/individual/IndividualHolder.java b/src/com/android/wallpaper/picker/individual/IndividualHolder.java
index feff2b8..7f397ea 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualHolder.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualHolder.java
@@ -41,7 +41,8 @@
protected TextView mTitleView;
protected WallpaperInfo mWallpaper;
- public IndividualHolder(Activity hostActivity, int tileHeightPx, View itemView) {
+ IndividualHolder(Activity hostActivity, int tileHeightPx, int tileWidthPx,
+ View itemView) {
super(itemView);
mActivity = hostActivity;
@@ -50,6 +51,7 @@
mOverlayIconView = (ImageView) itemView.findViewById(R.id.overlay_icon);
mTitleView = (TextView) itemView.findViewById(R.id.title);
mWallpaperContainer = itemView.findViewById(R.id.wallpaper_container);
+ mTileLayout.getLayoutParams().width = tileWidthPx;
mWallpaperContainer.getLayoutParams().height = tileHeightPx;
}
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment2.kt b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment2.kt
index 3186eb5..fad1d50 100644
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment2.kt
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment2.kt
@@ -15,6 +15,7 @@
*/
package com.android.wallpaper.picker.individual
+import CreativeCategoryHolder
import android.app.Activity
import android.app.ProgressDialog
import android.app.WallpaperManager
@@ -127,6 +128,7 @@
private var shouldReloadWallpapers = false
private lateinit var categoryProvider: CategoryProvider
private var appliedWallpaperIds: Set<String> = setOf()
+ private var mIsCreativeWallpaperEnabled = false
/**
* Staged error dialog fragments that were unable to be shown when the activity didn't allow
@@ -140,6 +142,7 @@
super.onCreate(savedInstanceState)
val injector = InjectorProvider.getInjector()
val appContext = requireContext().applicationContext
+ mIsCreativeWallpaperEnabled = injector.getFlags().isAIWallpaperEnabled(appContext)
wallpaperManager = WallpaperManager.getInstance(appContext)
packageStatusNotifier = injector.getPackageStatusNotifier(appContext)
items = ArrayList()
@@ -214,45 +217,45 @@
isWallpapersReceived = false
updateLoading()
val context = requireContext()
+ val userCreatedWallpapers = mutableListOf<WallpaperInfo>()
+
category?.fetchWallpapers(
context.applicationContext,
{ fetchedWallpapers ->
isWallpapersReceived = true
updateLoading()
- val byGroup = fetchedWallpapers.groupBy { it.getGroupName(context) }
- appliedWallpaperIds = getAppliedWallpaperIds()
- byGroup.forEach { (groupName, wallpapers) ->
- if (!TextUtils.isEmpty(groupName)) {
- items.add(
- if (items.isEmpty()) {
- PickerItem.FirstHeaderItem(groupName)
- } else {
- PickerItem.HeaderItem(groupName)
- }
- )
+ val supportsUserCreated = category?.supportsUserCreatedWallpapers() == true
+ val byGroup = fetchedWallpapers.groupBy { it.getGroupName(context) }.toMutableMap()
+ val appliedWallpaperIds = getAppliedWallpaperIds()
+ val firstEntry = byGroup.keys.firstOrNull()
+ val currentWallpaper: android.app.WallpaperInfo? =
+ WallpaperManager.getInstance(context).wallpaperInfo
+
+ // Handle first group (templates/items that allow to create a new wallpaper)
+ if (mIsCreativeWallpaperEnabled && firstEntry != null && supportsUserCreated) {
+ val wallpapers = byGroup.getValue(firstEntry)
+
+ if (wallpapers.size > 1 && !TextUtils.isEmpty(firstEntry)) {
+ addItemHeader(firstEntry, items.isEmpty())
+ addTemplates(wallpapers, userCreatedWallpapers)
+ byGroup.remove(firstEntry)
}
- val currentWallpaper = WallpaperManager.getInstance(context).wallpaperInfo
- items.addAll(
- wallpapers.map {
- val isApplied =
- if (it is LiveWallpaperInfo) {
- it.isApplied(currentWallpaper)
- } else {
- appliedWallpaperIds.contains(it.wallpaperId)
- }
- PickerItem.WallpaperItem(it, isApplied)
+ }
+
+ // Handle other groups
+ if (byGroup.isNotEmpty()) {
+ byGroup.forEach { (groupName, wallpapers) ->
+ if (!TextUtils.isEmpty(groupName)) {
+ addItemHeader(groupName, items.isEmpty())
}
- )
+ addWallpaperItems(wallpapers, currentWallpaper, appliedWallpaperIds)
+ }
}
maybeSetUpImageGrid()
-
- // Wallpapers may load after the adapter is initialized, in which case we have
- // to explicitly notify that the data set has changed.
adapter?.notifyDataSetChanged()
+
+ // Finish activity if no wallpapers are found (on phone)
if (fetchedWallpapers.isEmpty()) {
- // If there are no more wallpapers and we're on phone, just finish the
- // Activity.
- val activity: Activity? = activity
activity?.finish()
}
},
@@ -260,6 +263,56 @@
)
}
+ // Add item header based on whether it's the first one or not
+ private fun addItemHeader(groupName: String, isFirst: Boolean) {
+ items.add(
+ if (isFirst) {
+ PickerItem.FirstHeaderItem(groupName)
+ } else {
+ PickerItem.HeaderItem(groupName)
+ }
+ )
+ }
+
+ /**
+ * This function iterates through a set of templates, which represent items that users can
+ * select to create new wallpapers. For each template, it creates a PickerItem of type
+ * CreativeCollection.
+ */
+ private fun addTemplates(
+ wallpapers: List<WallpaperInfo>,
+ userCreatedWallpapers: MutableList<WallpaperInfo>
+ ) {
+ wallpapers.map {
+ if (category?.supportsUserCreatedWallpapers() == true) {
+ userCreatedWallpapers.add(it)
+ }
+ }
+
+ if (userCreatedWallpapers.isNotEmpty()) {
+ items.add(PickerItem.CreativeCollection(userCreatedWallpapers))
+ }
+ }
+
+ /**
+ * This function iterates through a set of wallpaper items, and creates a PickerItem of type
+ * WallpaperItem
+ */
+ private fun addWallpaperItems(
+ wallpapers: List<WallpaperInfo>,
+ currentWallpaper: android.app.WallpaperInfo?,
+ appliedWallpaperIds: Set<String>
+ ) {
+ items.addAll(
+ wallpapers.map {
+ val isApplied =
+ if (it is LiveWallpaperInfo) it.isApplied(currentWallpaper)
+ else appliedWallpaperIds.contains(it.wallpaperId)
+ PickerItem.WallpaperItem(it, isApplied)
+ }
+ )
+ }
+
private fun registerPackageListener(category: Category) {
if (category.supportsThirdParty()) {
appStatusListener =
@@ -379,9 +432,9 @@
)
val tileSizePx =
if (isFewerColumnLayout()) {
- SizeCalculator.getFeaturedIndividualTileSize(activity!!)
+ SizeCalculator.getFeaturedIndividualTileSize(requireActivity())
} else {
- SizeCalculator.getIndividualTileSize(activity!!)
+ SizeCalculator.getIndividualTileSize(requireActivity())
}
setUpImageGrid(tileSizePx, checkNotNull(category))
imageGrid.setAccessibilityDelegateCompat(
@@ -394,7 +447,8 @@
}
private fun isFewerColumnLayout(): Boolean =
- items.count { it is PickerItem.WallpaperItem } <= MAX_CAPACITY_IN_FEWER_COLUMN_LAYOUT
+ (!mIsCreativeWallpaperEnabled || category?.supportsUserCreatedWallpapers() == false) &&
+ items.count { it is PickerItem.WallpaperItem } <= MAX_CAPACITY_IN_FEWER_COLUMN_LAYOUT
private fun getGridItemPaddingHorizontal(): Int {
return if (isFewerColumnLayout()) {
@@ -442,6 +496,7 @@
object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return when (items[position]) {
+ is PickerItem.CreativeCollection,
is PickerItem.FirstHeaderItem,
is PickerItem.HeaderItem -> {
gridLayoutManager.spanCount
@@ -545,7 +600,7 @@
progressDialog.show()
this.progressDialog = progressDialog
}
- val appContext = activity!!.applicationContext
+ val appContext = requireActivity().applicationContext
wallpaperRotationInitializer?.setFirstWallpaperInRotation(
appContext,
networkPreference,
@@ -678,6 +733,8 @@
class HeaderItem(title: CharSequence) : PickerItem(title)
class FirstHeaderItem(title: CharSequence) : PickerItem(title)
+
+ class CreativeCollection(val templates: List<WallpaperInfo>) : PickerItem()
}
/** RecyclerView Adapter subclass for the wallpaper tiles in the RecyclerView. */
@@ -694,12 +751,14 @@
const val ITEM_VIEW_TYPE_MY_PHOTOS = 3
const val ITEM_VIEW_TYPE_HEADER = 4
const val ITEM_VIEW_TYPE_HEADER_TOP = 5
+ const val ITEM_VIEW_TYPE_CREATIVE = 6
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return when (viewType) {
ITEM_VIEW_TYPE_INDIVIDUAL_WALLPAPER -> createIndividualHolder(parent)
ITEM_VIEW_TYPE_MY_PHOTOS -> createMyPhotosHolder(parent)
+ ITEM_VIEW_TYPE_CREATIVE -> creativeCategoryHolder(parent)
ITEM_VIEW_TYPE_HEADER -> createTitleHolder(parent, /* removePaddingTop= */ false)
ITEM_VIEW_TYPE_HEADER_TOP -> createTitleHolder(parent, /* removePaddingTop= */ true)
else -> {
@@ -721,12 +780,14 @@
is PickerItem.WallpaperItem -> ITEM_VIEW_TYPE_INDIVIDUAL_WALLPAPER
is PickerItem.HeaderItem -> ITEM_VIEW_TYPE_HEADER
is PickerItem.FirstHeaderItem -> ITEM_VIEW_TYPE_HEADER_TOP
+ is PickerItem.CreativeCollection -> ITEM_VIEW_TYPE_CREATIVE
}
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (val viewType = getItemViewType(position)) {
+ ITEM_VIEW_TYPE_CREATIVE -> bindCreativeCategoryHolder(holder, position)
ITEM_VIEW_TYPE_INDIVIDUAL_WALLPAPER -> bindIndividualHolder(holder, position)
ITEM_VIEW_TYPE_MY_PHOTOS -> (holder as MyPhotosViewHolder?)!!.bind()
ITEM_VIEW_TYPE_HEADER,
@@ -754,6 +815,16 @@
return PreviewIndividualHolder(activity, tileSizePx.y, view)
}
+ private fun creativeCategoryHolder(parent: ViewGroup): RecyclerView.ViewHolder {
+ val layoutInflater = LayoutInflater.from(activity)
+ val view: View =
+ layoutInflater.inflate(R.layout.creative_category_holder, parent, false)
+ return CreativeCategoryHolder(
+ activity,
+ view,
+ )
+ }
+
private fun createMyPhotosHolder(parent: ViewGroup): RecyclerView.ViewHolder {
val layoutInflater = LayoutInflater.from(activity)
val view: View = layoutInflater.inflate(R.layout.grid_item_my_photos, parent, false)
@@ -765,6 +836,15 @@
)
}
+ private fun bindCreativeCategoryHolder(holder: RecyclerView.ViewHolder, position: Int) {
+ val wallpaperIndex = if (category.supportsCustomPhotos()) position - 1 else position
+ val item = items[wallpaperIndex] as PickerItem.CreativeCollection
+ (holder as CreativeCategoryHolder).bind(
+ item.templates,
+ SizeCalculator.getFeaturedIndividualTileSize(activity).y
+ )
+ }
+
private fun createTitleHolder(
parent: ViewGroup,
removePaddingTop: Boolean
diff --git a/src/com/android/wallpaper/picker/individual/MarginItemDecoration.kt b/src/com/android/wallpaper/picker/individual/MarginItemDecoration.kt
new file mode 100644
index 0000000..c6dc97c
--- /dev/null
+++ b/src/com/android/wallpaper/picker/individual/MarginItemDecoration.kt
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 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.picker.individual
+
+import android.graphics.Rect
+import android.view.View
+import androidx.recyclerview.widget.RecyclerView
+
+/**
+ * ItemDecoration subclass that allows to add visual spacing for individual tiles of type
+ * CreativeCategory in the individual tile picker view.
+ */
+class MarginItemDecoration(private val spaceSize: Int) : RecyclerView.ItemDecoration() {
+ override fun getItemOffsets(
+ outRect: Rect,
+ view: View,
+ parent: RecyclerView,
+ state: RecyclerView.State
+ ) {
+ with(outRect) {
+ right = spaceSize
+ top = spaceSize
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/picker/individual/PreviewIndividualHolder.java b/src/com/android/wallpaper/picker/individual/PreviewIndividualHolder.java
index 9ddf336..c5625a0 100755
--- a/src/com/android/wallpaper/picker/individual/PreviewIndividualHolder.java
+++ b/src/com/android/wallpaper/picker/individual/PreviewIndividualHolder.java
@@ -42,7 +42,7 @@
public PreviewIndividualHolder(
Activity hostActivity, int tileHeightPx, View itemView) {
- super(hostActivity, tileHeightPx, itemView);
+ super(hostActivity, tileHeightPx, tileHeightPx, itemView);
mTileLayout.setOnClickListener(this);
mWallpaperPersister = InjectorProvider.getInjector().getWallpaperPersister(hostActivity);
diff --git a/src/com/android/wallpaper/picker/option/ui/binder/OptionItemBinder.kt b/src/com/android/wallpaper/picker/option/ui/binder/OptionItemBinder.kt
index 802fc62..acea95a 100644
--- a/src/com/android/wallpaper/picker/option/ui/binder/OptionItemBinder.kt
+++ b/src/com/android/wallpaper/picker/option/ui/binder/OptionItemBinder.kt
@@ -26,6 +26,7 @@
import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.ColorInt
+import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
@@ -79,7 +80,7 @@
val foregroundView: View = view.requireViewById(R.id.foreground)
val textView: TextView? = view.findViewById(R.id.text)
- if (textView != null) {
+ if (textView != null && viewModel.isTextUserVisible) {
TextViewBinder.bind(
view = textView,
viewModel = viewModel.text,
@@ -92,6 +93,8 @@
viewModel = viewModel.text,
)
}
+ textView?.isVisible = viewModel.isTextUserVisible
+
view.alpha =
if (viewModel.isEnabled) {
animationSpec.enabledAlpha
diff --git a/src/com/android/wallpaper/picker/option/ui/viewmodel/OptionItemViewModel.kt b/src/com/android/wallpaper/picker/option/ui/viewmodel/OptionItemViewModel.kt
index 6106886..a143dc3 100644
--- a/src/com/android/wallpaper/picker/option/ui/viewmodel/OptionItemViewModel.kt
+++ b/src/com/android/wallpaper/picker/option/ui/viewmodel/OptionItemViewModel.kt
@@ -40,6 +40,9 @@
*/
val text: Text,
+ /** Hides text and places the provided text in the content description instead */
+ val isTextUserVisible: Boolean = true,
+
/** Whether this option is selected. */
val isSelected: StateFlow<Boolean>,
diff --git a/src/com/android/wallpaper/picker/spacer/ui/section/SpacerSectionController.kt b/src/com/android/wallpaper/picker/spacer/ui/section/SpacerSectionController.kt
new file mode 100644
index 0000000..8e03c5a
--- /dev/null
+++ b/src/com/android/wallpaper/picker/spacer/ui/section/SpacerSectionController.kt
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2023 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.picker.spacer.ui.section
+
+import android.annotation.DimenRes
+import android.content.Context
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.LinearLayout.LayoutParams
+import com.android.wallpaper.R
+import com.android.wallpaper.model.CustomizationSectionController
+import com.android.wallpaper.picker.spacer.ui.view.SpacerSectionView
+
+/** This class provides a vertical margin section */
+class SpacerSectionController(private @DimenRes val heightResourceId: Int) :
+ CustomizationSectionController<SpacerSectionView> {
+
+ override fun isAvailable(context: Context): Boolean {
+ return true
+ }
+
+ override fun createView(context: Context): SpacerSectionView {
+ val view =
+ LayoutInflater.from(context)
+ .inflate(
+ R.layout.spacer_section_view,
+ null,
+ ) as SpacerSectionView
+ val spacer = View(context)
+ val height = context.resources.getDimension(heightResourceId).toInt()
+ val lp = LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, height)
+ spacer.layoutParams = lp
+ view.addView(spacer)
+ return view
+ }
+}
diff --git a/src/com/android/wallpaper/picker/spacer/ui/view/SpacerSectionView.kt b/src/com/android/wallpaper/picker/spacer/ui/view/SpacerSectionView.kt
new file mode 100644
index 0000000..7d279f1
--- /dev/null
+++ b/src/com/android/wallpaper/picker/spacer/ui/view/SpacerSectionView.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 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.picker.spacer.ui.view
+
+import android.content.Context
+import android.util.AttributeSet
+import com.android.wallpaper.picker.SectionView
+
+class SpacerSectionView(
+ context: Context?,
+ attrs: AttributeSet?,
+) :
+ SectionView(
+ context,
+ attrs,
+ )
diff --git a/src/com/android/wallpaper/util/DisplayUtils.kt b/src/com/android/wallpaper/util/DisplayUtils.kt
index cd364db..323d1b5 100644
--- a/src/com/android/wallpaper/util/DisplayUtils.kt
+++ b/src/com/android/wallpaper/util/DisplayUtils.kt
@@ -21,8 +21,11 @@
import android.hardware.display.DisplayManager
import android.util.Log
import android.view.Display
+import android.view.DisplayInfo
import android.view.Surface.ROTATION_270
import android.view.Surface.ROTATION_90
+import com.android.systemui.shared.recents.utilities.Utilities
+import kotlin.math.min
/**
* Utility class to provide methods to find and obtain information about displays via {@link
@@ -32,6 +35,7 @@
companion object {
private const val TAG = "DisplayUtils"
private val ROTATION_HORIZONTAL_HINGE = setOf(ROTATION_90, ROTATION_270)
+ private const val TABLET_MIN_DPS = 600f // See Sysui's Utilities.TABLET_MIN_DPS
}
private val displayManager: DisplayManager by lazy {
@@ -43,7 +47,7 @@
}
/**
- * Returns the internal {@link Display} with tthe largest area to be used to calculate wallpaper
+ * Returns the internal {@link Display} with the largest area to be used to calculate wallpaper
* size and cropping.
*/
fun getWallpaperDisplay(): Display {
@@ -79,6 +83,21 @@
}
/**
+ * Returns true if this device's screen (or largest screen in case of multiple screen devices)
+ * is considered a "Large screen"
+ */
+ fun isLargeScreenDevice(): Boolean {
+ // We need to use MaxDisplay's dimensions because if we're in embedded mode, our window
+ // will only be the size of the embedded Activity.
+ val maxDisplaysDimension = getRealSize(getWallpaperDisplay())
+ val smallestWidth = min(maxDisplaysDimension.x, maxDisplaysDimension.y)
+ return Utilities.dpiFromPx(
+ smallestWidth.toFloat(),
+ context.resources.configuration.densityDpi
+ ) >= TABLET_MIN_DPS
+ }
+
+ /**
* Returns `true` if the current display is the wallpaper display on a multi-display device.
*
* On a multi-display device the wallpaper display is the largest display while on a single
@@ -89,15 +108,15 @@
}
private fun getRealArea(display: Display): Int {
- val p = Point()
- display.getRealSize(p)
- return p.x * p.y
+ val displayInfo = DisplayInfo()
+ display.getDisplayInfo(displayInfo)
+ return displayInfo.logicalHeight * displayInfo.logicalWidth
}
private fun getRealSize(display: Display): Point {
- val p = Point()
- display.getRealSize(p)
- return p
+ val displayInfo = DisplayInfo()
+ display.getDisplayInfo(displayInfo)
+ return Point(displayInfo.logicalWidth, displayInfo.logicalHeight)
}
private fun getInternalDisplays(): List<Display> {
diff --git a/src/com/android/wallpaper/util/WallpaperConnection.java b/src/com/android/wallpaper/util/WallpaperConnection.java
index b840980..f89fc47 100644
--- a/src/com/android/wallpaper/util/WallpaperConnection.java
+++ b/src/com/android/wallpaper/util/WallpaperConnection.java
@@ -31,6 +31,7 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.IBinder;
+import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.service.wallpaper.IWallpaperConnection;
@@ -48,6 +49,8 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
/**
* Implementation of {@link IWallpaperConnection} that handles communication with a
@@ -67,11 +70,13 @@
}
private static final String TAG = "WallpaperConnection";
+ private static final Looper sMainLooper = Looper.getMainLooper();
private final Context mContext;
private final Intent mIntent;
private final WallpaperConnectionListener mListener;
private final SurfaceView mContainerView;
private final SurfaceView mSecondContainerView;
+ private final List<SurfaceControl> mMirrorSurfaceControls = new ArrayList<>();
private IWallpaperService mService;
@Nullable private IWallpaperEngine mEngine;
@Nullable private Point mDisplayMetrics;
@@ -141,6 +146,10 @@
if (mEngine != null) {
try {
mEngine.destroy();
+ for (SurfaceControl control : mMirrorSurfaceControls) {
+ control.release();
+ }
+ mMirrorSurfaceControls.clear();
} catch (RemoteException e) {
// Ignore
}
@@ -292,8 +301,10 @@
* Sets the engine's visibility.
*/
public void setVisibility(boolean visible) {
- mIsVisible = visible;
- setEngineVisibility(visible);
+ synchronized (this) {
+ mIsVisible = visible;
+ setEngineVisibility(visible);
+ }
}
private void setEngineVisibility(boolean visible) {
@@ -308,9 +319,11 @@
}
private void reparentWallpaperSurface(SurfaceView parentSurface) {
- if (mEngine == null) {
- Log.i(TAG, "Engine is null, was the service disconnected?");
- return;
+ synchronized (this) {
+ if (mEngine == null) {
+ Log.i(TAG, "Engine is null, was the service disconnected?");
+ return;
+ }
}
if (parentSurface.getSurfaceControl() != null) {
mirrorAndReparent(parentSurface);
@@ -337,23 +350,31 @@
}
private void mirrorAndReparent(SurfaceView parentSurface) {
- if (mEngine == null) {
- Log.i(TAG, "Engine is null, was the service disconnected?");
- return;
+ IWallpaperEngine engine;
+ synchronized (this) {
+ if (mEngine == null) {
+ Log.i(TAG, "Engine is null, was the service disconnected?");
+ return;
+ }
+ engine = mEngine;
}
try {
SurfaceControl parentSC = parentSurface.getSurfaceControl();
- SurfaceControl wallpaperMirrorSC = mEngine.mirrorSurfaceControl();
+ SurfaceControl wallpaperMirrorSC = engine.mirrorSurfaceControl();
if (wallpaperMirrorSC == null) {
return;
}
float[] values = getScale(parentSurface);
- SurfaceControl.Transaction t = new SurfaceControl.Transaction();
- t.setMatrix(wallpaperMirrorSC, values[MSCALE_X], values[MSKEW_Y],
- values[MSKEW_X], values[MSCALE_Y]);
- t.reparent(wallpaperMirrorSC, parentSC);
- t.show(wallpaperMirrorSC);
- t.apply();
+ try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) {
+ t.setMatrix(wallpaperMirrorSC, values[MSCALE_X], values[MSKEW_Y],
+ values[MSKEW_X], values[MSCALE_Y]);
+ t.reparent(wallpaperMirrorSC, parentSC);
+ t.show(wallpaperMirrorSC);
+ t.apply();
+ }
+ synchronized (this) {
+ mMirrorSurfaceControls.add(wallpaperMirrorSC);
+ }
} catch (RemoteException | NullPointerException e) {
Log.e(TAG, "Couldn't reparent wallpaper surface", e);
}
diff --git a/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java b/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
index 8d73621..6a1b70d 100644
--- a/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
+++ b/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
@@ -137,6 +137,9 @@
mHomeImageWallpaper.setImageDrawable(null);
}
mPackageStatusNotifier.removeListener(mAppStatusListener);
+ if (mWallpaperSurface.getSurfaceControl() != null) {
+ mWallpaperSurface.getSurfaceControl().release();
+ }
}
private void releaseHost() {
diff --git a/src/com/android/wallpaper/widget/DuoTabs.java b/src/com/android/wallpaper/widget/DuoTabs.java
index b0fb0b1..ee00b82 100644
--- a/src/com/android/wallpaper/widget/DuoTabs.java
+++ b/src/com/android/wallpaper/widget/DuoTabs.java
@@ -16,6 +16,7 @@
package com.android.wallpaper.widget;
import android.content.Context;
+import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
@@ -64,13 +65,22 @@
*/
public DuoTabs(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
- LayoutInflater.from(context).inflate(R.layout.duo_tabs, this, true);
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DuoTabs, 0, 0);
+ boolean shouldUseShortTabs = a.getBoolean(R.styleable.DuoTabs_should_use_short_tabs, false);
+ a.recycle();
+ LayoutInflater.from(context).inflate(
+ shouldUseShortTabs ? R.layout.duo_tabs_short : R.layout.duo_tabs,
+ this,
+ true);
+
mPrimaryTab = findViewById(R.id.tab_primary);
mSecondaryTab = findViewById(R.id.tab_secondary);
mPrimaryTab.setOnClickListener(v -> selectTab(TAB_PRIMARY));
mSecondaryTab.setOnClickListener(v -> selectTab(TAB_SECONDARY));
}
+
+
/**
* Set tab text
*/
diff --git a/src/com/android/wallpaper/widget/FloatingSheet.kt b/src/com/android/wallpaper/widget/FloatingSheet.kt
index 26f068a..5df91d7 100644
--- a/src/com/android/wallpaper/widget/FloatingSheet.kt
+++ b/src/com/android/wallpaper/widget/FloatingSheet.kt
@@ -157,7 +157,11 @@
* [BottomSheetBehavior.BottomSheetCallback] since the floating sheet behavior is currently
* based on [BottomSheetBehavior]
*/
- fun addFloatingSheetCallback(callback: BottomSheetCallback?) {
- floatingSheetBehavior.addBottomSheetCallback(callback!!)
+ fun addFloatingSheetCallback(callback: BottomSheetCallback) {
+ floatingSheetBehavior.addBottomSheetCallback(callback)
+ }
+
+ fun removeFloatingSheetCallback(callback: BottomSheetCallback) {
+ floatingSheetBehavior.removeBottomSheetCallback(callback)
}
}
diff --git a/tests/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepositoryTest.kt b/tests/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepositoryTest.kt
index 7e2c64b..ba9c9df 100644
--- a/tests/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepositoryTest.kt
+++ b/tests/src/com/android/wallpaper/picker/customization/data/repository/WallpaperRepositoryTest.kt
@@ -18,8 +18,9 @@
package com.android.wallpaper.picker.customization.data.repository
import androidx.test.filters.SmallTest
-import com.android.wallpaper.picker.customization.data.content.FakeWallpaperClient
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
+import com.android.wallpaper.testing.FakeWallpaperClient
+import com.android.wallpaper.testing.TestWallpaperPreferences
import com.android.wallpaper.testing.collectLastValue
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -41,6 +42,7 @@
private lateinit var client: FakeWallpaperClient
private lateinit var testScope: TestScope
+ private var prefs = TestWallpaperPreferences()
@Before
fun setUp() {
@@ -52,6 +54,7 @@
WallpaperRepository(
scope = testScope.backgroundScope,
client = client,
+ wallpaperPreferences = prefs,
backgroundDispatcher = testDispatcher,
)
}
@@ -96,10 +99,14 @@
WallpaperDestination.HOME,
FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1].wallpaperId,
)
+ prefs.homeWallpaperRecentsKey =
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1].wallpaperId
underTest.setWallpaper(
WallpaperDestination.LOCK,
FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2].wallpaperId,
)
+ prefs.lockWallpaperRecentsKey =
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2].wallpaperId
assertThat(recentHomeWallpapers())
.isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS)
assertThat(recentLockWallpapers())
@@ -138,4 +145,63 @@
assertThat(selectingHomeWallpaperId()).isNull()
assertThat(selectingLockWallpaperId()).isNull()
}
+
+ /**
+ * Tests the fallback behavior of WallpaperRepository#selectedWallpaperId when then recents key
+ * is not set in metadata.
+ */
+ @Test
+ fun setWallpaper_recentsKeyFallback() =
+ testScope.runTest {
+ val recentHomeWallpapers =
+ collectLastValue(
+ underTest.recentWallpapers(destination = WallpaperDestination.HOME, limit = 5)
+ )
+ val recentLockWallpapers =
+ collectLastValue(
+ underTest.recentWallpapers(destination = WallpaperDestination.LOCK, limit = 5)
+ )
+ val selectedHomeWallpaperId =
+ collectLastValue(underTest.selectedWallpaperId(WallpaperDestination.HOME))
+ val selectedLockWallpaperId =
+ collectLastValue(underTest.selectedWallpaperId(WallpaperDestination.LOCK))
+ assertThat(recentHomeWallpapers())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS)
+ assertThat(recentLockWallpapers())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS)
+ assertThat(selectedHomeWallpaperId())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS.first().wallpaperId)
+ assertThat(selectedLockWallpaperId())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS.first().wallpaperId)
+
+ underTest.setWallpaper(
+ WallpaperDestination.HOME,
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1].wallpaperId,
+ )
+ underTest.setWallpaper(
+ WallpaperDestination.LOCK,
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2].wallpaperId,
+ )
+
+ assertThat(recentHomeWallpapers())
+ .isEqualTo(
+ listOf(
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1],
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[0],
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2],
+ )
+ )
+ assertThat(recentLockWallpapers())
+ .isEqualTo(
+ listOf(
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2],
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[0],
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1],
+ )
+ )
+ assertThat(selectedHomeWallpaperId())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1].wallpaperId)
+ assertThat(selectedLockWallpaperId())
+ .isEqualTo(FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2].wallpaperId)
+ }
}
diff --git a/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractorTest.kt b/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractorTest.kt
index 1686c53..19088c2 100644
--- a/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractorTest.kt
+++ b/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperInteractorTest.kt
@@ -19,9 +19,11 @@
import androidx.test.filters.SmallTest
import com.android.wallpaper.module.CustomizationSections
-import com.android.wallpaper.picker.customization.data.content.FakeWallpaperClient
import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
+import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
+import com.android.wallpaper.testing.FakeWallpaperClient
+import com.android.wallpaper.testing.TestWallpaperPreferences
import com.android.wallpaper.testing.collectLastValue
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -55,6 +57,7 @@
WallpaperRepository(
scope = testScope.backgroundScope,
client = client,
+ wallpaperPreferences = TestWallpaperPreferences(),
backgroundDispatcher = testDispatcher,
),
)
@@ -81,6 +84,20 @@
}
@Test
+ fun `previews - handles empty recents list`() =
+ testScope.runTest {
+ client.setRecentWallpapers(
+ buildMap { put(WallpaperDestination.HOME, listOf<WallpaperModel>()) }
+ )
+ val homeWallpaperUpdateEvents =
+ collectLastValue(
+ underTest.wallpaperUpdateEvents(CustomizationSections.Screen.HOME_SCREEN)
+ )
+
+ assertThat(homeWallpaperUpdateEvents()).isNull()
+ }
+
+ @Test
fun wallpaperUpdateEvents() =
testScope.runTest {
val homeWallpaperUpdateEvents =
diff --git a/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperSnapshotRestorerTest.kt b/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperSnapshotRestorerTest.kt
index 3126d3d..db2f306 100644
--- a/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperSnapshotRestorerTest.kt
+++ b/tests/src/com/android/wallpaper/picker/customization/domain/interactor/WallpaperSnapshotRestorerTest.kt
@@ -19,12 +19,13 @@
import android.util.Log
import androidx.test.filters.SmallTest
-import com.android.wallpaper.picker.customization.data.content.FakeWallpaperClient
import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
import com.android.wallpaper.picker.undo.domain.interactor.SnapshotStore
import com.android.wallpaper.picker.undo.shared.model.RestorableSnapshot
+import com.android.wallpaper.testing.FakeWallpaperClient
+import com.android.wallpaper.testing.TestWallpaperPreferences
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
@@ -74,6 +75,7 @@
WallpaperRepository(
scope = testScope.backgroundScope,
client = wallpaperClient,
+ wallpaperPreferences = TestWallpaperPreferences(),
backgroundDispatcher = testDispatcher,
),
)
@@ -83,13 +85,19 @@
@Test
fun restore() =
testScope.runTest {
+ // We expect three snapshots, and test that they are correct:
+ // 0: Starting state. This differs from the return value of `setUpSnapshotRestorer`
+ // because the initial value of WallpaperRepository#selectedWallpaperId differs from
+ // the value returned by the map
+ // 1: Home wallpaper set
+ // 2: Lock wallpaper also set
wallpaperClient.setRecentWallpapers(
buildMap {
put(WallpaperDestination.HOME, INITIAL_HOME_WALLPAPERS)
put(WallpaperDestination.LOCK, INITIAL_LOCK_WALLPAPERS)
}
)
- val initialSnapshot = underTest.setUpSnapshotRestorer(store)
+ underTest.setUpSnapshotRestorer(store)
runCurrent()
wallpaperClient.setWallpaper(
destination = WallpaperDestination.HOME,
@@ -97,28 +105,28 @@
onDone = {},
)
runCurrent()
- assertThat(storedSnapshots).hasSize(1)
+ assertThat(storedSnapshots).hasSize(2)
wallpaperClient.setWallpaper(
destination = WallpaperDestination.LOCK,
wallpaperId = INITIAL_LOCK_WALLPAPERS[4].wallpaperId,
onDone = {},
)
runCurrent()
- assertThat(storedSnapshots).hasSize(2)
+ assertThat(storedSnapshots).hasSize(3)
- underTest.restoreToSnapshot(storedSnapshots[0])
+ underTest.restoreToSnapshot(storedSnapshots[1])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.HOME))
.isEqualTo(INITIAL_HOME_WALLPAPERS[1])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.LOCK))
.isEqualTo(INITIAL_LOCK_WALLPAPERS[0])
- underTest.restoreToSnapshot(initialSnapshot)
+ underTest.restoreToSnapshot(storedSnapshots[0])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.HOME))
.isEqualTo(INITIAL_HOME_WALLPAPERS[0])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.LOCK))
.isEqualTo(INITIAL_LOCK_WALLPAPERS[0])
- underTest.restoreToSnapshot(storedSnapshots[1])
+ underTest.restoreToSnapshot(storedSnapshots[2])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.HOME))
.isEqualTo(INITIAL_HOME_WALLPAPERS[1])
assertThat(wallpaperClient.getCurrentWallpaper(destination = WallpaperDestination.LOCK))
diff --git a/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModelTest.kt b/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModelTest.kt
index 5e74acc..44b7c34 100644
--- a/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModelTest.kt
+++ b/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/CustomizationPickerViewModelTest.kt
@@ -19,9 +19,13 @@
import androidx.lifecycle.SavedStateHandle
import androidx.test.filters.SmallTest
+import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
+import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
import com.android.wallpaper.picker.undo.data.repository.UndoRepository
import com.android.wallpaper.picker.undo.domain.interactor.UndoInteractor
import com.android.wallpaper.testing.FAKE_RESTORERS
+import com.android.wallpaper.testing.FakeWallpaperClient
+import com.android.wallpaper.testing.TestWallpaperPreferences
import com.android.wallpaper.testing.collectLastValue
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -43,6 +47,7 @@
private lateinit var savedStateHandle: SavedStateHandle
private lateinit var testScope: TestScope
private lateinit var undoInteractor: UndoInteractor
+ private lateinit var wallpaperInteractor: WallpaperInteractor
@Before
fun setUp() {
@@ -55,10 +60,21 @@
repository = UndoRepository(),
restorerByOwnerId = FAKE_RESTORERS,
)
+ wallpaperInteractor =
+ WallpaperInteractor(
+ repository =
+ WallpaperRepository(
+ scope = testScope.backgroundScope,
+ client = FakeWallpaperClient(),
+ wallpaperPreferences = TestWallpaperPreferences(),
+ backgroundDispatcher = testDispatcher,
+ ),
+ )
underTest =
CustomizationPickerViewModel(
undoInteractor = undoInteractor,
+ wallpaperInteractor = wallpaperInteractor,
savedStateHandle = savedStateHandle,
)
}
@@ -100,6 +116,7 @@
val newUnderTest =
CustomizationPickerViewModel(
undoInteractor = undoInteractor,
+ wallpaperInteractor = wallpaperInteractor,
savedStateHandle = savedStateHandle,
)
val newIsOnLockScreen = collectLastValue(newUnderTest.isOnLockScreen)
@@ -150,6 +167,7 @@
val newUnderTest =
CustomizationPickerViewModel(
undoInteractor = undoInteractor,
+ wallpaperInteractor = wallpaperInteractor,
savedStateHandle = savedStateHandle,
)
val newHomeScreenTab = collectLastValue(newUnderTest.homeScreenTab)
diff --git a/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModelTest.kt b/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModelTest.kt
index b22002c..f91306b 100644
--- a/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModelTest.kt
+++ b/tests/src/com/android/wallpaper/picker/customization/ui/viewmodel/WallpaperQuickSwitchViewModelTest.kt
@@ -18,11 +18,12 @@
package com.android.wallpaper.picker.customization.ui.viewmodel
import androidx.test.filters.SmallTest
-import com.android.wallpaper.picker.customization.data.content.FakeWallpaperClient
import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
+import com.android.wallpaper.testing.FakeWallpaperClient
+import com.android.wallpaper.testing.TestWallpaperPreferences
import com.android.wallpaper.testing.collectLastValue
import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
@@ -63,12 +64,15 @@
WallpaperRepository(
scope = testScope.backgroundScope,
client = client,
+ wallpaperPreferences = TestWallpaperPreferences(),
backgroundDispatcher = testDispatcher,
),
)
underTest =
WallpaperQuickSwitchViewModel(
interactor = interactor,
+ destination = WallpaperDestination.HOME,
+ coroutineScope = testScope.backgroundScope,
maxOptions = FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS.size,
)
}
@@ -120,6 +124,30 @@
}
@Test
+ fun `recentOptions_lastUpdatedChange_updatesOptions`() =
+ testScope.runTest {
+ val options = collectLastValue(underTest.options)
+
+ val models =
+ FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS.mapIndexed { idx, wp ->
+ WallpaperModel(
+ wp.wallpaperId,
+ wp.placeholderColor,
+ if (idx == 0) 100 else wp.lastUpdated
+ )
+ }
+ client.setRecentWallpapers(buildMap { put(WallpaperDestination.HOME, models) })
+
+ assertOptions(
+ observed = options(),
+ expected =
+ expectations(
+ models = models,
+ ),
+ )
+ }
+
+ @Test
fun `switches to third option`() =
testScope.runTest {
val options = collectLastValue(underTest.options)
@@ -151,51 +179,6 @@
)
}
- @Test
- fun `switches between screens`() =
- testScope.runTest {
- val options = collectLastValue(underTest.options)
-
- // We begin on the home screen by default.
- // Select option at index 2 on the home screen.
- val selectedIndex = 2
- val optionToSelect = checkNotNull(options()?.get(selectedIndex))
- val onSelected = collectLastValue(optionToSelect.onSelected)
- onSelected()?.invoke()
- runCurrent()
- assertOptions(
- observed = options(),
- expected =
- expectations(
- selectedIndex = selectedIndex,
- ),
- )
-
- // Switch to the lock screen, it should still have the original option selected.
- underTest.setOnLockScreen(isLockScreenSelected = true)
- runCurrent()
- assertOptions(
- observed = options(),
- expected = expectations(),
- )
-
- // Switch back to the home screen, it should still have option at index 2 selected.
- underTest.setOnLockScreen(isLockScreenSelected = false)
- runCurrent()
- assertOptions(
- observed = options(),
- expected =
- expectations(
- models =
- listOf(
- FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[2],
- FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[0],
- FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS[1],
- ),
- ),
- )
- }
-
private fun expectations(
models: List<WallpaperModel> = FakeWallpaperClient.INITIAL_RECENT_WALLPAPERS,
selectedIndex: Int = 0,
diff --git a/tests/src/com/android/wallpaper/picker/customization/data/content/FakeWallpaperClient.kt b/tests/src/com/android/wallpaper/testing/FakeWallpaperClient.kt
similarity index 95%
rename from tests/src/com/android/wallpaper/picker/customization/data/content/FakeWallpaperClient.kt
rename to tests/src/com/android/wallpaper/testing/FakeWallpaperClient.kt
index 4930418..bec315b 100644
--- a/tests/src/com/android/wallpaper/picker/customization/data/content/FakeWallpaperClient.kt
+++ b/tests/src/com/android/wallpaper/testing/FakeWallpaperClient.kt
@@ -15,9 +15,10 @@
*
*/
-package com.android.wallpaper.picker.customization.data.content
+package com.android.wallpaper.testing
import android.graphics.Bitmap
+import com.android.wallpaper.picker.customization.data.content.WallpaperClient
import com.android.wallpaper.picker.customization.shared.model.WallpaperDestination
import com.android.wallpaper.picker.customization.shared.model.WallpaperModel
import kotlin.math.min
@@ -69,7 +70,7 @@
}
}
- override suspend fun getCurrentWallpaper(
+ fun getCurrentWallpaper(
destination: WallpaperDestination,
): WallpaperModel {
return _recentWallpapers.value[destination]?.get(0)
diff --git a/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java b/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
index e93c089..c21cbe3 100644
--- a/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
+++ b/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
@@ -99,6 +99,11 @@
}
@Override
+ public boolean isCreativeCategoryAvailable() {
+ return false;
+ }
+
+ @Override
public boolean isFeaturedCollectionAvailable() {
return false;
}
diff --git a/tests/src/com/android/wallpaper/testing/TestCustomizationSections.kt b/tests/src/com/android/wallpaper/testing/TestCustomizationSections.kt
index d66306a..7e4dee0 100644
--- a/tests/src/com/android/wallpaper/testing/TestCustomizationSections.kt
+++ b/tests/src/com/android/wallpaper/testing/TestCustomizationSections.kt
@@ -10,7 +10,7 @@
import com.android.wallpaper.module.CurrentWallpaperInfoFactory
import com.android.wallpaper.module.CustomizationSections
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
-import com.android.wallpaper.picker.customization.ui.viewmodel.WallpaperQuickSwitchViewModel
+import com.android.wallpaper.picker.customization.ui.viewmodel.CustomizationPickerViewModel
import com.android.wallpaper.util.DisplayUtils
/** Test implementation of [CustomizationSections] */
@@ -27,7 +27,7 @@
savedInstanceState: Bundle?,
wallpaperInfoFactory: CurrentWallpaperInfoFactory?,
displayUtils: DisplayUtils?,
- wallpaperQuickSwitchViewModel: WallpaperQuickSwitchViewModel,
+ customizationPickerViewModel: CustomizationPickerViewModel,
wallpaperInteractor: WallpaperInteractor,
): MutableList<CustomizationSectionController<*>> {
return arrayListOf()
diff --git a/tests/src/com/android/wallpaper/testing/TestInjector.kt b/tests/src/com/android/wallpaper/testing/TestInjector.kt
index c173fa9..1c71ebf 100644
--- a/tests/src/com/android/wallpaper/testing/TestInjector.kt
+++ b/tests/src/com/android/wallpaper/testing/TestInjector.kt
@@ -59,11 +59,12 @@
import com.android.wallpaper.picker.undo.data.repository.UndoRepository
import com.android.wallpaper.picker.undo.domain.interactor.UndoInteractor
import com.android.wallpaper.util.DisplayUtils
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.GlobalScope
/** Test implementation of [Injector] */
open class TestInjector : Injector {
+ private var appScope: CoroutineScope? = null
private var alarmManagerWrapper: AlarmManagerWrapper? = null
private var bitmapCropper: BitmapCropper? = null
private var categoryProvider: CategoryProvider? = null
@@ -91,6 +92,10 @@
private var wallpaperSnapshotRestorer: WallpaperSnapshotRestorer? = null
private var wallpaperColorsViewModel: WallpaperColorsViewModel? = null
+ override fun getApplicationCoroutineScope(): CoroutineScope {
+ return appScope ?: CoroutineScope(Dispatchers.Main).also { appScope = it }
+ }
+
override fun getAlarmManagerWrapper(context: Context): AlarmManagerWrapper {
return alarmManagerWrapper ?: TestAlarmManagerWrapper().also { alarmManagerWrapper = it }
}
@@ -259,7 +264,7 @@
override fun getUndoInteractor(context: Context): UndoInteractor {
return undoInteractor
?: UndoInteractor(
- GlobalScope,
+ getApplicationCoroutineScope(),
UndoRepository(),
HashMap()
) // Empty because we don't support undoing in WallpaperPicker2..also{}
@@ -270,8 +275,9 @@
?: WallpaperInteractor(
repository =
WallpaperRepository(
- scope = GlobalScope,
+ scope = getApplicationCoroutineScope(),
client = WallpaperClientImpl(context = context),
+ wallpaperPreferences = getPreferences(context = context),
backgroundDispatcher = Dispatchers.IO,
),
)
@@ -281,7 +287,7 @@
override fun getWallpaperSnapshotRestorer(context: Context): WallpaperSnapshotRestorer {
return wallpaperSnapshotRestorer
?: WallpaperSnapshotRestorer(
- scope = GlobalScope,
+ scope = getApplicationCoroutineScope(),
interactor = getWallpaperInteractor(context),
)
.also { wallpaperSnapshotRestorer = it }
diff --git a/tests/src/com/android/wallpaper/testing/TestWallpaperPersister.java b/tests/src/com/android/wallpaper/testing/TestWallpaperPersister.java
index 1ead260..0a0836d 100644
--- a/tests/src/com/android/wallpaper/testing/TestWallpaperPersister.java
+++ b/tests/src/com/android/wallpaper/testing/TestWallpaperPersister.java
@@ -237,7 +237,8 @@
@Override
public boolean saveStaticWallpaperMetadata(List<String> attributions, String actionUrl,
- int actionLabelRes, int actionIconRes, String collectionId, int wallpaperId) {
+ int actionLabelRes, int actionIconRes, String collectionId, int wallpaperId,
+ @Destination int destination) {
return false;
}
diff --git a/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java b/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
index 54bca11..f51d2e0 100644
--- a/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
+++ b/tests/src/com/android/wallpaper/testing/TestWallpaperPreferences.java
@@ -56,6 +56,7 @@
private String mHomeBaseImageUrl;
private String mHomeCollectionId;
private String mHomeWallpaperRemoteId;
+ private String mHomeWallpaperRecentsKey;
private List<String> mLockScreenAttributions;
private long mLockScreenBitmapHashCode;
@@ -63,6 +64,7 @@
private String mLockActionUrl;
private String mLockCollectionId;
private String mLockWallpaperRemoteId;
+ private String mLockWallpaperRecentsKey;
private List<Long> mDailyRotations;
private long mDailyWallpaperEnabledTimestamp;
@@ -237,6 +239,16 @@
}
@Override
+ public String getHomeWallpaperRecentsKey() {
+ return mHomeWallpaperRecentsKey;
+ }
+
+ @Override
+ public void setHomeWallpaperRecentsKey(String recentsKey) {
+ mHomeWallpaperRecentsKey = recentsKey;
+ }
+
+ @Override
public String getHomeWallpaperEffects() {
return mHomeWallpaperEffects;
}
@@ -345,6 +357,16 @@
}
@Override
+ public String getLockWallpaperRecentsKey() {
+ return mLockWallpaperRecentsKey;
+ }
+
+ @Override
+ public void setLockWallpaperRecentsKey(String recentsKey) {
+ mLockWallpaperRecentsKey = recentsKey;
+ }
+
+ @Override
public String getLockWallpaperServiceName() {
return mLockScreenServiceName;
}