Obsolete
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Android bug report capturing
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen Record of the Issue
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
Android bug report capturing
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen Record of the Issue
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
vi...@google.com <vi...@google.com> #3
Please provide the information as requested in comment #2 , For us to further investigate this issue.
se...@gmail.com <se...@gmail.com> #4
Hello, please find the video attached.
At first I was going to capture it from emulator, but failed to reproduce the problem there - mouse-wheel scroll works absolute weird there. One scroll-step-down goes to very bottom of the list instead of scrolling few lines. On top of this - dynamic change of the dataset DOES NOT reset scroll to zero. See video-emulator-8.1.0-x86.mp4.
Bug reproduced on physical device - video-hardware-8.1.0-lineageos-15.1-20180723-gemini.mp4.
Project to reproduce the problem - Listview-scroll-reset-bug-demo-app.zip (was attached ealier).
Bug report contain plenty of personal info - therefore I'm not willing to share it in full.
Here is the header of the file - bugreport-gemini-OPM2.171026.006.H1-2019-06-03-12-48-40.txt
Please let me know if you are looking for something specific there.
===================================================
Build: lineage_gemini-userdebug 8.1.0 OPM2.171026.006.H1 63d3955df4
Build fingerprint: 'Xiaomi/gemini/gemini:8.0.0/OPR1.170623.032/V9.6.1.0.OAAMIFD:user/release-keys'
Bootloader: unknown
Radio: TH20c1.9-0704_1846_7ece77f
Network: velcom
Kernel: Linux version 3.18.71-g7334aa6 (jenkins@kallikrates.acc.umu.se) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Jul 23 14:36:50 UTC 2018
Command line: sched_enable_hmp=1 sched_enable_power_aware=1 app_setting.use_32bit_app_setting=1 kpti=1 androidboot.hardware=qcom ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff buildvariant=userdebug androidboot.bootdevice=624000.ufshc androidboot.verifiedbootstate=orange androidboot.veritymode=eio androidboot.keymaster=1 androidboot.serialno=cdd1568a androidboot.secureboot=1 androidboot.hwversion=1.4.0 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_fhd_r63452_j1_cmd:1:none:cfg:single_dsi
Bugreport format version: 1.0
Dumpstate info: id=2 pid=11936 dry_run=0 args=/system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport extra_options=bugreportplus
===================================================
At first I was going to capture it from emulator, but failed to reproduce the problem there - mouse-wheel scroll works absolute weird there. One scroll-step-down goes to very bottom of the list instead of scrolling few lines. On top of this - dynamic change of the dataset DOES NOT reset scroll to zero. See video-emulator-8.1.0-x86.mp4.
Bug reproduced on physical device - video-hardware-8.1.0-lineageos-15.1-20180723-gemini.mp4.
Project to reproduce the problem - Listview-scroll-reset-bug-demo-app.zip (was attached ealier).
Bug report contain plenty of personal info - therefore I'm not willing to share it in full.
Here is the header of the file - bugreport-gemini-OPM2.171026.006.H1-2019-06-03-12-48-40.txt
Please let me know if you are looking for something specific there.
===================================================
Build: lineage_gemini-userdebug 8.1.0 OPM2.171026.006.H1 63d3955df4
Build fingerprint: 'Xiaomi/gemini/gemini:8.0.0/OPR1.170623.032/V9.6.1.0.OAAMIFD:user/release-keys'
Bootloader: unknown
Radio: TH20c1.9-0704_1846_7ece77f
Network: velcom
Kernel: Linux version 3.18.71-g7334aa6 (jenkins@kallikrates.acc.umu.se) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Jul 23 14:36:50 UTC 2018
Command line: sched_enable_hmp=1 sched_enable_power_aware=1 app_setting.use_32bit_app_setting=1 kpti=1 androidboot.hardware=qcom ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff buildvariant=userdebug androidboot.bootdevice=624000.ufshc androidboot.verifiedbootstate=orange androidboot.veritymode=eio androidboot.keymaster=1 androidboot.serialno=cdd1568a androidboot.secureboot=1 androidboot.hwversion=1.4.0 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_fhd_r63452_j1_cmd:1:none:cfg:single_dsi
Bugreport format version: 1.0
Dumpstate info: id=2 pid=11936 dry_run=0 args=/system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport extra_options=bugreportplus
===================================================
vi...@google.com <vi...@google.com> #5
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
vi...@google.com <vi...@google.com> #6
Thank you for your feedback. We assure you we are doing our best to address the issues reported, however our product team has shifted work to higher priority bugs and may not be able to handle this bug. As for now, we will be closing the bug as won’t fix obsolete.
If you are still facing the issue recently, we request that you log a new bug along with the bug report herehttps://goo.gl/TbMiIO
If you are still facing the issue recently, we request that you log a new bug along with the bug report here
Description
I came across very annoying behavior when ListView scroll-y position is reset to zero after each adapter.notifyDataSetChanged().
In my scenario this happens approximately every 5 seconds (rate of data update).
I've spent few hours digging through the Android sources and problems seems to be somewhere here (note: I'm developing at 8.1, but I see same code in 9.0 codebase)
if (mSelectedPosition >= 0) {
// Sync the selection state
View v = getChildAt(mSelectedPosition - mFirstPosition);
mSyncRowId = mNextSelectedRowId;
mSyncPosition = mNextSelectedPosition;
if (v != null) {
mSpecificTop = v.getTop();
}
mSyncMode = SYNC_SELECTED_POSITION;
} else ...
- when list view is created and filled - it gets auto-selected item at zero-position
- when I mousewheel-scroll the view - 'mFirstPosition' gets some positive number (e.g. 10), whereas 'mSelectedPosition' is zero.
That is why expression "mSelectedPosition - mFirstPosition" is always negative and getChildAt() always returns null.
This consecutively causes "mSpecificTop" to be always zero - and that is the position being restored after "adapter.notifyDataSetChanged()",
see here
So ... I think this is the bug to be fixed somehow.
- Next ... i was curios why problem does not occur when Listview "is scrolled by touch" and came to this code
@Override
public void onTouchModeChanged(boolean isInTouchMode) {
if (isInTouchMode) {
// Get rid of the selection when we enter touch mode
hideSelector();
And I see here that touch-scroll always clears selection (what is somewhat strange to my mind),
but in context of that problem this causes "if (mSelectedPosition >= 0) {" mentioned earlier to be always false after touch-scroll and `mSpecificTop` is evaluated correctly in 'else' branch.
So ... this allows a counter-intuitive workaround: call `listView.onTouchModeChanged(true);` before `adapter.notifyDataSetChanged();`
Please take care about this problem.
Demo project to reproduce it is attached.