diff options
author | Winson Chung <winsonc@google.com> | 2014-07-22 12:27:13 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-07-22 22:25:33 +0000 |
commit | dcfa7976fa836ae90bb4a579892a18a0abf35b3c (patch) | |
tree | 67a3b17fd0b3f7f93a266ba0c185b5edb6cbd181 /packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java | |
parent | 8d7f8a253db1392c74287399207096c9c97c7324 (diff) | |
download | frameworks_base-dcfa7976fa836ae90bb4a579892a18a0abf35b3c.zip frameworks_base-dcfa7976fa836ae90bb4a579892a18a0abf35b3c.tar.gz frameworks_base-dcfa7976fa836ae90bb4a579892a18a0abf35b3c.tar.bz2 |
Intermediate refactoring to move towards in-app view transitions.
- Fixing bug where we weren't toggling to the right task when using affiliations
- Refactoring task rect calculation to allow full screen task view to be laid out for transitions
- Refactoring the view bounds animations into a separate class
- Refactoring the footer view (for lock-to-task) out of TaskView
- Refactoring some transform code out of TaskView
- Removing fullscreen overlay view
- Fixing case where extra invalidations and layouts were still happening in FixedSizeImageView
- Adding debug overlay to replace specific debug drawing code
Change-Id: Ibf98b6a0782a68cd84582203c807cece1ff3379f
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java index a0cab5c..55711cf0 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java @@ -309,19 +309,16 @@ public class RecentsConfiguration { * Returns the task stack bounds in the current orientation. These bounds do not account for * the system insets. */ - public void getTaskStackBounds(int width, int height, Rect taskStackBounds) { - if (hasSearchBarAppWidget()) { - Rect searchBarBounds = new Rect(); - getSearchBarBounds(width, height, searchBarBounds); - if (isLandscape && transposeRecentsLayoutWithOrientation) { - // In landscape, the search bar appears on the left, so shift the task rect right - taskStackBounds.set(searchBarBounds.width(), 0, width, height); - } else { - // In portrait, the search bar appears on the top, so shift the task rect below - taskStackBounds.set(0, searchBarBounds.height(), width, height); - } + public void getTaskStackBounds(int windowWidth, int windowHeight, int topInset, int rightInset, + Rect taskStackBounds) { + Rect searchBarBounds = new Rect(); + getSearchBarBounds(windowWidth, windowHeight, topInset, searchBarBounds); + if (isLandscape && transposeRecentsLayoutWithOrientation) { + // In landscape, the search bar appears on the left + taskStackBounds.set(searchBarBounds.right, topInset, windowWidth - rightInset, windowHeight); } else { - taskStackBounds.set(0, 0, width, height); + // In portrait, the search bar appears on the top (which already has the inset) + taskStackBounds.set(0, searchBarBounds.bottom, windowWidth, windowHeight); } } @@ -329,19 +326,20 @@ public class RecentsConfiguration { * Returns the search bar bounds in the current orientation. These bounds do not account for * the system insets. */ - public void getSearchBarBounds(int width, int height, Rect searchBarSpaceBounds) { + public void getSearchBarBounds(int windowWidth, int windowHeight, int topInset, + Rect searchBarSpaceBounds) { // Return empty rects if search is not enabled - if (!Constants.DebugFlags.App.EnableSearchLayout) { - searchBarSpaceBounds.set(0, 0, 0, 0); - return; + int searchBarSize = searchBarSpaceHeightPx; + if (!Constants.DebugFlags.App.EnableSearchLayout || !hasSearchBarAppWidget()) { + searchBarSize = 0; } if (isLandscape && transposeRecentsLayoutWithOrientation) { // In landscape, the search bar appears on the left - searchBarSpaceBounds.set(0, 0, searchBarSpaceHeightPx, height); + searchBarSpaceBounds.set(0, topInset, searchBarSize, windowHeight); } else { // In portrait, the search bar appears on the top - searchBarSpaceBounds.set(0, 0, width, searchBarSpaceHeightPx); + searchBarSpaceBounds.set(0, topInset, windowWidth, topInset + searchBarSize); } } } |