diff options
author | Joe Onorato <joeo@android.com> | 2009-11-16 18:54:43 -0800 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-11-16 18:54:43 -0800 |
commit | 478730f3c1d6e5c4d02d9a620e8b0accee4218b8 (patch) | |
tree | d03031fb9b9fbf4f6460b46ad007646d5d7f1c21 /src | |
parent | 1db7a972bfa8786fc8b58d57f832a378fa731eb0 (diff) | |
download | android_packages_apps_Trebuchet-478730f3c1d6e5c4d02d9a620e8b0accee4218b8.tar.gz android_packages_apps_Trebuchet-478730f3c1d6e5c4d02d9a620e8b0accee4218b8.tar.bz2 android_packages_apps_Trebuchet-478730f3c1d6e5c4d02d9a620e8b0accee4218b8.zip |
fix 2261526 - Trackball doesn't work in 3D all-apps if you opened it using trackball
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/AllAppsView.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 319c1231a..687d41668 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -326,7 +326,7 @@ public class AllAppsView extends RSSurfaceView } } - if (mArrowNavigation && iconCount > 0) { + if (iconCount > 0) { mArrowNavigation = true; int currentSelection = mRollo.mState.selectedIconIndex; @@ -367,6 +367,8 @@ public class AllAppsView extends RSSurfaceView } else if (currentTopRow > 0) { newSelection = currentSelection - Defines.COLUMNS_PER_PAGE; mRollo.moveTo(newSelection / Defines.COLUMNS_PER_PAGE); + } else { + newSelection = Defines.COLUMNS_PER_PAGE * (Defines.ROWS_PER_PAGE-1); } } handled = true; @@ -379,7 +381,11 @@ public class AllAppsView extends RSSurfaceView if (mLastSelection != SELECTION_HOME) { if (currentRow < rowCount-1) { mRollo.setHomeSelected(SELECTED_NONE); - newSelection = currentSelection + Defines.COLUMNS_PER_PAGE; + if (currentSelection < 0) { + newSelection = 0; + } else { + newSelection = currentSelection + Defines.COLUMNS_PER_PAGE; + } if (newSelection >= iconCount) { // Go from D to G in this arrangement: // A B C D @@ -606,7 +612,6 @@ public class AllAppsView extends RSSurfaceView break; } if (text != null) { - Log.d(TAG, "dispatchPopulateAccessibilityEvent setting text=" + text); event.setEnabled(true); event.getText().add(text); //event.setContentDescription(text); @@ -642,8 +647,6 @@ public class AllAppsView extends RSSurfaceView } public boolean isVisible() { - Log.d(TAG, "isVisible mZoomDirty=" + mZoomDirty - + " mMessageProc=" + (mMessageProc == null ? "null" : mZoom)); return mZoom > 0.001f; } @@ -1342,7 +1345,6 @@ public class AllAppsView extends RSSurfaceView if (prev != index) { if (info.title != null && info.title.length() > 0) { - Log.d(TAG, "sendAccessibilityEvent SELECTION_ICONS " + info.title); //setContentDescription(info.title); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); } @@ -1367,7 +1369,6 @@ public class AllAppsView extends RSSurfaceView mLastSelection = SELECTION_HOME; mState.homeButtonId = mHomeButtonFocused.getID(); if (prev != SELECTION_HOME) { - Log.d(TAG, "sendAccessibilityEvent SELECTION_HOME"); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); } break; |