Ensuring that Launcher always has a search bar. (Bug 10965514)

- Also disabling voice proxy when we are in now (Bug 10915381)

Change-Id: I4ad6392b5139d12b9b298110109b9363ba426cb4
This commit is contained in:
Winson Chung
2013-09-27 11:44:58 -07:00
parent a6125efb66
commit 54e6513554
5 changed files with 18 additions and 11 deletions

View File

@@ -359,14 +359,14 @@ class DeviceProfile {
boolean hasVerticalBarLayout = isVerticalBarLayout();
// Layout the search bar space
View searchBarSpace = launcher.findViewById(R.id.qsb_bar);
lp = (FrameLayout.LayoutParams) searchBarSpace.getLayoutParams();
View searchBar = launcher.getSearchBar();
lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
if (hasVerticalBarLayout) {
// Vertical search bar
lp.gravity = Gravity.TOP | Gravity.LEFT;
lp.width = searchBarSpaceHeightPx;
lp.height = LayoutParams.MATCH_PARENT;
searchBarSpace.setPadding(
searchBar.setPadding(
0, 2 * edgeMarginPx, 0,
2 * edgeMarginPx);
} else {
@@ -374,19 +374,19 @@ class DeviceProfile {
lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
lp.width = searchBarSpaceWidthPx;
lp.height = searchBarSpaceHeightPx;
searchBarSpace.setPadding(
searchBar.setPadding(
2 * edgeMarginPx,
2 * edgeMarginPx,
2 * edgeMarginPx, 0);
}
searchBarSpace.setLayoutParams(lp);
searchBar.setLayoutParams(lp);
// Layout the search bar
View searchBar = launcher.getQsbBar();
lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
lp.width = LayoutParams.MATCH_PARENT;
lp.height = LayoutParams.MATCH_PARENT;
searchBar.setLayoutParams(lp);
View qsbBar = launcher.getQsbBar();
LayoutParams vglp = qsbBar.getLayoutParams();
vglp.width = LayoutParams.MATCH_PARENT;
vglp.height = LayoutParams.MATCH_PARENT;
qsbBar.setLayoutParams(vglp);
// Layout the voice proxy
View voiceButtonProxy = launcher.findViewById(R.id.voice_button_proxy);