Merge "Converting some anonymous classes to lambda calls" into ub-launcher3-master
diff --git a/SecondaryDisplayLauncher/Android.mk b/SecondaryDisplayLauncher/Android.mk
deleted file mode 100644
index 7f305bb..0000000
--- a/SecondaryDisplayLauncher/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2018 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_AAPT2_ONLY := true
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STATIC_ANDROID_LIBRARIES := com.google.android.material_material
-
-LOCAL_STATIC_JAVA_LIBRARIES := LauncherPluginLib
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-LOCAL_SDK_VERSION := current
-LOCAL_MIN_SDK_VERSION := 21
-LOCAL_MODULE := SecondaryDisplayLauncherLib
-LOCAL_PRIVILEGED_MODULE := true
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/SecondaryDisplayLauncher/AndroidManifest.xml b/SecondaryDisplayLauncher/AndroidManifest.xml
deleted file mode 100644
index ebf6b02..0000000
--- a/SecondaryDisplayLauncher/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2018, 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.
-*/
--->
-<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.launcher3">
-
- <application>
-
- <activity
- android:name="com.android.launcher3.SecondaryDisplayLauncher"
- android:theme="@style/SecondaryLauncherTheme"
- android:launchMode="singleTop"
- android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|colorMode|density"
- android:enabled="true">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SECONDARY_HOME" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
-
- </application>
-</manifest>
diff --git a/SecondaryDisplayLauncher/res/drawable/ic_apps.xml b/SecondaryDisplayLauncher/res/drawable/ic_apps.xml
deleted file mode 100644
index db779c2..0000000
--- a/SecondaryDisplayLauncher/res/drawable/ic_apps.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.
- -->
-
-<vector android:height="24dp" android:tint="#FFFFFF"
- android:viewportHeight="24.0" android:viewportWidth="24.0"
- android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
- <path android:fillColor="#FF000000" android:pathData="M4,8h4L8,4L4,4v4zM10,20h4v-4h-4v4zM4,20h4v-4L4,16v4zM4,14h4v-4L4,10v4zM10,14h4v-4h-4v4zM16,4v4h4L20,4h-4zM10,8h4L14,4h-4v4zM16,14h4v-4h-4v4zM16,20h4v-4h-4v4z"/>
-</vector>
diff --git a/SecondaryDisplayLauncher/res/drawable/ic_settings.xml b/SecondaryDisplayLauncher/res/drawable/ic_settings.xml
deleted file mode 100644
index c269c3b..0000000
--- a/SecondaryDisplayLauncher/res/drawable/ic_settings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.
- -->
-
-<vector android:height="24dp" android:tint="#FFFFFF"
- android:viewportHeight="24.0" android:viewportWidth="24.0"
- android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
- <path android:fillColor="#FF000000" android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
-</vector>
diff --git a/SecondaryDisplayLauncher/res/layout-sw600dp/secondary_display_launcher.xml b/SecondaryDisplayLauncher/res/layout-sw600dp/secondary_display_launcher.xml
deleted file mode 100644
index 46f1674..0000000
--- a/SecondaryDisplayLauncher/res/layout-sw600dp/secondary_display_launcher.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.coordinatorlayout.widget.CoordinatorLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/RootView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/launcher_bg_color"
- android:fitsSystemWindows="true" >
-
- <GridView
- android:id="@+id/pinned_app_grid"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/app_grid_margin_top"
- android:layout_marginStart="@dimen/app_grid_margin_left"
- android:layout_marginEnd="@dimen/app_grid_margin_right"
- android:columnWidth="@dimen/app_list_col_width"
- android:verticalSpacing="@dimen/app_list_horizontal_spacing"
- android:horizontalSpacing="@dimen/app_list_vertical_spacing"
- android:numColumns="auto_fit" />
-
- <ImageButton
- android:id="@+id/OptionsButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|start"
- android:layout_marginStart="@dimen/options_button_margin"
- android:layout_marginBottom="@dimen/options_button_margin"
- android:src="@drawable/ic_settings"
- android:background="@null"/>
-
- <FrameLayout
- android:layout_width="@dimen/app_picker_width"
- android:layout_height="@dimen/app_picker_height"
- android:layout_gravity="bottom|end"
- android:layout_margin="@dimen/app_picker_fab_margin">
-
- <include layout="@layout/app_picker_layout"/>
- </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/SecondaryDisplayLauncher/res/layout-sw720dp/secondary_display_launcher.xml b/SecondaryDisplayLauncher/res/layout-sw720dp/secondary_display_launcher.xml
deleted file mode 100644
index 6653a77..0000000
--- a/SecondaryDisplayLauncher/res/layout-sw720dp/secondary_display_launcher.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.coordinatorlayout.widget.CoordinatorLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/RootView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/launcher_bg_color"
- android:fitsSystemWindows="true" >
-
- <GridView
- android:id="@+id/pinned_app_grid"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/app_grid_margin_top"
- android:layout_marginStart="@dimen/app_grid_margin_left"
- android:layout_marginEnd="@dimen/app_grid_margin_right"
- android:columnWidth="@dimen/app_list_col_width"
- android:verticalSpacing="@dimen/app_list_horizontal_spacing"
- android:horizontalSpacing="@dimen/app_list_vertical_spacing"
- android:numColumns="auto_fit" />
-
- <ImageButton
- android:id="@+id/OptionsButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|start"
- android:layout_marginStart="@dimen/options_button_margin"
- android:layout_marginBottom="@dimen/options_button_margin"
- android:src="@drawable/ic_settings"
- android:background="@null"/>
-
- <FrameLayout
- android:layout_width="@dimen/app_picker_width"
- android:layout_height="@dimen/app_picker_height"
- android:layout_gravity="bottom|end"
- android:layout_marginEnd="@dimen/app_picker_fab_margin"
- android:layout_marginBottom="@dimen/app_picker_fab_margin">
-
- <include layout="@layout/app_picker_layout"/>
- </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/SecondaryDisplayLauncher/res/layout/app_grid_item.xml b/SecondaryDisplayLauncher/res/layout/app_grid_item.xml
deleted file mode 100644
index ee5158a..0000000
--- a/SecondaryDisplayLauncher/res/layout/app_grid_item.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center">
-
- <ImageView
- android:id="@+id/app_icon"
- android:layout_width="@dimen/app_icon_width"
- android:layout_height="@dimen/app_icon_height" />
-
- <TextView
- android:id="@+id/app_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:maxLines="1" />
-</LinearLayout>
diff --git a/SecondaryDisplayLauncher/res/layout/app_picker_dialog.xml b/SecondaryDisplayLauncher/res/layout/app_picker_dialog.xml
deleted file mode 100644
index 563a1af..0000000
--- a/SecondaryDisplayLauncher/res/layout/app_picker_dialog.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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">
-
- <GridView
- android:id="@+id/picker_app_grid"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/app_grid_margin_top"
- android:layout_marginStart="@dimen/app_grid_margin_left"
- android:layout_marginEnd="@dimen/app_grid_margin_right"
- android:columnWidth="@dimen/app_list_col_width"
- android:verticalSpacing="@dimen/app_list_horizontal_spacing"
- android:horizontalSpacing="@dimen/app_list_vertical_spacing"
- android:numColumns="auto_fit" />
-</FrameLayout>
diff --git a/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml b/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml
deleted file mode 100644
index 20f85b1..0000000
--- a/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.coordinatorlayout.widget.CoordinatorLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <com.google.android.material.circularreveal.cardview.CircularRevealCardView
- android:id="@+id/FloatingSheet"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="invisible">
-
- <GridView
- android:id="@+id/app_grid"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/app_grid_margin_top"
- android:columnWidth="@dimen/app_list_col_width"
- android:verticalSpacing="@dimen/app_list_horizontal_spacing"
- android:horizontalSpacing="@dimen/app_list_vertical_spacing"
- android:numColumns="auto_fit" />
- </com.google.android.material.circularreveal.cardview.CircularRevealCardView>
-
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/FloatingActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|end"
- android:src="@drawable/ic_apps"/>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/SecondaryDisplayLauncher/res/layout/secondary_display_launcher.xml b/SecondaryDisplayLauncher/res/layout/secondary_display_launcher.xml
deleted file mode 100644
index 49cd499..0000000
--- a/SecondaryDisplayLauncher/res/layout/secondary_display_launcher.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.coordinatorlayout.widget.CoordinatorLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/RootView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/launcher_bg_color"
- android:fitsSystemWindows="true" >
-
- <GridView
- android:id="@+id/pinned_app_grid"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/app_grid_margin_top"
- android:layout_marginStart="@dimen/app_grid_margin_left"
- android:layout_marginEnd="@dimen/app_grid_margin_right"
- android:columnWidth="@dimen/app_list_col_width"
- android:verticalSpacing="@dimen/app_list_horizontal_spacing"
- android:horizontalSpacing="@dimen/app_list_vertical_spacing"
- android:numColumns="auto_fit" />
-
- <ImageButton
- android:id="@+id/OptionsButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|start"
- android:layout_marginStart="@dimen/options_button_margin"
- android:layout_marginBottom="@dimen/options_button_margin"
- android:src="@drawable/ic_settings"
- android:background="@null"/>
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="bottom|end"
- android:layout_margin="@dimen/app_picker_fab_margin">
-
- <include layout="@layout/app_picker_layout"/>
- </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/SecondaryDisplayLauncher/res/menu/context_menu.xml b/SecondaryDisplayLauncher/res/menu/context_menu.xml
deleted file mode 100644
index 6263842..0000000
--- a/SecondaryDisplayLauncher/res/menu/context_menu.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 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.
- -->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/add_app_shortcut"
- android:title="@string/add_app_shortcut" />
- <item android:id="@+id/set_wallpaper"
- android:title="@string/set_wallpaper" />
-</menu>
diff --git a/SecondaryDisplayLauncher/res/values-af/strings.xml b/SecondaryDisplayLauncher/res/values-af/strings.xml
deleted file mode 100644
index b544be7a..0000000
--- a/SecondaryDisplayLauncher/res/values-af/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Kon nie die aktiwiteit begin nie"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Voeg programkortpad by"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Stel muurpapier"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-am/strings.xml b/SecondaryDisplayLauncher/res/values-am/strings.xml
deleted file mode 100644
index 71854ad..0000000
--- a/SecondaryDisplayLauncher/res/values-am/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"እንቅስቃሴውን ማስጀመር አልተቻለም"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"የመተግበሪያ አቋራጭ ያክሉ"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ልጣፍ አዘጋጅ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ar/strings.xml b/SecondaryDisplayLauncher/res/values-ar/strings.xml
deleted file mode 100644
index ba81c11..0000000
--- a/SecondaryDisplayLauncher/res/values-ar/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"تعذَّر تشغيل النشاط."</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"إضافة اختصار التطبيق"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"تعيين الخلفية"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-as/strings.xml b/SecondaryDisplayLauncher/res/values-as/strings.xml
deleted file mode 100644
index d199a26..0000000
--- a/SecondaryDisplayLauncher/res/values-as/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"কাৰ্যকলাপটো লঞ্চ কৰিব পৰা নগ’ল"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"এপৰ শ্বর্টকাট যোগ কৰক"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ৱালপেপাৰ ছেট কৰক"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-az/strings.xml b/SecondaryDisplayLauncher/res/values-az/strings.xml
deleted file mode 100644
index cee70a0..0000000
--- a/SecondaryDisplayLauncher/res/values-az/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Fəaliyyəti başlatmaq mümkün olmadı"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Tətbiq qısayolu əlavə edin"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Divar kağızı ayarlayın"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-b+sr+Latn/strings.xml b/SecondaryDisplayLauncher/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index a8859d9..0000000
--- a/SecondaryDisplayLauncher/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Pokretanje aktivnosti nije uspelo"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Dodaj prečicu za aplikaciju"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Podesite pozadinu"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-be/strings.xml b/SecondaryDisplayLauncher/res/values-be/strings.xml
deleted file mode 100644
index 3df3760..0000000
--- a/SecondaryDisplayLauncher/res/values-be/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Не ўдалося запусціць дзеянне"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Дадаць ярлык праграмы"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Устанавіць шпалеры"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-bg/strings.xml b/SecondaryDisplayLauncher/res/values-bg/strings.xml
deleted file mode 100644
index 4474815..0000000
--- a/SecondaryDisplayLauncher/res/values-bg/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Активността не можа да бъде стартирана"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Добавяне на пряк път към приложението"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Задаване на тапет"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-bn/strings.xml b/SecondaryDisplayLauncher/res/values-bn/strings.xml
deleted file mode 100644
index 7322691..0000000
--- a/SecondaryDisplayLauncher/res/values-bn/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"অ্যাক্টিভিটি চালু করা যায়নি"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"অ্যাপ শর্টকাট যোগ করুন"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ওয়ালপেপার সেট করুন"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-bs/strings.xml b/SecondaryDisplayLauncher/res/values-bs/strings.xml
deleted file mode 100644
index 1e59d33..0000000
--- a/SecondaryDisplayLauncher/res/values-bs/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Pokretanje aktivnosti nije uspjelo"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Dodaj prečicu aplikacije"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Postavi pozadinsku sliku"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ca/strings.xml b/SecondaryDisplayLauncher/res/values-ca/strings.xml
deleted file mode 100644
index c0274d1..0000000
--- a/SecondaryDisplayLauncher/res/values-ca/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"No s\'ha pogut iniciar l\'activitat"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Afegeix una drecera d\'aplicació"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Estableix el fons de pantalla"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-cs/strings.xml b/SecondaryDisplayLauncher/res/values-cs/strings.xml
deleted file mode 100644
index 92ed5fa..0000000
--- a/SecondaryDisplayLauncher/res/values-cs/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Aktivitu nelze zahájit"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Přidat zkratku aplikace"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Nastavení tapety"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-da/strings.xml b/SecondaryDisplayLauncher/res/values-da/strings.xml
deleted file mode 100644
index 16bdb33..0000000
--- a/SecondaryDisplayLauncher/res/values-da/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Aktiviteten kunne ikke startes"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Tilføj appgenvej"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Angiv baggrund"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-de/strings.xml b/SecondaryDisplayLauncher/res/values-de/strings.xml
deleted file mode 100644
index 3617a5b..0000000
--- a/SecondaryDisplayLauncher/res/values-de/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Aktivität konnte nicht gestartet werden"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"App-Verknüpfung hinzufügen"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Hintergrund festlegen"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-el/strings.xml b/SecondaryDisplayLauncher/res/values-el/strings.xml
deleted file mode 100644
index 8d19d09..0000000
--- a/SecondaryDisplayLauncher/res/values-el/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Δεν ήταν δυνατή η εκκίνηση της δραστηριότητας"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Προσθήκη συντόμευσης εφαρμογής"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Ορισμός ταπετσαρίας"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-en-rAU/strings.xml b/SecondaryDisplayLauncher/res/values-en-rAU/strings.xml
deleted file mode 100644
index 8d8c419..0000000
--- a/SecondaryDisplayLauncher/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Couldn\'t launch the activity"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Add app shortcut"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Set wallpaper"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-en-rGB/strings.xml b/SecondaryDisplayLauncher/res/values-en-rGB/strings.xml
deleted file mode 100644
index 8d8c419..0000000
--- a/SecondaryDisplayLauncher/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Couldn\'t launch the activity"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Add app shortcut"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Set wallpaper"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-en-rIN/strings.xml b/SecondaryDisplayLauncher/res/values-en-rIN/strings.xml
deleted file mode 100644
index 8d8c419..0000000
--- a/SecondaryDisplayLauncher/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Couldn\'t launch the activity"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Add app shortcut"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Set wallpaper"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-es-rUS/strings.xml b/SecondaryDisplayLauncher/res/values-es-rUS/strings.xml
deleted file mode 100644
index ff6772b..0000000
--- a/SecondaryDisplayLauncher/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"No se pudo iniciar la actividad"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Agregar acceso directo a app"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Establecer fondo de pantalla"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-es/strings.xml b/SecondaryDisplayLauncher/res/values-es/strings.xml
deleted file mode 100644
index 0654dcb..0000000
--- a/SecondaryDisplayLauncher/res/values-es/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"No se ha podido iniciar la acción"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Añadir acceso directo a la aplicación"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Establecer fondo de pantalla"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-et/strings.xml b/SecondaryDisplayLauncher/res/values-et/strings.xml
deleted file mode 100644
index 3410fd4..0000000
--- a/SecondaryDisplayLauncher/res/values-et/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Tegevust ei saanud käivitada"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Lisa rakenduse otsetee"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Määra taustapilt"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-eu/strings.xml b/SecondaryDisplayLauncher/res/values-eu/strings.xml
deleted file mode 100644
index d7abe33..0000000
--- a/SecondaryDisplayLauncher/res/values-eu/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Ezin izan da abiarazi jarduera"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Gehitu aplikaziorako lasterbidea"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Ezarri horma-papera"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-fa/strings.xml b/SecondaryDisplayLauncher/res/values-fa/strings.xml
deleted file mode 100644
index 4d3ec4d..0000000
--- a/SecondaryDisplayLauncher/res/values-fa/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"فعالیت راهاندازی نشد"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"افزودن میانبر برنامه"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"تنظیم کاغذدیواری"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-fi/strings.xml b/SecondaryDisplayLauncher/res/values-fi/strings.xml
deleted file mode 100644
index e56f67a..0000000
--- a/SecondaryDisplayLauncher/res/values-fi/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Käynnistäminen epäonnistui"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Lisää sovelluksen pikakuvake"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Aseta taustakuva"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-fr-rCA/strings.xml b/SecondaryDisplayLauncher/res/values-fr-rCA/strings.xml
deleted file mode 100644
index f5c9ba5..0000000
--- a/SecondaryDisplayLauncher/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Impossible de lancer l\'activité"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Ajouter un raccourci vers l\'application"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Définir le fond d\'écran"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-fr/strings.xml b/SecondaryDisplayLauncher/res/values-fr/strings.xml
deleted file mode 100644
index daa186b..0000000
--- a/SecondaryDisplayLauncher/res/values-fr/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Impossible de lancer l\'activité"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Ajouter un raccourci vers l\'application"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Configurer le fond d\'écran"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-gl/strings.xml b/SecondaryDisplayLauncher/res/values-gl/strings.xml
deleted file mode 100644
index 0bcf969..0000000
--- a/SecondaryDisplayLauncher/res/values-gl/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Non se puido iniciar a actividade"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Engadir atallo da aplicación"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Definir fondo de pantalla"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-gu/strings.xml b/SecondaryDisplayLauncher/res/values-gu/strings.xml
deleted file mode 100644
index 82b4444..0000000
--- a/SecondaryDisplayLauncher/res/values-gu/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"પ્રવૃત્તિ લૉન્ચ કરી શકાઈ નથી"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ઍપ શૉર્ટકટ ઉમેરો"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"વૉલપેપર સેટ કરો"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-hi/strings.xml b/SecondaryDisplayLauncher/res/values-hi/strings.xml
deleted file mode 100644
index 8adb519..0000000
--- a/SecondaryDisplayLauncher/res/values-hi/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"गतिविधि लॉन्च नहीं हो सकी"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ऐप्लिकेशन शॉर्टकट जोड़ें"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"वॉलपेपर सेट करें"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-hr/strings.xml b/SecondaryDisplayLauncher/res/values-hr/strings.xml
deleted file mode 100644
index 87ac874..0000000
--- a/SecondaryDisplayLauncher/res/values-hr/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Pokretanje aktivnosti nije uspjelo"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Dodajte aplikacijski prečac"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Postavljanje pozadine"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-hu/strings.xml b/SecondaryDisplayLauncher/res/values-hu/strings.xml
deleted file mode 100644
index a8870fc..0000000
--- a/SecondaryDisplayLauncher/res/values-hu/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Nem sikerült elindítani a tevékenységet"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Alkalmazás parancsikonjának hozzáadása"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Háttérkép beállítása"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-hy/strings.xml b/SecondaryDisplayLauncher/res/values-hy/strings.xml
deleted file mode 100644
index a64233f..0000000
--- a/SecondaryDisplayLauncher/res/values-hy/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Չհաջողվեց գործարկել գործողությունը"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Ավելացնել հավելվածի դյուրանցումը"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Դարձնել պաստառ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-in/strings.xml b/SecondaryDisplayLauncher/res/values-in/strings.xml
deleted file mode 100644
index f51d238..0000000
--- a/SecondaryDisplayLauncher/res/values-in/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Tidak dapat meluncurkan aktivitas"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Tambahkan pintasan app"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Setel wallpaper"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-is/strings.xml b/SecondaryDisplayLauncher/res/values-is/strings.xml
deleted file mode 100644
index e8b3e97..0000000
--- a/SecondaryDisplayLauncher/res/values-is/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Ekki tókst að ræsa aðgerðina"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Bæta við flýtileið forrita"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Velja veggfóður"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-it/strings.xml b/SecondaryDisplayLauncher/res/values-it/strings.xml
deleted file mode 100644
index 4941515..0000000
--- a/SecondaryDisplayLauncher/res/values-it/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Impossibile avviare l\'attività"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Aggiungi scorciatoia app"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Imposta sfondo"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-iw/strings.xml b/SecondaryDisplayLauncher/res/values-iw/strings.xml
deleted file mode 100644
index 06b0c42..0000000
--- a/SecondaryDisplayLauncher/res/values-iw/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"לא ניתן היה להפעיל את הפעילות"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"הוספת קיצור דרך של אפליקציה"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"הגדרת טפט"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ja/strings.xml b/SecondaryDisplayLauncher/res/values-ja/strings.xml
deleted file mode 100644
index 3ed7b2b..0000000
--- a/SecondaryDisplayLauncher/res/values-ja/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"アクティビティを開始できませんでした"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"アプリのショートカットを追加"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"壁紙を設定"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ka/strings.xml b/SecondaryDisplayLauncher/res/values-ka/strings.xml
deleted file mode 100644
index ac85f70..0000000
--- a/SecondaryDisplayLauncher/res/values-ka/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"აქტივობის გაშვება ვერ მოხერხდა"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"აპის მალსახმობის დამატება"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ფონის დაყენება"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-kk/strings.xml b/SecondaryDisplayLauncher/res/values-kk/strings.xml
deleted file mode 100644
index f9ac455..0000000
--- a/SecondaryDisplayLauncher/res/values-kk/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Әрекет іске қосылмады"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Қолданба таңбашасын енгізу"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Тұсқағаз орнату"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-km/strings.xml b/SecondaryDisplayLauncher/res/values-km/strings.xml
deleted file mode 100644
index afc050f..0000000
--- a/SecondaryDisplayLauncher/res/values-km/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"មិនអាចចាប់ផ្តើមសកម្មភាពទេ"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"បញ្ចូលផ្លូវកាត់កម្មវិធី"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"កំណត់ផ្ទាំងរូបភាព"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-kn/strings.xml b/SecondaryDisplayLauncher/res/values-kn/strings.xml
deleted file mode 100644
index 09c327f..0000000
--- a/SecondaryDisplayLauncher/res/values-kn/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ಚಟುವಟಿಕೆಯನ್ನು ಲಾಂಚ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ಆ್ಯಪ್ ಶಾರ್ಟ್ಕಟ್ ಸೇರಿಸಿ"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ವಾಲ್ಪೇಪರ್ ಹೊಂದಿಸಿ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ko/strings.xml b/SecondaryDisplayLauncher/res/values-ko/strings.xml
deleted file mode 100644
index 6a02ac0..0000000
--- a/SecondaryDisplayLauncher/res/values-ko/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"활동을 실행할 수 없음"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"앱 바로가기 추가"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"배경화면 설정"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ky/strings.xml b/SecondaryDisplayLauncher/res/values-ky/strings.xml
deleted file mode 100644
index 56185fa..0000000
--- a/SecondaryDisplayLauncher/res/values-ky/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Аракет аткарылган жок"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Колдонмого кыска жол кошуу"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Тушкагаз орнотуу"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-lo/strings.xml b/SecondaryDisplayLauncher/res/values-lo/strings.xml
deleted file mode 100644
index 36a6275..0000000
--- a/SecondaryDisplayLauncher/res/values-lo/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ບໍ່ສາມາດເປີດໃຊ້ການເຄື່ອນໄຫວໄດ້"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ເພີ່ມທາງລັດແອັບ"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ຕັ້ງເປັນຮູບພື້ນຫຼັງ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-lt/strings.xml b/SecondaryDisplayLauncher/res/values-lt/strings.xml
deleted file mode 100644
index 8113eb6..0000000
--- a/SecondaryDisplayLauncher/res/values-lt/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Nepavyko paleisti veiklos"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Pridėti programos šaukinį"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Nustatyti ekrano foną"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-lv/strings.xml b/SecondaryDisplayLauncher/res/values-lv/strings.xml
deleted file mode 100644
index e267933..0000000
--- a/SecondaryDisplayLauncher/res/values-lv/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Nevarēja palaist darbību"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Pievienot lietotnes saīsni"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Iestatīt fona tapeti"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-mk/strings.xml b/SecondaryDisplayLauncher/res/values-mk/strings.xml
deleted file mode 100644
index e2cca03..0000000
--- a/SecondaryDisplayLauncher/res/values-mk/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Не можеше да се стартува активноста"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Додајте кратенка за апликација"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Поставете го тапетот"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ml/strings.xml b/SecondaryDisplayLauncher/res/values-ml/strings.xml
deleted file mode 100644
index 864245b..0000000
--- a/SecondaryDisplayLauncher/res/values-ml/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ആക്റ്റിവിറ്റി പ്രകാശിപ്പിക്കാനായില്ല"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ആപ്പ് കുറുക്കുവഴികൾ ചേർക്കുക"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"വാൾപേപ്പർ സജ്ജീകരിക്കുക"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-mn/strings.xml b/SecondaryDisplayLauncher/res/values-mn/strings.xml
deleted file mode 100644
index 85fb020..0000000
--- a/SecondaryDisplayLauncher/res/values-mn/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Үйл ажиллагааг эхлүүж чадсангүй"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Аппын товчлол нэмэх"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Ханын зураг тохируулах"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-mr/strings.xml b/SecondaryDisplayLauncher/res/values-mr/strings.xml
deleted file mode 100644
index 6e92a2f..0000000
--- a/SecondaryDisplayLauncher/res/values-mr/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"अॅक्टिव्हिटी लाँच करता आली नाही"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"अॅप शॉर्टकट जोडा"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"वॉलपेपर सेट करा"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ms/strings.xml b/SecondaryDisplayLauncher/res/values-ms/strings.xml
deleted file mode 100644
index fd78053..0000000
--- a/SecondaryDisplayLauncher/res/values-ms/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Tidak dapat melancarkan aktiviti"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Tambah pintasan apl"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Tetapkan kertas dinding"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-my/strings.xml b/SecondaryDisplayLauncher/res/values-my/strings.xml
deleted file mode 100644
index 1521402..0000000
--- a/SecondaryDisplayLauncher/res/values-my/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"လုပ်ဆောင်ချက်ကို စတင်၍မရပါ"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"အက်ပ်ဖြတ်လမ်းလင့်ခ်ထည့်ရန်"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"နောက်ခံ သတ်မှတ်ရန်"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-nb/strings.xml b/SecondaryDisplayLauncher/res/values-nb/strings.xml
deleted file mode 100644
index 945c87b..0000000
--- a/SecondaryDisplayLauncher/res/values-nb/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Kunne ikke starte aktiviteten"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Legg til en appsnarvei"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Angi bakgrunn"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ne/strings.xml b/SecondaryDisplayLauncher/res/values-ne/strings.xml
deleted file mode 100644
index 9a5b0a0..0000000
--- a/SecondaryDisplayLauncher/res/values-ne/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"उक्त क्रियाकलाप सुरु गर्न सकिएन"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"अनुप्रयोगको सर्टकट थप्नुहोस्"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"वालपेपर सेट गर्नुहोस्"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-nl/strings.xml b/SecondaryDisplayLauncher/res/values-nl/strings.xml
deleted file mode 100644
index 8767708..0000000
--- a/SecondaryDisplayLauncher/res/values-nl/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Kan de activiteit niet starten"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"App-snelkoppeling toevoegen"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Achtergrond instellen"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-or/strings.xml b/SecondaryDisplayLauncher/res/values-or/strings.xml
deleted file mode 100644
index 9bc5725..0000000
--- a/SecondaryDisplayLauncher/res/values-or/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ଗତିବିଧିକୁ ଲଞ୍ଚ କରାଯାଇପାରିଲା ନାହିଁ"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ଆପ୍ ସର୍ଟକଟ୍ ଯୋଗ କରନ୍ତୁ"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ୱାଲ୍ପେପର୍କୁ ସେଟ୍ କରନ୍ତୁ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-pa/strings.xml b/SecondaryDisplayLauncher/res/values-pa/strings.xml
deleted file mode 100644
index c5dd582..0000000
--- a/SecondaryDisplayLauncher/res/values-pa/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ਸਰਗਰਮੀ ਨੂੰ ਲਾਂਚ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ਐਪ ਸ਼ਾਰਟਕੱਟ ਸ਼ਾਮਲ ਕਰੋ"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ਵਾਲਪੇਪਰ ਸੈੱਟ ਕਰੋ"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-pl/strings.xml b/SecondaryDisplayLauncher/res/values-pl/strings.xml
deleted file mode 100644
index e8efaed..0000000
--- a/SecondaryDisplayLauncher/res/values-pl/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Nie udało się uruchomić aktywności"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Dodaj skrót do aplikacji"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Ustaw tapetę"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-pt-rPT/strings.xml b/SecondaryDisplayLauncher/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 67c7557..0000000
--- a/SecondaryDisplayLauncher/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Não foi possível iniciar a atividade."</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Adicionar atalho de aplicação"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Definir imagem de fundo"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-pt/strings.xml b/SecondaryDisplayLauncher/res/values-pt/strings.xml
deleted file mode 100644
index 201fc07..0000000
--- a/SecondaryDisplayLauncher/res/values-pt/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Não foi possível abrir a atividade"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Adicionar atalho de apps"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Definir plano de fundo"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ro/strings.xml b/SecondaryDisplayLauncher/res/values-ro/strings.xml
deleted file mode 100644
index e2e21c5..0000000
--- a/SecondaryDisplayLauncher/res/values-ro/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Nu s-a putut lansa activitatea"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Adăugați comanda rapidă pentru aplicație"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Setați imaginea de fundal"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ru/strings.xml b/SecondaryDisplayLauncher/res/values-ru/strings.xml
deleted file mode 100644
index 64ba00e..0000000
--- a/SecondaryDisplayLauncher/res/values-ru/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Не удалось запустить объект activity"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Добавить ярлык приложения"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Установить обои"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-si/strings.xml b/SecondaryDisplayLauncher/res/values-si/strings.xml
deleted file mode 100644
index ac492eb..0000000
--- a/SecondaryDisplayLauncher/res/values-si/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"ක්රියාකාරකම දියත් කිරීමට නොහැකි විය"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"යෙදුම් කෙටිමඟ එක් කරන්න"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"බිතුපත සකසන්න"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sk/strings.xml b/SecondaryDisplayLauncher/res/values-sk/strings.xml
deleted file mode 100644
index 5e6fa7a..0000000
--- a/SecondaryDisplayLauncher/res/values-sk/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Aktivitu sa nepodarilo spustiť"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Pridať odkaz do aplikácie"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Nastaviť tapetu"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sl/strings.xml b/SecondaryDisplayLauncher/res/values-sl/strings.xml
deleted file mode 100644
index f54dec9..0000000
--- a/SecondaryDisplayLauncher/res/values-sl/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Dejavnosti ni bilo mogoče zagnati"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Dodaj bližnjico do aplikacije"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Nastavi ozadje"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sq/strings.xml b/SecondaryDisplayLauncher/res/values-sq/strings.xml
deleted file mode 100644
index e626dd1..0000000
--- a/SecondaryDisplayLauncher/res/values-sq/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Aktiviteti nuk mund të hapej"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Shto shkurtoren e aplikacionit"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Cakto imazhin e sfondit"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sr/strings.xml b/SecondaryDisplayLauncher/res/values-sr/strings.xml
deleted file mode 100644
index 94214f1..0000000
--- a/SecondaryDisplayLauncher/res/values-sr/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Покретање активности није успело"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Додај пречицу за апликацију"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Подесите позадину"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sv/strings.xml b/SecondaryDisplayLauncher/res/values-sv/strings.xml
deleted file mode 100644
index 53e17ef..0000000
--- a/SecondaryDisplayLauncher/res/values-sv/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Det gick inte att starta aktiviteten"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Lägg till appgenväg"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Ange bakgrund"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sw/strings.xml b/SecondaryDisplayLauncher/res/values-sw/strings.xml
deleted file mode 100644
index 490561a..0000000
--- a/SecondaryDisplayLauncher/res/values-sw/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Imeshindwa kuanzisha shughuli"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Ongeza njia ya mkato ya programu"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Weka mandhari"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sw600dp/dimens.xml b/SecondaryDisplayLauncher/res/values-sw600dp/dimens.xml
deleted file mode 100644
index f33a8db..0000000
--- a/SecondaryDisplayLauncher/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources>
- <dimen name="app_picker_width">400dp</dimen>
- <dimen name="app_picker_height">400dp</dimen>
- <dimen name="app_picker_fab_margin">60dp</dimen>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-sw720dp/dimens.xml b/SecondaryDisplayLauncher/res/values-sw720dp/dimens.xml
deleted file mode 100644
index 524e52a..0000000
--- a/SecondaryDisplayLauncher/res/values-sw720dp/dimens.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources>
- <dimen name="app_picker_width">660dp</dimen>
- <dimen name="app_picker_height">660dp</dimen>
- <dimen name="app_picker_fab_margin">70dp</dimen>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ta/strings.xml b/SecondaryDisplayLauncher/res/values-ta/strings.xml
deleted file mode 100644
index 6bb054a..0000000
--- a/SecondaryDisplayLauncher/res/values-ta/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"நடவடிக்கையைத் துவக்க இயலவில்லை"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ஆப்ஸ் ஷார்ட்கட்டைச் சேர்"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"வால்பேப்பரை அமை"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-te/strings.xml b/SecondaryDisplayLauncher/res/values-te/strings.xml
deleted file mode 100644
index 3dd3c9b..0000000
--- a/SecondaryDisplayLauncher/res/values-te/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"కార్యకలాపాన్ని ప్రారంభించడం సాధ్యం కాలేదు"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"యాప్ షార్ట్కట్ని జోడించు"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"వాల్పేపర్ను సెట్ చేయండి"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-th/strings.xml b/SecondaryDisplayLauncher/res/values-th/strings.xml
deleted file mode 100644
index 6368950..0000000
--- a/SecondaryDisplayLauncher/res/values-th/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"เปิดกิจกรรมไม่ได้"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"เพิ่มทางลัดของแอป"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"ตั้งวอลเปเปอร์"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-tl/strings.xml b/SecondaryDisplayLauncher/res/values-tl/strings.xml
deleted file mode 100644
index 192e5c4..0000000
--- a/SecondaryDisplayLauncher/res/values-tl/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Hindi mailunsad ang aktibidad"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Magdagdag ng shortcut ng app"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Magtakda ng wallpaper"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-tr/strings.xml b/SecondaryDisplayLauncher/res/values-tr/strings.xml
deleted file mode 100644
index e7ed998..0000000
--- a/SecondaryDisplayLauncher/res/values-tr/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"İşlem başlatılamadı"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Uygulama kısayolu ekle"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Duvar kağıdı ayarla"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-uk/strings.xml b/SecondaryDisplayLauncher/res/values-uk/strings.xml
deleted file mode 100644
index e465995..0000000
--- a/SecondaryDisplayLauncher/res/values-uk/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Не вдалося запустити активність"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Розмістити ярлик додатка"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Вибрати фоновий малюнок"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-ur/strings.xml b/SecondaryDisplayLauncher/res/values-ur/strings.xml
deleted file mode 100644
index e4c8641..0000000
--- a/SecondaryDisplayLauncher/res/values-ur/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"سرگرمی کو شروع نہیں کیا جا سکا"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"ایپ شارٹ کٹ شامل کریں"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"وال پیپر سیٹ کریں"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-uz/strings.xml b/SecondaryDisplayLauncher/res/values-uz/strings.xml
deleted file mode 100644
index 585739d..0000000
--- a/SecondaryDisplayLauncher/res/values-uz/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Faollik ishga tushmadi"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Yorliq yaratish"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Fonga rasm oʻrnatish"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-vi/strings.xml b/SecondaryDisplayLauncher/res/values-vi/strings.xml
deleted file mode 100644
index 15a1a44..0000000
--- a/SecondaryDisplayLauncher/res/values-vi/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Không thể chạy hoạt động"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Thêm lối tắt ứng dụng"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Đặt hình nền"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-zh-rCN/strings.xml b/SecondaryDisplayLauncher/res/values-zh-rCN/strings.xml
deleted file mode 100644
index 3358499..0000000
--- a/SecondaryDisplayLauncher/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"无法启动该操作组件"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"添加应用快捷方式"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"设置壁纸"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-zh-rHK/strings.xml b/SecondaryDisplayLauncher/res/values-zh-rHK/strings.xml
deleted file mode 100644
index bf76f29..0000000
--- a/SecondaryDisplayLauncher/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"無法啟動活動"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"新增應用程式捷徑"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"設定桌布"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-zh-rTW/strings.xml b/SecondaryDisplayLauncher/res/values-zh-rTW/strings.xml
deleted file mode 100644
index c02fe2c..0000000
--- a/SecondaryDisplayLauncher/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"無法啟動活動"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"新增應用程式捷徑"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"套用桌布"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values-zu/strings.xml b/SecondaryDisplayLauncher/res/values-zu/strings.xml
deleted file mode 100644
index ad2f6b9..0000000
--- a/SecondaryDisplayLauncher/res/values-zu/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch" msgid="7873588052226763866">"Ayikwazanga ukuqalisa umsebenzi"</string>
- <string name="add_app_shortcut" msgid="2756755330707509435">"Engeza isinqamuleli sohlelo lokusebenza"</string>
- <string name="set_wallpaper" msgid="6475195450505435904">"Setha isithombe sangemuva"</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values/colors.xml b/SecondaryDisplayLauncher/res/values/colors.xml
deleted file mode 100644
index 66b41a2..0000000
--- a/SecondaryDisplayLauncher/res/values/colors.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <color name="launcher_bg_color">#884e8391</color>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values/dimens.xml b/SecondaryDisplayLauncher/res/values/dimens.xml
deleted file mode 100644
index 7cca607..0000000
--- a/SecondaryDisplayLauncher/res/values/dimens.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<resources>
- <dimen name="app_list_col_width">72dp</dimen>
- <dimen name="app_list_horizontal_spacing">24dp</dimen>
- <dimen name="app_list_vertical_spacing">24dp</dimen>
- <dimen name="app_icon_width">64dp</dimen>
- <dimen name="app_icon_height">64dp</dimen>
- <dimen name="app_grid_margin_top">24dp</dimen>
- <dimen name="app_grid_margin_left">8dp</dimen>
- <dimen name="app_grid_margin_right">8dp</dimen>
-
- <dimen name="app_picker_width">300dp</dimen>
- <dimen name="app_picker_height">300dp</dimen>
- <dimen name="app_picker_fab_margin">20dp</dimen>
- <dimen name="options_button_margin">20dp</dimen>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values/strings.xml b/SecondaryDisplayLauncher/res/values/strings.xml
deleted file mode 100644
index b68918a..0000000
--- a/SecondaryDisplayLauncher/res/values/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="couldnt_launch">Couldn\'t launch the activity</string>
- <string name="add_app_shortcut">Add app shortcut</string>
- <string name="set_wallpaper">Set wallpaper</string>
-</resources>
diff --git a/SecondaryDisplayLauncher/res/values/styles.xml b/SecondaryDisplayLauncher/res/values/styles.xml
deleted file mode 100644
index 4e41a98..0000000
--- a/SecondaryDisplayLauncher/res/values/styles.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-* Copyright (C) 2018 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
--->
-
-<resources>
- <style name="SecondaryLauncherTheme" parent="Theme.MaterialComponents.NoActionBar" >
- <item name="android:windowShowWallpaper">true</item>
- <item name="android:windowNoTitle">true</item>
- <item name="android:windowIsTranslucent">true</item>
- <item name="android:windowTranslucentStatus">true</item>
- <item name="android:windowTranslucentNavigation">true</item>
- <item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:windowBackground">@android:color/transparent</item>
- </style>
-</resources>
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/AppEntry.java b/SecondaryDisplayLauncher/src/com/android/launcher3/AppEntry.java
deleted file mode 100644
index 3017b81..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/AppEntry.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.graphics.drawable.Drawable;
-
-/** An entry that represents a single activity that can be launched. */
-public class AppEntry {
-
- private String mLabel;
- private Drawable mIcon;
- private Intent mLaunchIntent;
-
- AppEntry(ResolveInfo info, PackageManager packageManager) {
- mLabel = info.loadLabel(packageManager).toString();
- mIcon = info.loadIcon(packageManager);
- mLaunchIntent = new Intent();
- mLaunchIntent.setComponent(new ComponentName(info.activityInfo.packageName,
- info.activityInfo.name));
- }
-
- String getLabel() {
- return mLabel;
- }
-
- Drawable getIcon() {
- return mIcon;
- }
-
- Intent getLaunchIntent() { return mLaunchIntent; }
-
- ComponentName getComponentName() {
- return mLaunchIntent.getComponent();
- }
-
- @Override
- public String toString() {
- return mLabel;
- }
-}
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/AppListAdapter.java b/SecondaryDisplayLauncher/src/com/android/launcher3/AppListAdapter.java
deleted file mode 100644
index aa115cb..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/AppListAdapter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.android.launcher3.R;
-
-import java.util.List;
-
-/** Adapter for available apps list. */
-public class AppListAdapter extends ArrayAdapter<AppEntry> {
- private final LayoutInflater mInflater;
-
- AppListAdapter(Context context) {
- super(context, android.R.layout.simple_list_item_2);
- mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- }
-
- void setData(List<AppEntry> data) {
- clear();
- if (data != null) {
- addAll(data);
- }
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View view;
-
- if (convertView == null) {
- view = mInflater.inflate(R.layout.app_grid_item, parent, false);
- } else {
- view = convertView;
- }
-
- AppEntry item = getItem(position);
- ((ImageView)view.findViewById(R.id.app_icon)).setImageDrawable(item.getIcon());
- ((TextView)view.findViewById(R.id.app_name)).setText(item.getLabel());
-
- return view;
- }
-}
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/AppListViewModel.java b/SecondaryDisplayLauncher/src/com/android/launcher3/AppListViewModel.java
deleted file mode 100644
index 914fd5e..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/AppListViewModel.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import android.app.Application;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.os.AsyncTask;
-
-import androidx.lifecycle.AndroidViewModel;
-import androidx.lifecycle.LiveData;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A view model that provides a list of activities that can be launched.
- */
-public class AppListViewModel extends AndroidViewModel {
-
- private final AppListLiveData mLiveData;
- private final PackageIntentReceiver
- mPackageIntentReceiver;
-
- public AppListViewModel(Application application) {
- super(application);
- mLiveData = new AppListLiveData(application);
- mPackageIntentReceiver = new PackageIntentReceiver(mLiveData, application);
- }
-
- public LiveData<List<AppEntry>> getAppList() {
- return mLiveData;
- }
-
- protected void onCleared() {
- getApplication().unregisterReceiver(mPackageIntentReceiver);
- }
-}
-
-class AppListLiveData extends LiveData<List<AppEntry>> {
-
- private final PackageManager mPackageManager;
- private int mCurrentDataVersion;
-
- public AppListLiveData(Context context) {
- mPackageManager = context.getPackageManager();
- loadData();
- }
-
- void loadData() {
- final int loadDataVersion = ++mCurrentDataVersion;
-
- new AsyncTask<Void, Void, List<AppEntry>>() {
- @Override
- protected List<AppEntry> doInBackground(Void... voids) {
- Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
- mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
-
- List<ResolveInfo> apps = mPackageManager.queryIntentActivities(mainIntent,
- PackageManager.GET_META_DATA);
-
- List<AppEntry> entries = new ArrayList<>();
- if (apps != null) {
- for (ResolveInfo app : apps) {
- AppEntry entry = new AppEntry(app, mPackageManager);
- entries.add(entry);
- }
- }
- return entries;
- }
-
- @Override
- protected void onPostExecute(List<AppEntry> data) {
- if (mCurrentDataVersion == loadDataVersion) {
- setValue(data);
- }
- }
- }.execute();
- }
-}
-
-/**
- * Receiver used to notify live data about app list changes.
- */
-class PackageIntentReceiver extends BroadcastReceiver {
-
- private final AppListLiveData mLiveData;
-
- public PackageIntentReceiver(AppListLiveData liveData, Context context) {
- mLiveData = liveData;
- IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
- filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
- filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
- filter.addDataScheme("package");
- context.registerReceiver(this, filter);
-
- // Register for events related to sdcard installation.
- IntentFilter sdFilter = new IntentFilter();
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
- context.registerReceiver(this, sdFilter);
- }
-
- @Override
- public void onReceive(Context context, Intent intent) {
- mLiveData.loadData();
- }
-}
\ No newline at end of file
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppListViewModel.java b/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppListViewModel.java
deleted file mode 100644
index 4f92038..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppListViewModel.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import static com.android.launcher3.PinnedAppListViewModel.PINNED_APPS_KEY;
-
-import android.app.Application;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.os.AsyncTask;
-
-import androidx.lifecycle.AndroidViewModel;
-import androidx.lifecycle.LiveData;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-/**
- * A view model that provides a list of activities that were pinned by user to always display on
- * home screen.
- * The pinned activities are stored in {@link SharedPreferences} to keep the sample simple :).
- */
-public class PinnedAppListViewModel extends AndroidViewModel {
-
- final static String PINNED_APPS_KEY = "pinned_apps";
-
- private final PinnedAppListLiveData mLiveData;
-
- public PinnedAppListViewModel(Application application) {
- super(application);
- mLiveData = new PinnedAppListLiveData(application);
- }
-
- public LiveData<List<AppEntry>> getPinnedAppList() {
- return mLiveData;
- }
-}
-
-class PinnedAppListLiveData extends LiveData<List<AppEntry>> {
-
- private final Context mContext;
- private final PackageManager mPackageManager;
- // Store listener reference, so it won't be GC-ed.
- private final SharedPreferences.OnSharedPreferenceChangeListener mChangeListener;
- private int mCurrentDataVersion;
-
- public PinnedAppListLiveData(Context context) {
- mContext = context;
- mPackageManager = context.getPackageManager();
-
- final SharedPreferences prefs = context.getSharedPreferences(PINNED_APPS_KEY, 0);
- mChangeListener = (preferences, key) -> {
- loadData();
- };
- prefs.registerOnSharedPreferenceChangeListener(mChangeListener);
-
- loadData();
- }
-
- private void loadData() {
- final int loadDataVersion = ++mCurrentDataVersion;
-
- new AsyncTask<Void, Void, List<AppEntry>>() {
- @Override
- protected List<AppEntry> doInBackground(Void... voids) {
- List<AppEntry> entries = new ArrayList<>();
-
- final SharedPreferences sp = mContext.getSharedPreferences(PINNED_APPS_KEY, 0);
- final Set<String> pinnedAppsComponents = sp.getStringSet(PINNED_APPS_KEY, null);
- if (pinnedAppsComponents == null) {
- return null;
- }
-
- for (String componentString : pinnedAppsComponents) {
- final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
- mainIntent.setComponent(ComponentName.unflattenFromString(componentString));
- mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
-
- final List<ResolveInfo> apps = mPackageManager.queryIntentActivities(mainIntent,
- PackageManager.GET_META_DATA);
-
- if (apps != null) {
- for (ResolveInfo app : apps) {
- final AppEntry entry = new AppEntry(app, mPackageManager);
- entries.add(entry);
- }
- }
- }
-
- return entries;
- }
-
- @Override
- protected void onPostExecute(List<AppEntry> data) {
- if (mCurrentDataVersion == loadDataVersion) {
- setValue(data);
- }
- }
- }.execute();
- }
-}
\ No newline at end of file
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppPickerDialog.java b/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppPickerDialog.java
deleted file mode 100644
index 02e6e4a..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/PinnedAppPickerDialog.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.GridView;
-
-import androidx.fragment.app.DialogFragment;
-
-import com.android.launcher3.R;
-
-/**
- * Callback to be invoked when an app was picked.
- */
-interface AppPickedCallback {
- void onAppPicked(AppEntry appEntry);
-}
-
-/**
- * Dialog that provides the user with a list of available apps to pin to the home screen.
- */
-public class PinnedAppPickerDialog extends DialogFragment {
-
- private AppListAdapter mAppListAdapter;
- private AppPickedCallback mAppPickerCallback;
-
- public PinnedAppPickerDialog() {
- }
-
- public static PinnedAppPickerDialog newInstance(AppListAdapter appListAdapter,
- AppPickedCallback callback) {
- PinnedAppPickerDialog
- frag = new PinnedAppPickerDialog();
- frag.mAppListAdapter = appListAdapter;
- frag.mAppPickerCallback = callback;
- return frag;
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- return inflater.inflate(R.layout.app_picker_dialog, container);
- }
-
- @Override
- public void onViewCreated(View view, Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
-
- GridView appGridView = view.findViewById(R.id.picker_app_grid);
- appGridView.setAdapter(mAppListAdapter);
- appGridView.setOnItemClickListener((adapterView, itemView, position, id) -> {
- final AppEntry entry = mAppListAdapter.getItem(position);
- mAppPickerCallback.onAppPicked(entry);
- dismiss();
- });
- }
-}
\ No newline at end of file
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java b/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java
deleted file mode 100644
index 0a2f18f..0000000
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * Copyright (c) 2018 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.launcher3;
-
-import static com.android.launcher3.PinnedAppListViewModel.PINNED_APPS_KEY;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.app.AlertDialog;
-import android.app.Application;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.res.Configuration;
-import android.os.Bundle;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewAnimationUtils;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.GridView;
-import android.widget.ImageButton;
-import android.widget.PopupMenu;
-
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentManager;
-import androidx.lifecycle.ViewModelProvider;
-import androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory;
-
-import com.google.android.material.circularreveal.cardview.CircularRevealCardView;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Secondary launcher activity. It's launch mode is configured as "singleTop" to allow showing on
- * multiple displays and to ensure a single instance per each display.
- */
-public class SecondaryDisplayLauncher extends FragmentActivity implements AppPickedCallback,
- PopupMenu.OnMenuItemClickListener {
-
- private AppListAdapter mAppListAdapter;
- private AppListAdapter mPinnedAppListAdapter;
- private CircularRevealCardView mAppDrawerView;
- private FloatingActionButton mFab;
-
- private boolean mAppDrawerShown;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.secondary_display_launcher);
-
- mAppDrawerView = findViewById(R.id.FloatingSheet);
- mFab = findViewById(R.id.FloatingActionButton);
-
- mFab.setOnClickListener((View v) -> {
- showAppDrawer(true);
- });
-
- final ViewModelProvider viewModelProvider = new ViewModelProvider(getViewModelStore(),
- new AndroidViewModelFactory((Application) getApplicationContext()));
-
- mPinnedAppListAdapter = new AppListAdapter(this);
- final GridView pinnedAppGridView = findViewById(R.id.pinned_app_grid);
- pinnedAppGridView.setAdapter(mPinnedAppListAdapter);
- pinnedAppGridView.setOnItemClickListener((adapterView, view, position, id) -> {
- final AppEntry entry = mPinnedAppListAdapter.getItem(position);
- launch(entry.getLaunchIntent());
- });
- final PinnedAppListViewModel pinnedAppListViewModel =
- viewModelProvider.get(PinnedAppListViewModel.class);
- pinnedAppListViewModel.getPinnedAppList().observe(this, data -> {
- mPinnedAppListAdapter.setData(data);
- });
-
- mAppListAdapter = new AppListAdapter(this);
- final GridView appGridView = findViewById(R.id.app_grid);
- appGridView.setAdapter(mAppListAdapter);
- appGridView.setOnItemClickListener((adapterView, view, position, id) -> {
- final AppEntry entry = mAppListAdapter.getItem(position);
- launch(entry.getLaunchIntent());
- });
- final AppListViewModel appListViewModel = viewModelProvider.get(AppListViewModel.class);
- appListViewModel.getAppList().observe(this, data -> {
- mAppListAdapter.setData(data);
- });
-
- ImageButton optionsButton = findViewById(R.id.OptionsButton);
- optionsButton.setOnClickListener((View v) -> {
- PopupMenu popup = new PopupMenu(this,v);
- popup.setOnMenuItemClickListener(this);
- MenuInflater inflater = popup.getMenuInflater();
- inflater.inflate(R.menu.context_menu, popup.getMenu());
- popup.show();
- });
- }
-
- @Override
- public boolean onMenuItemClick(MenuItem item) {
- // Respond to picking one of the popup menu items.
- final int id = item.getItemId();
- if (id == R.id.add_app_shortcut) {
- FragmentManager fm = getSupportFragmentManager();
- PinnedAppPickerDialog pickerDialogFragment =
- PinnedAppPickerDialog.newInstance(mAppListAdapter, this);
- pickerDialogFragment.show(fm, "fragment_app_picker");
- return true;
- } else if (id == R.id.set_wallpaper) {
- Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
- startActivity(Intent.createChooser(intent, getString(R.string.set_wallpaper)));
- return true;
- }
-
- return true;
- }
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- showAppDrawer(false);
- }
-
- public void onBackPressed() {
- // If the app drawer was shown - hide it. Otherwise, not doing anything since we don't want
- // to close the launcher.
- showAppDrawer(false);
- }
-
- public void onNewIntent(Intent intent) {
- super.onNewIntent(intent);
-
- if (Intent.ACTION_MAIN.equals(intent.getAction())) {
- // Hide keyboard.
- final View v = getWindow().peekDecorView();
- if (v != null && v.getWindowToken() != null) {
- getSystemService(InputMethodManager.class).hideSoftInputFromWindow(
- v.getWindowToken(), 0);
- }
- }
-
- // A new intent will bring the launcher to top. Hide the app drawer to reset the state.
- showAppDrawer(false);
- }
-
- void launch(Intent launchIntent) {
- launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- try {
- startActivity(launchIntent);
- } catch (Exception e) {
- final AlertDialog.Builder builder =
- new AlertDialog.Builder(this, android.R.style.Theme_Material_Dialog_Alert);
- builder.setTitle(R.string.couldnt_launch)
- .setMessage(e.getLocalizedMessage())
- .setIcon(android.R.drawable.ic_dialog_alert)
- .show();
- }
- }
-
- /**
- * Store the picked app to persistent pinned list and update the loader.
- */
- @Override
- public void onAppPicked(AppEntry appEntry) {
- final SharedPreferences sp = getSharedPreferences(PINNED_APPS_KEY, 0);
- Set<String> pinnedApps = sp.getStringSet(PINNED_APPS_KEY, null);
- if (pinnedApps == null) {
- pinnedApps = new HashSet<String>();
- } else {
- // Always need to create a new object to make sure that the changes are persisted.
- pinnedApps = new HashSet<String>(pinnedApps);
- }
- pinnedApps.add(appEntry.getComponentName().flattenToString());
-
- final SharedPreferences.Editor editor = sp.edit();
- editor.putStringSet(PINNED_APPS_KEY, pinnedApps);
- editor.apply();
- }
-
- /**
- * Show/hide app drawer card with animation.
- */
- private void showAppDrawer(boolean show) {
- if (show == mAppDrawerShown) {
- return;
- }
-
- final Animator animator = revealAnimator(mAppDrawerView, show);
- if (show) {
- mAppDrawerShown = true;
- mAppDrawerView.setVisibility(View.VISIBLE);
- mFab.setVisibility(View.INVISIBLE);
- } else {
- mAppDrawerShown = false;
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mAppDrawerView.setVisibility(View.INVISIBLE);
- mFab.setVisibility(View.VISIBLE);
- }
- });
- }
- animator.start();
- }
-
- /**
- * Create reveal/hide animator for app list card.
- */
- private Animator revealAnimator(View view, boolean open) {
- final int radius = (int) Math.hypot((double) view.getWidth(), (double) view.getHeight());
- return ViewAnimationUtils.createCircularReveal(view, view.getRight(), view.getBottom(),
- open ? 0 : radius, open ? radius : 0);
- }
-}
diff --git a/iconloaderlib/Android.bp b/iconloaderlib/Android.bp
deleted file mode 100644
index f12d16e..0000000
--- a/iconloaderlib/Android.bp
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2018 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.
-
-android_library {
- name: "iconloader_base",
- sdk_version: "28",
- min_sdk_version: "21",
- static_libs: [
- "androidx.core_core",
- ],
- resource_dirs: [
- "res",
- ],
- srcs: [
- "src/**/*.java",
- ],
-}
-
-android_library {
- name: "iconloader",
- sdk_version: "system_current",
- min_sdk_version: "21",
- static_libs: [
- "androidx.core_core",
- ],
- resource_dirs: [
- "res",
- ],
- srcs: [
- "src/**/*.java",
- "src_full_lib/**/*.java",
- ],
-}
diff --git a/iconloaderlib/AndroidManifest.xml b/iconloaderlib/AndroidManifest.xml
deleted file mode 100644
index b30258d..0000000
--- a/iconloaderlib/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.launcher3.icons">
-</manifest>
diff --git a/iconloaderlib/build.gradle b/iconloaderlib/build.gradle
deleted file mode 100644
index d7a62e1..0000000
--- a/iconloaderlib/build.gradle
+++ /dev/null
@@ -1,38 +0,0 @@
-apply plugin: 'com.android.library'
-
-android {
- compileSdkVersion COMPILE_SDK
- buildToolsVersion BUILD_TOOLS_VERSION
-
- defaultConfig {
- minSdkVersion 25
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
- }
-
- sourceSets {
- main {
- java.srcDirs = ['src', 'src_full_lib']
- manifest.srcFile 'AndroidManifest.xml'
- res.srcDirs = ['res']
- }
- }
-
- lintOptions {
- abortOnError false
- }
-
- tasks.withType(JavaCompile) {
- options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-}
-
-dependencies {
- implementation "androidx.core:core:${ANDROID_X_VERSION}"
-}
diff --git a/iconloaderlib/res/drawable-v26/adaptive_icon_drawable_wrapper.xml b/iconloaderlib/res/drawable-v26/adaptive_icon_drawable_wrapper.xml
deleted file mode 100644
index 9f13cf5..0000000
--- a/iconloaderlib/res/drawable-v26/adaptive_icon_drawable_wrapper.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2017 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.
--->
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@color/legacy_icon_background"/>
- <foreground>
- <com.android.launcher3.icons.FixedScaleDrawable />
- </foreground>
-</adaptive-icon>
diff --git a/iconloaderlib/res/drawable/ic_instant_app_badge.xml b/iconloaderlib/res/drawable/ic_instant_app_badge.xml
deleted file mode 100644
index b74317e..0000000
--- a/iconloaderlib/res/drawable/ic_instant_app_badge.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/profile_badge_size"
- android:height="@dimen/profile_badge_size"
- android:viewportWidth="18"
- android:viewportHeight="18">
-
- <path
- android:fillColor="@android:color/black"
- android:strokeWidth="1"
- android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
- <path
- android:fillColor="@android:color/white"
- android:strokeWidth="1"
- android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
- <path
- android:fillColor="@android:color/white"
- android:strokeWidth="1"
- android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
- <path
- android:fillColor="@android:color/black"
- android:fillAlpha="0.87"
- android:strokeWidth="1"
- android:pathData="M 6 10.4123279 L 8.63934949 10.4123279 L 8.63934949 15.6 L 12.5577168 7.84517705 L 9.94547194 7.84517705 L 9.94547194 2 Z" />
-</vector>
diff --git a/iconloaderlib/res/values/colors.xml b/iconloaderlib/res/values/colors.xml
deleted file mode 100644
index 873b2fc..0000000
--- a/iconloaderlib/res/values/colors.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <color name="legacy_icon_background">#FFFFFF</color>
-</resources>
diff --git a/iconloaderlib/res/values/config.xml b/iconloaderlib/res/values/config.xml
deleted file mode 100644
index 68c2d2e..0000000
--- a/iconloaderlib/res/values/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
-
- <!-- Various configurations to control the simple cache implementation -->
-
- <dimen name="default_icon_bitmap_size">56dp</dimen>
- <bool name="simple_cache_enable_im_memory">false</bool>
- <string name="cache_db_name" translatable="false">app_icons.db</string>
-
-</resources>
\ No newline at end of file
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
deleted file mode 100644
index 31a923e..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
+++ /dev/null
@@ -1,396 +0,0 @@
-package com.android.launcher3.icons;
-
-import static android.graphics.Paint.DITHER_FLAG;
-import static android.graphics.Paint.FILTER_BITMAP_FLAG;
-
-import static com.android.launcher3.icons.ShadowGenerator.BLUR_FACTOR;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.PaintFlagsDrawFilter;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.drawable.AdaptiveIconDrawable;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
-import android.os.Process;
-import android.os.UserHandle;
-
-import androidx.annotation.NonNull;
-
-/**
- * This class will be moved to androidx library. There shouldn't be any dependency outside
- * this package.
- */
-public class BaseIconFactory implements AutoCloseable {
-
- private static final String TAG = "BaseIconFactory";
- private static final int DEFAULT_WRAPPER_BACKGROUND = Color.WHITE;
- static final boolean ATLEAST_OREO = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
- static final boolean ATLEAST_P = Build.VERSION.SDK_INT >= Build.VERSION_CODES.P;
-
- private static final float ICON_BADGE_SCALE = 0.444f;
-
- private final Rect mOldBounds = new Rect();
- protected final Context mContext;
- private final Canvas mCanvas;
- private final PackageManager mPm;
- private final ColorExtractor mColorExtractor;
- private boolean mDisableColorExtractor;
- private boolean mBadgeOnLeft = false;
-
- protected final int mFillResIconDpi;
- protected final int mIconBitmapSize;
-
- private IconNormalizer mNormalizer;
- private ShadowGenerator mShadowGenerator;
- private final boolean mShapeDetection;
-
- private Drawable mWrapperIcon;
- private int mWrapperBackgroundColor = DEFAULT_WRAPPER_BACKGROUND;
-
- protected BaseIconFactory(Context context, int fillResIconDpi, int iconBitmapSize,
- boolean shapeDetection) {
- mContext = context.getApplicationContext();
- mShapeDetection = shapeDetection;
- mFillResIconDpi = fillResIconDpi;
- mIconBitmapSize = iconBitmapSize;
-
- mPm = mContext.getPackageManager();
- mColorExtractor = new ColorExtractor();
-
- mCanvas = new Canvas();
- mCanvas.setDrawFilter(new PaintFlagsDrawFilter(DITHER_FLAG, FILTER_BITMAP_FLAG));
- clear();
- }
-
- protected BaseIconFactory(Context context, int fillResIconDpi, int iconBitmapSize) {
- this(context, fillResIconDpi, iconBitmapSize, false);
- }
-
- protected void clear() {
- mWrapperBackgroundColor = DEFAULT_WRAPPER_BACKGROUND;
- mDisableColorExtractor = false;
- mBadgeOnLeft = false;
- }
-
- public ShadowGenerator getShadowGenerator() {
- if (mShadowGenerator == null) {
- mShadowGenerator = new ShadowGenerator(mIconBitmapSize);
- }
- return mShadowGenerator;
- }
-
- public IconNormalizer getNormalizer() {
- if (mNormalizer == null) {
- mNormalizer = new IconNormalizer(mContext, mIconBitmapSize, mShapeDetection);
- }
- return mNormalizer;
- }
-
- @SuppressWarnings("deprecation")
- public BitmapInfo createIconBitmap(Intent.ShortcutIconResource iconRes) {
- try {
- Resources resources = mPm.getResourcesForApplication(iconRes.packageName);
- if (resources != null) {
- final int id = resources.getIdentifier(iconRes.resourceName, null, null);
- // do not stamp old legacy shortcuts as the app may have already forgotten about it
- return createBadgedIconBitmap(
- resources.getDrawableForDensity(id, mFillResIconDpi),
- Process.myUserHandle() /* only available on primary user */,
- false /* do not apply legacy treatment */);
- }
- } catch (Exception e) {
- // Icon not found.
- }
- return null;
- }
-
- public BitmapInfo createIconBitmap(Bitmap icon) {
- if (mIconBitmapSize != icon.getWidth() || mIconBitmapSize != icon.getHeight()) {
- icon = createIconBitmap(new BitmapDrawable(mContext.getResources(), icon), 1f);
- }
-
- return BitmapInfo.of(icon, extractColor(icon));
- }
-
- public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user,
- boolean shrinkNonAdaptiveIcons) {
- return createBadgedIconBitmap(icon, user, shrinkNonAdaptiveIcons, false, null);
- }
-
- public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user,
- int iconAppTargetSdk) {
- return createBadgedIconBitmap(icon, user, iconAppTargetSdk, false);
- }
-
- public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user,
- int iconAppTargetSdk, boolean isInstantApp) {
- return createBadgedIconBitmap(icon, user, iconAppTargetSdk, isInstantApp, null);
- }
-
- public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user,
- int iconAppTargetSdk, boolean isInstantApp, float[] scale) {
- boolean shrinkNonAdaptiveIcons = ATLEAST_P ||
- (ATLEAST_OREO && iconAppTargetSdk >= Build.VERSION_CODES.O);
- return createBadgedIconBitmap(icon, user, shrinkNonAdaptiveIcons, isInstantApp, scale);
- }
-
- public Bitmap createScaledBitmapWithoutShadow(Drawable icon, int iconAppTargetSdk) {
- boolean shrinkNonAdaptiveIcons = ATLEAST_P ||
- (ATLEAST_OREO && iconAppTargetSdk >= Build.VERSION_CODES.O);
- return createScaledBitmapWithoutShadow(icon, shrinkNonAdaptiveIcons);
- }
-
- /**
- * Creates bitmap using the source drawable and various parameters.
- * The bitmap is visually normalized with other icons and has enough spacing to add shadow.
- *
- * @param icon source of the icon
- * @param user info can be used for a badge
- * @param shrinkNonAdaptiveIcons {@code true} if non adaptive icons should be treated
- * @param isInstantApp info can be used for a badge
- * @param scale returns the scale result from normalization
- * @return a bitmap suitable for disaplaying as an icon at various system UIs.
- */
- public BitmapInfo createBadgedIconBitmap(@NonNull Drawable icon, UserHandle user,
- boolean shrinkNonAdaptiveIcons, boolean isInstantApp, float[] scale) {
- if (scale == null) {
- scale = new float[1];
- }
- icon = normalizeAndWrapToAdaptiveIcon(icon, shrinkNonAdaptiveIcons, null, scale);
- Bitmap bitmap = createIconBitmap(icon, scale[0]);
- if (ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) {
- mCanvas.setBitmap(bitmap);
- getShadowGenerator().recreateIcon(Bitmap.createBitmap(bitmap), mCanvas);
- mCanvas.setBitmap(null);
- }
-
- if (isInstantApp) {
- badgeWithDrawable(bitmap, mContext.getDrawable(R.drawable.ic_instant_app_badge));
- }
- if (user != null) {
- BitmapDrawable drawable = new FixedSizeBitmapDrawable(bitmap);
- Drawable badged = mPm.getUserBadgedIcon(drawable, user);
- if (badged instanceof BitmapDrawable) {
- bitmap = ((BitmapDrawable) badged).getBitmap();
- } else {
- bitmap = createIconBitmap(badged, 1f);
- }
- }
- int color = extractColor(bitmap);
- return icon instanceof BitmapInfo.Extender
- ? ((BitmapInfo.Extender) icon).getExtendedInfo(bitmap, color, this)
- : BitmapInfo.of(bitmap, color);
- }
-
- public Bitmap createScaledBitmapWithoutShadow(Drawable icon, boolean shrinkNonAdaptiveIcons) {
- RectF iconBounds = new RectF();
- float[] scale = new float[1];
- icon = normalizeAndWrapToAdaptiveIcon(icon, shrinkNonAdaptiveIcons, iconBounds, scale);
- return createIconBitmap(icon,
- Math.min(scale[0], ShadowGenerator.getScaleForBounds(iconBounds)));
- }
-
- /**
- * Switches badging to left/right
- */
- public void setBadgeOnLeft(boolean badgeOnLeft) {
- mBadgeOnLeft = badgeOnLeft;
- }
-
- /**
- * Sets the background color used for wrapped adaptive icon
- */
- public void setWrapperBackgroundColor(int color) {
- mWrapperBackgroundColor = (Color.alpha(color) < 255) ? DEFAULT_WRAPPER_BACKGROUND : color;
- }
-
- /**
- * Disables the dominant color extraction for all icons loaded.
- */
- public void disableColorExtraction() {
- mDisableColorExtractor = true;
- }
-
- private Drawable normalizeAndWrapToAdaptiveIcon(@NonNull Drawable icon,
- boolean shrinkNonAdaptiveIcons, RectF outIconBounds, float[] outScale) {
- if (icon == null) {
- return null;
- }
- float scale = 1f;
-
- if (shrinkNonAdaptiveIcons && ATLEAST_OREO) {
- if (mWrapperIcon == null) {
- mWrapperIcon = mContext.getDrawable(R.drawable.adaptive_icon_drawable_wrapper)
- .mutate();
- }
- AdaptiveIconDrawable dr = (AdaptiveIconDrawable) mWrapperIcon;
- dr.setBounds(0, 0, 1, 1);
- boolean[] outShape = new boolean[1];
- scale = getNormalizer().getScale(icon, outIconBounds, dr.getIconMask(), outShape);
- if (!(icon instanceof AdaptiveIconDrawable) && !outShape[0]) {
- FixedScaleDrawable fsd = ((FixedScaleDrawable) dr.getForeground());
- fsd.setDrawable(icon);
- fsd.setScale(scale);
- icon = dr;
- scale = getNormalizer().getScale(icon, outIconBounds, null, null);
-
- ((ColorDrawable) dr.getBackground()).setColor(mWrapperBackgroundColor);
- }
- } else {
- scale = getNormalizer().getScale(icon, outIconBounds, null, null);
- }
-
- outScale[0] = scale;
- return icon;
- }
-
- /**
- * Adds the {@param badge} on top of {@param target} using the badge dimensions.
- */
- public void badgeWithDrawable(Bitmap target, Drawable badge) {
- mCanvas.setBitmap(target);
- badgeWithDrawable(mCanvas, badge);
- mCanvas.setBitmap(null);
- }
-
- /**
- * Adds the {@param badge} on top of {@param target} using the badge dimensions.
- */
- public void badgeWithDrawable(Canvas target, Drawable badge) {
- int badgeSize = getBadgeSizeForIconSize(mIconBitmapSize);
- if (mBadgeOnLeft) {
- badge.setBounds(0, mIconBitmapSize - badgeSize, badgeSize, mIconBitmapSize);
- } else {
- badge.setBounds(mIconBitmapSize - badgeSize, mIconBitmapSize - badgeSize,
- mIconBitmapSize, mIconBitmapSize);
- }
- badge.draw(target);
- }
-
- private Bitmap createIconBitmap(Drawable icon, float scale) {
- return createIconBitmap(icon, scale, mIconBitmapSize);
- }
-
- /**
- * @param icon drawable that should be flattened to a bitmap
- * @param scale the scale to apply before drawing {@param icon} on the canvas
- */
- public Bitmap createIconBitmap(@NonNull Drawable icon, float scale, int size) {
- Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- if (icon == null) {
- return bitmap;
- }
- mCanvas.setBitmap(bitmap);
- mOldBounds.set(icon.getBounds());
-
- if (ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) {
- int offset = Math.max((int) Math.ceil(BLUR_FACTOR * size),
- Math.round(size * (1 - scale) / 2 ));
- icon.setBounds(offset, offset, size - offset, size - offset);
- icon.draw(mCanvas);
- } else {
- if (icon instanceof BitmapDrawable) {
- BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
- Bitmap b = bitmapDrawable.getBitmap();
- if (bitmap != null && b.getDensity() == Bitmap.DENSITY_NONE) {
- bitmapDrawable.setTargetDensity(mContext.getResources().getDisplayMetrics());
- }
- }
- int width = size;
- int height = size;
-
- int intrinsicWidth = icon.getIntrinsicWidth();
- int intrinsicHeight = icon.getIntrinsicHeight();
- if (intrinsicWidth > 0 && intrinsicHeight > 0) {
- // Scale the icon proportionally to the icon dimensions
- final float ratio = (float) intrinsicWidth / intrinsicHeight;
- if (intrinsicWidth > intrinsicHeight) {
- height = (int) (width / ratio);
- } else if (intrinsicHeight > intrinsicWidth) {
- width = (int) (height * ratio);
- }
- }
- final int left = (size - width) / 2;
- final int top = (size - height) / 2;
- icon.setBounds(left, top, left + width, top + height);
- mCanvas.save();
- mCanvas.scale(scale, scale, size / 2, size / 2);
- icon.draw(mCanvas);
- mCanvas.restore();
-
- }
- icon.setBounds(mOldBounds);
- mCanvas.setBitmap(null);
- return bitmap;
- }
-
- @Override
- public void close() {
- clear();
- }
-
- public BitmapInfo makeDefaultIcon(UserHandle user) {
- return createBadgedIconBitmap(getFullResDefaultActivityIcon(mFillResIconDpi),
- user, Build.VERSION.SDK_INT);
- }
-
- public static Drawable getFullResDefaultActivityIcon(int iconDpi) {
- return Resources.getSystem().getDrawableForDensity(
- Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
- ? android.R.drawable.sym_def_app_icon : android.R.mipmap.sym_def_app_icon,
- iconDpi);
- }
-
- /**
- * Badges the provided source with the badge info
- */
- public BitmapInfo badgeBitmap(Bitmap source, BitmapInfo badgeInfo) {
- Bitmap icon = BitmapRenderer.createHardwareBitmap(mIconBitmapSize, mIconBitmapSize, (c) -> {
- getShadowGenerator().recreateIcon(source, c);
- badgeWithDrawable(c, new FixedSizeBitmapDrawable(badgeInfo.icon));
- });
- return BitmapInfo.of(icon, badgeInfo.color);
- }
-
- private int extractColor(Bitmap bitmap) {
- return mDisableColorExtractor ? 0 : mColorExtractor.findDominantColorByHue(bitmap);
- }
-
- /**
- * Returns the correct badge size given an icon size
- */
- public static int getBadgeSizeForIconSize(int iconSize) {
- return (int) (ICON_BADGE_SCALE * iconSize);
- }
-
- /**
- * An extension of {@link BitmapDrawable} which returns the bitmap pixel size as intrinsic size.
- * This allows the badging to be done based on the action bitmap size rather than
- * the scaled bitmap size.
- */
- private static class FixedSizeBitmapDrawable extends BitmapDrawable {
-
- public FixedSizeBitmapDrawable(Bitmap bitmap) {
- super(null, bitmap);
- }
-
- @Override
- public int getIntrinsicHeight() {
- return getBitmap().getWidth();
- }
-
- @Override
- public int getIntrinsicWidth() {
- return getBitmap().getWidth();
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BitmapInfo.java b/iconloaderlib/src/com/android/launcher3/icons/BitmapInfo.java
deleted file mode 100644
index d33f9b1..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/BitmapInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2017 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.launcher3.icons;
-
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
-
-import androidx.annotation.NonNull;
-
-public class BitmapInfo {
-
- public static final Bitmap LOW_RES_ICON = Bitmap.createBitmap(1, 1, Config.ALPHA_8);
- public static final BitmapInfo LOW_RES_INFO = fromBitmap(LOW_RES_ICON);
-
- public final Bitmap icon;
- public final int color;
-
- public BitmapInfo(Bitmap icon, int color) {
- this.icon = icon;
- this.color = color;
- }
-
- /**
- * Ideally icon should not be null, except in cases when generating hardware bitmap failed
- */
- public final boolean isNullOrLowRes() {
- return icon == null || icon == LOW_RES_ICON;
- }
-
- public final boolean isLowRes() {
- return LOW_RES_ICON == icon;
- }
-
- public static BitmapInfo fromBitmap(@NonNull Bitmap bitmap) {
- return of(bitmap, 0);
- }
-
- public static BitmapInfo of(@NonNull Bitmap bitmap, int color) {
- return new BitmapInfo(bitmap, color);
- }
-
- /**
- * Interface to be implemented by drawables to provide a custom BitmapInfo
- */
- public interface Extender {
-
- /**
- * Called for creating a custom BitmapInfo
- */
- default BitmapInfo getExtendedInfo(Bitmap bitmap, int color, BaseIconFactory iconFactory) {
- return BitmapInfo.of(bitmap, color);
- }
-
- /**
- * Notifies the drawable that it will be drawn directly in the UI, without any preprocessing
- */
- default void prepareToDrawOnUi() { }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BitmapRenderer.java b/iconloaderlib/src/com/android/launcher3/icons/BitmapRenderer.java
deleted file mode 100644
index 5751ed9..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/BitmapRenderer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2017 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.launcher3.icons;
-
-import android.annotation.TargetApi;
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
-import android.graphics.Canvas;
-import android.graphics.Picture;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.os.Build;
-import android.os.Build.VERSION_CODES;
-
-/**
- * Interface representing a bitmap draw operation.
- */
-public interface BitmapRenderer {
-
- boolean USE_HARDWARE_BITMAP = Build.VERSION.SDK_INT >= Build.VERSION_CODES.P;
-
- static Bitmap createSoftwareBitmap(int width, int height, BitmapRenderer renderer) {
- GraphicsUtils.noteNewBitmapCreated();
- Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- renderer.draw(new Canvas(result));
- return result;
- }
-
- @TargetApi(Build.VERSION_CODES.P)
- static Bitmap createHardwareBitmap(int width, int height, BitmapRenderer renderer) {
- if (!USE_HARDWARE_BITMAP) {
- return createSoftwareBitmap(width, height, renderer);
- }
-
- GraphicsUtils.noteNewBitmapCreated();
- Picture picture = new Picture();
- renderer.draw(picture.beginRecording(width, height));
- picture.endRecording();
- return Bitmap.createBitmap(picture);
- }
-
- /**
- * Returns a bitmap from subset of the source bitmap. The new bitmap may be the
- * same object as source, or a copy may have been made.
- */
- static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height) {
- if (Build.VERSION.SDK_INT >= VERSION_CODES.O && source.getConfig() == Config.HARDWARE) {
- return createHardwareBitmap(width, height, c -> c.drawBitmap(source,
- new Rect(x, y, x + width, y + height), new RectF(0, 0, width, height), null));
- } else {
- GraphicsUtils.noteNewBitmapCreated();
- return Bitmap.createBitmap(source, x, y, width, height);
- }
- }
-
- void draw(Canvas out);
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/ColorExtractor.java b/iconloaderlib/src/com/android/launcher3/icons/ColorExtractor.java
deleted file mode 100644
index 87bda82..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/ColorExtractor.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2017 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.launcher3.icons;
-
-import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.util.SparseArray;
-import java.util.Arrays;
-
-/**
- * Utility class for extracting colors from a bitmap.
- */
-public class ColorExtractor {
-
- private final int NUM_SAMPLES = 20;
- private final float[] mTmpHsv = new float[3];
- private final float[] mTmpHueScoreHistogram = new float[360];
- private final int[] mTmpPixels = new int[NUM_SAMPLES];
- private final SparseArray<Float> mTmpRgbScores = new SparseArray<>();
-
- /**
- * This picks a dominant color, looking for high-saturation, high-value, repeated hues.
- * @param bitmap The bitmap to scan
- */
- public int findDominantColorByHue(Bitmap bitmap) {
- return findDominantColorByHue(bitmap, NUM_SAMPLES);
- }
-
- /**
- * This picks a dominant color, looking for high-saturation, high-value, repeated hues.
- * @param bitmap The bitmap to scan
- */
- public int findDominantColorByHue(Bitmap bitmap, int samples) {
- final int height = bitmap.getHeight();
- final int width = bitmap.getWidth();
- int sampleStride = (int) Math.sqrt((height * width) / samples);
- if (sampleStride < 1) {
- sampleStride = 1;
- }
-
- // This is an out-param, for getting the hsv values for an rgb
- float[] hsv = mTmpHsv;
- Arrays.fill(hsv, 0);
-
- // First get the best hue, by creating a histogram over 360 hue buckets,
- // where each pixel contributes a score weighted by saturation, value, and alpha.
- float[] hueScoreHistogram = mTmpHueScoreHistogram;
- Arrays.fill(hueScoreHistogram, 0);
- float highScore = -1;
- int bestHue = -1;
-
- int[] pixels = mTmpPixels;
- Arrays.fill(pixels, 0);
- int pixelCount = 0;
-
- for (int y = 0; y < height; y += sampleStride) {
- for (int x = 0; x < width; x += sampleStride) {
- int argb = bitmap.getPixel(x, y);
- int alpha = 0xFF & (argb >> 24);
- if (alpha < 0x80) {
- // Drop mostly-transparent pixels.
- continue;
- }
- // Remove the alpha channel.
- int rgb = argb | 0xFF000000;
- Color.colorToHSV(rgb, hsv);
- // Bucket colors by the 360 integer hues.
- int hue = (int) hsv[0];
- if (hue < 0 || hue >= hueScoreHistogram.length) {
- // Defensively avoid array bounds violations.
- continue;
- }
- if (pixelCount < samples) {
- pixels[pixelCount++] = rgb;
- }
- float score = hsv[1] * hsv[2];
- hueScoreHistogram[hue] += score;
- if (hueScoreHistogram[hue] > highScore) {
- highScore = hueScoreHistogram[hue];
- bestHue = hue;
- }
- }
- }
-
- SparseArray<Float> rgbScores = mTmpRgbScores;
- rgbScores.clear();
- int bestColor = 0xff000000;
- highScore = -1;
- // Go back over the RGB colors that match the winning hue,
- // creating a histogram of weighted s*v scores, for up to 100*100 [s,v] buckets.
- // The highest-scoring RGB color wins.
- for (int i = 0; i < pixelCount; i++) {
- int rgb = pixels[i];
- Color.colorToHSV(rgb, hsv);
- int hue = (int) hsv[0];
- if (hue == bestHue) {
- float s = hsv[1];
- float v = hsv[2];
- int bucket = (int) (s * 100) + (int) (v * 10000);
- // Score by cumulative saturation * value.
- float score = s * v;
- Float oldTotal = rgbScores.get(bucket);
- float newTotal = oldTotal == null ? score : oldTotal + score;
- rgbScores.put(bucket, newTotal);
- if (newTotal > highScore) {
- highScore = newTotal;
- // All the colors in the winning bucket are very similar. Last in wins.
- bestColor = rgb;
- }
- }
- }
- return bestColor;
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/DotRenderer.java b/iconloaderlib/src/com/android/launcher3/icons/DotRenderer.java
deleted file mode 100644
index 97a0fd3..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/DotRenderer.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2017 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.launcher3.icons;
-
-import static android.graphics.Paint.ANTI_ALIAS_FLAG;
-import static android.graphics.Paint.FILTER_BITMAP_FLAG;
-
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Path;
-import android.graphics.PathMeasure;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.util.Log;
-import android.view.ViewDebug;
-
-/**
- * Used to draw a notification dot on top of an icon.
- */
-public class DotRenderer {
-
- private static final String TAG = "DotRenderer";
-
- // The dot size is defined as a percentage of the app icon size.
- private static final float SIZE_PERCENTAGE = 0.228f;
-
- private final float mCircleRadius;
- private final Paint mCirclePaint = new Paint(ANTI_ALIAS_FLAG | FILTER_BITMAP_FLAG);
-
- private final Bitmap mBackgroundWithShadow;
- private final float mBitmapOffset;
-
- // Stores the center x and y position as a percentage (0 to 1) of the icon size
- private final float[] mRightDotPosition;
- private final float[] mLeftDotPosition;
-
- public DotRenderer(int iconSizePx, Path iconShapePath, int pathSize) {
- int size = Math.round(SIZE_PERCENTAGE * iconSizePx);
- ShadowGenerator.Builder builder = new ShadowGenerator.Builder(Color.TRANSPARENT);
- builder.ambientShadowAlpha = 88;
- mBackgroundWithShadow = builder.setupBlurForSize(size).createPill(size, size);
- mCircleRadius = builder.radius;
-
- mBitmapOffset = -mBackgroundWithShadow.getHeight() * 0.5f; // Same as width.
-
- // Find the points on the path that are closest to the top left and right corners.
- mLeftDotPosition = getPathPoint(iconShapePath, pathSize, -1);
- mRightDotPosition = getPathPoint(iconShapePath, pathSize, 1);
- }
-
- private static float[] getPathPoint(Path path, float size, float direction) {
- float halfSize = size / 2;
- // Small delta so that we don't get a zero size triangle
- float delta = 1;
-
- float x = halfSize + direction * halfSize;
- Path trianglePath = new Path();
- trianglePath.moveTo(halfSize, halfSize);
- trianglePath.lineTo(x + delta * direction, 0);
- trianglePath.lineTo(x, -delta);
- trianglePath.close();
-
- trianglePath.op(path, Path.Op.INTERSECT);
- float[] pos = new float[2];
- new PathMeasure(trianglePath, false).getPosTan(0, pos, null);
-
- pos[0] = pos[0] / size;
- pos[1] = pos[1] / size;
- return pos;
- }
-
- public float[] getLeftDotPosition() {
- return mLeftDotPosition;
- }
-
- public float[] getRightDotPosition() {
- return mRightDotPosition;
- }
-
- /**
- * Draw a circle on top of the canvas according to the given params.
- */
- public void draw(Canvas canvas, DrawParams params) {
- if (params == null) {
- Log.e(TAG, "Invalid null argument(s) passed in call to draw.");
- return;
- }
- canvas.save();
-
- Rect iconBounds = params.iconBounds;
- float[] dotPosition = params.leftAlign ? mLeftDotPosition : mRightDotPosition;
- float dotCenterX = iconBounds.left + iconBounds.width() * dotPosition[0];
- float dotCenterY = iconBounds.top + iconBounds.height() * dotPosition[1];
-
- // Ensure dot fits entirely in canvas clip bounds.
- Rect canvasBounds = canvas.getClipBounds();
- float offsetX = params.leftAlign
- ? Math.max(0, canvasBounds.left - (dotCenterX + mBitmapOffset))
- : Math.min(0, canvasBounds.right - (dotCenterX - mBitmapOffset));
- float offsetY = Math.max(0, canvasBounds.top - (dotCenterY + mBitmapOffset));
-
- // We draw the dot relative to its center.
- canvas.translate(dotCenterX + offsetX, dotCenterY + offsetY);
- canvas.scale(params.scale, params.scale);
-
- mCirclePaint.setColor(Color.BLACK);
- canvas.drawBitmap(mBackgroundWithShadow, mBitmapOffset, mBitmapOffset, mCirclePaint);
- mCirclePaint.setColor(params.color);
- canvas.drawCircle(0, 0, mCircleRadius, mCirclePaint);
- canvas.restore();
- }
-
- public static class DrawParams {
- /** The color (possibly based on the icon) to use for the dot. */
- @ViewDebug.ExportedProperty(category = "notification dot", formatToHexString = true)
- public int color;
- /** The bounds of the icon that the dot is drawn on top of. */
- @ViewDebug.ExportedProperty(category = "notification dot")
- public Rect iconBounds = new Rect();
- /** The progress of the animation, from 0 to 1. */
- @ViewDebug.ExportedProperty(category = "notification dot")
- public float scale;
- /** Whether the dot should align to the top left of the icon rather than the top right. */
- @ViewDebug.ExportedProperty(category = "notification dot")
- public boolean leftAlign;
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java b/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java
deleted file mode 100644
index 516965e..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.android.launcher3.icons;
-
-import android.content.res.Resources;
-import android.content.res.Resources.Theme;
-import android.graphics.Canvas;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.DrawableWrapper;
-import android.util.AttributeSet;
-
-import org.xmlpull.v1.XmlPullParser;
-
-/**
- * Extension of {@link DrawableWrapper} which scales the child drawables by a fixed amount.
- */
-public class FixedScaleDrawable extends DrawableWrapper {
-
- // TODO b/33553066 use the constant defined in MaskableIconDrawable
- private static final float LEGACY_ICON_SCALE = .7f * .6667f;
- private float mScaleX, mScaleY;
-
- public FixedScaleDrawable() {
- super(new ColorDrawable());
- mScaleX = LEGACY_ICON_SCALE;
- mScaleY = LEGACY_ICON_SCALE;
- }
-
- @Override
- public void draw(Canvas canvas) {
- int saveCount = canvas.save();
- canvas.scale(mScaleX, mScaleY,
- getBounds().exactCenterX(), getBounds().exactCenterY());
- super.draw(canvas);
- canvas.restoreToCount(saveCount);
- }
-
- @Override
- public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs) { }
-
- @Override
- public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) { }
-
- public void setScale(float scale) {
- float h = getIntrinsicHeight();
- float w = getIntrinsicWidth();
- mScaleX = scale * LEGACY_ICON_SCALE;
- mScaleY = scale * LEGACY_ICON_SCALE;
- if (h > w && w > 0) {
- mScaleX *= w / h;
- } else if (w > h && h > 0) {
- mScaleY *= h / w;
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/GraphicsUtils.java b/iconloaderlib/src/com/android/launcher3/icons/GraphicsUtils.java
deleted file mode 100644
index 22f1f23..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/GraphicsUtils.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons;
-
-import android.graphics.Bitmap;
-import android.graphics.Rect;
-import android.graphics.Region;
-import android.graphics.RegionIterator;
-import android.util.Log;
-
-import androidx.annotation.ColorInt;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-public class GraphicsUtils {
-
- private static final String TAG = "GraphicsUtils";
-
- public static Runnable sOnNewBitmapRunnable = () -> { };
-
- /**
- * Set the alpha component of {@code color} to be {@code alpha}. Unlike the support lib version,
- * it bounds the alpha in valid range instead of throwing an exception to allow for safer
- * interpolation of color animations
- */
- @ColorInt
- public static int setColorAlphaBound(int color, int alpha) {
- if (alpha < 0) {
- alpha = 0;
- } else if (alpha > 255) {
- alpha = 255;
- }
- return (color & 0x00ffffff) | (alpha << 24);
- }
-
- /**
- * Compresses the bitmap to a byte array for serialization.
- */
- public static byte[] flattenBitmap(Bitmap bitmap) {
- // Try go guesstimate how much space the icon will take when serialized
- // to avoid unnecessary allocations/copies during the write (4 bytes per pixel).
- int size = bitmap.getWidth() * bitmap.getHeight() * 4;
- ByteArrayOutputStream out = new ByteArrayOutputStream(size);
- try {
- bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
- out.flush();
- out.close();
- return out.toByteArray();
- } catch (IOException e) {
- Log.w(TAG, "Could not write bitmap");
- return null;
- }
- }
-
- public static int getArea(Region r) {
- RegionIterator itr = new RegionIterator(r);
- int area = 0;
- Rect tempRect = new Rect();
- while (itr.next(tempRect)) {
- area += tempRect.width() * tempRect.height();
- }
- return area;
- }
-
- /**
- * Utility method to track new bitmap creation
- */
- public static void noteNewBitmapCreated() {
- sOnNewBitmapRunnable.run();
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/IconNormalizer.java b/iconloaderlib/src/com/android/launcher3/icons/IconNormalizer.java
deleted file mode 100644
index de39e79..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/IconNormalizer.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright (C) 2015 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.launcher3.icons;
-
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.Path;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Region;
-import android.graphics.drawable.AdaptiveIconDrawable;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
-import android.util.Log;
-
-import java.nio.ByteBuffer;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-public class IconNormalizer {
-
- private static final String TAG = "IconNormalizer";
- private static final boolean DEBUG = false;
- // Ratio of icon visible area to full icon size for a square shaped icon
- private static final float MAX_SQUARE_AREA_FACTOR = 375.0f / 576;
- // Ratio of icon visible area to full icon size for a circular shaped icon
- private static final float MAX_CIRCLE_AREA_FACTOR = 380.0f / 576;
-
- private static final float CIRCLE_AREA_BY_RECT = (float) Math.PI / 4;
-
- // Slope used to calculate icon visible area to full icon size for any generic shaped icon.
- private static final float LINEAR_SCALE_SLOPE =
- (MAX_CIRCLE_AREA_FACTOR - MAX_SQUARE_AREA_FACTOR) / (1 - CIRCLE_AREA_BY_RECT);
-
- private static final int MIN_VISIBLE_ALPHA = 40;
-
- // Shape detection related constants
- private static final float BOUND_RATIO_MARGIN = .05f;
- private static final float PIXEL_DIFF_PERCENTAGE_THRESHOLD = 0.005f;
- private static final float SCALE_NOT_INITIALIZED = 0;
-
- // Ratio of the diameter of an normalized circular icon to the actual icon size.
- public static final float ICON_VISIBLE_AREA_FACTOR = 0.92f;
-
- private final int mMaxSize;
- private final Bitmap mBitmap;
- private final Canvas mCanvas;
- private final Paint mPaintMaskShape;
- private final Paint mPaintMaskShapeOutline;
- private final byte[] mPixels;
-
- private final RectF mAdaptiveIconBounds;
- private float mAdaptiveIconScale;
-
- private boolean mEnableShapeDetection;
-
- // for each y, stores the position of the leftmost x and the rightmost x
- private final float[] mLeftBorder;
- private final float[] mRightBorder;
- private final Rect mBounds;
- private final Path mShapePath;
- private final Matrix mMatrix;
-
- /** package private **/
- IconNormalizer(Context context, int iconBitmapSize, boolean shapeDetection) {
- // Use twice the icon size as maximum size to avoid scaling down twice.
- mMaxSize = iconBitmapSize * 2;
- mBitmap = Bitmap.createBitmap(mMaxSize, mMaxSize, Bitmap.Config.ALPHA_8);
- mCanvas = new Canvas(mBitmap);
- mPixels = new byte[mMaxSize * mMaxSize];
- mLeftBorder = new float[mMaxSize];
- mRightBorder = new float[mMaxSize];
- mBounds = new Rect();
- mAdaptiveIconBounds = new RectF();
-
- mPaintMaskShape = new Paint();
- mPaintMaskShape.setColor(Color.RED);
- mPaintMaskShape.setStyle(Paint.Style.FILL);
- mPaintMaskShape.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.XOR));
-
- mPaintMaskShapeOutline = new Paint();
- mPaintMaskShapeOutline.setStrokeWidth(
- 2 * context.getResources().getDisplayMetrics().density);
- mPaintMaskShapeOutline.setStyle(Paint.Style.STROKE);
- mPaintMaskShapeOutline.setColor(Color.BLACK);
- mPaintMaskShapeOutline.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
-
- mShapePath = new Path();
- mMatrix = new Matrix();
- mAdaptiveIconScale = SCALE_NOT_INITIALIZED;
- mEnableShapeDetection = shapeDetection;
- }
-
- private static float getScale(float hullArea, float boundingArea, float fullArea) {
- float hullByRect = hullArea / boundingArea;
- float scaleRequired;
- if (hullByRect < CIRCLE_AREA_BY_RECT) {
- scaleRequired = MAX_CIRCLE_AREA_FACTOR;
- } else {
- scaleRequired = MAX_SQUARE_AREA_FACTOR + LINEAR_SCALE_SLOPE * (1 - hullByRect);
- }
-
- float areaScale = hullArea / fullArea;
- // Use sqrt of the final ratio as the images is scaled across both width and height.
- return areaScale > scaleRequired ? (float) Math.sqrt(scaleRequired / areaScale) : 1;
- }
-
- /**
- * @param d Should be AdaptiveIconDrawable
- * @param size Canvas size to use
- */
- @TargetApi(Build.VERSION_CODES.O)
- public static float normalizeAdaptiveIcon(Drawable d, int size, @Nullable RectF outBounds) {
- Rect tmpBounds = new Rect(d.getBounds());
- d.setBounds(0, 0, size, size);
-
- Path path = ((AdaptiveIconDrawable) d).getIconMask();
- Region region = new Region();
- region.setPath(path, new Region(0, 0, size, size));
-
- Rect hullBounds = region.getBounds();
- int hullArea = GraphicsUtils.getArea(region);
-
- if (outBounds != null) {
- float sizeF = size;
- outBounds.set(
- hullBounds.left / sizeF,
- hullBounds.top / sizeF,
- 1 - (hullBounds.right / sizeF),
- 1 - (hullBounds.bottom / sizeF));
- }
- d.setBounds(tmpBounds);
- return getScale(hullArea, hullArea, size * size);
- }
-
- /**
- * Returns if the shape of the icon is same as the path.
- * For this method to work, the shape path bounds should be in [0,1]x[0,1] bounds.
- */
- private boolean isShape(Path maskPath) {
- // Condition1:
- // If width and height of the path not close to a square, then the icon shape is
- // not same as the mask shape.
- float iconRatio = ((float) mBounds.width()) / mBounds.height();
- if (Math.abs(iconRatio - 1) > BOUND_RATIO_MARGIN) {
- if (DEBUG) {
- Log.d(TAG, "Not same as mask shape because width != height. " + iconRatio);
- }
- return false;
- }
-
- // Condition 2:
- // Actual icon (white) and the fitted shape (e.g., circle)(red) XOR operation
- // should generate transparent image, if the actual icon is equivalent to the shape.
-
- // Fit the shape within the icon's bounding box
- mMatrix.reset();
- mMatrix.setScale(mBounds.width(), mBounds.height());
- mMatrix.postTranslate(mBounds.left, mBounds.top);
- maskPath.transform(mMatrix, mShapePath);
-
- // XOR operation
- mCanvas.drawPath(mShapePath, mPaintMaskShape);
-
- // DST_OUT operation around the mask path outline
- mCanvas.drawPath(mShapePath, mPaintMaskShapeOutline);
-
- // Check if the result is almost transparent
- return isTransparentBitmap();
- }
-
- /**
- * Used to determine if certain the bitmap is transparent.
- */
- private boolean isTransparentBitmap() {
- ByteBuffer buffer = ByteBuffer.wrap(mPixels);
- buffer.rewind();
- mBitmap.copyPixelsToBuffer(buffer);
-
- int y = mBounds.top;
- // buffer position
- int index = y * mMaxSize;
- // buffer shift after every row, width of buffer = mMaxSize
- int rowSizeDiff = mMaxSize - mBounds.right;
-
- int sum = 0;
- for (; y < mBounds.bottom; y++) {
- index += mBounds.left;
- for (int x = mBounds.left; x < mBounds.right; x++) {
- if ((mPixels[index] & 0xFF) > MIN_VISIBLE_ALPHA) {
- sum++;
- }
- index++;
- }
- index += rowSizeDiff;
- }
-
- float percentageDiffPixels = ((float) sum) / (mBounds.width() * mBounds.height());
- return percentageDiffPixels < PIXEL_DIFF_PERCENTAGE_THRESHOLD;
- }
-
- /**
- * Returns the amount by which the {@param d} should be scaled (in both dimensions) so that it
- * matches the design guidelines for a launcher icon.
- *
- * We first calculate the convex hull of the visible portion of the icon.
- * This hull then compared with the bounding rectangle of the hull to find how closely it
- * resembles a circle and a square, by comparing the ratio of the areas. Note that this is not an
- * ideal solution but it gives satisfactory result without affecting the performance.
- *
- * This closeness is used to determine the ratio of hull area to the full icon size.
- * Refer {@link #MAX_CIRCLE_AREA_FACTOR} and {@link #MAX_SQUARE_AREA_FACTOR}
- *
- * @param outBounds optional rect to receive the fraction distance from each edge.
- */
- public synchronized float getScale(@NonNull Drawable d, @Nullable RectF outBounds,
- @Nullable Path path, @Nullable boolean[] outMaskShape) {
- if (BaseIconFactory.ATLEAST_OREO && d instanceof AdaptiveIconDrawable) {
- if (mAdaptiveIconScale == SCALE_NOT_INITIALIZED) {
- mAdaptiveIconScale = normalizeAdaptiveIcon(d, mMaxSize, mAdaptiveIconBounds);
- }
- if (outBounds != null) {
- outBounds.set(mAdaptiveIconBounds);
- }
- return mAdaptiveIconScale;
- }
- int width = d.getIntrinsicWidth();
- int height = d.getIntrinsicHeight();
- if (width <= 0 || height <= 0) {
- width = width <= 0 || width > mMaxSize ? mMaxSize : width;
- height = height <= 0 || height > mMaxSize ? mMaxSize : height;
- } else if (width > mMaxSize || height > mMaxSize) {
- int max = Math.max(width, height);
- width = mMaxSize * width / max;
- height = mMaxSize * height / max;
- }
-
- mBitmap.eraseColor(Color.TRANSPARENT);
- d.setBounds(0, 0, width, height);
- d.draw(mCanvas);
-
- ByteBuffer buffer = ByteBuffer.wrap(mPixels);
- buffer.rewind();
- mBitmap.copyPixelsToBuffer(buffer);
-
- // Overall bounds of the visible icon.
- int topY = -1;
- int bottomY = -1;
- int leftX = mMaxSize + 1;
- int rightX = -1;
-
- // Create border by going through all pixels one row at a time and for each row find
- // the first and the last non-transparent pixel. Set those values to mLeftBorder and
- // mRightBorder and use -1 if there are no visible pixel in the row.
-
- // buffer position
- int index = 0;
- // buffer shift after every row, width of buffer = mMaxSize
- int rowSizeDiff = mMaxSize - width;
- // first and last position for any row.
- int firstX, lastX;
-
- for (int y = 0; y < height; y++) {
- firstX = lastX = -1;
- for (int x = 0; x < width; x++) {
- if ((mPixels[index] & 0xFF) > MIN_VISIBLE_ALPHA) {
- if (firstX == -1) {
- firstX = x;
- }
- lastX = x;
- }
- index++;
- }
- index += rowSizeDiff;
-
- mLeftBorder[y] = firstX;
- mRightBorder[y] = lastX;
-
- // If there is at least one visible pixel, update the overall bounds.
- if (firstX != -1) {
- bottomY = y;
- if (topY == -1) {
- topY = y;
- }
-
- leftX = Math.min(leftX, firstX);
- rightX = Math.max(rightX, lastX);
- }
- }
-
- if (topY == -1 || rightX == -1) {
- // No valid pixels found. Do not scale.
- return 1;
- }
-
- convertToConvexArray(mLeftBorder, 1, topY, bottomY);
- convertToConvexArray(mRightBorder, -1, topY, bottomY);
-
- // Area of the convex hull
- float area = 0;
- for (int y = 0; y < height; y++) {
- if (mLeftBorder[y] <= -1) {
- continue;
- }
- area += mRightBorder[y] - mLeftBorder[y] + 1;
- }
-
- mBounds.left = leftX;
- mBounds.right = rightX;
-
- mBounds.top = topY;
- mBounds.bottom = bottomY;
-
- if (outBounds != null) {
- outBounds.set(((float) mBounds.left) / width, ((float) mBounds.top) / height,
- 1 - ((float) mBounds.right) / width,
- 1 - ((float) mBounds.bottom) / height);
- }
- if (outMaskShape != null && mEnableShapeDetection && outMaskShape.length > 0) {
- outMaskShape[0] = isShape(path);
- }
- // Area of the rectangle required to fit the convex hull
- float rectArea = (bottomY + 1 - topY) * (rightX + 1 - leftX);
- return getScale(area, rectArea, width * height);
- }
-
- /**
- * Modifies {@param xCoordinates} to represent a convex border. Fills in all missing values
- * (except on either ends) with appropriate values.
- * @param xCoordinates map of x coordinate per y.
- * @param direction 1 for left border and -1 for right border.
- * @param topY the first Y position (inclusive) with a valid value.
- * @param bottomY the last Y position (inclusive) with a valid value.
- */
- private static void convertToConvexArray(
- float[] xCoordinates, int direction, int topY, int bottomY) {
- int total = xCoordinates.length;
- // The tangent at each pixel.
- float[] angles = new float[total - 1];
-
- int first = topY; // First valid y coordinate
- int last = -1; // Last valid y coordinate which didn't have a missing value
-
- float lastAngle = Float.MAX_VALUE;
-
- for (int i = topY + 1; i <= bottomY; i++) {
- if (xCoordinates[i] <= -1) {
- continue;
- }
- int start;
-
- if (lastAngle == Float.MAX_VALUE) {
- start = first;
- } else {
- float currentAngle = (xCoordinates[i] - xCoordinates[last]) / (i - last);
- start = last;
- // If this position creates a concave angle, keep moving up until we find a
- // position which creates a convex angle.
- if ((currentAngle - lastAngle) * direction < 0) {
- while (start > first) {
- start --;
- currentAngle = (xCoordinates[i] - xCoordinates[start]) / (i - start);
- if ((currentAngle - angles[start]) * direction >= 0) {
- break;
- }
- }
- }
- }
-
- // Reset from last check
- lastAngle = (xCoordinates[i] - xCoordinates[start]) / (i - start);
- // Update all the points from start.
- for (int j = start; j < i; j++) {
- angles[j] = lastAngle;
- xCoordinates[j] = xCoordinates[start] + lastAngle * (j - start);
- }
- last = i;
- }
- }
-
- /**
- * @return The diameter of the normalized circle that fits inside of the square (size x size).
- */
- public static int getNormalizedCircleSize(int size) {
- float area = size * size * MAX_CIRCLE_AREA_FACTOR;
- return (int) Math.round(Math.sqrt((4 * area) / Math.PI));
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/ShadowGenerator.java b/iconloaderlib/src/com/android/launcher3/icons/ShadowGenerator.java
deleted file mode 100644
index 7702727..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/ShadowGenerator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (C) 2016 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.launcher3.icons;
-
-import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
-
-import android.graphics.Bitmap;
-import android.graphics.BlurMaskFilter;
-import android.graphics.BlurMaskFilter.Blur;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.RectF;
-
-/**
- * Utility class to add shadows to bitmaps.
- */
-public class ShadowGenerator {
- public static final float BLUR_FACTOR = 0.5f/48;
-
- // Percent of actual icon size
- public static final float KEY_SHADOW_DISTANCE = 1f/48;
- private static final int KEY_SHADOW_ALPHA = 61;
- // Percent of actual icon size
- private static final float HALF_DISTANCE = 0.5f;
- private static final int AMBIENT_SHADOW_ALPHA = 30;
-
- private final int mIconSize;
-
- private final Paint mBlurPaint;
- private final Paint mDrawPaint;
- private final BlurMaskFilter mDefaultBlurMaskFilter;
-
- public ShadowGenerator(int iconSize) {
- mIconSize = iconSize;
- mBlurPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
- mDrawPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
- mDefaultBlurMaskFilter = new BlurMaskFilter(mIconSize * BLUR_FACTOR, Blur.NORMAL);
- }
-
- public synchronized void recreateIcon(Bitmap icon, Canvas out) {
- recreateIcon(icon, mDefaultBlurMaskFilter, AMBIENT_SHADOW_ALPHA, KEY_SHADOW_ALPHA, out);
- }
-
- public synchronized void recreateIcon(Bitmap icon, BlurMaskFilter blurMaskFilter,
- int ambientAlpha, int keyAlpha, Canvas out) {
- int[] offset = new int[2];
- mBlurPaint.setMaskFilter(blurMaskFilter);
- Bitmap shadow = icon.extractAlpha(mBlurPaint, offset);
-
- // Draw ambient shadow
- mDrawPaint.setAlpha(ambientAlpha);
- out.drawBitmap(shadow, offset[0], offset[1], mDrawPaint);
-
- // Draw key shadow
- mDrawPaint.setAlpha(keyAlpha);
- out.drawBitmap(shadow, offset[0], offset[1] + KEY_SHADOW_DISTANCE * mIconSize, mDrawPaint);
-
- // Draw the icon
- mDrawPaint.setAlpha(255);
- out.drawBitmap(icon, 0, 0, mDrawPaint);
- }
-
- /**
- * Returns the minimum amount by which an icon with {@param bounds} should be scaled
- * so that the shadows do not get clipped.
- */
- public static float getScaleForBounds(RectF bounds) {
- float scale = 1;
-
- // For top, left & right, we need same space.
- float minSide = Math.min(Math.min(bounds.left, bounds.right), bounds.top);
- if (minSide < BLUR_FACTOR) {
- scale = (HALF_DISTANCE - BLUR_FACTOR) / (HALF_DISTANCE - minSide);
- }
-
- float bottomSpace = BLUR_FACTOR + KEY_SHADOW_DISTANCE;
- if (bounds.bottom < bottomSpace) {
- scale = Math.min(scale, (HALF_DISTANCE - bottomSpace) / (HALF_DISTANCE - bounds.bottom));
- }
- return scale;
- }
-
- public static class Builder {
-
- public final RectF bounds = new RectF();
- public final int color;
-
- public int ambientShadowAlpha = AMBIENT_SHADOW_ALPHA;
-
- public float shadowBlur;
-
- public float keyShadowDistance;
- public int keyShadowAlpha = KEY_SHADOW_ALPHA;
- public float radius;
-
- public Builder(int color) {
- this.color = color;
- }
-
- public Builder setupBlurForSize(int height) {
- shadowBlur = height * 1f / 24;
- keyShadowDistance = height * 1f / 16;
- return this;
- }
-
- public Bitmap createPill(int width, int height) {
- return createPill(width, height, height / 2f);
- }
-
- public Bitmap createPill(int width, int height, float r) {
- radius = r;
-
- int centerX = Math.round(width / 2f + shadowBlur);
- int centerY = Math.round(radius + shadowBlur + keyShadowDistance);
- int center = Math.max(centerX, centerY);
- bounds.set(0, 0, width, height);
- bounds.offsetTo(center - width / 2f, center - height / 2f);
-
- int size = center * 2;
- return BitmapRenderer.createHardwareBitmap(size, size, this::drawShadow);
- }
-
- public void drawShadow(Canvas c) {
- Paint p = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
- p.setColor(color);
-
- // Key shadow
- p.setShadowLayer(shadowBlur, 0, keyShadowDistance,
- setColorAlphaBound(Color.BLACK, keyShadowAlpha));
- c.drawRoundRect(bounds, radius, radius, p);
-
- // Ambient shadow
- p.setShadowLayer(shadowBlur, 0, 0,
- setColorAlphaBound(Color.BLACK, ambientShadowAlpha));
- c.drawRoundRect(bounds, radius, radius, p);
-
- if (Color.alpha(color) < 255) {
- // Clear any content inside the pill-rect for translucent fill.
- p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
- p.clearShadowLayer();
- p.setColor(Color.BLACK);
- c.drawRoundRect(bounds, radius, radius, p);
-
- p.setXfermode(null);
- p.setColor(color);
- c.drawRoundRect(bounds, radius, radius, p);
- }
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java b/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
deleted file mode 100644
index 4c634cb..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons.cache;
-
-import static com.android.launcher3.icons.BaseIconFactory.getFullResDefaultActivityIcon;
-import static com.android.launcher3.icons.BitmapInfo.LOW_RES_ICON;
-import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
-
-import android.content.ComponentName;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteException;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
-import android.os.Handler;
-import android.os.LocaleList;
-import android.os.Looper;
-import android.os.Process;
-import android.os.UserHandle;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-
-import com.android.launcher3.icons.BaseIconFactory;
-import com.android.launcher3.icons.BitmapInfo;
-import com.android.launcher3.icons.BitmapRenderer;
-import com.android.launcher3.icons.GraphicsUtils;
-import com.android.launcher3.util.ComponentKey;
-import com.android.launcher3.util.SQLiteCacheHelper;
-
-import java.util.AbstractMap;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.function.Supplier;
-
-public abstract class BaseIconCache {
-
- private static final String TAG = "BaseIconCache";
- private static final boolean DEBUG = false;
-
- private static final int INITIAL_ICON_CACHE_CAPACITY = 50;
-
- // Empty class name is used for storing package default entry.
- public static final String EMPTY_CLASS_NAME = ".";
-
- public static class CacheEntry {
-
- @NonNull
- public BitmapInfo bitmap = BitmapInfo.LOW_RES_INFO;
- public CharSequence title = "";
- public CharSequence contentDescription = "";
- }
-
- private final HashMap<UserHandle, BitmapInfo> mDefaultIcons = new HashMap<>();
-
- protected final Context mContext;
- protected final PackageManager mPackageManager;
-
- private final Map<ComponentKey, CacheEntry> mCache;
- protected final Handler mWorkerHandler;
-
- protected int mIconDpi;
- protected IconDB mIconDb;
- protected LocaleList mLocaleList = LocaleList.getEmptyLocaleList();
- protected String mSystemState = "";
-
- private final String mDbFileName;
- private final BitmapFactory.Options mDecodeOptions;
- private final Looper mBgLooper;
-
- public BaseIconCache(Context context, String dbFileName, Looper bgLooper,
- int iconDpi, int iconPixelSize, boolean inMemoryCache) {
- mContext = context;
- mDbFileName = dbFileName;
- mPackageManager = context.getPackageManager();
- mBgLooper = bgLooper;
- mWorkerHandler = new Handler(mBgLooper);
-
- if (inMemoryCache) {
- mCache = new HashMap<>(INITIAL_ICON_CACHE_CAPACITY);
- } else {
- // Use a dummy cache
- mCache = new AbstractMap<ComponentKey, CacheEntry>() {
- @Override
- public Set<Entry<ComponentKey, CacheEntry>> entrySet() {
- return Collections.emptySet();
- }
-
- @Override
- public CacheEntry put(ComponentKey key, CacheEntry value) {
- return value;
- }
- };
- }
-
- if (BitmapRenderer.USE_HARDWARE_BITMAP && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- mDecodeOptions = new BitmapFactory.Options();
- mDecodeOptions.inPreferredConfig = Bitmap.Config.HARDWARE;
- } else {
- mDecodeOptions = null;
- }
-
- updateSystemState();
- mIconDpi = iconDpi;
- mIconDb = new IconDB(context, dbFileName, iconPixelSize);
- }
-
- /**
- * Returns the persistable serial number for {@param user}. Subclass should implement proper
- * caching strategy to avoid making binder call every time.
- */
- protected abstract long getSerialNumberForUser(UserHandle user);
-
- /**
- * Return true if the given app is an instant app and should be badged appropriately.
- */
- protected abstract boolean isInstantApp(ApplicationInfo info);
-
- /**
- * Opens and returns an icon factory. The factory is recycled by the caller.
- */
- protected abstract BaseIconFactory getIconFactory();
-
- public void updateIconParams(int iconDpi, int iconPixelSize) {
- mWorkerHandler.post(() -> updateIconParamsBg(iconDpi, iconPixelSize));
- }
-
- private synchronized void updateIconParamsBg(int iconDpi, int iconPixelSize) {
- mIconDpi = iconDpi;
- mDefaultIcons.clear();
- mIconDb.clear();
- mIconDb.close();
- mIconDb = new IconDB(mContext, mDbFileName, iconPixelSize);
- mCache.clear();
- }
-
- private Drawable getFullResIcon(Resources resources, int iconId) {
- if (resources != null && iconId != 0) {
- try {
- return resources.getDrawableForDensity(iconId, mIconDpi);
- } catch (Resources.NotFoundException e) { }
- }
- return getFullResDefaultActivityIcon(mIconDpi);
- }
-
- public Drawable getFullResIcon(String packageName, int iconId) {
- try {
- return getFullResIcon(mPackageManager.getResourcesForApplication(packageName), iconId);
- } catch (PackageManager.NameNotFoundException e) { }
- return getFullResDefaultActivityIcon(mIconDpi);
- }
-
- public Drawable getFullResIcon(ActivityInfo info) {
- try {
- return getFullResIcon(mPackageManager.getResourcesForApplication(info.applicationInfo),
- info.getIconResource());
- } catch (PackageManager.NameNotFoundException e) { }
- return getFullResDefaultActivityIcon(mIconDpi);
- }
-
- private BitmapInfo makeDefaultIcon(UserHandle user) {
- try (BaseIconFactory li = getIconFactory()) {
- return li.makeDefaultIcon(user);
- }
- }
-
- /**
- * Remove any records for the supplied ComponentName.
- */
- public synchronized void remove(ComponentName componentName, UserHandle user) {
- mCache.remove(new ComponentKey(componentName, user));
- }
-
- /**
- * Remove any records for the supplied package name from memory.
- */
- private void removeFromMemCacheLocked(String packageName, UserHandle user) {
- HashSet<ComponentKey> forDeletion = new HashSet<>();
- for (ComponentKey key: mCache.keySet()) {
- if (key.componentName.getPackageName().equals(packageName)
- && key.user.equals(user)) {
- forDeletion.add(key);
- }
- }
- for (ComponentKey condemned: forDeletion) {
- mCache.remove(condemned);
- }
- }
-
- /**
- * Removes the entries related to the given package in memory and persistent DB.
- */
- public synchronized void removeIconsForPkg(String packageName, UserHandle user) {
- removeFromMemCacheLocked(packageName, user);
- long userSerial = getSerialNumberForUser(user);
- mIconDb.delete(
- IconDB.COLUMN_COMPONENT + " LIKE ? AND " + IconDB.COLUMN_USER + " = ?",
- new String[]{packageName + "/%", Long.toString(userSerial)});
- }
-
- public IconCacheUpdateHandler getUpdateHandler() {
- updateSystemState();
- return new IconCacheUpdateHandler(this);
- }
-
- /**
- * Refreshes the system state definition used to check the validity of the cache. It
- * incorporates all the properties that can affect the cache like the list of enabled locale
- * and system-version.
- */
- private void updateSystemState() {
- mLocaleList = mContext.getResources().getConfiguration().getLocales();
- mSystemState = mLocaleList.toLanguageTags() + "," + Build.VERSION.SDK_INT;
- }
-
- protected String getIconSystemState(String packageName) {
- return mSystemState;
- }
-
- /**
- * Adds an entry into the DB and the in-memory cache.
- * @param replaceExisting if true, it will recreate the bitmap even if it already exists in
- * the memory. This is useful then the previous bitmap was created using
- * old data.
- */
- @VisibleForTesting
- public synchronized <T> void addIconToDBAndMemCache(T object, CachingLogic<T> cachingLogic,
- PackageInfo info, long userSerial, boolean replaceExisting) {
- UserHandle user = cachingLogic.getUser(object);
- ComponentName componentName = cachingLogic.getComponent(object);
-
- final ComponentKey key = new ComponentKey(componentName, user);
- CacheEntry entry = null;
- if (!replaceExisting) {
- entry = mCache.get(key);
- // We can't reuse the entry if the high-res icon is not present.
- if (entry == null || entry.bitmap.isNullOrLowRes()) {
- entry = null;
- }
- }
- if (entry == null) {
- entry = new CacheEntry();
- entry.bitmap = cachingLogic.loadIcon(mContext, object);
- }
- // Icon can't be loaded from cachingLogic, which implies alternative icon was loaded
- // (e.g. fallback icon, default icon). So we drop here since there's no point in caching
- // an empty entry.
- if (entry.bitmap.isNullOrLowRes()) return;
- entry.title = cachingLogic.getLabel(object);
- entry.contentDescription = mPackageManager.getUserBadgedLabel(entry.title, user);
- if (cachingLogic.addToMemCache()) mCache.put(key, entry);
-
- ContentValues values = newContentValues(entry.bitmap, entry.title.toString(),
- componentName.getPackageName(), cachingLogic.getKeywords(object, mLocaleList));
- addIconToDB(values, componentName, info, userSerial,
- cachingLogic.getLastUpdatedTime(object, info));
- }
-
- /**
- * Updates {@param values} to contain versioning information and adds it to the DB.
- * @param values {@link ContentValues} containing icon & title
- */
- private void addIconToDB(ContentValues values, ComponentName key,
- PackageInfo info, long userSerial, long lastUpdateTime) {
- values.put(IconDB.COLUMN_COMPONENT, key.flattenToString());
- values.put(IconDB.COLUMN_USER, userSerial);
- values.put(IconDB.COLUMN_LAST_UPDATED, lastUpdateTime);
- values.put(IconDB.COLUMN_VERSION, info.versionCode);
- mIconDb.insertOrReplace(values);
- }
-
- public synchronized BitmapInfo getDefaultIcon(UserHandle user) {
- if (!mDefaultIcons.containsKey(user)) {
- mDefaultIcons.put(user, makeDefaultIcon(user));
- }
- return mDefaultIcons.get(user);
- }
-
- public boolean isDefaultIcon(BitmapInfo icon, UserHandle user) {
- return getDefaultIcon(user).icon == icon.icon;
- }
-
- /**
- * Retrieves the entry from the cache. If the entry is not present, it creates a new entry.
- * This method is not thread safe, it must be called from a synchronized method.
- */
- protected <T> CacheEntry cacheLocked(
- @NonNull ComponentName componentName, @NonNull UserHandle user,
- @NonNull Supplier<T> infoProvider, @NonNull CachingLogic<T> cachingLogic,
- boolean usePackageIcon, boolean useLowResIcon) {
- assertWorkerThread();
- ComponentKey cacheKey = new ComponentKey(componentName, user);
- CacheEntry entry = mCache.get(cacheKey);
- if (entry == null || (entry.bitmap.isLowRes() && !useLowResIcon)) {
- entry = new CacheEntry();
- if (cachingLogic.addToMemCache()) {
- mCache.put(cacheKey, entry);
- }
-
- // Check the DB first.
- T object = null;
- boolean providerFetchedOnce = false;
-
- if (!getEntryFromDB(cacheKey, entry, useLowResIcon)) {
- object = infoProvider.get();
- providerFetchedOnce = true;
-
- if (object != null) {
- entry.bitmap = cachingLogic.loadIcon(mContext, object);
- } else {
- if (usePackageIcon) {
- CacheEntry packageEntry = getEntryForPackageLocked(
- componentName.getPackageName(), user, false);
- if (packageEntry != null) {
- if (DEBUG) Log.d(TAG, "using package default icon for " +
- componentName.toShortString());
- entry.bitmap = packageEntry.bitmap;
- entry.title = packageEntry.title;
- entry.contentDescription = packageEntry.contentDescription;
- }
- }
- if (entry.bitmap == null) {
- if (DEBUG) Log.d(TAG, "using default icon for " +
- componentName.toShortString());
- entry.bitmap = getDefaultIcon(user);
- }
- }
- }
-
- if (TextUtils.isEmpty(entry.title)) {
- if (object == null && !providerFetchedOnce) {
- object = infoProvider.get();
- providerFetchedOnce = true;
- }
- if (object != null) {
- entry.title = cachingLogic.getLabel(object);
- entry.contentDescription = mPackageManager.getUserBadgedLabel(
- cachingLogic.getDescription(object, entry.title), user);
- }
- }
- }
- return entry;
- }
-
- public synchronized void clear() {
- assertWorkerThread();
- mIconDb.clear();
- }
-
- /**
- * Adds a default package entry in the cache. This entry is not persisted and will be removed
- * when the cache is flushed.
- */
- protected synchronized void cachePackageInstallInfo(String packageName, UserHandle user,
- Bitmap icon, CharSequence title) {
- removeFromMemCacheLocked(packageName, user);
-
- ComponentKey cacheKey = getPackageKey(packageName, user);
- CacheEntry entry = mCache.get(cacheKey);
-
- // For icon caching, do not go through DB. Just update the in-memory entry.
- if (entry == null) {
- entry = new CacheEntry();
- }
- if (!TextUtils.isEmpty(title)) {
- entry.title = title;
- }
- if (icon != null) {
- BaseIconFactory li = getIconFactory();
- entry.bitmap = li.createIconBitmap(icon);
- li.close();
- }
- if (!TextUtils.isEmpty(title) && entry.bitmap.icon != null) {
- mCache.put(cacheKey, entry);
- }
- }
-
- private static ComponentKey getPackageKey(String packageName, UserHandle user) {
- ComponentName cn = new ComponentName(packageName, packageName + EMPTY_CLASS_NAME);
- return new ComponentKey(cn, user);
- }
-
- /**
- * Gets an entry for the package, which can be used as a fallback entry for various components.
- * This method is not thread safe, it must be called from a synchronized method.
- */
- protected CacheEntry getEntryForPackageLocked(String packageName, UserHandle user,
- boolean useLowResIcon) {
- assertWorkerThread();
- ComponentKey cacheKey = getPackageKey(packageName, user);
- CacheEntry entry = mCache.get(cacheKey);
-
- if (entry == null || (entry.bitmap.isLowRes() && !useLowResIcon)) {
- entry = new CacheEntry();
- boolean entryUpdated = true;
-
- // Check the DB first.
- if (!getEntryFromDB(cacheKey, entry, useLowResIcon)) {
- try {
- int flags = Process.myUserHandle().equals(user) ? 0 :
- PackageManager.GET_UNINSTALLED_PACKAGES;
- PackageInfo info = mPackageManager.getPackageInfo(packageName, flags);
- ApplicationInfo appInfo = info.applicationInfo;
- if (appInfo == null) {
- throw new NameNotFoundException("ApplicationInfo is null");
- }
-
- BaseIconFactory li = getIconFactory();
- // Load the full res icon for the application, but if useLowResIcon is set, then
- // only keep the low resolution icon instead of the larger full-sized icon
- BitmapInfo iconInfo = li.createBadgedIconBitmap(
- appInfo.loadIcon(mPackageManager), user, appInfo.targetSdkVersion,
- isInstantApp(appInfo));
- li.close();
-
- entry.title = appInfo.loadLabel(mPackageManager);
- entry.contentDescription = mPackageManager.getUserBadgedLabel(entry.title, user);
- entry.bitmap = BitmapInfo.of(
- useLowResIcon ? LOW_RES_ICON : iconInfo.icon, iconInfo.color);
-
- // Add the icon in the DB here, since these do not get written during
- // package updates.
- ContentValues values = newContentValues(
- iconInfo, entry.title.toString(), packageName, null);
- addIconToDB(values, cacheKey.componentName, info, getSerialNumberForUser(user),
- info.lastUpdateTime);
-
- } catch (NameNotFoundException e) {
- if (DEBUG) Log.d(TAG, "Application not installed " + packageName);
- entryUpdated = false;
- }
- }
-
- // Only add a filled-out entry to the cache
- if (entryUpdated) {
- mCache.put(cacheKey, entry);
- }
- }
- return entry;
- }
-
- protected boolean getEntryFromDB(ComponentKey cacheKey, CacheEntry entry, boolean lowRes) {
- Cursor c = null;
- try {
- c = mIconDb.query(
- lowRes ? IconDB.COLUMNS_LOW_RES : IconDB.COLUMNS_HIGH_RES,
- IconDB.COLUMN_COMPONENT + " = ? AND " + IconDB.COLUMN_USER + " = ?",
- new String[]{
- cacheKey.componentName.flattenToString(),
- Long.toString(getSerialNumberForUser(cacheKey.user))});
- if (c.moveToNext()) {
- // Set the alpha to be 255, so that we never have a wrong color
- entry.bitmap = BitmapInfo.of(LOW_RES_ICON, setColorAlphaBound(c.getInt(0), 255));
- entry.title = c.getString(1);
- if (entry.title == null) {
- entry.title = "";
- entry.contentDescription = "";
- } else {
- entry.contentDescription = mPackageManager.getUserBadgedLabel(
- entry.title, cacheKey.user);
- }
-
- if (!lowRes) {
- byte[] data = c.getBlob(2);
- try {
- entry.bitmap = BitmapInfo.of(
- BitmapFactory.decodeByteArray(data, 0, data.length, mDecodeOptions),
- entry.bitmap.color);
- } catch (Exception e) { }
- }
- return true;
- }
- } catch (SQLiteException e) {
- Log.d(TAG, "Error reading icon cache", e);
- } finally {
- if (c != null) {
- c.close();
- }
- }
- return false;
- }
-
- /**
- * Returns a cursor for an arbitrary query to the cache db
- */
- public synchronized Cursor queryCacheDb(String[] columns, String selection,
- String[] selectionArgs) {
- return mIconDb.query(columns, selection, selectionArgs);
- }
-
- /**
- * Cache class to store the actual entries on disk
- */
- public static final class IconDB extends SQLiteCacheHelper {
- private static final int RELEASE_VERSION = 27;
-
- public static final String TABLE_NAME = "icons";
- public static final String COLUMN_ROWID = "rowid";
- public static final String COLUMN_COMPONENT = "componentName";
- public static final String COLUMN_USER = "profileId";
- public static final String COLUMN_LAST_UPDATED = "lastUpdated";
- public static final String COLUMN_VERSION = "version";
- public static final String COLUMN_ICON = "icon";
- public static final String COLUMN_ICON_COLOR = "icon_color";
- public static final String COLUMN_LABEL = "label";
- public static final String COLUMN_SYSTEM_STATE = "system_state";
- public static final String COLUMN_KEYWORDS = "keywords";
-
- public static final String[] COLUMNS_HIGH_RES = new String[] {
- IconDB.COLUMN_ICON_COLOR, IconDB.COLUMN_LABEL, IconDB.COLUMN_ICON };
- public static final String[] COLUMNS_LOW_RES = new String[] {
- IconDB.COLUMN_ICON_COLOR, IconDB.COLUMN_LABEL };
-
- public IconDB(Context context, String dbFileName, int iconPixelSize) {
- super(context, dbFileName, (RELEASE_VERSION << 16) + iconPixelSize, TABLE_NAME);
- }
-
- @Override
- protected void onCreateTable(SQLiteDatabase db) {
- db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " ("
- + COLUMN_COMPONENT + " TEXT NOT NULL, "
- + COLUMN_USER + " INTEGER NOT NULL, "
- + COLUMN_LAST_UPDATED + " INTEGER NOT NULL DEFAULT 0, "
- + COLUMN_VERSION + " INTEGER NOT NULL DEFAULT 0, "
- + COLUMN_ICON + " BLOB, "
- + COLUMN_ICON_COLOR + " INTEGER NOT NULL DEFAULT 0, "
- + COLUMN_LABEL + " TEXT, "
- + COLUMN_SYSTEM_STATE + " TEXT, "
- + COLUMN_KEYWORDS + " TEXT, "
- + "PRIMARY KEY (" + COLUMN_COMPONENT + ", " + COLUMN_USER + ") "
- + ");");
- }
- }
-
- private ContentValues newContentValues(BitmapInfo bitmapInfo, String label,
- String packageName, @Nullable String keywords) {
- ContentValues values = new ContentValues();
- values.put(IconDB.COLUMN_ICON,
- bitmapInfo.isLowRes() ? null : GraphicsUtils.flattenBitmap(bitmapInfo.icon));
- values.put(IconDB.COLUMN_ICON_COLOR, bitmapInfo.color);
-
- values.put(IconDB.COLUMN_LABEL, label);
- values.put(IconDB.COLUMN_SYSTEM_STATE, getIconSystemState(packageName));
- values.put(IconDB.COLUMN_KEYWORDS, keywords);
- return values;
- }
-
- private void assertWorkerThread() {
- if (Looper.myLooper() != mBgLooper) {
- throw new IllegalStateException("Cache accessed on wrong thread " + Looper.myLooper());
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/CachingLogic.java b/iconloaderlib/src/com/android/launcher3/icons/cache/CachingLogic.java
deleted file mode 100644
index c12e9dc..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/CachingLogic.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons.cache;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.pm.PackageInfo;
-import android.os.LocaleList;
-import android.os.UserHandle;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import com.android.launcher3.icons.BitmapInfo;
-
-public interface CachingLogic<T> {
-
- ComponentName getComponent(T object);
-
- UserHandle getUser(T object);
-
- CharSequence getLabel(T object);
-
- default CharSequence getDescription(T object, CharSequence fallback) {
- return fallback;
- }
-
- @NonNull
- BitmapInfo loadIcon(Context context, T object);
-
- /**
- * Provides a option list of keywords to associate with this object
- */
- @Nullable
- default String getKeywords(T object, LocaleList localeList) {
- return null;
- }
-
- /**
- * Returns the timestamp the entry was last updated in cache.
- */
- default long getLastUpdatedTime(T object, PackageInfo info) {
- return info.lastUpdateTime;
- }
-
- /**
- * Returns true the object should be added to mem cache; otherwise returns false.
- */
- default boolean addToMemCache() {
- return true;
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/HandlerRunnable.java b/iconloaderlib/src/com/android/launcher3/icons/cache/HandlerRunnable.java
deleted file mode 100644
index ee52934..0000000
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/HandlerRunnable.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons.cache;
-
-import android.os.Handler;
-
-/**
- * A runnable that can be posted to a {@link Handler} which can be canceled.
- */
-public abstract class HandlerRunnable implements Runnable {
-
- private final Handler mHandler;
- private final Runnable mEndRunnable;
-
- private boolean mEnded = false;
- private boolean mCanceled = false;
-
- public HandlerRunnable(Handler handler, Runnable endRunnable) {
- mHandler = handler;
- mEndRunnable = endRunnable;
- }
-
- /**
- * Cancels this runnable from being run, only if it has not already run.
- */
- public void cancel() {
- mHandler.removeCallbacks(this);
- // TODO: This can actually cause onEnd to be called twice if the handler is already running
- // this runnable
- // NOTE: This is currently run on whichever thread the caller is run on.
- mCanceled = true;
- onEnd();
- }
-
- /**
- * @return whether this runnable was canceled.
- */
- protected boolean isCanceled() {
- return mCanceled;
- }
-
- /**
- * To be called by the implemention of this runnable. The end callback is done on whichever
- * thread the caller is calling from.
- */
- public void onEnd() {
- if (!mEnded) {
- mEnded = true;
- if (mEndRunnable != null) {
- mEndRunnable.run();
- }
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java b/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
index aec1cdd..7b8070a 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
@@ -1,3 +1,4 @@
+<<<<<<< HEAD (cc6caf Merge "Let launcher to provide its own OverscrollPlugin" int)
/*
* Copyright (C) 2018 The Android Open Source Project
*
@@ -312,3 +313,5 @@
void onPackageIconsUpdated(HashSet<String> updatedPackages, UserHandle user);
}
}
+=======
+>>>>>>> CHANGE (805b52 Removes iconloaderlib from Launcher3.)
diff --git a/iconloaderlib/src/com/android/launcher3/util/ComponentKey.java b/iconloaderlib/src/com/android/launcher3/util/ComponentKey.java
deleted file mode 100644
index 34bed94..0000000
--- a/iconloaderlib/src/com/android/launcher3/util/ComponentKey.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.android.launcher3.util;
-
-/**
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import android.content.ComponentName;
-import android.os.UserHandle;
-
-import java.util.Arrays;
-
-public class ComponentKey {
-
- public final ComponentName componentName;
- public final UserHandle user;
-
- private final int mHashCode;
-
- public ComponentKey(ComponentName componentName, UserHandle user) {
- if (componentName == null || user == null) {
- throw new NullPointerException();
- }
- this.componentName = componentName;
- this.user = user;
- mHashCode = Arrays.hashCode(new Object[] {componentName, user});
-
- }
-
- @Override
- public int hashCode() {
- return mHashCode;
- }
-
- @Override
- public boolean equals(Object o) {
- ComponentKey other = (ComponentKey) o;
- return other.componentName.equals(componentName) && other.user.equals(user);
- }
-
- /**
- * Encodes a component key as a string of the form [flattenedComponentString#userId].
- */
- @Override
- public String toString() {
- return componentName.flattenToString() + "#" + user;
- }
-}
\ No newline at end of file
diff --git a/iconloaderlib/src/com/android/launcher3/util/NoLocaleSQLiteHelper.java b/iconloaderlib/src/com/android/launcher3/util/NoLocaleSQLiteHelper.java
deleted file mode 100644
index fe864a2..0000000
--- a/iconloaderlib/src/com/android/launcher3/util/NoLocaleSQLiteHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.util;
-
-import static android.database.sqlite.SQLiteDatabase.NO_LOCALIZED_COLLATORS;
-
-import android.content.Context;
-import android.content.ContextWrapper;
-import android.database.DatabaseErrorHandler;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteDatabase.CursorFactory;
-import android.database.sqlite.SQLiteDatabase.OpenParams;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.os.Build;
-
-/**
- * Extension of {@link SQLiteOpenHelper} which avoids creating default locale table by
- * A context wrapper which creates databases without support for localized collators.
- */
-public abstract class NoLocaleSQLiteHelper extends SQLiteOpenHelper {
-
- private static final boolean ATLEAST_P =
- Build.VERSION.SDK_INT >= Build.VERSION_CODES.P;
-
- public NoLocaleSQLiteHelper(Context context, String name, int version) {
- super(ATLEAST_P ? context : new NoLocalContext(context), name, null, version);
- if (ATLEAST_P) {
- setOpenParams(new OpenParams.Builder().addOpenFlags(NO_LOCALIZED_COLLATORS).build());
- }
- }
-
- private static class NoLocalContext extends ContextWrapper {
- public NoLocalContext(Context base) {
- super(base);
- }
-
- @Override
- public SQLiteDatabase openOrCreateDatabase(
- String name, int mode, CursorFactory factory, DatabaseErrorHandler errorHandler) {
- return super.openOrCreateDatabase(
- name, mode | Context.MODE_NO_LOCALIZED_COLLATORS, factory, errorHandler);
- }
- }
-}
diff --git a/iconloaderlib/src/com/android/launcher3/util/SQLiteCacheHelper.java b/iconloaderlib/src/com/android/launcher3/util/SQLiteCacheHelper.java
deleted file mode 100644
index 49de4bd..0000000
--- a/iconloaderlib/src/com/android/launcher3/util/SQLiteCacheHelper.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package com.android.launcher3.util;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteException;
-import android.database.sqlite.SQLiteFullException;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.util.Log;
-
-/**
- * An extension of {@link SQLiteOpenHelper} with utility methods for a single table cache DB.
- * Any exception during write operations are ignored, and any version change causes a DB reset.
- */
-public abstract class SQLiteCacheHelper {
- private static final String TAG = "SQLiteCacheHelper";
-
- private static final boolean IN_MEMORY_CACHE = false;
-
- private final String mTableName;
- private final MySQLiteOpenHelper mOpenHelper;
-
- private boolean mIgnoreWrites;
-
- public SQLiteCacheHelper(Context context, String name, int version, String tableName) {
- if (IN_MEMORY_CACHE) {
- name = null;
- }
- mTableName = tableName;
- mOpenHelper = new MySQLiteOpenHelper(context, name, version);
-
- mIgnoreWrites = false;
- }
-
- /**
- * @see SQLiteDatabase#delete(String, String, String[])
- */
- public void delete(String whereClause, String[] whereArgs) {
- if (mIgnoreWrites) {
- return;
- }
- try {
- mOpenHelper.getWritableDatabase().delete(mTableName, whereClause, whereArgs);
- } catch (SQLiteFullException e) {
- onDiskFull(e);
- } catch (SQLiteException e) {
- Log.d(TAG, "Ignoring sqlite exception", e);
- }
- }
-
- /**
- * @see SQLiteDatabase#insertWithOnConflict(String, String, ContentValues, int)
- */
- public void insertOrReplace(ContentValues values) {
- if (mIgnoreWrites) {
- return;
- }
- try {
- mOpenHelper.getWritableDatabase().insertWithOnConflict(
- mTableName, null, values, SQLiteDatabase.CONFLICT_REPLACE);
- } catch (SQLiteFullException e) {
- onDiskFull(e);
- } catch (SQLiteException e) {
- Log.d(TAG, "Ignoring sqlite exception", e);
- }
- }
-
- private void onDiskFull(SQLiteFullException e) {
- Log.e(TAG, "Disk full, all write operations will be ignored", e);
- mIgnoreWrites = true;
- }
-
- /**
- * @see SQLiteDatabase#query(String, String[], String, String[], String, String, String)
- */
- public Cursor query(String[] columns, String selection, String[] selectionArgs) {
- return mOpenHelper.getReadableDatabase().query(
- mTableName, columns, selection, selectionArgs, null, null, null);
- }
-
- public void clear() {
- mOpenHelper.clearDB(mOpenHelper.getWritableDatabase());
- }
-
- public void close() {
- mOpenHelper.close();
- }
-
- protected abstract void onCreateTable(SQLiteDatabase db);
-
- /**
- * A private inner class to prevent direct DB access.
- */
- private class MySQLiteOpenHelper extends NoLocaleSQLiteHelper {
-
- public MySQLiteOpenHelper(Context context, String name, int version) {
- super(context, name, version);
- }
-
- @Override
- public void onCreate(SQLiteDatabase db) {
- onCreateTable(db);
- }
-
- @Override
- public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
- if (oldVersion != newVersion) {
- clearDB(db);
- }
- }
-
- @Override
- public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
- if (oldVersion != newVersion) {
- clearDB(db);
- }
- }
-
- private void clearDB(SQLiteDatabase db) {
- db.execSQL("DROP TABLE IF EXISTS " + mTableName);
- onCreate(db);
- }
- }
-}
diff --git a/iconloaderlib/src_full_lib/com/android/launcher3/icons/IconFactory.java b/iconloaderlib/src_full_lib/com/android/launcher3/icons/IconFactory.java
deleted file mode 100644
index 48f11fd..0000000
--- a/iconloaderlib/src_full_lib/com/android/launcher3/icons/IconFactory.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons;
-
-import android.content.Context;
-
-/**
- * Wrapper class to provide access to {@link BaseIconFactory} and also to provide pool of this class
- * that are threadsafe.
- */
-public class IconFactory extends BaseIconFactory {
-
- private static final Object sPoolSync = new Object();
- private static IconFactory sPool;
- private static int sPoolId = 0;
-
- /**
- * Return a new Message instance from the global pool. Allows us to
- * avoid allocating new objects in many cases.
- */
- public static IconFactory obtain(Context context) {
- int poolId;
- synchronized (sPoolSync) {
- if (sPool != null) {
- IconFactory m = sPool;
- sPool = m.next;
- m.next = null;
- return m;
- }
- poolId = sPoolId;
- }
-
- return new IconFactory(context,
- context.getResources().getConfiguration().densityDpi,
- context.getResources().getDimensionPixelSize(R.dimen.default_icon_bitmap_size),
- poolId);
- }
-
- public static void clearPool() {
- synchronized (sPoolSync) {
- sPool = null;
- sPoolId++;
- }
- }
-
- private final int mPoolId;
-
- private IconFactory next;
-
- private IconFactory(Context context, int fillResIconDpi, int iconBitmapSize, int poolId) {
- super(context, fillResIconDpi, iconBitmapSize);
- mPoolId = poolId;
- }
-
- /**
- * Recycles a LauncherIcons that may be in-use.
- */
- public void recycle() {
- synchronized (sPoolSync) {
- if (sPoolId != mPoolId) {
- return;
- }
- // Clear any temporary state variables
- clear();
-
- next = sPool;
- sPool = this;
- }
- }
-
- @Override
- public void close() {
- recycle();
- }
-}
diff --git a/iconloaderlib/src_full_lib/com/android/launcher3/icons/SimpleIconCache.java b/iconloaderlib/src_full_lib/com/android/launcher3/icons/SimpleIconCache.java
deleted file mode 100644
index 1337975..0000000
--- a/iconloaderlib/src_full_lib/com/android/launcher3/icons/SimpleIconCache.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.icons;
-
-import static android.content.Intent.ACTION_MANAGED_PROFILE_ADDED;
-import static android.content.Intent.ACTION_MANAGED_PROFILE_REMOVED;
-
-import android.annotation.TargetApi;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.ApplicationInfo;
-import android.os.Build;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.util.SparseLongArray;
-
-import com.android.launcher3.icons.cache.BaseIconCache;
-
-/**
- * Wrapper class to provide access to {@link BaseIconFactory} and also to provide pool of this class
- * that are threadsafe.
- */
-@TargetApi(Build.VERSION_CODES.P)
-public class SimpleIconCache extends BaseIconCache {
-
- private static SimpleIconCache sIconCache = null;
- private static final Object CACHE_LOCK = new Object();
-
- private final SparseLongArray mUserSerialMap = new SparseLongArray(2);
- private final UserManager mUserManager;
-
- public SimpleIconCache(Context context, String dbFileName, Looper bgLooper, int iconDpi,
- int iconPixelSize, boolean inMemoryCache) {
- super(context, dbFileName, bgLooper, iconDpi, iconPixelSize, inMemoryCache);
- mUserManager = context.getSystemService(UserManager.class);
-
- // Listen for user cache changes.
- IntentFilter filter = new IntentFilter(ACTION_MANAGED_PROFILE_ADDED);
- filter.addAction(ACTION_MANAGED_PROFILE_REMOVED);
- context.registerReceiver(new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- resetUserCache();
- }
- }, filter, null, new Handler(bgLooper), 0);
- }
-
- @Override
- protected long getSerialNumberForUser(UserHandle user) {
- synchronized (mUserSerialMap) {
- int index = mUserSerialMap.indexOfKey(user.getIdentifier());
- if (index >= 0) {
- return mUserSerialMap.valueAt(index);
- }
- long serial = mUserManager.getSerialNumberForUser(user);
- mUserSerialMap.put(user.getIdentifier(), serial);
- return serial;
- }
- }
-
- private void resetUserCache() {
- synchronized (mUserSerialMap) {
- mUserSerialMap.clear();
- }
- }
-
- @Override
- protected boolean isInstantApp(ApplicationInfo info) {
- return info.isInstantApp();
- }
-
- @Override
- protected BaseIconFactory getIconFactory() {
- return IconFactory.obtain(mContext);
- }
-
- public static SimpleIconCache getIconCache(Context context) {
- synchronized (CACHE_LOCK) {
- if (sIconCache != null) {
- return sIconCache;
- }
- boolean inMemoryCache =
- context.getResources().getBoolean(R.bool.simple_cache_enable_im_memory);
- String dbFileName = context.getString(R.string.cache_db_name);
-
- HandlerThread bgThread = new HandlerThread("simple-icon-cache");
- bgThread.start();
-
- sIconCache = new SimpleIconCache(context.getApplicationContext(), dbFileName,
- bgThread.getLooper(), context.getResources().getConfiguration().densityDpi,
- context.getResources().getDimensionPixelSize(R.dimen.default_icon_bitmap_size),
- inMemoryCache);
- return sIconCache;
- }
- }
-}
diff --git a/quickstep/recents_ui_overrides/res/layout/fallback_recents_activity.xml b/quickstep/recents_ui_overrides/res/layout/fallback_recents_activity.xml
index 686189e..ffe906c 100644
--- a/quickstep/recents_ui_overrides/res/layout/fallback_recents_activity.xml
+++ b/quickstep/recents_ui_overrides/res/layout/fallback_recents_activity.xml
@@ -31,6 +31,6 @@
<include
android:id="@+id/overview_actions_view"
- layout="@layout/overview_actions_holder" />
+ layout="@layout/overview_actions_container" />
</com.android.quickstep.fallback.RecentsRootView>
diff --git a/quickstep/recents_ui_overrides/res/values/colors.xml b/quickstep/recents_ui_overrides/res/values/colors.xml
index 7426e30..361f5f7 100644
--- a/quickstep/recents_ui_overrides/res/values/colors.xml
+++ b/quickstep/recents_ui_overrides/res/values/colors.xml
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<resources>
<color name="chip_hint_foreground_color">#fff</color>
diff --git a/iconloaderlib/res/values/dimens.xml b/quickstep/recents_ui_overrides/res/values/config.xml
similarity index 60%
rename from iconloaderlib/res/values/dimens.xml
rename to quickstep/recents_ui_overrides/res/values/config.xml
index e8c0c44..527eec6 100644
--- a/iconloaderlib/res/values/dimens.xml
+++ b/quickstep/recents_ui_overrides/res/values/config.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 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.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ 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,
@@ -13,7 +13,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources>
- <dimen name="profile_badge_size">24dp</dimen>
-</resources>
+ <integer name="app_background_blur_radius">150</integer>
+ <integer name="allapps_background_blur_radius">90</integer>
+ <integer name="overview_background_blur_radius">50</integer>
+ <integer name="folder_background_blur_radius_adjustment">20</integer>
+</resources>
\ No newline at end of file
diff --git a/quickstep/recents_ui_overrides/res/values/dimens.xml b/quickstep/recents_ui_overrides/res/values/dimens.xml
index 61c576e..20b1485 100644
--- a/quickstep/recents_ui_overrides/res/values/dimens.xml
+++ b/quickstep/recents_ui_overrides/res/values/dimens.xml
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<resources>
<dimen name="chip_hint_border_width">1dp</dimen>
<dimen name="chip_hint_corner_radius">20dp</dimen>
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
index 7728207..7bc656a 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
@@ -91,8 +91,9 @@
AppWindowAnimationHelper helper =
new AppWindowAnimationHelper(recentsView.getPagedViewOrientedState(), mLauncher);
- anim.play(getRecentsWindowAnimator(taskView, skipLauncherChanges, appTargets,
- wallpaperTargets, helper).setDuration(RECENTS_LAUNCH_DURATION));
+ Animator recentsAnimator = getRecentsWindowAnimator(taskView, skipLauncherChanges,
+ appTargets, wallpaperTargets, mLauncher.getBackgroundBlurController(), helper);
+ anim.play(recentsAnimator.setDuration(RECENTS_LAUNCH_DURATION));
Animator childStateAnimation = null;
// Found a visible recents task that matches the opening app, lets launch the app from there
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java
index 834e6cf..8faec46 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java
@@ -1,5 +1,5 @@
-/**
- * Copyright (C) 2019 The Android Open Source Project
+/*
+ * Copyright (C) 2012 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.
@@ -16,8 +16,11 @@
package com.android.launcher3.appprediction;
+import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
+import static com.android.launcher3.logging.LoggerUtils.newTarget;
import android.annotation.TargetApi;
import android.content.Context;
@@ -44,6 +47,7 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherSettings;
+import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.allapps.AllAppsStore;
@@ -187,7 +191,7 @@
public int getExpectedHeight() {
return getVisibility() == GONE ? 0 :
Launcher.getLauncher(getContext()).getDeviceProfile().allAppsCellHeightPx
- + getPaddingTop() + getPaddingBottom();
+ + getPaddingTop() + getPaddingBottom();
}
@Override
@@ -282,7 +286,8 @@
mParent.onHeightUpdated();
}
- private List<ItemInfoWithIcon> processPredictedAppComponents(List<ComponentKeyMapper> components) {
+ private List<ItemInfoWithIcon> processPredictedAppComponents(
+ List<ComponentKeyMapper> components) {
if (getAppsStore().getApps().length == 0) {
// Apps have not been bound yet.
return Collections.emptyList();
@@ -309,16 +314,26 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, LauncherLogProto.Target target,
- LauncherLogProto.Target targetParent) {
+ public void fillInLogContainerData(ItemInfo childInfo, LauncherLogProto.Target child,
+ ArrayList<LauncherLogProto.Target> parents) {
for (int i = 0; i < mPredictedApps.size(); i++) {
ItemInfoWithIcon appInfo = mPredictedApps.get(i);
- if (appInfo == info) {
- targetParent.containerType = LauncherLogProto.ContainerType.PREDICTION;
- target.predictedRank = i;
+ if (appInfo == childInfo) {
+ child.predictedRank = i;
break;
}
}
+ parents.add(newContainerTarget(LauncherLogProto.ContainerType.PREDICTION));
+
+ // include where the prediction is coming this used to be Launcher#modifyUserEvent
+ LauncherLogProto.Target parent = newTarget(LauncherLogProto.Target.Type.CONTAINER);
+ LauncherState state = mLauncher.getStateManager().getState();
+ if (state == LauncherState.ALL_APPS) {
+ parent.containerType = LauncherLogProto.ContainerType.ALLAPPS;
+ } else if (state == OVERVIEW) {
+ parent.containerType = LauncherLogProto.ContainerType.TASKSWITCHER;
+ }
+ parents.add(parent);
}
public void setTextAlpha(int textAlpha) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
index c85786f..2cdcd20 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
@@ -572,9 +572,9 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, LauncherLogProto.Target target,
- LauncherLogProto.Target targetParent) {
- mHotseat.fillInLogContainerData(v, info, target, targetParent);
+ public void fillInLogContainerData(ItemInfo childInfo, LauncherLogProto.Target child,
+ ArrayList<LauncherLogProto.Target> parents) {
+ mHotseat.fillInLogContainerData(childInfo, child, parents);
}
private class PinPrediction extends SystemShortcut<QuickstepLauncher> {
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
index 48a2f32..5bac964 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
@@ -15,8 +15,11 @@
*/
package com.android.launcher3.uioverrides.states;
+import android.content.Context;
+
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Launcher;
+import com.android.launcher3.R;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.util.LayoutUtils;
@@ -102,4 +105,9 @@
}
return super.getHotseatScaleAndTranslation(launcher);
}
+
+ @Override
+ public int getBackgroundBlurRadius(Context context) {
+ return context.getResources().getInteger(R.integer.app_background_blur_radius);
+ }
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 7895bac..bfbb630 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -35,6 +35,7 @@
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
+import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
@@ -206,6 +207,11 @@
}
@Override
+ public int getBackgroundBlurRadius(Context context) {
+ return context.getResources().getInteger(R.integer.overview_background_blur_radius);
+ }
+
+ @Override
public void onBackPressed(Launcher launcher) {
TaskView taskView = launcher.<RecentsView>getOverviewPanel().getRunningTaskView();
if (taskView != null) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java
index cebb075..a0ca886 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java
@@ -171,7 +171,8 @@
}
}
anim.setDuration(accuracy);
- mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy, this::clearState);
+ mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy)
+ .setOnCancelRunnable(this::clearState);
}
private void clearState() {
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
index 715529e..52625dc 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -393,7 +393,7 @@
xOverviewAnim.setFloatValues(startXProgress, endXProgress);
xOverviewAnim.setDuration(xDuration)
.setInterpolator(scrollInterpolatorForVelocity(velocity.x));
- mXOverviewAnim.dispatchOnStartWithVelocity(endXProgress, velocity.x);
+ mXOverviewAnim.dispatchOnStart();
boolean flingUpToNormal = verticalFling && velocity.y < 0 && targetState == NORMAL;
@@ -414,7 +414,7 @@
ValueAnimator yOverviewAnim = mYOverviewAnim.getAnimationPlayer();
yOverviewAnim.setFloatValues(startYProgress, endYProgress);
yOverviewAnim.setDuration(yDuration);
- mYOverviewAnim.dispatchOnStartWithVelocity(endYProgress, velocity.y);
+ mYOverviewAnim.dispatchOnStart();
ValueAnimator nonOverviewAnim = mNonOverviewAnim.getAnimationPlayer();
if (flingUpToNormal && !mIsHomeScreenVisible) {
@@ -436,8 +436,7 @@
float startProgress = mNonOverviewAnim.getProgressFraction();
float endProgress = canceled ? 0 : 1;
nonOverviewAnim.setFloatValues(startProgress, endProgress);
- mNonOverviewAnim.dispatchOnStartWithVelocity(endProgress,
- horizontalFling ? velocity.x : velocity.y);
+ mNonOverviewAnim.dispatchOnStart();
}
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
index 1f5228a..845699a 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
@@ -22,7 +22,7 @@
import android.view.animation.Interpolator;
import com.android.launcher3.Launcher;
-import com.android.launcher3.util.PendingAnimation;
+import com.android.launcher3.anim.PendingAnimation;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
index e0532ac..cc58fcf 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
@@ -16,17 +16,13 @@
package com.android.launcher3.uioverrides.touchcontrollers;
import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE;
-import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
-import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE;
-import static com.android.launcher3.util.DefaultDisplay.getSingleFrameMs;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
-import android.animation.ValueAnimator;
import android.view.MotionEvent;
import com.android.launcher3.AbstractFloatingView;
@@ -35,12 +31,12 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.Interpolators;
+import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.touch.BaseSwipeDetector;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.touch.SingleAxisSwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.util.FlingBlockCheck;
-import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.views.BaseDragLayer;
import com.android.quickstep.SysUINavigationMode;
@@ -218,8 +214,8 @@
if (mCurrentAnimation != null) {
mCurrentAnimation.setOnCancelRunnable(null);
}
- mCurrentAnimation = AnimatorPlaybackController.wrap(
- mPendingAnimation.anim, maxDuration, this::clearState);
+ mCurrentAnimation = AnimatorPlaybackController.wrap(mPendingAnimation, maxDuration)
+ .setOnCancelRunnable(this::clearState);
onUserControlledAnimationCreated(mCurrentAnimation);
mCurrentAnimation.getTarget().addListener(this);
mCurrentAnimation.dispatchOnStart();
@@ -288,26 +284,16 @@
animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity);
}
- float nextFrameProgress = Utilities.boundToRange(progress
- + velocity * getSingleFrameMs(mActivity) / Math.abs(mEndDisplacement), 0f, 1f);
-
mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction));
-
- ValueAnimator anim = mCurrentAnimation.getAnimationPlayer();
- anim.setFloatValues(nextFrameProgress, goingToEnd ? 1f : 0f);
- anim.setDuration(animationDuration);
- anim.setInterpolator(scrollInterpolatorForVelocity(velocity));
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
- anim.addUpdateListener(valueAnimator -> {
+ mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> {
if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) {
mRecentsView.redrawLiveTile(true);
}
});
}
- if (UNSTABLE_SPRINGS.get()) {
- mCurrentAnimation.dispatchOnStartWithVelocity(goingToEnd ? 1f : 0f, velocity);
- }
- anim.start();
+ mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
+ velocity, mEndDisplacement, animationDuration);
}
private void onCurrentAnimationEnd(boolean wasSuccess, int logAction) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
index 375f160..e1ff4f4 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
@@ -15,13 +15,17 @@
*/
package com.android.quickstep;
+import static com.android.launcher3.LauncherState.BACKGROUND_APP;
+import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
+import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
import android.animation.Animator;
import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.graphics.Rect;
import android.util.Log;
@@ -30,7 +34,9 @@
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.anim.AnimationSuccessListener;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.quickstep.util.AppWindowAnimationHelper;
+import com.android.quickstep.util.AppWindowAnimationHelper.TransformParams;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -38,7 +44,7 @@
import com.android.systemui.shared.system.TransactionCompat;
/**
- * Provider for the atomic remote window animation from the app to the overview.
+ * Provider for the atomic (for 3-button mode) remote window animation from the app to the overview.
*
* @param <T> activity that contains the overview
*/
@@ -48,15 +54,15 @@
private static final long RECENTS_LAUNCH_DURATION = 250;
private static final String TAG = "AppToOverviewAnimationProvider";
- private final BaseActivityInterface<T> mHelper;
+ private final BaseActivityInterface<T> mActivityInterface;
// The id of the currently running task that is transitioning to overview.
private final int mTargetTaskId;
private T mActivity;
private RecentsView mRecentsView;
- AppToOverviewAnimationProvider(BaseActivityInterface<T> helper, int targetTaskId) {
- mHelper = helper;
+ AppToOverviewAnimationProvider(BaseActivityInterface<T> activityInterface, int targetTaskId) {
+ mActivityInterface = activityInterface;
mTargetTaskId = targetTaskId;
}
@@ -70,7 +76,7 @@
activity.<RecentsView>getOverviewPanel().showCurrentTask(mTargetTaskId);
AbstractFloatingView.closeAllOpenViews(activity, wasVisible);
BaseActivityInterface.AnimationFactory factory =
- mHelper.prepareRecentsUI(wasVisible,
+ mActivityInterface.prepareRecentsUI(wasVisible,
false /* animate activity */, (controller) -> {
controller.dispatchOnStart();
ValueAnimator anim = controller.getAnimationPlayer()
@@ -98,11 +104,18 @@
if (mRecentsView != null) {
mRecentsView.setRunningTaskIconScaledDown(true);
}
+
+ BackgroundBlurController blurController = mActivityInterface.getBackgroundBlurController();
+ if (blurController != null) {
+ // Update the surface to be the lowest closing app surface
+ blurController.setSurfaceToLauncher(mRecentsView);
+ }
+
AnimatorSet anim = new AnimatorSet();
anim.addListener(new AnimationSuccessListener() {
@Override
public void onAnimationSuccess(Animator animator) {
- mHelper.onSwipeUpToRecentsComplete();
+ mActivityInterface.onSwipeUpToRecentsComplete();
if (mRecentsView != null) {
mRecentsView.animateUpRunningTaskIconScale();
}
@@ -110,7 +123,8 @@
});
if (mActivity == null) {
Log.e(TAG, "Animation created, before activity");
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
+ anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION))
+ .with(createBackgroundBlurAnimator(blurController));
return anim;
}
@@ -121,7 +135,8 @@
RemoteAnimationTargetCompat runningTaskTarget = targets.findTask(mTargetTaskId);
if (runningTaskTarget == null) {
Log.e(TAG, "No closing app");
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
+ anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION))
+ .with(createBackgroundBlurAnimator(blurController));
return anim;
}
@@ -138,11 +153,12 @@
clipHelper.updateSource(homeBounds, runningTaskTarget);
Rect targetRect = new Rect();
- mHelper.getSwipeUpDestinationAndLength(mActivity.getDeviceProfile(), mActivity, targetRect);
+ mActivityInterface.getSwipeUpDestinationAndLength(mActivity.getDeviceProfile(), mActivity,
+ targetRect);
clipHelper.updateTargetRect(targetRect);
clipHelper.prepareAnimation(mActivity.getDeviceProfile(), false /* isOpening */);
- AppWindowAnimationHelper.TransformParams params = new AppWindowAnimationHelper.TransformParams()
+ TransformParams params = new TransformParams()
.setSyncTransactionApplier(new SyncRtSurfaceTransactionApplierCompat(rootView));
ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1);
valueAnimator.setDuration(RECENTS_LAUNCH_DURATION);
@@ -167,7 +183,8 @@
transaction.apply();
});
}
- anim.play(valueAnimator);
+ anim.play(valueAnimator)
+ .with(createBackgroundBlurAnimator(blurController));
return anim;
}
@@ -179,4 +196,15 @@
long getRecentsLaunchDuration() {
return RECENTS_LAUNCH_DURATION;
}
+
+ private Animator createBackgroundBlurAnimator(BackgroundBlurController blurController) {
+ if (blurController == null) {
+ // Dummy animation
+ return ValueAnimator.ofInt(0);
+ }
+ return ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR,
+ BACKGROUND_APP.getBackgroundBlurRadius(mActivity),
+ OVERVIEW.getBackgroundBlurRadius(mActivity))
+ .setDuration(RECENTS_LAUNCH_DURATION);
+ }
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java
index 65fba08..ce67457 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java
@@ -41,6 +41,9 @@
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.touch.LandscapePagedViewHandler;
+import com.android.launcher3.touch.PagedOrientationHandler;
+import com.android.launcher3.touch.PortraitPagedViewHandler;
import com.android.launcher3.util.ObjectWrapper;
import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory;
import com.android.quickstep.GestureState.GestureEndTarget;
@@ -470,8 +473,13 @@
HomeAnimationFactory factory = new HomeAnimationFactory() {
@Override
public RectF getWindowTargetRect() {
+ PagedOrientationHandler orientationHandler = mRecentsView != null
+ ? mRecentsView.getPagedOrientationHandler()
+ : (mDp.isLandscape
+ ? new LandscapePagedViewHandler()
+ : new PortraitPagedViewHandler());
return HomeAnimationFactory
- .getDefaultWindowTargetRect(mRecentsView.getPagedOrientationHandler(), mDp);
+ .getDefaultWindowTargetRect(orientationHandler, mDp);
}
@Override
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java
index ccc2150..d402a75 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java
@@ -56,6 +56,8 @@
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.appprediction.PredictionUiStateManager;
import com.android.launcher3.touch.PagedOrientationHandler;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
+import com.android.launcher3.uioverrides.BackgroundBlurController.ClampedBlurProperty;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.views.FloatingIconView;
import com.android.quickstep.SysUINavigationMode.Mode;
@@ -327,8 +329,19 @@
fromState.getVerticalProgress(activity),
endState.getVerticalProgress(activity)));
}
+
+ // Animate the blur
+ BackgroundBlurController blurController = getBackgroundBlurController();
+ int fromBlurRadius = fromState.getBackgroundBlurRadius(activity);
+ int toBlurRadius = endState.getBackgroundBlurRadius(activity);
+ Animator backgroundBlur = ObjectAnimator.ofInt(blurController,
+ new ClampedBlurProperty(toBlurRadius, fromBlurRadius),
+ fromBlurRadius, toBlurRadius);
+ anim.play(backgroundBlur);
+
playScaleDownAnim(anim, activity, fromState, endState);
+
anim.setDuration(transitionLength * 2);
anim.setInterpolator(LINEAR);
AnimatorPlaybackController controller =
@@ -542,4 +555,14 @@
PredictionUiStateManager.INSTANCE.get(launcher).switchClient(
PredictionUiStateManager.Client.OVERVIEW);
}
+
+ @Nullable
+ @Override
+ public BackgroundBlurController getBackgroundBlurController() {
+ BaseQuickstepLauncher launcher = getCreatedActivity();
+ if (launcher == null) {
+ return null;
+ }
+ return launcher.getBackgroundBlurController();
+ }
}
\ No newline at end of file
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
index 3807e45..3328abc 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
@@ -294,6 +294,7 @@
}
setupRecentsViewUi();
+ mActivityInterface.getBackgroundBlurController().setSurfaceToLauncher(mRecentsView);
if (mDeviceState.getNavMode() == TWO_BUTTONS) {
// If the device is in two button mode, swiping up will show overview with predictions
@@ -999,7 +1000,7 @@
mLauncherTransitionController.getAnimationPlayer().setDuration(Math.max(0, duration));
if (UNSTABLE_SPRINGS.get()) {
- mLauncherTransitionController.dispatchOnStartWithVelocity(end, velocityPxPerMs.y);
+ mLauncherTransitionController.dispatchOnStart();
}
mLauncherTransitionController.getAnimationPlayer().start();
mHasLauncherTransitionControllerStarted = true;
@@ -1015,7 +1016,9 @@
HomeAnimationFactory homeAnimationFactory) {
RectFSpringAnim anim =
super.createWindowAnimationToHome(startProgress, homeAnimationFactory);
- anim.addOnUpdateListener((r, p) -> updateSysUiFlags(Math.max(p, mCurrentShift.value)));
+ anim.addOnUpdateListener((r, p) -> {
+ updateSysUiFlags(Math.max(p, mCurrentShift.value));
+ });
anim.addAnimatorListener(new AnimationSuccessListener() {
@Override
public void onAnimationStart(Animator animation) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsActivity.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsActivity.java
index 94b0051..f2e8f96 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsActivity.java
@@ -185,8 +185,10 @@
boolean activityClosing = taskIsATargetWithMode(appTargets, getTaskId(), MODE_CLOSING);
AppWindowAnimationHelper helper = new AppWindowAnimationHelper(
mFallbackRecentsView.getPagedViewOrientedState(), this);
- target.play(getRecentsWindowAnimator(taskView, !activityClosing, appTargets,
- wallpaperTargets, helper).setDuration(RECENTS_LAUNCH_DURATION));
+ Animator recentsAnimator = getRecentsWindowAnimator(taskView, !activityClosing, appTargets,
+ wallpaperTargets, null /* backgroundBlurController */,
+ helper);
+ target.play(recentsAnimator.setDuration(RECENTS_LAUNCH_DURATION));
// Found a visible recents task that matches the opening app, lets launch the app from there
if (activityClosing) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
index 8d73591..38b86ce 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
@@ -15,13 +15,17 @@
*/
package com.android.quickstep;
+import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
+import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.ComponentName;
import android.graphics.RectF;
@@ -31,6 +35,7 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.Utilities;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.quickstep.util.AppWindowAnimationHelper;
import com.android.quickstep.util.MultiValueUpdateListener;
import com.android.quickstep.views.RecentsView;
@@ -115,9 +120,11 @@
* @return Animator that controls the window of the opening targets for the recents launch
* animation.
*/
- public static ValueAnimator getRecentsWindowAnimator(TaskView v, boolean skipViewChanges,
+ public static Animator getRecentsWindowAnimator(TaskView v, boolean skipViewChanges,
RemoteAnimationTargetCompat[] appTargets,
- RemoteAnimationTargetCompat[] wallpaperTargets, final AppWindowAnimationHelper inOutHelper) {
+ RemoteAnimationTargetCompat[] wallpaperTargets,
+ BackgroundBlurController backgroundBlurController,
+ final AppWindowAnimationHelper inOutHelper) {
SyncRtSurfaceTransactionApplierCompat applier =
new SyncRtSurfaceTransactionApplierCompat(v);
final RemoteAnimationTargets targets =
@@ -129,6 +136,7 @@
.setTargetSet(targets)
.setLauncherOnTop(true);
+ AnimatorSet animatorSet = new AnimatorSet();
final RecentsView recentsView = v.getRecentsView();
final ValueAnimator appAnimator = ValueAnimator.ofFloat(0, 1);
appAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR);
@@ -137,8 +145,6 @@
// Defer fading out the view until after the app window gets faded in
final FloatProp mViewAlpha = new FloatProp(1f, 0f, 75, 75, LINEAR);
final FloatProp mTaskAlpha = new FloatProp(0f, 1f, 0, 75, LINEAR);
-
-
final RectF mThumbnailRect;
{
@@ -208,6 +214,14 @@
targets.release();
}
});
- return appAnimator;
+
+ if (backgroundBlurController != null) {
+ ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofInt(backgroundBlurController,
+ BACKGROUND_BLUR, BACKGROUND_APP.getBackgroundBlurRadius(v.getContext()));
+ animatorSet.playTogether(appAnimator, backgroundRadiusAnim);
+ } else {
+ animatorSet.play(appAnimator);
+ }
+ return animatorSet;
}
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
index 4598cdf..0f63336 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -760,7 +760,9 @@
} else {
// Dump everything
FeatureFlags.dump(pw);
- PluginManagerWrapper.INSTANCE.get(getBaseContext()).dump(pw);
+ if (mDeviceState.isUserUnlocked()) {
+ PluginManagerWrapper.INSTANCE.get(getBaseContext()).dump(pw);
+ }
mDeviceState.dump(pw);
if (mOverviewComponentObserver != null) {
mOverviewComponentObserver.dump(pw);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/logging/UserEventDispatcherAppPredictionExtension.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/logging/UserEventDispatcherAppPredictionExtension.java
index b251f9e..b9ef57e 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/logging/UserEventDispatcherAppPredictionExtension.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/logging/UserEventDispatcherAppPredictionExtension.java
@@ -23,6 +23,8 @@
import com.android.launcher3.appprediction.PredictionUiStateManager;
import com.android.launcher3.userevent.nano.LauncherLogProto;
+import java.util.ArrayList;
+
/**
* This class handles AOSP MetricsLogger function calls and logging around
* quickstep interactions and app launches.
@@ -41,7 +43,7 @@
@Override
protected void onFillInLogContainerData(
@NonNull ItemInfo itemInfo, @NonNull LauncherLogProto.Target target,
- @NonNull LauncherLogProto.Target targetParent) {
+ @NonNull ArrayList<LauncherLogProto.Target> targets) {
PredictionUiStateManager.fillInPredictedRank(itemInfo, target);
}
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
index 91af156..681ce02 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
@@ -17,6 +17,7 @@
import android.annotation.TargetApi;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.Matrix;
import android.graphics.Matrix.ScaleToFit;
import android.graphics.Rect;
@@ -104,9 +105,10 @@
private TargetAlphaProvider mBaseAlphaCallback = (t, a) -> 1;
public AppWindowAnimationHelper(PagedViewOrientedState orientedState, Context context) {
+ Resources res = context.getResources();
mOrientedState = orientedState;
- mWindowCornerRadius = getWindowCornerRadius(context.getResources());
- mSupportsRoundedCornersOnWindows = supportsRoundedCornersOnWindows(context.getResources());
+ mWindowCornerRadius = getWindowCornerRadius(res);
+ mSupportsRoundedCornersOnWindows = supportsRoundedCornersOnWindows(res);
mTaskCornerRadius = TaskCornerRadius.get(context);
mUseRoundedCornersOnWindows = mSupportsRoundedCornersOnWindows;
}
@@ -196,14 +198,15 @@
SurfaceParams[] surfaceParams = new SurfaceParams[params.mTargetSet.unfilteredApps.length];
for (int i = 0; i < params.mTargetSet.unfilteredApps.length; i++) {
RemoteAnimationTargetCompat app = params.mTargetSet.unfilteredApps[i];
+ SurfaceParams.Builder builder = new SurfaceParams.Builder(app.leash);
mTmpMatrix.setTranslate(app.position.x, app.position.y);
Rect crop = mTmpRect;
crop.set(app.sourceContainerBounds);
crop.offsetTo(0, 0);
float alpha;
- int layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers);
float cornerRadius = 0f;
float scale = Math.max(mCurrentRect.width(), mTargetRect.width()) / crop.width();
+ int layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers);
if (app.mode == params.mTargetSet.targetMode) {
alpha = mTaskAlphaCallback.getAlpha(app, params.mTargetAlpha);
if (app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) {
@@ -239,10 +242,14 @@
layer = Integer.MAX_VALUE;
}
}
- // Since radius is in Surface space, but we draw the rounded corners in screen space, we
- // have to undo the scale.
- surfaceParams[i] = new SurfaceParams(app.leash, alpha, mTmpMatrix, crop, layer,
- cornerRadius / scale);
+ builder.withAlpha(alpha)
+ .withMatrix(mTmpMatrix)
+ .withWindowCrop(crop)
+ .withLayer(layer)
+ // Since radius is in Surface space, but we draw the rounded corners in screen
+ // space, we have to undo the scale
+ .withCornerRadius(cornerRadius / scale);
+ surfaceParams[i] = builder.build();
}
return surfaceParams;
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
index ab8b02f..f60da18 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -48,6 +48,7 @@
import com.android.launcher3.appprediction.PredictionUiStateManager;
import com.android.launcher3.appprediction.PredictionUiStateManager.Client;
import com.android.launcher3.states.RotationHelper;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
import com.android.launcher3.util.TraceHelper;
import com.android.launcher3.views.ScrimView;
@@ -405,4 +406,9 @@
mRecentsExtraViewContainer.setAlpha(alpha);
}
}
+
+ @Override
+ protected BackgroundBlurController getBackgroundBlurController() {
+ return mActivity.getBackgroundBlurController();
+ }
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index d24528a..f60eaa7 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -16,12 +16,10 @@
package com.android.quickstep.views;
-import static androidx.dynamicanimation.animation.DynamicAnimation.MIN_VISIBLE_CHANGE_PIXELS;
-
import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS;
import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
-import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
+import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.Utilities.squaredTouchSlop;
@@ -31,7 +29,7 @@
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
-import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
+import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import static com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController.SUCCESS_TRANSITION_PROGRESS;
import static com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch.TAP;
import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType.CLEAR_ALL_BUTTON;
@@ -44,7 +42,6 @@
import android.animation.LayoutTransition;
import android.animation.LayoutTransition.TransitionListener;
import android.animation.ObjectAnimator;
-import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.ActivityManager;
@@ -94,21 +91,23 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.anim.PendingAnimation;
+import com.android.launcher3.anim.PendingAnimation.EndState;
import com.android.launcher3.anim.PropertyListBuilder;
-import com.android.launcher3.anim.SpringObjectAnimator;
+import com.android.launcher3.anim.SpringProperty;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.graphics.RotationMode;
import com.android.launcher3.states.RotationHelper;
import com.android.launcher3.touch.PagedOrientationHandler.CurveProperties;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.DynamicResource;
import com.android.launcher3.util.OverScroller;
-import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.ViewPool;
import com.android.quickstep.RecentsAnimationController;
@@ -478,7 +477,7 @@
mIPinnedStackAnimationListener.setActivity(mActivity);
SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(
mIPinnedStackAnimationListener);
- addActionsView();
+ setActionsView();
}
@Override
@@ -620,7 +619,7 @@
protected void applyLoadPlan(ArrayList<Task> tasks) {
if (mPendingAnimation != null) {
- mPendingAnimation.addEndListener((onEndListener) -> applyLoadPlan(tasks));
+ mPendingAnimation.addEndListener((endState) -> applyLoadPlan(tasks));
return;
}
@@ -1204,37 +1203,29 @@
}
}
- private void addDismissedTaskAnimations(View taskView, AnimatorSet anim, long duration) {
- addAnim(ObjectAnimator.ofFloat(taskView, ALPHA, 0), duration, ACCEL_2, anim);
+ private void addDismissedTaskAnimations(View taskView, long duration, PendingAnimation anim) {
+ anim.add(ObjectAnimator.ofFloat(taskView, ALPHA, 0).setDuration(duration), ACCEL_2);
FloatProperty<View> secondaryViewTranslate =
mOrientationHandler.getSecondaryViewTranslate();
int secondaryTaskDimension = mOrientationHandler.getSecondaryDimension(taskView);
int verticalFactor = mOrientationHandler.getTaskDismissDirectionFactor();
- if (UNSTABLE_SPRINGS.get() && taskView instanceof TaskView) {
- ResourceProvider rp = DynamicResource.provider(mActivity);
- float dampingRatio = rp.getFloat(R.dimen.dismiss_task_trans_y_damping_ratio);
- float stiffness = rp.getFloat(R.dimen.dismiss_task_trans_y_stiffness);
- addAnim(new SpringObjectAnimator<>(taskView, secondaryViewTranslate,
- MIN_VISIBLE_CHANGE_PIXELS, dampingRatio,
- stiffness, 0, verticalFactor * secondaryTaskDimension),
- duration, LINEAR, anim);
- } else {
- addAnim(ObjectAnimator.ofFloat(taskView, secondaryViewTranslate,
- verticalFactor * secondaryTaskDimension), duration, LINEAR, anim);
- }
+ ResourceProvider rp = DynamicResource.provider(mActivity);
+ SpringProperty sp = new SpringProperty(SpringProperty.FLAG_CAN_SPRING_ON_START)
+ .setDampingRatio(rp.getFloat(R.dimen.dismiss_task_trans_y_damping_ratio))
+ .setStiffness(rp.getFloat(R.dimen.dismiss_task_trans_y_stiffness));
+
+ anim.add(ObjectAnimator.ofFloat(taskView, secondaryViewTranslate,
+ verticalFactor * secondaryTaskDimension).setDuration(duration), LINEAR, sp);
}
- private void removeTask(Task task, int index, PendingAnimation.OnEndListener onEndListener,
- boolean shouldLog) {
+ private void removeTask(Task task, int index, EndState endState) {
if (task != null) {
ActivityManagerWrapper.getInstance().removeTask(task.key.id);
- if (shouldLog) {
- ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
- mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
- onEndListener.logAction, Direction.UP, index, componentKey);
- mActivity.getStatsLogManager().logTaskDismiss(this, componentKey);
- }
+ ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
+ mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
+ endState.logAction, Direction.UP, index, componentKey);
+ mActivity.getStatsLogManager().logTaskDismiss(this, componentKey);
}
}
@@ -1243,12 +1234,11 @@
if (mPendingAnimation != null) {
mPendingAnimation.finish(false, Touch.SWIPE);
}
- AnimatorSet anim = new AnimatorSet();
- PendingAnimation pendingAnimation = new PendingAnimation(anim);
+ PendingAnimation anim = new PendingAnimation();
int count = getPageCount();
if (count == 0) {
- return pendingAnimation;
+ return anim;
}
int[] oldScroll = new int[count];
@@ -1267,7 +1257,7 @@
View child = getChildAt(i);
if (child == taskView) {
if (animateTaskView) {
- addDismissedTaskAnimations(taskView, anim, duration);
+ addDismissedTaskAnimations(taskView, duration, anim);
}
} else {
// If we just take newScroll - oldScroll, everything to the right of dragged task
@@ -1291,20 +1281,15 @@
}
int scrollDiff = newScroll[i] - oldScroll[i] + offset;
if (scrollDiff != 0) {
- if (UNSTABLE_SPRINGS.get() && child instanceof TaskView) {
- ResourceProvider rp = DynamicResource.provider(mActivity);
- float damping = rp.getFloat(R.dimen.dismiss_task_trans_x_damping_ratio);
- float stiffness = rp.getFloat(R.dimen.dismiss_task_trans_x_stiffness);
+ Property translationProperty = mOrientationHandler.getPrimaryViewTranslate();
- addAnim(new SpringObjectAnimator<>(child, VIEW_TRANSLATE_X,
- MIN_VISIBLE_CHANGE_PIXELS, damping,
- stiffness, 0, scrollDiff), duration, ACCEL, anim);
- } else {
- Property translationProperty = mOrientationHandler.getPrimaryViewTranslate();
- addAnim(ObjectAnimator.ofFloat(child, translationProperty, scrollDiff),
- duration, ACCEL, anim);
- }
-
+ ResourceProvider rp = DynamicResource.provider(mActivity);
+ SpringProperty sp = new SpringProperty(SpringProperty.FLAG_CAN_SPRING_ON_END)
+ .setDampingRatio(
+ rp.getFloat(R.dimen.dismiss_task_trans_x_damping_ratio))
+ .setStiffness(rp.getFloat(R.dimen.dismiss_task_trans_x_stiffness));
+ anim.add(ObjectAnimator.ofFloat(child, translationProperty, scrollDiff)
+ .setDuration(duration), ACCEL, sp);
needsCurveUpdates = true;
}
}
@@ -1313,7 +1298,7 @@
if (needsCurveUpdates) {
ValueAnimator va = ValueAnimator.ofFloat(0, 1);
va.addUpdateListener((a) -> updateCurveProperties());
- anim.play(va);
+ anim.add(va);
}
// Add a tiny bit of translation Z, so that it draws on top of other views
@@ -1321,22 +1306,22 @@
taskView.setTranslationZ(0.1f);
}
- mPendingAnimation = pendingAnimation;
- mPendingAnimation.addEndListener(new Consumer<PendingAnimation.OnEndListener>() {
+ mPendingAnimation = anim;
+ mPendingAnimation.addEndListener(new Consumer<EndState>() {
@Override
- public void accept(PendingAnimation.OnEndListener onEndListener) {
+ public void accept(EndState endState) {
if (ENABLE_QUICKSTEP_LIVE_TILE.get() &&
- taskView.isRunningTask() && onEndListener.isSuccess) {
- finishRecentsAnimation(true /* toHome */, () -> onEnd(onEndListener));
+ taskView.isRunningTask() && endState.isSuccess) {
+ finishRecentsAnimation(true /* toHome */, () -> onEnd(endState));
} else {
- onEnd(onEndListener);
+ onEnd(endState);
}
}
- private void onEnd(PendingAnimation.OnEndListener onEndListener) {
- if (onEndListener.isSuccess) {
+ private void onEnd(EndState endState) {
+ if (endState.isSuccess) {
if (shouldRemoveTask) {
- removeTask(taskView.getTask(), draggedIndex, onEndListener, true);
+ removeTask(taskView.getTask(), draggedIndex, endState);
}
int pageToSnapTo = mCurrentPage;
@@ -1358,24 +1343,23 @@
mPendingAnimation = null;
}
});
- return pendingAnimation;
+ return anim;
}
public PendingAnimation createAllTasksDismissAnimation(long duration) {
if (FeatureFlags.IS_STUDIO_BUILD && mPendingAnimation != null) {
throw new IllegalStateException("Another pending animation is still running");
}
- AnimatorSet anim = new AnimatorSet();
- PendingAnimation pendingAnimation = new PendingAnimation(anim);
+ PendingAnimation anim = new PendingAnimation();
int count = getTaskViewCount();
for (int i = 0; i < count; i++) {
- addDismissedTaskAnimations(getTaskViewAt(i), anim, duration);
+ addDismissedTaskAnimations(getTaskViewAt(i), duration, anim);
}
- mPendingAnimation = pendingAnimation;
- mPendingAnimation.addEndListener((onEndListener) -> {
- if (onEndListener.isSuccess) {
+ mPendingAnimation = anim;
+ mPendingAnimation.addEndListener((endState) -> {
+ if (endState.isSuccess) {
// Remove all the task views now
ActivityManagerWrapper.getInstance().removeAllRecentTasks();
removeTasksViewsAndClearAllButton();
@@ -1383,13 +1367,7 @@
}
mPendingAnimation = null;
});
- return pendingAnimation;
- }
-
- private static void addAnim(Animator anim, long duration,
- TimeInterpolator interpolator, AnimatorSet set) {
- anim.setDuration(duration).setInterpolator(interpolator);
- set.play(anim);
+ return anim;
}
private boolean snapToPageRelative(int pageCount, int delta, boolean cycle) {
@@ -1406,8 +1384,8 @@
}
private void runDismissAnimation(PendingAnimation pendingAnim) {
- AnimatorPlaybackController controller = AnimatorPlaybackController.wrap(
- pendingAnim.anim, DISMISS_TASK_DURATION);
+ AnimatorPlaybackController controller =
+ AnimatorPlaybackController.wrap(pendingAnim, DISMISS_TASK_DURATION);
controller.dispatchOnStart();
controller.setEndAction(() -> pendingAnim.finish(true, Touch.SWIPE));
controller.getAnimationPlayer().setInterpolator(FAST_OUT_SLOW_IN);
@@ -1732,7 +1710,7 @@
int count = getTaskViewCount();
if (count == 0) {
- return new PendingAnimation(new AnimatorSet());
+ return new PendingAnimation();
}
int targetSysUiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
@@ -1763,16 +1741,23 @@
appWindowAnimationHelper.fromTaskThumbnailView(tv.getThumbnail(), this);
appWindowAnimationHelper.prepareAnimation(mActivity.getDeviceProfile(), true /* isOpening */);
AnimatorSet anim = createAdjacentPageAnimForTaskLaunch(tv, appWindowAnimationHelper);
+
+ BackgroundBlurController blurController = getBackgroundBlurController();
+ if (blurController != null) {
+ ObjectAnimator backgroundBlur = ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR,
+ BACKGROUND_APP.getBackgroundBlurRadius(mActivity));
+ anim.play(backgroundBlur);
+ }
anim.play(progressAnim);
- anim.setDuration(duration).setInterpolator(interpolator);
+ anim.setDuration(duration)
+ .setInterpolator(interpolator);
- Consumer<Boolean> onTaskLaunchFinish = this::onTaskLaunched;
-
- mPendingAnimation = new PendingAnimation(anim);
- mPendingAnimation.addEndListener((onEndListener) -> {
- if (onEndListener.isSuccess) {
+ mPendingAnimation = new PendingAnimation();
+ mPendingAnimation.add(anim);
+ mPendingAnimation.addEndListener((endState) -> {
+ if (endState.isSuccess) {
Consumer<Boolean> onLaunchResult = (result) -> {
- onTaskLaunchFinish.accept(result);
+ onTaskLaunched(result);
if (!result) {
tv.notifyTaskLaunchFailed(TAG);
}
@@ -1781,11 +1766,11 @@
Task task = tv.getTask();
if (task != null) {
mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
- onEndListener.logAction, Direction.DOWN, indexOfChild(tv),
+ endState.logAction, Direction.DOWN, indexOfChild(tv),
TaskUtils.getLaunchComponentKeyForTask(task.key));
}
} else {
- onTaskLaunchFinish.accept(false);
+ onTaskLaunched(false);
}
mPendingAnimation = null;
});
@@ -2056,6 +2041,11 @@
super.removeView(view);
}
+ @Nullable
+ protected BackgroundBlurController getBackgroundBlurController() {
+ return null;
+ }
+
private boolean isExtraCardView(View view, int index) {
return !(view instanceof TaskView) && !(view instanceof ClearAllButton)
&& index <= mTaskViewStartIndex;
@@ -2101,7 +2091,7 @@
}
}
- private void addActionsView() {
+ private void setActionsView() {
if (mActionsView == null && ENABLE_OVERVIEW_ACTIONS.get()
&& SysUINavigationMode.removeShelfFromOverview(mActivity)) {
mActionsView = ((ViewGroup) getParent()).findViewById(R.id.overview_actions_view);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
index e09e01f..abc037e 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
@@ -58,6 +58,7 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.Interpolators;
+import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.states.RotationHelper;
@@ -67,7 +68,6 @@
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
-import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.ViewPool.Reusable;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.TaskIconCache;
@@ -278,8 +278,8 @@
public AnimatorPlaybackController createLaunchAnimationForRunningTask() {
final PendingAnimation pendingAnimation = getRecentsView().createTaskLaunchAnimation(
this, RECENTS_LAUNCH_DURATION, TOUCH_RESPONSE_INTERPOLATOR);
- AnimatorPlaybackController currentAnimation = AnimatorPlaybackController.wrap(
- pendingAnimation.anim, RECENTS_LAUNCH_DURATION);
+ AnimatorPlaybackController currentAnimation =
+ AnimatorPlaybackController.wrap(pendingAnimation, RECENTS_LAUNCH_DURATION);
currentAnimation.setEndAction(() -> {
pendingAnimation.finish(true, Touch.SWIPE);
launchTask(false);
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index fb0cd17..809543a 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -26,6 +26,7 @@
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
+import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -230,10 +231,18 @@
}
@Override
+ protected void closeOpenViews(boolean animate) {
+ super.closeOpenViews(animate);
+ ActivityManagerWrapper.getInstance()
+ .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY);
+ }
+
+ @Override
protected StateHandler[] createStateHandlers() {
return new StateHandler[] {
getAllAppsController(),
getWorkspace(),
+ getBackgroundBlurController(),
new RecentsViewStateController(this),
new BackButtonAlphaHandler(this)};
}
diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
index 2df490e..f691359 100644
--- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
@@ -21,6 +21,7 @@
import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS;
import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION;
import static com.android.launcher3.LauncherState.ALL_APPS;
+import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.postAsyncCallback;
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
@@ -29,6 +30,7 @@
import static com.android.launcher3.anim.Interpolators.EXAGGERATED_EASE;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_TRANSITIONS;
+import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION;
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius;
@@ -66,6 +68,7 @@
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.shortcuts.DeepShortcutView;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
import com.android.launcher3.views.FloatingIconView;
@@ -87,7 +90,7 @@
/**
* {@link LauncherAppTransitionManager} with Quickstep-specific app transitions for launching from
- * home and/or all-apps.
+ * home and/or all-apps. Not used for 3p launchers.
*/
@TargetApi(Build.VERSION_CODES.O)
@SuppressWarnings("unused")
@@ -136,7 +139,7 @@
// Progress = 0: All apps is fully pulled up, Progress = 1: All apps is fully pulled down.
public static final float ALL_APPS_PROGRESS_OFF_SCREEN = 1.3059858f;
- protected final Launcher mLauncher;
+ protected final BaseQuickstepLauncher mLauncher;
private final DragLayer mDragLayer;
private final AlphaProperty mDragLayerAlpha;
@@ -168,7 +171,7 @@
};
public QuickstepAppTransitionManagerImpl(Context context) {
- mLauncher = Launcher.getLauncher(context);
+ mLauncher = Launcher.cast(Launcher.getLauncher(context));
mDragLayer = mLauncher.getDragLayer();
mDragLayerAlpha = mDragLayer.getAlphaProperty(ALPHA_INDEX_TRANSITIONS);
mHandler = new Handler(Looper.getMainLooper());
@@ -402,9 +405,9 @@
float[] alphas, float[] trans);
/**
- * @return Animator that controls the window of the opening targets.
+ * @return Animator that controls the window of the opening targets from app icons.
*/
- private ValueAnimator getOpeningWindowAnimators(View v,
+ private Animator getOpeningWindowAnimators(View v,
RemoteAnimationTargetCompat[] appTargets,
RemoteAnimationTargetCompat[] wallpaperTargets,
Rect windowTargetBounds, boolean toggleVisibility) {
@@ -458,6 +461,7 @@
RectF currentBounds = new RectF();
RectF temp = new RectF();
+ AnimatorSet animatorSet = new AnimatorSet();
ValueAnimator appAnimator = ValueAnimator.ofFloat(0, 1);
appAnimator.setDuration(APP_LAUNCH_DURATION);
appAnimator.setInterpolator(LINEAR);
@@ -542,15 +546,10 @@
SurfaceParams[] params = new SurfaceParams[appTargets.length];
for (int i = appTargets.length - 1; i >= 0; i--) {
RemoteAnimationTargetCompat target = appTargets[i];
- Rect targetCrop;
- final float alpha;
- final float cornerRadius;
+ SurfaceParams.Builder builder = new SurfaceParams.Builder(target.leash);
if (target.mode == MODE_OPENING) {
matrix.setScale(scale, scale);
matrix.postTranslate(transX0, transY0);
- targetCrop = crop;
- alpha = 1f - mIconAlpha.value;
- cornerRadius = mWindowRadius.value;
matrix.mapRect(currentBounds, targetBounds);
if (mDeviceProfile.isVerticalBarLayout()) {
currentBounds.right -= croppedWidth;
@@ -558,22 +557,44 @@
currentBounds.bottom -= croppedHeight;
}
floatingView.update(currentBounds, mIconAlpha.value, percent, 0f,
- cornerRadius * scale, true /* isOpening */);
+ mWindowRadius.value * scale, true /* isOpening */);
+ builder.withMatrix(matrix)
+ .withWindowCrop(crop)
+ .withAlpha(1f - mIconAlpha.value)
+ .withCornerRadius(mWindowRadius.value);
} else {
matrix.setTranslate(target.position.x, target.position.y);
- targetCrop = target.sourceContainerBounds;
- alpha = 1f;
- cornerRadius = 0;
+ builder.withMatrix(matrix)
+ .withWindowCrop(target.sourceContainerBounds)
+ .withAlpha(1f);
}
-
- params[i] = new SurfaceParams(target.leash, alpha, matrix, targetCrop,
- RemoteAnimationProvider.getLayer(target, MODE_OPENING),
- cornerRadius);
+ builder.withLayer(RemoteAnimationProvider.getLayer(target, MODE_OPENING));
+ params[i] = builder.build();
}
surfaceApplier.scheduleApply(params);
}
});
- return appAnimator;
+
+ // When launching an app from overview that doesn't map to a task, we still want to just
+ // blur the wallpaper instead of the launcher surface as well
+ boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW;
+ BackgroundBlurController blurController = mLauncher.getBackgroundBlurController();
+ ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR,
+ BACKGROUND_APP.getBackgroundBlurRadius(mLauncher))
+ .setDuration(APP_LAUNCH_DURATION);
+ if (allowBlurringLauncher) {
+ blurController.setSurfaceToApp(RemoteAnimationProvider.findLowestOpaqueLayerTarget(
+ appTargets, MODE_OPENING));
+ backgroundRadiusAnim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ blurController.setSurfaceToLauncher(mLauncher.getDragLayer());
+ }
+ });
+ }
+
+ animatorSet.playTogether(appAnimator, backgroundRadiusAnim);
+ return animatorSet;
}
/**
@@ -639,9 +660,12 @@
SurfaceParams[] params = new SurfaceParams[appTargets.length];
for (int i = appTargets.length - 1; i >= 0; i--) {
RemoteAnimationTargetCompat target = appTargets[i];
- params[i] = new SurfaceParams(target.leash, 1f, null,
- target.sourceContainerBounds,
- RemoteAnimationProvider.getLayer(target, MODE_OPENING), cornerRadius);
+ params[i] = new SurfaceParams.Builder(target.leash)
+ .withAlpha(1f)
+ .withWindowCrop(target.sourceContainerBounds)
+ .withLayer(RemoteAnimationProvider.getLayer(target, MODE_OPENING))
+ .withCornerRadius(cornerRadius)
+ .build();
}
surfaceApplier.scheduleApply(params);
}
@@ -672,25 +696,25 @@
SurfaceParams[] params = new SurfaceParams[appTargets.length];
for (int i = appTargets.length - 1; i >= 0; i--) {
RemoteAnimationTargetCompat target = appTargets[i];
- final float alpha;
- final float cornerRadius;
+ SurfaceParams.Builder builder = new SurfaceParams.Builder(target.leash);
if (target.mode == MODE_CLOSING) {
matrix.setScale(mScale.value, mScale.value,
target.sourceContainerBounds.centerX(),
target.sourceContainerBounds.centerY());
matrix.postTranslate(0, mDy.value);
matrix.postTranslate(target.position.x, target.position.y);
- alpha = mAlpha.value;
- cornerRadius = windowCornerRadius;
+ builder.withMatrix(matrix)
+ .withAlpha(mAlpha.value)
+ .withCornerRadius(windowCornerRadius);
} else {
matrix.setTranslate(target.position.x, target.position.y);
- alpha = 1f;
- cornerRadius = 0f;
+ builder.withMatrix(matrix)
+ .withAlpha(1f);
}
- params[i] = new SurfaceParams(target.leash, alpha, matrix,
- target.sourceContainerBounds,
- RemoteAnimationProvider.getLayer(target, MODE_CLOSING),
- cornerRadius);
+ params[i] = builder
+ .withWindowCrop(target.sourceContainerBounds)
+ .withLayer(RemoteAnimationProvider.getLayer(target, MODE_CLOSING))
+ .build();
}
surfaceApplier.scheduleApply(params);
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/BackgroundBlurController.java b/quickstep/src/com/android/launcher3/uioverrides/BackgroundBlurController.java
new file mode 100644
index 0000000..9e4ada7
--- /dev/null
+++ b/quickstep/src/com/android/launcher3/uioverrides/BackgroundBlurController.java
@@ -0,0 +1,160 @@
+/*
+ * 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.
+ * 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.launcher3.uioverrides;
+
+import static com.android.launcher3.anim.Interpolators.LINEAR;
+
+import android.util.IntProperty;
+import android.view.View;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.LauncherStateManager;
+import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
+import com.android.launcher3.anim.AnimatorSetBuilder;
+import com.android.launcher3.anim.PropertySetter;
+import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+import com.android.systemui.shared.system.SurfaceControlCompat;
+import com.android.systemui.shared.system.TransactionCompat;
+
+/**
+ * Controls the blur, for the Launcher surface only.
+ */
+public class BackgroundBlurController implements LauncherStateManager.StateHandler {
+
+ public static final IntProperty<BackgroundBlurController> BACKGROUND_BLUR =
+ new IntProperty<BackgroundBlurController>("backgroundBlur") {
+ @Override
+ public void setValue(BackgroundBlurController blurController, int blurRadius) {
+ blurController.setBackgroundBlurRadius(blurRadius);
+ }
+
+ @Override
+ public Integer get(BackgroundBlurController blurController) {
+ return blurController.mBackgroundBlurRadius;
+ }
+ };
+
+ /**
+ * A property that updates the background blur within a given range of values (ie. even if the
+ * animator goes beyond 0..1, the interpolated value will still be bounded).
+ */
+ public static class ClampedBlurProperty extends IntProperty<BackgroundBlurController> {
+ private final int mMinValue;
+ private final int mMaxValue;
+
+ public ClampedBlurProperty(int minValue, int maxValue) {
+ super(("backgroundBlurClamped"));
+ mMinValue = minValue;
+ mMaxValue = maxValue;
+ }
+
+ @Override
+ public void setValue(BackgroundBlurController blurController, int blurRadius) {
+ blurController.setBackgroundBlurRadius(Utilities.boundToRange(blurRadius,
+ mMinValue, mMaxValue));
+ }
+
+ @Override
+ public Integer get(BackgroundBlurController blurController) {
+ return blurController.mBackgroundBlurRadius;
+ }
+ }
+
+ private final Launcher mLauncher;
+ private SurfaceControlCompat mSurface;
+ private int mBackgroundBlurRadius;
+
+ public BackgroundBlurController(Launcher l) {
+ mLauncher = l;
+ }
+
+ /**
+ * @return the background blur adjustment for folders
+ */
+ public int getFolderBackgroundBlurAdjustment() {
+ return mLauncher.getResources().getInteger(
+ R.integer.folder_background_blur_radius_adjustment);
+ }
+
+ /**
+ * Sets the specified app target surface to apply the blur to.
+ */
+ public void setSurfaceToApp(RemoteAnimationTargetCompat target) {
+ if (target != null) {
+ setSurface(target.leash);
+ }
+ }
+
+ /**
+ * Sets the surface to apply the blur to as the launcher surface.
+ */
+ public void setSurfaceToLauncher(View v) {
+ setSurface(v != null ? new SurfaceControlCompat(v) : null);
+ }
+
+ private void setSurface(SurfaceControlCompat surface) {
+ if (mSurface != surface) {
+ mSurface = surface;
+ if (surface != null) {
+ setBackgroundBlurRadius(mBackgroundBlurRadius);
+ } else {
+ // If there is no surface, then reset the blur radius
+ setBackgroundBlurRadius(0);
+ }
+ }
+ }
+
+ @Override
+ public void setState(LauncherState toState) {
+ if (mSurface == null) {
+ return;
+ }
+
+ int toBackgroundBlurRadius = toState.getBackgroundBlurRadius(mLauncher);
+ if (mBackgroundBlurRadius != toBackgroundBlurRadius) {
+ setBackgroundBlurRadius(toBackgroundBlurRadius);
+ }
+ }
+
+ @Override
+ public void setStateWithAnimation(LauncherState toState, AnimatorSetBuilder builder,
+ LauncherStateManager.AnimationConfig config) {
+ if (mSurface == null || !config.playNonAtomicComponent()) {
+ return;
+ }
+
+ int toBackgroundBlurRadius = toState.getBackgroundBlurRadius(mLauncher);
+ if (mBackgroundBlurRadius != toBackgroundBlurRadius) {
+ PropertySetter propertySetter = config.getPropertySetter(builder);
+ propertySetter.setInt(this, BACKGROUND_BLUR, toBackgroundBlurRadius, LINEAR);
+ }
+ }
+
+ private void setBackgroundBlurRadius(int blurRadius) {
+ // TODO: Do nothing if the shadows are not enabled
+ // Always update the background blur as it will be reapplied when a surface is next
+ // available
+ mBackgroundBlurRadius = blurRadius;
+ if (mSurface == null || !mSurface.isValid()) {
+ return;
+ }
+ new TransactionCompat()
+ .setBackgroundBlurRadius(mSurface, blurRadius)
+ .apply();
+ }
+}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
index b5e05ee..971d917 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
@@ -17,9 +17,12 @@
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
+import android.content.Context;
+
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.R;
import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.quickstep.SysUINavigationMode;
@@ -85,6 +88,11 @@
}
@Override
+ public int getBackgroundBlurRadius(Context context) {
+ return context.getResources().getInteger(R.integer.allapps_background_blur_radius);
+ }
+
+ @Override
public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) {
return PAGE_ALPHA_PROVIDER;
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
index fe830d2..95e38e3 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
@@ -87,8 +87,7 @@
protected boolean canInterceptTouch(MotionEvent ev) {
if (mCurrentAnimation != null) {
if (mFinishFastOnSecondTouch) {
- // TODO: Animate to finish instead.
- mCurrentAnimation.skipToEnd();
+ mCurrentAnimation.getAnimationPlayer().end();
}
AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
@@ -233,8 +232,8 @@
cancelPendingAnim();
clearState();
};
- mCurrentAnimation = AnimatorPlaybackController.wrap(
- mPendingAnimation.anim, maxAccuracy, onCancelRunnable);
+ mCurrentAnimation = AnimatorPlaybackController.wrap(mPendingAnimation, maxAccuracy)
+ .setOnCancelRunnable(onCancelRunnable);
mLauncher.getStateManager().setCurrentUserControlledAnimation(mCurrentAnimation);
totalShift = LayoutUtils.getShelfTrackingDistance(mLauncher,
mLauncher.getDeviceProfile());
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 1d71fe2..be0bdd8 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -33,6 +33,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.touch.PagedOrientationHandler;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.ShelfPeekAnim;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -80,6 +81,10 @@
@Nullable
T getCreatedActivity();
+ default @Nullable BackgroundBlurController getBackgroundBlurController() {
+ return null;
+ }
+
default boolean isResumed() {
BaseDraggingActivity activity = getCreatedActivity();
return activity != null && activity.hasBeenResumed();
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
index d845650..85464aa 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
@@ -518,6 +518,7 @@
+ QuickStepContract.isAssistantGestureDisabled(mSystemUiStateFlags));
pw.println(" currentActiveRotation=" + getCurrentActiveRotation());
pw.println(" displayRotation=" + getDisplayRotation());
+ pw.println(" isUserUnlocked=" + mIsUserUnlocked);
mOrientationTouchTransformer.dump(pw);
}
}
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index 53859ad..22fe2e1 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -24,6 +24,8 @@
import static android.stats.launcher.nano.Launcher.LAUNCH_TASK;
import static android.stats.launcher.nano.Launcher.OVERVIEW;
+import static com.android.launcher3.logging.UserEventDispatcher.makeTargetsList;
+
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
@@ -47,6 +49,8 @@
import com.google.protobuf.nano.MessageNano;
+import java.util.ArrayList;
+
/**
* This method calls the StatsLog hidden method until they are made available public.
*
@@ -61,7 +65,8 @@
private static final String TAG = "StatsLogCompatManager";
private static final boolean DEBUG = false;
- public StatsLogCompatManager(Context context) { }
+ public StatsLogCompatManager(Context context) {
+ }
@Override
public void logAppLaunch(View v, Intent intent, @Nullable UserHandle userHandle) {
@@ -120,14 +125,17 @@
return false;
}
- ItemInfo itemInfo = (ItemInfo) v.getTag();
Target child = new Target();
- Target parent = new Target();
- provider.fillInLogContainerData(v, itemInfo, child, parent);
- extension.srcTarget[0] = new LauncherTarget();
- extension.srcTarget[1] = new LauncherTarget();
- copy(child, extension.srcTarget[0]);
- copy(parent, extension.srcTarget[1]);
+ ArrayList<Target> targets = makeTargetsList(child);
+ targets.add(child);
+ provider.fillInLogContainerData((ItemInfo) v.getTag(), child, targets);
+
+ int maxDepth = Math.min(SUPPORTED_TARGET_DEPTH, targets.size());
+ extension.srcTarget = new LauncherTarget[maxDepth];
+ for (int i = 0; i < maxDepth; i++) {
+ extension.srcTarget[i] = new LauncherTarget();
+ copy(targets.get(i), extension.srcTarget[i]);
+ }
return true;
}
@@ -238,10 +246,10 @@
@Override
public void verify() {
- if(!(StatsLogUtils.LAUNCHER_STATE_ALLAPPS == ALLAPPS &&
- StatsLogUtils.LAUNCHER_STATE_BACKGROUND == BACKGROUND &&
- StatsLogUtils.LAUNCHER_STATE_OVERVIEW == OVERVIEW &&
- StatsLogUtils.LAUNCHER_STATE_HOME == HOME)) {
+ if (!(StatsLogUtils.LAUNCHER_STATE_ALLAPPS == ALLAPPS
+ && StatsLogUtils.LAUNCHER_STATE_BACKGROUND == BACKGROUND
+ && StatsLogUtils.LAUNCHER_STATE_OVERVIEW == OVERVIEW
+ && StatsLogUtils.LAUNCHER_STATE_HOME == HOME)) {
throw new IllegalStateException(
"StatsLogUtil constants doesn't match enums in launcher.proto");
}
diff --git a/quickstep/src/com/android/quickstep/util/RemoteAnimationProvider.java b/quickstep/src/com/android/quickstep/util/RemoteAnimationProvider.java
index 6210fc2..6520c4f 100644
--- a/quickstep/src/com/android/quickstep/util/RemoteAnimationProvider.java
+++ b/quickstep/src/com/android/quickstep/util/RemoteAnimationProvider.java
@@ -68,4 +68,26 @@
? Z_BOOST_BASE + target.prefixOrderIndex
: target.prefixOrderIndex;
}
+
+ /**
+ * @return the target with the lowest opaque layer for a certain app animation, or null.
+ */
+ static RemoteAnimationTargetCompat findLowestOpaqueLayerTarget(
+ RemoteAnimationTargetCompat[] appTargets, int mode) {
+ int lowestLayer = Integer.MAX_VALUE;
+ int lowestLayerIndex = -1;
+ for (int i = appTargets.length - 1; i >= 0; i--) {
+ RemoteAnimationTargetCompat target = appTargets[i];
+ if (target.mode == mode && !target.isTranslucent) {
+ int layer = getLayer(target, mode);
+ if (layer < lowestLayer) {
+ lowestLayer = layer;
+ lowestLayerIndex = i;
+ }
+ }
+ }
+ return lowestLayerIndex != -1
+ ? appTargets[lowestLayerIndex]
+ : null;
+ }
}
diff --git a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java
index 1ce3549..14c458e 100644
--- a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java
+++ b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java
@@ -238,6 +238,13 @@
}
@Override
+ protected boolean shouldDragHandleBeVisible() {
+ boolean twoZoneSwipeModel = FeatureFlags.ENABLE_OVERVIEW_ACTIONS.get()
+ && SysUINavigationMode.removeShelfFromOverview(mLauncher);
+ return twoZoneSwipeModel || super.shouldDragHandleBeVisible();
+ }
+
+ @Override
protected void onDraw(Canvas canvas) {
drawBackground(canvas);
drawDragHandle(canvas);
diff --git a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
index cd94704..4ac815e 100644
--- a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
+++ b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
@@ -49,7 +49,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
/**
* Test rule that allows executing a test with Quickstep on and then Quickstep off.
@@ -186,11 +185,18 @@
};
targetContext.getMainExecutor().execute(() ->
SYS_UI_NAVIGATION_MODE.addModeChangeListener(listener));
- latch.await(60, TimeUnit.SECONDS);
+ // b/139137636
+// latch.await(60, TimeUnit.SECONDS);
targetContext.getMainExecutor().execute(() ->
SYS_UI_NAVIGATION_MODE.removeModeChangeListener(listener));
- assertTrue(launcher, "Navigation mode didn't change to " + expectedMode,
- currentSysUiNavigationMode() == expectedMode, description);
+
+ Wait.atMost(() -> "Navigation mode didn't change to " + expectedMode,
+ () -> currentSysUiNavigationMode() == expectedMode, 60000 /* b/148422894 */,
+ launcher);
+ // b/139137636
+// assertTrue(launcher, "Navigation mode didn't change to " + expectedMode,
+// currentSysUiNavigationMode() == expectedMode, description);
+
}
Wait.atMost("Couldn't switch to " + overlayPackage,
diff --git a/res/layout/launcher.xml b/res/layout/launcher.xml
index 196eb0f..ab6c960 100644
--- a/res/layout/launcher.xml
+++ b/res/layout/launcher.xml
@@ -50,7 +50,7 @@
<include
android:id="@+id/overview_actions_view"
- layout="@layout/overview_actions_holder" />
+ layout="@layout/overview_actions_container" />
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
diff --git a/res/layout/overview_actions_holder.xml b/res/layout/overview_actions_container.xml
similarity index 100%
rename from res/layout/overview_actions_holder.xml
rename to res/layout/overview_actions_container.xml
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index 217a41c..814b728 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -40,7 +40,6 @@
import com.android.launcher3.logging.StatsLogUtils;
import com.android.launcher3.logging.StatsLogUtils.LogStateProvider;
import com.android.launcher3.logging.UserEventDispatcher;
-import com.android.launcher3.logging.UserEventDispatcher.UserEventDelegate;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.userevent.nano.LauncherLogProto;
@@ -52,8 +51,10 @@
import java.lang.annotation.Retention;
import java.util.ArrayList;
-public abstract class BaseActivity extends Activity
- implements UserEventDelegate, LogStateProvider, ActivityContext {
+/**
+ * Launcher BaseActivity
+ */
+public abstract class BaseActivity extends Activity implements LogStateProvider, ActivityContext {
private static final String TAG = "BaseActivity";
@@ -155,7 +156,7 @@
public final UserEventDispatcher getUserEventDispatcher() {
if (mUserEventDispatcher == null) {
- mUserEventDispatcher = UserEventDispatcher.newInstance(this, this);
+ mUserEventDispatcher = UserEventDispatcher.newInstance(this);
}
return mUserEventDispatcher;
}
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index b89e727..76cfe1c 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -16,12 +16,13 @@
package com.android.launcher3;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
+
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.MotionEvent;
-import android.view.View;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.widget.FrameLayout;
@@ -32,6 +33,8 @@
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.views.Transposable;
+import java.util.ArrayList;
+
public class Hotseat extends CellLayout implements LogContainerProvider, Insettable, Transposable {
@ViewDebug.ExportedProperty(category = "launcher")
@@ -75,10 +78,12 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- target.gridX = info.cellX;
- target.gridY = info.cellY;
- targetParent.containerType = LauncherLogProto.ContainerType.HOTSEAT;
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ child.rank = childInfo.rank;
+ child.gridX = childInfo.cellX;
+ child.gridY = childInfo.cellY;
+ parents.add(newContainerTarget(LauncherLogProto.ContainerType.HOTSEAT));
}
@Override
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 20ebc7a..bc0e75f 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -30,7 +30,6 @@
import static com.android.launcher3.Utilities.postAsyncCallback;
import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_LAUNCHER_LOAD;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
-import static com.android.launcher3.logging.LoggerUtils.newTarget;
import static com.android.launcher3.popup.SystemShortcut.APP_INFO;
import static com.android.launcher3.popup.SystemShortcut.INSTALL;
import static com.android.launcher3.popup.SystemShortcut.WIDGETS;
@@ -78,6 +77,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.OvershootInterpolator;
import android.widget.Toast;
@@ -110,7 +110,6 @@
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.logging.StatsLogUtils;
import com.android.launcher3.logging.UserEventDispatcher;
-import com.android.launcher3.logging.UserEventDispatcher.UserEventDelegate;
import com.android.launcher3.model.AppLaunchTracker;
import com.android.launcher3.model.BgDataModel.Callbacks;
import com.android.launcher3.model.ModelWriter;
@@ -125,8 +124,8 @@
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.AllAppsSwipeController;
import com.android.launcher3.touch.ItemClickHandler;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
-import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
@@ -183,8 +182,7 @@
* Default launcher application.
*/
public class Launcher extends BaseDraggingActivity implements LauncherExterns,
- Callbacks, UserEventDelegate,
- InvariantDeviceProfile.OnIDPChangeListener, PluginListener<OverlayPlugin> {
+ Callbacks, InvariantDeviceProfile.OnIDPChangeListener, PluginListener<OverlayPlugin> {
public static final String TAG = "Launcher";
public static final ActivityTracker<Launcher> ACTIVITY_TRACKER = new ActivityTracker<>();
@@ -328,6 +326,9 @@
private boolean mDeferOverlayCallbacks;
private final Runnable mDeferredOverlayCallbacks = this::checkIfOverlayStillDeferred;
+ private BackgroundBlurController mBackgroundBlurController =
+ new BackgroundBlurController(this);
+
@Override
protected void onCreate(Bundle savedInstanceState) {
Object traceToken = TraceHelper.INSTANCE.beginSection(ON_CREATE_EVT,
@@ -941,6 +942,7 @@
NotificationListener.removeNotificationsChangedListener();
getStateManager().moveToRestState();
+ getBackgroundBlurController().setSurfaceToLauncher(null);
// Workaround for b/78520668, explicitly trim memory once UI is hidden
onTrimMemory(TRIM_MEMORY_UI_HIDDEN);
@@ -968,6 +970,13 @@
if (!mDeferOverlayCallbacks) {
mOverlayManager.onActivityStarted(this);
}
+ mDragLayer.getViewTreeObserver().addOnDrawListener(new ViewTreeObserver.OnDrawListener() {
+ @Override
+ public void onDraw() {
+ getBackgroundBlurController().setSurfaceToLauncher(mDragLayer);
+ mDragLayer.post(() -> mDragLayer.getViewTreeObserver().removeOnDrawListener(this));
+ }
+ });
mAppWidgetHost.setListenIfResumed(true);
TraceHelper.INSTANCE.endSection(traceToken);
@@ -1466,7 +1475,7 @@
if (isActionMain) {
if (!internalStateHandled) {
// In all these cases, only animate if we're already on home
- AbstractFloatingView.closeAllOpenViews(this, isStarted());
+ closeOpenViews(isStarted());
if (!isInState(NORMAL)) {
// Only change state, if not already the same. This prevents cancelling any
@@ -1890,24 +1899,6 @@
}
@Override
- public void modifyUserEvent(LauncherLogProto.LauncherEvent event) {
- if (event.srcTarget != null && event.srcTarget.length > 0 &&
- event.srcTarget[1].containerType == ContainerType.PREDICTION) {
- Target[] targets = new Target[3];
- targets[0] = event.srcTarget[0];
- targets[1] = event.srcTarget[1];
- targets[2] = newTarget(Target.Type.CONTAINER);
- event.srcTarget = targets;
- LauncherState state = mStateManager.getState();
- if (state == LauncherState.ALL_APPS) {
- event.srcTarget[2].containerType = ContainerType.ALLAPPS;
- } else if (state == OVERVIEW) {
- event.srcTarget[2].containerType = ContainerType.TASKSWITCHER;
- }
- }
- }
-
- @Override
public boolean startActivitySafely(View v, Intent intent, ItemInfo item,
@Nullable String sourceContainer) {
if (!hasBeenResumed()) {
@@ -2207,7 +2198,7 @@
mWorkspace.postDelayed(new Runnable() {
public void run() {
if (mWorkspace != null) {
- AbstractFloatingView.closeAllOpenViews(Launcher.this, false);
+ closeOpenViews(false);
mWorkspace.snapToPage(newScreenIndex);
mWorkspace.postDelayed(startBounceAnimRunnable,
@@ -2695,7 +2686,7 @@
if (!mDragController.isDragging() && !mWorkspace.isSwitchingState() &&
isInState(NORMAL)) {
// Close any open floating views.
- AbstractFloatingView.closeAllOpenViews(this);
+ closeOpenViews();
// Setting the touch point to (-1, -1) will show the options popup in the center of
// the screen.
@@ -2710,7 +2701,8 @@
}
protected StateHandler[] createStateHandlers() {
- return new StateHandler[] { getAllAppsController(), getWorkspace() };
+ return new StateHandler[] { getAllAppsController(), getWorkspace(),
+ getBackgroundBlurController() };
}
public TouchController[] createTouchControllers() {
@@ -2735,12 +2727,24 @@
getStateManager().goToState(LauncherState.NORMAL);
}
+ private void closeOpenViews() {
+ closeOpenViews(true);
+ }
+
+ protected void closeOpenViews(boolean animate) {
+ AbstractFloatingView.closeAllOpenViews(this, animate);
+ }
+
public Stream<SystemShortcut.Factory> getSupportedShortcuts() {
return Stream.of(APP_INFO, WIDGETS, INSTALL);
}
+ public BackgroundBlurController getBackgroundBlurController() {
+ return mBackgroundBlurController;
+ }
+
public static Launcher getLauncher(Context context) {
- return (Launcher) fromContext(context);
+ return fromContext(context);
}
/**
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 36440c9..62b8927 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -41,6 +41,7 @@
import static com.android.launcher3.testing.TestProtocol.QUICK_SWITCH_STATE_ORDINAL;
import static com.android.launcher3.testing.TestProtocol.SPRING_LOADED_STATE_ORDINAL;
+import android.content.Context;
import android.view.View;
import android.view.animation.Interpolator;
@@ -269,6 +270,14 @@
return 0;
}
+ /**
+ * The amount of blur to apply to the background of either the app or Launcher surface in this
+ * state.
+ */
+ public int getBackgroundBlurRadius(Context context) {
+ return 0;
+ }
+
public String getDescription(Launcher launcher) {
return launcher.getWorkspace().getCurrentPageDescription();
}
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java
index 04c5ccb..4267f2b 100644
--- a/src/com/android/launcher3/LauncherStateManager.java
+++ b/src/com/android/launcher3/LauncherStateManager.java
@@ -372,8 +372,8 @@
mConfig.animComponents = animComponents;
mConfig.duration = duration;
mConfig.playbackController = AnimatorPlaybackController.wrap(
- createAnimationToNewWorkspaceInternal(state, builder, null), duration,
- onCancelRunnable);
+ createAnimationToNewWorkspaceInternal(state, builder, null), duration)
+ .setOnCancelRunnable(onCancelRunnable);
return mConfig.playbackController;
}
diff --git a/src/com/android/launcher3/SecondaryDropTarget.java b/src/com/android/launcher3/SecondaryDropTarget.java
index 1841134..2430d5e 100644
--- a/src/com/android/launcher3/SecondaryDropTarget.java
+++ b/src/com/android/launcher3/SecondaryDropTarget.java
@@ -41,6 +41,7 @@
import com.android.launcher3.util.Themes;
import java.net.URISyntaxException;
+import java.util.ArrayList;
/**
* Drop target which provides a secondary option for an item.
@@ -322,9 +323,9 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target,
- Target targetParent) {
- mOriginal.fillInLogContainerData(v, info, target, targetParent);
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ mOriginal.fillInLogContainerData(childInfo, child, parents);
}
@Override
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 590c620..fc1a074 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -24,6 +24,7 @@
import static com.android.launcher3.LauncherState.SPRING_LOADED;
import static com.android.launcher3.config.FeatureFlags.ADAPTIVE_ICON_WINDOW_ANIM;
import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_OVERLAY;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -3309,17 +3310,21 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- target.gridX = info.cellX;
- target.gridY = info.cellY;
- target.pageIndex = getCurrentPage();
- targetParent.containerType = ContainerType.WORKSPACE;
- if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
- target.rank = info.rank;
- targetParent.containerType = ContainerType.HOTSEAT;
- } else if (info.container >= 0) {
- targetParent.containerType = ContainerType.FOLDER;
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ if (childInfo.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT
+ || childInfo.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION) {
+ getHotseat().fillInLogContainerData(childInfo, child, parents);
+ return;
+ } else if (childInfo.container >= 0) {
+ FolderIcon icon = (FolderIcon) getHomescreenIconByItemId(childInfo.container);
+ icon.getFolder().fillInLogContainerData(childInfo, child, parents);
+ return;
}
+ child.gridX = childInfo.cellX;
+ child.gridY = childInfo.cellY;
+ child.pageIndex = getCurrentPage();
+ parents.add(newContainerTarget(ContainerType.WORKSPACE));
}
/**
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index afb7217..a2957bc 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -18,6 +18,8 @@
import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.makeMeasureSpec;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
+
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Canvas;
@@ -65,6 +67,8 @@
import com.android.launcher3.views.SpringRelativeLayout;
import com.android.launcher3.views.WorkFooterContainer;
+import java.util.ArrayList;
+
/**
* The all apps view container.
*/
@@ -327,12 +331,10 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- if (getApps().hasFilter()) {
- targetParent.containerType = ContainerType.SEARCHRESULT;
- } else {
- targetParent.containerType = ContainerType.ALLAPPS;
- }
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ parents.add(newContainerTarget(
+ getApps().hasFilter() ? ContainerType.SEARCHRESULT : ContainerType.ALLAPPS));
}
@Override
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index b6744cf..c228ddf 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -17,6 +17,8 @@
import static android.view.View.MeasureSpec.UNSPECIFIED;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
+
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
@@ -40,6 +42,7 @@
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.views.RecyclerViewFastScroller;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -145,12 +148,10 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- if (mApps.hasFilter()) {
- targetParent.containerType = ContainerType.SEARCHRESULT;
- } else {
- targetParent.containerType = ContainerType.ALLAPPS;
- }
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ parents.add(newContainerTarget(
+ getApps().hasFilter() ? ContainerType.SEARCHRESULT : ContainerType.ALLAPPS));
}
public void onSearchResultsChanged() {
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index b87c5b1..0e60f5b 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -12,7 +12,6 @@
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
-import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
import static com.android.launcher3.util.SystemUiController.UI_STATE_ALL_APPS;
import android.animation.Animator;
@@ -31,11 +30,8 @@
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.anim.PropertySetter;
-import com.android.launcher3.anim.SpringObjectAnimator;
-import com.android.launcher3.util.DynamicResource;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ScrimView;
-import com.android.systemui.plugins.ResourceProvider;
/**
* Handles AllApps view transition.
@@ -185,14 +181,6 @@
}
public Animator createSpringAnimation(float... progressValues) {
- if (UNSTABLE_SPRINGS.get()) {
- ResourceProvider rp = DynamicResource.provider(mLauncher);
- float damping = rp.getFloat(R.dimen.all_apps_spring_damping_ratio);
- float stiffness = rp.getFloat(R.dimen.all_apps_spring_stiffness);
-
- return new SpringObjectAnimator<>(this, ALL_APPS_PROGRESS, 1f / mShiftRange,
- damping, stiffness, progressValues);
- }
return ObjectAnimator.ofFloat(this, ALL_APPS_PROGRESS, progressValues);
}
diff --git a/src/com/android/launcher3/anim/AnimatorPlaybackController.java b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
index 1c277ab..1fc21fd 100644
--- a/src/com/android/launcher3/anim/AnimatorPlaybackController.java
+++ b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
@@ -16,7 +16,9 @@
package com.android.launcher3.anim;
import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
+import static com.android.launcher3.anim.Interpolators.clampToProgress;
+import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity;
+import static com.android.launcher3.util.DefaultDisplay.getSingleFrameMs;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
@@ -24,17 +26,18 @@
import android.animation.AnimatorSet;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
-import android.util.Log;
+import android.content.Context;
+import android.util.FloatProperty;
import androidx.annotation.Nullable;
-import androidx.dynamicanimation.animation.DynamicAnimation;
-import androidx.dynamicanimation.animation.SpringAnimation;
+
+import com.android.launcher3.Utilities;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
/**
* Helper class to control the playback of an {@link AnimatorSet}, with custom interpolators
@@ -43,14 +46,7 @@
* Note: The implementation does not support start delays on child animations or
* sequential playbacks.
*/
-public abstract class AnimatorPlaybackController implements ValueAnimator.AnimatorUpdateListener {
-
- private static final String TAG = "AnimatorPlaybackCtrler";
- private static boolean DEBUG = false;
-
- public static AnimatorPlaybackController wrap(AnimatorSet anim, long duration) {
- return wrap(anim, duration, null);
- }
+public class AnimatorPlaybackController implements ValueAnimator.AnimatorUpdateListener {
/**
* Creates an animation controller for the provided animation.
@@ -58,20 +54,41 @@
* needs to be larger than the total number of pixels so that we don't have jittering due
* to float (animation-fraction * total duration) to int conversion.
*/
- public static AnimatorPlaybackController wrap(AnimatorSet anim, long duration,
- Runnable onCancelRunnable) {
-
+ public static AnimatorPlaybackController wrap(AnimatorSet anim, long duration) {
/**
* TODO: use {@link AnimatorSet#setCurrentPlayTime(long)} once b/68382377 is fixed.
*/
- return new AnimatorPlaybackControllerVL(anim, duration, onCancelRunnable);
+ ArrayList<Holder> childAnims = new ArrayList<>();
+ addAnimationHoldersRecur(anim, SpringProperty.DEFAULT, childAnims);
+
+ return new AnimatorPlaybackController(anim, duration, childAnims);
}
+ public static AnimatorPlaybackController wrap(PendingAnimation anim, long duration) {
+ /**
+ * TODO: use {@link AnimatorSet#setCurrentPlayTime(long)} once b/68382377 is fixed.
+ */
+ return new AnimatorPlaybackController(anim.anim, duration, anim.animHolders);
+ }
+
+ private static final FloatProperty<ValueAnimator> CURRENT_PLAY_TIME =
+ new FloatProperty<ValueAnimator>("current-play-time") {
+ @Override
+ public void setValue(ValueAnimator animator, float v) {
+ animator.setCurrentPlayTime((long) v);
+ }
+
+ @Override
+ public Float get(ValueAnimator animator) {
+ return (float) animator.getCurrentPlayTime();
+ }
+ };
+
private final ValueAnimator mAnimationPlayer;
private final long mDuration;
- protected final AnimatorSet mAnim;
- private Set<SpringAnimation> mSprings;
+ private final AnimatorSet mAnim;
+ private final Holder[] mChildAnimations;
protected float mCurrentFraction;
private Runnable mEndAction;
@@ -79,22 +96,14 @@
protected boolean mTargetCancelled = false;
protected Runnable mOnCancelRunnable;
- private OnAnimationEndDispatcher mEndListener;
- private DynamicAnimation.OnAnimationEndListener mSpringEndListener;
- // We need this variable to ensure the end listener is called immediately, otherwise we run into
- // issues where the callback interferes with the states of the swipe detector.
- private boolean mSkipToEnd = false;
-
- protected AnimatorPlaybackController(AnimatorSet anim, long duration,
- Runnable onCancelRunnable) {
+ private AnimatorPlaybackController(
+ AnimatorSet anim, long duration, ArrayList<Holder> childAnims) {
mAnim = anim;
mDuration = duration;
- mOnCancelRunnable = onCancelRunnable;
mAnimationPlayer = ValueAnimator.ofFloat(0, 1);
mAnimationPlayer.setInterpolator(LINEAR);
- mEndListener = new OnAnimationEndDispatcher();
- mAnimationPlayer.addListener(mEndListener);
+ mAnimationPlayer.addListener(new OnAnimationEndDispatcher());
mAnimationPlayer.addUpdateListener(this);
mAnim.addListener(new AnimatorListenerAdapter() {
@@ -119,14 +128,7 @@
}
});
- mSprings = new HashSet<>();
- mSpringEndListener = (animation, canceled, value, velocity1) -> {
- if (canceled) {
- mEndListener.onAnimationCancel(mAnimationPlayer);
- } else {
- mEndListener.onAnimationEnd(mAnimationPlayer);
- }
- };
+ mChildAnimations = childAnims.toArray(new Holder[childAnims.size()]);
}
public AnimatorSet getTarget() {
@@ -160,9 +162,68 @@
}
/**
+ * Starts playing the animation with the provided velocity optionally playing any
+ * physics based animations
+ */
+ public void startWithVelocity(Context context, boolean goingToEnd,
+ float velocity, float scale, long animationDuration) {
+ float scaleInverse = 1 / Math.abs(scale);
+ float scaledVelocity = velocity * scaleInverse;
+
+ float nextFrameProgress = Utilities.boundToRange(getProgressFraction()
+ + scaledVelocity * getSingleFrameMs(context), 0f, 1f);
+
+ // Update setters for spring
+ int springFlag = goingToEnd
+ ? SpringProperty.FLAG_CAN_SPRING_ON_END
+ : SpringProperty.FLAG_CAN_SPRING_ON_START;
+
+ long springDuration = animationDuration;
+ for (Holder h : mChildAnimations) {
+ if ((h.springProperty.flags & springFlag) != 0) {
+ SpringAnimationBuilder s = new SpringAnimationBuilder(h.anim, CURRENT_PLAY_TIME)
+ .setStartValue(clampDuration(mCurrentFraction))
+ .setEndValue(goingToEnd ? h.anim.getDuration() : 0)
+ .setStartVelocity(scaledVelocity * h.anim.getDuration())
+ .setMinimumVisibleChange(scaleInverse)
+ .setDampingRatio(h.springProperty.mDampingRatio)
+ .setStiffness(h.springProperty.mStiffness);
+
+ long expectedDurationL = s.build(context).getDuration();
+ springDuration = Math.max(expectedDurationL, springDuration);
+
+ float expectedDuration = expectedDurationL;
+ h.setter = (a, l) ->
+ s.setValue(a, mAnimationPlayer.getCurrentPlayTime() / expectedDuration);
+ h.anim.setInterpolator(LINEAR);
+ }
+ }
+
+ mAnimationPlayer.setFloatValues(nextFrameProgress, goingToEnd ? 1f : 0f);
+
+ if (springDuration <= animationDuration) {
+ mAnimationPlayer.setDuration(animationDuration);
+ mAnimationPlayer.setInterpolator(scrollInterpolatorForVelocity(velocity));
+ } else {
+ // Since spring requires more time to run, we let the other animations play with
+ // current time and interpolation and by clamping the duration.
+ mAnimationPlayer.setDuration(springDuration);
+
+ float cutOff = animationDuration / (float) springDuration;
+ mAnimationPlayer.setInterpolator(
+ clampToProgress(scrollInterpolatorForVelocity(velocity), 0, cutOff));
+ }
+ mAnimationPlayer.start();
+ }
+
+ /**
* Pauses the currently playing animation.
*/
public void pause() {
+ // Reset property setters
+ for (Holder h : mChildAnimations) {
+ h.reset();
+ }
mAnimationPlayer.cancel();
}
@@ -176,7 +237,18 @@
/**
* Sets the current animation position and updates all the child animators accordingly.
*/
- public abstract void setPlayFraction(float fraction);
+ public void setPlayFraction(float fraction) {
+ mCurrentFraction = fraction;
+ // Let the animator report the progress but don't apply the progress to child
+ // animations if it has been cancelled.
+ if (mTargetCancelled) {
+ return;
+ }
+ long playPos = clampDuration(fraction);
+ for (Holder holder : mChildAnimations) {
+ holder.setter.set(holder.anim, playPos);
+ }
+ }
public float getProgressFraction() {
return mCurrentFraction;
@@ -208,49 +280,6 @@
}
}
- /**
- * Starts playback and sets the spring.
- */
- public void dispatchOnStartWithVelocity(float end, float velocity) {
- if (!QUICKSTEP_SPRINGS.get()) {
- dispatchOnStart();
- return;
- }
-
- if (DEBUG) Log.d(TAG, "dispatchOnStartWithVelocity#end=" + end + ", velocity=" + velocity);
-
- for (Animator a : mAnim.getChildAnimations()) {
- if (a instanceof SpringObjectAnimator) {
- if (DEBUG) Log.d(TAG, "Found springAnimator=" + a);
- SpringObjectAnimator springAnimator = (SpringObjectAnimator) a;
- mSprings.add(springAnimator.getSpring());
- springAnimator.startSpring(end, velocity, mSpringEndListener);
- }
- }
-
- dispatchOnStart();
- }
-
- public void dispatchOnStart() {
- dispatchOnStartRecursively(mAnim);
- }
-
- private void dispatchOnStartRecursively(Animator animator) {
- List<AnimatorListener> listeners = animator instanceof SpringObjectAnimator
- ? nonNullList(((SpringObjectAnimator) animator).getObjectAnimatorListeners())
- : nonNullList(animator.getListeners());
-
- for (AnimatorListener l : listeners) {
- l.onAnimationStart(animator);
- }
-
- if (animator instanceof AnimatorSet) {
- for (Animator anim : nonNullList(((AnimatorSet) animator).getChildAnimations())) {
- dispatchOnStartRecursively(anim);
- }
- }
- }
-
/** @see #dispatchOnCancelWithoutCancelRunnable(Runnable) */
public void dispatchOnCancelWithoutCancelRunnable() {
dispatchOnCancelWithoutCancelRunnable(null);
@@ -272,115 +301,47 @@
setOnCancelRunnable(onCancel);
}
- public void dispatchOnCancel() {
- dispatchOnCancelRecursively(mAnim);
+
+ public AnimatorPlaybackController setOnCancelRunnable(Runnable runnable) {
+ mOnCancelRunnable = runnable;
+ return this;
}
- private void dispatchOnCancelRecursively(Animator animator) {
- for (AnimatorListener l : nonNullList(animator.getListeners())) {
- l.onAnimationCancel(animator);
- }
+ public void dispatchOnStart() {
+ callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationStart);
+ }
- if (animator instanceof AnimatorSet) {
- for (Animator anim : nonNullList(((AnimatorSet) animator).getChildAnimations())) {
- dispatchOnCancelRecursively(anim);
- }
- }
+ public void dispatchOnCancel() {
+ callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationCancel);
}
public void dispatchSetInterpolator(TimeInterpolator interpolator) {
- dispatchSetInterpolatorRecursively(mAnim, interpolator);
+ callAnimatorCommandRecursively(mAnim, a -> a.setInterpolator(interpolator));
}
- private void dispatchSetInterpolatorRecursively(Animator anim, TimeInterpolator interpolator) {
- anim.setInterpolator(interpolator);
+ private static void callListenerCommandRecursively(
+ Animator anim, BiConsumer<AnimatorListener, Animator> command) {
+ callAnimatorCommandRecursively(anim, a-> {
+ for (AnimatorListener l : nonNullList(a.getListeners())) {
+ command.accept(l, a);
+ }
+ });
+ }
+
+ private static void callAnimatorCommandRecursively(Animator anim, Consumer<Animator> command) {
+ command.accept(anim);
if (anim instanceof AnimatorSet) {
for (Animator child : nonNullList(((AnimatorSet) anim).getChildAnimations())) {
- dispatchSetInterpolatorRecursively(child, interpolator);
+ callAnimatorCommandRecursively(child, command);
}
}
}
- public void setOnCancelRunnable(Runnable runnable) {
- mOnCancelRunnable = runnable;
- }
-
- public void skipToEnd() {
- mSkipToEnd = true;
- for (SpringAnimation spring : mSprings) {
- if (spring.canSkipToEnd()) {
- spring.skipToEnd();
- }
- }
- mAnimationPlayer.end();
- mSkipToEnd = false;
- }
-
- public static class AnimatorPlaybackControllerVL extends AnimatorPlaybackController {
-
- private final ValueAnimator[] mChildAnimations;
-
- private AnimatorPlaybackControllerVL(AnimatorSet anim, long duration,
- Runnable onCancelRunnable) {
- super(anim, duration, onCancelRunnable);
-
- // Build animation list
- ArrayList<ValueAnimator> childAnims = new ArrayList<>();
- getAnimationsRecur(mAnim, childAnims);
- mChildAnimations = childAnims.toArray(new ValueAnimator[childAnims.size()]);
- }
-
- private void getAnimationsRecur(AnimatorSet anim, ArrayList<ValueAnimator> out) {
- long forceDuration = anim.getDuration();
- TimeInterpolator forceInterpolator = anim.getInterpolator();
- for (Animator child : anim.getChildAnimations()) {
- if (forceDuration > 0) {
- child.setDuration(forceDuration);
- }
- if (forceInterpolator != null) {
- child.setInterpolator(forceInterpolator);
- }
- if (child instanceof ValueAnimator) {
- out.add((ValueAnimator) child);
- } else if (child instanceof AnimatorSet) {
- getAnimationsRecur((AnimatorSet) child, out);
- } else {
- throw new RuntimeException("Unknown animation type " + child);
- }
- }
- }
-
- @Override
- public void setPlayFraction(float fraction) {
- mCurrentFraction = fraction;
- // Let the animator report the progress but don't apply the progress to child
- // animations if it has been cancelled.
- if (mTargetCancelled) {
- return;
- }
- long playPos = clampDuration(fraction);
- for (ValueAnimator anim : mChildAnimations) {
- anim.setCurrentPlayTime(Math.min(playPos, anim.getDuration()));
- }
- }
- }
-
- private boolean isAnySpringRunning() {
- for (SpringAnimation spring : mSprings) {
- if (spring.isRunning()) {
- return true;
- }
- }
- return false;
- }
-
/**
* Only dispatches the on end actions once the animator and all springs have completed running.
*/
private class OnAnimationEndDispatcher extends AnimationSuccessListener {
- boolean mAnimatorDone = false;
- boolean mSpringsDone = false;
boolean mDispatched = false;
@Override
@@ -391,39 +352,76 @@
@Override
public void onAnimationSuccess(Animator animator) {
- if (mSprings.isEmpty()) {
- mSpringsDone = mAnimatorDone = true;
- }
- if (isAnySpringRunning()) {
- mAnimatorDone = true;
- } else {
- mSpringsDone = true;
- }
-
// We wait for the spring (if any) to finish running before completing the end callback.
- if (!mDispatched && (mSkipToEnd || (mAnimatorDone && mSpringsDone))) {
- dispatchOnEndRecursively(mAnim);
+ if (!mDispatched) {
+ callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationEnd);
if (mEndAction != null) {
mEndAction.run();
}
mDispatched = true;
}
}
-
- private void dispatchOnEndRecursively(Animator animator) {
- for (AnimatorListener l : nonNullList(animator.getListeners())) {
- l.onAnimationEnd(animator);
- }
-
- if (animator instanceof AnimatorSet) {
- for (Animator anim : nonNullList(((AnimatorSet) animator).getChildAnimations())) {
- dispatchOnEndRecursively(anim);
- }
- }
- }
}
private static <T> List<T> nonNullList(ArrayList<T> list) {
return list == null ? Collections.emptyList() : list;
}
+
+ /**
+ * Interface for setting position of value animator
+ */
+ private interface PositionSetter {
+
+ PositionSetter DEFAULT = (anim, playPos) ->
+ anim.setCurrentPlayTime(Math.min(playPos, anim.getDuration()));
+
+ void set(ValueAnimator anim, long position);
+ }
+
+ /**
+ * Holder class for various child animations
+ */
+ static class Holder {
+
+ public final ValueAnimator anim;
+
+ public final SpringProperty springProperty;
+
+ public final TimeInterpolator interpolator;
+
+ public PositionSetter setter;
+
+ Holder(Animator anim, SpringProperty springProperty) {
+ this.anim = (ValueAnimator) anim;
+ this.springProperty = springProperty;
+ this.interpolator = this.anim.getInterpolator();
+ this.setter = PositionSetter.DEFAULT;
+ }
+
+ public void reset() {
+ anim.setInterpolator(interpolator);
+ setter = PositionSetter.DEFAULT;
+ }
+ }
+
+ static void addAnimationHoldersRecur(
+ Animator anim, SpringProperty springProperty, ArrayList<Holder> out) {
+ long forceDuration = anim.getDuration();
+ TimeInterpolator forceInterpolator = anim.getInterpolator();
+ if (anim instanceof ValueAnimator) {
+ out.add(new Holder(anim, springProperty));
+ } else if (anim instanceof AnimatorSet) {
+ for (Animator child : ((AnimatorSet) anim).getChildAnimations()) {
+ if (forceDuration > 0) {
+ child.setDuration(forceDuration);
+ }
+ if (forceInterpolator != null) {
+ child.setInterpolator(forceInterpolator);
+ }
+ addAnimationHoldersRecur(child, springProperty, out);
+ }
+ } else {
+ throw new RuntimeException("Unknown animation type " + anim);
+ }
+ }
}
diff --git a/src/com/android/launcher3/anim/PendingAnimation.java b/src/com/android/launcher3/anim/PendingAnimation.java
new file mode 100644
index 0000000..562d160
--- /dev/null
+++ b/src/com/android/launcher3/anim/PendingAnimation.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2018 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.launcher3.anim;
+
+import static com.android.launcher3.anim.AnimatorPlaybackController.addAnimationHoldersRecur;
+
+import android.animation.Animator;
+import android.animation.AnimatorSet;
+import android.animation.TimeInterpolator;
+import android.annotation.TargetApi;
+import android.os.Build;
+
+import com.android.launcher3.anim.AnimatorPlaybackController.Holder;
+
+import java.util.ArrayList;
+import java.util.function.Consumer;
+
+/**
+ * Utility class to keep track of a running animation.
+ *
+ * This class allows attaching end callbacks to an animation is intended to be used with
+ * {@link com.android.launcher3.anim.AnimatorPlaybackController}, since in that case
+ * AnimationListeners are not properly dispatched.
+ *
+ * TODO: Find a better name
+ */
+@TargetApi(Build.VERSION_CODES.O)
+public class PendingAnimation {
+
+ private final ArrayList<Consumer<EndState>> mEndListeners = new ArrayList<>();
+
+ /** package private **/
+ final AnimatorSet anim = new AnimatorSet();
+ final ArrayList<Holder> animHolders = new ArrayList<>();
+
+ /**
+ * Utility method to sent an interpolator on an animation and add it to the list
+ */
+ public void add(Animator anim, TimeInterpolator interpolator) {
+ add(anim, interpolator, SpringProperty.DEFAULT);
+ }
+
+ public void add(Animator anim, TimeInterpolator interpolator, SpringProperty springProperty) {
+ anim.setInterpolator(interpolator);
+ add(anim, springProperty);
+ }
+
+ public void add(Animator anim) {
+ add(anim, SpringProperty.DEFAULT);
+ }
+
+ public void add(Animator a, SpringProperty springProperty) {
+ anim.play(a);
+ addAnimationHoldersRecur(a, springProperty, animHolders);
+ }
+
+ public void finish(boolean isSuccess, int logAction) {
+ for (Consumer<EndState> listeners : mEndListeners) {
+ listeners.accept(new EndState(isSuccess, logAction));
+ }
+ mEndListeners.clear();
+ }
+
+ public void addEndListener(Consumer<EndState> listener) {
+ mEndListeners.add(listener);
+ }
+
+ public static class EndState {
+ public boolean isSuccess;
+ public int logAction;
+
+ public EndState(boolean isSuccess, int logAction) {
+ this.isSuccess = isSuccess;
+ this.logAction = logAction;
+ }
+ }
+}
diff --git a/src/com/android/launcher3/anim/SpringObjectAnimator.java b/src/com/android/launcher3/anim/SpringObjectAnimator.java
deleted file mode 100644
index 27b9c18..0000000
--- a/src/com/android/launcher3/anim/SpringObjectAnimator.java
+++ /dev/null
@@ -1,308 +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.
- */
-package com.android.launcher3.anim;
-
-import static androidx.dynamicanimation.animation.FloatPropertyCompat.createFloatPropertyCompat;
-
-import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ObjectAnimator;
-import android.animation.TimeInterpolator;
-import android.animation.ValueAnimator;
-import android.os.Handler;
-import android.os.Looper;
-import android.util.FloatProperty;
-import android.util.Log;
-
-import androidx.dynamicanimation.animation.DynamicAnimation.OnAnimationEndListener;
-import androidx.dynamicanimation.animation.SpringAnimation;
-import androidx.dynamicanimation.animation.SpringForce;
-
-import java.util.ArrayList;
-
-
-/**
- * This animator allows for an object's property to be be controlled by an {@link ObjectAnimator} or
- * a {@link SpringAnimation}. It extends ValueAnimator so it can be used in an AnimatorSet.
- */
-public class SpringObjectAnimator<T> extends ValueAnimator {
-
- private static final String TAG = "SpringObjectAnimator";
- private static boolean DEBUG = false;
-
- private ObjectAnimator mObjectAnimator;
- private float[] mValues;
-
- private SpringAnimation mSpring;
- private SpringProperty<T> mProperty;
-
- private ArrayList<AnimatorListener> mListeners;
- private boolean mSpringEnded = true;
- private boolean mAnimatorEnded = true;
- private boolean mEnded = true;
-
- public SpringObjectAnimator(T object, FloatProperty<T> property, float minimumVisibleChange,
- float damping, float stiffness, float... values) {
- mSpring = new SpringAnimation(object, createFloatPropertyCompat(property));
- mSpring.setMinimumVisibleChange(minimumVisibleChange);
- mSpring.setSpring(new SpringForce(0)
- .setDampingRatio(damping)
- .setStiffness(stiffness));
- mSpring.setStartVelocity(0.01f);
- mProperty = new SpringProperty<>(property, mSpring);
- mObjectAnimator = ObjectAnimator.ofFloat(object, mProperty, values);
- mValues = values;
- mListeners = new ArrayList<>();
- setFloatValues(values);
-
- // We use this listener and track mListeners so that we can sync the animator and spring
- // listeners.
- mObjectAnimator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mAnimatorEnded = false;
- mEnded = false;
- for (AnimatorListener l : mListeners) {
- l.onAnimationStart(animation);
- }
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- mAnimatorEnded = true;
- tryEnding();
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {
- for (AnimatorListener l : mListeners) {
- l.onAnimationCancel(animation);
- }
- mSpring.cancel();
- }
- });
-
- mSpring.addUpdateListener((animation, value, velocity) -> {
- mSpringEnded = false;
- mEnded = false;
- });
- mSpring.addEndListener((animation, canceled, value, velocity) -> {
- mSpringEnded = true;
- tryEnding();
- });
- }
-
- private void tryEnding() {
- if (DEBUG) {
- Log.d(TAG, "tryEnding#mAnimatorEnded=" + mAnimatorEnded + ", mSpringEnded="
- + mSpringEnded + ", mEnded=" + mEnded);
- }
-
- // If springs are disabled, ignore value of mSpringEnded
- if (mAnimatorEnded && (mSpringEnded || !QUICKSTEP_SPRINGS.get()) && !mEnded) {
- for (AnimatorListener l : mListeners) {
- l.onAnimationEnd(this);
- }
- mEnded = true;
- }
- }
-
- public SpringAnimation getSpring() {
- return mSpring;
- }
-
- /**
- * Initializes and sets up the spring to take over controlling the object.
- */
- public void startSpring(float end, float velocity, OnAnimationEndListener endListener) {
- // Cancel the spring so we can set new start velocity and final position. We need to remove
- // the listener since the spring is not actually ending.
- mSpring.removeEndListener(endListener);
- mSpring.cancel();
- mSpring.addEndListener(endListener);
-
- mProperty.switchToSpring();
-
- float startValue = end == 0 ? mValues[1] : mValues[0];
- float endValue = end == 0 ? mValues[0] : mValues[1];
-
- // Ensures that the velocity matches the direction of the values.
- velocity = Math.signum(endValue - startValue) * Math.abs(velocity);
- mSpring.setStartVelocity(velocity);
-
- new Handler(Looper.getMainLooper()).postDelayed(() -> {
- mSpring.animateToFinalPosition(endValue);
- }, getStartDelay());
- }
-
- @Override
- public void addListener(AnimatorListener listener) {
- mListeners.add(listener);
- }
-
- public ArrayList<AnimatorListener> getObjectAnimatorListeners() {
- return mObjectAnimator.getListeners();
- }
-
- @Override
- public ArrayList<AnimatorListener> getListeners() {
- return mListeners;
- }
-
- @Override
- public void removeAllListeners() {
- mListeners.clear();
- }
-
- @Override
- public void removeListener(AnimatorListener listener) {
- mListeners.remove(listener);
- }
-
- @Override
- public void addPauseListener(AnimatorPauseListener listener) {
- mObjectAnimator.addPauseListener(listener);
- }
-
- @Override
- public void cancel() {
- mObjectAnimator.cancel();
- mSpring.cancel();
- }
-
- @Override
- public void end() {
- mObjectAnimator.end();
- }
-
- @Override
- public long getDuration() {
- return mObjectAnimator.getDuration();
- }
-
- @Override
- public TimeInterpolator getInterpolator() {
- return mObjectAnimator.getInterpolator();
- }
-
- @Override
- public long getStartDelay() {
- return mObjectAnimator.getStartDelay();
- }
-
- @Override
- public long getTotalDuration() {
- return mObjectAnimator.getTotalDuration();
- }
-
- @Override
- public boolean isPaused() {
- return mObjectAnimator.isPaused();
- }
-
- @Override
- public boolean isRunning() {
- return mObjectAnimator.isRunning();
- }
-
- @Override
- public boolean isStarted() {
- return mObjectAnimator.isStarted();
- }
-
- @Override
- public void pause() {
- mObjectAnimator.pause();
- }
-
- @Override
- public void removePauseListener(AnimatorPauseListener listener) {
- mObjectAnimator.removePauseListener(listener);
- }
-
- @Override
- public void resume() {
- mObjectAnimator.resume();
- }
-
- @Override
- public ValueAnimator setDuration(long duration) {
- return mObjectAnimator.setDuration(duration);
- }
-
- @Override
- public void setInterpolator(TimeInterpolator value) {
- mObjectAnimator.setInterpolator(value);
- }
-
- @Override
- public void setStartDelay(long startDelay) {
- mObjectAnimator.setStartDelay(startDelay);
- }
-
- @Override
- public void setTarget(Object target) {
- mObjectAnimator.setTarget(target);
- }
-
- @Override
- public void start() {
- mObjectAnimator.start();
- }
-
- @Override
- public void setCurrentFraction(float fraction) {
- mObjectAnimator.setCurrentFraction(fraction);
- }
-
- @Override
- public void setCurrentPlayTime(long playTime) {
- mObjectAnimator.setCurrentPlayTime(playTime);
- }
-
- public static class SpringProperty<T> extends FloatProperty<T> {
-
- boolean useSpring = false;
- final FloatProperty<T> mProperty;
- final SpringAnimation mSpring;
-
- public SpringProperty(FloatProperty<T> property, SpringAnimation spring) {
- super(property.getName());
- mProperty = property;
- mSpring = spring;
- }
-
- public void switchToSpring() {
- useSpring = true;
- }
-
- @Override
- public Float get(T object) {
- return mProperty.get(object);
- }
-
- @Override
- public void setValue(T object, float progress) {
- if (useSpring) {
- mSpring.animateToFinalPosition(progress);
- } else {
- mProperty.setValue(object, progress);
- }
- }
- }
-}
diff --git a/src/com/android/launcher3/anim/SpringProperty.java b/src/com/android/launcher3/anim/SpringProperty.java
new file mode 100644
index 0000000..caedd6c
--- /dev/null
+++ b/src/com/android/launcher3/anim/SpringProperty.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ * 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.launcher3.anim;
+
+import androidx.dynamicanimation.animation.SpringForce;
+
+/**
+ * Utility class to store configurations for spring animation
+ */
+public class SpringProperty {
+
+ public static final SpringProperty DEFAULT = new SpringProperty();
+
+ // Play spring when the animation is going towards the end
+ public static final int FLAG_CAN_SPRING_ON_END = 1 << 0;
+ // Play spring when animation is going towards the start (in reverse direction)
+ public static final int FLAG_CAN_SPRING_ON_START = 1 << 1;
+
+ public final int flags;
+
+ float mDampingRatio = SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY;
+ float mStiffness = SpringForce.STIFFNESS_MEDIUM;
+
+ public SpringProperty() {
+ this(0);
+ }
+
+ public SpringProperty(int flags) {
+ this.flags = flags;
+ }
+
+ public SpringProperty setDampingRatio(float dampingRatio) {
+ mDampingRatio = dampingRatio;
+ return this;
+ }
+
+ public SpringProperty setStiffness(float stiffness) {
+ mStiffness = stiffness;
+ return this;
+ }
+}
diff --git a/src/com/android/launcher3/dragndrop/PinItemDragListener.java b/src/com/android/launcher3/dragndrop/PinItemDragListener.java
index 869dd94..77c6306 100644
--- a/src/com/android/launcher3/dragndrop/PinItemDragListener.java
+++ b/src/com/android/launcher3/dragndrop/PinItemDragListener.java
@@ -16,6 +16,8 @@
package com.android.launcher3.dragndrop;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
+
import android.annotation.TargetApi;
import android.appwidget.AppWidgetManager;
import android.content.pm.LauncherApps.PinItemRequest;
@@ -38,6 +40,8 @@
import com.android.launcher3.widget.PendingItemDragHelper;
import com.android.launcher3.widget.WidgetAddFlowHandler;
+import java.util.ArrayList;
+
/**
* {@link DragSource} for handling drop from a different window. This object is initialized
* in the source window and is passed on to the Launcher activity as an Intent extra.
@@ -103,9 +107,9 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, LauncherLogProto.Target target,
- LauncherLogProto.Target targetParent) {
- targetParent.containerType = LauncherLogProto.ContainerType.PINITEM;
+ public void fillInLogContainerData(ItemInfo childInfo, LauncherLogProto.Target child,
+ ArrayList<LauncherLogProto.Target> parents) {
+ parents.add(newContainerTarget(LauncherLogProto.ContainerType.PINITEM));
}
@Override
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 69f93de..2be8ff4 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -27,6 +27,7 @@
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
import static com.android.launcher3.config.FeatureFlags.ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.userevent.LauncherLogProto.Target.FromFolderLabelState.FROM_CUSTOM;
import static com.android.launcher3.userevent.LauncherLogProto.Target.FromFolderLabelState.FROM_EMPTY;
import static com.android.launcher3.userevent.LauncherLogProto.Target.FromFolderLabelState.FROM_FOLDER_LABEL_STATE_UNSPECIFIED;
@@ -89,7 +90,6 @@
import com.android.launcher3.dragndrop.DragController.DragListener;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.dragndrop.DragOptions;
-import com.android.launcher3.logging.LoggerUtils;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.userevent.LauncherLogProto.Action;
import com.android.launcher3.userevent.LauncherLogProto.ContainerType;
@@ -1459,12 +1459,24 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, LauncherLogProto.Target target,
- LauncherLogProto.Target targetParent) {
- target.gridX = info.cellX;
- target.gridY = info.cellY;
- target.pageIndex = mContent.getCurrentPage();
- targetParent.containerType = LauncherLogProto.ContainerType.FOLDER;
+ public void fillInLogContainerData(ItemInfo childInfo, LauncherLogProto.Target child,
+ ArrayList<LauncherLogProto.Target> targets) {
+ child.gridX = childInfo.cellX;
+ child.gridY = childInfo.cellY;
+ child.pageIndex = mContent.getCurrentPage();
+
+ LauncherLogProto.Target target = newContainerTarget(LauncherLogProto.ContainerType.FOLDER);
+ target.pageIndex = mInfo.screenId;
+ target.gridX = mInfo.cellX;
+ target.gridY = mInfo.cellY;
+ targets.add(target);
+
+ // continue to parent
+ if (mInfo.container == CONTAINER_HOTSEAT) {
+ mLauncher.getHotseat().fillInLogContainerData(mInfo, target, targets);
+ } else {
+ mLauncher.getWorkspace().fillInLogContainerData(mInfo, target, targets);
+ }
}
private class OnScrollHintListener implements OnAlarmListener {
@@ -1597,7 +1609,7 @@
}
} else {
mLauncher.getUserEventDispatcher().logActionTapOutside(
- LoggerUtils.newContainerTarget(LauncherLogProto.ContainerType.FOLDER));
+ newContainerTarget(LauncherLogProto.ContainerType.FOLDER));
close(true);
return true;
}
diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java
index 1310d37..f72e674 100644
--- a/src/com/android/launcher3/folder/FolderAnimationManager.java
+++ b/src/com/android/launcher3/folder/FolderAnimationManager.java
@@ -21,6 +21,7 @@
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW;
import static com.android.launcher3.graphics.IconShape.getShape;
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
+import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -46,6 +47,7 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.PropertyResetListener;
import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.util.Themes;
import java.util.List;
@@ -220,6 +222,13 @@
Animator z = getAnimator(mFolder, View.TRANSLATION_Z, -mFolder.getElevation(), 0);
play(a, z, mIsOpening ? midDuration : 0, midDuration);
+ BackgroundBlurController blurController = mLauncher.getBackgroundBlurController();
+ int stateBackgroundBlur = mLauncher.getStateManager().getState()
+ .getBackgroundBlurRadius(mLauncher);
+ int folderBackgroundBlurAdjustment = blurController.getFolderBackgroundBlurAdjustment();
+ play(a, ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR, mIsOpening
+ ? stateBackgroundBlur + folderBackgroundBlurAdjustment
+ : stateBackgroundBlur));
// Store clip variables
CellLayout cellLayout = mContent.getCurrentCellLayout();
diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java
index b004edf..a9d10d7 100644
--- a/src/com/android/launcher3/logging/LoggerUtils.java
+++ b/src/com/android/launcher3/logging/LoggerUtils.java
@@ -37,6 +37,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
+import java.util.ArrayList;
/**
* Helper methods for logging.
@@ -255,4 +256,13 @@
event.action = action;
return event;
}
+
+ /**
+ * Creates LauncherEvent using Action and ArrayList of Targets
+ */
+ public static LauncherEvent newLauncherEvent(Action action, ArrayList<Target> targets) {
+ Target[] targetsArray = new Target[targets.size()];
+ targets.toArray(targetsArray);
+ return newLauncherEvent(action, targetsArray);
+ }
}
diff --git a/src/com/android/launcher3/logging/StatsLogUtils.java b/src/com/android/launcher3/logging/StatsLogUtils.java
index b02a050..8449612 100644
--- a/src/com/android/launcher3/logging/StatsLogUtils.java
+++ b/src/com/android/launcher3/logging/StatsLogUtils.java
@@ -5,11 +5,13 @@
import android.view.View;
import android.view.ViewParent;
+import androidx.annotation.Nullable;
+
import com.android.launcher3.ItemInfo;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
-import androidx.annotation.Nullable;
+import java.util.ArrayList;
public class StatsLogUtils {
@@ -35,14 +37,9 @@
public interface LogContainerProvider {
/**
- * Copies data from the source to the destination proto.
- *
- * @param v source of the data
- * @param info source of the data
- * @param target dest of the data
- * @param targetParent dest of the data
+ * Populates parent container targets for an item
*/
- void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent);
+ void fillInLogContainerData(ItemInfo childInfo, Target child, ArrayList<Target> parents);
}
/**
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java
index afa3f6d..513bf62 100644
--- a/src/com/android/launcher3/logging/UserEventDispatcher.java
+++ b/src/com/android/launcher3/logging/UserEventDispatcher.java
@@ -57,6 +57,7 @@
import com.android.launcher3.util.LogConfig;
import com.android.launcher3.util.ResourceBasedOverride;
+import java.util.ArrayList;
import java.util.Locale;
import java.util.UUID;
@@ -72,8 +73,10 @@
private static final boolean IS_VERBOSE = Utilities.isPropertyEnabled(LogConfig.USEREVENT);
private static final String UUID_STORAGE = "uuid";
- public static UserEventDispatcher newInstance(Context context,
- UserEventDelegate delegate) {
+ /**
+ * A factory method for UserEventDispatcher
+ */
+ public static UserEventDispatcher newInstance(Context context) {
SharedPreferences sharedPrefs = Utilities.getDevicePrefs(context);
String uuidStr = sharedPrefs.getString(UUID_STORAGE, null);
if (uuidStr == null) {
@@ -82,41 +85,31 @@
}
UserEventDispatcher ued = Overrides.getObject(UserEventDispatcher.class,
context.getApplicationContext(), R.string.user_event_dispatcher_class);
- ued.mDelegate = delegate;
ued.mUuidStr = uuidStr;
ued.mInstantAppResolver = InstantAppResolver.newInstance(context);
return ued;
}
- public static UserEventDispatcher newInstance(Context context) {
- return newInstance(context, null);
- }
-
- public interface UserEventDelegate {
- void modifyUserEvent(LauncherEvent event);
- }
/**
* Fills in the container data on the given event if the given view is not null.
*
* @return whether container data was added.
*/
- public boolean fillInLogContainerData(LauncherLogProto.LauncherEvent event, @Nullable View v) {
- // Fill in grid(x,y), pageIndex of the child and container type of the parent
- LogContainerProvider provider = StatsLogUtils.getLaunchProviderRecursive(v);
- if (v == null || !(v.getTag() instanceof ItemInfo) || provider == null) {
+ public boolean fillLogContainer(@Nullable View v, Target child,
+ @Nullable ArrayList<Target> targets) {
+ LogContainerProvider firstParent = StatsLogUtils.getLaunchProviderRecursive(v);
+ if (v == null || !(v.getTag() instanceof ItemInfo) || firstParent == null) {
return false;
}
final ItemInfo itemInfo = (ItemInfo) v.getTag();
- final Target target = event.srcTarget[0];
- final Target targetParent = event.srcTarget[1];
- onFillInLogContainerData(itemInfo, target, targetParent);
- provider.fillInLogContainerData(v, itemInfo, target, targetParent);
+ firstParent.fillInLogContainerData(itemInfo, child, targets);
return true;
}
- protected void onFillInLogContainerData(
- @NonNull ItemInfo itemInfo, @NonNull Target target, @NonNull Target targetParent) { }
+ protected void onFillInLogContainerData(@NonNull ItemInfo itemInfo, @NonNull Target target,
+ @NonNull ArrayList<Target> targets) {
+ }
private boolean mSessionStarted;
private long mElapsedContainerMillis;
@@ -125,7 +118,6 @@
private String mUuidStr;
protected InstantAppResolver mInstantAppResolver;
private boolean mAppOrTaskLaunch;
- private UserEventDelegate mDelegate;
private boolean mPreviousHomeGesture;
// APP_ICON SHORTCUT WIDGET
@@ -136,16 +128,15 @@
// --------------------------------------------------------------
@Deprecated
- public void logAppLaunch(View v, Intent intent, @Nullable UserHandle userHandle) {
- LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.TAP),
- newItemTarget(v, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
-
- if (fillInLogContainerData(event, v)) {
- if (mDelegate != null) {
- mDelegate.modifyUserEvent(event);
- }
- fillIntentInfo(event.srcTarget[0], intent, userHandle);
+ public void logAppLaunch(View v, Intent intent, @Nullable UserHandle userHandle) {
+ Target itemTarget = newItemTarget(v, mInstantAppResolver);
+ Action action = newTouchAction(Action.Touch.TAP);
+ ArrayList<Target> targets = makeTargetsList(itemTarget);
+ if (fillLogContainer(v, itemTarget, targets)) {
+ onFillInLogContainerData((ItemInfo) v.getTag(), itemTarget, targets);
+ fillIntentInfo(itemTarget, intent, userHandle);
}
+ LauncherEvent event = newLauncherEvent(action, targets);
ItemInfo info = (ItemInfo) v.getTag();
if (info != null && Utilities.IS_DEBUG_DEVICE && FeatureFlags.ENABLE_HYBRID_HOTSEAT.get()) {
FileLog.d(TAG, "appLaunch: packageName:" + info.getTargetComponent().getPackageName()
@@ -194,8 +185,11 @@
public void logNotificationLaunch(View v, PendingIntent intent) {
LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.TAP),
newItemTarget(v, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
- if (fillInLogContainerData(event, v)) {
- event.srcTarget[0].packageNameHash = (mUuidStr + intent.getCreatorPackage()).hashCode();
+ Target itemTarget = newItemTarget(v, mInstantAppResolver);
+ ArrayList<Target> targets = makeTargetsList(itemTarget);
+
+ if (fillLogContainer(v, itemTarget, targets)) {
+ itemTarget.packageNameHash = (mUuidStr + intent.getCreatorPackage()).hashCode();
}
dispatchUserEvent(event, null);
}
@@ -241,50 +235,45 @@
LauncherEvent event = newLauncherEvent(newCommandAction(command),
newItemTarget(itemView, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
- if (fillInLogContainerData(event, itemView)) {
+ Target itemTarget = newItemTarget(itemView, mInstantAppResolver);
+ ArrayList<Target> targets = makeTargetsList(itemTarget);
+
+ if (fillLogContainer(itemView, itemTarget, targets)) {
// TODO: Remove the following two lines once fillInLogContainerData can take in a
// container view.
- event.srcTarget[0].type = Target.Type.CONTAINER;
- event.srcTarget[0].containerType = srcContainerType;
+ itemTarget.type = Target.Type.CONTAINER;
+ itemTarget.containerType = srcContainerType;
}
dispatchUserEvent(event, null);
}
public void logActionOnControl(int action, int controlType) {
- logActionOnControl(action, controlType, null, -1);
+ logActionOnControl(action, controlType, null);
}
public void logActionOnControl(int action, int controlType, int parentContainerType) {
logActionOnControl(action, controlType, null, parentContainerType);
}
- public void logActionOnControl(int action, int controlType, @Nullable View controlInContainer) {
- logActionOnControl(action, controlType, controlInContainer, -1);
- }
+ /**
+ * Logs control action with proper parent hierarchy
+ */
+ public void logActionOnControl(int actionType, int controlType,
+ @Nullable View controlInContainer, int... parentTypes) {
+ Target control = newTarget(Target.Type.CONTROL);
+ control.controlType = controlType;
+ Action action = newAction(actionType);
- public void logActionOnControl(int action, int controlType, int parentContainer,
- int grandParentContainer) {
- LauncherEvent event = newLauncherEvent(newTouchAction(action),
- newControlTarget(controlType),
- newContainerTarget(parentContainer),
- newContainerTarget(grandParentContainer));
- dispatchUserEvent(event, null);
- }
-
- public void logActionOnControl(int action, int controlType, @Nullable View controlInContainer,
- int parentContainerType) {
- final LauncherEvent event = (controlInContainer == null && parentContainerType < 0)
- ? newLauncherEvent(newTouchAction(action), newTarget(Target.Type.CONTROL))
- : newLauncherEvent(newTouchAction(action), newTarget(Target.Type.CONTROL),
- newTarget(Target.Type.CONTAINER));
- event.srcTarget[0].controlType = controlType;
+ ArrayList<Target> targets = makeTargetsList(control);
if (controlInContainer != null) {
- fillInLogContainerData(event, controlInContainer);
+ fillLogContainer(controlInContainer, control, targets);
}
- if (parentContainerType >= 0) {
- event.srcTarget[1].containerType = parentContainerType;
+ for (int parentContainerType : parentTypes) {
+ if (parentContainerType < 0) continue;
+ targets.add(newContainerTarget(parentContainerType));
}
- if (action == Action.Touch.DRAGDROP) {
+ LauncherEvent event = newLauncherEvent(action, targets);
+ if (actionType == Action.Touch.DRAGDROP) {
event.actionDurationMillis = SystemClock.uptimeMillis() - mActionDurationMillis;
}
dispatchUserEvent(event, null);
@@ -375,15 +364,16 @@
* Logs proto lite version of LauncherEvent object to clearcut.
*/
public void logLauncherEvent(
- com.android.launcher3.userevent.LauncherLogProto.LauncherEvent launcherEvent) {
+ com.android.launcher3.userevent.LauncherLogProto.LauncherEvent launcherEvent) {
if (mPreviousHomeGesture) {
mPreviousHomeGesture = false;
}
mAppOrTaskLaunch = false;
launcherEvent.toBuilder()
- .setElapsedContainerMillis(SystemClock.uptimeMillis() - mElapsedContainerMillis)
- .setElapsedSessionMillis(SystemClock.uptimeMillis() - mElapsedSessionMillis).build();
+ .setElapsedContainerMillis(SystemClock.uptimeMillis() - mElapsedContainerMillis)
+ .setElapsedSessionMillis(
+ SystemClock.uptimeMillis() - mElapsedSessionMillis).build();
if (!IS_VERBOSE) {
return;
}
@@ -391,36 +381,35 @@
}
public void logDeepShortcutsOpen(View icon) {
- LogContainerProvider provider = StatsLogUtils.getLaunchProviderRecursive(icon);
- if (icon == null || !(icon.getTag() instanceof ItemInfo || provider == null)) {
- return;
- }
ItemInfo info = (ItemInfo) icon.getTag();
- LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.LONGPRESS),
- newItemTarget(info, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
- provider.fillInLogContainerData(icon, info, event.srcTarget[0], event.srcTarget[1]);
- dispatchUserEvent(event, null);
-
+ Target child = newItemTarget(info, mInstantAppResolver);
+ ArrayList<Target> targets = makeTargetsList(child);
+ fillLogContainer(icon, child, targets);
+ dispatchUserEvent(newLauncherEvent(newTouchAction(Action.Touch.TAP), targets), null);
resetElapsedContainerMillis("deep shortcut open");
}
public void logDragNDrop(DropTarget.DragObject dragObj, View dropTargetAsView) {
- LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.DRAGDROP),
- newItemTarget(dragObj.originalDragInfo, mInstantAppResolver),
- newTarget(Target.Type.CONTAINER));
- event.destTarget = new Target[]{
- newItemTarget(dragObj.originalDragInfo, mInstantAppResolver),
- newDropTarget(dropTargetAsView)
- };
+ Target srcChild = newItemTarget(dragObj.originalDragInfo, mInstantAppResolver);
+ ArrayList<Target> srcTargets = makeTargetsList(srcChild);
- dragObj.dragSource.fillInLogContainerData(null, dragObj.originalDragInfo,
- event.srcTarget[0], event.srcTarget[1]);
+ Target destChild = newItemTarget(dragObj.originalDragInfo, mInstantAppResolver);
+ ArrayList<Target> destTargets = makeTargetsList(destChild);
+
+ dragObj.dragSource.fillInLogContainerData(dragObj.originalDragInfo, srcChild, srcTargets);
if (dropTargetAsView instanceof LogContainerProvider) {
- ((LogContainerProvider) dropTargetAsView).fillInLogContainerData(null,
- dragObj.dragInfo, event.destTarget[0], event.destTarget[1]);
-
+ ((LogContainerProvider) dropTargetAsView).fillInLogContainerData(dragObj.dragInfo,
+ destChild, destTargets);
}
+ else {
+ destTargets.add(newDropTarget(dropTargetAsView));
+ }
+ LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.DRAGDROP), srcTargets);
+ Target[] destTargetsArray = new Target[destTargets.size()];
+ destTargets.toArray(destTargetsArray);
+ event.destTarget = destTargetsArray;
+
event.actionDurationMillis = SystemClock.uptimeMillis() - mActionDurationMillis;
dispatchUserEvent(event, null);
}
@@ -444,8 +433,6 @@
/**
* Currently logs following containers: workspace, allapps, widget tray.
- *
- * @param reason
*/
public final void resetElapsedContainerMillis(String reason) {
mElapsedContainerMillis = SystemClock.uptimeMillis();
@@ -515,4 +502,15 @@
}
return result;
}
+
+ /**
+ * Constructs an ArrayList with targets
+ */
+ public static ArrayList<Target> makeTargetsList(Target... targets) {
+ ArrayList<Target> result = new ArrayList<>();
+ for (Target target : targets) {
+ result.add(target);
+ }
+ return result;
+ }
}
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 445acca..5af5ebb 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -18,6 +18,7 @@
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.Utilities.squaredTouchSlop;
+import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.notification.NotificationMainView.NOTIFICATION_ITEM_INFO;
import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS;
import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS_IF_NOTIFICATIONS;
@@ -58,7 +59,6 @@
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.dragndrop.DragView;
-import com.android.launcher3.logging.LoggerUtils;
import com.android.launcher3.notification.NotificationInfo;
import com.android.launcher3.notification.NotificationItemView;
import com.android.launcher3.notification.NotificationKeyData;
@@ -172,7 +172,7 @@
BaseDragLayer dl = getPopupContainer();
if (!dl.isEventOverView(this, ev)) {
mLauncher.getUserEventDispatcher().logActionTapOutside(
- LoggerUtils.newContainerTarget(ContainerType.DEEPSHORTCUTS));
+ newContainerTarget(ContainerType.DEEPSHORTCUTS));
close(true);
// We let touches on the original icon go through so that users can launch
@@ -485,14 +485,15 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- if (info == NOTIFICATION_ITEM_INFO) {
- target.itemType = ItemType.NOTIFICATION;
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ if (childInfo == NOTIFICATION_ITEM_INFO) {
+ child.itemType = ItemType.NOTIFICATION;
} else {
- target.itemType = ItemType.DEEPSHORTCUT;
- target.rank = info.rank;
+ child.itemType = ItemType.DEEPSHORTCUT;
+ child.rank = childInfo.rank;
}
- targetParent.containerType = ContainerType.DEEPSHORTCUTS;
+ parents.add(newContainerTarget(ContainerType.DEEPSHORTCUTS));
}
@Override
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index 34d69e9..4e98781 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -42,11 +42,11 @@
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.AnimatorSetBuilder;
+import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.util.FlingBlockCheck;
-import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.TouchController;
/**
@@ -434,7 +434,7 @@
maybeUpdateAtomicAnim(mFromState, targetState, targetState == mToState ? 1f : 0f);
updateSwipeCompleteAnimation(anim, Math.max(duration, getRemainingAtomicDuration()),
targetState, velocity, fling);
- mCurrentAnimation.dispatchOnStartWithVelocity(endProgress, progressVelocity);
+ mCurrentAnimation.dispatchOnStart();
if (fling && targetState == LauncherState.ALL_APPS && !UNSTABLE_SPRINGS.get()) {
mLauncher.getAppsView().addSpringFromFlingUpdateListener(anim, velocity);
}
diff --git a/src/com/android/launcher3/util/PendingAnimation.java b/src/com/android/launcher3/util/PendingAnimation.java
deleted file mode 100644
index 617a38b..0000000
--- a/src/com/android/launcher3/util/PendingAnimation.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2018 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.launcher3.util;
-
-import android.animation.AnimatorSet;
-import android.annotation.TargetApi;
-import android.os.Build;
-
-import java.util.ArrayList;
-import java.util.function.Consumer;
-
-/**
- * Utility class to keep track of a running animation.
- *
- * This class allows attaching end callbacks to an animation is intended to be used with
- * {@link com.android.launcher3.anim.AnimatorPlaybackController}, since in that case
- * AnimationListeners are not properly dispatched.
- */
-@TargetApi(Build.VERSION_CODES.O)
-public class PendingAnimation {
-
- private final ArrayList<Consumer<OnEndListener>> mEndListeners = new ArrayList<>();
-
- public final AnimatorSet anim;
-
- public PendingAnimation(AnimatorSet anim) {
- this.anim = anim;
- }
-
- public void finish(boolean isSuccess, int logAction) {
- for (Consumer<OnEndListener> listeners : mEndListeners) {
- listeners.accept(new OnEndListener(isSuccess, logAction));
- }
- mEndListeners.clear();
- }
-
- public void addEndListener(Consumer<OnEndListener> listener) {
- mEndListeners.add(listener);
- }
-
- public static class OnEndListener {
- public boolean isSuccess;
- public int logAction;
-
- public OnEndListener(boolean isSuccess, int logAction) {
- this.isSuccess = isSuccess;
- this.logAction = logAction;
- }
- }
-}
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java
index 8ce98f2..70d6c7e 100644
--- a/src/com/android/launcher3/views/ScrimView.java
+++ b/src/com/android/launcher3/views/ScrimView.java
@@ -336,7 +336,7 @@
}
private void updateDragHandleVisibility(Drawable recycle) {
- boolean visible = mLauncher.getDeviceProfile().isVerticalBarLayout() || mAM.isEnabled();
+ boolean visible = shouldDragHandleBeVisible();
boolean wasVisible = mDragHandle != null;
if (visible != wasVisible) {
if (visible) {
@@ -352,6 +352,10 @@
}
}
+ protected boolean shouldDragHandleBeVisible() {
+ return mLauncher.getDeviceProfile().isVerticalBarLayout() || mAM.isEnabled();
+ }
+
@Override
public boolean dispatchHoverEvent(MotionEvent event) {
return mAccessibilityHelper.dispatchHoverEvent(event) || super.dispatchHoverEvent(event);
diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java
index df1a469..73a0615 100644
--- a/src/com/android/launcher3/widget/BaseWidgetSheet.java
+++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java
@@ -41,6 +41,8 @@
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.AbstractSlideInView;
+import java.util.ArrayList;
+
/**
* Base class for various widgets popup
*/
@@ -144,9 +146,11 @@
}
@Override
- public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
- targetParent.containerType = ContainerType.WIDGETS;
- targetParent.cardinality = getElementsRowCount();
+ public void fillInLogContainerData(ItemInfo childInfo, Target child,
+ ArrayList<Target> parents) {
+ Target target = newContainerTarget(ContainerType.WIDGETS);
+ target.cardinality = getElementsRowCount();
+ parents.add(target);
}
@Override
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java b/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java
new file mode 100644
index 0000000..232bad3
--- /dev/null
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ * 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.launcher3.uioverrides;
+
+
+import android.util.IntProperty;
+import android.view.View;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.LauncherStateManager;
+import com.android.launcher3.anim.AnimatorSetBuilder;
+
+/**
+ * Controls the blur, for the Launcher surface only.
+ */
+public class BackgroundBlurController implements LauncherStateManager.StateHandler {
+
+ public static final IntProperty<BackgroundBlurController> BACKGROUND_BLUR =
+ new IntProperty<BackgroundBlurController>("backgroundBlur") {
+ @Override
+ public void setValue(BackgroundBlurController blurController, int blurRadius) {}
+
+ @Override
+ public Integer get(BackgroundBlurController blurController) {
+ return 0;
+ }
+ };
+
+ public BackgroundBlurController(Launcher l) {}
+
+ public int getFolderBackgroundBlurAdjustment() {
+ return 0;
+ }
+
+ public void setSurfaceToLauncher(View v) {}
+
+ @Override
+ public void setState(LauncherState toState) {}
+
+ @Override
+ public void setStateWithAnimation(LauncherState toState, AnimatorSetBuilder builder,
+ LauncherStateManager.AnimationConfig config) {}
+}
diff --git a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
index 4b1a067..de9757f 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
@@ -41,7 +41,6 @@
import com.android.launcher3.util.rule.ShellCommandRule;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -71,14 +70,12 @@
@Test
@PortraitLandscape
- @Ignore // b/148867106
public void testWidgetConfig() throws Throwable {
runTest(true);
}
@Test
@PortraitLandscape
- @Ignore // b/148867106
public void testConfigCancelled() throws Throwable {
runTest(false);
}
diff --git a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
index 468f54c..5daac39 100644
--- a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
+++ b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
@@ -42,10 +42,13 @@
try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
if (mLauncher.getNavigationModel()
!= LauncherInstrumentation.NavigationModel.THREE_BUTTON) {
- mLauncher.expectEvent(
- TestProtocol.SEQUENCE_TIS, LauncherInstrumentation.EVENT_TOUCH_DOWN_TIS);
- mLauncher.expectEvent(
- TestProtocol.SEQUENCE_TIS, LauncherInstrumentation.EVENT_TOUCH_UP_TIS);
+ if (!mLauncher.isLauncher3()) {
+ mLauncher.expectEvent(
+ TestProtocol.SEQUENCE_TIS,
+ LauncherInstrumentation.EVENT_TOUCH_DOWN_TIS);
+ mLauncher.expectEvent(
+ TestProtocol.SEQUENCE_TIS, LauncherInstrumentation.EVENT_TOUCH_UP_TIS);
+ }
}
mLauncher.waitForObjectInContainer(
mWidgetCell.getParent().getParent().getParent().getParent(),
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 9b12a62..d894843 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -677,7 +677,7 @@
try (LauncherInstrumentation.Closable c = addContextLayer(action)) {
mDevice.waitForIdle();
- if (getNavigationModel() == NavigationModel.TWO_BUTTON) {
+ if (!isLauncher3() && getNavigationModel() == NavigationModel.TWO_BUTTON) {
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS);
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS);
}
@@ -962,7 +962,7 @@
void clickLauncherObject(UiObject2 object) {
expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN);
expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP);
- if (getNavigationModel() != NavigationModel.THREE_BUTTON) {
+ if (!isLauncher3() && getNavigationModel() != NavigationModel.THREE_BUTTON) {
expectEvent(TestProtocol.SEQUENCE_TIS, LauncherInstrumentation.EVENT_TOUCH_DOWN_TIS);
expectEvent(TestProtocol.SEQUENCE_TIS, LauncherInstrumentation.EVENT_TOUCH_UP_TIS);
}
@@ -1104,24 +1104,25 @@
public void sendPointer(long downTime, long currentTime, int action, Point point,
GestureScope gestureScope) {
+ final boolean notLauncher3 = !isLauncher3();
switch (action) {
case MotionEvent.ACTION_DOWN:
if (gestureScope != GestureScope.OUTSIDE) {
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN);
}
- if (getNavigationModel() != NavigationModel.THREE_BUTTON) {
+ if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) {
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS);
}
break;
case MotionEvent.ACTION_UP:
- if (gestureScope != GestureScope.INSIDE) {
+ if (notLauncher3 && gestureScope != GestureScope.INSIDE) {
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_PILFER_POINTERS);
}
if (gestureScope != GestureScope.OUTSIDE) {
expectEvent(TestProtocol.SEQUENCE_MAIN, gestureScope == GestureScope.INSIDE
? EVENT_TOUCH_UP : EVENT_TOUCH_CANCEL);
}
- if (getNavigationModel() != NavigationModel.THREE_BUTTON) {
+ if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) {
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS);
}
break;
@@ -1276,11 +1277,6 @@
public Closable eventsCheck() {
Assert.assertTrue("Nested event checking", !sCheckingEvents);
- if ("com.android.launcher3".equals(getLauncherPackageName())) {
- // Not checking specific Launcher3 event sequences.
- return () -> {
- };
- }
sCheckingEvents = true;
mExpectedPid = getPid();
if (sEventChecker == null) sEventChecker = new LogEventChecker();
@@ -1304,6 +1300,10 @@
};
}
+ boolean isLauncher3() {
+ return "com.android.launcher3".equals(getLauncherPackageName());
+ }
+
void expectEvent(String sequence, Pattern expected) {
if (sCheckingEvents) sEventChecker.expectPattern(sequence, expected);
}
diff --git a/tests/tapl/com/android/launcher3/tapl/Widgets.java b/tests/tapl/com/android/launcher3/tapl/Widgets.java
index 8659aa7..084138c 100644
--- a/tests/tapl/com/android/launcher3/tapl/Widgets.java
+++ b/tests/tapl/com/android/launcher3/tapl/Widgets.java
@@ -115,7 +115,8 @@
int visibleDelta = maxWidth - widget.getVisibleBounds().width();
if (visibleDelta > 0) {
Rect parentBounds = cell.getVisibleBounds();
- mLauncher.linearGesture(parentBounds.centerX() + visibleDelta,
+ mLauncher.linearGesture(parentBounds.centerX() + visibleDelta
+ + mLauncher.getTouchSlop(),
parentBounds.centerY(), parentBounds.centerX(),
parentBounds.centerY(), 10, true, GestureScope.INSIDE);
}