当前位置: 首页>>代码示例>>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;未经允许,请勿转载。