Bug 981614 - Do a null check when handling toolbar focus change in HomePager (r=jdover)

This commit is contained in:
Lucas Rocha 2014-03-11 17:58:31 +00:00
parent a43c9b13b1
commit bfab5d4467

View File

@ -254,6 +254,10 @@ public class HomePager extends ViewPager {
}
public void onToolbarFocusChange(boolean hasFocus) {
if (mHomeBanner == null) {
return;
}
// We should only make the banner active if the toolbar is not focused and we are on the default page
final boolean active = !hasFocus && getCurrentItem() == mDefaultPageIndex;
mHomeBanner.setActive(active);