am b5e94cca: am 859b3a74: fix bug 2200625 - NPE at com.android.launcher2.AllAppsView.onTouchEvent(AllAppsView.java:259) on Passion
Merge commit 'b5e94ccacfaf54062f2e9460236917c5cbdf33c8' into eclair-mr2-plus-aosp * commit 'b5e94ccacfaf54062f2e9460236917c5cbdf33c8': fix bug 2200625 - NPE at com.android.launcher2.AllAppsView.onTouchEvent(AllAppsView.java:259) on Passion
This commit is contained in:
@@ -192,6 +192,11 @@ public class AllAppsView extends RSSurfaceView
|
|||||||
@Override
|
@Override
|
||||||
protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
|
protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
|
||||||
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
|
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
|
||||||
|
|
||||||
|
if (!isVisible()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (gainFocus) {
|
if (gainFocus) {
|
||||||
if (!mArrowNavigation && mRollo.mState.iconCount > 0) {
|
if (!mArrowNavigation && mRollo.mState.iconCount > 0) {
|
||||||
// Select the first icon when we gain keyboard focus
|
// Select the first icon when we gain keyboard focus
|
||||||
@@ -212,6 +217,10 @@ public class AllAppsView extends RSSurfaceView
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
|
||||||
|
if (!isVisible()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) {
|
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) {
|
||||||
if (mArrowNavigation) {
|
if (mArrowNavigation) {
|
||||||
int whichApp = mRollo.mState.selectedIconIndex;
|
int whichApp = mRollo.mState.selectedIconIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user