當前位置: 首頁>>代碼示例>>Java>>正文


Java RefWatcher.DISABLED屬性代碼示例

本文整理匯總了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();
    }

}
 
開發者ID:hushengjun,項目名稱:FastAndroid,代碼行數:18,代碼來源:BaseApp.java

示例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);
}
 
開發者ID:eduardb,項目名稱:ClujBike,代碼行數:16,代碼來源:ClujBikeApp.java

示例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;
}
 
開發者ID:GitPhoenix,項目名稱:VanGogh,代碼行數:15,代碼來源:BaseApplication.java

示例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();
    }
}
 
開發者ID:AnironGlass,項目名稱:MVP-Boilerplate,代碼行數:15,代碼來源:DebugApp.java

示例5: installLeakCanary

private RefWatcher installLeakCanary() {
  if (BuildConfig.DEBUG) {
    return LeakCanary.install(this);
  }
  else {
    return RefWatcher.DISABLED;
  }
}
 
開發者ID:CreatorDev,項目名稱:android-temperature-logger,代碼行數:8,代碼來源:App.java

示例6: onCreate

@Override
public void onCreate() {
    super.onCreate();
    if(BuildConfig.DEBUG) {
        refWatcher = LeakCanary.install(this);
    } else {
        refWatcher = RefWatcher.DISABLED;
    }
}
 
開發者ID:hwangjr,項目名稱:AndroidProjectTemplete,代碼行數:9,代碼來源:HMApplication.java

示例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());
    }
}
 
開發者ID:JohnnyZhou,項目名稱:MovieMe,代碼行數:12,代碼來源:MovieMeApp.java

示例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();
        }
    }
 
開發者ID:status-im,項目名稱:syng-client,代碼行數:14,代碼來源:SyngApplication.java

示例9: installLeakCanary

/**
 * 安裝leakCanary檢測內存泄露
 */
protected void installLeakCanary() {
    this.mRefWatcher = BuildConfig.USE_CANARY ? LeakCanary.install(this) : RefWatcher.DISABLED;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:6,代碼來源:WEApplication.java

示例10: installLeakCanary

protected RefWatcher installLeakCanary() {
    return RefWatcher.DISABLED;
}
 
開發者ID:gejiaheng,項目名稱:Protein,代碼行數:3,代碼來源:ProteinApp.java

示例11: initLeakCanary

private void initLeakCanary(Application application) {
    //leakCanary內存泄露檢查
    mRefWatcher = BuildConfig.USE_CANARY ? LeakCanary.install(application) : RefWatcher.DISABLED;
}
 
開發者ID:GitLqr,項目名稱:LQRBiliBlili,代碼行數:4,代碼來源:MyAppLifecycles.java

示例12: onCreateInReleaseMode

@Override protected void onCreateInReleaseMode() {
  super.onCreateInReleaseMode();
  refWatcher = RefWatcher.DISABLED;
}
 
開發者ID:pyamsoft,項目名稱:dontsuck-mp,代碼行數:4,代碼來源:DontSuckMp.java

示例13: getRefWatcher

@NonNull
public RefWatcher getRefWatcher() {
    return RefWatcher.DISABLED;
}
 
開發者ID:AnironGlass,項目名稱:MVP-Boilerplate,代碼行數:4,代碼來源:App.java

示例14: provideRefWatcher

@NonNull
@Provides
@Singleton
RefWatcher provideRefWatcher() {
    return RefWatcher.DISABLED;
}
 
開發者ID:AnironGlass,項目名稱:MVP-Boilerplate,代碼行數:6,代碼來源:TestApplicationModule.java

示例15: refWatcher

@Provides
@Singleton
protected RefWatcher refWatcher() {
    return RefWatcher.DISABLED;
}
 
開發者ID:yshrsmz,項目名稱:photosearcher,代碼行數:5,代碼來源:AppModule.java


注:本文中的com.squareup.leakcanary.RefWatcher.DISABLED屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。