diff options
author | Winson Chung <winsonc@google.com> | 2014-09-09 18:33:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-09 18:33:08 +0000 |
commit | 31e8d7602c23661fb4540e2858af4833d2347c9f (patch) | |
tree | e01c03dd0447ace453217f4dd1f18b9c6dc21327 /packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java | |
parent | fc3922d49b20f52a12c7557b8c37bb022030e6f2 (diff) | |
parent | 27acf761229779e1777d380616846ac07f484ed6 (diff) | |
download | frameworks_base-31e8d7602c23661fb4540e2858af4833d2347c9f.zip frameworks_base-31e8d7602c23661fb4540e2858af4833d2347c9f.tar.gz frameworks_base-31e8d7602c23661fb4540e2858af4833d2347c9f.tar.bz2 |
Merge "Separating the notion of transposed search vs nav bar. (Bug 17402331)" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java index 396be3b..ed5c126 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java @@ -57,7 +57,8 @@ public class RecentsConfiguration { /** Layout */ boolean isLandscape; - boolean transposeRecentsLayoutWithOrientation; + boolean hasTransposedSearchBar; + boolean hasTransposedNavBar; /** Loading */ public int maxNumTasksToLoad; @@ -174,8 +175,8 @@ public class RecentsConfiguration { // Layout isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; - transposeRecentsLayoutWithOrientation = - res.getBoolean(R.bool.recents_transpose_layout_with_orientation); + hasTransposedSearchBar = res.getBoolean(R.bool.recents_has_transposed_search_bar); + hasTransposedNavBar = res.getBoolean(R.bool.recents_has_transposed_nav_bar); // Insets displayRect.set(0, 0, dm.widthPixels, dm.heightPixels); @@ -329,13 +330,12 @@ public class RecentsConfiguration { /** Returns whether the nav bar scrim should be visible. */ public boolean hasNavBarScrim() { // Only show the scrim if we have recent tasks, and if the nav bar is not transposed - return !launchedWithNoRecentTasks && - (!transposeRecentsLayoutWithOrientation || !isLandscape); + return !launchedWithNoRecentTasks && (!hasTransposedNavBar || !isLandscape); } /** Returns whether the current layout is horizontal. */ public boolean hasHorizontalLayout() { - return isLandscape && transposeRecentsLayoutWithOrientation; + return isLandscape && hasTransposedSearchBar; } /** @@ -346,7 +346,7 @@ public class RecentsConfiguration { Rect taskStackBounds) { Rect searchBarBounds = new Rect(); getSearchBarBounds(windowWidth, windowHeight, topInset, searchBarBounds); - if (isLandscape && transposeRecentsLayoutWithOrientation) { + if (isLandscape && hasTransposedSearchBar) { // In landscape, the search bar appears on the left taskStackBounds.set(searchBarBounds.right, topInset, windowWidth - rightInset, windowHeight); } else { @@ -367,7 +367,7 @@ public class RecentsConfiguration { searchBarSize = 0; } - if (isLandscape && transposeRecentsLayoutWithOrientation) { + if (isLandscape && hasTransposedSearchBar) { // In landscape, the search bar appears on the left searchBarSpaceBounds.set(0, topInset, searchBarSize, windowHeight); } else { |