隐私合规
Shark隐私合规说明
Shark 1.4.2.7之前版本, AbsSharkOutlet内部有获取imei/imsi/androidID/mac地址等敏感信息的相关实现,如果客户接入过程有用到AbsSharkOutlet,可能会涉及隐私合规问题,规避该问题有两种方法:
- 将Shark升级到1.4.2.7及以上版本
重写AbsSharkOutlet/ISharkOutlet.onGetRealInfoOfGuid方法,自行去掉敏感信息相关实现。重写示例代码:
/** * 获取当前的guid注册信息 */ @Override public CSRegist onGetRealInfoOfGuid() { Context context = mContext; SizeInfo sdSize = new SizeInfo(); PhoneInfoUtil.getStorageCardSize(sdSize); SizeInfo phoneStorageSize = new SizeInfo(); PhoneInfoUtil.getPhoneStorageSize(phoneStorageSize); int resolution1 = PhoneInfoUtil.getScreenWidth(context); int resolution2 = PhoneInfoUtil.getScreenHeight(context); if (resolution1 < resolution2) { int t = resolution1; resolution1 = resolution2; resolution2 = t; } CSRegist rr = new CSRegist(); rr.imei = "00000000000000"; // require字段,必须不为null rr.mac = ""; rr.qq = "0"; rr.phone = "0"; rr.product = mSharkConfig.getProductId(); rr.version = onGetVersionName(); rr.lc = onGetLC(); rr.buildno = onGetBuildNo(); rr.channelid = onGetChannel(); // 双卡暂不考虑,需要云适配才有意义 rr.simnum = 1; rr.isdual = false; rr.imsi = ""; rr.imsi_2 = null; rr.imsi_op = "" rr.platform = EPhoneType.MPT_Android; final int ESP_Android_General = 201; rr.subplatform = ESP_Android_General; rr.isbuildin = EnvUtil.isBuildIn(context); try { rr.pkgname = context.getPackageName(); } catch (Throwable e) { Log.e(TAG, "", e); } rr.ua = StringUtil.ensureNotNull(PhoneInfoUtil.getModelName(context)); rr.sdkver = SDKUtil.getSDKVersion(); rr.androidid = StringUtil.ensureNotNull(""); rr.lang = 2052; // 中文 String[] info = EnvUtil.getPhoneInfo(context); rr.cpu = info[2]; rr.cpu_abi2 = PhoneInfoUtil.getBuildPropFiel("ro.product.cpu.abi2"); rr.cpufreq = EnvUtil.getMaxCpuFreq(); rr.cpunum = EnvUtil.getCpuNum(); rr.resolution = resolution1 + "*" + resolution2; rr.ram = PhoneInfoUtil.getTotalMemery(); rr.rom = EnvUtil.getSystemAndDataSize(); rr.sdcard = sdSize.totalSize; rr.inner_storage = phoneStorageSize.totalSize; rr.build_brand = StringUtil.ensureNotNull(PhoneInfoUtil.getBrand(context)); rr.build_version_incremental = StringUtil.ensureNotNull(PhoneInfoUtil.getVersionIncremental()); rr.build_version_release = StringUtil.ensureNotNull(PhoneInfoUtil.getVersionRelease()); rr.extSdkVer = 1; rr.pkgkey = StringUtil.ensureNotNull(context.getPackageName()); rr.manufactory = PhoneInfoUtil.getManufaturer(); rr.cam_pix = 0; // PhoneInfoUtil.getBackCameraPixel(); rr.front_cam_pix = 0; // PhoneInfoUtil.getFrontCameraPixel(); rr.product_device = PhoneInfoUtil.getDevice(); rr.product_board = PhoneInfoUtil.getBoard(); rr.build_product = PhoneInfoUtil.getBuildPropFiel("ro.build.product"); rr.rom_fingerprint = PhoneInfoUtil.getBuildPropFiel("ro.build.fingerprint"); rr.product_lanuage = PhoneInfoUtil.getBuildPropFiel("ro.product.locale.language"); rr.product_region = PhoneInfoUtil.getBuildPropFiel("ro.product.locale.region"); rr.build_radiover = PhoneInfoUtil.getRadioVersion(); rr.board_platform = PhoneInfoUtil.getBuildPropFiel("ro.board.platform"); rr.board_platform_mtk = PhoneInfoUtil.getBuildPropFiel("ro.mediatek.platform"); rr.screen_pdi = PhoneInfoUtil.getBuildPropFiel("ro.sf.lcd_density"); rr.romname = PhoneInfoUtil.getBuildPropFiel("ro.product.name"); rr.romversion = PhoneInfoUtil.getBuildPropFiel("ro.build.version.release"); rr.kernel_ver = PhoneInfoUtil.getKernelVersion(false); final int EBT_CUSTOMIZE = 2; rr.app_build_type = EBT_CUSTOMIZE; rr.rom_manufactory_version = PhoneInfoUtil.getManufacturerRomVersion(); rr.insideCid = PhoneInfoUtil.getSDCid(true); rr.outsideCid = PhoneInfoUtil.getSDCid(false); // 如果有oaid,则填到deviceId4,没有就不用填 // rr.deviceId4 = "这里换成oaid" return rr; }