QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 Config.java 源代码,内容仅作参考
package com.tencent.tar;
import android.content.Context;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
public class Config {
public static final int APP_ID = 770;
public static final int APP_KEY = 771;
private static final int BOOLEAN_MASK = 256;
public static final int CACHE_DIR = 769;
public static final int CAMERA_API_LEVEL = 516;
public static final int CAMERA_API_LEVEL_1 = 1;
public static final int CAMERA_API_LEVEL_2 = 2;
public static final int CAMERA_FACE = 518;
public static final int CAMERA_FACE_BACK = 0;
public static final int CAMERA_FACE_FRONT = 1;
public static final int CAMERA_FRAME_HEIGHT = 515;
public static final int CAMERA_FRAME_WIDTH = 514;
public static final int CAMERA_IMAGE_FORMAT = 517;
public static final int CLOUD_APPLICATION_ID = 131842;
public static final int CLOUD_APPLICATION_KEY = 131843;
public static final int CLOUD_APP_ID = 2;
public static final String CLOUD_APP_NAME = "cloud";
private static final int CLOUD_BOOLEAN_KEY_END = 131333;
private static final int CLOUD_BOOLEAN_KEY_START = 131329;
public static final int CLOUD_IMAGE_SET_IDS = 133377;
private static final int CLOUD_INTEGER_KEY_END = 131591;
private static final int CLOUD_INTEGER_KEY_START = 131585;
public static final int CLOUD_RECOGNITION_MODE_GENERALIZE_LOCATION = 1;
public static final int CLOUD_RECOGNITION_MODE_MERGED = 0;
public static final int CLOUD_RECOGNITION_MODE_SEARCH = 2;
public static final int CLOUD_REQUEST_INTERVAL = 131585;
public static final int CLOUD_REQUEST_ORIENTATION = 131590;
public static final int CLOUD_REQUEST_RETRY_INTERVAL = 131586;
public static final int CLOUD_REQUEST_TYPE = 131589;
public static final int CLOUD_SAVE_JPG = 131332;
private static final int CLOUD_STRING_KEY_END = 131845;
private static final int CLOUD_STRING_KEY_START = 131841;
public static final int CLOUD_URL = 131841;
public static final int CLOUD_USER_ID = 131844;
private static final int COMMON_BOOLEAN_KEY_END = 269;
private static final int COMMON_BOOLEAN_KEY_START = 257;
private static final int COMMON_INTEGER_KEY_END = 520;
private static final int COMMON_INTEGER_KEY_START = 513;
private static final int COMMON_STRING_KEY_END = 772;
private static final int COMMON_STRING_KEY_START = 769;
private static final int CONFIG_TYPE_LEN = 5;
private static final int DOUBLE_ARRAY_MASK = 2048;
private static final int DOUBLE_MASK = 1280;
public static final int ENABLE_ALL_MAP_POINTS = 196869;
public static final int ENABLE_ASYNC_ONFRAME = 196880;
public static final int ENABLE_CLOUD = 258;
public static final int ENABLE_CLOUD_MARKER = 65795;
public static final int ENABLE_DUMP = 261;
public static final int ENABLE_EXTERNAL_SOURCE = 263;
public static final int ENABLE_FACE = 260;
public static final int ENABLE_FEATURE_POINTS = 196868;
public static final int ENABLE_GRAVITY_ALIGNMENT = 196877;
public static final int ENABLE_IMU_QUICK_INIT = 196875;
public static final int ENABLE_INIT_MATCHED_POINTS = 196872;
public static final int ENABLE_KEY_FRAME_SIZE = 196870;
public static final int ENABLE_LOGGER = 264;
public static final int ENABLE_MAP_POINTS_SIZE = 196871;
public static final int ENABLE_MARKER = 257;
public static final int ENABLE_MARKERLESS = 259;
public static final int ENABLE_MULTIPLY_PLANE = 196866;
public static final int ENABLE_NATIVE_SOFT_IMU = 196876;
public static final int ENABLE_NATIVE_TIME_CONSUMING = 196874;
public static final int ENABLE_PERMISSION_VERIFY = 268;
public static final int ENABLE_PLANE = 196865;
public static final int ENABLE_PLANE_ADJUSTMENT = 196879;
public static final int ENABLE_POINTCLOUD = 196867;
public static final int ENABLE_PROFILER = 265;
public static final int ENABLE_QUICK_PLANE = 196873;
public static final int ENABLE_RAW_DUMP = 262;
public static final int ENABLE_TIME_CONSUME_LOG = 196878;
public static final int EXTERNAL_SOURCE_FROM_DUMP = 1;
public static final int EXTERNAL_SOURCE_FROM_EXTERNAL = 0;
public static final int EXTERNAL_SOURCE_TYPE = 519;
public static final int FACE_APP_ID = 4;
public static final String FACE_APP_NAME = "face";
public static final int FACE_CONF_FILE_PATH = 262913;
public static final int FACE_DETECTION_MODE = 262657;
public static final int FACE_DETECTION_SINGLE_DETECTION_MODE = 2;
public static final int FACE_DETECTION_TRACKING_MODE = 1;
public static final int FEATURE_DETECT_ENABLE = 131331;
private static final int FLOAT_ARRAY_MASK = 1792;
private static final int FLOAT_MASK = 1024;
private static final int INTEGER_MASK = 512;
private static final int INT_ARRAY_MASK = 1536;
public static final int MARKERLESS_APP_ID = 3;
public static final String MARKERLESS_APP_NAME = "markerless";
private static final int MARKERLESS_BOOLEAN_KEY_END = 196881;
private static final int MARKERLESS_BOOLEAN_KEY_START = 196865;
private static final int MARKERLESS_INTEGER_KEY_END = 197122;
private static final int MARKERLESS_INTEGER_KEY_START = 197121;
private static final int MARKERLESS_STRING_KEY_END = 197379;
private static final int MARKERLESS_STRING_KEY_START = 197377;
public static final int MARKER_APP_ID = 1;
public static final String MARKER_APP_NAME = "marker";
private static final int MARKER_BOOLEAN_KEY_END = 65796;
private static final int MARKER_BOOLEAN_KEY_START = 65793;
private static final int MARKER_INTEGER_KEY_END = 66050;
private static final int MARKER_INTEGER_KEY_START = 66049;
private static final int MARKER_STRING_KEY_END = 66306;
private static final int MARKER_STRING_KEY_START = 66305;
public static final int MAX_MARKER_NUMBER = 66049;
public static final int MOTION_DETECT_ENABLE = 131330;
public static final int MOTION_DETECT_FEATRUE_MIN_NUM = 131587;
public static final int MOTION_DETECT_MAX_POINT_NUMBER = 131588;
public static final int NEED_IMAGE_DATA = 266;
public static final int NEED_SENSOR_DATA = 267;
public static final int NFT_CONF_FILE_PATH = 66305;
public static final int PERMIT_TO_RENDER_ALL_GLOBJ = 65793;
public static final int PERMIT_TO_RENDER_VIDEO_GLOBJ = 65794;
public static final int SCEEN_HEIGHT = 521;
public static final int SCEEN_WIDTH = 520;
public static final int SCREEN_ORIENTATION = 513;
public static final int SCREEN_ORIENTATION_LANDSCAPE = 0;
public static final int SCREEN_ORIENTATION_PORTRAIT = 1;
public static final int SLAM_CONFIG_PATH = 197377;
public static final int SLAM_VOC_PATH = 197378;
private static final int STRING_ARRAY_MASK = 2304;
private static final int STRING_MASK = 768;
public static final int SYSTEM_LOCK = 197121;
private static final String TAG = "Config";
private static final int TYPE_MASK = 3840;
public static final int USE_CLOUD = 131329;
private WeakReference<Context> mContextRef;
private ConfigImpl[] mImpls = new ConfigImpl[5];
private class CloudConfigImpl extends ConfigImpl {
private CloudConfigImpl(Context context) {
super(context);
a(131329, false);
a(Config.MOTION_DETECT_ENABLE, false);
a(Config.FEATURE_DETECT_ENABLE, false);
a(Config.CLOUD_SAVE_JPG, false);
a(131585, 300);
a(Config.CLOUD_REQUEST_RETRY_INTERVAL, 0);
a(Config.MOTION_DETECT_FEATRUE_MIN_NUM, 5);
a(Config.MOTION_DETECT_MAX_POINT_NUMBER, 1000);
a(Config.CLOUD_REQUEST_TYPE, 0);
a(Config.CLOUD_REQUEST_ORIENTATION, 0);
a(131841, "https://tar.qq.com/api_v2/query");
a(Config.CLOUD_APPLICATION_ID, "9709e207b5c765e3e48aa5489a9c3b80");
a(Config.CLOUD_APPLICATION_KEY, "dc112508cb3157bc53e8c5ece425eb8c");
a(Config.CLOUD_USER_ID, "carmzhu");
a(Config.CLOUD_IMAGE_SET_IDS, new String[]{"9f801cd2798ed8b834c65b46e940ab35"});
}
@Override
public boolean a(int i) {
if (i >= 131329 && i < Config.CLOUD_BOOLEAN_KEY_END) {
return true;
}
if (i < 131585 || i >= Config.CLOUD_INTEGER_KEY_END) {
return (i >= 131841 && i < Config.CLOUD_STRING_KEY_END) || i == 133377;
}
return true;
}
}
private class CommonConfigImpl extends ConfigImpl {
private CommonConfigImpl(Context context) {
super(context);
a(514, Integer.valueOf(Config.DOUBLE_MASK));
a(515, 720);
a(516, Integer.valueOf(a(context)));
a(513, 0);
a(Config.ENABLE_DUMP, false);
a(Config.ENABLE_RAW_DUMP, false);
a(263, false);
a(Config.ENABLE_LOGGER, false);
a(Config.ENABLE_TIME_CONSUME_LOG, false);
a(518, 0);
a(769, "Data");
a(Config.NEED_IMAGE_DATA, true);
a(Config.NEED_SENSOR_DATA, false);
a(268, false);
}
private int a(Context context) {
return 2;
}
@Override
public boolean a(int i) {
if (i >= 257 && i < 269) {
return true;
}
if (i < 513 || i >= 520) {
return i >= 769 && i < 772;
}
return true;
}
}
public abstract class ConfigImpl {
private Map f79964a = new HashMap();
public ConfigImpl(Context context) {
}
public <T> void a(int i, T t) {
if (a(i)) {
this.f79964a.put(Integer.valueOf(i), t);
}
}
public abstract boolean a(int i);
public <T> T b(int i) {
if (a(i)) {
return (T) this.f79964a.get(Integer.valueOf(i));
}
return null;
}
public boolean c(int i) {
return this.f79964a.containsKey(Integer.valueOf(i));
}
}
private class FaceConfigImpl extends ConfigImpl {
private FaceConfigImpl(Context context) {
super(context);
a(Config.FACE_DETECTION_MODE, 1);
a(Config.FACE_CONF_FILE_PATH, context.getCacheDir() + "/Data");
}
@Override
public boolean a(int i) {
return i == 262657 || i == 262913;
}
}
private class MarkerConfigImpl extends ConfigImpl {
private MarkerConfigImpl(Context context) {
super(context);
a(66049, 10);
a(65793, true);
a(Config.PERMIT_TO_RENDER_VIDEO_GLOBJ, false);
a(66305, context.getCacheDir() + "/Data/tar_conf.cfg");
a(Config.ENABLE_CLOUD_MARKER, false);
}
@Override
public boolean a(int i) {
if (i >= 65793 && i < Config.MARKER_BOOLEAN_KEY_END) {
return true;
}
if (i < 66049 || i >= Config.MARKER_INTEGER_KEY_END) {
return i >= 66305 && i < Config.MARKER_STRING_KEY_END;
}
return true;
}
}
private class MarkerlessConfigImpl extends ConfigImpl {
private MarkerlessConfigImpl(Context context) {
super(context);
a(196865, true);
a(Config.ENABLE_MULTIPLY_PLANE, false);
a(Config.ENABLE_POINTCLOUD, true);
a(Config.ENABLE_FEATURE_POINTS, false);
a(Config.ENABLE_ALL_MAP_POINTS, false);
a(Config.ENABLE_KEY_FRAME_SIZE, false);
a(Config.ENABLE_MAP_POINTS_SIZE, false);
a(Config.ENABLE_INIT_MATCHED_POINTS, false);
a(Config.ENABLE_IMU_QUICK_INIT, false);
a(Config.ENABLE_GRAVITY_ALIGNMENT, true);
a(Config.ENABLE_NATIVE_SOFT_IMU, true);
a(Config.ENABLE_PLANE_ADJUSTMENT, false);
a(197121, 0);
a(Config.ENABLE_QUICK_PLANE, false);
a(Config.ENABLE_NATIVE_TIME_CONSUMING, false);
a(Config.ENABLE_ASYNC_ONFRAME, true);
a(197377, context.getCacheDir() + "/Data/tar_slam_settings.yaml");
a(Config.SLAM_VOC_PATH, context.getCacheDir() + "/Data/tar_slam_voc_light.bin");
}
@Override
public boolean a(int i) {
if (i >= 196865 && i < Config.MARKERLESS_BOOLEAN_KEY_END) {
return true;
}
if (i < 197121 || i >= Config.MARKERLESS_INTEGER_KEY_END) {
return i >= 197377 && i < Config.MARKERLESS_STRING_KEY_END;
}
return true;
}
}
public Config(Context context) {
this.mImpls[0] = new CommonConfigImpl(context);
this.mContextRef = new WeakReference<>(context);
}
private boolean hasKey(int i) {
int keyType = keyType(i);
if (keyType >= 5) {
return false;
}
ConfigImpl[] configImplArr = this.mImpls;
if (configImplArr[keyType] != null) {
return configImplArr[keyType].c(i);
}
return false;
}
private boolean isBooleanKey(int i) {
return (i & TYPE_MASK) == 256;
}
private boolean isIntegerKey(int i) {
return (i & TYPE_MASK) == 512;
}
private boolean isStringKey(int i) {
return (i & TYPE_MASK) == 768;
}
private int keyType(int i) {
return (i & 983040) >> 16;
}
public void disable(int i) {
if (isBooleanKey(i)) {
setValue(i, false);
}
}
public void enable(int i) {
if (isBooleanKey(i)) {
setValue(i, true);
}
}
public void enableCloud() {
this.mImpls[2] = new CloudConfigImpl(this.mContextRef.get());
this.mImpls[0].a(ENABLE_CLOUD, true);
}
public void enableFace() {
this.mImpls[4] = new FaceConfigImpl(this.mContextRef.get());
this.mImpls[0].a(ENABLE_FACE, true);
}
public void enableMarker() {
this.mImpls[1] = new MarkerConfigImpl(this.mContextRef.get());
this.mImpls[0].a(257, true);
}
public void enableMarkerless() {
this.mImpls[3] = new MarkerlessConfigImpl(this.mContextRef.get());
this.mImpls[0].a(ENABLE_MARKERLESS, true);
this.mImpls[0].a(NEED_SENSOR_DATA, true);
}
public int getIntegerValue(int i) {
if (isIntegerKey(i) && hasKey(i)) {
return ((Integer) getValue(i)).intValue();
}
return -1;
}
public final String getStringValue(int i) {
return (isStringKey(i) && hasKey(i)) ? (String) getValue(i) : "";
}
public <T> T getValue(int i) {
int keyType = keyType(i);
if (keyType >= 5) {
return null;
}
ConfigImpl[] configImplArr = this.mImpls;
if (configImplArr[keyType] != null) {
return (T) configImplArr[keyType].b(i);
}
return null;
}
public boolean isEnabled(int i) {
if (isBooleanKey(i) && hasKey(i)) {
return ((Boolean) getValue(i)).booleanValue();
}
return false;
}
public boolean keySupported(int i) {
int keyType = keyType(i);
if (keyType >= 5) {
return false;
}
ConfigImpl[] configImplArr = this.mImpls;
if (configImplArr[keyType] != null) {
return configImplArr[keyType].a(i);
}
return false;
}
public void setIntegerValue(int i, int i2) {
if (isIntegerKey(i)) {
setValue(i, Integer.valueOf(i2));
}
}
public void setStringValue(int i, String str) {
if (isStringKey(i)) {
setValue(i, str);
}
}
public <T> void setValue(int i, T t) {
int keyType = keyType(i);
if (keyType < 5) {
ConfigImpl[] configImplArr = this.mImpls;
if (configImplArr[keyType] != null) {
configImplArr[keyType].a(i, t);
}
}
}
}