Applying the widget resize changes even when the activity is destroyed

in the middle of the resize interaction.

Bug: 64759853
Change-Id: I65ab7df0426f36fe1121bf055e38fc722822b0f4
This commit is contained in:
Sunny Goyal
2017-08-18 02:05:01 -07:00
parent c56e3ff2ee
commit 988ad27be4
2 changed files with 5 additions and 8 deletions

View File

@@ -55,7 +55,6 @@ public class AppWidgetResizeFrame extends FrameLayout
private final int[] mDirectionVector = new int[2];
private final int[] mLastDirectionVector = new int[2];
private final int[] mTmpPt = new int[2];
private final IntRange mTempRange1 = new IntRange();
private final IntRange mTempRange2 = new IntRange();
@@ -344,13 +343,12 @@ public class AppWidgetResizeFrame extends FrameLayout
return rect;
}
/**
* This is the final step of the resize. Here we save the new widget size and position
* to LauncherModel and animate the resize frame.
*/
public void commitResize() {
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
// We are done with resizing the widget. Save the widget size & position to LauncherModel
resizeWidgetIfNeeded(true);
requestLayout();
}
private void onTouchUp() {