am 2b3396f9: Merge "Adding additional null checks for instances where the qsb is not defined. (Bug 6940769)" into jb-mr1-dev
* commit '2b3396f9c0e88d1633e16483322d2c52cfc271f3': Adding additional null checks for instances where the qsb is not defined. (Bug 6940769)
This commit is contained in:
@@ -451,7 +451,9 @@ public final class Launcher extends Activity
|
|||||||
if (sAppMarketIcon[coi] != null) {
|
if (sAppMarketIcon[coi] != null) {
|
||||||
updateAppMarketIcon(sAppMarketIcon[coi]);
|
updateAppMarketIcon(sAppMarketIcon[coi]);
|
||||||
}
|
}
|
||||||
mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
|
if (mSearchDropTargetBar != null) {
|
||||||
|
mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkForLocaleChange() {
|
private void checkForLocaleChange() {
|
||||||
@@ -1527,7 +1529,10 @@ public final class Launcher extends Activity
|
|||||||
appSearchData = new Bundle();
|
appSearchData = new Bundle();
|
||||||
appSearchData.putString(Search.SOURCE, "launcher-search");
|
appSearchData.putString(Search.SOURCE, "launcher-search");
|
||||||
}
|
}
|
||||||
Rect sourceBounds = mSearchDropTargetBar.getSearchBarBounds();
|
Rect sourceBounds = new Rect();
|
||||||
|
if (mSearchDropTargetBar != null) {
|
||||||
|
sourceBounds = mSearchDropTargetBar.getSearchBarBounds();
|
||||||
|
}
|
||||||
|
|
||||||
startGlobalSearch(initialQuery, selectInitialQuery,
|
startGlobalSearch(initialQuery, selectInitialQuery,
|
||||||
appSearchData, sourceBounds);
|
appSearchData, sourceBounds);
|
||||||
@@ -2515,7 +2520,9 @@ public final class Launcher extends Activity
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hide the search bar
|
// Hide the search bar
|
||||||
mSearchDropTargetBar.hideSearchBar(false);
|
if (mSearchDropTargetBar != null) {
|
||||||
|
mSearchDropTargetBar.hideSearchBar(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2591,7 +2598,9 @@ public final class Launcher extends Activity
|
|||||||
hideDockDivider();
|
hideDockDivider();
|
||||||
|
|
||||||
// Hide the search bar
|
// Hide the search bar
|
||||||
mSearchDropTargetBar.hideSearchBar(false);
|
if (mSearchDropTargetBar != null) {
|
||||||
|
mSearchDropTargetBar.hideSearchBar(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dispatchOnLauncherTransitionPrepare(fromView, animated, false);
|
dispatchOnLauncherTransitionPrepare(fromView, animated, false);
|
||||||
dispatchOnLauncherTransitionStart(fromView, animated, false);
|
dispatchOnLauncherTransitionStart(fromView, animated, false);
|
||||||
@@ -2743,7 +2752,9 @@ public final class Launcher extends Activity
|
|||||||
|
|
||||||
// Show the search bar (only animate if we were showing the drop target bar in spring
|
// Show the search bar (only animate if we were showing the drop target bar in spring
|
||||||
// loaded mode)
|
// loaded mode)
|
||||||
mSearchDropTargetBar.showSearchBar(wasInSpringLoadedMode);
|
if (mSearchDropTargetBar != null) {
|
||||||
|
mSearchDropTargetBar.showSearchBar(wasInSpringLoadedMode);
|
||||||
|
}
|
||||||
|
|
||||||
// We only need to animate in the dock divider if we're going from spring loaded mode
|
// We only need to animate in the dock divider if we're going from spring loaded mode
|
||||||
showDockDivider(animated && wasInSpringLoadedMode);
|
showDockDivider(animated && wasInSpringLoadedMode);
|
||||||
@@ -2846,7 +2857,11 @@ public final class Launcher extends Activity
|
|||||||
mDividerAnimator = LauncherAnimUtils.createAnimatorSet();
|
mDividerAnimator = LauncherAnimUtils.createAnimatorSet();
|
||||||
mDividerAnimator.playTogether(LauncherAnimUtils.ofFloat(mQsbDivider, "alpha", 1f),
|
mDividerAnimator.playTogether(LauncherAnimUtils.ofFloat(mQsbDivider, "alpha", 1f),
|
||||||
LauncherAnimUtils.ofFloat(mDockDivider, "alpha", 1f));
|
LauncherAnimUtils.ofFloat(mDockDivider, "alpha", 1f));
|
||||||
mDividerAnimator.setDuration(mSearchDropTargetBar.getTransitionInDuration());
|
int duration = 0;
|
||||||
|
if (mSearchDropTargetBar != null) {
|
||||||
|
duration = mSearchDropTargetBar.getTransitionInDuration();
|
||||||
|
}
|
||||||
|
mDividerAnimator.setDuration(duration);
|
||||||
mDividerAnimator.start();
|
mDividerAnimator.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2867,7 +2882,10 @@ public final class Launcher extends Activity
|
|||||||
if (!LauncherApplication.isScreenLarge()) {
|
if (!LauncherApplication.isScreenLarge()) {
|
||||||
if (animated) {
|
if (animated) {
|
||||||
if (mHotseat.getAlpha() != 1f) {
|
if (mHotseat.getAlpha() != 1f) {
|
||||||
int duration = mSearchDropTargetBar.getTransitionInDuration();
|
int duration = 0;
|
||||||
|
if (mSearchDropTargetBar != null) {
|
||||||
|
duration = mSearchDropTargetBar.getTransitionInDuration();
|
||||||
|
}
|
||||||
mHotseat.animate().alpha(1f).setDuration(duration);
|
mHotseat.animate().alpha(1f).setDuration(duration);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2883,7 +2901,10 @@ public final class Launcher extends Activity
|
|||||||
if (!LauncherApplication.isScreenLarge()) {
|
if (!LauncherApplication.isScreenLarge()) {
|
||||||
if (animated) {
|
if (animated) {
|
||||||
if (mHotseat.getAlpha() != 0f) {
|
if (mHotseat.getAlpha() != 0f) {
|
||||||
int duration = mSearchDropTargetBar.getTransitionOutDuration();
|
int duration = 0;
|
||||||
|
if (mSearchDropTargetBar != null) {
|
||||||
|
duration = mSearchDropTargetBar.getTransitionOutDuration();
|
||||||
|
}
|
||||||
mHotseat.animate().alpha(0f).setDuration(duration);
|
mHotseat.animate().alpha(0f).setDuration(duration);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3474,7 +3495,9 @@ public final class Launcher extends Activity
|
|||||||
public void bindSearchablesChanged() {
|
public void bindSearchablesChanged() {
|
||||||
boolean searchVisible = updateGlobalSearchIcon();
|
boolean searchVisible = updateGlobalSearchIcon();
|
||||||
boolean voiceVisible = updateVoiceSearchIcon(searchVisible);
|
boolean voiceVisible = updateVoiceSearchIcon(searchVisible);
|
||||||
mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
|
if (mSearchDropTargetBar != null) {
|
||||||
|
mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user