Skip to content

Commit 4426961

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge "Avoiding horizontal keypad navigation trapping within gallery."
2 parents 2066f7d + c742c9f commit 4426961

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/java/android/widget/Gallery.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,15 +1187,15 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
11871187
case KeyEvent.KEYCODE_DPAD_LEFT:
11881188
if (movePrevious()) {
11891189
playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT);
1190+
return true;
11901191
}
1191-
return true;
1192-
1192+
break;
11931193
case KeyEvent.KEYCODE_DPAD_RIGHT:
11941194
if (moveNext()) {
11951195
playSoundEffect(SoundEffectConstants.NAVIGATION_RIGHT);
1196+
return true;
11961197
}
1197-
return true;
1198-
1198+
break;
11991199
case KeyEvent.KEYCODE_DPAD_CENTER:
12001200
case KeyEvent.KEYCODE_ENTER:
12011201
mReceivedInvokeKeyDown = true;

0 commit comments

Comments
 (0)