最新的内核加了点击图片放大功能,然而我并不需要,提供方法供参考
QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
@Override
public void onCoreInitFinished() {
X5ImageScanSwitchUtil.X5ImageScanSwitch(AppApplication.this,0);
}
@Override
public void onViewInitFinished(boolean b) {
}
});
/**
* x5图片点击开关,坑货
* https://github.com/ghbhaha
* @param context
* @param status
*/
public static void X5ImageScanSwitch(Context context, int status) {
try {
int pid = android.os.Process.myPid();
String processName = "";
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningAppProcessInfo process: manager.getRunningAppProcesses()) {
if(process.pid == pid)
{
processName = process.processName;
}
}
String sharePreName = processName.replace(":","_") + "_tbs_public_settings";
SharedPreferences sp = context.getSharedPreferences(sharePreName, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putInt("key_tbs_general_feature_switch_click_image_scan",status);
editor.commit();
}catch (Exception e){
}
}
复制代码