Direct share load cutback - minimal/low-risk version.
Hide loading spinnies and make load time short, since we are no longer ever waiting for ChooserServices, just Shortcuts (and Shortcut ranking).
For T (or possibly QPR) need to rip this out entirely - but for S let's keep it low-risk.
Test: atest ChooserActivityTest
Bug: 185292578, 184168028
Change-Id: I47fbb07721472498aa416708791553fb7332dd94
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 862c900..4857660 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -464,8 +464,8 @@
private static final int SHORTCUT_MANAGER_SHARE_TARGET_RESULT_COMPLETED = 5;
private static final int LIST_VIEW_UPDATE_MESSAGE = 6;
- private static final int WATCHDOG_TIMEOUT_MAX_MILLIS = 10000;
- private static final int WATCHDOG_TIMEOUT_MIN_MILLIS = 3000;
+ private static final int WATCHDOG_TIMEOUT_MAX_MILLIS = 1000;
+ private static final int WATCHDOG_TIMEOUT_MIN_MILLIS = 300;
private boolean mMinTimeoutPassed = false;
diff --git a/core/res/res/drawable/chooser_direct_share_icon_placeholder.xml b/core/res/res/drawable/chooser_direct_share_icon_placeholder.xml
index 838cb49..bd8dba8 100644
--- a/core/res/res/drawable/chooser_direct_share_icon_placeholder.xml
+++ b/core/res/res/drawable/chooser_direct_share_icon_placeholder.xml
@@ -26,7 +26,7 @@
<group android:name="background">
<path android:pathData="M0,0 L 64,0 64,64 0,64 z"
- android:fillColor="@color/chooser_gradient_background"/>
+ android:fillColor="@android:color/transparent"/>
</group>
<!-- Gradient starts offscreen so it is not visible in the first frame before start -->
@@ -44,7 +44,7 @@
android:color="@android:color/transparent"
android:offset="0.0" />
<item
- android:color="@color/chooser_gradient_highlight"
+ android:color="@android:color/transparent"
android:offset="0.5" />
<item
android:color="@android:color/transparent"
@@ -58,7 +58,7 @@
shadow. Using clip-path is a more elegant solution but leaves awful jaggies around
the path's shape. -->
<group android:name="cover">
- <path android:fillColor="?attr/colorBackgroundFloating"
+ <path android:fillColor="@android:color/transparent"
android:pathData="M0,0 L64,0 L64,64 L0,64 L0,0 Z M59.0587325,42.453601 C60.3124932,39.2104785 61,35.6855272 61,32 C61,15.9837423 48.0162577,3 32,3 C15.9837423,3 3,15.9837423 3,32 C3,48.0162577 15.9837423,61 32,61 C35.6855272,61 39.2104785,60.3124932 42.453601,59.0587325 C44.3362195,60.2864794 46.5847839,61 49,61 C55.627417,61 61,55.627417 61,49 C61,46.5847839 60.2864794,44.3362195 59.0587325,42.453601 Z"/>
</group>
</vector>