Snap for 7441201 from 9ac62495992efdf39182f37a632389e6e51d2bee to s-keystone-qcom-release
Change-Id: Id1505cc9d70fd0b0d90cb18fdf1648fbcd63e146
diff --git a/Android.bp b/Android.bp
index 871e193..1776e05 100644
--- a/Android.bp
+++ b/Android.bp
@@ -82,13 +82,6 @@
+ "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
}
-filegroup {
- name: "WallpaperPicker2_Manifest",
- srcs: [
- "AndroidManifest.xml",
- ],
-}
-
java_defaults {
name: "WallpaperPicker2_defaults",
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5c020af..d2d81ec 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -61,18 +61,11 @@
android:label="@string/app_name"
android:theme="@style/WallpaperTheme.NoBackground"
android:resizeableActivity="false"
- android:exported="false">
- </activity>
-
- <activity android:name="com.android.wallpaper.picker.CustomizationPickerActivity"
- android:label="@string/app_name"
- android:resizeableActivity="false"
- android:theme="@style/WallpaperTheme.NoBackground"
- android:exported="true">
- <intent-filter>
- <action android:name="android.intent.action.SET_WALLPAPER"/>
- <category android:name="android.intent.category.DEFAULT"/>
- </intent-filter>
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.SET_WALLPAPER"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
</activity>
<activity android:name="com.android.wallpaper.picker.DeepLinkActivity"
diff --git a/res/color/bottom_action_button_color_tint.xml b/res/color/bottom_action_button_color_tint.xml
index 8381c2f..860a532 100644
--- a/res/color/bottom_action_button_color_tint.xml
+++ b/res/color/bottom_action_button_color_tint.xml
@@ -14,12 +14,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="false"
android:color="?android:textColorTertiary" />
<item
android:state_selected="true"
- android:color="?androidprv:attr/textColorOnAccent" />
+ android:color="@color/text_color_primary_on_accent" />
</selector>
\ No newline at end of file
diff --git a/res/color/option_title_color.xml b/res/color/option_title_color.xml
index 3241d8e..6166f4d 100644
--- a/res/color/option_title_color.xml
+++ b/res/color/option_title_color.xml
@@ -20,7 +20,7 @@
android:color="?android:textColorPrimary" />
<item
android:state_activated="false"
- android:color="?android:textColorSecondary" />
+ android:color="?android:textColorTertiary" />
<item
- android:color="?android:textColorSecondary"/>
+ android:color="?android:textColorTertiary"/>
</selector>
diff --git a/res/drawable/bottom_action_button_background.xml b/res/drawable/bottom_action_button_background.xml
index e1b3554..0a56ef1 100644
--- a/res/drawable/bottom_action_button_background.xml
+++ b/res/drawable/bottom_action_button_background.xml
@@ -14,23 +14,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:color="?android:colorControlHighlight">
- <item>
- <selector>
- <item android:state_selected="false">
- <shape>
- <solid android:color="?android:colorBackground" />
- <corners android:radius="@dimen/bottom_action_button_radius" />
- </shape>
- </item>
- <item android:state_selected="true">
- <shape>
- <solid android:color="?androidprv:attr/colorAccentPrimary" />
- <corners android:radius="@dimen/bottom_action_button_radius" />
- </shape>
- </item>
- </selector>
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+ <item android:state_selected="false">
+ <shape>
+ <solid android:color="?android:colorBackground" />
+ <corners android:radius="@dimen/bottom_action_button_radius" />
+ </shape>
</item>
-</ripple>
\ No newline at end of file
+ <item android:state_selected="true">
+ <shape>
+ <solid android:color="?androidprv:attr/colorAccentPrimary" />
+ <corners android:radius="@dimen/bottom_action_button_radius" />
+ </shape>
+ </item>
+</selector>
\ No newline at end of file
diff --git a/res/drawable/btn_transparent_background.xml b/res/drawable/btn_transparent_background.xml
index f71b9d8..7ddff6b 100644
--- a/res/drawable/btn_transparent_background.xml
+++ b/res/drawable/btn_transparent_background.xml
@@ -17,10 +17,11 @@
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
+
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
- <corners android:radius="@dimen/bottom_action_button_radius" />
+ <corners android:radius="?android:attr/buttonCornerRadius"/>
</shape>
</item>
</ripple>
diff --git a/res/drawable/dialog_option_background.xml b/res/drawable/dialog_option_background.xml
index efb5891..166aa80 100644
--- a/res/drawable/dialog_option_background.xml
+++ b/res/drawable/dialog_option_background.xml
@@ -14,13 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:color="?android:colorControlHighlight">
- <item android:id="@android:id/background">
- <shape>
- <solid android:color="?androidprv:attr/colorAccentPrimary" />
- <corners android:radius="@dimen/set_wallpaper_dialog_item_inner_corner_radius"/>
- </shape>
- </item>
-</ripple>
\ No newline at end of file
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+ <solid android:color="?androidprv:attr/colorAccentPrimary" />
+ <corners android:radius="@dimen/set_wallpaper_dialog_item_inner_corner_radius"/>
+</shape>
\ No newline at end of file
diff --git a/res/drawable/fullscreen_button_background.xml b/res/drawable/fullscreen_button_background.xml
deleted file mode 100644
index e3a0052..0000000
--- a/res/drawable/fullscreen_button_background.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="?android:colorControlHighlight">
- <item android:drawable="@drawable/pill_tabs_indicator_background" />
-</ripple>
\ No newline at end of file
diff --git a/res/drawable/ic_check_24dp.xml b/res/drawable/ic_check_24dp.xml
index 63c2a0c..737ef28 100644
--- a/res/drawable/ic_check_24dp.xml
+++ b/res/drawable/ic_check_24dp.xml
@@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
- android:fillColor="?android:textColorPrimaryInverse"
+ android:fillColor="?android:colorPrimary"
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41L9,16.17z"/>
</vector>
diff --git a/res/drawable/ic_download_badge.xml b/res/drawable/ic_download_badge.xml
deleted file mode 100644
index 85e09aa..0000000
--- a/res/drawable/ic_download_badge.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
- <item>
- <shape android:shape="oval">
- <size
- android:width="@dimen/grid_item_badge_size"
- android:height="@dimen/grid_item_badge_size" />
- <solid android:color="?androidprv:attr/colorSurfaceVariant" />
- </shape>
- </item>
- <item
- android:width="@dimen/grid_item_badge_indicator_size"
- android:height="@dimen/grid_item_badge_indicator_size"
- android:drawable="@drawable/ic_file_download_gm2_24px"
- android:gravity="center" />
-</layer-list>
\ No newline at end of file
diff --git a/res/drawable/ic_file_download_gm2_24px.xml b/res/drawable/ic_file_download_gm2_24px.xml
index 036c5d0..fc93746 100644
--- a/res/drawable/ic_file_download_gm2_24px.xml
+++ b/res/drawable/ic_file_download_gm2_24px.xml
@@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
- android:fillColor="?android:textColorPrimary"
+ android:fillColor="#FF000000"
android:pathData="M4,15h2v3h12v-3h2v3c0,1.1 -0.9,2 -2,2H6c-1.1,0 -2,-0.9 -2,-2m11.59,-8.41L13,12.17V4h-2v8.17L8.41,9.59 7,11l5,5 5,-5 -1.41,-1.41z"/>
</vector>
diff --git a/res/drawable/ic_nav_wallpaper.xml b/res/drawable/ic_nav_wallpaper.xml
deleted file mode 100644
index c935666..0000000
--- a/res/drawable/ic_nav_wallpaper.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- Copyright (C) 2019 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.
--->
-<!-- Represents the wallpaper icon (a "landscape" shape in a box) -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:fillColor="@android:color/white"
- android:pathData="M9,12.71l2.14,2.58l3,-3.87L18,16.57H6L9,12.71zM5,5h6V3H5C3.9,3 3,3.9 3,5v6h2V5zM19,19h-6v2h6c1.1,0 2,-0.9 2,-2v-6h-2V19zM5,19v-6H3v6c0,1.1 0.9,2 2,2h6v-2H5zM19,5v6h2V5c0,-1.1 -0.9,-2 -2,-2h-6v2H19zM16,9c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1c-0.55,0 -1,0.45 -1,1S15.45,9 16,9z"/>
-</vector>
diff --git a/res/drawable/section_divider.xml b/res/drawable/section_divider.xml
deleted file mode 100644
index b37ec1b..0000000
--- a/res/drawable/section_divider.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@android:color/transparent"/>
- <size android:height="8dp" android:width="1dp" />
-</shape>
\ No newline at end of file
diff --git a/res/drawable/wallpaper_section_background.xml b/res/drawable/wallpaper_section_background.xml
deleted file mode 100644
index 208f543..0000000
--- a/res/drawable/wallpaper_section_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:shape="rectangle">
- <corners android:radius="28dp" />
- <solid android:color="?androidprv:attr/colorSurface" />
-</shape>
diff --git a/res/layout/activity_customization_picker.xml b/res/layout/activity_customization_picker.xml
deleted file mode 100755
index ae70d61..0000000
--- a/res/layout/activity_customization_picker.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <FrameLayout
- android:id="@+id/fragment_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="?android:colorBackground" />
-
- <include layout="@layout/bottom_action_bar" />
-
-</FrameLayout>
diff --git a/res/layout/activity_top_level_picker.xml b/res/layout/activity_top_level_picker.xml
index 9f8ba68..923a3cb 100755
--- a/res/layout/activity_top_level_picker.xml
+++ b/res/layout/activity_top_level_picker.xml
@@ -17,7 +17,7 @@
android:id="@+id/fragment_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:colorBackground">
+ android:background="?android:colorPrimary">
<FrameLayout
android:id="@+id/fragment_container"
diff --git a/res/layout/bottom_actions_layout.xml b/res/layout/bottom_actions_layout.xml
index 91e8f1d..92b5dc1 100644
--- a/res/layout/bottom_actions_layout.xml
+++ b/res/layout/bottom_actions_layout.xml
@@ -45,6 +45,7 @@
android:layout_height="@dimen/bottom_actions_height"
android:paddingTop="@dimen/bottom_actions_top_padding"
android:paddingBottom="@dimen/bottom_actions_bottom_padding"
+ android:clickable="true"
android:background="?android:colorBackground"
android:theme="@style/BottomActionItemStyle"
android:layout_alignParentBottom="true"
@@ -154,22 +155,8 @@
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@id/action_apply_text_button"
- app:layout_constraintStart_toEndOf="@id/action_progress"/>
-
- <Button
- android:id="@+id/action_apply_text_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:background="@drawable/btn_transparent_background"
- android:textColor="?android:attr/colorAccent"
- android:text="@string/bottom_action_bar_apply"
- android:visibility="gone"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@id/action_apply"/>
+ app:layout_constraintStart_toEndOf="@id/action_progress" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
diff --git a/res/layout/dialog_set_wallpaper.xml b/res/layout/dialog_set_wallpaper.xml
index 81d6253..e28ce8a 100755
--- a/res/layout/dialog_set_wallpaper.xml
+++ b/res/layout/dialog_set_wallpaper.xml
@@ -16,7 +16,6 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/set_wallpaper_dialog_padding">
@@ -35,24 +34,21 @@
style="@style/set_wallpaper_destination_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/set_wallpaper_home_screen_destination"
- android:textColor="?androidprv:attr/textColorOnAccent" />
+ android:text="@string/set_wallpaper_home_screen_destination" />
<Button
android:id="@+id/set_lock_wallpaper_button"
style="@style/set_wallpaper_destination_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/set_wallpaper_lock_screen_destination"
- android:textColor="?androidprv:attr/textColorOnAccent" />
+ android:text="@string/set_wallpaper_lock_screen_destination" />
<Button
android:id="@+id/set_both_wallpaper_button"
style="@style/set_wallpaper_destination_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/set_wallpaper_both_destination"
- android:textColor="?androidprv:attr/textColorOnAccent" />
+ android:text="@string/set_wallpaper_both_destination" />
</LinearLayout>
diff --git a/res/layout/fragment_category_picker.xml b/res/layout/fragment_category_picker.xml
index a1b62b6..63cf7d8 100755
--- a/res/layout/fragment_category_picker.xml
+++ b/res/layout/fragment_category_picker.xml
@@ -65,7 +65,7 @@
android:id="@+id/category_fragment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?android:colorBackground"
+ android:background="?android:colorPrimary"
app:layout_behavior="@string/bottom_sheet_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/fragment_customization_picker.xml b/res/layout/fragment_customization_picker.xml
deleted file mode 100755
index 17a8f80..0000000
--- a/res/layout/fragment_customization_picker.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<androidx.core.widget.NestedScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/scroll_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/transparent">
- <LinearLayout
- android:id="@+id/section_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginVertical="@dimen/section_container_vertical_margin"
- android:divider="@drawable/section_divider"
- android:showDividers="middle"
- android:orientation="vertical" />
-</androidx.core.widget.NestedScrollView>
diff --git a/res/layout/fragment_image_preview_v2.xml b/res/layout/fragment_image_preview_v2.xml
index ead02b9..2c8cdfe 100644
--- a/res/layout/fragment_image_preview_v2.xml
+++ b/res/layout/fragment_image_preview_v2.xml
@@ -19,64 +19,81 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:colorBackground">
+ android:background="?android:colorPrimary">
- <FrameLayout
- android:id="@+id/pill_tabs_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:layout_marginBottom="@dimen/bottom_actions_height"
- android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
- <include layout="@layout/pill_tabs" />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/screen_preview_layout"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
- android:layout_marginBottom="@dimen/bottom_actions_plus_pill_tabs">
+ android:layout_marginBottom="@dimen/bottom_actions_height"
+ android:orientation="vertical">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/container"
+ <FrameLayout
+ android:id="@+id/section_header_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <include layout="@layout/section_header" />
+ </FrameLayout>
+
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:paddingVertical="@dimen/full_preview_page_default_padding_top">
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:orientation="vertical">
- <com.android.wallpaper.picker.TouchForwardingLayout
- android:id="@+id/touch_forwarding_layout"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent">
- <include layout="@layout/wallpaper_preview_card" />
- </com.android.wallpaper.picker.TouchForwardingLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
- </FrameLayout>
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <FrameLayout
- android:id="@+id/section_header_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <include layout="@layout/section_header" android:id="@+id/toolbar_container"/>
- </FrameLayout>
+ <ImageView
+ android:id="@+id/low_res_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"
+ android:background="@android:color/black" />
- <FrameLayout
- android:id="@+id/fullscreen_buttons_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center"
- android:layout_marginBottom="@dimen/fullscreen_preview_button_margin"
- android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
- <include layout="@layout/fullscreen_buttons" />
- </FrameLayout>
+ <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
+ android:id="@+id/full_res_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <androidx.core.widget.ContentLoadingProgressBar
+ android:id="@+id/loading_indicator"
+ style="@android:style/Widget.DeviceDefault.ProgressBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:indeterminate="true"/>
+ </FrameLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingVertical="@dimen/full_preview_page_default_padding_top"
+ android:clipChildren="false"
+ android:clipToPadding="false">
+
+ <com.android.wallpaper.picker.TouchForwardingLayout
+ android:id="@+id/touch_forwarding_layout"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+ <include layout="@layout/wallpaper_preview_card" />
+ </com.android.wallpaper.picker.TouchForwardingLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/pill_tabs_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
+ <include layout="@layout/pill_tabs" />
+ </FrameLayout>
+ </LinearLayout>
<FrameLayout
android:id="@+id/bottom_action_bar_container"
diff --git a/res/layout/fragment_live_preview_v2.xml b/res/layout/fragment_live_preview_v2.xml
index 81c49f4..7851107 100644
--- a/res/layout/fragment_live_preview_v2.xml
+++ b/res/layout/fragment_live_preview_v2.xml
@@ -19,29 +19,26 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:colorBackground">
+ android:background="?android:colorPrimary">
- <FrameLayout
- android:id="@+id/pill_tabs_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:layout_marginBottom="@dimen/bottom_actions_height"
- android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
- <include layout="@layout/pill_tabs" />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/screen_preview_layout"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
- android:layout_marginBottom="@dimen/bottom_actions_plus_pill_tabs">
+ android:layout_marginBottom="@dimen/bottom_actions_height"
+ android:orientation="vertical">
+
+ <FrameLayout
+ android:id="@+id/section_header_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <include layout="@layout/section_header" />
+ </FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/live_wallpaper_preview"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
android:layout_gravity="center"
android:clipChildren="false"
android:clipToPadding="false"
@@ -51,7 +48,6 @@
android:id="@+id/touch_forwarding_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:background="@android:color/transparent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -63,23 +59,28 @@
</com.android.wallpaper.picker.TouchForwardingLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
- </FrameLayout>
+ <FrameLayout
+ android:id="@+id/pill_tabs_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
+ <include layout="@layout/pill_tabs" />
+ </FrameLayout>
+ </LinearLayout>
<FrameLayout
- android:id="@+id/section_header_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <include layout="@layout/section_header" android:id="@+id/toolbar_container"/>
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/fullscreen_buttons_container"
+ android:id="@+id/loading"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center"
- android:layout_marginBottom="@dimen/fullscreen_preview_button_margin"
- android:paddingHorizontal="@dimen/pill_tabs_horizontal_margin">
- <include layout="@layout/fullscreen_buttons" />
+ android:layout_height="match_parent"
+ android:forceHasOverlappingRendering="false">
+
+ <androidx.core.widget.ContentLoadingProgressBar
+ android:id="@+id/loading_indicator"
+ style="@android:style/Widget.DeviceDefault.ProgressBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:indeterminate="true" />
</FrameLayout>
<FrameLayout
diff --git a/res/layout/fullscreen_buttons.xml b/res/layout/fullscreen_buttons.xml
deleted file mode 100644
index 63668e7..0000000
--- a/res/layout/fullscreen_buttons.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:layout_height="@dimen/pill_tabs_height"
- android:layout_width="match_parent"
- android:orientation="horizontal"
- android:weightSum="2">
-
- <Button
- android:id="@+id/hide_ui_preview_button"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:layout_marginEnd="@dimen/fullscreen_preview_button_margin_between"
- android:layout_weight="1"
- android:background="@drawable/fullscreen_button_background"
- android:gravity="center"
- android:text="@string/hide_ui_preview_text"
- android:textAlignment="center"
- android:textAppearance="@style/PillTabsTextAppearance"
- android:textColor="?androidprv:attr/textColorOnAccent"
- android:visibility="visible">
- </Button>
-
- <Button
- android:id="@+id/set_as_wallpaper_button"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:layout_marginStart="@dimen/fullscreen_preview_button_margin_between"
- android:layout_weight="1"
- android:background="@drawable/fullscreen_button_background"
- android:gravity="center"
- android:text="@string/set_wallpaper_button_text"
- android:textAlignment="center"
- android:textAppearance="@style/PillTabsTextAppearance"
- android:textColor="?androidprv:attr/textColorOnAccent"
- android:visibility="visible">
- </Button>
-</LinearLayout>
diff --git a/res/layout/fullscreen_wallpaper_preview.xml b/res/layout/fullscreen_wallpaper_preview.xml
index 21b087f..3dc9bc0 100644
--- a/res/layout/fullscreen_wallpaper_preview.xml
+++ b/res/layout/fullscreen_wallpaper_preview.xml
@@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
- android:background="?android:colorBackground" />
+ android:background="?android:colorSecondary" />
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/full_res_image"
diff --git a/res/layout/grid_item_image.xml b/res/layout/grid_item_image.xml
index 7a00b59..2524b68 100755
--- a/res/layout/grid_item_image.xml
+++ b/res/layout/grid_item_image.xml
@@ -21,6 +21,21 @@
android:layout_height="wrap_content"
android:orientation="vertical">
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/grid_item_individual_label_padding_top"
+ android:layout_marginBottom="@dimen/grid_item_individual_label_padding_bottom"
+ android:background="?android:colorSecondary"
+ android:ellipsize="end"
+ android:gravity="center"
+ android:maxLines="1"
+ android:minHeight="@dimen/grid_item_category_label_minimum_height"
+ android:textAppearance="@style/OptionTitleTextAppearance"
+ android:visibility="gone"
+ tools:text="Wallpaper" />
+
<androidx.cardview.widget.CardView
android:id="@+id/wallpaper_container"
android:layout_width="match_parent"
@@ -47,15 +62,6 @@
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:background="@drawable/ic_download_badge"
- android:visibility="gone" />
-
<FrameLayout
android:id="@+id/loading_indicator_container"
android:layout_width="match_parent"
@@ -74,18 +80,4 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
-
- <TextView
- android:id="@+id/title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/grid_item_individual_label_padding_top"
- android:layout_marginBottom="@dimen/grid_item_individual_label_padding_bottom"
- android:ellipsize="end"
- android:gravity="center"
- android:maxLines="1"
- android:minHeight="@dimen/grid_item_category_label_minimum_height"
- android:textAppearance="@style/OptionTitleTextAppearance"
- android:visibility="gone"
- tools:text="Wallpaper" />
</LinearLayout>
diff --git a/res/layout/lock_screen_preview.xml b/res/layout/lock_screen_preview.xml
index 5a01099..d50b012 100644
--- a/res/layout/lock_screen_preview.xml
+++ b/res/layout/lock_screen_preview.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
- Copyright (C) 2021 The Android Open Source Project
+ Copyright (C) 2020 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.
@@ -13,40 +13,48 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<FrameLayout
+<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/lock_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lock_screen_scrim_color">
- <TextView
- android:id="@+id/lock_date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="32dp"
- android:layout_marginTop="84dp"
- android:paddingVertical="16dp"
- android:gravity="center"
- android:fontFamily="@*android:string/config_headlineFontFamily"
- android:textColor="@color/lock_screen_text_color"
- android:textSize="@dimen/lock_screen_preview_date_text_size"
- android:lineHeight="@dimen/lock_screen_preview_date_line_height" />
+ <ImageView
+ android:id="@+id/lock_icon"
+ android:layout_width="@dimen/lock_screen_preview_lock_icon_size"
+ android:layout_height="@dimen/lock_screen_preview_lock_icon_size"
+ android:src="@drawable/ic_lock_outline_24px"
+ android:tint="@color/lock_screen_text_color"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.1" />
<TextView
android:id="@+id/lock_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:fontFamily="@*android:string/config_headlineFontFamily"
- android:textColor="?androidprv:attr/colorAccentPrimary"
+ android:textAppearance="?android:textAppearanceListItemSmall"
+ android:textColor="@color/lock_screen_text_color"
android:textSize="@dimen/lock_screen_preview_time_text_size"
- android:lineHeight="@dimen/lock_screen_preview_time_line_height"
- android:elegantTextHeight="false"
- android:lineSpacingMultiplier="0.7"
- android:letterSpacing="-0.04"
- android:includeFontPadding="false" />
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.3" />
-</FrameLayout>
+ <TextView
+ android:id="@+id/lock_date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:textAppearanceListItemSmall"
+ android:textColor="@color/lock_screen_text_color"
+ android:textSize="@dimen/lock_screen_preview_date_text_size"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/lock_time" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/lock_screen_preview2.xml b/res/layout/lock_screen_preview2.xml
new file mode 100644
index 0000000..f738d15
--- /dev/null
+++ b/res/layout/lock_screen_preview2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Copyright (C) 2021 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:id="@+id/lock_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingHorizontal="24dp"
+ android:background="@color/lock_screen_scrim_color">
+
+ <TextView
+ android:id="@+id/lock_date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:textAppearanceListItemSmall"
+ android:textColor="@color/lock_screen_text_color"
+ android:textSize="@dimen/lock_screen_preview2_date_text_size"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.2" />
+
+ <TextView
+ android:id="@+id/lock_time"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="@dimen/lock_screen_preview2_time_text_size"
+ android:fontFamily="@*android:string/config_headlineFontFamily"
+ android:textColor="?androidprv:attr/colorAccentPrimary"
+ android:elegantTextHeight="false"
+ android:lineSpacingMultiplier="0.75"
+ android:letterSpacing="-0.05"
+ android:includeFontPadding="false"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/lock_date" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/pill_tabs.xml b/res/layout/pill_tabs.xml
index a4d01db..fd14b75 100644
--- a/res/layout/pill_tabs.xml
+++ b/res/layout/pill_tabs.xml
@@ -22,13 +22,12 @@
android:layout_width="match_parent"
android:layout_height="@dimen/pill_tabs_height"
android:background="@drawable/pill_tabs_background"
- app:tabRippleColor="?android:colorControlHighlight"
- app:tabUnboundedRipple="true"
+ app:tabRippleColor="@null"
app:tabGravity="fill"
app:tabIndicator="@drawable/pill_tabs_indicator_background"
app:tabIndicatorColor="?androidprv:attr/colorAccentPrimary"
app:tabIndicatorFullWidth="true"
app:tabIndicatorGravity="stretch"
app:tabTextColor="@color/tab_text_color"
- app:tabSelectedTextColor="?androidprv:attr/textColorOnAccent"
+ app:tabSelectedTextColor="@color/text_color_primary_on_accent"
app:tabTextAppearance="@style/PillTabsTextAppearance" />
diff --git a/res/layout/section_header.xml b/res/layout/section_header.xml
index 49dccbd..305cd00 100644
--- a/res/layout/section_header.xml
+++ b/res/layout/section_header.xml
@@ -19,7 +19,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@null"
app:elevation="0dp">
<Toolbar
diff --git a/res/layout/wallpaper_preview_card.xml b/res/layout/wallpaper_preview_card.xml
index 229b26b..2385ba0 100644
--- a/res/layout/wallpaper_preview_card.xml
+++ b/res/layout/wallpaper_preview_card.xml
@@ -17,9 +17,14 @@
style="@style/FullContentPreviewCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:clipChildren="true"
android:contentDescription="@string/wallpaper_preview_card_content_description">
+ <ImageView
+ android:id="@+id/wallpaper_preview_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="?android:colorPrimary" />
+
<SurfaceView
android:id="@+id/wallpaper_surface"
android:layout_width="match_parent"
@@ -37,10 +42,16 @@
android:layout_height="match_parent"
android:importantForAccessibility="noHideDescendants" />
+ <View
+ android:id="@+id/fade_cover"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:alpha="0"
+ android:background="?android:colorSecondary" />
+
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/wallpaper_preview_spinner"
style="?android:progressBarStyleLarge"
- android:background="@android:color/transparent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout/wallpaper_section_view.xml b/res/layout/wallpaper_section_view.xml
deleted file mode 100644
index e963b3a..0000000
--- a/res/layout/wallpaper_section_view.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.wallpaper.picker.WallpaperSectionView
- 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="wrap_content"
- android:paddingBottom="@dimen/section_bottom_padding"
- android:paddingHorizontal="@dimen/section_horizontal_padding"
- android:orientation="vertical">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/wallpaper_section_background"
- android:contentDescription="@string/wallpaper_preview_card_content_description">
-
- <!-- Width percent = 146(preview width in spec) / 364(parent width in spec) = 0.4 -->
- <!-- The height will be determined programmatically -->
- <include
- android:id="@+id/lock_preview"
- layout="@layout/wallpaper_preview_card"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginTop="@dimen/wallpaper_preview_margin_top"
- app:layout_constraintEnd_toStartOf="@id/home_preview"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintWidth_percent="0.4" />
-
- <include
- android:id="@+id/home_preview"
- layout="@layout/wallpaper_preview_card"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginTop="@dimen/wallpaper_preview_margin_top"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@id/lock_preview"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintWidth_percent="0.4" />
-
- <include
- android:id="@+id/permission_needed"
- layout="@layout/permission_needed_layout"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:visibility="gone"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/home_preview" />
-
- <Button
- android:id="@+id/wallpaper_picker_entry"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginVertical="@dimen/wallpaper_picker_entry_margin_vertical"
- android:background="@drawable/btn_transparent_background"
- android:textColor="?android:attr/colorAccent"
- android:drawablePadding="@dimen/wallpaper_picker_entry_drawable_padding"
- android:drawableStart="@drawable/ic_nav_wallpaper"
- android:drawableTint="?android:attr/colorAccent"
- android:text="@string/wallpaper_picker_entry_title"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/permission_needed" />
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-</com.android.wallpaper.picker.WallpaperSectionView>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index e91262c..37c70df 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Muurpapier"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Muurpapiervoorskou"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Die versameling bestaan nie"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Versteek UI-voorskou"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Wys UI-voorskou"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Verander muurpapier"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Voorskou van sluitskerm se muurpapier"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 515af2c..11c6662 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ልጣፍ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"የልጣፍ ቅድመ-እይታ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ስብስቡ የለም"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"የዩአይ ቅድመ-ዕይታን ደብቅ"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"የዩአይ ቅድመ-ዕይታን አሳይ"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ልጣፍን ይቀይሩ"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"የማያ ገጽ ቁልፍ ልጣፍ ቅድመ-እይታ"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 5ba268c..10b0666 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"الخلفية"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"معاينة عرض الشرائح"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"المجموعة غير متوفرة."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"إخفاء معاينة واجهة المستخدم"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"عرض معاينة واجهة المستخدم"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"تغيير الخلفية"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"معاينة خلفية شاشة القفل"</string>
</resources>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 7b24c45..ba49311 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ৱালপেপাৰ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ৱালপেপাৰৰ পূৰ্বদৰ্শন"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"এই সংগ্ৰহটোৰ অস্তিত্ব নাই"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UIৰ পূৰ্বদৰ্শন লুকুৱাওক"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UIৰ পূৰ্বদৰ্শন দেখুৱাওক"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ৱালপেপাৰ সলনি কৰক"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"লকস্ক্ৰীনৰ ৱালপেপাৰৰ পূৰ্বদৰ্শন"</string>
</resources>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index c0c8e40..4e334f6 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Divar kağızı"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Divar Kağızı önizləməsi"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kolleksiya mövcud deyil"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI Önizləməsini gizlədin"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI Önizləməsini göstərin"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Divar kağızını dəyişin"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Kilid ekranında divar kağızı önizləməsi"</string>
</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index e727635..ed43ea2 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Pozadina"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pregled pozadine"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kolekcija ne postoji"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Sakrij korisnički interfejs"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Prikaži korisnički interfejs"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Promenite pozadinu"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pregled pozadine zaključanog ekrana"</string>
</resources>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 854b347..e218462 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Шпалеры"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Перадпрагляд шпалер"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Калекцыя не існуе"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Схаваць перадпрагляд UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Паказаць перадпрагляд UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Змяніць шпалеры"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Перадпрагляд шпалер экрана блакіроўкі"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 7197d34..1e087e5 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Тапет"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Визуализация на тапета"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Колекцията не съществува"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Скриване на визуал. на ПИ"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Показване на визуал. на ПИ"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Промяна на тапета"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Визуализация на тапета на закл. екран"</string>
</resources>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index e3c5a45..c0fd9b6 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ওয়ালপেপার"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ওয়ালপেপার প্রিভিউ করুন"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"কালেকশন উপলভ্য নেই"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI প্রিভিউ লুকান"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI প্রিভিউ দেখুন"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ওয়ালপেপার পরিবর্তন করুন"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"লকস্ক্রিন ওয়ালপেপার প্রিভিউ"</string>
</resources>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index 23b9666..5d8ff9f 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Pozadinska slika"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pregled pozadinske slike"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kolekcija ne postoji"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Sakrij pregled UI-a"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Prikaži pregled UI-a"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Promijenite pozadinsku sliku"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pregled pozadinske slike zaključanog ekrana"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index b5180eb..5c1139a 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fons de pantalla"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Previsualitz. fons de pantalla"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"La col·lecció no existeix"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Amaga la previsualització de IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostra la previsualització de IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Canvia el fons de pantalla"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Previsual. fons de pantalla de bloqueig"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 5928a7c..81e606f 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Tapeta"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Náhled prezentace"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Sbírka neexistuje"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Skrýt náhled rozhraní"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Zobrazit náhled rozhraní"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Změnit tapetu"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Náhled tapety na obrazovce uzamčení"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index d14cdd6..0efbc9b 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Baggrund"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Forhåndsvisning af baggrund"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Samlingen eksisterer ikke"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Skjul forhåndsvisning af brugerflade"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Vis forhåndsvisning af brugerflade"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Skift baggrund"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Forhåndsvisning af låseskærmens baggrund"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index e2403cb..4bdd8f2 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Hintergrund"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Hintergrundvorschau"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Die Sammlung existiert nicht"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI-Vorschau ausblenden"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI-Vorschau einblenden"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Hintergrund ändern"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Vorschau für Sperrbildschirmhintergrund"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 6a6d6cf..cf1df9e 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Ταπετσαρία"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Προεπισκόπηση ταπετσαρίας"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Η συλλογή δεν υπάρχει."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Απόκρυψη προεπ/σης διεπ.χρήστη"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Εμφάνιση προεπ/σης διεπ.χρήστη"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Αλλαγή ταπετσαρίας"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Προεπ/ση ταπετσαρίας οθόνης κλειδώματος"</string>
</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index e18c790..d96b025 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Wallpaper preview"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"The collection doesn\'t exist"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Hide UI preview"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Show UI preview"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Change wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lockscreen wallpaper preview"</string>
</resources>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index e18c790..d96b025 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Wallpaper preview"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"The collection doesn\'t exist"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Hide UI preview"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Show UI preview"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Change wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lockscreen wallpaper preview"</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index e18c790..d96b025 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Wallpaper preview"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"The collection doesn\'t exist"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Hide UI preview"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Show UI preview"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Change wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lockscreen wallpaper preview"</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index e18c790..d96b025 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Wallpaper preview"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"The collection doesn\'t exist"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Hide UI preview"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Show UI preview"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Change wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lockscreen wallpaper preview"</string>
</resources>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index e81d177..961db68 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Wallpaper preview"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"The collection doesn\'t exist"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Hide UI Preview"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Show UI Preview"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Change wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lockscreen wallpaper preview"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 6f24ee8..249a162 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -30,11 +30,11 @@
<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="home_screen_message" msgid="106444102822522813">"Pantalla principal"</string>
- <string name="lock_screen_message" msgid="1534506081955058013">"Pantalla de bloqueo"</string>
+ <string name="lock_screen_message" msgid="1534506081955058013">"Pantalla bloqueada"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"Pantalla principal y bloqueada"</string>
<string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"Establecer como fondo de pantalla en"</string>
<string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"Pantalla principal"</string>
- <string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"Pantalla de bloqueo"</string>
+ <string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"Pantalla bloqueada"</string>
<string name="set_wallpaper_both_destination" msgid="233216830256235288">"Página principal y bloqueada"</string>
<string name="no_backup_image_wallpaper_label" msgid="6316627676107284851">"Fondo de pantalla rotatorio con imágenes"</string>
<string name="permission_needed_explanation" msgid="139166837541426823">"Para mostrar el fondo de pantalla actual aquí, <xliff:g id="APP_NAME">%1$s</xliff:g> necesita acceso al almacenamiento de tu dispositivo."</string>
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fondo de pantalla"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Vista previa del fondo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"La colección no existe"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ocultar vista previa de la IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostrar vista previa de la IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Cambiar fondo de pantalla"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Vista del fondo de pantalla de bloqueo"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 9a5a181..3eabae8 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fondo de pantalla"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Vista previa de fondo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"La colección no existe"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ocultar vista previa de UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostrar vista previa de UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Cambiar fondo de pantalla"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Vista del fondo de pantalla de bloqueo"</string>
</resources>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 4967fa1..012ce9d 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Taustapilt"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Taustapildi eelvaade"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kogu pole olemas"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Peida kasutajaliidese eelvaade"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Kuva kasutajaliidese eelvaade"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Taustapildi muutmine"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lukustuskuva taustapildi eelvaade"</string>
</resources>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 35d7fd4..f3349af 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Horma-papera"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Horma-paperaren aurrebista"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Ez dago bildumarik"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ezkutatu EIaren aurrebista"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Erakutsi EIaren aurrebista"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Aldatu horma-papera"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pantaila blokeatuko horma-paperaren aurrebista"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index f83b733..b995635 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"کاغذدیواری"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"پیشنمای کاغذدیواری"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"مجموعه وجود ندارد"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"پنهان کردن پیشنمای رابط کاربری"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"نمایش دادن پیشنمای رابط کاربری"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"تغییر کاغذدیواری"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"پیشنمای کاغذدیواری صفحه قفل"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index a86725e..4d9c0a0 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Taustakuva"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Taustakuvan esikatselu"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kyseistä kokoelmaa ei ole olemassa"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Piilota UI:n esikatselu"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Näytä UI:n esikatselu"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Vaihda taustakuva"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lukitusnäytön taustakuvan esikatselu"</string>
</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 0e64262..576714c 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fond d\'écran"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Aperçu du fond d\'écran"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"La collection n\'existe pas"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Masquer l\'aperçu de l\'IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Afficher l\'aperçu de l\'IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Modifier le fond d\'écran"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Aperçu du fond d\'écran de verrouillage"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index af92354..ffe0f76 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fond d\'écran"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Aperçu du fond d\'écran"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Cette collection n\'existe pas"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Masquer l\'aperçu de l\'UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Afficher l\'aperçu de l\'UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Changer de fond d\'écran"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Aperçu du fond d\'écran de verrouillage"</string>
</resources>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index dd91bbe..2600075 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fondo de pantalla"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Vista previa do fondo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"A colección non existe"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ocultar vista previa da IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostrar vista previa da IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Cambiar fondo de pantalla"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Vista previa do fondo de pantalla"</string>
</resources>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index ed0ef29..491df07 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"વૉલપેપર"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"વૉલપેપરનો પ્રીવ્યૂ કરો"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"સંગ્રહ અસ્તિત્વમાં નથી"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UIનો પ્રીવ્યૂ છુપાવો"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UIનો પ્રીવ્યૂ બતાવો"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"વૉલપેપર બદલો"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"લૉકસ્ક્રીન વૉલપેપરનો પ્રીવ્યૂ"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 5cc349a..6c0f15a 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"वॉलपेपर"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"वॉलपेपर की झलक देखें"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"वॉलपेपर का संग्रह मौजूद नहीं है"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"यूज़र इंटरफ़ेस की झलक छिपाएं"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"यूज़र इंटरफ़ेस की झलक दिखाएं"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"वॉलपेपर बदलें"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"लॉकस्क्रीन पर दिखने वाले वॉलपेपर की झलक"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index b8f8c3b..ea8ff24 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Pozadina"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pregled pozadine"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Zbirka ne postoji"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Sakrij pregled koris. sučelja"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Prikaži pregled koris. sučelja"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Promijenite pozadinu"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pregled pozadine zaključanog zaslona"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 9ba7430..742efba 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Háttérkép"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Háttérkép előnézete"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Nincs ilyen gyűjtemény"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI előnézetének elrejtése"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI előnézetének megjelenítése"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Háttérkép megváltoztatása"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Lezárási képernyő háttérképének előnézete"</string>
</resources>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index c15fb9b..e3d2a07 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Պաստառ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Պաստառի նախադիտում"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Հավաքածուն գոյություն չունի"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Թաքցնել նախադիտման էկրանը"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Ցուցադրել նախադիտման էկրանը"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Պաստառի փոփոխություն"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Կողպէկրանի պաստառի նախադիտում"</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index c1ade44..70150cb 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pratinjau wallpaper"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Koleksi tidak ada"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Sembunyikan Pratinjau UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Tampilkan Pratinjau UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Ubah wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pratinjau wallpaper layar kunci"</string>
</resources>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index 6036971..04031ef 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Veggfóður"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Forskoðun veggfóðurs"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Safnið er ekki til"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Fela forskoðun notendaviðmóts"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Sýna forskoðun notendaviðmóts"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Skipta um veggfóður"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Forskoðun veggfóðurs á lásskjá"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 95cdcb1..8b5ce43 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Sfondo"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Anteprima sfondo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"La raccolta non esiste"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Nascondi UI Anteprima"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostra UI Anteprima"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Cambia sfondo"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Anteprima sfondo schermata di blocco"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index ddda5b8..d5d97e5 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"טפט"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"תצוגה מקדימה של הטפט"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"האוסף לא קיים"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"ללא תצוגה מקדימה בממשק המשתמש"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"עם תצוגה מקדימה בממשק המשתמש"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"שינוי הטפט"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"תצוגה מקדימה של הטפט במסך הנעילה"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index bdeba4c..a73f2ee 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"壁紙"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"壁紙のプレビュー"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"コレクションは存在しません"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI プレビューを非表示"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI プレビューを表示"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"壁紙の変更"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ロック画面の壁紙のプレビュー"</string>
</resources>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index c14057b..09cf8ce 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ფონი"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ფონის გადახედვა"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"კოლექცია არ არსებობს"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI გადახედვის დამალვა"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI გადახედვის გამოჩენა"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ფონის შეცვლა"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ჩაკეტილი ეკრანის ფონის გადახედვა"</string>
</resources>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index dcc00aa..2e8e6dc 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Тұсқағаз"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Тұсқағазды алдын ала қарау"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Жинақ жоқ."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Алдын ала қарау экранын жасыру"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Алдын ала қарау экранын көрсету"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Тұсқағазды өзгерту"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Құлып экраны тұсқағазын алдын ала қарау"</string>
</resources>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index c98eac5..aac84ab 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ផ្ទាំងរូបភាព"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ការមើលផ្ទាំងរូបភាពសាកល្បង"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"បណ្ដុំមិនមានទេ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"លាក់ការមើល UI សាកល្បង"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"បង្ហាញការមើល UI សាកល្បង"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ប្ដូរផ្ទាំងរូបភាព"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ការមើលផ្ទាំងរូបភាពអេក្រង់ចាក់សោសាកល្បង"</string>
</resources>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index 4c11952..d247d76 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ವಾಲ್ಪೇಪರ್"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ವಾಲ್ಪೇಪರ್ ಪೂರ್ವವೀಕ್ಷಣೆ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ಸಂಗ್ರಹಣೆ ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI ಪೂರ್ವವೀಕ್ಷಣೆಯನ್ನು ಮರೆಮಾಡಿ"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI ಪೂರ್ವವೀಕ್ಷಣೆಯನ್ನು ತೋರಿಸಿ"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ವಾಲ್ಪೇಪರ್ ಬದಲಿಸಿ"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ಲಾಕ್ಸ್ಕ್ರೀನ್ ವಾಲ್ಪೇಪರ್ ಪೂರ್ವವೀಕ್ಷಣೆ."</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 527d453..8650033 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"배경화면"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"배경화면 미리보기"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"컬렉션이 없습니다."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI 미리보기 숨기기"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI 미리보기 표시"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"배경화면 변경"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"잠금 화면 배경화면 미리보기"</string>
</resources>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 8cfee93..060bf09 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Тушкагаз"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Тушкагазды алдын ала көрүү"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Мындай жыйнак жок"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Алдын ала көрүү экранын жашыруу"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Алдын ала көрүү экранын көрсөтүү"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Тушкагазды өзгөртүү"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Кулпуланган экрандын тушкагазын көрүү"</string>
</resources>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index 60fb81c..1d885fa 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ຮູບພື້ນຫຼັງ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ຕົວຢ່າງຮູບພື້ນຫຼັງ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ບໍ່ມິຄໍເລັກຊັນ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"ເຊື່ອງຕົວຢ່າງສ່ວນຕິດຕໍ່ຜູ້ໃຊ້"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"ສະແດງຕົວຢ່າງສ່ວນຕິດຕໍ່ຜູ້ໃຊ້"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ປ່ຽນຮູບພື້ນຫຼັງ"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ຕົວຢ່າງຮູບພື້ນຫຼັງໜ້າຈໍລັອກ"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 970f879..def2202 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Ekrano fonas"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Ekrano fono peržiūra"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Rinkinio nėra"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Slėpti NS peržiūrą"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Rodyti NS peržiūrą"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Ekrano fono keitimas"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Užrakinimo ekrano fono peržiūra"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index b250b2c..16dab29 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fona tapete"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Fona tapetes priekšskatījums"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Kolekcija nepastāv"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Paslēpt saskarnes priekšskatījumu"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Rādīt saskarnes priekšskatījumu"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Fona tapetes maiņa"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Bloķēšanas ekrāna fona tapetes priekšsk."</string>
</resources>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 2232c07..63df2c1 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Тапет"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Преглед на тапет"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Збирката не постои"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Сокриј го прегледот на UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Прикажи го прегледот на UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Сменете го тапетот"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Преглед на тапетот за заклучен екран"</string>
</resources>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index d4df3a6..99a2ff7 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"വാൾപേപ്പർ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"വാൾപേപ്പർ പ്രിവ്യൂ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ശേഖരം നിലവിലില്ല"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI പ്രിവ്യൂ മറയ്ക്കുക"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI പ്രിവ്യൂ കാണിക്കുക"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"വാൾപേപ്പർ മാറ്റുക"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ലോക്ക്സ്ക്രീൻ വാൾപേപ്പറിന്റെ പ്രിവ്യൂ"</string>
</resources>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index 0089b0e..680faa6 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Дэлгэцийн зураг"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Дэлгэцийн зургийг урьдчилан үзэх"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Ийм цуглуулга байхгүй"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI урьдчилан үзэлтийг нуух"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI урьдчилан үзэлтийг харуулах"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Дэлгэцийн зургийг өөрчлөх"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Түгжигдсэн дэлгэцийн зургийг урьдчилан үзэх"</string>
</resources>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index ee0baa5..4ae38e8 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"वॉलपेपर"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"वॉलपेपर पूर्वावलोकन"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"संग्रह अस्तित्वात नाही"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI पूर्वावलोकन लपवा"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI पूर्वावलोकन दाखवा"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"वॉलपेपर बदला"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"लॉकस्क्रीनच्या वॉलपेपरचे पूर्वावलोकन"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 482e458..484e4cf 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Kertas dinding"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pratonton kertas dinding"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Koleksi tersebut tidak wujud"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Sembunyikan Pratontotn UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Tunjukkan Pratonton UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Tukar kertas dinding"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pratonton kertas dinding skrin kunci"</string>
</resources>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 70028ea..b220147 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"နောက်ခံ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"နောက်ခံပုံ အစမ်းကြည့်ရှုခြင်း"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ဤစုစည်းမှု မရှိပါ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI အစမ်းကြည့်ခြင်းကို ဝှက်ရန်"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI အစမ်းကြည့်ခြင်းကို ပြရန်"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"နောက်ခံပုံပြောင်းရန်"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"လော့ခ်မျက်နှာပြင်နောက်ခံ အစမ်းကြည့်ခြင်း"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 66fe1b8..3b23d21 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Bakgrunn"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Forhåndsvisning av bakgrunn"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Samlingen eksisterer ikke"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Skjul UI-forhåndsvisning"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Vis UI-forhåndsvisning"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Endre bakgrunn"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Forhåndsvisning av låseskjermbakgrunn"</string>
</resources>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index a46d775..f5b3081 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"वालपेपर"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"वालपेपरको प्रिभ्यु"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"यो सङ्ग्रह छैन"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI प्रिभ्यू लुकाइयोस्"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI प्रिभ्यू देखाइयोस्"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"वालपेपर बदल्नुहोस्"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"लकस्क्रिनमा देखिने वालपेपरको प्रिभ्यू"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 2041d7a..3b15f2d 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Achtergrond"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Achtergrondvoorbeeld"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"De collectie bestaat niet"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Voorbeeld van UI verbergen"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Voorbeeld van UI tonen"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Achtergrond wijzigen"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Voorbeeld achtergrond vergrendelscherm"</string>
</resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 689e813..f707023 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ୱାଲପେପର୍"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ୱାଲପେପରର ପ୍ରିଭ୍ୟୁ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ସଂଗ୍ରହ ଉପଲବ୍ଧ ନାହିଁ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI ପ୍ରିଭ୍ୟୁକୁ ଲୁଚାନ୍ତୁ"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI ପ୍ରିଭ୍ୟୁ ଦେଖାନ୍ତୁ"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ୱାଲପେପର୍ ପରିବର୍ତ୍ତନ କରନ୍ତୁ"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ଲକସ୍କ୍ରିନ୍ ୱାଲପେପର୍ ପ୍ରିଭ୍ୟୁ"</string>
</resources>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index b035fef..9f82470 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"ਵਾਲਪੇਪਰ"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"ਵਾਲਪੇਪਰ ਦੀ ਪੂਰਵ-ਝਲਕ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ਸੰਗ੍ਰਹਿ ਮੌਜੂਦ ਨਹੀਂ ਹੈ"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI ਦੀ ਪੂਰਵ-ਝਲਕ ਲੁਕਾਓ"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI ਦੀ ਪੂਰਵ-ਝਲਕ ਦਿਖਾਓ"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"ਵਾਲਪੇਪਰ ਬਦਲੋ"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ਲਾਕਸਕ੍ਰੀਨ ਵਾਲਪੇਪਰ ਦੀ ਪੂਰਵ-ਝਲਕ"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 63eb030..ed50411 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Tapeta"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Podgląd tapety"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Taka kolekcja nie istnieje"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ukryj podgląd UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Pokaż podgląd UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Zmień tapetę"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Podgląd tapety na ekranie blokady"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index d0ecf3b..060f60d 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Imagem de fundo"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pré-visual. da imagem de fundo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"A coleção não existe."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ocultar pré-visualização da IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostrar pré-visualização da IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Altere a imagem de fundo"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pré-vis. imag. de fundo do ecrã de bloq."</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index be83e08..df1d052 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Plano de fundo"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Visualização do plano de fundo"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"A coleção não existe"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ocultar visualização da IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Mostrar visualização da IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Mudar plano de fundo"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Plano de fundo da tela de bloqueio"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 210a79a..eaaf4c0 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Imagine de fundal"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Previzualizarea imaginii de fundal"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Colecția nu există"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ascunde previzualizarea IU"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Afișează previzualizarea IU"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Schimbați imaginea de fundal"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Fundal pentru ecranul de blocare"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index d7b8f8f..62d17ba 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Обои"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Предварительный просмотр обоев"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Такой подборки не существует."</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Скрыть экран предпросмотра"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Предпросмотр интерфейса"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Сменить обои"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Предпросмотр обоев для заблок. экрана"</string>
</resources>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index bcfaecd..bf81b00 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"වෝල්පේපරය"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"වෝල්පේපර පෙරදසුන"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"එකතුව නොපවතී"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI පෙරදසුන සඟවන්න"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI පෙරදසුන පෙන්වන්න"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"වෝල්පේපරය වෙනස් කරන්න"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"අගුලු තිර වෝල්පේපර පෙරදසුන"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 0d20966..89b45d4 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Tapeta"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Ukážka tapety"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Zbierka neexistuje"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Skryť ukážku použ. rozhrania"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Zobr. ukážku použ. rozhrania"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Zmeniť tapetu"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Ukážka tapety na uzamknutej obrazovke"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index ffd1625..2c90b21 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Zaslonsko ozadje"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Predogled zaslonskih ozadij"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Zbirka ne obstaja"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Skrij predogled upor. vmesnika"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Pokaži predogled upo. vmesnika"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Zamenjava zaslonskega ozadja"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Predogled zaslon. ozadja zaklen. zaslona"</string>
</resources>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index c67edd7..ff4a9d9 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Imazhi i sfondit"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Pamja paraprake e imazhit të sfondit"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Koleksioni nuk ekziston"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Fshih pamjen paraprake të ndërfaqes së përdoruesit"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Shfaq pamjen paraprake të ndërfaqes së përdoruesit"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Ndrysho imazhin e sfondit"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Pamja paraprake e imazhit të sfondit të ekranit të kyçjes"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index bcbfc87..ecd2f51 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Позадина"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Преглед позадине"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Колекција не постоји"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Сакриј кориснички интерфејс"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Прикажи кориснички интерфејс"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Промените позадину"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Преглед позадине закључаног екрана"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 757e6e3..119257e 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Bakgrund"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Förhandsgranska bakgrunden"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Samlingen finns inte"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Dölj förhandsgranskning av UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Visa förhandsgranskning av UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Ändra bakgrund"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Förhandsgranskning av låsskärmsbakgrund"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 7b43b94..8ca6e68 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Mandhari"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Onyesho la kukagua mandhari"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Mkusanyiko huu haupo"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ficha Onyesho la Kukagua Kiolesura"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Onyesha Onyesho la Kukagua Kiolesura"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Badilisha mandhari"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Onyesho la kukagua mandhari kwenye skrini iliyofungwa"</string>
</resources>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 58624eb..4a5b096 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"வால்பேப்பர்"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"வால்பேப்பர் மாதிரிக்காட்சி"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"இந்தத் தொகுப்பு இல்லை"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI மாதிரிக்காட்சியை மறை"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI மாதிரிக்காட்சியைக் காட்டு"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"வால்பேப்பரை மாற்றுதல்"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"லாக்ஸ்கிரீன் வால்பேப்பர் மாதிரிக்காட்சி"</string>
</resources>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index ed8bc4e..e8b2d1c 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"వాల్పేపర్"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"వాల్పేపర్ ప్రివ్యూ"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ఈ సేకరణ అందుబాటులో లేదు"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI ప్రివ్యూని దాచిపెట్టు"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI ప్రివ్యూని చూపించు"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"వాల్పేపర్ను మార్చండి"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"లాక్స్క్రీన్ వాల్పేపర్ ప్రివ్యూ"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 40ff193..a027d64 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"วอลเปเปอร์"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"พรีวิววอลเปเปอร์"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"ไม่มีคอลเล็กชัน"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"ซ่อนตัวอย่าง UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"แสดงตัวอย่าง UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"เปลี่ยนวอลเปเปอร์"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"ตัวอย่างวอลเปเปอร์ของหน้าจอล็อก"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 266f6d0..3cabd22 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Wallpaper"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Preview ng wallpaper"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Wala ang koleksyon"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Itago ang Preview ng UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Ipakita ang Preview ng UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Palitan ang wallpaper"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Preview ng wallpaper ng lockscreen"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 6e834b4..008de95 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Duvar kağıdı"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Duvar kağıdı ön izleme"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Koleksiyon mevcut değil"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Arayüz Önizlemesini Gizle"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Arayüz Önizlemesini Göster"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Duvar kağıdını değiştir"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Kilit ekranı duvar kağıdı önizlemesi"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 076096a..9021401 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Фоновий малюнок"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Перегляд фонового малюнка"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Колекція не існує"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Сховати інтерфейс перегляду"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Показати інтерфейс перегляду"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Змінити фоновий малюнок"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Перегляд фону екрана блокування"</string>
</resources>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 9e78964..c95c1d5 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"وال پیپر"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"وال پیپر کا پیش منظر"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"مجموعہ موجود نہیں ہے"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"UI کا پیش منظر چھپائیں"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"UI کا پیش منظر دکھائیں"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"وال پیپر تبدیل کریں"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"لاک اسکرین وال پیپر کا پیش منظر"</string>
</resources>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 3ea066a..2fb79b0 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Fon rasmi"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Fon rasmiga razm solish"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Bunday terma mavjud emas"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Interfeys namunasini berkitish"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Interfeys namunasini chiqarish"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Fon rasmini almashtirish"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Ekran qulfida fon rasmini koʻrish"</string>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 880f544..1c072d5 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Hình nền"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Xem trước hình nền"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Bộ sưu tập không tồn tại"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Ẩn giao diện người dùng xem trước"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Hiện giao diện người dùng xem trước"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Thay đổi hình nền"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Xem trước hình nền trên màn hình khóa"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 22139fe..24d4bf7 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"壁纸"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"壁纸预览"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"该集合不存在"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"隐藏界面预览"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"显示界面预览"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"更换壁纸"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"锁定屏幕壁纸预览"</string>
</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 94f4912..6e2f7f7 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"桌布"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"預覽桌布"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"桌布集不存在"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"隱藏使用者介面預覽"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"顯示使用者介面預覽"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"變更桌布"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"上鎖畫面桌布預覽"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 4304328..8ce3524 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -29,11 +29,11 @@
<string name="static_wallpaper_presentation_mode_message" msgid="417940227049360906">"目前設定的桌布"</string>
<string name="rotating_wallpaper_presentation_mode_message" msgid="3361676041605733288">"每日桌布"</string>
<string name="wallpaper_destination_both" msgid="1124197176741944063">"主螢幕和螢幕鎖定"</string>
- <string name="home_screen_message" msgid="106444102822522813">"主畫面"</string>
+ <string name="home_screen_message" msgid="106444102822522813">"主螢幕"</string>
<string name="lock_screen_message" msgid="1534506081955058013">"螢幕鎖定"</string>
<string name="home_and_lock_short_label" msgid="2937922943541927983">"主螢幕和螢幕鎖定"</string>
<string name="set_wallpaper_dialog_message" msgid="2110475703996853076">"設定以下畫面的桌布:"</string>
- <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"主畫面"</string>
+ <string name="set_wallpaper_home_screen_destination" msgid="7315594722013109354">"主螢幕"</string>
<string name="set_wallpaper_lock_screen_destination" msgid="6224685559375417945">"螢幕鎖定"</string>
<string name="set_wallpaper_both_destination" msgid="233216830256235288">"主畫面和螢幕鎖定畫面"</string>
<string name="no_backup_image_wallpaper_label" msgid="6316627676107284851">"輪播圖片桌布"</string>
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"桌布"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"桌布預覽"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"這個系列不存在"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"隱藏使用者介面預覽畫面"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"顯示使用者介面預覽畫面"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"變更桌布"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"螢幕鎖定畫面桌布預覽"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 43612b0..3d693f5 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -94,8 +94,4 @@
<string name="wallpaper_title" msgid="6754214682228331092">"Isithombe sangemuva"</string>
<string name="wallpaper_preview_card_content_description" msgid="6049261033541034584">"Ukubuka kuqala kwesithombe sangemuva"</string>
<string name="collection_not_exist_msg" msgid="3504852962885064842">"Uqoqo alutholakali"</string>
- <string name="hide_ui_preview_text" msgid="6766076482511252295">"Fihla ukuhlola kuqala kwe-UI"</string>
- <string name="show_ui_preview_text" msgid="5993063062417070806">"Bonisa ukuhlola kuqala kwe-UI"</string>
- <string name="wallpaper_picker_entry_title" msgid="5185793991582084891">"Shintsha isithombe sangemuva"</string>
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="2244890820627302245">"Ukubuka kuqala kwesithombe sangemuva sokukhiya isikrini"</string>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2c4b336..0c144f1 100755
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -34,4 +34,7 @@
<color name="smartspace_preview_shadow_color_dark">#B0000000</color>
<color name="smartspace_preview_shadow_color_transparent">@android:color/transparent</color>
+
+ <!-- Primary text on top of accent colors should always be dark -->
+ <color name="text_color_primary_on_accent">@*android:color/text_color_primary_device_default_light</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a1c3150..f8fbd29 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -18,10 +18,6 @@
<dimen name="grid_padding">4dp</dimen>
<dimen name="grid_padding_desktop">8dp</dimen>
- <!-- Dimensions for all grid item tiles. -->
- <dimen name="grid_item_all_radius">28dp</dimen>
- <dimen name="grid_item_all_radius_small">20dp</dimen>
-
<!-- Dimensions for "category" tiles. -->
<dimen name="grid_item_category_label_padding_top">6dp</dimen>
<dimen name="grid_item_category_label_minimum_height">16dp</dimen>
@@ -38,7 +34,7 @@
<!-- Dimensions for individual wallpaper tiles. -->
<dimen name="grid_item_individual_padding_horizontal">4dp</dimen>
<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_top">4dp</dimen>
<dimen name="grid_item_individual_label_padding_bottom">4dp</dimen>
<dimen name="wallpaper_grid_edge_space">20dp</dimen>
<dimen name="wallpaper_grid_padding_top">32dp</dimen>
@@ -48,12 +44,6 @@
<dimen name="grid_item_featured_individual_padding_bottom">12dp</dimen>
<dimen name="featured_wallpaper_grid_edge_space">18dp</dimen>
- <!-- Dimensions for individual wallpaper wallpaper tiles' badge -->
- <dimen name="grid_item_badge_size">24dp</dimen>
- <dimen name="grid_item_badge_indicator_size">16dp</dimen>
- <dimen name="grid_item_badge_margin_small">8dp</dimen>
- <dimen name="grid_item_badge_margin">12dp</dimen>
-
<!-- Dimensions for "permissions needed" tile. -->
<dimen name="permissions_needed_metadata_content_margin_top">16dp</dimen>
<dimen name="permissions_needed_metadata_warning_icon_margin_sides">16dp</dimen>
@@ -158,10 +148,6 @@
<dimen name="bottom_action_button_padding_horizontal">26dp</dimen>
<dimen name="bottom_action_button_radius">100dp</dimen>
- <!-- Whenever updating this file, ensure that
- bottom_actions_plus_pill_tabs == bottom_actions_height + pill_tabs_height -->
- <dimen name="bottom_actions_plus_pill_tabs">144dp</dimen>
-
<dimen name="bottom_sheet_margin">24dp</dimen>
<dimen name="wallpaper_info_pane_padding">24dp</dimen>
<dimen name="wallpaper_info_pane_subtitle1_top_margin">4dp</dimen>
@@ -174,32 +160,17 @@
<dimen name="option_title_line_height">20dp</dimen>
<!-- Dimensions for the pill tabs. -->
- <dimen name="pill_tabs_height">56dp</dimen>
+ <dimen name="pill_tabs_height">60dp</dimen>
<dimen name="pill_tabs_corner_radius">50dp</dimen>
<dimen name="pill_tabs_horizontal_margin">24dp</dimen>
- <!-- Whenever updating this file, ensure that
- fullscreen_preview_button_margin == - pill_tabs_height -->
- <dimen name="fullscreen_preview_button_margin">-60dp</dimen>
- <dimen name="fullscreen_preview_button_margin_between">15dp</dimen>
- <dimen name="fullscreen_preview_button_margin_bottom">28dp</dimen>
-
<!-- The size of lock screen widget on the full screen. -->
+ <dimen name="lock_screen_preview_lock_icon_size">42dp</dimen>
+ <dimen name="lock_screen_preview_time_text_size">54dp</dimen>
+ <dimen name="lock_screen_preview_date_text_size">18dp</dimen>
<dimen name="smartspace_preview_key_ambient_shadow_blur">1.5dp</dimen>
- <dimen name="lock_screen_preview_date_text_size">20dp</dimen>
- <dimen name="lock_screen_preview_date_line_height">24dp</dimen>
- <dimen name="lock_screen_preview_time_text_size">200dp</dimen>
- <dimen name="lock_screen_preview_time_line_height">168dp</dimen>
- <!-- Common dimensions for option sections -->
- <dimen name="section_container_vertical_margin">24dp</dimen>
- <dimen name="section_horizontal_padding">24dp</dimen>
- <dimen name="section_vertical_padding">24dp</dimen>
- <dimen name="section_top_padding">16dp</dimen>
- <dimen name="section_bottom_padding">16dp</dimen>
-
- <!-- For the wallpaper section -->
- <dimen name="wallpaper_preview_margin_top">24dp</dimen>
- <dimen name="wallpaper_picker_entry_drawable_padding">8dp</dimen>
- <dimen name="wallpaper_picker_entry_margin_vertical">18dp</dimen>
+ <!-- The size of lock screen preview 2 on the full screen. -->
+ <dimen name="lock_screen_preview2_date_text_size">20dp</dimen>
+ <dimen name="lock_screen_preview2_time_text_size">170dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f370463..47da9aa 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -321,7 +321,7 @@
<!-- Content description of "slideshow wallpaper" button on the bottom action bar. [CHAR LIMIT=50] -->
<string name="bottom_action_bar_slideshow_wallpaper">Slideshow Wallpaper</string>
- <!-- Apply button on the bottom action bar. [CHAR LIMIT=30] -->
+ <!-- Content description of apply button on the bottom action bar. [CHAR LIMIT=30] -->
<string name="bottom_action_bar_apply">Apply</string>
<!-- Accessibility label for paging indicator in theme picker preview [CHAR LIMIT=NONE] -->
@@ -344,17 +344,4 @@
<!-- 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>
-
- <!-- Label for a button which lets user hide certain parts of the fullscreen preview UI. [CHAR LIMIT=30] -->
- <string name="hide_ui_preview_text">Hide UI Preview</string>
-
- <!-- Label for a button which lets user show certain parts of the fullscreen preview UI. [CHAR LIMIT=30] -->
- <string name="show_ui_preview_text">Show UI Preview</string>
-
- <!-- The title of wallpaper picker entry in new picker. [CHAR LIMIT=30] -->
- <string name="wallpaper_picker_entry_title" msgid="7039652539125902659">Change wallpaper</string>
-
- <!-- Content description of wallpaper preview card (lockscreen). [CHAR_LIMIT=40]-->
- <string name="lockscreen_wallpaper_preview_card_content_description" msgid="8575577284424318765">Lockscreen wallpaper preview</string>
-
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 729b4ce..893ea49 100755
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -142,14 +142,12 @@
</style>
<!-- Set wallpaper destination item -->
- <!-- Studio can't directly reference ?androidprv:attr/textColorOnAccent here,
- so we set the text color on the dialog items instead. -->
<style name="set_wallpaper_destination_item">
- <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
<item name="android:minHeight">@dimen/set_wallpaper_dialog_item_min_height</item>
<item name="android:minWidth">@dimen/set_wallpaper_dialog_item_min_width</item>
<item name="android:textAlignment">center</item>
<item name="android:textSize">@dimen/abc_text_size_small_material</item>
+ <item name="android:textColor">@color/text_color_primary_on_accent</item>
<item name="android:letterSpacing">0.02</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/dialog_option_background</item>
@@ -177,6 +175,7 @@
</style>
<style name="FullContentPreviewCard" parent="PreviewCard">
+ <item name="android:clipChildren">true</item>
<item name="contentPadding">0dp</item>
</style>
diff --git a/src/com/android/wallpaper/asset/Asset.java b/src/com/android/wallpaper/asset/Asset.java
index 0b87084..f600e84 100755
--- a/src/com/android/wallpaper/asset/Asset.java
+++ b/src/com/android/wallpaper/asset/Asset.java
@@ -32,7 +32,6 @@
import android.widget.ImageView;
import androidx.annotation.Nullable;
-import androidx.annotation.WorkerThread;
import com.android.wallpaper.module.BitmapCropper;
import com.android.wallpaper.module.InjectorProvider;
@@ -128,17 +127,6 @@
}
/**
- * Returns a Bitmap from the separate low resolution data source (if there is one) or
- * {@code null} otherwise.
- * This could be an I/O operation so DO NOT CALL ON UI THREAD
- */
- @WorkerThread
- @Nullable
- public Bitmap getLowResBitmap(Context context) {
- return null;
- }
-
- /**
* Returns whether the asset supports rendering tile regions at varying pixel densities.
*/
public abstract boolean supportsTiling();
diff --git a/src/com/android/wallpaper/asset/CurrentWallpaperAssetVN.java b/src/com/android/wallpaper/asset/CurrentWallpaperAssetVN.java
index 8f30cae..d7460d6 100755
--- a/src/com/android/wallpaper/asset/CurrentWallpaperAssetVN.java
+++ b/src/com/android/wallpaper/asset/CurrentWallpaperAssetVN.java
@@ -15,35 +15,26 @@
*/
package com.android.wallpaper.asset;
-import android.app.Activity;
import android.app.WallpaperManager;
import android.content.Context;
-import android.graphics.Bitmap;
import android.graphics.Point;
import android.graphics.Rect;
-import android.graphics.drawable.ColorDrawable;
import android.os.ParcelFileDescriptor;
import android.os.ParcelFileDescriptor.AutoCloseInputStream;
import android.util.Log;
import android.widget.ImageView;
-import androidx.annotation.WorkerThread;
-
import com.android.wallpaper.compat.WallpaperManagerCompat;
import com.android.wallpaper.compat.WallpaperManagerCompat.WallpaperLocation;
import com.android.wallpaper.util.WallpaperCropUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.Key;
-import com.bumptech.glide.load.MultiTransformation;
-import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
-import com.bumptech.glide.load.resource.bitmap.FitCenter;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.RequestOptions;
import java.io.InputStream;
import java.security.MessageDigest;
-import java.util.concurrent.ExecutionException;
/**
* Asset representing the currently-set image wallpaper on N+ devices, including when daily rotation
@@ -97,35 +88,6 @@
return false;
}
-
- @Override
- public void loadLowResDrawable(Activity activity, ImageView imageView, int placeholderColor,
- BitmapTransformation transformation) {
- MultiTransformation<Bitmap> multiTransformation =
- new MultiTransformation<>(new FitCenter(), transformation);
- Glide.with(activity)
- .asDrawable()
- .load(this)
- .apply(RequestOptions.bitmapTransform(multiTransformation)
- .placeholder(new ColorDrawable(placeholderColor)))
- .into(imageView);
- }
-
- @Override
- @WorkerThread
- public Bitmap getLowResBitmap(Context context) {
- try {
- return Glide.with(context)
- .asBitmap()
- .load(this)
- .submit()
- .get();
- } catch (InterruptedException | ExecutionException e) {
- Log.w(TAG, "Couldn't obtain low res bitmap", e);
- }
- return null;
- }
-
@Override
public void loadDrawable(Context context, ImageView imageView,
int unusedPlaceholderColor) {
diff --git a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
index 227f8b8..30bf566 100755
--- a/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
+++ b/src/com/android/wallpaper/asset/LiveWallpaperThumbAsset.java
@@ -21,7 +21,6 @@
import android.content.res.AssetFileDescriptor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
@@ -31,36 +30,26 @@
import android.util.Log;
import android.widget.ImageView;
-import androidx.annotation.WorkerThread;
-
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.Key;
-import com.bumptech.glide.load.MultiTransformation;
-import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
-import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
-import com.bumptech.glide.load.resource.bitmap.FitCenter;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.RequestOptions;
import java.io.IOException;
import java.security.MessageDigest;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
/**
* Asset wrapping a drawable for a live wallpaper thumbnail.
*/
public class LiveWallpaperThumbAsset extends Asset {
private static final String TAG = "LiveWallpaperThumbAsset";
- private static final int LOW_RES_THUMB_TIMEOUT_SECONDS = 2;
protected final Context mContext;
protected final android.app.WallpaperInfo mInfo;
// The content Uri of thumbnail
protected Uri mUri;
- private Drawable mThumbnailDrawable;
+ private BitmapDrawable mThumbnailDrawable;
public LiveWallpaperThumbAsset(Context context, android.app.WallpaperInfo info) {
mContext = context.getApplicationContext();
@@ -117,56 +106,6 @@
.into(imageView);
}
- @Override
- public void loadLowResDrawable(Activity activity, ImageView imageView, int placeholderColor,
- BitmapTransformation transformation) {
- Transformation<Bitmap> finalTransformation = (transformation == null)
- ? new FitCenter()
- : new MultiTransformation<>(new FitCenter(), transformation);
- Glide.with(activity)
- .asDrawable()
- .load(LiveWallpaperThumbAsset.this)
- .apply(RequestOptions.bitmapTransform(finalTransformation)
- .placeholder(new ColorDrawable(placeholderColor)))
- .into(imageView);
- }
-
- @Override
- @WorkerThread
- public Bitmap getLowResBitmap(Context context) {
- try {
- Drawable drawable = Glide.with(context)
- .asDrawable()
- .load(this)
- .submit()
- .get(LOW_RES_THUMB_TIMEOUT_SECONDS, TimeUnit.SECONDS);
-
- if (drawable instanceof BitmapDrawable) {
- BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
- Bitmap bitmap = bitmapDrawable.getBitmap();
- if (bitmap != null) {
- return bitmap;
- }
- }
- Bitmap bitmap;
- // If not a bitmap, draw the drawable into a bitmap
- if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
- return null;
- } else {
- bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
- drawable.getIntrinsicHeight(), Bitmap.Config.RGB_565);
- }
-
- Canvas canvas = new Canvas(bitmap);
- drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
- drawable.draw(canvas);
- return bitmap;
- } catch (InterruptedException | ExecutionException | TimeoutException e) {
- Log.w(TAG, "Couldn't obtain low res bitmap", e);
- }
- return null;
- }
-
/**
* Returns a Glide cache key.
*/
@@ -179,10 +118,10 @@
* the main UI thread.
*/
protected Drawable getThumbnailDrawable() {
- if (mThumbnailDrawable != null) {
- return mThumbnailDrawable;
- }
if (mUri != null) {
+ if (mThumbnailDrawable != null) {
+ return mThumbnailDrawable;
+ }
try (AssetFileDescriptor assetFileDescriptor =
mContext.getContentResolver().openAssetFileDescriptor(mUri, "r")) {
if (assetFileDescriptor != null) {
@@ -194,8 +133,7 @@
Log.w(TAG, "Not found thumbnail from URI.");
}
}
- mThumbnailDrawable = mInfo.loadThumbnail(mContext.getPackageManager());
- return mThumbnailDrawable;
+ return mInfo.loadThumbnail(mContext.getPackageManager());
}
/**
diff --git a/src/com/android/wallpaper/model/AppResourceWallpaperInfo.java b/src/com/android/wallpaper/model/AppResourceWallpaperInfo.java
index 59f39c9..20d0f2b 100755
--- a/src/com/android/wallpaper/model/AppResourceWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/AppResourceWallpaperInfo.java
@@ -65,7 +65,6 @@
}
private AppResourceWallpaperInfo(Parcel in) {
- super(in);
mPackageName = in.readString();
mThumbRes = in.readInt();
mFullRes = in.readInt();
@@ -182,7 +181,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeString(mPackageName);
parcel.writeInt(mThumbRes);
parcel.writeInt(mFullRes);
diff --git a/src/com/android/wallpaper/model/CategoryProvider.java b/src/com/android/wallpaper/model/CategoryProvider.java
index 93158a3..9d2ab09 100755
--- a/src/com/android/wallpaper/model/CategoryProvider.java
+++ b/src/com/android/wallpaper/model/CategoryProvider.java
@@ -62,13 +62,13 @@
/**
* Resets the fetched categories if needed.
- *
- * @return {@code true} if the fetched categories are reset; {@code false} otherwise.
*/
- boolean resetIfNeeded();
+ void resetIfNeeded();
/**
- * Checks if featured collection available.
+ * Checks if the category is a featured category.
+ *
+ * @param category the category to be verified
*/
- boolean isFeaturedCollectionAvailable();
+ boolean isFeaturedCategory(Category category);
}
diff --git a/src/com/android/wallpaper/model/CurrentWallpaperInfoVN.java b/src/com/android/wallpaper/model/CurrentWallpaperInfoVN.java
index cc2677a..bf54bfd 100755
--- a/src/com/android/wallpaper/model/CurrentWallpaperInfoVN.java
+++ b/src/com/android/wallpaper/model/CurrentWallpaperInfoVN.java
@@ -83,7 +83,6 @@
}
private CurrentWallpaperInfoVN(Parcel in) {
- super(in);
mAttributions = new ArrayList<>();
in.readStringList(mAttributions);
//noinspection ResourceType
@@ -165,7 +164,6 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
- super.writeToParcel(parcel, flags);
parcel.writeStringList(mAttributions);
parcel.writeInt(mWallpaperManagerFlag);
parcel.writeString(mActionUrl);
diff --git a/src/com/android/wallpaper/model/CustomizationSectionController.java b/src/com/android/wallpaper/model/CustomizationSectionController.java
deleted file mode 100644
index b01f098..0000000
--- a/src/com/android/wallpaper/model/CustomizationSectionController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model;
-
-import android.content.Context;
-import android.os.Bundle;
-
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-
-import com.android.wallpaper.picker.SectionView;
-
-/**
- * The interface for the behavior of section in the customization picker.
- *
- * @param <T> the {@link SectionView} to create for the section
- */
-public interface CustomizationSectionController<T extends SectionView> {
-
- /** Interface for customization section navigation. */
- interface CustomizationSectionNavigationController {
- /** Navigates to the given {@code fragment}. */
- void navigateTo(Fragment fragment);
- }
-
- /** Returns {@code true} if the customization section is available. */
- boolean isAvailable(@Nullable Context context);
-
- /**
- * Returns a newly created {@link SectionView} for the section.
- *
- * @param context the {@link Context} to inflate view
- */
- T createView(Context context);
-
- /** Saves the view state for configuration changes. */
- default void onSaveInstanceState(Bundle savedInstanceState) {}
-
- /** Releases the controller. */
- default void release() {}
-
- /** Gets called when the section gets transitioned out. */
- default void onTransitionOut() {}
-}
diff --git a/src/com/android/wallpaper/model/DefaultWallpaperInfo.java b/src/com/android/wallpaper/model/DefaultWallpaperInfo.java
index 6ed0eeb..78f1575 100755
--- a/src/com/android/wallpaper/model/DefaultWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/DefaultWallpaperInfo.java
@@ -37,7 +37,7 @@
new Creator<DefaultWallpaperInfo>() {
@Override
public DefaultWallpaperInfo createFromParcel(Parcel in) {
- return new DefaultWallpaperInfo(in);
+ return new DefaultWallpaperInfo();
}
@Override
@@ -47,12 +47,6 @@
};
private Asset mAsset;
- public DefaultWallpaperInfo() {}
-
- private DefaultWallpaperInfo(Parcel in) {
- super(in);
- }
-
@Override
public List<String> getAttributions(Context context) {
return Arrays.asList(context.getResources().getString(R.string.fallback_wallpaper_title));
@@ -106,6 +100,5 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
}
}
diff --git a/src/com/android/wallpaper/model/ImageWallpaperInfo.java b/src/com/android/wallpaper/model/ImageWallpaperInfo.java
index 8449edf..e4e96ae 100755
--- a/src/com/android/wallpaper/model/ImageWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/ImageWallpaperInfo.java
@@ -73,7 +73,6 @@
}
protected ImageWallpaperInfo(Parcel in) {
- super(in);
mUri = Uri.parse(in.readString());
}
@@ -175,7 +174,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeString(mUri.toString());
}
}
diff --git a/src/com/android/wallpaper/model/LegacyPartnerWallpaperInfo.java b/src/com/android/wallpaper/model/LegacyPartnerWallpaperInfo.java
index c3bf44b..6eda554 100755
--- a/src/com/android/wallpaper/model/LegacyPartnerWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/LegacyPartnerWallpaperInfo.java
@@ -63,7 +63,6 @@
}
private LegacyPartnerWallpaperInfo(Parcel in) {
- super(in);
mThumbName = in.readString();
mFullName = in.readString();
}
@@ -179,7 +178,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeString(mThumbName);
parcel.writeString(mFullName);
}
diff --git a/src/com/android/wallpaper/model/LiveWallpaperInfo.java b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
index 26d2daf..0bc467f 100755
--- a/src/com/android/wallpaper/model/LiveWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/LiveWallpaperInfo.java
@@ -154,8 +154,7 @@
mCollectionId = collectionId;
}
- protected LiveWallpaperInfo(Parcel in) {
- super(in);
+ LiveWallpaperInfo(Parcel in) {
mInfo = in.readParcelable(android.app.WallpaperInfo.class.getClassLoader());
mVisibleTitle = in.readInt() == 1;
mCollectionId = in.readString();
@@ -409,7 +408,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeParcelable(mInfo, 0 /* flags */);
parcel.writeInt(mVisibleTitle ? 1 : 0);
parcel.writeString(mCollectionId);
diff --git a/src/com/android/wallpaper/model/PartnerWallpaperInfo.java b/src/com/android/wallpaper/model/PartnerWallpaperInfo.java
index 63f9326..513e3fe 100755
--- a/src/com/android/wallpaper/model/PartnerWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/PartnerWallpaperInfo.java
@@ -60,7 +60,6 @@
}
private PartnerWallpaperInfo(Parcel in) {
- super(in);
mThumbRes = in.readInt();
mFullRes = in.readInt();
}
@@ -159,7 +158,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeInt(mThumbRes);
parcel.writeInt(mFullRes);
}
diff --git a/src/com/android/wallpaper/model/PermissionRequester.java b/src/com/android/wallpaper/model/PermissionRequester.java
deleted file mode 100644
index e15d588..0000000
--- a/src/com/android/wallpaper/model/PermissionRequester.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model;
-
-import com.android.wallpaper.picker.MyPhotosStarter;
-
-/**
- * The interface for a class that can request the permission.
- */
-public interface PermissionRequester {
- /**
- * Requests the {@link android.Manifest.permission#READ_EXTERNAL_STORAGE} permission.
- *
- * @param listener the listener to be notified of permissions grant status changes
- */
- void requestExternalStoragePermission(MyPhotosStarter.PermissionChangedListener listener);
-}
diff --git a/src/com/android/wallpaper/model/SystemStaticWallpaperInfo.java b/src/com/android/wallpaper/model/SystemStaticWallpaperInfo.java
index e892956..db34abb 100755
--- a/src/com/android/wallpaper/model/SystemStaticWallpaperInfo.java
+++ b/src/com/android/wallpaper/model/SystemStaticWallpaperInfo.java
@@ -184,7 +184,6 @@
}
private SystemStaticWallpaperInfo(Parcel in) {
- super(in);
mPackageName = in.readString();
mWallpaperId = in.readString();
mCollectionId = in.readString();
@@ -293,7 +292,6 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags);
dest.writeString(mPackageName);
dest.writeString(mWallpaperId);
dest.writeString(mCollectionId);
diff --git a/src/com/android/wallpaper/model/WallpaperColorsViewModel.kt b/src/com/android/wallpaper/model/WallpaperColorsViewModel.kt
deleted file mode 100644
index cecadb1..0000000
--- a/src/com/android/wallpaper/model/WallpaperColorsViewModel.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model
-
-import android.app.WallpaperColors
-import androidx.lifecycle.MutableLiveData
-import androidx.lifecycle.ViewModel
-
-/**
- * ViewModel class to keep track of WallpaperColors for the current wallpaper
- */
-class WallpaperColorsViewModel : ViewModel() {
-
- /**
- * WallpaperColors for the currently set home wallpaper
- */
- val homeWallpaperColors: MutableLiveData<WallpaperColors> by lazy {
- MutableLiveData<WallpaperColors>()
- }
-
- /**
- * WallpaperColors for the currently set lock wallpaper
- */
- val lockWallpaperColors: MutableLiveData<WallpaperColors> by lazy {
- MutableLiveData<WallpaperColors>()
- }
-}
\ No newline at end of file
diff --git a/src/com/android/wallpaper/model/WallpaperInfo.java b/src/com/android/wallpaper/model/WallpaperInfo.java
index c88c602..9f657af 100755
--- a/src/com/android/wallpaper/model/WallpaperInfo.java
+++ b/src/com/android/wallpaper/model/WallpaperInfo.java
@@ -16,13 +16,9 @@
package com.android.wallpaper.model;
import android.app.Activity;
-import android.app.WallpaperColors;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.Uri;
-import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.DrawableRes;
@@ -33,31 +29,12 @@
import com.android.wallpaper.asset.Asset;
import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
/**
* Interface for wallpaper info model.
*/
public abstract class WallpaperInfo implements Parcelable {
- private static final ExecutorService sExecutor = Executors.newCachedThreadPool();
-
- private int mPlaceholderColor = Color.TRANSPARENT;
-
- public WallpaperInfo() {}
-
- protected WallpaperInfo(Parcel in) {
- mPlaceholderColor = in.readInt();
- }
-
- @Override
- public void writeToParcel(Parcel parcel, int flags) {
- parcel.writeInt(mPlaceholderColor);
- }
-
@DrawableRes
public static int getDefaultActionIcon() {
return R.drawable.ic_explore_24px;
@@ -203,36 +180,6 @@
public abstract void showPreview(Activity srcActivity, InlinePreviewIntentFactory factory,
int requestCode);
-
- /**
- * Returns a Future to obtain a placeholder color calculated in a background thread for this
- * wallpaper's thumbnail.
- * If it's already available, the Future will return the color immediately.
- * This is intended to be a "best effort" attempt and might not obtain a color if no low res
- * thumbnail is available.
- */
- public Future<Integer> computePlaceholderColor(Context context) {
- if (mPlaceholderColor != Color.TRANSPARENT) {
- return CompletableFuture.completedFuture(mPlaceholderColor);
- }
- final Context appContext = context.getApplicationContext();
- return sExecutor.submit(() -> {
- synchronized (WallpaperInfo.this) {
- if (mPlaceholderColor != Color.TRANSPARENT) {
- return mPlaceholderColor;
- }
- Asset thumbAsset = getThumbAsset(appContext);
- Bitmap lowResBitmap = thumbAsset.getLowResBitmap(appContext);
- if (lowResBitmap == null) {
- return Color.TRANSPARENT;
- }
- mPlaceholderColor = WallpaperColors.fromBitmap(
- lowResBitmap).getPrimaryColor().toArgb();
- return mPlaceholderColor;
- }
- });
- }
-
/**
* Whether backup is allowed for this type of wallpaper.
*/
diff --git a/src/com/android/wallpaper/model/WallpaperPreviewNavigator.java b/src/com/android/wallpaper/model/WallpaperPreviewNavigator.java
deleted file mode 100644
index bf1642a..0000000
--- a/src/com/android/wallpaper/model/WallpaperPreviewNavigator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model;
-
-import com.android.wallpaper.model.WallpaperInfo;
-
-/**
- * Navigates to a wallpaper preview activity.
- */
-public interface WallpaperPreviewNavigator {
- /**
- * Navigates full screen wallpaper preview
- *
- * @param wallpaperInfo the wallpaper to preview
- * @param isViewAsHome {@code true} if it's home wallpaper preview, {@code false} if it's
- * lock screen wallpaper preview
- */
- void showViewOnlyPreview(WallpaperInfo wallpaperInfo, boolean isViewAsHome);
-}
diff --git a/src/com/android/wallpaper/model/WallpaperSectionController.java b/src/com/android/wallpaper/model/WallpaperSectionController.java
deleted file mode 100644
index f8bd2f3..0000000
--- a/src/com/android/wallpaper/model/WallpaperSectionController.java
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model;
-
-import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
-
-import android.animation.Animator;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.WallpaperColors;
-import android.app.WallpaperManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.Settings;
-import android.service.wallpaper.WallpaperService;
-import android.view.LayoutInflater;
-import android.view.SurfaceView;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import androidx.annotation.MainThread;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.cardview.widget.CardView;
-import androidx.core.widget.ContentLoadingProgressBar;
-import androidx.lifecycle.Lifecycle;
-import androidx.lifecycle.LifecycleObserver;
-import androidx.lifecycle.LifecycleOwner;
-import androidx.lifecycle.OnLifecycleEvent;
-
-import com.android.wallpaper.R;
-import com.android.wallpaper.asset.Asset;
-import com.android.wallpaper.asset.BitmapCachingAsset;
-import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
-import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.module.UserEventLogger;
-import com.android.wallpaper.picker.CategorySelectorFragment;
-import com.android.wallpaper.picker.MyPhotosStarter;
-import com.android.wallpaper.picker.WallpaperSectionView;
-import com.android.wallpaper.picker.WorkspaceSurfaceHolderCallback;
-import com.android.wallpaper.util.ResourceUtils;
-import com.android.wallpaper.util.WallpaperConnection;
-import com.android.wallpaper.util.WallpaperSurfaceCallback;
-import com.android.wallpaper.widget.LockScreenPreviewer;
-
-/** The class to control the wallpaper section view. */
-public class WallpaperSectionController implements
- CustomizationSectionController<WallpaperSectionView>,
- LifecycleObserver {
-
- private static final String PERMISSION_READ_WALLPAPER_INTERNAL =
- "android.permission.READ_WALLPAPER_INTERNAL";
- private static final int SETTINGS_APP_INFO_REQUEST_CODE = 1;
-
- private CardView mHomePreviewCard;
- private ContentLoadingProgressBar mHomePreviewProgress;
- private SurfaceView mWorkspaceSurface;
- private WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
- private SurfaceView mHomeWallpaperSurface;
- private WallpaperSurfaceCallback mHomeWallpaperSurfaceCallback;
- private SurfaceView mLockWallpaperSurface;
- private WallpaperSurfaceCallback mLockWallpaperSurfaceCallback;
- private CardView mLockscreenPreviewCard;
- private ViewGroup mLockPreviewContainer;
- private ContentLoadingProgressBar mLockscreenPreviewProgress;
- private WallpaperConnection mWallpaperConnection;
-
- // The wallpaper information which is currently shown on the home preview.
- private WallpaperInfo mHomePreviewWallpaperInfo;
- // The wallpaper information which is currently shown on the lock preview.
- private WallpaperInfo mLockPreviewWallpaperInfo;
-
- private LockScreenPreviewer mLockScreenPreviewer;
-
- private final Activity mActivity;
- private final Context mAppContext;
- private final LifecycleOwner mLifecycleOwner;
- private final PermissionRequester mPermissionRequester;
- private final WallpaperColorsViewModel mWallpaperColorsViewModel;
- private final WorkspaceViewModel mWorkspaceViewModel;
- private final CustomizationSectionNavigationController mSectionNavigationController;
- private final WallpaperPreviewNavigator mWallpaperPreviewNavigator;
- private final Bundle mSavedInstanceState;
-
- public WallpaperSectionController(Activity activity, LifecycleOwner lifecycleOwner,
- PermissionRequester permissionRequester, WallpaperColorsViewModel colorsViewModel,
- WorkspaceViewModel workspaceViewModel,
- CustomizationSectionNavigationController sectionNavigationController,
- WallpaperPreviewNavigator wallpaperPreviewNavigator,
- Bundle savedInstanceState) {
- mActivity = activity;
- mLifecycleOwner = lifecycleOwner;
- mPermissionRequester = permissionRequester;
- mAppContext = mActivity.getApplicationContext();
- mWallpaperColorsViewModel = colorsViewModel;
- mWorkspaceViewModel = workspaceViewModel;
- mSectionNavigationController = sectionNavigationController;
- mWallpaperPreviewNavigator = wallpaperPreviewNavigator;
- mSavedInstanceState = savedInstanceState;
- }
-
- @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
- @MainThread
- public void onResume() {
- refreshCurrentWallpapers(/* forceRefresh= */ mSavedInstanceState == null);
- if (mWallpaperConnection != null) {
- mWallpaperConnection.setVisibility(true);
- }
- }
-
- @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
- @MainThread
- public void onPause() {
- if (mWallpaperConnection != null) {
- mWallpaperConnection.setVisibility(false);
- }
- }
-
- @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
- @MainThread
- public void onStop() {
- if (mWallpaperConnection != null) {
- mWallpaperConnection.disconnect();
- mWallpaperConnection = null;
- }
- }
-
- @Override
- public boolean isAvailable(Context context) {
- return true;
- }
-
- @Override
- public WallpaperSectionView createView(Context context) {
- WallpaperSectionView wallpaperSectionView = (WallpaperSectionView) LayoutInflater.from(
- context).inflate(R.layout.wallpaper_section_view, /* root= */ null);
- mHomePreviewCard = wallpaperSectionView.findViewById(R.id.home_preview);
- mHomePreviewCard.setContentDescription(mAppContext.getString(
- R.string.wallpaper_preview_card_content_description));
- mWorkspaceSurface = mHomePreviewCard.findViewById(R.id.workspace_surface);
- mHomePreviewProgress = mHomePreviewCard.findViewById(R.id.wallpaper_preview_spinner);
- mWorkspaceSurfaceCallback = new WorkspaceSurfaceHolderCallback(
- mWorkspaceSurface, mAppContext);
- mHomeWallpaperSurface = mHomePreviewCard.findViewById(R.id.wallpaper_surface);
- mHomeWallpaperSurfaceCallback = new WallpaperSurfaceCallback(mActivity, mHomePreviewCard,
- mHomeWallpaperSurface, () -> {
- if (mHomePreviewWallpaperInfo != null) {
- maybeLoadThumbnail(mHomePreviewWallpaperInfo, mHomeWallpaperSurfaceCallback);
- }
- });
-
- mLockscreenPreviewCard = wallpaperSectionView.findViewById(R.id.lock_preview);
- mLockscreenPreviewCard.setContentDescription(mAppContext.getString(
- R.string.lockscreen_wallpaper_preview_card_content_description));
- mLockscreenPreviewProgress = mLockscreenPreviewCard.findViewById(
- R.id.wallpaper_preview_spinner);
- mLockscreenPreviewCard.findViewById(R.id.workspace_surface).setVisibility(View.GONE);
- mLockWallpaperSurface = mLockscreenPreviewCard.findViewById(R.id.wallpaper_surface);
- mLockWallpaperSurfaceCallback = new WallpaperSurfaceCallback(mActivity,
- mLockscreenPreviewCard, mLockWallpaperSurface, () -> {
- if (mLockPreviewWallpaperInfo != null) {
- maybeLoadThumbnail(mLockPreviewWallpaperInfo, mLockWallpaperSurfaceCallback);
- }
- });
- mLockPreviewContainer = mLockscreenPreviewCard.findViewById(
- R.id.lock_screen_preview_container);
- mLockPreviewContainer.setVisibility(View.INVISIBLE);
- mLockScreenPreviewer = new LockScreenPreviewer(mLifecycleOwner.getLifecycle(), context,
- mLockPreviewContainer);
-
- setupCurrentWallpaperPreview(wallpaperSectionView);
- final int shortDuration = mAppContext.getResources().getInteger(
- android.R.integer.config_shortAnimTime);
- fadeWallpaperPreview(true, shortDuration);
- mLifecycleOwner.getLifecycle().addObserver(this);
- updateWallpaperSurface();
- updateWorkspaceSurface();
-
- wallpaperSectionView.findViewById(R.id.wallpaper_picker_entry).setOnClickListener(
- v -> mSectionNavigationController.navigateTo(new CategorySelectorFragment()));
-
- mWorkspaceViewModel.getUpdateWorkspace().observe(mLifecycleOwner, update ->
- updateWorkspacePreview(mWorkspaceSurface, mWorkspaceSurfaceCallback,
- mWallpaperColorsViewModel.getHomeWallpaperColors().getValue())
- );
-
- return wallpaperSectionView;
- }
-
- private void updateWorkspacePreview(SurfaceView workspaceSurface,
- WorkspaceSurfaceHolderCallback callback, @Nullable WallpaperColors colors) {
- // Reattach SurfaceView to trigger #surfaceCreated to update preview for different option.
- ViewGroup parent = (ViewGroup) workspaceSurface.getParent();
- int viewIndex = parent.indexOfChild(workspaceSurface);
- parent.removeView(workspaceSurface);
- if (callback != null) {
- callback.resetLastSurface();
- callback.setWallpaperColors(colors);
- }
- parent.addView(workspaceSurface, viewIndex);
- }
-
- @Override
- public void release() {
- if (mLockScreenPreviewer != null) {
- mLockScreenPreviewer.release();
- mLockScreenPreviewer = null;
- }
- if (mHomeWallpaperSurfaceCallback != null) {
- mHomeWallpaperSurfaceCallback.cleanUp();
- }
- if (mLockWallpaperSurfaceCallback != null) {
- mLockWallpaperSurfaceCallback.cleanUp();
- }
- if (mWorkspaceSurfaceCallback != null) {
- mWorkspaceSurfaceCallback.cleanUp();
- }
- mLifecycleOwner.getLifecycle().removeObserver(this);
- }
-
- private void setupCurrentWallpaperPreview(View rootView) {
- if (canShowCurrentWallpaper()) {
- showCurrentWallpaper(rootView, true);
- } else {
- showCurrentWallpaper(rootView, false);
-
- Button mAllowAccessButton = rootView
- .findViewById(R.id.permission_needed_allow_access_button);
- mAllowAccessButton.setOnClickListener(view ->
- mPermissionRequester.requestExternalStoragePermission(
- new MyPhotosStarter.PermissionChangedListener() {
-
- @Override
- public void onPermissionsGranted() {
- showCurrentWallpaper(rootView, true);
- }
-
- @Override
- public void onPermissionsDenied(boolean dontAskAgain) {
- if (!dontAskAgain) {
- return;
- }
- showPermissionNeededDialog();
- }
- })
- );
-
- // Replace explanation text with text containing the Wallpapers app name which replaces
- // the placeholder.
- Resources resources = mAppContext.getResources();
- String appName = resources.getString(R.string.app_name);
- String explanation = resources.getString(R.string.permission_needed_explanation,
- appName);
- TextView explanationView = rootView.findViewById(R.id.permission_needed_explanation);
- explanationView.setText(explanation);
- }
- }
-
- private boolean canShowCurrentWallpaper() {
- return isPermissionGranted(mAppContext, PERMISSION_READ_WALLPAPER_INTERNAL)
- || isPermissionGranted(mAppContext, READ_EXTERNAL_STORAGE);
- }
-
- private boolean isPermissionGranted(Context context, String permission) {
- return context.getPackageManager().checkPermission(permission,
- context.getPackageName()) == PackageManager.PERMISSION_GRANTED;
- }
-
- private void showCurrentWallpaper(View rootView, boolean show) {
- rootView.findViewById(R.id.home_preview)
- .setVisibility(show ? View.VISIBLE : View.GONE);
- rootView.findViewById(R.id.lock_preview)
- .setVisibility(show ? View.VISIBLE : View.GONE);
- rootView.findViewById(R.id.permission_needed)
- .setVisibility(show ? View.GONE : View.VISIBLE);
- }
-
- private void showPermissionNeededDialog() {
- String permissionNeededMessage = mAppContext.getResources().getString(
- R.string.permission_needed_explanation_go_to_settings);
- AlertDialog dialog = new AlertDialog.Builder(mAppContext, R.style.LightDialogTheme)
- .setMessage(permissionNeededMessage)
- .setPositiveButton(android.R.string.ok, /* onClickListener= */ null)
- .setNegativeButton(
- R.string.settings_button_label,
- (dialogInterface, i) -> {
- Intent appInfoIntent = new Intent();
- appInfoIntent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
- Uri uri = Uri.fromParts("package",
- mAppContext.getPackageName(), /* fragment= */ null);
- appInfoIntent.setData(uri);
- mActivity.startActivityForResult(appInfoIntent,
- SETTINGS_APP_INFO_REQUEST_CODE);
- })
- .create();
- dialog.show();
- }
-
- /**
- * Obtains the {@link WallpaperInfo} object(s) representing the wallpaper(s) currently set to
- * the device from the {@link CurrentWallpaperInfoFactory}.
- */
- private void refreshCurrentWallpapers(boolean forceRefresh) {
- CurrentWallpaperInfoFactory factory = InjectorProvider.getInjector()
- .getCurrentWallpaperFactory(mAppContext);
-
- factory.createCurrentWallpaperInfos(
- (homeWallpaper, lockWallpaper, presentationMode) -> {
- // A config change may have destroyed the activity since the refresh
- // started, so check for that.
- if (!isActivityAlive()) {
- return;
- }
-
- mHomePreviewWallpaperInfo = homeWallpaper;
- mLockPreviewWallpaperInfo =
- lockWallpaper == null ? homeWallpaper : lockWallpaper;
-
- mHomePreviewWallpaperInfo.computePlaceholderColor(mAppContext);
- if (lockWallpaper != null) {
- lockWallpaper.computePlaceholderColor(mAppContext);
- }
- updatePreview(mHomePreviewWallpaperInfo, true);
- updatePreview(mLockPreviewWallpaperInfo, false);
-
- WallpaperManager manager = WallpaperManager.getInstance(mAppContext);
-
- WallpaperColors homeColors =
- manager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM);
- onHomeWallpaperColorsChanged(homeColors);
- WallpaperColors lockColors = homeColors;
-
- if (lockWallpaper != null) {
- lockColors = manager.getWallpaperColors(WallpaperManager.FLAG_LOCK);
-
- }
- onLockWallpaperColorsChanged(lockColors);
- }, forceRefresh);
- }
-
- private void updatePreview(WallpaperInfo wallpaperInfo, boolean isHomeWallpaper) {
- if (wallpaperInfo == null) {
- return;
- }
-
- if (!isActivityAlive()) {
- return;
- }
-
- UserEventLogger eventLogger = InjectorProvider.getInjector().getUserEventLogger(
- mAppContext);
-
- WallpaperSurfaceCallback surfaceCallback = isHomeWallpaper
- ? mHomeWallpaperSurfaceCallback : mLockWallpaperSurfaceCallback;
- // Load thumb regardless of live wallpaper to make sure we have a placeholder while
- // the live wallpaper initializes in that case.
- maybeLoadThumbnail(wallpaperInfo, surfaceCallback);
-
- if (isHomeWallpaper) {
- if (mWallpaperConnection != null) {
- mWallpaperConnection.disconnect();
- mWallpaperConnection = null;
- }
- if (wallpaperInfo instanceof LiveWallpaperInfo) {
- setUpLiveWallpaperPreview(wallpaperInfo);
- }
- }
-
- View preview = isHomeWallpaper ? mHomePreviewCard : mLockscreenPreviewCard;
- preview.setOnClickListener(view -> {
- mWallpaperPreviewNavigator.showViewOnlyPreview(wallpaperInfo, isHomeWallpaper);
- eventLogger.logCurrentWallpaperPreviewed();
- });
- }
-
- @NonNull
- private Asset maybeLoadThumbnail(WallpaperInfo wallpaperInfo,
- WallpaperSurfaceCallback surfaceCallback) {
- ImageView imageView = surfaceCallback.getHomeImageWallpaper();
- Asset thumbAsset = new BitmapCachingAsset(mAppContext,
- wallpaperInfo.getThumbAsset(mAppContext));
- if (imageView != null && imageView.getDrawable() == null) {
- thumbAsset.loadPreviewImage(mActivity, imageView,
- ResourceUtils.getColorAttr(mActivity, android.R.attr.colorSecondary));
- }
- return thumbAsset;
- }
-
- private void onHomeWallpaperColorsChanged(WallpaperColors wallpaperColors) {
- if (wallpaperColors != null && wallpaperColors.equals(
- mWallpaperColorsViewModel.getHomeWallpaperColors().getValue())) {
- return;
- }
- mWallpaperColorsViewModel.getHomeWallpaperColors().setValue(wallpaperColors);
- }
-
- private void onLockWallpaperColorsChanged(WallpaperColors wallpaperColors) {
- if (wallpaperColors != null && wallpaperColors.equals(
- mWallpaperColorsViewModel.getLockWallpaperColors().getValue())) {
- return;
- }
- mWallpaperColorsViewModel.getLockWallpaperColors().setValue(wallpaperColors);
- if (mLockScreenPreviewer != null) {
- mLockScreenPreviewer.setColor(wallpaperColors);
- }
- }
-
- private void setUpLiveWallpaperPreview(WallpaperInfo homeWallpaper) {
- if (!isActivityAlive()) {
- return;
- }
-
- if (WallpaperConnection.isPreviewAvailable()) {
- final boolean isLockLive = mLockPreviewWallpaperInfo instanceof LiveWallpaperInfo;
- mWallpaperConnection = new WallpaperConnection(
- getWallpaperIntent(homeWallpaper.getWallpaperComponent()), mActivity,
- new WallpaperConnection.WallpaperConnectionListener() {
- @Override
- public void onWallpaperColorsChanged(WallpaperColors colors,
- int displayId) {
- if (isLockLive && mLockScreenPreviewer != null) {
- mLockScreenPreviewer.setColor(colors);
- onLockWallpaperColorsChanged(colors);
- }
- onHomeWallpaperColorsChanged(colors);
- }
- },
- mHomeWallpaperSurface, isLockLive ? mLockWallpaperSurface : null);
-
- mWallpaperConnection.setVisibility(true);
- mHomeWallpaperSurface.post(() -> {
- if (mWallpaperConnection != null && !mWallpaperConnection.connect()) {
- mWallpaperConnection = null;
- }
- });
- }
- }
-
- private Intent getWallpaperIntent(android.app.WallpaperInfo info) {
- return new Intent(WallpaperService.SERVICE_INTERFACE)
- .setClassName(info.getPackageName(), info.getServiceName());
- }
-
- private void updateWallpaperSurface() {
- mHomeWallpaperSurface.getHolder().addCallback(mHomeWallpaperSurfaceCallback);
- mHomeWallpaperSurface.setZOrderMediaOverlay(true);
- mLockWallpaperSurface.getHolder().addCallback(mLockWallpaperSurfaceCallback);
- mLockWallpaperSurface.setZOrderMediaOverlay(true);
- }
-
- private void updateWorkspaceSurface() {
- mWorkspaceSurface.setZOrderMediaOverlay(true);
- mWorkspaceSurface.getHolder().addCallback(mWorkspaceSurfaceCallback);
- }
-
- private boolean isActivityAlive() {
- return !mActivity.isDestroyed() && !mActivity.isFinishing();
- }
-
- private void fadeWallpaperPreview(boolean isFadeIn, int duration) {
- setupFade(mHomePreviewCard, mHomePreviewProgress, duration, isFadeIn);
- setupFade(mLockscreenPreviewCard, mLockscreenPreviewProgress, duration, isFadeIn);
- }
-
- private void setupFade(CardView cardView, ContentLoadingProgressBar progressBar, int duration,
- boolean fadeIn) {
- cardView.setAlpha(fadeIn ? 0.0f : 1.0f);
- cardView.animate()
- .alpha(fadeIn ? 1.0f : 0.0f)
- .setDuration(duration)
- .setListener(new Animator.AnimatorListener() {
- @Override
- public void onAnimationCancel(Animator animator) {
- progressBar.hide();
- setWallpaperPreviewsVisibility(View.VISIBLE);
- }
-
- @Override
- public void onAnimationEnd(Animator animator) {
- progressBar.hide();
- setWallpaperPreviewsVisibility(View.VISIBLE);
- }
-
- @Override
- public void onAnimationRepeat(Animator animator) {
- }
-
- @Override
- public void onAnimationStart(Animator animator) {
- setWallpaperPreviewsVisibility(View.INVISIBLE);
- }
- });
- progressBar.animate()
- .alpha(fadeIn ? 1.0f : 0.0f)
- .setDuration(duration * 2)
- .setStartDelay(duration)
- .withStartAction(progressBar::show)
- .withEndAction(progressBar::hide);
- }
-
- private void setWallpaperPreviewsVisibility(int visibility) {
- if (mHomeWallpaperSurface != null) {
- mHomeWallpaperSurface.setVisibility(visibility);
- }
- if (mLockWallpaperSurface != null) {
- mLockWallpaperSurface.setVisibility(visibility);
- }
- if (mWorkspaceSurface != null) {
- mWorkspaceSurface.setVisibility(visibility);
- }
- if (mLockPreviewContainer != null) {
- mLockPreviewContainer.setVisibility(visibility);
- }
- }
-
- @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) {
- mLockPreviewContainer.setAlpha(0f);
- }
- }
-}
diff --git a/src/com/android/wallpaper/model/WorkspaceViewModel.kt b/src/com/android/wallpaper/model/WorkspaceViewModel.kt
deleted file mode 100644
index bafd6aa..0000000
--- a/src/com/android/wallpaper/model/WorkspaceViewModel.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.model
-
-import androidx.lifecycle.MutableLiveData
-import androidx.lifecycle.ViewModel
-
-/** ViewModel class to keep track of workspace updates. */
-class WorkspaceViewModel : ViewModel() {
-
- /**
- * Triggers workspace updates through flipping the value from {@code false} to {@code true},
- * or from {@code true} to {@code false}.
- */
- val updateWorkspace: MutableLiveData<Boolean> by lazy {
- MutableLiveData<Boolean>()
- }
-}
diff --git a/src/com/android/wallpaper/module/BaseWallpaperInjector.java b/src/com/android/wallpaper/module/BaseWallpaperInjector.java
index 0dc5578..de9ddb1 100755
--- a/src/com/android/wallpaper/module/BaseWallpaperInjector.java
+++ b/src/com/android/wallpaper/module/BaseWallpaperInjector.java
@@ -42,7 +42,6 @@
private PackageStatusNotifier mPackageStatusNotifier;
private LiveWallpaperInfoFactory mLiveWallpaperInfoFactory;
private DrawableLayerResolver mDrawableLayerResolver;
- private CustomizationSections mCustomizationSections;
@Override
public synchronized BitmapCropper getBitmapCropper() {
@@ -178,12 +177,4 @@
}
return mDrawableLayerResolver;
}
-
- @Override
- public CustomizationSections getCustomizationSections() {
- if (mCustomizationSections == null) {
- mCustomizationSections = new WallpaperPickerSections();
- }
- return mCustomizationSections;
- }
}
diff --git a/src/com/android/wallpaper/module/CustomizationSections.java b/src/com/android/wallpaper/module/CustomizationSections.java
deleted file mode 100644
index c611d50..0000000
--- a/src/com/android/wallpaper/module/CustomizationSections.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.android.wallpaper.module;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-import androidx.annotation.Nullable;
-import androidx.lifecycle.LifecycleOwner;
-
-import com.android.wallpaper.model.CustomizationSectionController;
-import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController;
-import com.android.wallpaper.model.PermissionRequester;
-import com.android.wallpaper.model.WallpaperColorsViewModel;
-import com.android.wallpaper.model.WallpaperPreviewNavigator;
-import com.android.wallpaper.model.WorkspaceViewModel;
-
-import java.util.List;
-
-/** Interface for carry {@link CustomizationSectionController}s. */
-public interface CustomizationSections {
-
- /**
- * Gets a new instance of the section controller list.
- *
- * Note that the section views will be displayed by the list ordering.
- *
- * <p>Don't keep the section controllers as singleton since they contain views.
- */
- List<CustomizationSectionController<?>> getAllSectionControllers(
- Activity activity,
- LifecycleOwner lifecycleOwner,
- WallpaperColorsViewModel wallpaperColorsViewModel,
- WorkspaceViewModel workspaceViewModel,
- PermissionRequester permissionRequester,
- WallpaperPreviewNavigator wallpaperPreviewNavigator,
- CustomizationSectionNavigationController sectionNavigationController,
- @Nullable Bundle savedInstanceState);
-}
diff --git a/src/com/android/wallpaper/module/DefaultCategoryProvider.java b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
index e82045d..9372e7a 100755
--- a/src/com/android/wallpaper/module/DefaultCategoryProvider.java
+++ b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
@@ -69,7 +69,7 @@
* 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;
+ private static final int PRIORITY_MY_PHOTOS = 1;
private static final int PRIORITY_SYSTEM = 100;
private static final int PRIORITY_ON_DEVICE = 200;
private static final int PRIORITY_LIVE = 300;
@@ -142,18 +142,16 @@
}
@Override
- public boolean resetIfNeeded() {
+ public void resetIfNeeded() {
if (mNetworkStatus != mNetworkStatusNotifier.getNetworkStatus()
|| mLocale != getLocale()) {
mCategories.clear();
mFetchedCategories = false;
- return true;
}
- return false;
}
@Override
- public boolean isFeaturedCollectionAvailable() {
+ public boolean isFeaturedCategory(Category category) {
return false;
}
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
index bf86585..0060f99 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -484,7 +484,7 @@
private int setBitmapToWallpaperManagerCompat(Bitmap wallpaperBitmap, boolean allowBackup,
int whichWallpaper) {
ByteArrayOutputStream tmpOut = new ByteArrayOutputStream();
- if (wallpaperBitmap.compress(CompressFormat.PNG, DEFAULT_COMPRESS_QUALITY, tmpOut)) {
+ if (wallpaperBitmap.compress(CompressFormat.JPEG, DEFAULT_COMPRESS_QUALITY, tmpOut)) {
try {
byte[] outByteArray = tmpOut.toByteArray();
return mWallpaperManagerCompat.setStream(
diff --git a/src/com/android/wallpaper/module/Injector.java b/src/com/android/wallpaper/module/Injector.java
index 1c40e93..b85c279 100755
--- a/src/com/android/wallpaper/module/Injector.java
+++ b/src/com/android/wallpaper/module/Injector.java
@@ -88,6 +88,4 @@
Intent getDeepLinkRedirectIntent(Context context, Uri uri);
String getDownloadableIntentAction();
-
- CustomizationSections getCustomizationSections();
}
diff --git a/src/com/android/wallpaper/module/WallpaperPickerSections.java b/src/com/android/wallpaper/module/WallpaperPickerSections.java
deleted file mode 100644
index b5e8d17..0000000
--- a/src/com/android/wallpaper/module/WallpaperPickerSections.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.android.wallpaper.module;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-import androidx.annotation.Nullable;
-import androidx.lifecycle.LifecycleOwner;
-
-import com.android.wallpaper.model.CustomizationSectionController;
-import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController;
-import com.android.wallpaper.model.PermissionRequester;
-import com.android.wallpaper.model.WallpaperColorsViewModel;
-import com.android.wallpaper.model.WallpaperPreviewNavigator;
-import com.android.wallpaper.model.WallpaperSectionController;
-import com.android.wallpaper.model.WorkspaceViewModel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/** {@link CustomizationSections} for the wallpaper picker. */
-public final class WallpaperPickerSections implements CustomizationSections {
-
- @Override
- public List<CustomizationSectionController<?>> getAllSectionControllers(Activity activity,
- LifecycleOwner lifecycleOwner, WallpaperColorsViewModel wallpaperColorsViewModel,
- WorkspaceViewModel workspaceViewModel, PermissionRequester permissionRequester,
- WallpaperPreviewNavigator wallpaperPreviewNavigator,
- CustomizationSectionNavigationController sectionNavigationController,
- @Nullable Bundle savedInstanceState) {
- List<CustomizationSectionController<?>> sectionControllers = new ArrayList<>();
-
- sectionControllers.add(new WallpaperSectionController(
- activity, lifecycleOwner, permissionRequester, wallpaperColorsViewModel,
- workspaceViewModel, sectionNavigationController, wallpaperPreviewNavigator,
- savedInstanceState));
-
- return sectionControllers;
- }
-}
diff --git a/src/com/android/wallpaper/picker/AppbarFragment.java b/src/com/android/wallpaper/picker/AppbarFragment.java
index 4a71bb0..e74ecbe 100644
--- a/src/com/android/wallpaper/picker/AppbarFragment.java
+++ b/src/com/android/wallpaper/picker/AppbarFragment.java
@@ -152,7 +152,6 @@
private void setUpUpArrow() {
Drawable backIcon = getResources().getDrawable(R.drawable.material_ic_arrow_back_black_24,
null).mutate();
- backIcon.setAutoMirrored(true);
backIcon.setTint(
ResourceUtils.getColorAttr(getActivity(), android.R.attr.textColorPrimary));
mToolbar.setNavigationIcon(backIcon);
@@ -205,9 +204,11 @@
@Override
protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
- bottomActionBar.setBackButtonVisibility(
- mUpArrowEnabled && mHost.isUpArrowSupported() ? GONE : VISIBLE);
- super.onBottomActionBarReady(bottomActionBar);
+ if (mUpArrowEnabled && mHost.isUpArrowSupported()) {
+ bottomActionBar.setBackButtonVisibility(GONE);
+ } else {
+ bottomActionBar.setBackButtonVisibility(VISIBLE);
+ }
}
@Override
diff --git a/src/com/android/wallpaper/picker/BasePreviewActivity.java b/src/com/android/wallpaper/picker/BasePreviewActivity.java
index 2195909..93f7bc5 100755
--- a/src/com/android/wallpaper/picker/BasePreviewActivity.java
+++ b/src/com/android/wallpaper/picker/BasePreviewActivity.java
@@ -20,7 +20,6 @@
import android.os.Bundle;
import androidx.annotation.Nullable;
-import androidx.core.view.WindowCompat;
import com.android.wallpaper.R;
import com.android.wallpaper.module.Injector;
@@ -33,7 +32,7 @@
public abstract class BasePreviewActivity extends BaseActivity {
public static final String EXTRA_WALLPAPER_INFO =
"com.android.wallpaper.picker.wallpaper_info";
- public static final String EXTRA_VIEW_AS_HOME =
+ public static final String EXTRA_VIEW_AS_HODE =
"com.android.wallpaper.picker.view_as_home";
public static final String EXTRA_TESTING_MODE_ENABLED =
"com.android.wallpaper.picker.testing_mode_enabled";
@@ -53,11 +52,4 @@
mUserEventLogger.logAppLaunched(getIntent());
}
}
-
- /** Allows the current activity to be full screen. */
- protected void enableFullScreen() {
- WindowCompat.setDecorFitsSystemWindows(getWindow(), /* decorFitsSystemWindows= */ false);
-
- // Window insets are set in the PreviewFragment#onCreateView method.
- }
}
diff --git a/src/com/android/wallpaper/picker/BottomActionBarFragment.java b/src/com/android/wallpaper/picker/BottomActionBarFragment.java
index 6802b76..3562040 100644
--- a/src/com/android/wallpaper/picker/BottomActionBarFragment.java
+++ b/src/com/android/wallpaper/picker/BottomActionBarFragment.java
@@ -19,7 +19,6 @@
import android.os.Bundle;
import android.view.View;
-import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
@@ -48,12 +47,17 @@
mBottomActionBar = findBottomActionBar();
if (mBottomActionBar != null) {
mBottomActionBar.reset();
+ mBottomActionBar.bindBackButtonToSystemBackKey(getActivity());
onBottomActionBarReady(mBottomActionBar);
}
}
/** Returns {@code true} if the fragment would handle the event. */
public boolean onBackPressed() {
+ if (mBottomActionBar != null && mBottomActionBar.isVisible()) {
+ mBottomActionBar.hide();
+ return true;
+ }
return false;
}
@@ -61,12 +65,7 @@
* Gets called when {@link #onViewCreated} finished. For extending fragment, this is the only
* one interface to get {@link BottomActionBar}.
*/
- @CallSuper
- protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
- // Needed for some cases that need to recreate the BottomActionBar.
- mBottomActionBar = bottomActionBar;
- bottomActionBar.bindBackButtonToSystemBackKey(getActivity());
- }
+ protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {}
@Nullable
private BottomActionBar findBottomActionBar() {
diff --git a/src/com/android/wallpaper/picker/CategoryFragment.java b/src/com/android/wallpaper/picker/CategoryFragment.java
index 4cbde9d..cb3b2d7 100755
--- a/src/com/android/wallpaper/picker/CategoryFragment.java
+++ b/src/com/android/wallpaper/picker/CategoryFragment.java
@@ -68,7 +68,7 @@
import com.android.wallpaper.util.WallpaperConnection;
import com.android.wallpaper.util.WallpaperConnection.WallpaperConnectionListener;
import com.android.wallpaper.util.WallpaperSurfaceCallback;
-import com.android.wallpaper.widget.LockScreenPreviewer;
+import com.android.wallpaper.widget.LockScreenPreviewer2;
import com.android.wallpaper.widget.PreviewPager;
import com.android.wallpaper.widget.WallpaperColorsLoader;
import com.android.wallpaper.widget.WallpaperPickerRecyclerViewAccessibilityDelegate;
@@ -121,10 +121,12 @@
private static final String PERMISSION_READ_WALLPAPER_INTERNAL =
"android.permission.READ_WALLPAPER_INTERNAL";
+ private ImageView mHomePreview;
private SurfaceView mWorkspaceSurface;
private WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
private SurfaceView mWallpaperSurface;
private WallpaperSurfaceCallback mWallpaperSurfaceCallback;
+ private ImageView mLockscreenPreview;
private PreviewPager mPreviewPager;
private List<View> mWallPaperPreviews;
private WallpaperConnection mWallpaperConnection;
@@ -140,7 +142,7 @@
// The wallpaper information which is currently shown on the lock preview.
private WallpaperInfo mLockPreviewWallpaperInfo;
- private LockScreenPreviewer mLockScreenPreviewer;
+ private LockScreenPreviewer2 mLockScreenPreviewer;
private View mRootContainer;
private final Rect mPreviewLocalRect = new Rect();
@@ -160,22 +162,24 @@
mWallPaperPreviews = new ArrayList<>();
CardView homePreviewCard = (CardView) inflater.inflate(
R.layout.wallpaper_preview_card, null);
+ mHomePreview = homePreviewCard.findViewById(R.id.wallpaper_preview_image);
mWorkspaceSurface = homePreviewCard.findViewById(R.id.workspace_surface);
mWorkspaceSurfaceCallback = new WorkspaceSurfaceHolderCallback(
mWorkspaceSurface, getContext());
mWallpaperSurface = homePreviewCard.findViewById(R.id.wallpaper_surface);
- mWallpaperSurfaceCallback = new WallpaperSurfaceCallback(getContext(), homePreviewCard,
+ mWallpaperSurfaceCallback = new WallpaperSurfaceCallback(getContext(), mHomePreview,
mWallpaperSurface);
mWallPaperPreviews.add(homePreviewCard);
CardView lockscreenPreviewCard = (CardView) inflater.inflate(
R.layout.wallpaper_preview_card, null);
+ mLockscreenPreview = lockscreenPreviewCard.findViewById(R.id.wallpaper_preview_image);
lockscreenPreviewCard.findViewById(R.id.workspace_surface).setVisibility(View.GONE);
lockscreenPreviewCard.findViewById(R.id.wallpaper_surface).setVisibility(View.GONE);
ViewGroup lockPreviewContainer = lockscreenPreviewCard.findViewById(
R.id.lock_screen_preview_container);
lockPreviewContainer.setVisibility(View.VISIBLE);
- mLockScreenPreviewer = new LockScreenPreviewer(getLifecycle(), getContext(),
+ mLockScreenPreviewer = new LockScreenPreviewer2(getLifecycle(), getContext(),
lockPreviewContainer);
mWallPaperPreviews.add(lockscreenPreviewCard);
@@ -241,12 +245,13 @@
int minimumHeight = mRootContainer.getHeight() - mPreviewPager.getMeasuredHeight();
mBottomSheetBehavior.setPeekHeight(minimumHeight);
containerView.setMinimumHeight(minimumHeight);
- homePreviewCard.setRadius(SizeCalculator.getPreviewCornerRadius(
+ ((CardView) mHomePreview.getParent())
+ .setRadius(SizeCalculator.getPreviewCornerRadius(
getActivity(), homePreviewCard.getMeasuredWidth()));
- if (lockscreenPreviewCard != null) {
- lockscreenPreviewCard
+ if (mLockscreenPreview != null) {
+ ((CardView) mLockscreenPreview.getParent())
.setRadius(SizeCalculator.getPreviewCornerRadius(
- getActivity(), lockPreviewContainer.getMeasuredWidth()));
+ getActivity(), mLockscreenPreview.getMeasuredWidth()));
}
}});
fragmentContainer.setOnApplyWindowInsetsListener((v, windowInsets) -> {
@@ -451,8 +456,8 @@
mHomePreviewWallpaperInfo = wallpaperInfo;
mLockPreviewWallpaperInfo = wallpaperInfo;
- updateThumbnail(mHomePreviewWallpaperInfo,
- mWallpaperSurfaceCallback.getHomeImageWallpaper(), true);
+ updateThumbnail(mHomePreviewWallpaperInfo, mHomePreview, true);
+ updateThumbnail(mLockPreviewWallpaperInfo, mLockscreenPreview, false);
mShowSelectedWallpaper = true;
});
}
@@ -616,8 +621,8 @@
mHomePreviewWallpaperInfo = homeWallpaper;
mLockPreviewWallpaperInfo =
lockWallpaper == null ? homeWallpaper : lockWallpaper;
- updateThumbnail(mHomePreviewWallpaperInfo,
- mWallpaperSurfaceCallback.getHomeImageWallpaper(), true);
+ updateThumbnail(mHomePreviewWallpaperInfo, mHomePreview, true);
+ updateThumbnail(mLockPreviewWallpaperInfo, mLockscreenPreview, false);
}
});
}
@@ -634,7 +639,7 @@
}
if (WallpaperConnection.isPreviewAvailable()) {
- ImageView previewView = mWallpaperSurfaceCallback.getHomeImageWallpaper();
+ ImageView previewView = mWallpaperIndex == 0 ? mHomePreview : mLockscreenPreview;
mWallpaperConnection = new WallpaperConnection(
getWallpaperIntent(homeWallpaper.getWallpaperComponent()), activity,
new WallpaperConnectionListener() {
diff --git a/src/com/android/wallpaper/picker/CategorySelectorFragment.java b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
index a611d48..0455f47 100644
--- a/src/com/android/wallpaper/picker/CategorySelectorFragment.java
+++ b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
@@ -122,7 +122,6 @@
private ArrayList<Category> mCategories = new ArrayList<>();
private Point mTileSizePx;
private boolean mAwaitingCategories;
- private boolean mIsFeaturedCollectionAvailable;
public CategorySelectorFragment() {
mAdapter = new CategoryAdapter(mCategories);
@@ -251,8 +250,6 @@
mAdapter.notifyItemRemoved(mAdapter.getItemCount() - 1);
mAwaitingCategories = false;
}
-
- mIsFeaturedCollectionAvailable = mCategoryProvider.isFeaturedCollectionAvailable();
}
void notifyDataSetChanged() {
@@ -293,7 +290,6 @@
CardView categoryView = itemView.findViewById(R.id.category);
categoryView.getLayoutParams().height = mTileSizePx.y;
- categoryView.setRadius(getResources().getDimension(R.dimen.grid_item_all_radius_small));
}
@Override
@@ -388,7 +384,6 @@
CardView categoryView = itemView.findViewById(R.id.category);
categoryView.getLayoutParams().height =
SizeCalculator.getFeaturedCategoryTileSize(getActivity()).y;
- categoryView.setRadius(getResources().getDimension(R.dimen.grid_item_all_radius));
}
}
@@ -448,7 +443,7 @@
return ITEM_VIEW_TYPE_MY_PHOTOS;
}
- if (mIsFeaturedCollectionAvailable && (position == 1 || position == 2)) {
+ if (mCategoryProvider.isFeaturedCategory(mCategories.get(position))) {
return ITEM_VIEW_TYPE_FEATURED_CATEGORY;
}
diff --git a/src/com/android/wallpaper/picker/CustomizationPickerActivity.java b/src/com/android/wallpaper/picker/CustomizationPickerActivity.java
deleted file mode 100644
index 16bfffe..0000000
--- a/src/com/android/wallpaper/picker/CustomizationPickerActivity.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.picker;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Build;
-import android.os.Bundle;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.core.view.WindowCompat;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentManager;
-
-import com.android.wallpaper.R;
-import com.android.wallpaper.model.Category;
-import com.android.wallpaper.model.PermissionRequester;
-import com.android.wallpaper.model.WallpaperCategory;
-import com.android.wallpaper.model.WallpaperInfo;
-import com.android.wallpaper.model.WallpaperPreviewNavigator;
-import com.android.wallpaper.module.DailyLoggingAlarmScheduler;
-import com.android.wallpaper.module.Injector;
-import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.module.NetworkStatusNotifier;
-import com.android.wallpaper.module.NetworkStatusNotifier.NetworkStatus;
-import com.android.wallpaper.module.UserEventLogger;
-import com.android.wallpaper.picker.AppbarFragment.AppbarFragmentHost;
-import com.android.wallpaper.picker.CategoryFragment.CategoryFragmentHost;
-import com.android.wallpaper.picker.CategorySelectorFragment.CategorySelectorFragmentHost;
-import com.android.wallpaper.picker.MyPhotosStarter.PermissionChangedListener;
-import com.android.wallpaper.picker.individual.IndividualPickerFragment.IndividualPickerFragmentHost;
-import com.android.wallpaper.util.DeepLinkUtils;
-import com.android.wallpaper.util.LaunchUtils;
-import com.android.wallpaper.widget.BottomActionBar;
-import com.android.wallpaper.widget.BottomActionBar.BottomActionBarHost;
-
-/**
- * Main Activity allowing containing view sections for the user to switch between the different
- * Fragments providing customization options.
- */
-public class CustomizationPickerActivity extends FragmentActivity implements AppbarFragmentHost,
- WallpapersUiContainer, CategoryFragmentHost, BottomActionBarHost,
- FragmentTransactionChecker, PermissionRequester, CategorySelectorFragmentHost,
- IndividualPickerFragmentHost, WallpaperPreviewNavigator {
-
- public static final String WALLPAPER_FLAVOR_EXTRA =
- "com.android.launcher3.WALLPAPER_FLAVOR";
- public static final String WALLPAPER_FOCUS = "focus_wallpaper";
-
- private static final String TAG = "CustomizationPickerActivity";
- private static final String WALLPAPER_ONLY = "wallpaper_only";
-
- private WallpaperPickerDelegate mDelegate;
- private UserEventLogger mUserEventLogger;
- private NetworkStatusNotifier mNetworkStatusNotifier;
- private NetworkStatusNotifier.Listener mNetworkStatusListener;
- @NetworkStatus private int mNetworkStatus;
-
- private BottomActionBar mBottomActionBar;
- private boolean mIsSafeToCommitFragmentTransaction;
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- Injector injector = InjectorProvider.getInjector();
- mDelegate = new WallpaperPickerDelegate(this, this, injector);
- mUserEventLogger = injector.getUserEventLogger(this);
- mNetworkStatusNotifier = injector.getNetworkStatusNotifier(this);
- mNetworkStatus = mNetworkStatusNotifier.getNetworkStatus();
-
- // Restore this Activity's state before restoring contained Fragments state.
- super.onCreate(savedInstanceState);
- if (WALLPAPER_ONLY.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA))
- || !supportCustomizationSections()) {
- skipToWallpaperPicker();
- return;
- }
-
- setContentView(R.layout.activity_customization_picker);
- mBottomActionBar = findViewById(R.id.bottom_actionbar);
-
- // See go/pdr-edge-to-edge-guide.
- WindowCompat.setDecorFitsSystemWindows(getWindow(), /* decorFitsSystemWindows= */ false);
-
- Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
- if (fragment == null) {
- // App launch specific logic: log the "app launch source" event.
- if (getIntent() != null) {
- mUserEventLogger.logAppLaunched(getIntent());
- }
- injector.getPreferences(this).incrementAppLaunched();
- DailyLoggingAlarmScheduler.setAlarm(getApplicationContext());
-
- // Switch to the customization picker fragment.
- switchFragment(CustomizationPickerFragment.newInstance(getString(R.string.app_name)));
- }
-
- // Deep link case
- Intent intent = getIntent();
- String deepLinkCollectionId = DeepLinkUtils.getCollectionId(intent);
- if (!TextUtils.isEmpty(deepLinkCollectionId)) {
- switchFragmentWithBackStack(new CategorySelectorFragment());
- switchFragmentWithBackStack(InjectorProvider.getInjector().getIndividualPickerFragment(
- deepLinkCollectionId));
- intent.setData(null);
- }
- mDelegate.prefetchCategories();
- }
-
- @Override
- protected void onStart() {
- super.onStart();
- if (mNetworkStatusListener == null) {
- mNetworkStatusListener = status -> {
- if (status == mNetworkStatus) {
- return;
- }
- Log.i(TAG, "Network status changes, refresh wallpaper categories.");
- mNetworkStatus = status;
- mDelegate.initialize(/* forceCategoryRefresh= */ true);
- };
- // Upon registering a listener, the onNetworkChanged method is immediately called with
- // the initial network status.
- mNetworkStatusNotifier.registerListener(mNetworkStatusListener);
- }
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mIsSafeToCommitFragmentTransaction = true;
- boolean wallpaperOnly =
- WALLPAPER_ONLY.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA));
- boolean provisioned = Settings.Global.getInt(getContentResolver(),
- Settings.Global.DEVICE_PROVISIONED, 0) != 0;
-
- mUserEventLogger.logResumed(provisioned, wallpaperOnly);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mIsSafeToCommitFragmentTransaction = false;
- }
-
- @Override
- protected void onStop() {
- mUserEventLogger.logStopped();
- if (mNetworkStatusListener != null) {
- mNetworkStatusNotifier.unregisterListener(mNetworkStatusListener);
- mNetworkStatusListener = null;
- }
- super.onStop();
- }
-
- @Override
- protected void onNewIntent(Intent intent) {
- super.onNewIntent(intent);
- if (WALLPAPER_ONLY.equals(intent.getStringExtra(WALLPAPER_FLAVOR_EXTRA))) {
- Log.d(TAG, "WALLPAPER_ONLY intent, reverting to Wallpaper Picker");
- skipToWallpaperPicker();
- }
- }
-
- private void skipToWallpaperPicker() {
- Intent intent = new Intent(this, TopLevelPickerActivity.class);
-
- if (getIntent() != null && getIntent().getExtras() != null) {
- intent.putExtras(getIntent().getExtras());
- }
-
- if (DeepLinkUtils.isDeepLink(getIntent())) {
- intent.setData(getIntent().getData());
- }
- startActivity(intent);
- finish();
- }
-
- private boolean supportCustomizationSections() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
- || "S".equals(Build.VERSION.CODENAME)) {
- return true;
- }
- Log.d(TAG, "Build version < S, customization sections feature is not supported");
- return false;
- }
-
- @Override
- public void onBackPressed() {
- Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
- if (fragment instanceof BottomActionBarFragment
- && ((BottomActionBarFragment) fragment).onBackPressed()) {
- return;
- }
-
- if (getSupportFragmentManager().popBackStackImmediate()) {
- return;
- }
- if (moveTaskToBack(false)) {
- return;
- }
- super.onBackPressed();
- }
-
- private void switchFragment(Fragment fragment) {
- getSupportFragmentManager()
- .beginTransaction()
- .replace(R.id.fragment_container, fragment)
- .commitNow();
- }
-
- private void switchFragmentWithBackStack(Fragment fragment) {
- getSupportFragmentManager()
- .beginTransaction()
- .replace(R.id.fragment_container, fragment)
- .addToBackStack(null)
- .commit();
- getSupportFragmentManager().executePendingTransactions();
- }
-
-
- @Override
- public void requestExternalStoragePermission(PermissionChangedListener listener) {
- mDelegate.requestExternalStoragePermission(listener);
- }
-
- @Override
- public boolean isReadExternalStoragePermissionGranted() {
- return mDelegate.isReadExternalStoragePermissionGranted();
- }
-
- @Override
- public void showViewOnlyPreview(WallpaperInfo wallpaperInfo, boolean isViewAsHome) {
- mDelegate.showViewOnlyPreview(wallpaperInfo, isViewAsHome);
- }
-
- @Override
- public void show(String collectionId) {
- mDelegate.show(collectionId);
- }
-
- @Override
- public void requestCustomPhotoPicker(PermissionChangedListener listener) {
- mDelegate.requestCustomPhotoPicker(listener);
- }
-
- @Override
- public void show(Category category) {
- if (!(category instanceof WallpaperCategory)) {
- show(category.getCollectionId());
- return;
- }
- switchFragmentWithBackStack(InjectorProvider.getInjector().getIndividualPickerFragment(
- category.getCollectionId()));
- }
-
- @Override
- public boolean isHostToolbarShown() {
- return false;
- }
-
- @Override
- public void setToolbarTitle(CharSequence title) {
-
- }
-
- @Override
- public void setToolbarMenu(int menuResId) {
-
- }
-
- @Override
- public void removeToolbarMenu() {
-
- }
-
- @Override
- public void moveToPreviousFragment() {
- getSupportFragmentManager().popBackStack();
- }
-
- @Override
- public void fetchCategories() {
- mDelegate.initialize(!mDelegate.getCategoryProvider().isCategoriesFetched());
- }
-
- @Override
- public void cleanUp() {
- mDelegate.cleanUp();
- }
-
- @Override
- public void onWallpapersReady() {
-
- }
-
- @Nullable
- @Override
- public CategorySelectorFragment getCategorySelectorFragment() {
- FragmentManager fm = getSupportFragmentManager();
- Fragment fragment = fm.findFragmentById(R.id.fragment_container);
- if (fragment instanceof CategorySelectorFragment) {
- return (CategorySelectorFragment) fragment;
- } else {
- return null;
- }
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- }
-
- @Override
- public void doneFetchingCategories() {
-
- }
-
- @Override
- public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
- @NonNull int[] grantResults) {
- mDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
- }
-
- @Override
- public MyPhotosStarter getMyPhotosStarter() {
- return mDelegate;
- }
-
- @Override
- protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (mDelegate.handleActivityResult(requestCode, resultCode, data)) {
- finishActivityWithResultOk();
- }
- }
-
- private void finishActivityWithResultOk() {
- overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
- setResult(Activity.RESULT_OK);
- finish();
-
- // Go back to launcher home
- LaunchUtils.launchHome(this);
- }
-
- @Override
- public BottomActionBar getBottomActionBar() {
- return mBottomActionBar;
- }
-
- @Override
- public boolean isSafeToCommitFragmentTransaction() {
- return mIsSafeToCommitFragmentTransaction;
- }
-
- @Override
- public void onUpArrowPressed() {
- // TODO(b/189166781): Remove interface AppbarFragmentHost#onUpArrowPressed.
- onBackPressed();
- }
-
- @Override
- public boolean isUpArrowSupported() {
- return true;
- }
-}
diff --git a/src/com/android/wallpaper/picker/CustomizationPickerFragment.java b/src/com/android/wallpaper/picker/CustomizationPickerFragment.java
deleted file mode 100644
index 75f1b46..0000000
--- a/src/com/android/wallpaper/picker/CustomizationPickerFragment.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.picker;
-
-import android.os.Bundle;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.annotation.Nullable;
-import androidx.core.widget.NestedScrollView;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentManager;
-import androidx.lifecycle.ViewModelProvider;
-
-import com.android.wallpaper.R;
-import com.android.wallpaper.model.CustomizationSectionController;
-import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController;
-import com.android.wallpaper.model.PermissionRequester;
-import com.android.wallpaper.model.WallpaperColorsViewModel;
-import com.android.wallpaper.model.WallpaperPreviewNavigator;
-import com.android.wallpaper.model.WorkspaceViewModel;
-import com.android.wallpaper.module.CustomizationSections;
-import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.util.ActivityUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/** The Fragment UI for customization sections. */
-public class CustomizationPickerFragment extends AppbarFragment implements
- CustomizationSectionNavigationController {
-
- private static final String TAG = "CustomizationPickerFragment";
- private static final String SCROLL_POSITION_Y = "SCROLL_POSITION_Y";
-
- // Note that the section views will be displayed by the list ordering.
- private final List<CustomizationSectionController<?>> mSectionControllers = new ArrayList<>();
- private NestedScrollView mNestedScrollView;
-
- /** Initiates CustomizationPickerFragment instance. */
- public static CustomizationPickerFragment newInstance(CharSequence title) {
- CustomizationPickerFragment fragment = new CustomizationPickerFragment();
- fragment.setArguments(AppbarFragment.createArguments(title));
- return fragment;
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- final View view = inflater.inflate(R.layout.collapsing_toolbar_base_layout,
- container, /* attachToRoot= */ false);
- setContentView(view, R.layout.fragment_customization_picker);
- setUpToolbar(view, ActivityUtils.isLaunchedFromSettingsRelated(getActivity().getIntent()));
-
- ViewGroup sectionContainer = view.findViewById(R.id.section_container);
- sectionContainer.setOnApplyWindowInsetsListener((v, windowInsets) -> {
- v.setPadding(
- v.getPaddingLeft(),
- v.getPaddingTop(),
- v.getPaddingRight(),
- windowInsets.getSystemWindowInsetBottom());
- return windowInsets.consumeSystemWindowInsets();
- });
- mNestedScrollView = view.findViewById(R.id.scroll_container);
-
- initSections(savedInstanceState);
- mSectionControllers.forEach(controller ->
- sectionContainer.addView(controller.createView(getContext())));
- restoreViewState(savedInstanceState);
- return view;
- }
-
- private void setContentView(View view, int layoutResId) {
- final ViewGroup parent = view.findViewById(R.id.content_frame);
- if (parent != null) {
- parent.removeAllViews();
- }
- LayoutInflater.from(view.getContext()).inflate(layoutResId, parent);
- }
-
- private void restoreViewState(@Nullable Bundle savedInstanceState) {
- if (savedInstanceState != null) {
- mNestedScrollView.post(() ->
- mNestedScrollView.setScrollY(savedInstanceState.getInt(SCROLL_POSITION_Y)));
- }
- }
-
- @Override
- public void onSaveInstanceState(Bundle savedInstanceState) {
- if (mNestedScrollView != null) {
- savedInstanceState.putInt(SCROLL_POSITION_Y, mNestedScrollView.getScrollY());
- }
- mSectionControllers.forEach(c -> c.onSaveInstanceState(savedInstanceState));
- super.onSaveInstanceState(savedInstanceState);
- }
-
- @Override
- protected int getToolbarId() {
- return R.id.action_bar;
- }
-
- @Override
- public boolean onBackPressed() {
- // TODO(b/191120122) Improve glitchy animation in Settings.
- if (ActivityUtils.isLaunchedFromSettingsSearch(getActivity().getIntent())) {
- mSectionControllers.forEach(CustomizationSectionController::onTransitionOut);
- }
- return super.onBackPressed();
- }
-
- @Override
- public void onDestroyView() {
- mSectionControllers.forEach(CustomizationSectionController::release);
- mSectionControllers.clear();
- super.onDestroyView();
- }
-
- @Override
- public void navigateTo(Fragment fragment) {
- FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
- fragmentManager
- .beginTransaction()
- .replace(R.id.fragment_container, fragment)
- .addToBackStack(null)
- .commit();
- fragmentManager.executePendingTransactions();
- }
-
- private void initSections(@Nullable Bundle savedInstanceState) {
- // Release and clear if any.
- mSectionControllers.forEach(CustomizationSectionController::release);
- mSectionControllers.clear();
-
- WallpaperColorsViewModel wcViewModel = new ViewModelProvider(getActivity())
- .get(WallpaperColorsViewModel.class);
- WorkspaceViewModel workspaceViewModel = new ViewModelProvider(getActivity())
- .get(WorkspaceViewModel.class);
-
- CustomizationSections sections = InjectorProvider.getInjector().getCustomizationSections();
- List<CustomizationSectionController<?>> allSectionControllers =
- sections.getAllSectionControllers(getActivity(), getViewLifecycleOwner(),
- wcViewModel, workspaceViewModel, getPermissionRequester(),
- getWallpaperPreviewNavigator(), this, savedInstanceState);
-
- mSectionControllers.addAll(getAvailableSections(allSectionControllers));
- }
-
- private List<CustomizationSectionController<?>> getAvailableSections (
- List<CustomizationSectionController<?>> controllers) {
- return controllers.stream()
- .filter(controller -> {
- if(controller.isAvailable(getContext())) {
- return true;
- } else {
- controller.release();
- Log.d(TAG, "Section is not available: " + controller);
- return false;
- }})
- .collect(Collectors.toList());
- }
-
- private PermissionRequester getPermissionRequester() {
- return (PermissionRequester) getActivity();
- }
-
- private WallpaperPreviewNavigator getWallpaperPreviewNavigator() {
- return (WallpaperPreviewNavigator) getActivity();
- }
-}
diff --git a/src/com/android/wallpaper/picker/ImagePreviewFragment.java b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
index feb3699..4e0b54a 100755
--- a/src/com/android/wallpaper/picker/ImagePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
@@ -15,8 +15,6 @@
*/
package com.android.wallpaper.picker;
-import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
-import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.makeMeasureSpec;
@@ -62,24 +60,23 @@
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.module.WallpaperPersister.Destination;
import com.android.wallpaper.module.WallpaperPersister.SetWallpaperCallback;
-import com.android.wallpaper.util.FullScreenAnimation;
import com.android.wallpaper.util.ResourceUtils;
import com.android.wallpaper.util.ScreenSizeCalculator;
import com.android.wallpaper.util.SizeCalculator;
import com.android.wallpaper.util.WallpaperCropUtils;
import com.android.wallpaper.widget.BottomActionBar;
import com.android.wallpaper.widget.BottomActionBar.AccessibilityCallback;
-import com.android.wallpaper.widget.LockScreenPreviewer;
+import com.android.wallpaper.widget.LockScreenPreviewer2;
import com.android.wallpaper.widget.WallpaperInfoView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.MemoryCategory;
import com.davemorrissey.labs.subscaleview.ImageSource;
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
+import com.google.android.material.tabs.TabLayout;
import java.util.Locale;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
+import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
/**
@@ -103,19 +100,18 @@
private ConstraintLayout mContainer;
private SurfaceView mWallpaperSurface;
private WallpaperInfoView mWallpaperInfoView;
+ private Optional<Integer> mLastSelectedTabPositionOptional = Optional.empty();
private AtomicInteger mImageScaleChangeCounter = new AtomicInteger(0);
protected SurfaceView mWorkspaceSurface;
protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
protected ViewGroup mLockPreviewContainer;
- protected LockScreenPreviewer mLockScreenPreviewer;
- private Future<Integer> mPlaceholderColorFuture;
+ protected LockScreenPreviewer2 mLockScreenPreviewer;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mWallpaperAsset = mWallpaper.getAsset(requireContext().getApplicationContext());
- mPlaceholderColorFuture = mWallpaper.computePlaceholderColor(requireContext());
}
@Override
@@ -124,6 +120,11 @@
}
@Override
+ protected int getLoadingIndicatorResId() {
+ return R.id.loading_indicator;
+ }
+
+ @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
@@ -132,9 +133,12 @@
mScreenSize = ScreenSizeCalculator.getInstance().getScreenSize(
activity.getWindowManager().getDefaultDisplay());
+ // TODO: Consider moving some part of this to the base class when live preview is ready.
+ view.findViewById(R.id.low_res_image).setVisibility(View.GONE);
+ view.findViewById(R.id.full_res_image).setVisibility(View.GONE);
+ mLoadingProgressBar.hide();
mContainer = view.findViewById(R.id.container);
mTouchForwardingLayout = mContainer.findViewById(R.id.touch_forwarding_layout);
- mTouchForwardingLayout.setForwardingEnabled(true);
// Set aspect ratio on the preview card dynamically.
ConstraintSet set = new ConstraintSet();
@@ -147,14 +151,9 @@
mWorkspaceSurfaceCallback = createWorkspaceSurfaceCallback(mWorkspaceSurface);
mWallpaperSurface = mContainer.findViewById(R.id.wallpaper_surface);
mLockPreviewContainer = mContainer.findViewById(R.id.lock_screen_preview_container);
- int placeHolderColor = ResourceUtils.getColorAttr(getContext(),
- android.R.attr.colorBackground);
- mWorkspaceSurface.setResizeBackgroundColor(placeHolderColor);
- mLockScreenPreviewer = new LockScreenPreviewer(getLifecycle(), getContext(),
+ mLockScreenPreviewer = new LockScreenPreviewer2(getLifecycle(), getContext(),
mLockPreviewContainer);
- mLockScreenPreviewer.setDateViewVisibility(!mFullScreenAnimation.isFullScreen());
- mFullScreenAnimation.setFullScreenStatusListener(
- isFullScreen -> mLockScreenPreviewer.setDateViewVisibility(!isFullScreen));
+
setUpTabs(view.findViewById(R.id.pill_tabs));
view.measure(makeMeasureSpec(mScreenSize.x, EXACTLY),
@@ -168,26 +167,38 @@
// Trim some memory from Glide to make room for the full-size image in this fragment.
Glide.get(activity).setMemoryCategory(MemoryCategory.LOW);
-
+ setUpLoadingIndicator();
return view;
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
+ mWallpaperAsset.decodeRawDimensions(getActivity(), dimensions -> {
+ // Don't continue loading the wallpaper if the Fragment is detached.
+ if (getActivity() == null) {
+ return;
+ }
+
+ // Return early and show a dialog if dimensions are null (signaling a decoding error).
+ if (dimensions == null) {
+ showLoadWallpaperErrorDialog();
+ return;
+ }
+
+ // To avoid applying the wallpaper when it's not parsed. Now it's parsed, enable the
+ // bottom action bar to allow applying the wallpaper.
+ if (mBottomActionBar != null) {
+ mBottomActionBar.enableActions();
+ }
+
+ mRawWallpaperSize = dimensions;
+ initFullResView();
+ });
}
protected void onWallpaperColorsChanged(@Nullable WallpaperColors colors) {
- // Make it enabled since the buttons are disabled while wallpaper is moving.
- mBottomActionBar.enableActionButtonsWithBottomSheet(true);
-
mLockScreenPreviewer.setColor(colors);
-
- mFullScreenAnimation.setFullScreenTextColor(
- colors == null || (colors.getColorHints()
- & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0
- ? FullScreenAnimation.FullScreenTextColor.LIGHT
- : FullScreenAnimation.FullScreenTextColor.DARK);
}
@Override
@@ -206,15 +217,14 @@
@Override
public void onDestroy() {
super.onDestroy();
+ if (mLoadingProgressBar != null) {
+ mLoadingProgressBar.hide();
+ }
if (mFullResImageView != null) {
mFullResImageView.recycle();
}
- if (mLockScreenPreviewer != null) {
- mLockScreenPreviewer.release();
- }
-
mWallpaperSurfaceCallback.cleanUp();
mWorkspaceSurfaceCallback.cleanUp();
}
@@ -227,29 +237,29 @@
R.layout.wallpaper_info_view, /* root= */null);
mBottomActionBar.attachViewToBottomSheetAndBindAction(mWallpaperInfoView, INFORMATION);
mBottomActionBar.showActionsOnly(INFORMATION, EDIT, APPLY);
-
+ mBottomActionBar.setActionClickListener(EDIT, v ->
+ setEditingEnabled(mBottomActionBar.isActionSelected(EDIT))
+ );
+ mBottomActionBar.setActionSelectedListener(EDIT, this::setEditingEnabled);
mBottomActionBar.setActionClickListener(APPLY, this::onSetWallpaperClicked);
- View pillTabsContainer = getView().findViewById(R.id.pill_tabs_container);
// Update target view's accessibility param since it will be blocked by the bottom sheet
// when expanded.
mBottomActionBar.setAccessibilityCallback(new AccessibilityCallback() {
@Override
public void onBottomSheetCollapsed() {
- mContainer.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
- pillTabsContainer.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
+ mContainer.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
@Override
public void onBottomSheetExpanded() {
mContainer.setImportantForAccessibility(
- IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
- pillTabsContainer.setImportantForAccessibility(
- IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
-
+ View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
});
+ // Will trigger onActionSelected callback to update the editing state.
+ mBottomActionBar.setDefaultSelectedButton(EDIT);
mBottomActionBar.show();
// Loads wallpaper info and populate into view.
setUpExploreIntentAndLabel(this::populateWallpaperInfo);
@@ -261,21 +271,50 @@
}
}
+ protected void setUpTabs(TabLayout tabs) {
+ tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.home_screen_message)));
+ tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.lock_screen_message)));
+ tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+ @Override
+ public void onTabSelected(TabLayout.Tab tab) {
+ mLastSelectedTabPositionOptional = Optional.of(tab.getPosition());
+ updateScreenPreview(/* isHomeSelected= */ tab.getPosition() == 0);
+ }
+
+ @Override
+ public void onTabUnselected(TabLayout.Tab tab) {}
+
+ @Override
+ public void onTabReselected(TabLayout.Tab tab) {}
+ });
+
+ // The TabLayout only contains below tabs
+ // 0. Home tab
+ // 1. Lock tab
+ int tabPosition = mLastSelectedTabPositionOptional.orElseGet(() -> mViewAsHome ? 0 : 1);
+ tabs.getTabAt(tabPosition).select();
+ updateScreenPreview(/* isHomeSelected= */ tabPosition == 0);
+ }
+
/**
* Initializes MosaicView by initializing tiling, setting a fallback page bitmap, and
* initializing a zoom-scroll observer and click listener.
*/
private void initFullResView() {
- if (mRawWallpaperSize == null || mFullResImageView == null) {
- return;
- }
-
// Minimum scale will only be respected under this scale type.
mFullResImageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CUSTOM);
// When we set a minimum scale bigger than the scale with which the full image is shown,
// disallow user to pan outside the view we show the wallpaper in.
mFullResImageView.setPanLimit(SubsamplingScaleImageView.PAN_LIMIT_INSIDE);
+ // Set a solid black "page bitmap" so MosaicView draws a black background while waiting
+ // for the image to load or a transparent one if a thumbnail already loaded.
+ Bitmap backgroundBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
+ int preColor = ResourceUtils.getColorAttr(getActivity(), android.R.attr.colorSecondary);
+ int color = (mLowResImageView.getDrawable() == null) ? preColor : Color.TRANSPARENT;
+ backgroundBitmap.setPixel(0, 0, color);
+ mFullResImageView.setImage(ImageSource.bitmap(backgroundBitmap));
+
// Then set a fallback "page bitmap" to cover the whole MosaicView, which is an actual
// (lower res) version of the image to be displayed.
Point targetPageBitmapSize = new Point(mRawWallpaperSize);
@@ -286,15 +325,17 @@
return;
}
+ // Some of these may be null depending on if the Fragment is paused, stopped,
+ // or destroyed.
+ if (mLoadingProgressBar != null) {
+ mLoadingProgressBar.hide();
+ }
// The page bitmap may be null if there was a decoding error, so show an
// error dialog.
if (pageBitmap == null) {
showLoadWallpaperErrorDialog();
return;
}
- // Some of these may be null depending on if the Fragment is paused, stopped,
- // or destroyed.
- mWallpaperSurface.setBackgroundColor(Color.TRANSPARENT);
if (mFullResImageView != null) {
// Set page bitmap.
mFullResImageView.setImage(ImageSource.bitmap(pageBitmap));
@@ -307,9 +348,6 @@
@Override
public void onCenterChanged(PointF newCenter, int origin) {
super.onCenterChanged(newCenter, origin);
- // Disallow bottom sheet to popup when wallpaper is moving
- // by user dragging.
- mBottomActionBar.enableActionButtonsWithBottomSheet(false);
mImageScaleChangeCounter.incrementAndGet();
mFullResImageView.postDelayed(() -> {
if (mImageScaleChangeCounter.decrementAndGet() == 0) {
@@ -320,42 +358,17 @@
});
mFullResImageView.post(this::recalculateColors);
}
+ getActivity().invalidateOptionsMenu();
});
-
- mFullResImageView.setOnTouchListener((v, ev) -> {
- // Consume the touch event for collapsing bottom sheet while it is expanded or
- // dragging (not collapsed).
- if (mBottomActionBar != null && !mBottomActionBar.isBottomSheetCollapsed()) {
- mBottomActionBar.collapseBottomSheetIfExpanded();
- return true;
- }
- return false;
- });
}
private void recalculateColors() {
- Context context = getContext();
- if (context == null) {
- Log.e(TAG, "Got null context, skip recalculating colors");
- return;
- }
-
BitmapCropper bitmapCropper = InjectorProvider.getInjector().getBitmapCropper();
bitmapCropper.cropAndScaleBitmap(mWallpaperAsset, mFullResImageView.getScale(),
- calculateCropRect(context), /* adjustForRtl= */ false,
- new BitmapCropper.Callback() {
+ calculateCropRect(), /* adjustForRtl= */ false, new BitmapCropper.Callback() {
@Override
public void onBitmapCropped(Bitmap croppedBitmap) {
- boolean shouldRecycle = false;
- if (croppedBitmap.getConfig() == Bitmap.Config.HARDWARE) {
- croppedBitmap = croppedBitmap.copy(Bitmap.Config.ARGB_8888, false);
- shouldRecycle = true;
- }
- WallpaperColors colors = WallpaperColors.fromBitmap(croppedBitmap);
- if (shouldRecycle) {
- croppedBitmap.recycle();
- }
- onWallpaperColorsChanged(colors);
+ onWallpaperColorsChanged(WallpaperColors.fromBitmap(croppedBitmap));
}
@Override
@@ -387,7 +400,6 @@
mFullResImageView.setAlpha(0f);
mFullResImageView.animate()
.alpha(1f)
- .setInterpolator(ALPHA_OUT)
.setDuration(shortAnimationDuration)
.setListener(new AnimatorListenerAdapter() {
@Override
@@ -399,6 +411,18 @@
}
}
});
+
+ mLoadingProgressBar.animate()
+ .alpha(0f)
+ .setDuration(shortAnimationDuration)
+ .setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mLoadingProgressBar != null) {
+ mLoadingProgressBar.hide();
+ }
+ }
+ });
}
/**
@@ -448,9 +472,9 @@
mFullResImageView.setScaleAndCenter(minWallpaperZoom, centerPosition);
}
- private Rect calculateCropRect(Context context) {
+ private Rect calculateCropRect() {
float wallpaperZoom = mFullResImageView.getScale();
- Context appContext = context.getApplicationContext();
+ Context context = requireContext().getApplicationContext();
Rect visibleFileRect = new Rect();
mFullResImageView.visibleFileRect(visibleFileRect);
@@ -461,17 +485,18 @@
int minCrop = Math.min(cropWidth, cropHeight);
Point hostViewSize = new Point(cropWidth, cropHeight);
- Resources res = appContext.getResources();
+ Resources res = context.getResources();
Point cropSurfaceSize = WallpaperCropUtils.calculateCropSurfaceSize(res, maxCrop, minCrop);
- return WallpaperCropUtils.calculateCropRect(appContext, hostViewSize,
+ Rect cropRect = WallpaperCropUtils.calculateCropRect(context, hostViewSize,
cropSurfaceSize, mRawWallpaperSize, visibleFileRect, wallpaperZoom);
+ return cropRect;
}
@Override
protected void setCurrentWallpaper(@Destination int destination) {
mWallpaperSetter.setCurrentWallpaper(getActivity(), mWallpaper, mWallpaperAsset,
- destination, mFullResImageView.getScale(), calculateCropRect(getContext()),
+ destination, mFullResImageView.getScale(), calculateCropRect(),
new SetWallpaperCallback() {
@Override
public void onSuccess(WallpaperInfo wallpaperInfo) {
@@ -495,6 +520,7 @@
}
private class WallpaperSurfaceCallback implements SurfaceHolder.Callback {
+
private Surface mLastSurface;
private SurfaceControlViewHost mHost;
@@ -510,28 +536,6 @@
R.layout.fullscreen_wallpaper_preview, null);
mFullResImageView = wallpaperPreviewContainer.findViewById(R.id.full_res_image);
mLowResImageView = wallpaperPreviewContainer.findViewById(R.id.low_res_image);
- mWallpaperAsset.decodeRawDimensions(getActivity(), dimensions -> {
- // Don't continue loading the wallpaper if the Fragment is detached.
- if (getActivity() == null) {
- return;
- }
-
- // Return early and show a dialog if dimensions are null (signaling a decoding
- // error).
- if (dimensions == null) {
- showLoadWallpaperErrorDialog();
- return;
- }
-
- // To avoid applying the wallpaper when it's not parsed. Now it's parsed, enable
- // the bottom action bar to allow applying the wallpaper.
- if (mBottomActionBar != null) {
- mBottomActionBar.enableActions();
- }
-
- mRawWallpaperSize = dimensions;
- initFullResView();
- });
// Scale the mWallpaperSurface based on system zoom's scale so that the wallpaper is
// rendered in a larger surface than what preview shows, simulating the behavior of
// the actual wallpaper surface.
@@ -557,23 +561,12 @@
// Load a low-res placeholder image if there's a thumbnail available from the asset
// that can be shown to the user more quickly than the full-sized image.
- Activity activity = requireActivity();
- int placeHolderColor = ResourceUtils.getColorAttr(activity,
- android.R.attr.colorBackground);
- if (mPlaceholderColorFuture.isDone()) {
- try {
- placeHolderColor = mWallpaper.computePlaceholderColor(context).get();
- } catch (InterruptedException | ExecutionException e) {
- // Do nothing
- }
+ if (mWallpaperAsset.hasLowResDataSource()) {
+ Activity activity = requireActivity();
+ mWallpaperAsset.loadLowResDrawable(activity, mLowResImageView, Color.BLACK,
+ new WallpaperPreviewBitmapTransformation(
+ activity.getApplicationContext(), isRtl()));
}
- mWallpaperSurface.setResizeBackgroundColor(placeHolderColor);
- mWallpaperSurface.setBackgroundColor(placeHolderColor);
-
- mWallpaperAsset.loadLowResDrawable(activity, mLowResImageView, placeHolderColor,
- new WallpaperPreviewBitmapTransformation(
- activity.getApplicationContext(), isRtl()));
-
wallpaperPreviewContainer.measure(
makeMeasureSpec(width, EXACTLY),
makeMeasureSpec(height, EXACTLY));
@@ -601,14 +594,14 @@
mHost = null;
}
}
+ };
+
+ private void setEditingEnabled(boolean enabled) {
+ mTouchForwardingLayout.setForwardingEnabled(enabled);
}
- @Override
- protected void updateScreenPreview(boolean isHomeSelected) {
+ private void updateScreenPreview(boolean isHomeSelected) {
mWorkspaceSurface.setVisibility(isHomeSelected ? View.VISIBLE : View.INVISIBLE);
-
mLockPreviewContainer.setVisibility(isHomeSelected ? View.INVISIBLE : View.VISIBLE);
-
- mFullScreenAnimation.setIsHomeSelected(isHomeSelected);
}
}
diff --git a/src/com/android/wallpaper/picker/LivePreviewFragment.java b/src/com/android/wallpaper/picker/LivePreviewFragment.java
index de98d7e..c7c6f54 100644
--- a/src/com/android/wallpaper/picker/LivePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/LivePreviewFragment.java
@@ -15,13 +15,9 @@
*/
package com.android.wallpaper.picker;
-import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
-import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
-
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.CUSTOMIZE;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.DELETE;
-import static com.android.wallpaper.widget.BottomActionBar.BottomAction.EDIT;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.INFORMATION;
import android.annotation.SuppressLint;
@@ -37,6 +33,8 @@
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
import android.graphics.Point;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
@@ -50,6 +48,7 @@
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
+import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import androidx.annotation.NonNull;
@@ -65,7 +64,6 @@
import com.android.wallpaper.R;
import com.android.wallpaper.compat.BuildCompat;
import com.android.wallpaper.module.WallpaperPersister.SetWallpaperCallback;
-import com.android.wallpaper.util.FullScreenAnimation;
import com.android.wallpaper.util.ResourceUtils;
import com.android.wallpaper.util.ScreenSizeCalculator;
import com.android.wallpaper.util.SizeCalculator;
@@ -73,15 +71,14 @@
import com.android.wallpaper.util.WallpaperSurfaceCallback;
import com.android.wallpaper.widget.BottomActionBar;
import com.android.wallpaper.widget.BottomActionBar.AccessibilityCallback;
-import com.android.wallpaper.widget.LockScreenPreviewer;
+import com.android.wallpaper.widget.LockScreenPreviewer2;
import com.android.wallpaper.widget.WallpaperColorsLoader;
import com.android.wallpaper.widget.WallpaperInfoView;
+import com.google.android.material.tabs.TabLayout;
+
import java.util.Locale;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
+import java.util.Optional;
/**
* Fragment which displays the UI for previewing an individual live wallpaper, its attribution
@@ -103,28 +100,30 @@
protected WallpaperConnection mWallpaperConnection;
protected WallpaperInfoView mWallpaperInfoView;
protected CardView mHomePreviewCard;
- protected SurfaceView mWorkspaceSurface;
- protected WallpaperSurfaceCallback mWallpaperSurfaceCallback;
- protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
- protected ViewGroup mLockPreviewContainer;
- protected LockScreenPreviewer mLockScreenPreviewer;
+ protected ImageView mHomePreview;
private Intent mDeleteIntent;
private Intent mSettingsIntent;
+
private SliceView mSettingsSliceView;
private LiveData<Slice> mSettingsLiveData;
+ private View mLoadingScrim;
private Point mScreenSize;
private ViewGroup mPreviewContainer;
private TouchForwardingLayout mTouchForwardingLayout;
private SurfaceView mWallpaperSurface;
- private WallpaperPreviewBitmapTransformation mPreviewBitmapTransformation;
- private Future<Integer> mPlaceholderColorFuture;
+ private WallpaperSurfaceCallback mWallpaperSurfaceCallback;
+ private Optional<Integer> mLastSelectedTabPositionOptional = Optional.empty();
+
+ protected SurfaceView mWorkspaceSurface;
+ protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
+ protected ViewGroup mLockPreviewContainer;
+ protected LockScreenPreviewer2 mLockScreenPreviewer;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
android.app.WallpaperInfo info = mWallpaper.getWallpaperComponent();
- mPlaceholderColorFuture = mWallpaper.computePlaceholderColor(getContext());
String deleteAction = getDeleteAction(info);
if (!TextUtils.isEmpty(deleteAction)) {
@@ -132,8 +131,7 @@
mDeleteIntent.setPackage(info.getPackageName());
mDeleteIntent.putExtra(EXTRA_LIVE_WALLPAPER_INFO, info);
}
- mPreviewBitmapTransformation = new WallpaperPreviewBitmapTransformation(
- requireContext().getApplicationContext(), isRtl());
+
String settingsActivity = getSettingsActivity(info);
if (settingsActivity != null) {
mSettingsIntent = new Intent();
@@ -164,6 +162,9 @@
Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
+ mLoadingScrim = view.findViewById(R.id.loading);
+ setUpLoadingIndicator();
+
Activity activity = requireActivity();
mScreenSize = ScreenSizeCalculator.getInstance().getScreenSize(
activity.getWindowManager().getDefaultDisplay());
@@ -188,20 +189,18 @@
set.applyTo((ConstraintLayout) mPreviewContainer);
mHomePreviewCard = mPreviewContainer.findViewById(R.id.wallpaper_full_preview_card);
- mLockPreviewContainer = mPreviewContainer.findViewById(R.id.lock_screen_preview_container);
- mLockScreenPreviewer = new LockScreenPreviewer(getLifecycle(), getContext(),
- mLockPreviewContainer);
- mLockScreenPreviewer.setDateViewVisibility(!mFullScreenAnimation.isFullScreen());
- mFullScreenAnimation.setFullScreenStatusListener(
- isFullScreen -> mLockScreenPreviewer.setDateViewVisibility(!isFullScreen));
- mWallpaperSurface = mHomePreviewCard.findViewById(R.id.wallpaper_surface);
- mTouchForwardingLayout.setTargetView(mHomePreviewCard);
+ mHomePreview = mHomePreviewCard.findViewById(R.id.wallpaper_preview_image);
+ mTouchForwardingLayout.setTargetView(mHomePreview);
mTouchForwardingLayout.setForwardingEnabled(true);
+ mLockPreviewContainer = mPreviewContainer.findViewById(R.id.lock_screen_preview_container);
+ mLockScreenPreviewer = new LockScreenPreviewer2(getLifecycle(), getContext(),
+ mLockPreviewContainer);
+ mWallpaperSurface = mHomePreviewCard.findViewById(R.id.wallpaper_surface);
mWorkspaceSurface = mHomePreviewCard.findViewById(R.id.workspace_surface);
mWorkspaceSurfaceCallback = createWorkspaceSurfaceCallback(mWorkspaceSurface);
mWallpaperSurfaceCallback = new WallpaperSurfaceCallback(getContext(),
- mHomePreviewCard, mWallpaperSurface, mPlaceholderColorFuture, null);
+ mHomePreview, mWallpaperSurface);
setUpTabs(view.findViewById(R.id.pill_tabs));
@@ -214,7 +213,6 @@
view.removeOnLayoutChangeListener(this);
}
});
-
return view;
}
@@ -226,24 +224,43 @@
renderWorkspaceSurface();
}
+ protected void setUpTabs(TabLayout tabs) {
+ tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.home_screen_message)));
+ tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.lock_screen_message)));
+ tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+ @Override
+ public void onTabSelected(TabLayout.Tab tab) {
+ mLastSelectedTabPositionOptional = Optional.of(tab.getPosition());
+ updateScreenPreview(/* isHomeSelected= */ tab.getPosition() == 0);
+ }
+
+ @Override
+ public void onTabUnselected(TabLayout.Tab tab) {}
+
+ @Override
+ public void onTabReselected(TabLayout.Tab tab) {}
+ });
+
+ // The TabLayout only contains below tabs
+ // 0. Home tab
+ // 1. Lock tab
+ int tabPosition = mLastSelectedTabPositionOptional.orElseGet(() -> mViewAsHome ? 0 : 1);
+ tabs.getTabAt(tabPosition).select();
+ updateScreenPreview(/* isHomeSelected= */ tabPosition == 0);
+ }
+
private void updateWallpaperSurface() {
mWallpaperSurface.getHolder().addCallback(mWallpaperSurfaceCallback);
mWallpaperSurface.setZOrderMediaOverlay(true);
}
- @Override
- protected void updateScreenPreview(boolean isHomeSelected) {
+ private void updateScreenPreview(boolean isHomeSelected) {
mWorkspaceSurface.setVisibility(isHomeSelected ? View.VISIBLE : View.INVISIBLE);
- if (!isHomeSelected) {
- mWorkspaceSurfaceCallback.cleanUp();
- }
mLockPreviewContainer.setVisibility(isHomeSelected ? View.INVISIBLE : View.VISIBLE);
-
- mFullScreenAnimation.setIsHomeSelected(isHomeSelected);
}
private void setupCurrentWallpaperPreview() {
- mHomePreviewCard.setOnTouchListener((v, ev) -> {
+ mHomePreview.setOnTouchListener((v, ev) -> {
if (mWallpaperConnection != null && mWallpaperConnection.getEngine() != null) {
float scaleRatio =
(float) mTouchForwardingLayout.getWidth() / (float) mScreenSize.x;
@@ -284,43 +301,34 @@
mWallpaperConnection.disconnect();
mWallpaperConnection = null;
}
- if (mLockScreenPreviewer != null) {
- mLockScreenPreviewer.release();
- }
mWorkspaceSurfaceCallback.cleanUp();
mWorkspaceSurface.getHolder().removeCallback(mWorkspaceSurfaceCallback);
mWallpaperSurfaceCallback.cleanUp();
mWallpaperSurface.getHolder().removeCallback(mWallpaperSurfaceCallback);
}
- protected void previewLiveWallpaper(ImageView thumbnailView) {
- mWallpaperSurface.post(() -> {
+ private void previewLiveWallpaper(ImageView thumbnailView) {
+ thumbnailView.post(() -> {
Activity activity = getActivity();
if (activity == null) {
return;
}
if (mWallpaperSurfaceCallback.getHomeImageWallpaper() != null) {
- Integer placeholderColor = null;
- try {
- placeholderColor = mPlaceholderColorFuture.get(50, TimeUnit.MILLISECONDS);
- } catch (InterruptedException | ExecutionException | TimeoutException e) {
- Log.i(TAG, "Couldn't obtain placeholder color", e);
- }
mWallpaper.getThumbAsset(activity.getApplicationContext())
- .loadLowResDrawable(activity,
+ .loadPreviewImage(activity,
mWallpaperSurfaceCallback.getHomeImageWallpaper(),
- placeholderColor != null
- ? placeholderColor
- : ResourceUtils.getColorAttr(activity,
- android.R.attr.colorBackground),
- mPreviewBitmapTransformation);
+ ResourceUtils.getColorAttr(getActivity(),
+ android.R.attr.colorSecondary));
}
- setUpLiveWallpaperPreview(mWallpaper);
+
+ setUpLiveWallpaperPreview(mWallpaper, thumbnailView,
+ new ColorDrawable(ResourceUtils.getColorAttr(getActivity(),
+ android.R.attr.colorSecondary)));
});
}
- protected void setUpLiveWallpaperPreview(
- com.android.wallpaper.model.WallpaperInfo homeWallpaper) {
+ private void setUpLiveWallpaperPreview(com.android.wallpaper.model.WallpaperInfo homeWallpaper,
+ ImageView previewView, Drawable thumbnail) {
Activity activity = getActivity();
if (activity == null || activity.isFinishing()) {
return;
@@ -328,6 +336,10 @@
if (mWallpaperConnection != null) {
mWallpaperConnection.disconnect();
}
+ if (thumbnail != null) {
+ thumbnail.setBounds(previewView.getLeft(), previewView.getTop(), previewView.getRight(),
+ previewView.getBottom());
+ }
if (WallpaperConnection.isPreviewAvailable()) {
mWallpaperConnection = new WallpaperConnection(
@@ -343,9 +355,17 @@
homeWallpaper.getThumbAsset(activity),
mLockScreenPreviewer::setColor);
}
- if (mWallpaperConnection != null && !mWallpaperConnection.connect()) {
- mWallpaperConnection = null;
- }
+ mLoadingScrim.post(() -> mLoadingScrim.animate()
+ .alpha(0f)
+ .setStartDelay(50)
+ .setDuration(250)
+ .setInterpolator(AnimationUtils.loadInterpolator(getContext(),
+ android.R.interpolator.fast_out_linear_in))
+ .withEndAction(() -> {
+ if (mWallpaperConnection != null && !mWallpaperConnection.connect()) {
+ mWallpaperConnection = null;
+ }
+ }));
}
private void renderWorkspaceSurface() {
@@ -356,26 +376,23 @@
@Override
protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
super.onBottomActionBarReady(bottomActionBar);
- mBottomActionBar.showActionsOnly(INFORMATION, DELETE, EDIT, CUSTOMIZE, APPLY);
+ mBottomActionBar.showActionsOnly(INFORMATION, DELETE, CUSTOMIZE, APPLY);
mBottomActionBar.setActionClickListener(APPLY, unused -> onSetWallpaperClicked(null));
mBottomActionBar.attachViewToBottomSheetAndBindAction(mWallpaperInfoView, INFORMATION);
- View pillTabsContainer = getView().findViewById(R.id.pill_tabs_container);
// Update target view's accessibility param since it will be blocked by the bottom sheet
// when expanded.
mBottomActionBar.setAccessibilityCallback(new AccessibilityCallback() {
@Override
public void onBottomSheetCollapsed() {
- mPreviewContainer.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
- pillTabsContainer.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
+ mPreviewContainer.setImportantForAccessibility(
+ View.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
@Override
public void onBottomSheetExpanded() {
mPreviewContainer.setImportantForAccessibility(
- IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
- pillTabsContainer.setImportantForAccessibility(
- IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
+ View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
});
final Uri uriSettingsSlice = getSettingsSliceUri(mWallpaper.getWallpaperComponent());
@@ -405,12 +422,6 @@
showDeleteConfirmDialog());
}
mBottomActionBar.show();
- // Action buttons are disabled when live wallpaper is not loaded.
- mBottomActionBar.disableActions();
- // Enable buttons if loaded, or wait for it.
- if (isLoaded()) {
- mBottomActionBar.enableActions();
- }
}
@Override
@@ -419,27 +430,36 @@
if (activity == null) {
return;
}
- mWallpaperSurfaceCallback.getHomeImageWallpaper().animate()
- .setStartDelay(250)
- .setDuration(250)
- .alpha(0f)
- .setInterpolator(ALPHA_OUT)
- .start();
- if (mBottomActionBar != null) {
- mBottomActionBar.enableActions();
- }
+ mLoadingScrim.post(() -> mLoadingScrim.animate()
+ .alpha(0f)
+ .setDuration(250)
+ .setStartDelay(200)
+ .setInterpolator(AnimationUtils.loadInterpolator(activity,
+ android.R.interpolator.fast_out_linear_in))
+ .withEndAction(() -> {
+ if (mLoadingProgressBar != null) {
+ mLoadingProgressBar.hide();
+ }
+ mLoadingScrim.setVisibility(View.GONE);
+ }));
+ final Drawable placeholder = mHomePreview.getDrawable() == null
+ ? new ColorDrawable(ResourceUtils.getColorAttr(getActivity(),
+ android.R.attr.colorSecondary))
+ : mHomePreview.getDrawable();
+ mHomePreview.animate()
+ .setStartDelay(0)
+ .setDuration(150)
+ .setInterpolator(AnimationUtils.loadInterpolator(activity,
+ android.R.interpolator.fast_out_linear_in))
+ .setUpdateListener(value -> placeholder.setAlpha(
+ (int) (255 * (1 - value.getAnimatedFraction()))))
+ .start();
}
@Override
public void onWallpaperColorsChanged(WallpaperColors colors, int displayId) {
mLockScreenPreviewer.setColor(colors);
-
- mFullScreenAnimation.setFullScreenTextColor(
- colors == null || (colors.getColorHints()
- & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0
- ? FullScreenAnimation.FullScreenTextColor.LIGHT
- : FullScreenAnimation.FullScreenTextColor.DARK);
}
@Override
@@ -461,6 +481,11 @@
}
@Override
+ protected int getLoadingIndicatorResId() {
+ return R.id.loading_indicator;
+ }
+
+ @Override
protected void setCurrentWallpaper(int destination) {
mWallpaperSetter.setCurrentWallpaper(getActivity(), mWallpaper, null,
destination, 0, null, new SetWallpaperCallback() {
@@ -502,7 +527,7 @@
@Override
public void onStart() {
super.onStart();
- previewLiveWallpaper(null);
+ previewLiveWallpaper(mHomePreview);
}
@Override
diff --git a/src/com/android/wallpaper/picker/PreviewActivity.java b/src/com/android/wallpaper/picker/PreviewActivity.java
index 31db5e8..3a2b917 100755
--- a/src/com/android/wallpaper/picker/PreviewActivity.java
+++ b/src/com/android/wallpaper/picker/PreviewActivity.java
@@ -49,15 +49,13 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
- enableFullScreen();
-
FragmentManager fm = getSupportFragmentManager();
Fragment fragment = fm.findFragmentById(R.id.fragment_container);
if (fragment == null) {
Intent intent = getIntent();
WallpaperInfo wallpaper = intent.getParcelableExtra(EXTRA_WALLPAPER_INFO);
- boolean viewAsHome = intent.getBooleanExtra(EXTRA_VIEW_AS_HOME, true);
+ boolean viewAsHome = intent.getBooleanExtra(EXTRA_VIEW_AS_HODE, true);
boolean testingModeEnabled = intent.getBooleanExtra(EXTRA_TESTING_MODE_ENABLED, false);
fragment = InjectorProvider.getInjector().getPreviewFragment(
/* context */ this,
diff --git a/src/com/android/wallpaper/picker/PreviewFragment.java b/src/com/android/wallpaper/picker/PreviewFragment.java
index 1249a61..0ff4423 100755
--- a/src/com/android/wallpaper/picker/PreviewFragment.java
+++ b/src/com/android/wallpaper/picker/PreviewFragment.java
@@ -16,28 +16,28 @@
package com.android.wallpaper.picker;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
-import static com.android.wallpaper.widget.BottomActionBar.BottomAction.EDIT;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
+import android.content.res.ColorStateList;
import android.content.res.Resources.NotFoundException;
+import android.content.res.TypedArray;
import android.os.Bundle;
import android.util.Log;
+import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
-import android.view.animation.Interpolator;
-import android.view.animation.PathInterpolator;
-import android.widget.Button;
import android.widget.Toast;
-import androidx.activity.OnBackPressedCallback;
import androidx.annotation.CallSuper;
+import androidx.annotation.IdRes;
import androidx.annotation.IntDef;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
+import androidx.core.widget.ContentLoadingProgressBar;
import androidx.fragment.app.FragmentActivity;
import com.android.wallpaper.R;
@@ -49,14 +49,10 @@
import com.android.wallpaper.module.WallpaperPersister.Destination;
import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.module.WallpaperSetter;
-import com.android.wallpaper.util.FullScreenAnimation;
import com.android.wallpaper.widget.BottomActionBar;
-import com.google.android.material.tabs.TabLayout;
-
import java.util.Date;
import java.util.List;
-import java.util.Optional;
/**
* Base Fragment to display the UI for previewing an individual wallpaper
@@ -65,8 +61,6 @@
SetWallpaperDialogFragment.Listener, SetWallpaperErrorDialogFragment.Listener,
LoadWallpaperErrorDialogFragment.Listener {
- public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f);
-
/**
* User can view wallpaper and attributions in full screen, but "Set wallpaper" button is
* hidden.
@@ -78,7 +72,6 @@
* wallpaper with pan and crop position to the device.
*/
static final int MODE_CROP_AND_SET_WALLPAPER = 1;
- private Optional<Integer> mLastSelectedTabPositionOptional = Optional.empty();
/**
* Possible preview modes for the fragment.
@@ -135,6 +128,7 @@
protected WallpaperSetter mWallpaperSetter;
protected UserEventLogger mUserEventLogger;
protected BottomActionBar mBottomActionBar;
+ protected ContentLoadingProgressBar mLoadingProgressBar;
protected Intent mExploreIntent;
protected CharSequence mActionLabel;
@@ -146,9 +140,12 @@
private SetWallpaperErrorDialogFragment mStagedSetWallpaperErrorDialogFragment;
private LoadWallpaperErrorDialogFragment mStagedLoadWallpaperErrorDialogFragment;
- // For full screen animations.
- protected View mRootView;
- protected FullScreenAnimation mFullScreenAnimation;
+ protected static int getAttrColor(Context context, int attr) {
+ TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+ int colorAccent = ta.getColor(0, 0);
+ ta.recycle();
+ return colorAccent;
+ }
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -166,11 +163,14 @@
mWallpaperSetter = new WallpaperSetter(injector.getWallpaperPersister(appContext),
injector.getPreferences(appContext), mUserEventLogger, mTestingModeEnabled);
+ setHasOptionsMenu(true);
+
Activity activity = getActivity();
List<String> attributions = getAttributions(activity);
if (attributions.size() > 0 && attributions.get(0) != null) {
activity.setTitle(attributions.get(0));
}
+ setRetainInstance(true);
}
@Override
@@ -180,23 +180,8 @@
View view = inflater.inflate(getLayoutResId(), container, false);
setUpToolbar(view);
- mRootView = view;
- mFullScreenAnimation = new FullScreenAnimation(view);
-
- getActivity().getWindow().getDecorView().setOnApplyWindowInsetsListener(
- (v, windowInsets) -> {
- v.setPadding(
- v.getPaddingLeft(),
- 0,
- v.getPaddingRight(),
- 0);
-
- mFullScreenAnimation.setWindowInsets(windowInsets);
- mFullScreenAnimation.placeViews();
- return windowInsets.consumeSystemWindowInsets();
- }
- );
-
+ mLoadingProgressBar = view.findViewById(getLoadingIndicatorResId());
+ mLoadingProgressBar.show();
return view;
}
@@ -205,52 +190,6 @@
super.onBottomActionBarReady(bottomActionBar);
mBottomActionBar = bottomActionBar;
// TODO: Extract the common code here.
- setBottomActionBarAndFullScreenActions();
- }
-
- private void setBottomActionBarAndFullScreenActions() {
- mBottomActionBar.setActionClickListener(EDIT, (view) -> {
- mFullScreenAnimation.startAnimation(/* toFullScreen= */ true);
- mBottomActionBar.deselectAction(EDIT);
- });
-
- // Update the button text for the current workspace visibility.
- Button hideUiPreviewButton = mRootView.findViewById(R.id.hide_ui_preview_button);
- hideUiPreviewButton.setText(mFullScreenAnimation.getWorkspaceVisibility()
- ? R.string.hide_ui_preview_text
- : R.string.show_ui_preview_text);
- hideUiPreviewButton.setOnClickListener(
- (button) -> {
- boolean visible = mFullScreenAnimation.getWorkspaceVisibility();
- // Update the button text for the next workspace visibility.
- ((Button) button).setText(visible
- ? R.string.show_ui_preview_text
- : R.string.hide_ui_preview_text);
- mFullScreenAnimation.setWorkspaceVisibility(!visible);
- }
- );
- mRootView.findViewById(R.id.set_as_wallpaper_button).setOnClickListener(
- this::onSetWallpaperClicked
- );
-
- mFullScreenAnimation.ensureBottomActionBarIsCorrectlyLocated();
-
- OnBackPressedCallback callback = new OnBackPressedCallback(true) {
- @Override
- public void handleOnBackPressed() {
- if (mFullScreenAnimation.isFullScreen()) {
- mFullScreenAnimation.startAnimation(/* toFullScreen= */ false);
- return;
- }
- if (mBottomActionBar != null && !mBottomActionBar.isBottomSheetCollapsed()) {
- mBottomActionBar.collapseBottomSheetIfExpanded();
- return;
- }
- getActivity().finish();
- }
- };
-
- getActivity().getOnBackPressedDispatcher().addCallback(this, callback);
}
protected List<String> getAttributions(Context context) {
@@ -260,6 +199,13 @@
@LayoutRes
protected abstract int getLayoutResId();
+ @IdRes
+ protected abstract int getLoadingIndicatorResId();
+
+ protected int getDeviceDefaultTheme() {
+ return android.R.style.Theme_DeviceDefault;
+ }
+
protected WorkspaceSurfaceHolderCallback createWorkspaceSurfaceCallback(
SurfaceView workspaceSurface) {
return new WorkspaceSurfaceHolderCallback(workspaceSurface, getContext());
@@ -305,6 +251,16 @@
);
}
+ /**
+ * Configure loading indicator with a MaterialProgressDrawable.
+ */
+ protected void setUpLoadingIndicator() {
+ mLoadingProgressBar.setProgressTintList(ColorStateList.valueOf(getAttrColor(
+ new ContextThemeWrapper(requireContext(), getDeviceDefaultTheme()),
+ android.R.attr.colorAccent)));
+ mLoadingProgressBar.show();
+ }
+
protected abstract boolean isLoaded();
@Override
@@ -357,33 +313,6 @@
startActivity(mExploreIntent);
}
- protected void setUpTabs(TabLayout tabs) {
- tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.home_screen_message)));
- tabs.addTab(tabs.newTab().setText(getContext().getString(R.string.lock_screen_message)));
- tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
- @Override
- public void onTabSelected(TabLayout.Tab tab) {
- mLastSelectedTabPositionOptional = Optional.of(tab.getPosition());
- updateScreenPreview(/* isHomeSelected= */ tab.getPosition() == 0);
- }
-
- @Override
- public void onTabUnselected(TabLayout.Tab tab) {}
-
- @Override
- public void onTabReselected(TabLayout.Tab tab) {}
- });
-
- // The TabLayout only contains below tabs
- // 0. Home tab
- // 1. Lock tab
- int tabPosition = mLastSelectedTabPositionOptional.orElseGet(() -> mViewAsHome ? 0 : 1);
- tabs.getTabAt(tabPosition).select();
- updateScreenPreview(/* isHomeSelected= */ tabPosition == 0);
- }
-
- protected abstract void updateScreenPreview(boolean isHomeSelected);
-
/**
* Sets current wallpaper to the device based on current zoom and scroll state.
*
diff --git a/src/com/android/wallpaper/picker/SectionView.java b/src/com/android/wallpaper/picker/SectionView.java
deleted file mode 100644
index 46b4a68..0000000
--- a/src/com/android/wallpaper/picker/SectionView.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.picker;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.LinearLayout;
-
-import androidx.annotation.Nullable;
-
-/** The SectionView base for views hosting in the {@link CustomizationPickerFragment}. */
-public abstract class SectionView extends LinearLayout {
-
- /** The callback for the section view updates. */
- public interface SectionViewListener {
- void onViewActivated(@Nullable Context context, boolean viewActivated);
- }
-
- protected SectionViewListener mSectionViewListener;
- private String mTitle;
-
- public SectionView(Context context, @Nullable AttributeSet attrs) {
- super(context, attrs);
- }
-
- public void setTitle(String title) {
- mTitle = title;
- }
-
- public String getTitle() {
- return mTitle;
- }
-
- /** Sets the listener to the {@code SectionView} instance for reacting the view changes. */
- public void setViewListener(SectionViewListener sectionViewListener) {
- mSectionViewListener = sectionViewListener;
- }
-}
diff --git a/src/com/android/wallpaper/picker/StandalonePreviewActivity.java b/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
index 8651df6..6e873df 100755
--- a/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
+++ b/src/com/android/wallpaper/picker/StandalonePreviewActivity.java
@@ -22,7 +22,6 @@
import android.os.Binder;
import android.os.Bundle;
import android.util.Log;
-import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
@@ -51,8 +50,6 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
- enableFullScreen();
-
mUserEventLogger = InjectorProvider.getInjector().getUserEventLogger(getApplicationContext());
mUserEventLogger.logStandalonePreviewLaunched();
@@ -125,14 +122,6 @@
return false;
}
- @Override
- protected void enableFullScreen() {
- super.enableFullScreen();
- getWindow().setFlags(
- WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
- WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
- }
-
/**
* Creates a new instance of {@link PreviewFragment} and loads the fragment into this activity's
* fragment container so that it's shown to the user.
diff --git a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
index 390daf3..f55a2f3 100755
--- a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
+++ b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
@@ -425,7 +425,7 @@
// tab for a category not yet repopulated.
mLastSelectedCategoryTabIndex = -1;
- mDelegate.populateCategories(/* forceRefresh= */ true);
+ mDelegate.populateCategories(true /* forceCategoryRefresh */);
setDesktopLoading(false);
setCurrentWallpapersExpanded(false);
diff --git a/src/com/android/wallpaper/picker/ViewOnlyPreviewActivity.java b/src/com/android/wallpaper/picker/ViewOnlyPreviewActivity.java
index 67bb943..4710f21 100755
--- a/src/com/android/wallpaper/picker/ViewOnlyPreviewActivity.java
+++ b/src/com/android/wallpaper/picker/ViewOnlyPreviewActivity.java
@@ -44,15 +44,18 @@
protected static Intent newIntent(Context context, WallpaperInfo wallpaper,
boolean isVewAsHome) {
- return newIntent(context, wallpaper).putExtra(EXTRA_VIEW_AS_HOME, isVewAsHome);
+ return newIntent(context, wallpaper).putExtra(EXTRA_VIEW_AS_HODE, isVewAsHome);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
+ }
- enableFullScreen();
+ @Override
+ public void onAttachedToWindow() {
+ super.onAttachedToWindow();
FragmentManager fm = getSupportFragmentManager();
Fragment fragment = fm.findFragmentById(R.id.fragment_container);
@@ -61,7 +64,7 @@
Intent intent = getIntent();
WallpaperInfo wallpaper = intent.getParcelableExtra(EXTRA_WALLPAPER_INFO);
boolean testingModeEnabled = intent.getBooleanExtra(EXTRA_TESTING_MODE_ENABLED, false);
- boolean viewAsHome = intent.getBooleanExtra(EXTRA_VIEW_AS_HOME, true);
+ boolean viewAsHome = intent.getBooleanExtra(EXTRA_VIEW_AS_HODE, true);
fragment = InjectorProvider.getInjector().getPreviewFragment(
/* context */ this,
wallpaper,
diff --git a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
index adb9e54..273f0a6 100644
--- a/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
+++ b/src/com/android/wallpaper/picker/WallpaperPickerDelegate.java
@@ -117,7 +117,7 @@
if (mDownloadableIntentAction != null) {
mDownloadableWallpaperStatusListener = (packageName, status) -> {
if (status != PackageStatusNotifier.PackageStatus.REMOVED) {
- populateCategories(/* forceRefresh= */ true);
+ populateCategories(true);
}
};
mPackageStatusNotifier.addListener(
@@ -206,7 +206,7 @@
}
} else {
// CHANGED package, let's reload all categories as we could have more or fewer now
- populateCategories(/* forceRefresh= */ true);
+ populateCategories(true);
}
}
@@ -263,7 +263,7 @@
* they're cached when loading later.
*/
public void prefetchCategories() {
- boolean forceRefresh = mCategoryProvider.resetIfNeeded();
+ mCategoryProvider.resetIfNeeded();
mCategoryProvider.fetchCategories(new CategoryReceiver() {
@Override
public void onCategoryReceived(Category category) {
@@ -274,7 +274,7 @@
public void doneFetchingCategories() {
// Do nothing
}
- }, forceRefresh);
+ }, false);
}
/**
@@ -487,14 +487,13 @@
imageWallpaper.showPreview(mActivity, getPreviewIntentFactory(),
PREVIEW_WALLPAPER_REQUEST_CODE);
return false;
- case PREVIEW_LIVE_WALLPAPER_REQUEST_CODE:
- mWallpaperPersister.onLiveWallpaperSet();
- populateCategories(/* forceRefresh= */ true);
- // Fall through.
case VIEW_ONLY_PREVIEW_WALLPAPER_REQUEST_CODE:
// Fall through.
case PREVIEW_WALLPAPER_REQUEST_CODE:
+ // Fall through.
+ case PREVIEW_LIVE_WALLPAPER_REQUEST_CODE:
// User previewed and selected a wallpaper, so finish this activity.
+ mWallpaperPersister.onLiveWallpaperSet();
return true;
default:
return false;
diff --git a/src/com/android/wallpaper/picker/WallpaperPreviewBitmapTransformation.java b/src/com/android/wallpaper/picker/WallpaperPreviewBitmapTransformation.java
index fa5dea5..b8c51b9 100755
--- a/src/com/android/wallpaper/picker/WallpaperPreviewBitmapTransformation.java
+++ b/src/com/android/wallpaper/picker/WallpaperPreviewBitmapTransformation.java
@@ -18,7 +18,6 @@
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Point;
-import android.graphics.Rect;
import android.view.WindowManager;
import androidx.annotation.NonNull;
@@ -57,25 +56,16 @@
float scale = WallpaperCropUtils.calculateMinZoom(
new Point(toTransform.getWidth(), toTransform.getHeight()),
mScreenSize);
- Rect originalSize = new Rect(0, 0, toTransform.getWidth(),
- toTransform.getHeight());
Point scaledThumbnailSize = new Point(Math.round(toTransform.getWidth() * scale),
Math.round(toTransform.getHeight() * scale));
Point scaledThumbnailToScreenSize = WallpaperCropUtils.calculateCenterPosition(
scaledThumbnailSize, mScreenSize, false /* alignStart */, mIsRtl);
- int x = Math.round(scaledThumbnailToScreenSize.x / scale);
- int y = Math.round(scaledThumbnailToScreenSize.y / scale);
- Rect cropSize = new Rect(x, y, x + Math.round(mScreenSize.x / scale),
- y + Math.round(mScreenSize.y / scale));
- Bitmap cropped;
- if (!originalSize.contains(cropSize)) {
- // If crop size is not smaller than original, then use the original bitmap
- cropped = toTransform;
- } else {
- cropped = Bitmap.createBitmap(toTransform, cropSize.left, cropSize.top,
- cropSize.width(), cropSize.height());
- }
+ Bitmap cropped = Bitmap.createBitmap(toTransform,
+ Math.round(scaledThumbnailToScreenSize.x / scale),
+ Math.round(scaledThumbnailToScreenSize.y / scale),
+ Math.round(mScreenSize.x / scale),
+ Math.round(mScreenSize.y / scale));
return BitmapProcessor.blur(mContext, cropped, cropped.getWidth(), cropped.getHeight());
}
diff --git a/src/com/android/wallpaper/picker/WallpaperSectionView.java b/src/com/android/wallpaper/picker/WallpaperSectionView.java
deleted file mode 100644
index ad97570..0000000
--- a/src/com/android/wallpaper/picker/WallpaperSectionView.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.picker;
-
-import android.app.Activity;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.ViewGroup;
-
-import androidx.cardview.widget.CardView;
-
-import com.android.wallpaper.R;
-import com.android.wallpaper.util.ScreenSizeCalculator;
-import com.android.wallpaper.util.SizeCalculator;
-
-/** The wallpaper section view in the customization picker fragment. */
-public final class WallpaperSectionView extends SectionView {
-
- private CardView mHomePreviewCard;
- private CardView mLockscreenPreviewCard;
-
- public WallpaperSectionView(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- matchDeviceShape(mHomePreviewCard);
- matchDeviceShape(mLockscreenPreviewCard);
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
- mHomePreviewCard = findViewById(R.id.home_preview);
- mLockscreenPreviewCard = findViewById(R.id.lock_preview);
-
- // Disable the shadows of these card views.
- mHomePreviewCard.setCardElevation(0);
- mLockscreenPreviewCard.setCardElevation(0);
- }
-
- private void matchDeviceShape(CardView cardView) {
- // Match device aspect ratio
- float screenAspectRatio =
- ScreenSizeCalculator.getInstance().getScreenAspectRatio(getContext());
- int cardWidth = cardView.getMeasuredWidth();
- int cardHeight = (int) (cardWidth * screenAspectRatio);
- ViewGroup.LayoutParams layoutParams = cardView.getLayoutParams();
- layoutParams.height = cardHeight;
-
- // Match device corner
- cardView.setRadius(
- SizeCalculator.getPreviewCornerRadius((Activity) getContext(), cardWidth));
- }
-}
diff --git a/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java b/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
index c469820..e8780e9 100644
--- a/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
+++ b/src/com/android/wallpaper/picker/WorkspaceSurfaceHolderCallback.java
@@ -20,7 +20,6 @@
import android.os.Bundle;
import android.os.Message;
import android.os.RemoteException;
-import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
@@ -31,33 +30,18 @@
import com.android.wallpaper.util.PreviewUtils;
import com.android.wallpaper.util.SurfaceViewUtils;
-import java.util.concurrent.atomic.AtomicBoolean;
-
/** A surface holder callback that renders user's workspace on the passed in surface view. */
public class WorkspaceSurfaceHolderCallback implements SurfaceHolder.Callback {
- /**
- * Listener to be called when workspace surface is updated with a new Surface Package.
- */
- public interface WorkspaceRenderListener {
- /**
- * Called on the main thread after the workspace surface is updated from the provider
- */
- void onWorkspaceRendered();
- }
-
- private static final String TAG = "WsSurfaceHolderCallback";
private static final String KEY_WALLPAPER_COLORS = "wallpaper_colors";
private final SurfaceView mWorkspaceSurface;
private final PreviewUtils mPreviewUtils;
private final boolean mShouldUseWallpaperColors;
- private final AtomicBoolean mRequestPending = new AtomicBoolean(false);
private WallpaperColors mWallpaperColors;
private boolean mIsWallpaperColorsReady;
private Surface mLastSurface;
private Message mCallback;
- private WorkspaceRenderListener mListener;
private boolean mNeedsToCleanUp;
@@ -107,54 +91,39 @@
maybeRenderPreview();
}
- public void setListener(WorkspaceRenderListener listener) {
- mListener = listener;
- }
-
private void maybeRenderPreview() {
if ((mShouldUseWallpaperColors && !mIsWallpaperColorsReady) || mLastSurface == null) {
return;
}
+ Bundle result = requestPreview(mWorkspaceSurface);
+ if (result != null) {
+ mWorkspaceSurface.setChildSurfacePackage(
+ SurfaceViewUtils.getSurfacePackage(result));
+ mCallback = SurfaceViewUtils.getCallback(result);
- mRequestPending.set(true);
- requestPreview(mWorkspaceSurface, (result) -> {
- mRequestPending.set(false);
- if (result != null && mLastSurface != null) {
- mWorkspaceSurface.setChildSurfacePackage(
- SurfaceViewUtils.getSurfacePackage(result));
-
- mCallback = SurfaceViewUtils.getCallback(result);
-
- if (mNeedsToCleanUp) {
- cleanUp();
- } else if (mListener != null) {
- mListener.onWorkspaceRendered();
- }
+ if (mNeedsToCleanUp) {
+ cleanUp();
}
- });
+ }
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { }
@Override
- public void surfaceDestroyed(SurfaceHolder holder) {
- }
+ public void surfaceDestroyed(SurfaceHolder holder) { }
public void cleanUp() {
if (mCallback != null) {
try {
mCallback.replyTo.send(mCallback);
- mNeedsToCleanUp = false;
} catch (RemoteException e) {
- Log.w(TAG, "Couldn't call cleanup on workspace preview", e);
+ e.printStackTrace();
} finally {
mCallback = null;
}
} else {
- if (mRequestPending.get()) {
- mNeedsToCleanUp = true;
- }
+ mNeedsToCleanUp = true;
}
}
@@ -162,12 +131,11 @@
mLastSurface = null;
}
- protected void requestPreview(SurfaceView workspaceSurface,
- PreviewUtils.WorkspacePreviewCallback callback) {
+ protected Bundle requestPreview(SurfaceView workspaceSurface) {
Bundle request = SurfaceViewUtils.createSurfaceViewRequest(workspaceSurface);
if (mWallpaperColors != null) {
request.putParcelable(KEY_WALLPAPER_COLORS, mWallpaperColors);
}
- mPreviewUtils.renderPreview(request, callback);
+ return mPreviewUtils.renderPreview(request);
}
}
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
index 97c2eaa..85171d6 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -42,7 +42,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.cardview.widget.CardView;
import androidx.core.widget.ContentLoadingProgressBar;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
@@ -120,8 +119,6 @@
static final int SPECIAL_FIXED_TILE_ADAPTER_POSITION = 0;
static final String ARG_CATEGORY_COLLECTION_ID = "category_collection_id";
- protected static final int MAX_CAPACITY_IN_FEWER_COLUMN_LAYOUT = 8;
-
private static final String TAG = "IndividualPickerFrgmnt";
private static final int UNUSED_REQUEST_CODE = 1;
private static final String TAG_START_ROTATION_DIALOG = "start_rotation_dialog";
@@ -131,6 +128,7 @@
private static final String TAG_SET_WALLPAPER_ERROR_DIALOG_FRAGMENT =
"individual_set_wallpaper_error_dialog";
private static final String KEY_NIGHT_MODE = "IndividualPickerFragment.NIGHT_MODE";
+ private static final int MAX_CAPACITY_IN_FEWER_COLUMN_LAYOUT = 8;
/**
* An interface for updating the thumbnail with the specific wallpaper.
@@ -582,23 +580,10 @@
if (mCategory == null) {
return;
}
-
- // Wallpaper count could change, so we may need to change the layout(2 or 3 columns layout)
- GridLayoutManager gridLayoutManager = (GridLayoutManager) mImageGrid.getLayoutManager();
- boolean needUpdateLayout =
- gridLayoutManager != null && gridLayoutManager.getSpanCount() != getNumColumns();
-
- // Skip if the adapter was already created and don't need to change the layout
- if (mAdapter != null && !needUpdateLayout) {
+ // Skip if the adapter was already created
+ if (mAdapter != null) {
return;
}
-
- // Clear the old decoration
- int decorationCount = mImageGrid.getItemDecorationCount();
- for (int i = 0; i < decorationCount; i++) {
- mImageGrid.removeItemDecorationAt(i);
- }
-
mImageGrid.addItemDecoration(new GridPaddingDecoration(getGridItemPaddingHorizontal(),
getGridItemPaddingBottom()));
int edgePadding = getEdgePadding();
@@ -613,7 +598,7 @@
mImageGrid, (BottomSheetHost) getParentFragment(), getNumColumns()));
}
- boolean isFewerColumnLayout() {
+ private boolean isFewerColumnLayout() {
return mWallpapers != null && mWallpapers.size() <= MAX_CAPACITY_IN_FEWER_COLUMN_LAYOUT;
}
@@ -1157,7 +1142,7 @@
}
}
- boolean shouldShowRotationTile() {
+ private boolean shouldShowRotationTile() {
return mFormFactor == FormFactorChecker.FORM_FACTOR_DESKTOP && isRotationEnabled();
}
@@ -1431,19 +1416,16 @@
int wallpaperIndex = (shouldShowRotationTile() || mCategory.supportsCustomPhotos())
? position - 1 : position;
WallpaperInfo wallpaper = mWallpapers.get(wallpaperIndex);
- wallpaper.computePlaceholderColor(holder.itemView.getContext());
((IndividualHolder) holder).bindWallpaper(wallpaper);
boolean isWallpaperApplied = mAppliedWallpaperIds.contains(wallpaper.getWallpaperId());
+ boolean isWallpaperSelected = wallpaper.equals(mSelectedWallpaperInfo);
+ boolean hasUserSelectedWallpaper = mSelectedWallpaperInfo != null;
if (isWallpaperApplied) {
mSelectedAdapterPosition = position;
mAppliedWallpaperInfo = wallpaper;
}
- CardView container = holder.itemView.findViewById(R.id.wallpaper_container);
- int radiusId = isFewerColumnLayout() ? R.dimen.grid_item_all_radius
- : R.dimen.grid_item_all_radius_small;
- container.setRadius(getResources().getDimension(radiusId));
CustomShapeImageView thumbnail = holder.itemView.findViewById(R.id.thumbnail);
thumbnail.setClipped(isWallpaperApplied);
}
diff --git a/src/com/android/wallpaper/util/ActivityUtils.java b/src/com/android/wallpaper/util/ActivityUtils.java
index eb2adb2..833e60a 100755
--- a/src/com/android/wallpaper/util/ActivityUtils.java
+++ b/src/com/android/wallpaper/util/ActivityUtils.java
@@ -15,7 +15,6 @@
*/
package com.android.wallpaper.util;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SETTINGS_SEARCH;
import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_SETTINGS;
import static com.android.wallpaper.util.LaunchSourceUtils.WALLPAPER_LAUNCH_SOURCE;
@@ -60,35 +59,17 @@
}
/**
- * Returns true if wallpaper launch source is from Settings related.
+ * Return true if wallpaper launch source is from Settings.
*
* @param intent activity intent.
*/
- public static boolean isLaunchedFromSettingsRelated(Intent intent) {
- return isLaunchedFromSettings(intent) || isLaunchedFromSettingsSearch(intent);
- }
-
- /**
- * Returns true if wallpaper launch source is from Settings.
- *
- * @param intent activity intent.
- */
- private static boolean isLaunchedFromSettings(Intent intent) {
+ public static boolean isLaunchedFromSettings(Intent intent) {
return (intent != null && TextUtils.equals(LAUNCH_SOURCE_SETTINGS,
intent.getStringExtra(WALLPAPER_LAUNCH_SOURCE)));
}
/**
- * Returns true if wallpaper launch source is from Settings Search.
- *
- * @param intent activity intent.
- */
- public static boolean isLaunchedFromSettingsSearch(Intent intent) {
- return (intent != null && intent.hasExtra(LAUNCH_SETTINGS_SEARCH));
- }
-
- /**
- * Returns true if wallpaper is in SUW mode.
+ * Return true if wallpaper is in SUW mode.
*
* @param context activity's context.
*/
diff --git a/src/com/android/wallpaper/util/FullScreenAnimation.java b/src/com/android/wallpaper/util/FullScreenAnimation.java
deleted file mode 100644
index b3dd69e..0000000
--- a/src/com/android/wallpaper/util/FullScreenAnimation.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.wallpaper.util;
-
-import android.animation.Animator;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
-import android.content.res.TypedArray;
-import android.graphics.Insets;
-import android.graphics.Point;
-import android.graphics.Rect;
-import android.view.Gravity;
-import android.view.SurfaceView;
-import android.view.View;
-import android.view.WindowInsets;
-import android.widget.Button;
-import android.widget.FrameLayout;
-import android.widget.ImageButton;
-import android.widget.TextView;
-import android.widget.Toolbar;
-
-import androidx.cardview.widget.CardView;
-
-import com.android.wallpaper.R;
-import com.android.wallpaper.picker.TouchForwardingLayout;
-
-import com.google.android.material.appbar.AppBarLayout;
-
-/**
- * A class storing information about a preview fragment's full-screen layout.
- *
- * Used for {@code ImagePreviewFragment} and {@code LivePreviewFragment}.
- */
-public class FullScreenAnimation {
-
- private final View mView;
- private final TouchForwardingLayout mTouchForwardingLayout;
- private final SurfaceView mWorkspaceSurface;
- private boolean mIsFullScreen = false;
-
- private boolean mScaleIsSet = false;
- private boolean mWorkspaceVisibility = true;
- private float mOffsetY;
- private float mScale;
- private float mDefaultRadius;
- private int mWorkspaceWidth;
- private int mWorkspaceHeight;
- private float mBottomActionBarTranslation;
- private float mPillButtonsTranslation;
- private int mStatusBarHeight;
- private int mNavigationBarHeight;
- private FullScreenStatusListener mFullScreenStatusListener;
-
- private static final float HIDE_ICONS_TOP_RATIO = 0.2f;
-
- private boolean mIsHomeSelected = true;
-
- /**
- * Options for the full-screen text color.
- *
- * {@code DEFAULT} represents the default text color.
- * {@code DARK} represents a text color that is dark, and should be used when the wallpaper
- * supports dark text.
- * {@code LIGHT} represents a text color that is light, and should be used when the wallpaper
- * does not support dark text.
- */
- public enum FullScreenTextColor {
- DEFAULT,
- DARK,
- LIGHT
- }
-
- FullScreenTextColor mFullScreenTextColor = FullScreenTextColor.DEFAULT;
- private int mCurrentTextColor;
-
- /** Callback for full screen status. */
- public interface FullScreenStatusListener {
- /** Gets called at animation end when full screen status gets changed. */
- void onFullScreenStatusChange(boolean isFullScreen);
- }
-
- /**
- * Constructor.
- *
- * @param view The view containing all relevant UI elements. Equal to {@code mRootView}.
- */
- public FullScreenAnimation(View view) {
- mView = view;
- mTouchForwardingLayout = view.findViewById(R.id.touch_forwarding_layout);
- mWorkspaceSurface = view.findViewById(R.id.workspace_surface);
- mCurrentTextColor = ResourceUtils.getColorAttr(
- view.getContext(),
- android.R.attr.textColorPrimary);
- }
-
- /**
- * Returns if the preview layout is currently in full screen.
- *
- * @return whether the preview layout is currently in full screen.
- */
- public boolean isFullScreen() {
- return mIsFullScreen;
- }
-
- /**
- * Informs this object whether the home tab is selected.
- *
- * Used to determine the visibility of {@code lock_screen_preview_container}.
- *
- * @param isHomeSelected whether the home tab is selected.
- */
- public void setIsHomeSelected(boolean isHomeSelected) {
- mIsHomeSelected = isHomeSelected;
- }
-
- private int getStatusBarHeight() {
- return mStatusBarHeight;
- }
-
- private int getNavigationBarHeight() {
- return mNavigationBarHeight;
- }
-
- private int getAttributeDimension(int resId) {
- final TypedArray attributes = mView.getContext().getTheme().obtainStyledAttributes(
- new int[]{resId});
- int dimension = attributes.getDimensionPixelSize(0, 0);
- attributes.recycle();
- return dimension;
- }
-
- private void setViewMargins(int viewId, float marginTop, float marginBottom, boolean pillTabs) {
- FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
- FrameLayout.LayoutParams.MATCH_PARENT,
- pillTabs ? FrameLayout.LayoutParams.WRAP_CONTENT
- : FrameLayout.LayoutParams.MATCH_PARENT);
-
- layoutParams.setMargins(0, Math.round(marginTop), 0, Math.round(marginBottom));
-
- if (pillTabs) {
- layoutParams.gravity = Gravity.BOTTOM;
- }
-
- mView.findViewById(viewId).setLayoutParams(layoutParams);
- }
-
- /** Sets a {@param listener} to listen full screen state changes. */
- public void setFullScreenStatusListener(FullScreenStatusListener listener) {
- mFullScreenStatusListener = listener;
- }
-
- /**
- * Informs the {@code FullScreenAnimation} object about the window insets of the current
- * window.
- *
- * Called by a {@code View.OnApplyWindowInsetsListener} defined in {@code PreviewFragment}.
- *
- * @param windowInsets the window insets of the current window.
- */
- public void setWindowInsets(WindowInsets windowInsets) {
- Insets insets = windowInsets.getInsetsIgnoringVisibility(
- WindowInsets.Type.systemBars()
- );
-
- mStatusBarHeight = insets.top;
- mNavigationBarHeight = insets.bottom;
- }
-
- /**
- * Place UI elements in the correct locations.
- *
- * Takes status bar and navigation bar into account.
- */
- public void placeViews() {
- setViewMargins(R.id.screen_preview_layout,
- getStatusBarHeight() + getAttributeDimension(R.attr.actionBarSize),
- getNavigationBarHeight()
- + mView.getResources().getDimension(R.dimen.bottom_actions_height)
- + mView.getResources().getDimension(R.dimen.pill_tabs_height),
- false);
- setViewMargins(R.id.bottom_action_bar_container,
- 0,
- getNavigationBarHeight(),
- false);
- setViewMargins(R.id.pill_tabs_container,
- 0,
- getNavigationBarHeight()
- + mView.getResources().getDimension(R.dimen.bottom_actions_height),
- true);
- ensureToolbarIsCorrectlyLocated();
- }
-
- /**
- * Ensures that the bottom action bar is in the correct location.
- *
- * Called by {@code onBottomActionBarReady}, so that the bottom action bar is correctly located
- * when it is redrawn.
- */
- public void ensureBottomActionBarIsCorrectlyLocated() {
- float targetTranslation = mIsFullScreen ? mBottomActionBarTranslation : 0;
- mView.findViewById(R.id.bottom_actionbar).setTranslationY(targetTranslation);
- }
-
- /**
- * Ensures that the toolbar is in the correct location.
- *
- * Called by {@code placeViews}, {@code ImageWallpaperColorThemePreviewFragment#updateToolBar},
- * and @{code LiveWallpaperColorThemePreviewFragment#updateToolBar}, so that the toolbar is
- * correctly located when it is redrawn.
- */
- public void ensureToolbarIsCorrectlyLocated() {
- AppBarLayout.LayoutParams layoutParams = new AppBarLayout.LayoutParams(
- AppBarLayout.LayoutParams.MATCH_PARENT,
- AppBarLayout.LayoutParams.MATCH_PARENT);
-
- layoutParams.setMargins(0, getStatusBarHeight(), 0, 0);
-
- mView.findViewById(R.id.toolbar).setLayoutParams(layoutParams);
- }
-
- /**
- * Ensures that the text and the navigation button on the toolbar is given the correct color.
- *
- * Called by {@code updateToolBar}.
- */
- public void ensureToolbarIsCorrectlyColored() {
- TextView textView = mView.findViewById(R.id.custom_toolbar_title);
- textView.setTextColor(mCurrentTextColor);
-
- Toolbar toolbar = mView.findViewById(R.id.toolbar);
- // It may be null because there's no back arrow in some cases. For example: no back arrow
- // for Photos launching case.
- ImageButton button = (ImageButton) toolbar.getNavigationView();
- if (button != null) {
- button.setColorFilter(mCurrentTextColor);
- }
- }
-
- /**
- * Sets the text color used for the "Preview" caption in full screen mode.
- *
- * @param fullScreenTextColor The desired color for the "Preview" caption in full screen mode.
- */
- public void setFullScreenTextColor(FullScreenTextColor fullScreenTextColor) {
- mFullScreenTextColor = fullScreenTextColor;
-
- animateColor(mIsFullScreen);
- }
-
- /**
- * Sets the visibility of the workspace surface (containing icons from the home screen) and
- * the elements unique to the lock screen (date and time).
- *
- * Called when the "Hide UI Preview" button is clicked.
- *
- * @param visible {@code true} if the icons should be shown;
- * {@code false} if they should be hidden.
- */
- public void setWorkspaceVisibility(boolean visible) {
- // Not using [setVisibility], because it creates a "jump".
- if (visible) {
- mWorkspaceSurface.setClipBounds(new Rect(
- 0,
- Math.round(mWorkspaceHeight * HIDE_ICONS_TOP_RATIO),
- mWorkspaceWidth,
- mWorkspaceHeight + Math.round(mPillButtonsTranslation / mScale)));
- mView.findViewById(R.id.lock_screen_preview_container).setVisibility(View.VISIBLE);
- } else {
- int half = mWorkspaceHeight / 2;
- mWorkspaceSurface.setClipBounds(new Rect(
- 0,
- half,
- mWorkspaceWidth,
- half + 1));
- mView.findViewById(R.id.lock_screen_preview_container).setVisibility(View.INVISIBLE);
- }
- if (mIsHomeSelected) {
- mView.findViewById(R.id.lock_screen_preview_container).setVisibility(View.INVISIBLE);
- }
- mWorkspaceVisibility = visible;
- }
-
- /**
- * Returns the visibility of the workspace surface (containing icons from the home screen).
- *
- * @return the visibility of the workspace surface.
- */
- public boolean getWorkspaceVisibility() {
- return mWorkspaceVisibility;
- }
-
- private void animateColor(boolean toFullScreen) {
- TextView textView = mView.findViewById(R.id.custom_toolbar_title);
-
- int targetColor;
- if (!toFullScreen || mFullScreenTextColor == FullScreenTextColor.DEFAULT) {
- targetColor = ResourceUtils.getColorAttr(
- mView.getContext(),
- android.R.attr.textColorPrimary);
- } else if (mFullScreenTextColor == FullScreenTextColor.DARK) {
- targetColor = mView.getContext().getColor(android.R.color.black);
- } else {
- targetColor = mView.getContext().getColor(android.R.color.white);
- }
-
- if (targetColor == mCurrentTextColor) {
- return;
- }
-
- Toolbar toolbar = mView.findViewById(R.id.toolbar);
- ImageButton button = (ImageButton) toolbar.getNavigationView();
-
- ValueAnimator colorAnimator = ValueAnimator.ofArgb(mCurrentTextColor, targetColor);
- colorAnimator.addUpdateListener(animation -> {
- int color = (int) animation.getAnimatedValue();
- textView.setTextColor(color);
- // It may be null because there's no back arrow in some cases. For example: no back
- // arrow for Photos launching case.
- if (button != null) {
- button.setColorFilter(color);
- }
- });
- colorAnimator.start();
-
- mCurrentTextColor = targetColor;
- }
-
- /**
- * Animates the layout to or from fullscreen.
- *
- * @param toFullScreen {@code true} if animating into the full screen layout;
- * {@code false} if animating out of the full screen layout.
- */
- public void startAnimation(boolean toFullScreen) {
- // If there is no need to animate, return.
- if (toFullScreen == mIsFullScreen) {
- return;
- }
-
- // If the scale is not set, compute the location and size of frame layout.
- if (!mScaleIsSet) {
- int[] loc = new int[2];
- mTouchForwardingLayout.getLocationInWindow(loc);
-
- ScreenSizeCalculator screenSizeCalculator = ScreenSizeCalculator.getInstance();
- Point screenSize = screenSizeCalculator.getScreenSize(mView.getDisplay());
- int screenWidth = screenSize.x;
- int screenHeight = screenSize.y;
-
- mOffsetY = (float) (screenHeight / 2.0
- - (loc[1] + mTouchForwardingLayout.getHeight() / 2.0));
-
- mScale = Math.max(
- screenWidth / (float) mTouchForwardingLayout.getWidth(),
- screenHeight / (float) mTouchForwardingLayout.getHeight());
-
- mDefaultRadius = ((CardView) mWorkspaceSurface.getParent()).getRadius();
-
- mWorkspaceSurface.setEnableSurfaceClipping(true);
-
- mWorkspaceWidth = mWorkspaceSurface.getWidth();
- mWorkspaceHeight = mWorkspaceSurface.getHeight();
-
- mBottomActionBarTranslation = getNavigationBarHeight()
- + mView.getResources().getDimension(R.dimen.bottom_actions_height)
- + mView.getResources().getDimension(R.dimen.pill_tabs_height);
-
- mPillButtonsTranslation = -(getNavigationBarHeight()
- + mView.getResources().getDimension(
- R.dimen.fullscreen_preview_button_margin_bottom)
- + mView.getResources().getDimension(R.dimen.pill_tabs_height));
-
- mScaleIsSet = true;
- }
-
- // Perform animations.
-
- // Rounding animation.
- // Animated version of ((CardView) mWorkspaceSurface.getParent()).setRadius(0);
- float fromRadius = toFullScreen ? mDefaultRadius : 0f;
- float toRadius = toFullScreen ? 0f : mDefaultRadius;
-
- ValueAnimator animationRounding = ValueAnimator.ofFloat(fromRadius, toRadius);
- animationRounding.addUpdateListener(animation -> {
- ((CardView) mWorkspaceSurface.getParent()).setRadius(
- (float) animation.getAnimatedValue());
- });
-
- // Animation to hide some of the home screen icons.
- float fromTop = toFullScreen ? 0f : HIDE_ICONS_TOP_RATIO;
- float toTop = toFullScreen ? HIDE_ICONS_TOP_RATIO : 0f;
- float fromBottom = toFullScreen ? 0 : mPillButtonsTranslation / mScale;
- float toBottom = toFullScreen ? mPillButtonsTranslation / mScale : 0;
-
- ValueAnimator animationHide = ValueAnimator.ofFloat(0f, 1f);
- animationHide.addUpdateListener(animation -> {
- float t = (float) animation.getAnimatedValue();
- float top = fromTop + t * (toTop - fromTop);
- float bottom = fromBottom + t * (toBottom - fromBottom);
- mWorkspaceSurface.setClipBounds(new Rect(
- 0,
- Math.round(mWorkspaceHeight * top),
- mWorkspaceWidth,
- mWorkspaceHeight + Math.round(bottom)));
- });
-
- // Other animations.
- float scale = toFullScreen ? mScale : 1f;
- float offsetY = toFullScreen ? mOffsetY : 0f;
- float bottomActionBarTranslation = toFullScreen ? mBottomActionBarTranslation : 0;
- float pillButtonsTranslation = toFullScreen ? mPillButtonsTranslation : 0;
- View frameLayout = mView.findViewById(R.id.screen_preview_layout);
-
- AnimatorSet animatorSet = new AnimatorSet();
- animatorSet.playTogether(
- ObjectAnimator.ofFloat(frameLayout, "scaleX", scale),
- ObjectAnimator.ofFloat(frameLayout, "scaleY", scale),
- ObjectAnimator.ofFloat(frameLayout, "translationY", offsetY),
- ObjectAnimator.ofFloat(mView.findViewById(R.id.bottom_actionbar),
- "translationY", bottomActionBarTranslation),
- ObjectAnimator.ofFloat(mView.findViewById(R.id.pill_tabs_container),
- "translationY", bottomActionBarTranslation),
- ObjectAnimator.ofFloat(mView.findViewById(R.id.fullscreen_buttons_container),
- "translationY", pillButtonsTranslation),
- animationRounding,
- animationHide
- );
- animatorSet.addListener(new Animator.AnimatorListener() {
- @Override
- public void onAnimationCancel(Animator animator) {}
-
- @Override
- public void onAnimationEnd(Animator animator) {
- if (mFullScreenStatusListener != null) {
- mFullScreenStatusListener.onFullScreenStatusChange(toFullScreen);
- }
- }
-
- @Override
- public void onAnimationRepeat(Animator animator) {}
-
- @Override
- public void onAnimationStart(Animator animator) {}
- });
- animatorSet.start();
-
- animateColor(toFullScreen);
-
- // Changes appearances of some elements.
- mWorkspaceVisibility = true;
-
- if (toFullScreen) {
- ((Button) mView.findViewById(R.id.hide_ui_preview_button)).setText(
- R.string.hide_ui_preview_text
- );
- }
-
- mView.findViewById(R.id.lock_screen_preview_container).setVisibility(View.VISIBLE);
- if (mIsHomeSelected) {
- mView.findViewById(R.id.lock_screen_preview_container)
- .setVisibility(View.INVISIBLE);
- }
-
- mIsFullScreen = toFullScreen;
- }
-}
diff --git a/src/com/android/wallpaper/util/LaunchUtils.java b/src/com/android/wallpaper/util/LaunchUtils.java
deleted file mode 100644
index 1f4dd6e..0000000
--- a/src/com/android/wallpaper/util/LaunchUtils.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.util;
-
-import android.content.Context;
-import android.content.Intent;
-
-/** Util class for launching activity. */
-public class LaunchUtils {
-
- /** Goes to Launcher's Home. */
- public static void launchHome(Context context) {
- Intent launcherIntent = new Intent(Intent.ACTION_MAIN);
- launcherIntent.addCategory(Intent.CATEGORY_HOME);
- launcherIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
- context.startActivity(launcherIntent);
- }
-}
diff --git a/src/com/android/wallpaper/util/PreviewUtils.java b/src/com/android/wallpaper/util/PreviewUtils.java
index 0b8977a..48abef0 100644
--- a/src/com/android/wallpaper/util/PreviewUtils.java
+++ b/src/com/android/wallpaper/util/PreviewUtils.java
@@ -23,19 +23,13 @@
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
import android.text.TextUtils;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
/** Util class for wallpaper preview. */
public class PreviewUtils {
private static final String PREVIEW = "preview";
private static final String METHOD_GET_PREVIEW = "get_preview";
- private static final ExecutorService sExecutorService = Executors.newSingleThreadExecutor();
private final Context mContext;
private final String mProviderAuthority;
@@ -63,17 +57,10 @@
}
}
- /**
- * Render preview under the current grid option.
- * @param bundle request options to pass on the call
- * @param callback to receive the results, it will be called on the main thread.
- */
- public void renderPreview(Bundle bundle, WorkspacePreviewCallback callback) {
- sExecutorService.submit(() -> {
- Bundle result = mContext.getContentResolver().call(getUri(PREVIEW),
- METHOD_GET_PREVIEW, null, bundle);
- new Handler(Looper.getMainLooper()).post(() -> callback.onPreviewRendered(result));
- });
+ /** Render preview under the current grid option. */
+ public Bundle renderPreview(Bundle bundle) {
+ return mContext.getContentResolver().call(getUri(PREVIEW), METHOD_GET_PREVIEW, null,
+ bundle);
}
/** Easy way to generate a Uri with the provider info from this class. */
@@ -89,14 +76,4 @@
public boolean supportsPreview() {
return mProviderInfo != null;
}
-
- /**
- * Callback for a call to the provider to render preview
- */
- public interface WorkspacePreviewCallback {
- /**
- * Called with the result from the provider.
- */
- void onPreviewRendered(Bundle resultBundle);
- }
}
diff --git a/src/com/android/wallpaper/util/WallpaperConnection.java b/src/com/android/wallpaper/util/WallpaperConnection.java
index 36bd49d..5a37333 100644
--- a/src/com/android/wallpaper/util/WallpaperConnection.java
+++ b/src/com/android/wallpaper/util/WallpaperConnection.java
@@ -141,8 +141,9 @@
mEngine = null;
}
try {
+ mService.detach();
mContext.unbindService(this);
- } catch (IllegalArgumentException e) {
+ } catch (IllegalArgumentException | RemoteException e) {
Log.i(TAG, "Can't unbind wallpaper service. "
+ "It might have crashed, just ignoring.");
}
diff --git a/src/com/android/wallpaper/util/WallpaperCropUtils.java b/src/com/android/wallpaper/util/WallpaperCropUtils.java
index eaf0e4a..bff7a67 100755
--- a/src/com/android/wallpaper/util/WallpaperCropUtils.java
+++ b/src/com/android/wallpaper/util/WallpaperCropUtils.java
@@ -193,8 +193,8 @@
public static Rect calculateCropRect(Context context, float wallpaperZoom, Point wallpaperSize,
Point defaultCropSurfaceSize, Point targetHostSize, int scrollX, int scrollY) {
// Calculate Rect of wallpaper in physical pixel terms (i.e., scaled to current zoom).
- int scaledWallpaperWidth = Math.round(wallpaperSize.x * wallpaperZoom);
- int scaledWallpaperHeight = Math.round(wallpaperSize.y * wallpaperZoom);
+ int scaledWallpaperWidth = (int) (wallpaperSize.x * wallpaperZoom);
+ int scaledWallpaperHeight = (int) (wallpaperSize.y * wallpaperZoom);
Rect rect = new Rect();
rect.set(0, 0, scaledWallpaperWidth, scaledWallpaperHeight);
diff --git a/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java b/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
index e043051..9855b21 100644
--- a/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
+++ b/src/com/android/wallpaper/util/WallpaperSurfaceCallback.java
@@ -33,9 +33,6 @@
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.module.PackageStatusNotifier;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
/**
* Default implementation of {@link SurfaceHolder.Callback} to render a static wallpaper when the
* surface has been created.
@@ -62,16 +59,13 @@
private final SurfaceView mWallpaperSurface;
@Nullable
private final SurfaceListener mListener;
- @Nullable
- private final Future<Integer> mPlaceholderColor;
private boolean mSurfaceCreated;
private PackageStatusNotifier.Listener mAppStatusListener;
private PackageStatusNotifier mPackageStatusNotifier;
public WallpaperSurfaceCallback(Context context, View containerView,
- SurfaceView wallpaperSurface, @Nullable Future<Integer> placeholderColor,
- @Nullable SurfaceListener listener) {
+ SurfaceView wallpaperSurface, @Nullable SurfaceListener listener) {
mContext = context.getApplicationContext();
mContainerView = containerView;
mWallpaperSurface = wallpaperSurface;
@@ -88,12 +82,6 @@
};
mPackageStatusNotifier.addListener(mAppStatusListener,
WallpaperService.SERVICE_INTERFACE);
- mPlaceholderColor = placeholderColor;
- }
-
- public WallpaperSurfaceCallback(Context context, View containerView,
- SurfaceView wallpaperSurface, @Nullable SurfaceListener listener) {
- this(context, containerView, wallpaperSurface, null, listener);
}
public WallpaperSurfaceCallback(Context context, View containerView,
@@ -155,16 +143,8 @@
private void setupSurfaceWallpaper(boolean forceClean) {
mHomeImageWallpaper = new ImageView(mContext);
- Integer placeholder = null;
- if (mPlaceholderColor != null && mPlaceholderColor.isDone()) {
- try {
- placeholder = mPlaceholderColor.get();
- } catch (InterruptedException | ExecutionException e) {
- // Ignore
- }
- }
- mHomeImageWallpaper.setBackgroundColor((placeholder != null) ? placeholder
- : ResourceUtils.getColorAttr(mContext, android.R.attr.colorSecondary));
+ mHomeImageWallpaper.setBackgroundColor(
+ ResourceUtils.getColorAttr(mContext, android.R.attr.colorPrimary));
mHomeImageWallpaper.measure(makeMeasureSpec(mContainerView.getWidth(), EXACTLY),
makeMeasureSpec(mContainerView.getHeight(), EXACTLY));
mHomeImageWallpaper.layout(0, 0, mContainerView.getWidth(),
diff --git a/src/com/android/wallpaper/widget/BottomActionBar.java b/src/com/android/wallpaper/widget/BottomActionBar.java
index fda4c8b..d11af88 100644
--- a/src/com/android/wallpaper/widget/BottomActionBar.java
+++ b/src/com/android/wallpaper/widget/BottomActionBar.java
@@ -95,7 +95,7 @@
// TODO(b/154299462): Separate downloadable related actions from WallpaperPicker.
/** The action items in the bottom action bar. */
public enum BottomAction {
- ROTATION, DELETE, INFORMATION, EDIT, CUSTOMIZE, DOWNLOAD, PROGRESS, APPLY, APPLY_TEXT
+ ROTATION, DELETE, INFORMATION, EDIT, CUSTOMIZE, DOWNLOAD, PROGRESS, APPLY
}
private final Map<BottomAction, View> mActionMap = new EnumMap<>(BottomAction.class);
@@ -123,7 +123,6 @@
mActionMap.put(BottomAction.DOWNLOAD, findViewById(R.id.action_download));
mActionMap.put(BottomAction.PROGRESS, findViewById(R.id.action_progress));
mActionMap.put(BottomAction.APPLY, findViewById(R.id.action_apply));
- mActionMap.put(BottomAction.APPLY_TEXT, findViewById(R.id.action_apply_text_button));
mBottomSheetView = findViewById(R.id.action_bottom_sheet);
SizeCalculator.adjustBackgroundCornerRadius(mBottomSheetView);
@@ -176,6 +175,10 @@
@Override
public void onVisibilityAggregated(boolean isVisible) {
super.onVisibilityAggregated(isVisible);
+ if (!isVisible) {
+ hideBottomSheetAndDeselectButtonIfExpanded();
+ mBottomSheetBehavior.reset();
+ }
mVisibilityChangeListeners.forEach(listener -> listener.onVisibilityChange(isVisible));
}
@@ -204,15 +207,6 @@
hideBottomSheetAndDeselectButtonIfExpanded();
}
- /** Enables or disables action buttons that show the bottom sheet. */
- public void enableActionButtonsWithBottomSheet(boolean enabled) {
- if (enabled) {
- enableActions(mContentViewMap.keySet().toArray(new BottomAction[0]));
- } else {
- disableActions(mContentViewMap.keySet().toArray(new BottomAction[0]));
- }
- }
-
/**
* Sets a click listener to a specific action.
*
@@ -274,6 +268,11 @@
findViewById(R.id.action_back).setVisibility(visibility);
}
+ /** Get back button visibility. */
+ public int getBackButtonVisibility() {
+ return findViewById(R.id.action_back).getVisibility();
+ }
+
/** Binds the cancel button to back key. */
public void bindBackButtonToSystemBackKey(Activity activity) {
findViewById(R.id.action_back).setOnClickListener(v -> activity.onBackPressed());
@@ -435,11 +434,6 @@
return mActionMap.get(action).isSelected();
}
- /** Returns {@code true} if the state of bottom sheet is collapsed. */
- public boolean isBottomSheetCollapsed() {
- return mBottomSheetBehavior.getState() == STATE_COLLAPSED;
- }
-
/** Resets {@link BottomActionBar} to initial state. */
public void reset() {
// Not visible by default, see res/layout/bottom_action_bar.xml
diff --git a/src/com/android/wallpaper/widget/LockScreenPreviewer.java b/src/com/android/wallpaper/widget/LockScreenPreviewer.java
index 0c0d078..17ca99a 100644
--- a/src/com/android/wallpaper/widget/LockScreenPreviewer.java
+++ b/src/com/android/wallpaper/widget/LockScreenPreviewer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2020 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.
@@ -20,22 +20,19 @@
import android.app.WallpaperColors;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.content.res.Configuration;
-import android.graphics.Canvas;
-import android.graphics.Paint;
import android.graphics.Point;
-import android.text.SpannableString;
import android.text.format.DateFormat;
-import android.text.style.ReplacementSpan;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
+import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.MainThread;
-import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
@@ -49,27 +46,24 @@
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-/** A class to load the new custom lockscreen view to the preview screen. */
+/** A class to load the custom lockscreen view to the preview screen. */
public class LockScreenPreviewer implements LifecycleObserver {
private static final String DEFAULT_DATE_PATTERN = "EEE, MMM d";
- private static final ExecutorService sExecutorService = Executors.newSingleThreadExecutor();
- private final Lifecycle mLifecycle;
- private final Context mContext;
- private final String mDatePattern;
- private final TextView mLockTime;
- private final TextView mLockDate;
+ private Context mContext;
+ private String mDatePattern;
private TimeTicker mTicker;
+ private ImageView mLockIcon;
+ private TextView mLockTime;
+ private TextView mLockDate;
public LockScreenPreviewer(Lifecycle lifecycle, Context context, ViewGroup previewContainer) {
- mLifecycle = lifecycle;
mContext = context;
View contentView = LayoutInflater.from(mContext).inflate(
R.layout.lock_screen_preview, /* root= */ null);
+ mLockIcon = contentView.findViewById(R.id.lock_icon);
mLockTime = contentView.findViewById(R.id.lock_time);
mLockDate = contentView.findViewById(R.id.lock_date);
mDatePattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), DEFAULT_DATE_PATTERN);
@@ -78,13 +72,13 @@
Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(defaultDisplay);
Configuration config = mContext.getResources().getConfiguration();
- boolean directionLTR = config.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
+ final boolean directionLTR = config.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
View rootView = previewContainer.getRootView();
rootView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View view, int left, int top, int right, int bottom,
- int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ int oldLeft, int oldTop, int oldRight, int oldBottom) {
int cardHeight = previewContainer.getMeasuredHeight();
int cardWidth = previewContainer.getMeasuredWidth();
@@ -111,27 +105,22 @@
rootView.removeOnLayoutChangeListener(this);
}
});
- mLifecycle.addObserver(this);
+ lifecycle.addObserver(this);
}
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
@MainThread
public void onResume() {
- if (mTicker == null) {
- sExecutorService.submit(() -> {
- if (mContext != null && mLifecycle.getCurrentState().isAtLeast(
- Lifecycle.State.RESUMED)) {
- mTicker = TimeTicker.registerNewReceiver(mContext, this::updateDateTime);
- }
- });
- }
+ mTicker = TimeTicker.registerNewReceiver(mContext, this::updateDateTime);
updateDateTime();
}
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
@MainThread
public void onPause() {
- unregisterReceiver();
+ if (mContext != null) {
+ mContext.unregisterReceiver(mTicker);
+ }
}
/**
@@ -144,94 +133,31 @@
boolean useLightTextColor = colors == null
|| (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0;
int color = mContext.getColor(useLightTextColor
- ? R.color.text_color_light : R.color.text_color_dark);
+ ? android.R.color.white : android.R.color.black);
int textShadowColor = mContext.getColor(useLightTextColor
- ? R.color.smartspace_preview_shadow_color_dark
- : R.color.smartspace_preview_shadow_color_transparent);
+ ? android.R.color.tertiary_text_dark
+ : android.R.color.transparent);
+ mLockIcon.setImageTintList(ColorStateList.valueOf(color));
mLockDate.setTextColor(color);
+ mLockTime.setTextColor(color);
+
mLockDate.setShadowLayer(
mContext.getResources().getDimension(
R.dimen.smartspace_preview_key_ambient_shadow_blur),
/* dx = */ 0,
/* dy = */ 0,
textShadowColor);
+ mLockTime.setShadowLayer(
+ mContext.getResources().getDimension(
+ R.dimen.smartspace_preview_key_ambient_shadow_blur),
+ /* dx = */ 0,
+ /* dy = */ 0,
+ textShadowColor);
}
- /** Sets visibility for date view. */
- public void setDateViewVisibility(boolean visible) {
- mLockDate.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
- }
-
- public void release() {
- mLifecycle.removeObserver(this);
- unregisterReceiver();
- }
-
- private void unregisterReceiver() {
- if (mTicker == null) {
- return;
- }
-
- sExecutorService.submit(() -> {
- if (mContext != null && mTicker != null) {
- mContext.unregisterReceiver(mTicker);
- mTicker = null;
- }
- });
- }
-
private void updateDateTime() {
Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
+ mLockTime.setText(TimeUtils.getFormattedTime(mContext, calendar));
mLockDate.setText(DateFormat.format(mDatePattern, calendar));
- SpannableString timeWithMonospaceText = new SpannableString(
- TimeUtils.getDoubleLineFormattedTime(mContext, calendar));
- timeWithMonospaceText.setSpan(new MonospaceSpan(), /* start= */ 0,
- timeWithMonospaceText.length(), /* flag= */ 0);
- mLockTime.setText(timeWithMonospaceText);
- }
-
- /** Make text monospace without overriding the text fontFamily. */
- private static class MonospaceSpan extends ReplacementSpan {
-
- @Override
- public int getSize(@NonNull Paint paint, @NonNull CharSequence text, int start, int end,
- @Nullable Paint.FontMetricsInt fontMetricsInt) {
- if (fontMetricsInt != null) {
- paint.getFontMetricsInt(fontMetricsInt);
- }
- int count = end - start;
- if (text.charAt(start) == '\n') {
- count--;
- }
- if (text.charAt(end - 1) == '\n') {
- count--;
- }
- return getMaxCharWidth(paint, text, /* start= */ 0, text.length())
- * Math.max(count, 0);
- }
-
- @Override
- public void draw(@NonNull Canvas canvas, @NonNull CharSequence text, int start, int end,
- float x, int top, int y, int bottom, @NonNull Paint paint) {
- float[] widths = new float[end - start];
- paint.getTextWidths(text, start, end, widths);
- int maxCharWidth = getMaxCharWidth(paint, text, /* start= */ 0, text.length());
- for (int i = 0; i < end - start; ++i) {
- canvas.drawText(text, start + i, start + i + 1,
- x + maxCharWidth * i + (maxCharWidth - widths[i]) / 2, y, paint);
- }
- }
-
- private int getMaxCharWidth(Paint paint, CharSequence text, int start, int end) {
- float[] widths = new float[end - start];
- paint.getTextWidths(text, start, end, widths);
- float max = 0;
- for (float w : widths) {
- if (max < w) {
- max = w;
- }
- }
- return Math.round(max);
- }
}
}
diff --git a/src/com/android/wallpaper/widget/LockScreenPreviewer2.java b/src/com/android/wallpaper/widget/LockScreenPreviewer2.java
new file mode 100644
index 0000000..f559bb8
--- /dev/null
+++ b/src/com/android/wallpaper/widget/LockScreenPreviewer2.java
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.wallpaper.widget;
+
+import static android.view.View.MeasureSpec.EXACTLY;
+import static android.view.View.MeasureSpec.makeMeasureSpec;
+
+import android.app.WallpaperColors;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Point;
+import android.text.SpannableString;
+import android.text.format.DateFormat;
+import android.text.style.ReplacementSpan;
+import android.view.Display;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.widget.TextView;
+
+import androidx.annotation.MainThread;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.lifecycle.Lifecycle;
+import androidx.lifecycle.LifecycleObserver;
+import androidx.lifecycle.OnLifecycleEvent;
+
+import com.android.wallpaper.R;
+import com.android.wallpaper.util.ScreenSizeCalculator;
+import com.android.wallpaper.util.TimeUtils;
+import com.android.wallpaper.util.TimeUtils.TimeTicker;
+
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/** A class to load the new custom lockscreen view to the preview screen. */
+public class LockScreenPreviewer2 implements LifecycleObserver {
+
+ private static final String DEFAULT_DATE_PATTERN = "EEE, MMM d";
+
+ private final Lifecycle mLifecycle;
+ private final Context mContext;
+ private final String mDatePattern;
+ private final TextView mLockTime;
+ private final TextView mLockDate;
+ private TimeTicker mTicker;
+
+ public LockScreenPreviewer2(Lifecycle lifecycle, Context context, ViewGroup previewContainer) {
+ mLifecycle = lifecycle;
+ mContext = context;
+ View contentView = LayoutInflater.from(mContext).inflate(
+ R.layout.lock_screen_preview2, /* root= */ null);
+ mLockTime = contentView.findViewById(R.id.lock_time);
+ mLockDate = contentView.findViewById(R.id.lock_date);
+ mDatePattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), DEFAULT_DATE_PATTERN);
+
+ Display defaultDisplay = mContext.getSystemService(WindowManager.class).getDefaultDisplay();
+ Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(defaultDisplay);
+
+ Configuration config = mContext.getResources().getConfiguration();
+ boolean directionLTR = config.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
+
+ View rootView = previewContainer.getRootView();
+ rootView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
+ @Override
+ public void onLayoutChange(View view, int left, int top, int right, int bottom,
+ int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ int cardHeight = previewContainer.getMeasuredHeight();
+ int cardWidth = previewContainer.getMeasuredWidth();
+
+ // Relayout the content view to match full screen size.
+ contentView.measure(
+ makeMeasureSpec(screenSize.x, EXACTLY),
+ makeMeasureSpec(screenSize.y, EXACTLY));
+ contentView.layout(0, 0, screenSize.x, screenSize.y);
+
+ // Scale the content view from full screen size to the container(card) size.
+ float scale = cardHeight > 0 ? (float) cardHeight / screenSize.y
+ : (float) cardWidth / screenSize.x;
+ contentView.setScaleX(scale);
+ contentView.setScaleY(scale);
+ // The pivot point is centered by default, set to (0, 0).
+ contentView.setPivotX(directionLTR ? 0f : contentView.getMeasuredWidth());
+ contentView.setPivotY(0f);
+
+ previewContainer.removeAllViews();
+ previewContainer.addView(
+ contentView,
+ contentView.getMeasuredWidth(),
+ contentView.getMeasuredHeight());
+ rootView.removeOnLayoutChangeListener(this);
+ }
+ });
+ mLifecycle.addObserver(this);
+ }
+
+ @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
+ @MainThread
+ public void onResume() {
+ if (mContext != null) {
+ mTicker = TimeTicker.registerNewReceiver(mContext, this::updateDateTime);
+ updateDateTime();
+ }
+ }
+
+ @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
+ @MainThread
+ public void onPause() {
+ if (mContext != null) {
+ mContext.unregisterReceiver(mTicker);
+ }
+ }
+
+ /**
+ * Sets the content's color based on the wallpaper's {@link WallpaperColors}.
+ *
+ * @param colors the {@link WallpaperColors} of the wallpaper which the lock screen overlay
+ * will attach to, or {@code null} to use light color as default
+ */
+ public void setColor(@Nullable WallpaperColors colors) {
+ boolean useLightTextColor = colors == null
+ || (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0;
+ int color = mContext.getColor(useLightTextColor
+ ? R.color.text_color_light : R.color.text_color_dark);
+ int textShadowColor = mContext.getColor(useLightTextColor
+ ? R.color.smartspace_preview_shadow_color_dark
+ : R.color.smartspace_preview_shadow_color_transparent);
+ mLockDate.setTextColor(color);
+ mLockDate.setShadowLayer(
+ mContext.getResources().getDimension(
+ R.dimen.smartspace_preview_key_ambient_shadow_blur),
+ /* dx = */ 0,
+ /* dy = */ 0,
+ textShadowColor);
+ }
+
+ public void release() {
+ mLifecycle.removeObserver(this);
+ }
+
+ private void updateDateTime() {
+ Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
+ mLockDate.setText(DateFormat.format(mDatePattern, calendar));
+ SpannableString timeWithMonospaceText = new SpannableString(
+ TimeUtils.getDoubleLineFormattedTime(mContext, calendar));
+ timeWithMonospaceText.setSpan(new MonospaceSpan(), /* start= */ 0,
+ timeWithMonospaceText.length(), /* flag= */ 0);
+ mLockTime.setText(timeWithMonospaceText);
+ }
+
+ /** Make text monospace without overriding the text fontFamily. */
+ private static class MonospaceSpan extends ReplacementSpan {
+
+ @Override
+ public int getSize(@NonNull Paint paint, @NonNull CharSequence text, int start, int end,
+ @Nullable Paint.FontMetricsInt fontMetricsInt) {
+ if (fontMetricsInt != null) {
+ paint.getFontMetricsInt(fontMetricsInt);
+ }
+ int count = end - start;
+ if (text.charAt(start) == '\n') {
+ count--;
+ }
+ if (text.charAt(end - 1) == '\n') {
+ count--;
+ }
+ return getMaxCharWidth(paint, text, /* start= */ 0, text.length())
+ * Math.max(count, 0);
+ }
+
+ @Override
+ public void draw(@NonNull Canvas canvas, @NonNull CharSequence text, int start, int end,
+ float x, int top, int y, int bottom, @NonNull Paint paint) {
+ float[] widths = new float[end - start];
+ paint.getTextWidths(text, start, end, widths);
+ int maxCharWidth = getMaxCharWidth(paint, text, /* start= */ 0, text.length());
+ for (int i = 0; i < end - start; ++i) {
+ canvas.drawText(text, start + i, start + i + 1,
+ x + maxCharWidth * i + (maxCharWidth - widths[i]) / 2, y, paint);
+ }
+ }
+
+ private int getMaxCharWidth(Paint paint, CharSequence text, int start, int end) {
+ float[] widths = new float[end - start];
+ paint.getTextWidths(text, start, end, widths);
+ float max = 0;
+ for (float w : widths) {
+ if (max < w) {
+ max = w;
+ }
+ }
+ return Math.round(max);
+ }
+ }
+}
diff --git a/src/com/android/wallpaper/widget/PreviewPager.java b/src/com/android/wallpaper/widget/PreviewPager.java
index 231392c..6b0d07d 100644
--- a/src/com/android/wallpaper/widget/PreviewPager.java
+++ b/src/com/android/wallpaper/widget/PreviewPager.java
@@ -107,6 +107,10 @@
// offset in (origin, rightBoundary)
alpha = (float) Math.abs(offset - origin) / Math.abs(rightBoundary - origin);
}
+ View cover = view.findViewById(R.id.fade_cover);
+ if (cover != null) {
+ view.findViewById(R.id.fade_cover).setAlpha(alpha);
+ }
}, LAYER_TYPE_NONE);
mViewPager.setPageMargin(res.getDimensionPixelOffset(R.dimen.preview_page_gap));
mViewPager.setClipToPadding(false);
diff --git a/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java b/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
index d6fa979..4922b42 100644
--- a/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
+++ b/tests/src/com/android/wallpaper/testing/TestCategoryProvider.java
@@ -93,13 +93,12 @@
}
@Override
- public boolean resetIfNeeded() {
+ public void resetIfNeeded() {
mCategories.clear();
- return true;
}
@Override
- public boolean isFeaturedCollectionAvailable() {
+ public boolean isFeaturedCategory(Category category) {
return false;
}
diff --git a/tests/src/com/android/wallpaper/testing/TestInjector.java b/tests/src/com/android/wallpaper/testing/TestInjector.java
index fd9f68a..cdc9a59 100644
--- a/tests/src/com/android/wallpaper/testing/TestInjector.java
+++ b/tests/src/com/android/wallpaper/testing/TestInjector.java
@@ -31,7 +31,6 @@
import com.android.wallpaper.module.DrawableLayerResolver;
import com.android.wallpaper.module.ExploreIntentChecker;
import com.android.wallpaper.module.FormFactorChecker;
-import com.android.wallpaper.module.CustomizationSections;
import com.android.wallpaper.module.Injector;
import com.android.wallpaper.module.LiveWallpaperInfoFactory;
import com.android.wallpaper.module.LoggingOptInStatusProvider;
@@ -255,9 +254,4 @@
}
return mPerformanceMonitor;
}
-
- @Override
- public CustomizationSections getCustomizationSections() {
- return null;
- }
}
diff --git a/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java b/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
index c4328c5..c0ccee6 100644
--- a/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
+++ b/tests/src/com/android/wallpaper/testing/TestWallpaperInfo.java
@@ -73,7 +73,6 @@
}
private TestWallpaperInfo(Parcel in) {
- super(in);
mPixelColor = in.readInt();
mAttributions = in.createStringArrayList();
mActionUrl = in.readString();
@@ -201,7 +200,6 @@
@Override
public void writeToParcel(Parcel parcel, int i) {
- super.writeToParcel(parcel, i);
parcel.writeInt(mPixelColor);
parcel.writeStringList(mAttributions);
parcel.writeString(mActionUrl);