CondomContext.java 文件源码

java
阅读 52 收藏 0 点赞 0 评论 0

项目:MiPushFramework 作者:
private CondomContext(final CondomCore condom, final @Nullable Context app_context, final @Nullable @Size(max=16) String tag) {
    super(condom.mBase);
    final Context base = condom.mBase;
    mCondom = condom;
    mApplicationContext = app_context != null ? app_context : this;
    mBaseContext = new Lazy<Context>() { @Override protected Context create() {
        return new PseudoContextImpl(CondomContext.this);
    }};
    mPackageManager = new Lazy<PackageManager>() { @Override protected PackageManager create() {
        return new CondomPackageManager(base.getPackageManager());
    }};
    mContentResolver = new Lazy<ContentResolver>() { @Override protected ContentResolver create() {
        return new CondomContentResolver(base, base.getContentResolver());
    }};
    final List<CondomKit> kits = condom.mKits;
    if (kits != null && ! kits.isEmpty()) {
        mKitManager = new KitManager();
        for (final CondomKit kit : kits)
            kit.onRegister(mKitManager);
    } else mKitManager = null;
    TAG = CondomCore.buildLogTag("Condom", "Condom.", tag);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号