summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-09-05 17:24:20 +0200
committerWinson Chung <winsonc@google.com>2014-09-05 17:24:20 +0200
commit27acf761229779e1777d380616846ac07f484ed6 (patch)
treea461f515499e6bbd4bd57ebe81bd5f8cf705b1f1 /packages/SystemUI/src/com/android/systemui/recents
parenta449018105252f6d8d83c4b7064ce54476a6c6f7 (diff)
downloadframeworks_base-27acf761229779e1777d380616846ac07f484ed6.zip
frameworks_base-27acf761229779e1777d380616846ac07f484ed6.tar.gz
frameworks_base-27acf761229779e1777d380616846ac07f484ed6.tar.bz2
Separating the notion of transposed search vs nav bar. (Bug 17402331)
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java16
2 files changed, 10 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
index 2d114c0..9cb310b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
@@ -241,8 +241,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
mConfig = RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy);
mConfig.updateOnConfigurationChange();
mConfig.getTaskStackBounds(mWindowRect.width(), mWindowRect.height(), mStatusBarHeight,
- mNavBarWidth, mTaskStackBounds);
- if (mConfig.isLandscape && mConfig.transposeRecentsLayoutWithOrientation) {
+ (mConfig.hasTransposedNavBar ? mNavBarWidth : 0), mTaskStackBounds);
+ if (mConfig.isLandscape && mConfig.hasTransposedNavBar) {
mSystemInsets.set(0, mStatusBarHeight, mNavBarWidth, 0);
} else {
mSystemInsets.set(0, mStatusBarHeight, 0, mNavBarHeight);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 5d8181c..dea314e 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;
@@ -173,8 +174,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);
@@ -326,13 +327,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;
}
/**
@@ -343,7 +343,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 {
@@ -364,7 +364,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 {