本文整理匯總了Java中com.squareup.leakcanary.RefWatcher.DISABLED屬性的典型用法代碼示例。如果您正苦於以下問題:Java RefWatcher.DISABLED屬性的具體用法?Java RefWatcher.DISABLED怎麽用?Java RefWatcher.DISABLED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.squareup.leakcanary.RefWatcher
的用法示例。
在下文中一共展示了RefWatcher.DISABLED屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
@Override
public void onCreate() {
super.onCreate();
if (LeakCanary.isInAnalyzerProcess(this)) {
mRefWatcher = RefWatcher.DISABLED;
} else {
mRefWatcher = LeakCanary.install(this);
}
if (isInMainProcess()) {
instance = this;
Thread.setDefaultUncaughtExceptionHandler(new AppCrashHandler(this));
initModule();
}
}
示例2: onCreate
@Override
public void onCreate() {
super.onCreate();
mRefWatcher = LeakCanary.install(this);
if (mRefWatcher == RefWatcher.DISABLED && "leak".equals(BuildConfig.BUILD_TYPE)) {
return;
}
// build the dependency graph
mAppComponent = getAppComponentBuilder().build();
mAppComponent.inject(this);
Timber.plant(mTimberTree);
}
示例3: getRefWatcher
/**
* 內存泄漏檢測
*
* @param context
* @return
*/
public static RefWatcher getRefWatcher(Context context) {
BaseApplication application = (BaseApplication) context.getApplicationContext();
if (AppUtils.isDebug(application.getApplicationContext(), AppUtils.getPackageName(application.getApplicationContext()))) {
return application.refWatcher;
}
//內存泄漏檢測, 發版時改為此配置
return RefWatcher.DISABLED;
}
示例4: initializeLeakCanary
private void initializeLeakCanary() {
if (LeakCanary.isInAnalyzerProcess(getApplicationContext())) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
mRefWatcher = RefWatcher.DISABLED;
} else {
// Ignore known Android SDK leaks
ExcludedRefs excludedRefs = AndroidExcludedRefs.createAppDefaults()
.build();
mRefWatcher = LeakCanary.refWatcher(getApplicationContext())
.excludedRefs(excludedRefs)
.buildAndInstall();
}
}
示例5: installLeakCanary
private RefWatcher installLeakCanary() {
if (BuildConfig.DEBUG) {
return LeakCanary.install(this);
}
else {
return RefWatcher.DISABLED;
}
}
示例6: onCreate
@Override
public void onCreate() {
super.onCreate();
if(BuildConfig.DEBUG) {
refWatcher = LeakCanary.install(this);
} else {
refWatcher = RefWatcher.DISABLED;
}
}
示例7: onCreate
@Override
public void onCreate() {
super.onCreate();
initialiseInjectors();
refWatcher = RefWatcher.DISABLED;
if (BuildConfig.DEBUG) {
refWatcher = installLeakCanary();
Stetho.initializeWithDefaults(this);
Timber.plant(new Timber.DebugTree());
}
}
示例8: onCreate
@Override
public void onCreate() {
super.onCreate();
PrefsUtil.initialize(this);
ProfileManager.initialize();
// refWatcher = LeakCanary.install(this);
refWatcher = RefWatcher.DISABLED;
if (sEthereumConnector == null) {
sEthereumConnector = new EthereumConnector(this, EthereumService.class);
sEthereumConnector.registerHandler(this);
sEthereumConnector.bindService();
}
}
示例9: installLeakCanary
/**
* 安裝leakCanary檢測內存泄露
*/
protected void installLeakCanary() {
this.mRefWatcher = BuildConfig.USE_CANARY ? LeakCanary.install(this) : RefWatcher.DISABLED;
}
示例10: installLeakCanary
protected RefWatcher installLeakCanary() {
return RefWatcher.DISABLED;
}
示例11: initLeakCanary
private void initLeakCanary(Application application) {
//leakCanary內存泄露檢查
mRefWatcher = BuildConfig.USE_CANARY ? LeakCanary.install(application) : RefWatcher.DISABLED;
}
示例12: onCreateInReleaseMode
@Override protected void onCreateInReleaseMode() {
super.onCreateInReleaseMode();
refWatcher = RefWatcher.DISABLED;
}
示例13: getRefWatcher
@NonNull
public RefWatcher getRefWatcher() {
return RefWatcher.DISABLED;
}
示例14: provideRefWatcher
@NonNull
@Provides
@Singleton
RefWatcher provideRefWatcher() {
return RefWatcher.DISABLED;
}
示例15: refWatcher
@Provides
@Singleton
protected RefWatcher refWatcher() {
return RefWatcher.DISABLED;
}