测试

mac2024-04-01  30

public @NonNull RefWatcher buildAndInstall() { if (LeakCanaryInternals.installedRefWatcher != null) { throw new UnsupportedOperationException("buildAndInstall() should only be called once."); } RefWatcher refWatcher = build(); //如果是在别的进程中,会跟DISABLED相等 if (refWatcher != DISABLED) { if (enableDisplayLeakActivity) { LeakCanaryInternals.setEnabledAsync(context, DisplayLeakActivity.class, true); }//默认是true //默认为true if (watchActivities) { ActivityRefWatcher.install(context, refWatcher); } //默认为true if (watchFragments) { FragmentRefWatcher.Helper.install(context, refWatcher); } } LeakCanaryInternals.installedRefWatcher = refWatcher; return refWatcher; } 兔子兔兔兔 2121 21 nux kdj 1111
最新回复(0)