pull/28/head
fengyuecanzhu 2 years ago
parent 4c1dced9bd
commit de7d1ccb0d
No known key found for this signature in database
GPG Key ID: 04B78AD06A9D6E6C
  1. 3
      .idea/modules.xml
  2. 1
      .idea/vcs.xml
  3. 2
      app/src/main/assets/updatelog.fy
  4. 7
      app/src/main/java/xyz/fycz/myreader/widget/page/PageView.java
  5. 3
      dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt
  6. 59
      dynamic/src/main/java/xyz/fycz/dynamic/fix/App246Fix2.kt

@ -16,9 +16,6 @@
<module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.main.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" />

@ -2,6 +2,5 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/plugin" vcs="Git" />
</component> </component>
</project> </project>

@ -1,3 +1,5 @@
1、修复阅读界面概率性闪退的问题
2022.05.28 2022.05.28
风月读书v2.4.6 风月读书v2.4.6
更新内容: 更新内容:

@ -491,9 +491,10 @@ public class PageView extends View {
@Override @Override
protected void onDetachedFromWindow() { protected void onDetachedFromWindow() {
super.onDetachedFromWindow(); super.onDetachedFromWindow();
mPageAnim.abortAnim(); if (mPageAnim != null) {
mPageAnim.clear(); mPageAnim.abortAnim();
mPageAnim.clear();
}
mPageLoader = null; mPageLoader = null;
mPageAnim = null; mPageAnim = null;
} }

@ -46,6 +46,7 @@ class AppLoadImpl : IAppLoader {
App244Fix::class.java, App244Fix::class.java,
App244Fix2::class.java, App244Fix2::class.java,
App246Fix::class.java, App246Fix::class.java,
App246Fix2::class.java,
AppSubSourceFix::class.java, AppSubSourceFix::class.java,
) )
@ -66,7 +67,7 @@ class AppLoadImpl : IAppLoader {
} }
if (sb.isNotEmpty()) { if (sb.isNotEmpty()) {
if (sb.endsWith("\n")) sb.substring(0, sb.length - 1) if (sb.endsWith("\n")) sb.substring(0, sb.length - 1)
val key = "fix2022-06-21" val key = "fix2022-06-23"
val hasRead = spu.getBoolean(key, false) val hasRead = spu.getBoolean(key, false)
if (!hasRead) { if (!hasRead) {
announce("插件更新", "更新内容:\n$sb") announce("插件更新", "更新内容:\n$sb")

@ -0,0 +1,59 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic.fix
import me.fycz.maple.MapleBridge
import me.fycz.maple.MapleUtils
import me.fycz.maple.MethodHook
import xyz.fycz.myreader.widget.page.PageView
/**
* @author fengyue
* @date 2022/6/23 20:51
*/
@AppFix([], ["修复阅读界面概率性闪退的问题"], "2022-06-23")
class App246Fix2 : AppFixHandle {
override fun onFix(key: String): BooleanArray {
val result = try {
fxPageView()
true
} catch (e: Exception) {
MapleUtils.log(e)
false
}
fixResult(key, "pageView", result)
return booleanArrayOf(result)
}
private fun fxPageView() {
MapleUtils.findAndHookMethod(
PageView::class.java,
"onDetachedFromWindow",
object : MethodHook(){
override fun beforeHookedMethod(param: MapleBridge.MethodHookParam) {
val mPageAnim = MapleUtils.getObjectField(param.thisObject, "mPageAnim")
if (mPageAnim == null){
MapleUtils.setObjectField(param.thisObject, "mPageLoader", null)
param.result = null
}
}
}
)
}
}
Loading…
Cancel
Save