Skip to content

该安全模式如何能执行到阻塞修复策略?麻烦解答一下 #1

@Doonkey

Description

@Doonkey

根据源码Protector.java源码片段:
public void init(Application application) { ....... ProtectorSpUtils.putInt(SpConstant.CRASHCONUT, ProtectorSpUtils.getInt(SpConstant.CRASHCONUT, 0) + 1); ...... int countNow = ProtectorSpUtils.getInt(SpConstant.CRASHCONUT, 0); if (countNow > Times_FirstLevel) { ........ if (countNow > Times_SecondLevel) { // clear all ProtectorLogUtils.i("enter level two"); **ProtectorClearer.clearAllFile(sContext);** if (countNow >= Times_WorstLevel && mSynProtectorTask != null) { // fix operation ......... } } } new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { @Override public void run() { markLanuchSucceed(); } }, 10000); }
其中ProtectorClearer.clearAllFile(sContext);已经清理了应用数据,应用再次启动后SpConstant.CRASHCONUT值应该从0开始了,应该始终不会满足条件if (countNow >= Times_WorstLevel && mSynProtectorTask != null),不知道对不对?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions