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


Java LeakCanary.isInAnalyzerProcess方法代碼示例

本文整理匯總了Java中com.squareup.leakcanary.LeakCanary.isInAnalyzerProcess方法的典型用法代碼示例。如果您正苦於以下問題:Java LeakCanary.isInAnalyzerProcess方法的具體用法?Java LeakCanary.isInAnalyzerProcess怎麽用?Java LeakCanary.isInAnalyzerProcess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.squareup.leakcanary.LeakCanary的用法示例。


在下文中一共展示了LeakCanary.isInAnalyzerProcess方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this);
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }
    Timber.i("I am Knell.");
    Utils.init(this);
    birthdayManager = BirthdayManagerImpl.create(this);
}
 
開發者ID:PocketX,項目名稱:PocketKnell,代碼行數:17,代碼來源:App.java

示例2: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    // This process is dedicated to LeakCanary for heap analysis.
    // You should not init your app in this process.
    return;
  }

  if (BuildConfig.DEBUG) {
    Timber.plant(new Timber.DebugTree());
  }

  LeakCanary.install(this);
  initializeLogger();
  Mapbox.getInstance(this, getString(R.string.mapbox_access_token));
  Timber.plant(new Timber.DebugTree());

  // TODO remove when 5.2.1 is released
  FileSource.getInstance(this).activate();
}
 
開發者ID:mapbox,項目名稱:mapbox-plugins-android,代碼行數:22,代碼來源:PluginApplication.java

示例3: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    application = this;

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this);

    // Dagger%COMPONENT_NAME%
    myGeofencerComponent = DaggerMyGeofencerComponent.builder()
            .contextModule(new ContextModule(this))
            .myGeofenceRepositoryModule(new MyGeofenceRepositoryModule())
            .geofencingControllerModule(new GeofencingControllerModule())
            .build();
}
 
開發者ID:RobinCaroff,項目名稱:MyGeofencer,代碼行數:21,代碼來源:MyGeofencerApplication.java

示例4: setupLeakCanary

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
/**
 * 啟動LeakCanary性能監測
 * 該方法應該盡早的調用,以便能夠監測到更多的程序內容
 */
protected void setupLeakCanary() {
    // 這裏需要先掛載LeakCanary的heap analysis 進程
    // 如果掛載失敗是不能使用LeakCanary的。
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    LeakCanary.install(this);
}
 
開發者ID:ymqq,項目名稱:CommonFramework,代碼行數:13,代碼來源:BaseApplication.java

示例5: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this);
    // Normal app init code...



    QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {

        @Override
        public void onViewInitFinished(boolean arg0) {
            // TODO Auto-generated method stub
            //x5內核初始化完成的回調,為true表示x5內核加載成功,否則表示x5內核加載失敗,會自動切換到係統內核。
            Log.d("app", " onViewInitFinished is " + arg0);


        }

        @Override
        public void onCoreInitFinished() {
            // TODO Auto-generated method stub
        }
    };
    //x5內核初始化接口
    QbSdk.initX5Environment(getApplicationContext(),  cb);
}
 
開發者ID:Justson,項目名稱:AgentWebX5,代碼行數:34,代碼來源:App.java

示例6: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override public void onCreate() {
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    // This process is dedicated to LeakCanary for heap analysis.
    // You should not init your app in this process.
    return;
  }
  refWatcher = LeakCanary.install(this);
  Timber.d("Starting Application");
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:SampleApplication.java

示例7: setUpDebugEnvironment

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
private void setUpDebugEnvironment() {
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    LeakCanary.install(this);
    if (!BuildConfig.DEBUG)
        Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(ErrorReportActivity.class));
}
 
開發者ID:hyb1996,項目名稱:Auto.js,代碼行數:9,代碼來源:App.java

示例8: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    //noinspection ConstantConditions
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this);
    // Normal app init code...
}
 
開發者ID:Vorlonsoft,項目名稱:AndroidRate,代碼行數:13,代碼來源:SampleApplication.java

示例9: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    context = getApplicationContext();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    LeakCanary.install(this);

    QDUpgradeManager.getInstance(this).check();
}
 
開發者ID:QMUI,項目名稱:QMUI_Android,代碼行數:12,代碼來源:QDApplication.java

示例10: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    LeakCanary.install(this);
}
 
開發者ID:crazysunj,項目名稱:MultiTypeRecyclerViewAdapter,代碼行數:9,代碼來源:APP.java

示例11: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:App.java

示例12: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }

    enabledStrictMode();
    refWatcher = LeakCanary.install(this);
}
 
開發者ID:mainh,項目名稱:MainCalendar,代碼行數:12,代碼來源:MainApplication.java

示例13: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override public void onCreate() {
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    // This process is dedicated to LeakCanary for heap analysis.
    // You should not init your app in this process.
    return;
  }
  mailComponent = DaggerMailAppComponent.create();
  refWatcher = LeakCanary.install(this);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:MailApplication.java

示例14: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    if (!LeakCanary.isInAnalyzerProcess(this)) {
        LeakCanary.install(this);
    }
}
 
開發者ID:huazhouwang,項目名稱:Synapse,代碼行數:9,代碼來源:DebugApp.java

示例15: onCreate

import com.squareup.leakcanary.LeakCanary; //導入方法依賴的package包/類
@Override public void onCreate() {
  super.onCreate();

  if (LeakCanary.isInAnalyzerProcess(this)) {
    // This process is dedicated to LeakCanary for heap analysis.
    // You should not init your app in this process.
    return;
  }
  LeakCanary.install(this);

  fixUserManagerMemoryLeak();

  buildObjectGraphAndInject();
}
 
開發者ID:philipphager,項目名稱:disclosure-android-app,代碼行數:15,代碼來源:DisclosureApp.java


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