Merge changes from topic "quick-assistance" into ub-launcher3-master
* changes:
[automerger] Fetching assist data only if required by overlay am: b44c6552b3
Fetching assist data only if required by overlay
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index d478d48..55f850c 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -283,7 +283,9 @@
protected void updateProgress(float fraction) {
mCurrentAnimation.setPlayFraction(fraction);
if (mAtomicComponentsController != null) {
- mAtomicComponentsController.setPlayFraction(fraction - mAtomicComponentsStartProgress);
+ // Make sure we don't divide by 0, and have at least a small runway.
+ float start = Math.min(mAtomicComponentsStartProgress, 0.9f);
+ mAtomicComponentsController.setPlayFraction((fraction - start) / (1 - start));
}
maybeUpdateAtomicAnim(mFromState, mToState, fraction);
}
diff --git a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
index 6c712f4..b557119 100644
--- a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
@@ -49,6 +49,7 @@
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -122,6 +123,7 @@
setupAndVerifyContents(item, LauncherAppWidgetHostView.class, info.label);
}
+ @Test @Ignore
public void testUnboundWidget_removed() throws Exception {
LauncherAppWidgetProviderInfo info = findWidgetProvider(false);
LauncherAppWidgetInfo item = createWidgetInfo(info, false);
@@ -176,6 +178,7 @@
LauncherSettings.Favorites.APPWIDGET_ID))));
}
+ @Test @Ignore
public void testPendingWidget_notRestored_removed() throws Exception {
LauncherAppWidgetInfo item = getInvalidWidgetInfo();
item.restoreStatus = LauncherAppWidgetInfo.FLAG_ID_NOT_VALID