Ehviewer
Ehviewer copied to clipboard
Unexpected back press behavior on Android 14
复现步骤 / Step to reproduce
- Launch app
- Navigate to Downloads
- Press back button
预期行为 / Expected behaviour
Back to homepage
实际行为 / Actual Behaviour
Back to launcher
应用日志 / App logs
No response
备注 / Addition details
And this:
https://github.com/Ehviewer-Overhauled/Ehviewer/assets/118464521/b112c045-88b5-4e57-8150-50ebf8736b17
EhViewer 版本号 / EhViewer version code
1.8.9.0-SNAPSHOT
EhViewer CI 版本 / EhViewer CI Version
5422c04
Android 系统版本 / Android version
14
设备型号 / Device model
sdk_gphone64_x86_64
SoC 型号 / Soc model
/
自查步骤 / Verify steps
- [ ] 如果您有足够的时间和能力,并愿意为此提交 PR ,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
- [X] 您已仔细查看并知情 Q&A 中的内容 / You have checked Q&A carefully
- [X] 您已搜索过 Issue Tracker,没有找到类似内容 / I have searched on Issue Tracker, No duplicate or related open issue has been found
- [X] 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
- [X] 您确保已使用最新 CI 版本测试,并且该问题在最新 CI 版本中并未解决 / This bug have not solved in latest CI version
┬───
│ GC Root: Thread object
│
├─ android.os.HandlerThread instance
│ Leaking: NO (PathClassLoader↓ is not leaking)
│ Thread name: 'LeakCanary-Heap-Dump'
│ ↓ Thread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│ Leaking: NO (DownloadManager↓ is not leaking and A ClassLoader is never leaking)
│ ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│ Leaking: NO (DownloadManager↓ is not leaking)
│ ↓ Object[3266]
├─ com.hippo.ehviewer.download.DownloadManager class
│ Leaking: NO (DownloadsScene↓ is not leaking and a class is never leaking)
│ ↓ static DownloadManager.mDownloadInfoListeners
├─ java.util.ArrayList instance
│ Leaking: NO (DownloadsScene↓ is not leaking)
│ ↓ ArrayList[1]
├─ com.hippo.ehviewer.ui.scene.DownloadsScene instance
│ Leaking: NO (FragmentContainerView↓ is not leaking and Fragment#mFragmentManager is not null)
│ Fragment.mTag=0f77fb06-a118-4e37-9677-ba3056f3c5cb
│ ↓ Fragment.mContainer
├─ androidx.fragment.app.FragmentContainerView instance
│ Leaking: NO (View attached)
│ View is part of a window view hierarchy
│ View.mAttachInfo is not null (view attached)
│ View.mID = R.id.fragment_container
│ View.mWindowAttachCount = 1
│ mContext instance of com.hippo.ehviewer.ui.MainActivity with mDestroyed = false
│ ↓ FragmentContainerView.disappearingFragmentChildren
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│ Leaking: UNKNOWN
│ Retaining 60 B in 2 objects
│ ↓ ArrayList[2]
│ ~~~
╰→ androidx.coordinatorlayout.widget.CoordinatorLayout instance
Leaking: YES (ObjectWatcher was watching this because com.hippo.ehviewer.ui.scene.GalleryListScene received
Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks))
Retaining 260.3 kB in 5935 objects
key = ce15d164-edd8-4583-980f-a714a3150570
watchDurationMillis = 15502
retainedDurationMillis = 7324
View not part of a window view hierarchy
View.mAttachInfo is null (view detached)
View.mWindowAttachCount = 1
mContext instance of com.hippo.ehviewer.ui.MainActivity with mDestroyed = false
Meanwhile
Androidx fragment写的有点问题
Also back press on Android 14 won't close right drawer.
Predictive back 选择留在原界面会导致:
https://github.com/Ehviewer-Overhauled/Ehviewer/assets/118464521/71ff9117-1533-408c-b2ac-d0497644decc