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

Commit 9df717de authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Fixed issue with not force resizing a task when drag ends."

parents be2d7cdb 04ad7b14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3091,7 +3091,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
        Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "am.resizeTask_" + task.taskId);

        final Configuration overrideConfig =  task.updateOverrideConfiguration(bounds);
        // This variable holds information whether the configuration didn't change in a signficant
        // This variable holds information whether the configuration didn't change in a significant
        // way and the activity was kept the way it was. If it's false, it means the activity had
        // to be relaunched due to configuration change.
        boolean kept = true;
+13 −7
Original line number Diff line number Diff line
@@ -146,13 +146,18 @@ class TaskPositioner implements DimLayer.DimLayerUser {
                        }
                        synchronized (mService.mWindowMap) {
                            mDragEnded = notifyMoveLocked(newX, newY);
                            mTask.getBounds(mTmpRect);
                        }
                        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "wm.TaskPositioner.resizeTask");
                        if (!mTmpRect.equals(mWindowDragBounds)) {
                            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER,
                                    "wm.TaskPositioner.resizeTask");
                            try {
                                mService.mActivityManager.resizeTask(
                                        mTask.mTaskId, mWindowDragBounds, RESIZE_MODE_USER);
                        } catch(RemoteException e) {}
                            } catch (RemoteException e) {
                            }
                            Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
                        }
                    } break;

                    case MotionEvent.ACTION_UP: {
@@ -171,11 +176,12 @@ class TaskPositioner implements DimLayer.DimLayerUser {
                }

                if (mDragEnded) {
                    final boolean wasResizing = mResizing;
                    synchronized (mService.mWindowMap) {
                        endDragLocked();
                    }
                    try {
                        if (mResizing) {
                        if (wasResizing) {
                            // We were using fullscreen surface during resizing. Request
                            // resizeTask() one last time to restore surface to window size.
                            mService.mActivityManager.resizeTask(