Merge "Fix regression which was causing requestLayout in layout pass" into ub-now-porkchop
diff --git a/res/drawable-hdpi/bg_cling1.png b/res/drawable-hdpi/bg_cling1.png
deleted file mode 100644
index 0e15532..0000000
--- a/res/drawable-hdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/bg_cling2.png b/res/drawable-hdpi/bg_cling2.png
deleted file mode 100644
index e65d9a2..0000000
--- a/res/drawable-hdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/bg_cling3.png b/res/drawable-hdpi/bg_cling3.png
deleted file mode 100644
index ea71fbd..0000000
--- a/res/drawable-hdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/bg_cling4.png b/res/drawable-hdpi/bg_cling4.png
deleted file mode 100644
index 9403667..0000000
--- a/res/drawable-hdpi/bg_cling4.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling.9.png b/res/drawable-hdpi/cling.9.png
deleted file mode 100644
index 36fbfc8..0000000
--- a/res/drawable-hdpi/cling.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_arrow_down.png b/res/drawable-hdpi/cling_arrow_down.png
deleted file mode 100644
index 4f521ea..0000000
--- a/res/drawable-hdpi/cling_arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_arrow_left.png b/res/drawable-hdpi/cling_arrow_left.png
deleted file mode 100644
index 13764c9..0000000
--- a/res/drawable-hdpi/cling_arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_arrow_right.png b/res/drawable-hdpi/cling_arrow_right.png
deleted file mode 100644
index be52244..0000000
--- a/res/drawable-hdpi/cling_arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_arrow_up.png b/res/drawable-hdpi/cling_arrow_up.png
deleted file mode 100644
index 83b5b37..0000000
--- a/res/drawable-hdpi/cling_arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_bg.9.png b/res/drawable-hdpi/cling_bg.9.png
new file mode 100644
index 0000000..e173ba5
--- /dev/null
+++ b/res/drawable-hdpi/cling_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/cling_button.9.png b/res/drawable-hdpi/cling_button.9.png
deleted file mode 100644
index e308382..0000000
--- a/res/drawable-hdpi/cling_button.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/cling_button_pressed.9.png b/res/drawable-hdpi/cling_button_pressed.9.png
deleted file mode 100644
index 4f9ca6f..0000000
--- a/res/drawable-hdpi/cling_button_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/bg_cling1.png b/res/drawable-land-hdpi/bg_cling1.png
deleted file mode 100644
index 7123c5c..0000000
--- a/res/drawable-land-hdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/bg_cling2.png b/res/drawable-land-hdpi/bg_cling2.png
deleted file mode 100644
index 889b627..0000000
--- a/res/drawable-land-hdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/bg_cling3.png b/res/drawable-land-hdpi/bg_cling3.png
deleted file mode 100644
index 4ff338c..0000000
--- a/res/drawable-land-hdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/bg_cling1.png b/res/drawable-land-mdpi/bg_cling1.png
deleted file mode 100644
index f5faeb4..0000000
--- a/res/drawable-land-mdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/bg_cling2.png b/res/drawable-land-mdpi/bg_cling2.png
deleted file mode 100644
index 963967d..0000000
--- a/res/drawable-land-mdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/bg_cling3.png b/res/drawable-land-mdpi/bg_cling3.png
deleted file mode 100644
index 921831a..0000000
--- a/res/drawable-land-mdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xhdpi/bg_cling1.png b/res/drawable-land-xhdpi/bg_cling1.png
deleted file mode 100644
index 2282117..0000000
--- a/res/drawable-land-xhdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xhdpi/bg_cling2.png b/res/drawable-land-xhdpi/bg_cling2.png
deleted file mode 100644
index 5243889..0000000
--- a/res/drawable-land-xhdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xhdpi/bg_cling3.png b/res/drawable-land-xhdpi/bg_cling3.png
deleted file mode 100644
index 08475f7..0000000
--- a/res/drawable-land-xhdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xxhdpi/bg_cling1.png b/res/drawable-land-xxhdpi/bg_cling1.png
deleted file mode 100644
index 78943f0..0000000
--- a/res/drawable-land-xxhdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xxhdpi/bg_cling2.png b/res/drawable-land-xxhdpi/bg_cling2.png
deleted file mode 100644
index 98b6568..0000000
--- a/res/drawable-land-xxhdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xxhdpi/bg_cling3.png b/res/drawable-land-xxhdpi/bg_cling3.png
deleted file mode 100644
index e249fe5..0000000
--- a/res/drawable-land-xxhdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_cling1.png b/res/drawable-mdpi/bg_cling1.png
deleted file mode 100644
index f284412..0000000
--- a/res/drawable-mdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_cling2.png b/res/drawable-mdpi/bg_cling2.png
deleted file mode 100644
index 0052dc2..0000000
--- a/res/drawable-mdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_cling3.png b/res/drawable-mdpi/bg_cling3.png
deleted file mode 100644
index fabdf7a..0000000
--- a/res/drawable-mdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_cling4.png b/res/drawable-mdpi/bg_cling4.png
deleted file mode 100644
index 2f152f4d..0000000
--- a/res/drawable-mdpi/bg_cling4.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_cling5.png b/res/drawable-mdpi/bg_cling5.png
deleted file mode 100644
index e094809..0000000
--- a/res/drawable-mdpi/bg_cling5.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling.9.png b/res/drawable-mdpi/cling.9.png
deleted file mode 100644
index 4c0f139..0000000
--- a/res/drawable-mdpi/cling.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_arrow_down.png b/res/drawable-mdpi/cling_arrow_down.png
deleted file mode 100644
index 58e66fb..0000000
--- a/res/drawable-mdpi/cling_arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_arrow_left.png b/res/drawable-mdpi/cling_arrow_left.png
deleted file mode 100644
index 023c717..0000000
--- a/res/drawable-mdpi/cling_arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_arrow_right.png b/res/drawable-mdpi/cling_arrow_right.png
deleted file mode 100644
index cf0eb10..0000000
--- a/res/drawable-mdpi/cling_arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_arrow_up.png b/res/drawable-mdpi/cling_arrow_up.png
deleted file mode 100644
index 9b0e6b7..0000000
--- a/res/drawable-mdpi/cling_arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_bg.9.png b/res/drawable-mdpi/cling_bg.9.png
new file mode 100644
index 0000000..fc49c89
--- /dev/null
+++ b/res/drawable-mdpi/cling_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/cling_button.9.png b/res/drawable-mdpi/cling_button.9.png
deleted file mode 100644
index a0b6f97..0000000
--- a/res/drawable-mdpi/cling_button.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/cling_button_pressed.9.png b/res/drawable-mdpi/cling_button_pressed.9.png
deleted file mode 100644
index 986e669..0000000
--- a/res/drawable-mdpi/cling_button_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/bg_cling1.png b/res/drawable-xhdpi/bg_cling1.png
deleted file mode 100644
index b71351a..0000000
--- a/res/drawable-xhdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/bg_cling2.png b/res/drawable-xhdpi/bg_cling2.png
deleted file mode 100644
index ad78dfe..0000000
--- a/res/drawable-xhdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/bg_cling3.png b/res/drawable-xhdpi/bg_cling3.png
deleted file mode 100644
index ae04195..0000000
--- a/res/drawable-xhdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/bg_cling4.png b/res/drawable-xhdpi/bg_cling4.png
deleted file mode 100644
index f4bb83e..0000000
--- a/res/drawable-xhdpi/bg_cling4.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling.9.png b/res/drawable-xhdpi/cling.9.png
deleted file mode 100644
index 1cb4681..0000000
--- a/res/drawable-xhdpi/cling.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_arrow_down.png b/res/drawable-xhdpi/cling_arrow_down.png
deleted file mode 100644
index ee10933..0000000
--- a/res/drawable-xhdpi/cling_arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_arrow_left.png b/res/drawable-xhdpi/cling_arrow_left.png
deleted file mode 100644
index cffbcf3..0000000
--- a/res/drawable-xhdpi/cling_arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_arrow_right.png b/res/drawable-xhdpi/cling_arrow_right.png
deleted file mode 100644
index d880d67..0000000
--- a/res/drawable-xhdpi/cling_arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_arrow_up.png b/res/drawable-xhdpi/cling_arrow_up.png
deleted file mode 100644
index fd2c60c..0000000
--- a/res/drawable-xhdpi/cling_arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_bg.9.png b/res/drawable-xhdpi/cling_bg.9.png
new file mode 100644
index 0000000..4db356f
--- /dev/null
+++ b/res/drawable-xhdpi/cling_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/cling_button.9.png b/res/drawable-xhdpi/cling_button.9.png
deleted file mode 100644
index 4192563..0000000
--- a/res/drawable-xhdpi/cling_button.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/cling_button_pressed.9.png b/res/drawable-xhdpi/cling_button_pressed.9.png
deleted file mode 100644
index d3ce469..0000000
--- a/res/drawable-xhdpi/cling_button_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling1.png b/res/drawable-xxhdpi/bg_cling1.png
deleted file mode 100644
index 0777856..0000000
--- a/res/drawable-xxhdpi/bg_cling1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling2.png b/res/drawable-xxhdpi/bg_cling2.png
deleted file mode 100644
index 1797a1b..0000000
--- a/res/drawable-xxhdpi/bg_cling2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling3.png b/res/drawable-xxhdpi/bg_cling3.png
deleted file mode 100644
index a87be63..0000000
--- a/res/drawable-xxhdpi/bg_cling3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling4.png b/res/drawable-xxhdpi/bg_cling4.png
deleted file mode 100644
index cabe919..0000000
--- a/res/drawable-xxhdpi/bg_cling4.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling_home.png b/res/drawable-xxhdpi/bg_cling_home.png
deleted file mode 100644
index 1ae93e7..0000000
--- a/res/drawable-xxhdpi/bg_cling_home.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_cling_nakasi3.png b/res/drawable-xxhdpi/bg_cling_nakasi3.png
deleted file mode 100644
index f47236c..0000000
--- a/res/drawable-xxhdpi/bg_cling_nakasi3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling.9.png b/res/drawable-xxhdpi/cling.9.png
deleted file mode 100644
index 7beae03..0000000
--- a/res/drawable-xxhdpi/cling.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_arrow_down.png b/res/drawable-xxhdpi/cling_arrow_down.png
deleted file mode 100644
index 48c4f06..0000000
--- a/res/drawable-xxhdpi/cling_arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_arrow_left.png b/res/drawable-xxhdpi/cling_arrow_left.png
deleted file mode 100644
index 8760d05..0000000
--- a/res/drawable-xxhdpi/cling_arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_arrow_right.png b/res/drawable-xxhdpi/cling_arrow_right.png
deleted file mode 100644
index 356ba17..0000000
--- a/res/drawable-xxhdpi/cling_arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_arrow_up.png b/res/drawable-xxhdpi/cling_arrow_up.png
deleted file mode 100644
index 4cb805f..0000000
--- a/res/drawable-xxhdpi/cling_arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_bg.9.png b/res/drawable-xxhdpi/cling_bg.9.png
new file mode 100644
index 0000000..dc9f69a
--- /dev/null
+++ b/res/drawable-xxhdpi/cling_bg.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_button.9.png b/res/drawable-xxhdpi/cling_button.9.png
deleted file mode 100644
index e412876..0000000
--- a/res/drawable-xxhdpi/cling_button.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/cling_button_pressed.9.png b/res/drawable-xxhdpi/cling_button_pressed.9.png
deleted file mode 100644
index 55e89da..0000000
--- a/res/drawable-xxhdpi/cling_button_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index c812373..8cd8673 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -57,15 +57,6 @@
android:id="@+id/overview_panel"
android:visibility="gone" />
- <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
- that it is still visible during the transition to AllApps and doesn't overlay on
- top of that view. -->
- <com.android.launcher3.ScrimView
- android:id="@+id/cling_scrim"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" />
-
<include layout="@layout/apps_customize_pane"
android:id="@+id/apps_customize_pane"
android:layout_width="match_parent"
diff --git a/res/layout-land/longpress_cling.xml b/res/layout-land/longpress_cling.xml
index ffae0be..d1b30a8 100644
--- a/res/layout-land/longpress_cling.xml
+++ b/res/layout-land/longpress_cling.xml
@@ -1,22 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
android:id="@+id/longpress_cling"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
- <com.android.launcher3.ClearCircleLayout
- android:id="@+id/cling_longpress_hole"
+ <Space
android:layout_width="match_parent"
- android:layout_height="match_parent"
- launcher:holeLocation="page_indicator" />
+ android:layout_height="0dp"
+ android:layout_weight="1" />
<FrameLayout
android:id="@+id/cling_content"
android:layout_width="360dp"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:background="#FF009688"
- android:elevation="6dp" />
+ android:layout_gravity="center_horizontal"
+ android:background="@drawable/cling_bg" />
-</FrameLayout>
\ No newline at end of file
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="2" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-land/migration_cling.xml b/res/layout-land/migration_cling.xml
index cc446fb..4765524 100644
--- a/res/layout-land/migration_cling.xml
+++ b/res/layout-land/migration_cling.xml
@@ -58,7 +58,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="sans-serif-condensed"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_title"
android:textColor="#E1000000"
android:textSize="20sp" />
@@ -68,7 +68,7 @@
android:layout_height="wrap_content"
android:paddingBottom="24dp"
android:text="@string/migration_cling_description"
- android:textColor="#E1000000"
+ android:textColor="#99000000"
android:textSize="16sp" />
<LinearLayout
@@ -76,23 +76,23 @@
android:layout_height="wrap_content" >
<Button
+ android:id="@+id/cling_dismiss_migration_copy_apps"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:fontFamily="sans-serif-condensed"
- android:id="@+id/cling_dismiss_migration_copy_apps"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_copy_apps"
android:textColor="#FFFFFFFF"
android:textSize="14sp" />
<Button
+ android:id="@+id/cling_dismiss_migration_use_default"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:fontFamily="sans-serif-condensed"
- android:id="@+id/cling_dismiss_migration_use_default"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_use_default"
android:textColor="#deFFFFFF"
android:textSize="14sp" />
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 3b9b803..9e98d42 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -65,15 +65,6 @@
android:id="@+id/search_drop_target_bar"
layout="@layout/search_drop_target_bar" />
- <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
- that it is still visible during the transition to AllApps and doesn't overlay on
- top of that view. -->
- <com.android.launcher3.ScrimView
- android:id="@+id/cling_scrim"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" />
-
<!-- This is the search bar voice button proxy view. It allows us to have a larger
touch target than the microphone constrained by the search bar bounds. -->
<com.android.launcher3.DrawableStateProxyView
diff --git a/res/layout-port/longpress_cling.xml b/res/layout-port/longpress_cling.xml
index ec0321f..d0f1ab7 100644
--- a/res/layout-port/longpress_cling.xml
+++ b/res/layout-port/longpress_cling.xml
@@ -5,19 +5,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <com.android.launcher3.ClearCircleLayout
- android:id="@+id/cling_longpress_hole"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- launcher:holeLocation="center_screen" />
-
<FrameLayout
android:id="@+id/cling_content"
- android:layout_width="360dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:background="#FF009688"
- android:elevation="6dp"
- android:tag="slide_from_bottom" />
+ android:layout_gravity="top"
+ android:background="@drawable/cling_bg"
+ android:tag="crop_bg_top_and_sides" />
</FrameLayout>
\ No newline at end of file
diff --git a/res/layout-port/migration_cling.xml b/res/layout-port/migration_cling.xml
index 5251e7b..932a9f4 100644
--- a/res/layout-port/migration_cling.xml
+++ b/res/layout-port/migration_cling.xml
@@ -60,7 +60,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="sans-serif-condensed"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_title"
android:textColor="#E1000000"
android:textSize="20sp" />
@@ -70,7 +70,7 @@
android:layout_height="wrap_content"
android:paddingBottom="24dp"
android:text="@string/migration_cling_description"
- android:textColor="#E1000000"
+ android:textColor="#99000000"
android:textSize="16sp" />
<LinearLayout
@@ -83,7 +83,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:fontFamily="sans-serif-condensed"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_copy_apps"
android:textColor="#FFFFFFFF"
android:textSize="14sp" />
@@ -94,7 +94,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:fontFamily="sans-serif-condensed"
+ android:fontFamily="sans-serif-medium"
android:text="@string/migration_cling_use_default"
android:textColor="#deFFFFFF"
android:textSize="14sp" />
diff --git a/res/layout-sw600dp-port/longpress_cling.xml b/res/layout-sw600dp-port/longpress_cling.xml
index 4b4cf91..090adc5 100644
--- a/res/layout-sw600dp-port/longpress_cling.xml
+++ b/res/layout-sw600dp-port/longpress_cling.xml
@@ -1,23 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
android:id="@+id/longpress_cling"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
- <com.android.launcher3.ClearCircleLayout
- android:id="@+id/cling_longpress_hole"
+ <Space
android:layout_width="match_parent"
- android:layout_height="match_parent"
- launcher:holeLocation="center_screen" />
+ android:layout_height="0dp"
+ android:layout_weight="1" />
<FrameLayout
android:id="@+id/cling_content"
android:layout_width="360dp"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top"
- android:background="#FF009688"
- android:elevation="6dp"
- android:tag="slide_from_top" />
+ android:layout_gravity="center_horizontal"
+ android:background="@drawable/cling_bg" />
-</FrameLayout>
\ No newline at end of file
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="3" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 463a64f..6261541 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -66,15 +66,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
- <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
- that it is still visible during the transition to AllApps and doesn't overlay on
- top of that view. -->
- <com.android.launcher3.ScrimView
- android:id="@+id/cling_scrim"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" />
-
<com.android.launcher3.DrawableStateProxyView
android:id="@+id/voice_button_proxy"
android:layout_width="0dp"
diff --git a/res/layout-sw720dp/longpress_cling.xml b/res/layout-sw720dp/longpress_cling.xml
deleted file mode 100644
index ffae0be..0000000
--- a/res/layout-sw720dp/longpress_cling.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- android:id="@+id/longpress_cling"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <com.android.launcher3.ClearCircleLayout
- android:id="@+id/cling_longpress_hole"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- launcher:holeLocation="page_indicator" />
-
- <FrameLayout
- android:id="@+id/cling_content"
- android:layout_width="360dp"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:background="#FF009688"
- android:elevation="6dp" />
-
-</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml
index c2d399e..bf5f71b 100644
--- a/res/layout/apps_customize_pane.xml
+++ b/res/layout/apps_customize_pane.xml
@@ -49,8 +49,6 @@
android:layout_height="match_parent"
launcher:widgetCountX="@integer/apps_customize_widget_cell_count_x"
launcher:widgetCountY="@integer/apps_customize_widget_cell_count_y"
- launcher:clingFocusedX="@integer/apps_customize_cling_focused_x"
- launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
launcher:maxGap="@dimen/workspace_max_gap"
launcher:pageIndicator="@+id/apps_customize_page_indicator" />
</FrameLayout>
diff --git a/res/layout/longpress_cling_content.xml b/res/layout/longpress_cling_content.xml
index 16bb493..47a8e97 100644
--- a/res/layout/longpress_cling_content.xml
+++ b/res/layout/longpress_cling_content.xml
@@ -3,11 +3,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:padding="48dp" >
+ android:paddingBottom="24dp"
+ android:paddingTop="36dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingLeft="36dp"
+ android:paddingRight="36dp"
android:text="@string/workspace_cling_longpress_title"
android:textColor="#E1000000"
android:textSize="24sp" />
@@ -16,8 +19,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
+ android:paddingLeft="36dp"
+ android:paddingRight="36dp"
android:text="@string/workspace_cling_longpress_description"
- android:textColor="#E1000000"
+ android:textColor="#99000000"
android:textSize="16sp" />
<Button
@@ -26,8 +31,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
- android:layout_marginTop="24dp"
- android:fontFamily="sans-serif-condensed"
+ android:layout_marginRight="12dp"
+ android:layout_marginTop="27dp"
+ android:fontFamily="sans-serif-medium"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:text="@string/workspace_cling_longpress_dismiss"
diff --git a/res/layout/longpress_cling_welcome_content.xml b/res/layout/longpress_cling_welcome_content.xml
index 4b3410b..dd4f8d7 100644
--- a/res/layout/longpress_cling_welcome_content.xml
+++ b/res/layout/longpress_cling_welcome_content.xml
@@ -3,12 +3,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:padding="48dp" >
+ android:paddingBottom="24dp"
+ android:paddingTop="36dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingBottom="16dp"
+ android:layout_marginBottom="8dp"
+ android:paddingLeft="36dp"
+ android:paddingRight="36dp"
android:text="@string/first_run_cling_title"
android:textColor="#E1000000"
android:textSize="34sp" />
@@ -16,7 +19,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="sans-serif-condensed"
+ android:layout_marginBottom="5.3dp"
+ android:fontFamily="sans-serif-medium"
+ android:paddingLeft="36dp"
+ android:paddingRight="36dp"
android:text="@string/workspace_cling_longpress_title"
android:textColor="#E1000000"
android:textSize="20sp" />
@@ -24,8 +30,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingLeft="36dp"
+ android:paddingRight="36dp"
android:text="@string/workspace_cling_longpress_description"
- android:textColor="#E1000000"
+ android:textColor="#99000000"
android:textSize="16sp" />
<Button
@@ -34,8 +42,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
- android:layout_marginTop="24dp"
- android:fontFamily="sans-serif-condensed"
+ android:layout_marginRight="12dp"
+ android:layout_marginTop="27dp"
+ android:fontFamily="sans-serif-medium"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:text="@string/workspace_cling_longpress_dismiss"
diff --git a/res/values-en-sw340dp/dimens.xml b/res/values-en-sw340dp/dimens.xml
deleted file mode 100644
index 96d5304..0000000
--- a/res/values-en-sw340dp/dimens.xml
+++ /dev/null
@@ -1,24 +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.
--->
-
-<resources>
-<!-- Cling -->
- <dimen name="cling_title_text_size">22sp</dimen>
- <dimen name="cling_text_size">16sp</dimen>
- <dimen name="cling_alt_title_text_size">30sp</dimen>
- <dimen name="cling_alt_text_size">16sp</dimen>
- <dimen name="cling_hint_text_size">18sp</dimen>
-</resources>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 07d9279..1b34181 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -23,6 +23,4 @@
<dimen name="apps_customize_tab_bar_height">42dp</dimen>
<integer name="apps_customize_widget_cell_count_x">3</integer>
<integer name="apps_customize_widget_cell_count_y">2</integer>
- <integer name="apps_customize_cling_focused_x">2</integer>
- <integer name="apps_customize_cling_focused_y">1</integer>
</resources>
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
index 7753ab3..c20f57b 100644
--- a/res/values-port/dimens.xml
+++ b/res/values-port/dimens.xml
@@ -16,9 +16,6 @@
<resources>
<!-- AppsCustomize -->
- <integer name="apps_customize_cling_focused_x">1</integer>
- <integer name="apps_customize_cling_focused_y">1</integer>
-
<integer name="apps_customize_widget_cell_count_x">2</integer>
<integer name="apps_customize_widget_cell_count_y">3</integer>
</resources>
diff --git a/res/values-sw340dp-land/dimens.xml b/res/values-sw340dp-land/dimens.xml
deleted file mode 100644
index 7901dc4..0000000
--- a/res/values-sw340dp-land/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 201 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>
-<!-- Clings -->
- <dimen name="folderClingMarginTop">50dp</dimen>
-</resources>
diff --git a/res/values-sw340dp-port/dimens.xml b/res/values-sw340dp-port/dimens.xml
deleted file mode 100644
index e360565..0000000
--- a/res/values-sw340dp-port/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
-<!-- Clings -->
- <dimen name="folderClingMarginTop">70dp</dimen>
-</resources>
diff --git a/res/values-sw600dp/config.xml b/res/values-sw600dp/config.xml
index 2ec2f14..15d5725 100644
--- a/res/values-sw600dp/config.xml
+++ b/res/values-sw600dp/config.xml
@@ -2,9 +2,6 @@
<bool name="is_tablet">true</bool>
<bool name="allow_rotation">true</bool>
- <!-- Whether or not to use custom clings if a custom workspace layout is passed in -->
- <bool name="config_useCustomClings">true</bool>
-
<!-- DragController -->
<integer name="config_flingToDeleteMinVelocity">-1000</integer>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index 433a5d4..ca13db0 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -18,15 +18,8 @@
<!-- AppsCustomize -->
<integer name="apps_customize_widget_cell_count_x">4</integer>
<integer name="apps_customize_widget_cell_count_y">2</integer>
- <integer name="apps_customize_cling_focused_x">4</integer>
- <integer name="apps_customize_cling_focused_y">2</integer>
<!-- the area at the edge of the screen that makes the workspace go left
or right while you're dragging. -->
<dimen name="scroll_zone">100dip</dimen>
-
-<!-- Cling -->
- <!-- The offset for the text in the cling -->
- <dimen name="cling_text_block_offset_x">140dp</dimen>
- <dimen name="cling_text_block_offset_y">80dp</dimen>
</resources>
diff --git a/res/values-sw720dp-port/dimens.xml b/res/values-sw720dp-port/dimens.xml
index 9fe312b..6f594d5 100644
--- a/res/values-sw720dp-port/dimens.xml
+++ b/res/values-sw720dp-port/dimens.xml
@@ -19,12 +19,4 @@
<!-- the area at the edge of the screen that makes the workspace go left
or right while you're dragging. -->
<dimen name="scroll_zone">40dp</dimen>
-
- <integer name="apps_customize_cling_focused_x">2</integer>
- <integer name="apps_customize_cling_focused_y">2</integer>
-
-<!-- Cling -->
- <!-- The offset for the text in the cling -->
- <dimen name="cling_text_block_offset_x">80dp</dimen>
- <dimen name="cling_text_block_offset_y">160dp</dimen>
</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index a2bdafc..65f8f22 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -25,13 +25,6 @@
<attr name="sourceViewId" format="integer" />
</declare-styleable>
- <!-- ClearCircleLayout specific attributes. These attributes are used to customize
- the cling in XML files. -->
- <declare-styleable name="ClearCircleLayout">
- <!-- Used to identify how to draw the cling bg -->
- <attr name="holeLocation" format="string" />
- </declare-styleable>
-
<!-- Page Indicator specific attributes. -->
<declare-styleable name="PageIndicator">
<attr name="windowSize" format="integer" />
@@ -121,10 +114,6 @@
<attr name="widgetCountX" format="integer" />
<!-- Number of widgets vertically -->
<attr name="widgetCountY" format="integer" />
- <!-- The x index of the item to be focused in the cling -->
- <attr name="clingFocusedX" format="integer" />
- <!-- The y index of the item to be focused in the cling -->
- <attr name="clingFocusedY" format="integer" />
</declare-styleable>
<!-- XML attributes used by default_workspace.xml -->
@@ -154,10 +143,4 @@
<attr name="ringOutset" format="dimension" />
<attr name="indicatorSize" format="dimension" />
</declare-styleable>
-
- <!-- Only used in the device overlays -->
- <declare-styleable name="CustomClingTitleText">
- </declare-styleable>
- <declare-styleable name="CustomClingText">
- </declare-styleable>
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 19ae44c..96bd13b 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -93,9 +93,6 @@
<!-- Camera distance for the overscroll effect -->
<integer name="config_cameraDistance">8000</integer>
- <!-- Whether or not to use custom clings if a custom workspace layout is passed in -->
- <bool name="config_useCustomClings">false</bool>
-
<!-- Hotseat -->
<bool name="hotseat_transpose_layout_with_orientation">true</bool>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4fd8fab..befaf37 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -34,22 +34,6 @@
<dimen name="cling_migration_bg_size">400dp</dimen>
<dimen name="cling_migration_bg_shift">-200dp</dimen>
- <dimen name="clingPunchThroughGraphicCenterRadius">94dp</dimen>
- <dimen name="folderClingMarginTop">20dp</dimen>
- <!-- The offset for the text in the cling -->
- <dimen name="cling_text_block_offset_x">0dp</dimen>
- <dimen name="cling_text_block_offset_y">0dp</dimen>
- <!-- entries for custom clings, will be set in overlays -->
- <add-resource type="dimen" name="custom_cling_margin_top" />
- <add-resource type="dimen" name="custom_cling_margin_right" />
- <add-resource type="dimen" name="custom_cling_margin_left" />
-
- <dimen name="cling_title_text_size">20sp</dimen>
- <dimen name="cling_text_size">14sp</dimen>
- <dimen name="cling_alt_title_text_size">24sp</dimen>
- <dimen name="cling_alt_text_size">16sp</dimen>
- <dimen name="cling_hint_text_size">14sp</dimen>
-
<!-- Workspace -->
<dimen name="workspace_max_gap">16dp</dimen>
<dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 77ebc12..82b9819 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -127,10 +127,6 @@
</style>
<!-- Overridden in device overlays -->
- <style name="CustomClingTitleText">
- </style>
- <style name="CustomClingText">
- </style>
<style name="PagedViewWidgetImageView">
<item name="android:paddingLeft">@dimen/app_widget_preview_padding_left</item>
</style>
diff --git a/src/com/android/launcher3/BorderCropDrawable.java b/src/com/android/launcher3/BorderCropDrawable.java
new file mode 100644
index 0000000..caf497d
--- /dev/null
+++ b/src/com/android/launcher3/BorderCropDrawable.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2014 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.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+
+public class BorderCropDrawable extends Drawable {
+
+ private final Drawable mChild;
+ private final Rect mBoundsShift;
+ private final Rect mPadding;
+
+ BorderCropDrawable(Drawable child, boolean cropLeft,
+ boolean cropTop, boolean cropRight, boolean cropBottom) {
+ mChild = child;
+
+ mBoundsShift = new Rect();
+ mPadding = new Rect();
+ mChild.getPadding(mPadding);
+
+ if (cropLeft) {
+ mBoundsShift.left = -mPadding.left;
+ mPadding.left = 0;
+ }
+ if (cropTop) {
+ mBoundsShift.top = -mPadding.top;
+ mPadding.top = 0;
+ }
+ if (cropRight) {
+ mBoundsShift.right = mPadding.right;
+ mPadding.right = 0;
+ }
+ if (cropBottom) {
+ mBoundsShift.bottom = mPadding.bottom;
+ mPadding.bottom = 0;
+ }
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ mChild.setBounds(
+ bounds.left + mBoundsShift.left,
+ bounds.top + mBoundsShift.top,
+ bounds.right + mBoundsShift.right,
+ bounds.bottom + mBoundsShift.bottom);
+ }
+
+ @Override
+ public boolean getPadding(Rect padding) {
+ padding.set(mPadding);
+ return (padding.left | padding.top | padding.right | padding.bottom) != 0;
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ mChild.draw(canvas);
+ }
+
+ @Override
+ public int getOpacity() {
+ return mChild.getOpacity();
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ mChild.setAlpha(alpha);
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ mChild.setColorFilter(cf);
+ }
+}
diff --git a/src/com/android/launcher3/ClearCircleLayout.java b/src/com/android/launcher3/ClearCircleLayout.java
deleted file mode 100644
index e48c84e..0000000
--- a/src/com/android/launcher3/ClearCircleLayout.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2014 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.content.res.TypedArray;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Point;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.Rect;
-import android.util.AttributeSet;
-import android.util.DisplayMetrics;
-import android.view.View;
-
-public class ClearCircleLayout extends View {
-
- private static final String HOLE_LOCATION_PAGE_INDICATOR = "page_indicator";
- private static final String HOLE_LOCATION_CENTER_SCREEN = "center_screen";
-
- private static final int BACKGROUND_COLOR = 0x80000000;
- private static float MIGRATION_WORKSPACE_INNER_CIRCLE_RADIUS_DPS = 42;
- private static float MIGRATION_WORKSPACE_OUTER_CIRCLE_RADIUS_DPS = 46;
-
- private final String mHoleLocation;
- private final Paint mErasePaint;
- private final Paint mBorderPaint;
-
- private Launcher mLauncher;
- private Point mHoleCenter;
- private DisplayMetrics mMetrics;
-
- public ClearCircleLayout(Context context, AttributeSet attrs) {
- super(context, attrs);
-
- TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ClearCircleLayout);
- mHoleLocation = a.getString(R.styleable.ClearCircleLayout_holeLocation);
- a.recycle();
-
- mErasePaint = new Paint();
- mErasePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.MULTIPLY));
- mErasePaint.setColor(0xFFFFFF);
- mErasePaint.setAlpha(0);
- mErasePaint.setAntiAlias(true);
-
- mBorderPaint = new Paint();
- mBorderPaint.setColor(0xFFFFFFFF);
- mBorderPaint.setAntiAlias(true);
- }
-
- void initHole(Launcher launcher) {
- mLauncher = launcher;
- mMetrics = new DisplayMetrics();
- launcher.getWindowManager().getDefaultDisplay().getMetrics(mMetrics);
-
- if (mHoleLocation.endsWith(HOLE_LOCATION_PAGE_INDICATOR)) {
- LauncherAppState app = LauncherAppState.getInstance();
- DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-
- Rect indicator = grid.getWorkspacePageIndicatorBounds(new Rect());
- mHoleCenter = new Point(indicator.centerX(), indicator.centerY());
- } else if (mHoleLocation.endsWith(HOLE_LOCATION_CENTER_SCREEN)) {
- mHoleCenter = new Point(mMetrics.widthPixels / 2, mMetrics.heightPixels / 2);
- }
- }
-
- @Override
- protected void dispatchDraw(Canvas canvas) {
- if (mHoleCenter == null) {
- canvas.drawColor(BACKGROUND_COLOR);
- } else {
- drawHole(canvas);
- }
-
- super.dispatchDraw(canvas);
- }
-
- private void drawHole(Canvas canvas) {
- // Initialize the draw buffer (to allow punching through)
- Bitmap eraseBg = Bitmap.createBitmap(getMeasuredWidth(), getMeasuredHeight(),
- Bitmap.Config.ARGB_8888);
- Canvas eraseCanvas = new Canvas(eraseBg);
- eraseCanvas.drawColor(BACKGROUND_COLOR);
-
- Rect insets = mLauncher.getDragLayer().getInsets();
- float x = mHoleCenter.x - insets.left;
- float y = mHoleCenter.y - insets.top;
- // Draw the outer circle
- eraseCanvas.drawCircle(x, y,
- DynamicGrid.pxFromDp(MIGRATION_WORKSPACE_OUTER_CIRCLE_RADIUS_DPS, mMetrics),
- mBorderPaint);
-
- // Draw the inner circle
- eraseCanvas.drawCircle(x, y,
- DynamicGrid.pxFromDp(MIGRATION_WORKSPACE_INNER_CIRCLE_RADIUS_DPS, mMetrics),
- mErasePaint);
-
- canvas.drawBitmap(eraseBg, 0, 0, null);
- eraseCanvas.setBitmap(null);
- eraseBg.recycle();
- }
-}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index e134d1b..109a771 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -506,7 +506,7 @@
if (mModel.canMigrateFromOldLauncherDb(this)) {
launcherClings.showMigrationCling();
} else {
- launcherClings.showLongPressCling(true);
+ launcherClings.showLongPressCling(false);
}
}
}
@@ -2455,9 +2455,9 @@
/**
* Event handler for the app widget view which has not fully restored.
*/
- public void onClickPendingWidget(PendingAppWidgetHostView v) {
+ public void onClickPendingWidget(final PendingAppWidgetHostView v) {
+ final LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) v.getTag();
if (v.isReadyForClickSetup()) {
- LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) v.getTag();
int widgetId = info.appWidgetId;
AppWidgetProviderInfo appWidgetInfo = mAppWidgetManager.getAppWidgetInfo(widgetId);
if (appWidgetInfo != null) {
@@ -2468,6 +2468,19 @@
AppWidgetManagerCompat.getInstance(this).startConfigActivity(appWidgetInfo,
info.appWidgetId, this, mAppWidgetHost, REQUEST_RECONFIGURE_APPWIDGET);
}
+ } else if (info.installProgress < 0) {
+ // The install has not been queued
+ final String packageName = info.providerName.getPackageName();
+ showBrokenAppInstallDialog(packageName,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ startActivitySafely(v, LauncherModel.getMarketIntent(packageName), info);
+ }
+ });
+ } else {
+ // Download has started.
+ final String packageName = info.providerName.getPackageName();
+ startActivitySafely(v, LauncherModel.getMarketIntent(packageName), info);
}
}
@@ -2526,6 +2539,23 @@
}
}
+ private void showBrokenAppInstallDialog(final String packageName,
+ DialogInterface.OnClickListener onSearchClickListener) {
+ new AlertDialog.Builder(this)
+ .setTitle(R.string.abandoned_promises_title)
+ .setMessage(R.string.abandoned_promise_explanation)
+ .setPositiveButton(R.string.abandoned_search, onSearchClickListener)
+ .setNeutralButton(R.string.abandoned_clean_this,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ final UserHandleCompat user = UserHandleCompat.myUserHandle();
+ mWorkspace.removeAbandonedPromise(packageName, user);
+ }
+ })
+ .create().show();
+ return;
+ }
+
/**
* Event handler for an app shortcut click.
*
@@ -2557,25 +2587,13 @@
// Check for abandoned promise
if (shortcut.isAbandoned() && v instanceof BubbleTextView) {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(R.string.abandoned_promises_title);
- builder.setMessage(R.string.abandoned_promise_explanation);
- builder.setPositiveButton(R.string.abandoned_search,
+ showBrokenAppInstallDialog(
+ shortcut.getRestoredIntent().getComponent().getPackageName(),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
startAppShortcutOrInfoActivity(v);
}
- }
- );
- builder.setNeutralButton(R.string.abandoned_clean_this,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- final BubbleTextView bubble = (BubbleTextView) v;
- final UserHandleCompat user = UserHandleCompat.myUserHandle();
- mWorkspace.removeAbandonedPromise(bubble, user);
- }
});
- builder.create().show();
return;
}
diff --git a/src/com/android/launcher3/LauncherAppWidgetInfo.java b/src/com/android/launcher3/LauncherAppWidgetInfo.java
index 4755482..50528b1 100644
--- a/src/com/android/launcher3/LauncherAppWidgetInfo.java
+++ b/src/com/android/launcher3/LauncherAppWidgetInfo.java
@@ -70,7 +70,7 @@
/**
* Indicates the installation progress of the widget provider
*/
- int installProgress;
+ int installProgress = -1;
private boolean mHasNotifiedInitialWidgetSizeChanged;
diff --git a/src/com/android/launcher3/LauncherClings.java b/src/com/android/launcher3/LauncherClings.java
index 840fb52..458d81f 100644
--- a/src/com/android/launcher3/LauncherClings.java
+++ b/src/com/android/launcher3/LauncherClings.java
@@ -18,13 +18,12 @@
import android.accounts.Account;
import android.accounts.AccountManager;
-import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
-import android.animation.ValueAnimator;
import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.UserManager;
import android.provider.Settings;
@@ -41,8 +40,7 @@
private static final String MIGRATION_CLING_DISMISSED_KEY = "cling_gel.migration.dismissed";
private static final String WORKSPACE_CLING_DISMISSED_KEY = "cling_gel.workspace.dismissed";
- private static final String ANIM_SLIDE_FROM_BOTTOM = "slide_from_bottom";
- private static final String ANIM_SLIDE_FROM_TOP = "slide_from_top";
+ private static final String TAG_CROP_TOP_AND_SIDES = "crop_bg_top_and_sides";
private static final boolean DISABLE_CLINGS = false;
@@ -124,10 +122,7 @@
ViewGroup root = (ViewGroup) mLauncher.findViewById(R.id.launcher);
View cling = mInflater.inflate(R.layout.longpress_cling, root, false);
- final ClearCircleLayout hole = (ClearCircleLayout) cling.findViewById(R.id.cling_longpress_hole);
- hole.initHole(mLauncher);
- hole.setClickable(true);
- hole.setOnLongClickListener(new OnLongClickListener() {
+ cling.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
@@ -142,6 +137,12 @@
: R.layout.longpress_cling_content, content);
content.findViewById(R.id.cling_dismiss_longpress_info).setOnClickListener(this);
+ if (TAG_CROP_TOP_AND_SIDES.equals(content.getTag())) {
+ Drawable bg = new BorderCropDrawable(mLauncher.getResources().getDrawable(R.drawable.cling_bg),
+ true, true, true, false);
+ content.setBackground(bg);
+ }
+
root.addView(cling);
if (showWelcome) {
@@ -156,29 +157,20 @@
public void onGlobalLayout() {
content.getViewTreeObserver().removeOnGlobalLayoutListener(this);
- hole.setAlpha(0);
- ValueAnimator anim1 = LauncherAnimUtils.ofFloat(hole, "alpha", 1);
-
- ObjectAnimator anim2;
-
- if (ANIM_SLIDE_FROM_TOP.equals(content.getTag())) {
+ ObjectAnimator anim;
+ if (TAG_CROP_TOP_AND_SIDES.equals(content.getTag())) {
content.setTranslationY(-content.getMeasuredHeight());
- anim2 = LauncherAnimUtils.ofFloat(content, "translationY", 0);
- } else if (ANIM_SLIDE_FROM_BOTTOM.equals(content.getTag())) {
- content.setTranslationY(content.getMeasuredHeight());
- anim2 = LauncherAnimUtils.ofFloat(content, "translationY", 0);
+ anim = LauncherAnimUtils.ofFloat(content, "translationY", 0);
} else {
content.setScaleX(0);
content.setScaleY(0);
PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat("scaleX", 1);
PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat("scaleY", 1);
- anim2 = LauncherAnimUtils.ofPropertyValuesHolder(content, scaleX, scaleY);
+ anim = LauncherAnimUtils.ofPropertyValuesHolder(content, scaleX, scaleY);
}
- AnimatorSet anim = LauncherAnimUtils.createAnimatorSet();
anim.setDuration(SHOW_CLING_DURATION);
anim.setInterpolator(new LogDecelerateInterpolator(100, 0));
- anim.playTogether(anim1, anim2);
anim.start();
}
});
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index bcb4501..5e8e2ad 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1078,44 +1078,72 @@
}
/**
+ * Removes all the items from the database corresponding to the specified package.
+ */
+ static void deletePackageFromDatabase(Context context, final String pn,
+ final UserHandleCompat user) {
+ ItemInfoFilter filter = new ItemInfoFilter() {
+ @Override
+ public boolean filterItem(ItemInfo parent, ItemInfo info, ComponentName cn) {
+ return cn.getPackageName().equals(pn) && info.user.equals(user);
+ }
+ };
+ ArrayList<ItemInfo> infos = filterItemInfos(sBgItemsIdMap.values(), filter);
+ deleteItemsFromDatabase(context, infos);
+ }
+
+ /**
* Removes the specified item from the database
* @param context
* @param item
*/
static void deleteItemFromDatabase(Context context, final ItemInfo item) {
+ ArrayList<ItemInfo> items = new ArrayList<ItemInfo>();
+ items.add(item);
+ deleteItemsFromDatabase(context, items);
+ }
+
+ /**
+ * Removes the specified items from the database
+ * @param context
+ * @param item
+ */
+ static void deleteItemsFromDatabase(Context context, final ArrayList<ItemInfo> items) {
final ContentResolver cr = context.getContentResolver();
- final Uri uriToDelete = LauncherSettings.Favorites.getContentUri(item.id, false);
Runnable r = new Runnable() {
public void run() {
- cr.delete(uriToDelete, null, null);
+ for (ItemInfo item : items) {
+ final Uri uri = LauncherSettings.Favorites.getContentUri(item.id, false);
+ cr.delete(uri, null, null);
- // Lock on mBgLock *after* the db operation
- synchronized (sBgLock) {
- switch (item.itemType) {
- case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
- sBgFolders.remove(item.id);
- for (ItemInfo info: sBgItemsIdMap.values()) {
- if (info.container == item.id) {
- // We are deleting a folder which still contains items that
- // think they are contained by that folder.
- String msg = "deleting a folder (" + item + ") which still " +
- "contains items (" + info + ")";
- Log.e(TAG, msg);
+ // Lock on mBgLock *after* the db operation
+ synchronized (sBgLock) {
+ switch (item.itemType) {
+ case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
+ sBgFolders.remove(item.id);
+ for (ItemInfo info: sBgItemsIdMap.values()) {
+ if (info.container == item.id) {
+ // We are deleting a folder which still contains items that
+ // think they are contained by that folder.
+ String msg = "deleting a folder (" + item + ") which still " +
+ "contains items (" + info + ")";
+ Log.e(TAG, msg);
+ }
}
- }
- sBgWorkspaceItems.remove(item);
- break;
- case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
- case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
- sBgWorkspaceItems.remove(item);
- break;
- case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
- sBgAppWidgets.remove((LauncherAppWidgetInfo) item);
- break;
+ sBgWorkspaceItems.remove(item);
+ break;
+ case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
+ case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
+ sBgWorkspaceItems.remove(item);
+ break;
+ case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
+ sBgAppWidgets.remove((LauncherAppWidgetInfo) item);
+ break;
+ }
+ sBgItemsIdMap.remove(item.id);
+ sBgDbIconCache.remove(item);
}
- sBgItemsIdMap.remove(item.id);
- sBgDbIconCache.remove(item);
}
}
};
@@ -2982,17 +3010,12 @@
}
// Remove all the components associated with this package
for (String pn : removedPackageNames) {
- ArrayList<ItemInfo> infos = getItemInfoForPackageName(pn, mUser);
- for (ItemInfo i : infos) {
- deleteItemFromDatabase(context, i);
- }
+ deletePackageFromDatabase(context, pn, mUser);
}
// Remove all the specific components
for (AppInfo a : removedApps) {
ArrayList<ItemInfo> infos = getItemInfoForComponentName(a.componentName, mUser);
- for (ItemInfo i : infos) {
- deleteItemFromDatabase(context, i);
- }
+ deleteItemsFromDatabase(context, infos);
}
if (!removedPackageNames.isEmpty() || !removedApps.isEmpty()) {
// Remove any queued items from the install queue
@@ -3101,17 +3124,17 @@
* to the market page for the item.
*/
private Intent getRestoredItemIntent(Cursor c, Context context, Intent intent) {
- final boolean debug = false;
ComponentName componentName = intent.getComponent();
- Intent marketIntent = new Intent(Intent.ACTION_VIEW);
- Uri marketUri = new Uri.Builder()
+ return getMarketIntent(componentName.getPackageName());
+ }
+
+ static Intent getMarketIntent(String packageName) {
+ return new Intent(Intent.ACTION_VIEW)
+ .setData(new Uri.Builder()
.scheme("market")
.authority("details")
- .appendQueryParameter("id", componentName.getPackageName())
- .build();
- if (debug) Log.d(TAG, "manufactured intent uri: " + marketUri.toString());
- marketIntent.setData(marketUri);
- return marketIntent;
+ .appendQueryParameter("id", packageName)
+ .build());
}
/**
@@ -3236,17 +3259,6 @@
return new ArrayList<ItemInfo>(filtered);
}
- private ArrayList<ItemInfo> getItemInfoForPackageName(final String pn,
- final UserHandleCompat user) {
- ItemInfoFilter filter = new ItemInfoFilter() {
- @Override
- public boolean filterItem(ItemInfo parent, ItemInfo info, ComponentName cn) {
- return cn.getPackageName().equals(pn) && info.user.equals(user);
- }
- };
- return filterItemInfos(sBgItemsIdMap.values(), filter);
- }
-
private ArrayList<ItemInfo> getItemInfoForComponentName(final ComponentName cname,
final UserHandleCompat user) {
ItemInfoFilter filter = new ItemInfoFilter() {
diff --git a/src/com/android/launcher3/PendingAppWidgetHostView.java b/src/com/android/launcher3/PendingAppWidgetHostView.java
index 0401436..d23a330 100644
--- a/src/com/android/launcher3/PendingAppWidgetHostView.java
+++ b/src/com/android/launcher3/PendingAppWidgetHostView.java
@@ -24,6 +24,10 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.text.Layout;
+import android.text.StaticLayout;
+import android.text.TextPaint;
+import android.util.TypedValue;
import android.view.View;
import android.view.View.OnClickListener;
@@ -46,12 +50,19 @@
private boolean mDrawableSizeChanged;
+ private final TextPaint mPaint;
+ private Layout mSetupTextLayout;
+
public PendingAppWidgetHostView(Context context, LauncherAppWidgetInfo info) {
super(context);
mInfo = info;
mStartState = info.restoreStatus;
mIconLookupIntent = new Intent().setComponent(info.providerName);
+ mPaint = new TextPaint();
+ mPaint.setColor(0xFFFFFFFF);
+ mPaint.setTextSize(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX,
+ getDeviceProfile().iconTextSizePx, getResources().getDisplayMetrics()));
setBackgroundResource(R.drawable.quantum_panel_dark);
setWillNotDraw(false);
}
@@ -127,7 +138,7 @@
public void applyState() {
if (mDrawable != null) {
- mDrawable.setLevel(mInfo.installProgress);
+ mDrawable.setLevel(Math.max(mInfo.installProgress, 0));
}
}
@@ -165,27 +176,66 @@
mDrawable.draw(canvas);
} else if ((mCenterDrawable != null) && (mTopCornerDrawable != null)) {
if (mDrawableSizeChanged) {
- int iconSize = getResources().getDimensionPixelSize(R.dimen.app_icon_size);
+ DeviceProfile grid = getDeviceProfile();
+ int iconSize = grid.iconSizePx;
int paddingTop = getPaddingTop();
+ int paddingBottom = getPaddingBottom();
int paddingLeft = getPaddingLeft();
+ int paddingRight = getPaddingRight();
- int size = Math.min(iconSize, Math.min(
- getWidth() - paddingLeft - getPaddingRight(),
- getHeight() - paddingTop - getPaddingBottom()));
- mRect.set(0, 0, size, size);
- mRect.offsetTo((getWidth() - mRect.width()) / 2, (getHeight() - mRect.height()) / 2);
- mCenterDrawable.setBounds(mRect);
+ int availableWidth = getWidth() - paddingLeft - paddingRight;
+ int availableHeight = getHeight() - paddingTop - paddingBottom;
- size = Math.min(size / 2,
- Math.max(mRect.top - paddingTop, mRect.left - paddingLeft));
- mTopCornerDrawable.setBounds(paddingLeft, paddingTop,
- paddingLeft + size, paddingTop + size);
+ // Recreate the setup text.
+ mSetupTextLayout = new StaticLayout(
+ getResources().getText(R.string.gadget_setup_text), mPaint, availableWidth,
+ Layout.Alignment.ALIGN_CENTER, 1, 0, true);
+ if (mSetupTextLayout.getLineCount() == 1) {
+ // The text fits in a single line. No need to draw the setup icon.
+ int size = Math.min(iconSize, Math.min(availableWidth,
+ availableHeight - mSetupTextLayout.getHeight()));
+ mRect.set(0, 0, size, size);
+ mRect.offsetTo((getWidth() - mRect.width()) / 2,
+ (getHeight() - mRect.height() - mSetupTextLayout.getHeight()
+ - grid.iconDrawablePaddingPx) / 2);
+
+ mTopCornerDrawable.setBounds(mRect);
+
+ // Update left and top to indicate the position where the text will be drawn.
+ mRect.left = paddingLeft;
+ mRect.top = mRect.bottom + grid.iconDrawablePaddingPx;
+ } else {
+ // The text can't be drawn in a single line. Draw a setup icon instead.
+ mSetupTextLayout = null;
+ int size = Math.min(iconSize, Math.min(
+ getWidth() - paddingLeft - paddingRight,
+ getHeight() - paddingTop - paddingBottom));
+ mRect.set(0, 0, size, size);
+ mRect.offsetTo((getWidth() - mRect.width()) / 2, (getHeight() - mRect.height()) / 2);
+ mCenterDrawable.setBounds(mRect);
+
+ size = Math.min(size / 2,
+ Math.max(mRect.top - paddingTop, mRect.left - paddingLeft));
+ mTopCornerDrawable.setBounds(paddingLeft, paddingTop,
+ paddingLeft + size, paddingTop + size);
+ }
mDrawableSizeChanged = false;
}
- mCenterDrawable.draw(canvas);
- mTopCornerDrawable.draw(canvas);
+ if (mSetupTextLayout == null) {
+ mCenterDrawable.draw(canvas);
+ mTopCornerDrawable.draw(canvas);
+ } else {
+ canvas.save();
+ canvas.translate(mRect.left, mRect.top);
+ mSetupTextLayout.draw(canvas);
+ canvas.restore();
+ mTopCornerDrawable.draw(canvas);
+ }
}
}
+ private DeviceProfile getDeviceProfile() {
+ return LauncherAppState.getInstance().getDynamicGrid().getDeviceProfile();
+ }
}
diff --git a/src/com/android/launcher3/ScrimView.java b/src/com/android/launcher3/ScrimView.java
deleted file mode 100644
index 68200fe..0000000
--- a/src/com/android/launcher3/ScrimView.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2011 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.graphics.Rect;
-import android.util.AttributeSet;
-import android.widget.FrameLayout;
-
-public class ScrimView extends FrameLayout implements Insettable {
-
- public ScrimView(Context context) {
- this(context, null, 0);
- }
-
- public ScrimView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public ScrimView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- }
-
- @Override
- public void setInsets(Rect insets) {
- // Do nothing
- }
-}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 8661251..9d97306 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -4847,16 +4847,11 @@
restorePendingWidgets(pkgNames);
}
- public void removeAbandonedPromise(BubbleTextView abandonedIcon, UserHandleCompat user) {
- if (abandonedIcon.getTag() != null && abandonedIcon.getTag() instanceof ShortcutInfo) {
- final ShortcutInfo shortcut = (ShortcutInfo) abandonedIcon.getTag();
- if (shortcut.isAbandoned()) {
- HashSet<ComponentName> cns = new HashSet<ComponentName>(1);
- cns.add(shortcut.getRestoredIntent().getComponent());
- LauncherModel.deleteItemFromDatabase(mLauncher, shortcut);
- removeItemsByComponentName(cns, user);
- }
- }
+ public void removeAbandonedPromise(String packageName, UserHandleCompat user) {
+ ArrayList<String> packages = new ArrayList<String>(1);
+ packages.add(packageName);
+ LauncherModel.deletePackageFromDatabase(mLauncher, packageName, user);
+ removeItemsByPackageName(packages, user);
}
public void updatePackageState(ArrayList<PackageInstallInfo> installInfos) {