diff options
3 files changed, 23 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 2612ab2f8eaf..bba5a173d12c 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6874,6 +6874,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param info The info whose drawing order should be populated */ private void populateAccessibilityNodeInfoDrawingOrderInParent(AccessibilityNodeInfo info) { + /* + * If the view's bounds haven't been set yet, layout has not completed. In that situation, + * drawing order may not be well-defined, and some Views with custom drawing order may + * not be initialized sufficiently to respond properly getChildDrawingOrder. + */ + if ((mPrivateFlags & PFLAG_HAS_BOUNDS) == 0) { + info.setDrawingOrder(0); + return; + } int drawingOrderInParent = 1; // Iterate up the hierarchy if parents are not important for a11y View viewAtDrawingLevel = this; diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java index ad010a6891fe..295505a30d92 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java +++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java @@ -54,6 +54,18 @@ class FocusManager implements View.OnFocusChangeListener { * @return Whether the event was handled. */ public boolean handleKey(DocumentHolder doc, int keyCode, KeyEvent event) { + boolean extendSelection = false; + // Translate space/shift-space into PgDn/PgUp + if (keyCode == KeyEvent.KEYCODE_SPACE) { + if (event.isShiftPressed()) { + keyCode = KeyEvent.KEYCODE_PAGE_UP; + } else { + keyCode = KeyEvent.KEYCODE_PAGE_DOWN; + } + } else { + extendSelection = event.isShiftPressed(); + } + if (Events.isNavigationKeyCode(keyCode)) { // Find the target item and focus it. int endPos = findTargetPosition(doc.itemView, keyCode, event); diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp index 310d66010632..cdd551936511 100644 --- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp +++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp @@ -122,7 +122,7 @@ static void sv_status_callback(GpsSvStatus* sv_status) sGnssSvListSize = sv_status->num_svs; // Clamp the list size. Legacy GpsSvStatus has only 32 elements in sv_list. if (sGnssSvListSize > GPS_MAX_SATELLITE_COUNT) { - ALOGW("Too many satellites %d. Clamps to %d.", + ALOGW("Too many satellites %zd. Clamps to %d.", sGnssSvListSize, GPS_MAX_SATELLITE_COUNT); sGnssSvListSize = GPS_MAX_SATELLITE_COUNT; @@ -172,7 +172,7 @@ static void gnss_sv_status_callback(GnssSvStatus* sv_status) { sGnssSvListSize = sv_status->num_svs; // Clamp the list size if (sGnssSvListSize > GNSS_MAX_SATELLITE_COUNT) { - ALOGD("Too many satellites %d. Clamps to %d.", + ALOGD("Too many satellites %zd. Clamps to %d.", sGnssSvListSize, GNSS_MAX_SATELLITE_COUNT); sGnssSvListSize = GNSS_MAX_SATELLITE_COUNT; |