Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9dadbdd authored by Sunny Goyal's avatar Sunny Goyal
Browse files

[automerger] Applying the widget resize changes even when the activity is...

[automerger] Applying the widget resize changes even when the activity is destroyed in the middle of the resize interaction. am: 988ad27b

Change-Id: I39f49270679cccc93a84259a90e24925df77d9a3
parents 4ec0d61e 988ad27b
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -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() {
+0 −1
Original line number Diff line number Diff line
@@ -544,7 +544,6 @@ public class DragLayer extends InsettableFrameLayout {

    public void clearResizeFrame() {
        if (mCurrentResizeFrame != null) {
            mCurrentResizeFrame.commitResize();
            removeView(mCurrentResizeFrame);
            mCurrentResizeFrame = null;
        }