Merge "Enabling folder paged view to scroll itself with accessibility focus traversal" into ub-launcher3-burnaby
diff --git a/proguard.flags b/proguard.flags
index e2a4b5b..6eb5948 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -65,4 +65,8 @@
-keep class com.android.launcher3.AppsContainerRecyclerView {
public void setFastScrollerAlpha(float);
public float getFastScrollerAlpha();
-}
\ No newline at end of file
+}
+
+-keep class com.android.launcher3.ButtonDropTarget {
+ public int getTextColor();
+}
diff --git a/res/drawable-hdpi/ic_launcher_clear_active_holo.png b/res/drawable-hdpi/ic_launcher_clear_active_holo.png
deleted file mode 100644
index cdd0052..0000000
--- a/res/drawable-hdpi/ic_launcher_clear_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_clear_normal_holo.png b/res/drawable-hdpi/ic_launcher_clear_normal_holo.png
deleted file mode 100644
index 84549ff..0000000
--- a/res/drawable-hdpi/ic_launcher_clear_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_info_active.png b/res/drawable-hdpi/ic_launcher_info_active.png
new file mode 100644
index 0000000..f7a3b68
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_info_active.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_info_active_holo.png b/res/drawable-hdpi/ic_launcher_info_active_holo.png
deleted file mode 100644
index c534e56..0000000
--- a/res/drawable-hdpi/ic_launcher_info_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_info_normal.png b/res/drawable-hdpi/ic_launcher_info_normal.png
new file mode 100644
index 0000000..780d796
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_info_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_info_normal_holo.png b/res/drawable-hdpi/ic_launcher_info_normal_holo.png
deleted file mode 100644
index c9bcd7f..0000000
--- a/res/drawable-hdpi/ic_launcher_info_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_remove_active.png b/res/drawable-hdpi/ic_launcher_remove_active.png
new file mode 100644
index 0000000..e53de0d
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_remove_active.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_remove_normal.png b/res/drawable-hdpi/ic_launcher_remove_normal.png
new file mode 100644
index 0000000..91e19ca
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_remove_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_trashcan_active_holo.png b/res/drawable-hdpi/ic_launcher_trashcan_active_holo.png
deleted file mode 100644
index 82b1b59..0000000
--- a/res/drawable-hdpi/ic_launcher_trashcan_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_trashcan_normal_holo.png b/res/drawable-hdpi/ic_launcher_trashcan_normal_holo.png
deleted file mode 100644
index 3fc2e83..0000000
--- a/res/drawable-hdpi/ic_launcher_trashcan_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_uninstall_active.png b/res/drawable-hdpi/ic_launcher_uninstall_active.png
new file mode 100644
index 0000000..22b97ee
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_uninstall_active.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_uninstall_normal.png b/res/drawable-hdpi/ic_launcher_uninstall_normal.png
new file mode 100644
index 0000000..7aea5d0
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_uninstall_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_clear_active_holo.png b/res/drawable-mdpi/ic_launcher_clear_active_holo.png
deleted file mode 100644
index 2683bea..0000000
--- a/res/drawable-mdpi/ic_launcher_clear_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_clear_normal_holo.png b/res/drawable-mdpi/ic_launcher_clear_normal_holo.png
deleted file mode 100644
index 219f3e5..0000000
--- a/res/drawable-mdpi/ic_launcher_clear_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_info_active.png b/res/drawable-mdpi/ic_launcher_info_active.png
new file mode 100644
index 0000000..ea71272
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_info_active.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_info_active_holo.png b/res/drawable-mdpi/ic_launcher_info_active_holo.png
deleted file mode 100644
index f84b4a6..0000000
--- a/res/drawable-mdpi/ic_launcher_info_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_info_normal.png b/res/drawable-mdpi/ic_launcher_info_normal.png
new file mode 100644
index 0000000..8c60159
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_info_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_info_normal_holo.png b/res/drawable-mdpi/ic_launcher_info_normal_holo.png
deleted file mode 100644
index eac578f..0000000
--- a/res/drawable-mdpi/ic_launcher_info_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_remove_active.png b/res/drawable-mdpi/ic_launcher_remove_active.png
new file mode 100644
index 0000000..f36cfdd
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_remove_active.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_remove_normal.png b/res/drawable-mdpi/ic_launcher_remove_normal.png
new file mode 100644
index 0000000..60829b9
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_remove_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_trashcan_active_holo.png b/res/drawable-mdpi/ic_launcher_trashcan_active_holo.png
deleted file mode 100644
index 0350e55..0000000
--- a/res/drawable-mdpi/ic_launcher_trashcan_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_trashcan_normal_holo.png b/res/drawable-mdpi/ic_launcher_trashcan_normal_holo.png
deleted file mode 100644
index 799b62f..0000000
--- a/res/drawable-mdpi/ic_launcher_trashcan_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_uninstall_active.png b/res/drawable-mdpi/ic_launcher_uninstall_active.png
new file mode 100644
index 0000000..e4ee911
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_uninstall_active.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_uninstall_normal.png b/res/drawable-mdpi/ic_launcher_uninstall_normal.png
new file mode 100644
index 0000000..aefbc69
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_uninstall_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_clear_active_holo.png b/res/drawable-xhdpi/ic_launcher_clear_active_holo.png
deleted file mode 100644
index 1a7e53d..0000000
--- a/res/drawable-xhdpi/ic_launcher_clear_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_clear_normal_holo.png b/res/drawable-xhdpi/ic_launcher_clear_normal_holo.png
deleted file mode 100644
index d4965d9..0000000
--- a/res/drawable-xhdpi/ic_launcher_clear_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_active.png b/res/drawable-xhdpi/ic_launcher_info_active.png
new file mode 100644
index 0000000..b438f9e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_info_active.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_active_holo.png b/res/drawable-xhdpi/ic_launcher_info_active_holo.png
deleted file mode 100644
index b8cdbc4..0000000
--- a/res/drawable-xhdpi/ic_launcher_info_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_normal.png b/res/drawable-xhdpi/ic_launcher_info_normal.png
new file mode 100644
index 0000000..5c49816
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_info_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_normal_holo.png b/res/drawable-xhdpi/ic_launcher_info_normal_holo.png
deleted file mode 100644
index f503fb8..0000000
--- a/res/drawable-xhdpi/ic_launcher_info_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_remove_active.png b/res/drawable-xhdpi/ic_launcher_remove_active.png
new file mode 100644
index 0000000..14ac79d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_remove_active.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_remove_normal.png b/res/drawable-xhdpi/ic_launcher_remove_normal.png
new file mode 100644
index 0000000..8188805
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_remove_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png b/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png
deleted file mode 100644
index c155274..0000000
--- a/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png b/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png
deleted file mode 100644
index 2ec7ad9..0000000
--- a/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_uninstall_active.png b/res/drawable-xhdpi/ic_launcher_uninstall_active.png
new file mode 100644
index 0000000..2c19b32
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_uninstall_active.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_uninstall_normal.png b/res/drawable-xhdpi/ic_launcher_uninstall_normal.png
new file mode 100644
index 0000000..a093f28
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_uninstall_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_clear_active_holo.png b/res/drawable-xxhdpi/ic_launcher_clear_active_holo.png
deleted file mode 100644
index 95cf841..0000000
--- a/res/drawable-xxhdpi/ic_launcher_clear_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_clear_normal_holo.png b/res/drawable-xxhdpi/ic_launcher_clear_normal_holo.png
deleted file mode 100644
index b0f5a27..0000000
--- a/res/drawable-xxhdpi/ic_launcher_clear_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_info_active.png b/res/drawable-xxhdpi/ic_launcher_info_active.png
new file mode 100644
index 0000000..d354dd3
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_info_active.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_info_active_holo.png b/res/drawable-xxhdpi/ic_launcher_info_active_holo.png
deleted file mode 100644
index 57f332a..0000000
--- a/res/drawable-xxhdpi/ic_launcher_info_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_info_normal.png b/res/drawable-xxhdpi/ic_launcher_info_normal.png
new file mode 100644
index 0000000..c270be2
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_info_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_info_normal_holo.png b/res/drawable-xxhdpi/ic_launcher_info_normal_holo.png
deleted file mode 100644
index 94f0955..0000000
--- a/res/drawable-xxhdpi/ic_launcher_info_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_remove_active.png b/res/drawable-xxhdpi/ic_launcher_remove_active.png
new file mode 100644
index 0000000..9df4404
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_remove_active.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_remove_normal.png b/res/drawable-xxhdpi/ic_launcher_remove_normal.png
new file mode 100644
index 0000000..5bc8f0c
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_remove_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_trashcan_active_holo.png b/res/drawable-xxhdpi/ic_launcher_trashcan_active_holo.png
deleted file mode 100644
index 3bb098c..0000000
--- a/res/drawable-xxhdpi/ic_launcher_trashcan_active_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_trashcan_normal_holo.png b/res/drawable-xxhdpi/ic_launcher_trashcan_normal_holo.png
deleted file mode 100644
index 550cc5b..0000000
--- a/res/drawable-xxhdpi/ic_launcher_trashcan_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_uninstall_active.png b/res/drawable-xxhdpi/ic_launcher_uninstall_active.png
new file mode 100644
index 0000000..db7d339
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_uninstall_active.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_uninstall_normal.png b/res/drawable-xxhdpi/ic_launcher_uninstall_normal.png
new file mode 100644
index 0000000..4fce55b
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_launcher_uninstall_normal.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_info_active.png b/res/drawable-xxxhdpi/ic_launcher_info_active.png
new file mode 100644
index 0000000..162e23d
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_info_active.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_info_normal.png b/res/drawable-xxxhdpi/ic_launcher_info_normal.png
new file mode 100644
index 0000000..270e15d
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_info_normal.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_remove_active.png b/res/drawable-xxxhdpi/ic_launcher_remove_active.png
new file mode 100644
index 0000000..c0b8ea2
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_remove_active.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_remove_normal.png b/res/drawable-xxxhdpi/ic_launcher_remove_normal.png
new file mode 100644
index 0000000..ed96c55
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_remove_normal.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_uninstall_active.png b/res/drawable-xxxhdpi/ic_launcher_uninstall_active.png
new file mode 100644
index 0000000..75896f3
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_uninstall_active.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_uninstall_normal.png b/res/drawable-xxxhdpi/ic_launcher_uninstall_normal.png
new file mode 100644
index 0000000..61490b9
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_launcher_uninstall_normal.png
Binary files differ
diff --git a/res/drawable/info_target_selector.xml b/res/drawable/info_target_selector.xml
index f3a7016..51caece 100644
--- a/res/drawable/info_target_selector.xml
+++ b/res/drawable/info_target_selector.xml
@@ -19,6 +19,6 @@
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/ic_launcher_info_normal_holo" />
- <item android:drawable="@drawable/ic_launcher_info_active_holo" />
+ <item android:drawable="@drawable/ic_launcher_info_normal" />
+ <item android:drawable="@drawable/ic_launcher_info_active" />
</transition>
diff --git a/res/drawable/remove_target_selector.xml b/res/drawable/remove_target_selector.xml
index 5e071fb..9025e8a 100644
--- a/res/drawable/remove_target_selector.xml
+++ b/res/drawable/remove_target_selector.xml
@@ -19,6 +19,6 @@
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/ic_launcher_clear_normal_holo" />
- <item android:drawable="@drawable/ic_launcher_clear_active_holo" />
+ <item android:drawable="@drawable/ic_launcher_remove_normal" />
+ <item android:drawable="@drawable/ic_launcher_remove_active" />
</transition>
diff --git a/res/drawable/uninstall_target_selector.xml b/res/drawable/uninstall_target_selector.xml
index 229942e..175cc20 100644
--- a/res/drawable/uninstall_target_selector.xml
+++ b/res/drawable/uninstall_target_selector.xml
@@ -19,6 +19,6 @@
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/ic_launcher_trashcan_normal_holo" />
- <item android:drawable="@drawable/ic_launcher_trashcan_active_holo" />
+ <item android:drawable="@drawable/ic_launcher_uninstall_normal" />
+ <item android:drawable="@drawable/ic_launcher_uninstall_active" />
</transition>
diff --git a/res/layout/add_list_item.xml b/res/layout/add_list_item.xml
deleted file mode 100644
index e937d7b..0000000
--- a/res/layout/add_list_item.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:gravity="center_vertical"
- android:drawablePadding="14dip"
- android:paddingLeft="15dip"
- android:paddingRight="15dip" />
diff --git a/res/layout/rename_folder.xml b/res/layout/rename_folder.xml
deleted file mode 100644
index 21a335c..0000000
--- a/res/layout/rename_folder.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="20dip"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/label"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/rename_folder_label"
- android:gravity="start"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <EditText
- android:id="@+id/folder_name"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:scrollHorizontally="true"
- android:autoText="false"
- android:capitalize="none"
- android:gravity="fill_horizontal"
- android:maxLength="30"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
-</LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 58a4d4c..9695b26 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -20,8 +20,9 @@
<resources>
<!-- The color tints to apply to the text and drag view when hovering
over the delete target or the info target -->
- <color name="delete_target_hover_tint">#DAFF0000</color>
- <color name="info_target_hover_tint">#DA0099CC</color>
+ <color name="delete_target_hover_tint">#DAC1C1C1</color>
+ <color name="uninstall_target_hover_tint">#DAF0592B</color>
+ <color name="info_target_hover_tint">#DA009688</color>
<color name="cling_scrim_background">#80000000</color>
<color name="bubble_dark_background">#20000000</color>
diff --git a/res/values/config.xml b/res/values/config.xml
index 47394a1..7ce4059 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -55,9 +55,6 @@
<integer name="config_appsCustomizeDragSlopeThreshold">150</integer>
<!-- Workspace -->
- <!-- The transition duration for the background of the drop targets -->
- <integer name="config_dropTargetBgTransitionDuration">0</integer>
-
<!-- The duration (in ms) of the fade animation on the object outlines, used when
we are dragging objects around on the home screen. -->
<integer name="config_dragOutlineFadeTime">900</integer>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a68f53a..b5e02f2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -34,8 +34,6 @@
<string name="application_name">Launcher3</string>
<!-- Accessibility-facing application name -->
<string name="home">Home</string>
- <!-- Name for all applications running as this uid. -->
- <string name="uid_name">Android Core Apps</string>
<!-- Default folder name -->
<string name="folder_name"></string>
<!-- Work folder name -->
@@ -48,10 +46,6 @@
<string name="safemode_shortcut_error">Downloaded app disabled in Safe mode</string>
<!-- SafeMode widget error string -->
<string name="safemode_widget_error">Widgets disabled in Safe mode</string>
- <!-- Labels for the tabs in the customize drawer -->
- <string name="widgets_tab_label">Widgets</string>
-
- <string name="widget_adder">Widgets</string>
<string name="toggle_weight_watcher">Show Mem</string>
@@ -62,17 +56,6 @@
<!-- There is a special version of this format string for Farsi -->
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
- <!-- External-drop widget pick label format string [CHAR_LIMIT=25] -->
- <string name="external_drop_widget_pick_format" translatable="false">%1$s (%2$d \u00d7 %3$d)</string>
- <!-- External-drop widget error string. This is the error that is shown
- when you drag and item into the homescreen and it is unable to fit,
- or an error is encountered. [CHAR_LIMIT=50] -->
- <string name="external_drop_widget_error">Couldn\'t drop item on this Home screen.</string>
- <!-- External-drop widget pick title. This is shown as the title of the
- dialog which allows you to pick which widgets to handle a particular
- drop if there are multiple choices. [CHAR_LIMIT=35] -->
- <string name="external_drop_widget_pick_title">Choose widget to create</string>
-
<!-- Apps view -->
<!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
<string name="apps_view_search_bar_hint">Search Apps</string>
@@ -81,54 +64,18 @@
<!-- No-search-results text. [CHAR_LIMIT=50] -->
<string name="apps_view_no_search_results">No Apps found matching \"<xliff:g id="query" example="Android">%1$s</xliff:g>\"</string>
- <!-- Folders -->
+ <!-- Drag and drop -->
<skip />
- <!-- Label of Folder name field in Rename folder dialog box -->
- <string name="rename_folder_label">Folder name</string>
- <!-- Title of dialog box -->
- <string name="rename_folder_title">Rename folder</string>
- <!-- Buttons in Rename folder dialog box -->
- <string name="rename_action">OK</string>
- <!-- Buttons in Rename folder dialog box -->
- <string name="cancel_action">Cancel</string>
-
- <!-- Shortcuts -->
- <skip />
- <!-- Title of dialog box -->
- <string name="menu_item_add_item">Add to Home screen</string>
- <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all apps -->
- <string name="group_applications">Apps</string>
- <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all shortcut
-s -->
- <string name="group_shortcuts">Shortcuts</string>
- <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all widgets/gadgets -->
- <string name="group_widgets">Widgets</string>
- <!-- Error message when user has filled all their home screens -->
- <string name="completely_out_of_space">No more room on your Home screens.</string>
<!-- Error message when user has filled a home screen -->
<string name="out_of_space">No more room on this Home screen.</string>
<!-- Error message when user has filled the hotseat -->
<string name="hotseat_out_of_space">No more room in the Favorites tray</string>
- <!-- Error message when user tries to drop an invalid item on the hotseat -->
- <string name="invalid_hotseat_item">This widget is too large for the Favorites tray</string>
- <!-- Message displayed when a shortcut is created by an external application -->
- <string name="shortcut_installed">Shortcut \"<xliff:g id="name" example="Browser">%s</xliff:g>\" created.</string>
- <!-- Message displayed when an external application attemps to create a shortcut that already exists -->
- <string name="shortcut_duplicate">Shortcut \"<xliff:g id="name" example="Browser">%s</xliff:g>\" already exists.</string>
-
- <!-- Title of dialog when user is selecting shortcut to add to homescreen -->
- <string name="title_select_shortcut">Choose shortcut</string>
- <!-- Title of dialog when user is selecting an application to add to homescreen -->
- <string name="title_select_application">Choose app</string>
<!-- All applications label -->
<string name="all_apps_button_label">Apps</string>
<!-- Label for button in all applications label to go back home (to the workspace / desktop)
for accessibilty (spoken when the button gets focus). -->
<string name="all_apps_home_button_label">Home</string>
- <!-- Label for trash icon in All Apps. The icon/widget will become completely unavailable on the
- device. [CHAR_LIMIT=30]-->
- <string name="delete_zone_label_all_apps">Uninstall</string>
<!-- Label for delete drop target. [CHAR_LIMIT=20] -->
<string name="delete_target_label">Remove</string>
@@ -137,35 +84,6 @@
<!-- Label for the info icon. [CHAR_LIMIT=20] -->
<string name="info_target_label">App info</string>
- <!-- Accessibility: AllApps button -->
- <string name="accessibility_all_apps_button">Apps</string>
- <!-- Accessibility: Delete button -->
- <string name="accessibility_delete_button">Remove</string>
-
- <!-- Label for trash icon in All Apps, when an updated system app is selected. The update will
- be uninstalled. [CHAR_LIMIT=30] -->
- <string name="delete_zone_label_all_apps_system_app">Uninstall update</string>
-
- <!-- URL pointing to help text. If empty, no link to help will be created [DO NOT TRANSLATE] -->
- <string name="help_url" translatable="false"></string>
-
- <!-- Strings for the contextual action bar (CAB) in All Apps -->
- <skip />
- <!-- Describes the button for uninstalling the currently selected application.
- Text is not displayed, but provided for accessibility. [CHAR_LIMIT=none] -->
- <string name="cab_menu_delete_app">Uninstall app</string>
- <!-- Describes the button for getting details/info about currently selected application.
- Text is not displayed, but provided for accessibility. [CHAR_LIMIT=none] -->
- <string name="cab_menu_app_info">App details</string>
- <!-- Appears in the CAB when an app is selected in All Apps or Customize mode. [CHAR_LIMIT=50] -->
- <string name="cab_app_selection_text">1 app selected</string>
- <!-- Appears in the CAB when a widget is selected in Customize mode. [CHAR_LIMIT=50] -->
- <string name="cab_widget_selection_text">1 widget selected</string>
- <!-- Appears in the CAB when a folder is selected in Customize mode. [CHAR_LIMIT=50] -->
- <string name="cab_folder_selection_text">1 folder selected</string>
- <!-- Appears in the CAB when a shortcut is selected in Customize mode. [CHAR_LIMIT=50] -->
- <string name="cab_shortcut_selection_text">1 shortcut selected</string>
-
<!-- Permissions: -->
<skip />
<!-- Permission short label -->
@@ -196,9 +114,6 @@
<!-- Text to inform the user that they can't uninstall a system application -->
<string name="uninstall_system_app_text">This is a system app and can\'t be uninstalled.</string>
- <!-- Title of the Android Dreams (screensaver) module -->
- <string name="dream_name">Rocket Launcher</string>
-
<!-- Default folder title -->
<string name="folder_hint_text">Unnamed Folder</string>
@@ -212,22 +127,10 @@
<string name="default_scroll_format">Page %1$d of %2$d</string>
<!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
<string name="workspace_scroll_format">Home screen %1$d of %2$d</string>
- <!-- The format string for AppsCustomize Apps page scroll text [CHAR_LIMIT=none] -->
- <string name="apps_customize_apps_scroll_format">Apps page %1$d of %2$d</string>
- <!-- The format string for AppsCustomize Apps page scroll text [CHAR_LIMIT=none] -->
- <string name="apps_customize_widgets_scroll_format">Widgets page %1$d of %2$d</string>
<!-- Clings -->
<!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
<string name="first_run_cling_title">Welcome</string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
- <string name="first_run_cling_description">Make yourself at home.</string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
- <string name="first_run_cling_custom_content_hint"></string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
- <string name="first_run_cling_search_bar_hint"></string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
- <string name="first_run_cling_create_screens_hint">Create more screens for apps and folders</string>
<!-- The title text for the migration cling [CHAR_LIMIT=30] -->
<string name="migration_cling_title">Copy your app icons</string>
<!-- The description of what migration does [CHAR_LIMIT=70] -->
@@ -236,24 +139,14 @@
<string name="migration_cling_copy_apps">COPY ICONS</string>
<!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
<string name="migration_cling_use_default">START FRESH</string>
- <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
- <string name="workspace_cling_title">Organize your space</string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
- <string name="workspace_cling_move_item">Touch & hold background to manage wallpaper, widgets and settings.</string>
<!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
<string name="workspace_cling_longpress_title">Wallpapers, widgets, & settings</string>
<!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
<string name="workspace_cling_longpress_description">Touch & hold background to customize</string>
<!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
<string name="workspace_cling_longpress_dismiss">GOT IT</string>
- <!-- The title text for the Folder cling [CHAR_LIMIT=30] -->
- <string name="folder_cling_title">Here\'s a folder</string>
- <!-- The description of how to create a folder [CHAR_LIMIT=70] -->
- <string name="folder_cling_create_folder">To create one like this, touch & hold an app, then move it over another.</string>
<!-- The text on the button to dismiss a cling [CHAR_LIMIT=30] -->
<string name="cling_dismiss">OK</string>
- <!-- Error message on dummy custom cling layout [DO NOT TRANSLATE] -->
- <string name="dummy_custom_cling_error_message">Error: custom workspace layout passed in but custom cling was not overwritten</string>
<!-- Folder accessibility -->
<!-- The format string for when a folder is opened, speaks the dimensions -->
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index fb49df5..ee8710c 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -16,14 +16,16 @@
package com.android.launcher3;
+import android.animation.ObjectAnimator;
+import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
-import android.content.res.Resources;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable;
+import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
@@ -42,8 +44,6 @@
private static int DRAG_VIEW_DROP_DURATION = 285;
- protected final int mTransitionDuration;
-
protected Launcher mLauncher;
private int mBottomDragPadding;
protected TextView mText;
@@ -58,16 +58,15 @@
protected ColorStateList mOriginalTextColor;
protected TransitionDrawable mDrawable;
+ private ObjectAnimator mCurrentColorAnim;
+
public ButtonDropTarget(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ButtonDropTarget(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
-
- Resources r = getResources();
- mTransitionDuration = r.getInteger(R.integer.config_dropTargetBgTransitionDuration);
- mBottomDragPadding = r.getDimensionPixelSize(R.dimen.drop_target_drag_padding);
+ mBottomDragPadding = getResources().getDimensionPixelSize(R.dimen.drop_target_drag_padding);
}
@Override
@@ -123,8 +122,13 @@
@Override
public final void onDragEnter(DragObject d) {
d.dragView.setColor(mHoverColor);
- mDrawable.startTransition(mTransitionDuration);
- setTextColor(mHoverColor);
+ if (Utilities.isLmpOrAbove()) {
+ mDrawable.startTransition(DragView.COLOR_CHANGE_DURATION);
+ animateTextColor(mHoverColor);
+ } else {
+ mDrawable.startTransition(0);
+ setTextColor(mHoverColor);
+ }
}
@Override
@@ -133,8 +137,23 @@
}
protected void resetHoverColor() {
- mDrawable.resetTransition();
- setTextColor(mOriginalTextColor);
+ if (Utilities.isLmpOrAbove()) {
+ mDrawable.reverseTransition(DragView.COLOR_CHANGE_DURATION);
+ animateTextColor(mOriginalTextColor.getDefaultColor());
+ } else {
+ mDrawable.resetTransition();
+ setTextColor(mOriginalTextColor);
+ }
+ }
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ private void animateTextColor(int targetColor) {
+ if (mCurrentColorAnim != null) {
+ mCurrentColorAnim.cancel();
+ }
+ mCurrentColorAnim = ObjectAnimator.ofArgb(this, "textColor", targetColor);
+ mCurrentColorAnim.setDuration(DragView.COLOR_CHANGE_DURATION);
+ mCurrentColorAnim.start();
}
@Override
@@ -152,6 +171,10 @@
public final void onDragStart(DragSource source, Object info, int dragAction) {
mActive = supportsDrop(source, info);
mDrawable.resetTransition();
+ if (mCurrentColorAnim != null) {
+ mCurrentColorAnim.cancel();
+ mCurrentColorAnim = null;
+ }
setTextColor(mOriginalTextColor);
((ViewGroup) getParent()).setVisibility(mActive ? View.VISIBLE : View.GONE);
}
@@ -271,4 +294,8 @@
LauncherAppState.getInstance().getAccessibilityDelegate()
.handleAccessibleDrop(this, null, getAccessibilityDropConfirmation());
}
+
+ public int getTextColor() {
+ return getTextColors().getDefaultColor();
+ }
}
diff --git a/src/com/android/launcher3/DragView.java b/src/com/android/launcher3/DragView.java
index b1a6266..a4b6704 100644
--- a/src/com/android/launcher3/DragView.java
+++ b/src/com/android/launcher3/DragView.java
@@ -16,22 +16,30 @@
package com.android.launcher3;
+import android.animation.FloatArrayEvaluator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
+import android.annotation.TargetApi;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.ColorMatrix;
+import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.Point;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
+import android.os.Build;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
import com.android.launcher3.util.Thunk;
+import java.util.Arrays;
+
public class DragView extends View {
+ public static int COLOR_CHANGE_DURATION = 200;
+
@Thunk static float sDragAlpha = 1f;
private Bitmap mBitmap;
@@ -54,6 +62,9 @@
// size. This is ignored for non-icons.
private float mIntrinsicIconScale = 1f;
+ private float[] mCurrentFilter;
+ private ValueAnimator mFilterAnimator;
+
/**
* Construct the drag view.
* <p>
@@ -229,11 +240,50 @@
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
if (color != 0) {
- mPaint.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP));
+ ColorMatrix m1 = new ColorMatrix();
+ m1.setSaturation(0);
+
+ ColorMatrix m2 = new ColorMatrix();
+ m2.setScale(Color.red(color) / 255f, Color.green(color) / 255f,
+ Color.blue(color) / 255f, Color.alpha(color) / 255f);
+ m1.postConcat(m2);
+
+ if (Utilities.isLmpOrAbove()) {
+ animateFilterTo(m1.getArray());
+ } else {
+ mPaint.setColorFilter(new ColorMatrixColorFilter(m1));
+ invalidate();
+ }
} else {
- mPaint.setColorFilter(null);
+ if (!Utilities.isLmpOrAbove() || mCurrentFilter == null) {
+ mPaint.setColorFilter(null);
+ invalidate();
+ } else {
+ animateFilterTo(new ColorMatrix().getArray());
+ }
}
- invalidate();
+ }
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ private void animateFilterTo(float[] targetFilter) {
+ float[] oldFilter = mCurrentFilter == null ? new ColorMatrix().getArray() : mCurrentFilter;
+ mCurrentFilter = Arrays.copyOf(oldFilter, oldFilter.length);
+
+ if (mFilterAnimator != null) {
+ mFilterAnimator.cancel();
+ }
+ mFilterAnimator = ValueAnimator.ofObject(new FloatArrayEvaluator(mCurrentFilter),
+ oldFilter, targetFilter);
+ mFilterAnimator.setDuration(COLOR_CHANGE_DURATION);
+ mFilterAnimator.addUpdateListener(new AnimatorUpdateListener() {
+
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ mPaint.setColorFilter(new ColorMatrixColorFilter(mCurrentFilter));
+ invalidate();
+ }
+ });
+ mFilterAnimator.start();
}
public boolean hasDrawn() {
@@ -301,4 +351,3 @@
}
}
}
-
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 8c920f0..8258984 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3546,9 +3546,9 @@
text.clear();
// Populate event with a fake title based on the current state.
if (mState == State.APPS) {
- text.add("Apps");
+ text.add(getString(R.string.all_apps_button_label));
} else if (mState == State.WIDGETS) {
- text.add("Widgets");
+ text.add(getString(R.string.widget_button_text));
} else {
text.add(getString(R.string.all_apps_home_button_label));
}
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index 064f436..92bbb40 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -88,11 +88,6 @@
/** widgets contain previews, which are very large, dribble them out */
private static final int MAX_WIDGETS_PER_PASS = 5;
- private static final int IMAGE_COMPRESSION_QUALITY = 75;
-
- private static final Bitmap.CompressFormat IMAGE_FORMAT =
- android.graphics.Bitmap.CompressFormat.PNG;
-
private static final String[] FAVORITE_PROJECTION = {
Favorites._ID, // 0
Favorites.MODIFIED, // 1
@@ -969,10 +964,7 @@
private Resource packIcon(int dpi, Bitmap icon) {
Resource res = new Resource();
res.dpi = dpi;
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- if (icon.compress(IMAGE_FORMAT, IMAGE_COMPRESSION_QUALITY, os)) {
- res.data = os.toByteArray();
- }
+ res.data = Utilities.flattenBitmap(icon);
return res;
}
@@ -990,20 +982,14 @@
widget.icon = new Resource();
Drawable fullResIcon = iconCache.getFullResIcon(provider.getPackageName(), info.icon);
Bitmap icon = Utilities.createIconBitmap(fullResIcon, mContext);
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- if (icon.compress(IMAGE_FORMAT, IMAGE_COMPRESSION_QUALITY, os)) {
- widget.icon.data = os.toByteArray();
- widget.icon.dpi = dpi;
- }
+ widget.icon.data = Utilities.flattenBitmap(icon);
+ widget.icon.dpi = dpi;
}
if (info.previewImage != 0) {
widget.preview = new Resource();
Bitmap preview = previewLoader.generateWidgetPreview(info, previewWidth, null);
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- if (preview.compress(IMAGE_FORMAT, IMAGE_COMPRESSION_QUALITY, os)) {
- widget.preview.data = os.toByteArray();
- widget.preview.dpi = dpi;
- }
+ widget.preview.data = Utilities.flattenBitmap(preview);
+ widget.preview.dpi = dpi;
}
return widget;
}
diff --git a/src/com/android/launcher3/UninstallDropTarget.java b/src/com/android/launcher3/UninstallDropTarget.java
index 4c52d7e..c351135 100644
--- a/src/com/android/launcher3/UninstallDropTarget.java
+++ b/src/com/android/launcher3/UninstallDropTarget.java
@@ -26,7 +26,7 @@
protected void onFinishInflate() {
super.onFinishInflate();
// Get the hover color
- mHoverColor = getResources().getColor(R.color.delete_target_hover_tint);
+ mHoverColor = getResources().getColor(R.color.uninstall_target_hover_tint);
setDrawable(R.drawable.uninstall_target_selector);
}