本文整理了Java中android.app.Activity.attachBaseContext()
方法的一些代码示例,展示了Activity.attachBaseContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.attachBaseContext()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:attachBaseContext
暂无
代码示例来源:origin: mikepenz/Android-Iconics
@Override
protected void attachBaseContext(Context newBase) {
//not compatible with Calligraphy
super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
}
代码示例来源:origin: tiann/understand-plugin-framework
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
try {
// 在这里进行Hook
HookHelper.attachContext();
} catch (Exception e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: tiann/understand-plugin-framework
@Override
protected void attachBaseContext(Context newBase) {
HookHelper.hookActivityManager();
HookHelper.hookPackageManager(newBase);
super.attachBaseContext(newBase);
}
代码示例来源:origin: tiann/understand-plugin-framework
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
try {
Utils.extractAssets(newBase, "dynamic-proxy-hook.apk");
Utils.extractAssets(newBase, "ams-pms-hook.apk");
Utils.extractAssets(newBase, "test.apk");
if (HOOK_METHOD == PATCH_BASE_CLASS_LOADER) {
File dexFile = getFileStreamPath("test.apk");
File optDexFile = getFileStreamPath("test.dex");
BaseDexClassLoaderHookHelper.patchClassLoader(getClassLoader(), dexFile, optDexFile);
} else {
LoadedApkClassLoaderHookHelper.hookLoadedApkInActivityThread(getFileStreamPath("ams-pms-hook.apk"));
}
AMSHookHelper.hookActivityManagerNative();
AMSHookHelper.hookActivityThreadHandler();
} catch (Throwable e) {
e.printStackTrace();
}
}
代码示例来源:origin: RealMoMo/Study_Android_Demo
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
// !!! 不要在此Hook,看源码发现mInstrumentaion会在此方法后初始化
}
代码示例来源:origin: iReaderAndroid/ZeusPlugin
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
helper.attachBaseContext(newBase,this);
}
代码示例来源:origin: jamorham/xDrip-plus
@Override
protected void attachBaseContext(final Context baseContext) {
final Context context = xdrip.getLangContext(baseContext);
super.attachBaseContext(context);
}
代码示例来源:origin: cyclestreets/android
@Override
protected void attachBaseContext(Context newBase) {
// Allows the use of Material icon library, see https://github.com/mikepenz/Android-Iconics
super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
}
代码示例来源:origin: NightscoutFoundation/xDrip
@Override
protected void attachBaseContext(final Context baseContext) {
final Context context = xdrip.getLangContext(baseContext);
super.attachBaseContext(context);
}
代码示例来源:origin: segmentio/analytics-android
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
}
代码示例来源:origin: dsolonenko/financisto
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(MyPreferences.switchLocale(base));
}
代码示例来源:origin: dsolonenko/financisto
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(MyPreferences.switchLocale(base));
}
代码示例来源:origin: dsolonenko/financisto
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(MyPreferences.switchLocale(base));
}
代码示例来源:origin: fgl27/isu
@Override
protected void attachBaseContext(Context context) {
super.attachBaseContext(CustomContextWrapper.wrap(context));
}
代码示例来源:origin: dsolonenko/financisto
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(MyPreferences.switchLocale(base));
}
代码示例来源:origin: dsolonenko/financisto
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(MyPreferences.switchLocale(base));
}
代码示例来源:origin: iqiyi/Neptune
@Override
protected void attachBaseContext(Context newBase) {
// 替换插件的BaseContext
mDelegate = new PluginActivityDelegate();
newBase = mDelegate.createActivityContext(this, newBase);
super.attachBaseContext(newBase);
}
代码示例来源:origin: sealtalk/sealtalk-android
@Override
protected void attachBaseContext(Context newBase) {
Context newContext = RongConfigurationManager.getInstance().getConfigurationContext(newBase);
super.attachBaseContext(newContext);
}
}
代码示例来源:origin: huxq17/tractor
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
mBase = Base.getInstance(getApplicationContext());
}
代码示例来源:origin: BoBoMEe/Android-Demos
@Override protected void attachBaseContext(Context baseContext) {
baseContext = Flow.configure(baseContext, this) //
.dispatcher(new BasicDispatcher(this)) //
.defaultKey(new WelcomeScreen()) //
.keyParceler(new BasicKeyParceler()) //
.install();
super.attachBaseContext(baseContext);
}
内容来源于网络,如有侵权,请联系作者删除!