From 9c5867d8cd7f99bb601d7d8cbd6e7f8d53891d83 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Thu, 10 Mar 2016 15:52:46 -0800 Subject: [PATCH] Do not enforce minimum size for pinned stack. We don't need to enforce a minimum size for the tasks in the pinned stack as the bounds are controlled by the system. Bug: 27536840 Change-Id: I9ecb2ebd3792b2739d05e9f403fe0acba969e46a --- services/core/java/com/android/server/am/TaskRecord.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java index 62275a98aba16..346e9d407309e 100644 --- a/services/core/java/com/android/server/am/TaskRecord.java +++ b/services/core/java/com/android/server/am/TaskRecord.java @@ -1332,8 +1332,13 @@ final class TaskRecord { if (bounds == null) { return; } - final int minimalSize = mMinimalSize == -1 - ? mService.mStackSupervisor.mDefaultMinimalSizeOfResizeableTask : mMinimalSize; + int minimalSize = mMinimalSize; + // If the task has no requested minimal size, we'd like to enforce a minimal size + // so that the user can not render the task too small to manipulate. We don't need + // to do this for the pinned stack as the bounds are controlled by the system. + if (minimalSize == -1 && stack.mStackId != PINNED_STACK_ID) { + minimalSize = mService.mStackSupervisor.mDefaultMinimalSizeOfResizeableTask; + } final boolean adjustWidth = minimalSize > bounds.width(); final boolean adjustHeight = minimalSize > bounds.height(); if (!(adjustWidth || adjustHeight)) {