Commit d1a4373c by yichen

1、新开分支

parent f8fa5323
...@@ -455,6 +455,46 @@ native <methods>; ...@@ -455,6 +455,46 @@ native <methods>;
# ==================gdt end=================== # ==================gdt end===================
# ==================oaid start===================
# sdk
-keep class com.bun.miitmdid.** { *; }
-keep interface com.bun.supplier.** { *; }
# asus
-keep class com.asus.msa.SupplementaryDID.** { *; }
-keep class com.asus.msa.sdid.** { *; }
# freeme
-keep class com.android.creator.** { *; }
-keep class com.android.msasdk.** { *; }
# huawei
-keep class com.huawei.hms.ads.** { *; }
-keep interface com.huawei.hms.ads.** {*; }
# lenovo
-keep class com.zui.deviceidservice.** { *; }
-keep class com.zui.opendeviceidlibrary.** { *; }
# meizu
-keep class com.meizu.flyme.openidsdk.** { *; }
# nubia
-keep class com.bun.miitmdid.provider.nubia.NubiaIdentityImpl { *; }
# oppo
-keep class com.heytap.openid.** { *; }
# samsung
-keep class com.samsung.android.deviceidservice.** { *; }
# vivo
-keep class com.vivo.identifier.** { *; }
# xiaomi
-keep class com.bun.miitmdid.provider.xiaomi.IdentifierManager { *; }
# zte
-keep class com.bun.lib.** { *; }
# coolpad
-keep class com.coolpad.deviceidsupport.** { *; }
# ==================gdt end===================
......
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
<!-- 设置环信应用的AppKey --> <!-- 设置环信应用的AppKey -->
<meta-data <meta-data
android:name="EASEMOB_APPKEY" android:name="EASEMOB_APPKEY"
android:value="1102211214116810#room" /> android:value="1118210302098649#hongshanliving" />
<meta-data <meta-data
android:name="UMENG_APPKEY" android:name="UMENG_APPKEY"
android:value="625d03d7d024421570beb456" /> android:value="62e64bf005844627b507fd59" />
<meta-data <meta-data
android:name="UMENG_CHANNEL" android:name="UMENG_CHANNEL"
android:value="${UMENG_CHANNEL_VALUE}" /> android:value="${UMENG_CHANNEL_VALUE}" />
......
{
"supplier":{
"vivo":{
"appid":"100215079"
}
}
}
...@@ -20,7 +20,7 @@ interface HostUrl { ...@@ -20,7 +20,7 @@ interface HostUrl {
// const val HOST_URL = "http://129.226.169.250:8051/excuse/" // const val HOST_URL = "http://129.226.169.250:8051/excuse/"
const val HOST_URL = "http://api.qiujuzb.com/excuse/" const val HOST_URL = "http://api.hadazb.com/excuse/"
/** /**
...@@ -48,6 +48,11 @@ interface HostUrl { ...@@ -48,6 +48,11 @@ interface HostUrl {
const val POST_LIST_ICON = "capi/index/listIcon" const val POST_LIST_ICON = "capi/index/listIcon"
/**
* 敏感词正则表达式
*/
const val COMMON_GET_CONFIG_VALUE = "common/getConfigValue"
/** /**
* 登录接口 * 登录接口
......
...@@ -2,6 +2,7 @@ package com.hupu.tv.player.app.api ...@@ -2,6 +2,7 @@ package com.hupu.tv.player.app.api
import com.softgarden.baselibrary.network.BaseBean import com.softgarden.baselibrary.network.BaseBean
import com.hupu.tv.player.app.bean.* import com.hupu.tv.player.app.bean.*
import com.hupu.tv.player.app.utils.JsonUtils
import com.hupu.tv.player.app.utils.ProductFlavors import com.hupu.tv.player.app.utils.ProductFlavors
import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.core.Observable
...@@ -124,6 +125,13 @@ interface RetrofitService {/*@Field("is_new") int is_new*/ ...@@ -124,6 +125,13 @@ interface RetrofitService {/*@Field("is_new") int is_new*/
@POST(HostUrl.POST_WINNER) @POST(HostUrl.POST_WINNER)
fun getWinnerList(): Observable<BaseBean<List<String>>> fun getWinnerList(): Observable<BaseBean<List<String>>>
/**
* 敏感词正则表达式
*/
@POST(HostUrl.COMMON_GET_CONFIG_VALUE)
fun getConfigValue(@Body body: RequestBody = JsonUtils.toRequestBody(hashMapOf("configName" to "FILTER_KEYWORDS"))): Observable<BaseBean<String>>
/** /**
* 购买影片支付接口 * 购买影片支付接口
*/ */
......
...@@ -8,6 +8,7 @@ import android.widget.ImageView ...@@ -8,6 +8,7 @@ import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.multidex.MultiDex import androidx.multidex.MultiDex
import com.blankj.utilcode.util.LogUtils import com.blankj.utilcode.util.LogUtils
//import com.bun.miitmdid.core.MdidSdkHelper
import com.bytedance.applog.AppLog import com.bytedance.applog.AppLog
import com.bytedance.applog.ILogger import com.bytedance.applog.ILogger
import com.bytedance.applog.InitConfig import com.bytedance.applog.InitConfig
...@@ -110,6 +111,8 @@ class App : BaseApplication() { ...@@ -110,6 +111,8 @@ class App : BaseApplication() {
} }
fun initLib() { fun initLib() {
// System.loadLibrary("msaoaidsec")
// MdidSdkHelper.InitCert()
MultiDex.install(this) MultiDex.install(this)
initUpdate() initUpdate()
initCrash() initCrash()
......
...@@ -455,6 +455,9 @@ object Constants { ...@@ -455,6 +455,9 @@ object Constants {
const val MATCH_BEAN_ID = "match_bean_id" const val MATCH_BEAN_ID = "match_bean_id"
//敏感词正则表达式
const val CONFIG_VALUE = "CONFIG_VALUE"
const val USER_PHONE = "user_phone" const val USER_PHONE = "user_phone"
const val USER_CODE = "user_code" const val USER_CODE = "user_code"
...@@ -533,5 +536,8 @@ object Constants { ...@@ -533,5 +536,8 @@ object Constants {
const val HX_ID = "HX_ID" const val HX_ID = "HX_ID"
const val CONVERSATION_ID = "CONVERSATION_ID" const val CONVERSATION_ID = "CONVERSATION_ID"
const val USER_PRIVATE = "https://m.hadazb.com/privacy.html"
const val USER_AGREE = "http://m.hadazb.com/agreement.html"
} }
\ No newline at end of file
package com.hupu.tv.player.app.oaid;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.security.cert.CertificateException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateFactory;
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
public class CertUtil {
public static String getCertInfo(String appCertPem){
CertificateFactory fact;
InputStream in = new ByteArrayInputStream(appCertPem.getBytes());
X509Certificate appCert;
try {
fact = CertificateFactory.getInstance("X.509");
appCert = (X509Certificate) fact.generateCertificate(in);
} catch (CertificateException e) {
return "[Cert Format Error]";
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String certInfo = "Cert: \nSubjectName: " + appCert.getSubjectX500Principal().getName() +
"\nNot Before: " + sdf.format(appCert.getNotBefore()) +
"\nNot After: " + sdf.format(appCert.getNotAfter());
try {
appCert.checkValidity();
} catch (CertificateExpiredException e) {
return certInfo +"\n[Expired]";
} catch (CertificateNotYetValidException e) {
return certInfo +"\n[NotYetValid]";
}
return certInfo+ "\n[Valid]";
}
}
//package com.hupu.tv.player.app.oaid;
//
//import android.content.Context;
//import android.util.Log;
//
//import com.bun.miitmdid.core.InfoCode;
//import com.bun.miitmdid.core.MdidSdkHelper;
//import com.bun.miitmdid.interfaces.IIdentifierListener;
//import com.bun.miitmdid.interfaces.IdSupplier;
//import com.bun.miitmdid.pojo.IdSupplierImpl;
//
//import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStream;
//import java.io.InputStreamReader;
//
///**
//* Date: 16:27 2021/2/26 0026
// * Version: 1.0.3
//**/
//public class DemoHelper implements IIdentifierListener {
//
// public static final String TAG = "DemoHelper";
// public static final int HELPER_VERSION_CODE = 20220520; // DemoHelper版本号
// private final AppIdsUpdater appIdsUpdater;
// private boolean isCertInit = false;
//
// public boolean isSDKLogOn = true; // TODO (1)设置 是否开启sdk日志
// public static final String ASSET_FILE_NAME_CERT = "com.example.oaidtest2.cert.pem"; // TODO (2)设置 asset证书文件名
//
// public DemoHelper(AppIdsUpdater appIdsUpdater){
// // TODO (3)加固版本在调用前必须载入SDK安全库,因为加载有延迟,推荐在application中调用loadLibrary方法
// // System.loadLibrary("msaoaidsec");
// // DemoHelper版本建议与SDK版本一致
// if(MdidSdkHelper.SDK_VERSION_CODE != HELPER_VERSION_CODE){
// Log.w(TAG,"SDK version not match.");
// }
// this.appIdsUpdater = appIdsUpdater;
// }
//
// public void getDeviceIds(Context cxt){
// getDeviceIds(cxt, true, true, true);
// }
//
//
//
// /**
// * 获取OAID
// * @param cxt
// */
// public void getDeviceIds(Context cxt,boolean isGetOAID,boolean isGetVAID,boolean isGetAAID){
// // TODO (4)初始化SDK证书
// if(!isCertInit){ // 证书只需初始化一次
// // 证书为PEM文件中的所有文本内容(包括首尾行、换行符)
// try {
// isCertInit = MdidSdkHelper.InitCert(cxt, loadPemFromAssetFile(cxt, ASSET_FILE_NAME_CERT));
// } catch (Error e) {
// e.printStackTrace();
// }
// if(!isCertInit){
// Log.w(TAG, "getDeviceIds: cert init failed");
// }
// }
//
// //(可选)设置InitSDK接口回调超时时间(仅适用于接口为异步),默认值为5000ms.
// // 注:请在调用前设置一次后就不再更改,否则可能导致回调丢失、重复等问题
// try {
// MdidSdkHelper.setGlobalTimeout(5000);
// } catch (Error error) {
// error.printStackTrace();
// }
// int code = 0;
// // TODO (5)调用SDK获取ID
// try {
// code = MdidSdkHelper.InitSdk(cxt, isSDKLogOn, isGetOAID, isGetVAID, isGetAAID, this);
// } catch (Error error) {
// error.printStackTrace();
// }
//
// // TODO (6)根据SDK返回的code进行不同处理
// IdSupplierImpl unsupportedIdSupplier = new IdSupplierImpl();
// if(code == InfoCode.INIT_ERROR_CERT_ERROR){ // 证书未初始化或证书无效,SDK内部不会回调onSupport
// // APP自定义逻辑
// Log.w(TAG,"cert not init or check not pass");
// onSupport(unsupportedIdSupplier);
// }else if(code == InfoCode.INIT_ERROR_DEVICE_NOSUPPORT){ // 不支持的设备, SDK内部不会回调onSupport
// // APP自定义逻辑
// Log.w(TAG,"device not supported");
// onSupport(unsupportedIdSupplier);
// }else if( code == InfoCode.INIT_ERROR_LOAD_CONFIGFILE){ // 加载配置文件出错, SDK内部不会回调onSupport
// // APP自定义逻辑
// Log.w(TAG,"failed to load config file");
// onSupport(unsupportedIdSupplier);
// }else if(code == InfoCode.INIT_ERROR_MANUFACTURER_NOSUPPORT){ // 不支持的设备厂商, SDK内部不会回调onSupport
// // APP自定义逻辑
// Log.w(TAG,"manufacturer not supported");
// onSupport(unsupportedIdSupplier);
// }else if(code == InfoCode.INIT_ERROR_SDK_CALL_ERROR){ // sdk调用出错, SSDK内部不会回调onSupport
// // APP自定义逻辑
// Log.w(TAG,"sdk call error");
// onSupport(unsupportedIdSupplier);
// } else if(code == InfoCode.INIT_INFO_RESULT_DELAY) { // 获取接口是异步的,SDK内部会回调onSupport
// Log.i(TAG, "result delay (async)");
// }else if(code == InfoCode.INIT_INFO_RESULT_OK){ // 获取接口是同步的,SDK内部会回调onSupport
// Log.i(TAG, "result ok (sync)");
// }else {
// // sdk版本高于DemoHelper代码版本可能出现的情况,无法确定是否调用onSupport
// // 不影响成功的OAID获取
// Log.w(TAG,"getDeviceIds: unknown code: " + code);
// }
// }
//
// /**
// * APP自定义的getDeviceIds(Context cxt)的接口回调
// * @param supplier
// */
// @Override
// public void onSupport(IdSupplier supplier) {
// if(supplier==null) {
// Log.w(TAG, "onSupport: supplier is null");
// return;
// }
// if(appIdsUpdater ==null) {
// Log.w(TAG, "onSupport: callbackListener is null");
// return;
// }
// // 获取Id信息
// // 注:IdSupplier中的内容为本次调用MdidSdkHelper.InitSdk()的结果,不会实时更新。 如需更新,需调用MdidSdkHelper.InitSdk()
// boolean isSupported = supplier.isSupported();
// boolean isLimited = supplier.isLimited();
// String oaid=supplier.getOAID();
// String vaid=supplier.getVAID();
// String aaid=supplier.getAAID();
//
// //TODO (7) 自定义后续流程,以下显示到UI的示例
// String idsText= "support: " + (isSupported ? "true" : "false") +
// "\nlimit: " + (isLimited ? "true" : "false") +
// "\nOAID: " + oaid +
// "\nVAID: " + vaid +
// "\nAAID: " + aaid + "\n";
// Log.d(TAG, "onSupport: ids: \n" + idsText);
// appIdsUpdater.onIdsValid(idsText);
// }
//
// public interface AppIdsUpdater{
// void onIdsValid(String ids);
// }
//
// /**
// * 从asset文件读取证书内容
// * @param context
// * @param assetFileName
// * @return 证书字符串
// */
// public static String loadPemFromAssetFile(Context context, String assetFileName){
// try {
// InputStream is = context.getAssets().open(assetFileName);
// BufferedReader in = new BufferedReader(new InputStreamReader(is));
// StringBuilder builder = new StringBuilder();
// String line;
// while ((line = in.readLine()) != null){
// builder.append(line);
// builder.append('\n');
// }
// return builder.toString();
// } catch (IOException e) {
// Log.e(TAG, "loadPemFromAssetFile failed");
// return "";
// }
// }
//}
//
package com.hupu.tv.player.app.oaid;
import android.os.Build;
import java.text.SimpleDateFormat;
public class SystemInfoUtil {
/**
* 获取当前手机系统版本号
* @return 系统时间
*/
public static String getSystemTime(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(System.currentTimeMillis());
}
/**
* 获取当前手机系统版本号
* @return 系统版本号
*/
public static String getSystemVersion() {
return Build.VERSION.RELEASE;
}
/**
* 获取手机型号
* @return 手机型号
*/
public static String getSystemModel() {
return Build.MODEL;
}
/**
* 获取手机厂商
* @return 手机厂商
*/
public static String getDeviceBrand() {
return Build.BRAND;
}
/**
* 获取手机制造商
* @return 手机制造商
*/
public static String getDeviceManufacturer() {
return Build.MANUFACTURER;
}
}
...@@ -353,7 +353,7 @@ class LiveActivity : RefreshActivity<LiveActivityPresenter>(), LiveActivityConta ...@@ -353,7 +353,7 @@ class LiveActivity : RefreshActivity<LiveActivityPresenter>(), LiveActivityConta
override fun onRequestRoomInfo(bean: RoomInfoEntity?) { override fun onRequestRoomInfo(bean: RoomInfoEntity?) {
UmengUtils.umengJoinLive() UmengUtils.umengJoinLive()
sportType = bean?.sportsType?: 0 sportType = bean?.matchInfo?.sportsType?: 0
matchId = bean?.matchId ?: "" matchId = bean?.matchId ?: ""
addMessage("请求房间信息成功 直播间 IM userId = ${bean?.huanXinUserId}") addMessage("请求房间信息成功 直播间 IM userId = ${bean?.huanXinUserId}")
......
...@@ -143,7 +143,7 @@ class LoginActivity : RefreshActivity<LoginActivityPresenter>(), LoginActivityCo ...@@ -143,7 +143,7 @@ class LoginActivity : RefreshActivity<LoginActivityPresenter>(), LoginActivityCo
DialogUtils.showLoginAgreement( DialogUtils.showLoginAgreement(
this@LoginActivity, this@LoginActivity,
getString(R.string.string_user_agreement_title_user), getString(R.string.string_user_agreement_title_user),
getString(R.string.string_user_agreement) Constants.USER_AGREE
) )
} }
...@@ -155,12 +155,7 @@ class LoginActivity : RefreshActivity<LoginActivityPresenter>(), LoginActivityCo ...@@ -155,12 +155,7 @@ class LoginActivity : RefreshActivity<LoginActivityPresenter>(), LoginActivityCo
DialogUtils.showLoginAgreement( DialogUtils.showLoginAgreement(
this@LoginActivity, this@LoginActivity,
getString(R.string.string_user_agreement_title_private), getString(R.string.string_user_agreement_title_private),
if (VersionControl.getCurrentFlavor() == VersionControl.YINGYONGBAO){ Constants.USER_PRIVATE
getString(R.string.string_user_private_xiaomi)
}else{
getString(R.string.string_user_private)
}
) )
} }
......
...@@ -88,7 +88,7 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay { ...@@ -88,7 +88,7 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
get() = this get() = this
override fun initialize() { override fun initialize() {
DialogSettings.modalDialog = true DialogSettings.modalDialog = false
showAdDialog() showAdDialog()
initTabLayout() initTabLayout()
EventBus.getDefault().register(this) EventBus.getDefault().register(this)
......
...@@ -77,7 +77,7 @@ class RegisterActivity : RefreshActivity<RegisterActivityPresenter>(), ...@@ -77,7 +77,7 @@ class RegisterActivity : RefreshActivity<RegisterActivityPresenter>(),
DialogUtils.showLoginAgreement( DialogUtils.showLoginAgreement(
this@RegisterActivity, this@RegisterActivity,
getString(R.string.string_user_agreement_title_user), getString(R.string.string_user_agreement_title_user),
getString(R.string.string_user_agreement) Constants.USER_AGREE
) )
} }
...@@ -89,11 +89,7 @@ class RegisterActivity : RefreshActivity<RegisterActivityPresenter>(), ...@@ -89,11 +89,7 @@ class RegisterActivity : RefreshActivity<RegisterActivityPresenter>(),
DialogUtils.showLoginAgreement( DialogUtils.showLoginAgreement(
this@RegisterActivity, this@RegisterActivity,
getString(R.string.string_user_agreement_title_private), getString(R.string.string_user_agreement_title_private),
if (VersionControl.getCurrentFlavor() == VersionControl.YINGYONGBAO) { Constants.USER_PRIVATE
getString(R.string.string_user_private_xiaomi)
} else {
getString(R.string.string_user_private)
}
) )
} }
......
...@@ -72,11 +72,19 @@ class SettingActivity : RefreshActivity<SettingPresenter>(), SettingContact.Disp ...@@ -72,11 +72,19 @@ class SettingActivity : RefreshActivity<SettingPresenter>(), SettingContact.Disp
} }
ll_user.onSingleClick { ll_user.onSingleClick {
startActivity(UserAgreementActivity::class.java) DialogUtils.showLoginAgreement(
this,
getString(R.string.string_user_agreement_title_user),
Constants.USER_AGREE
)
} }
ll_private.onSingleClick { ll_private.onSingleClick {
startActivity(UserPrivateActivity::class.java) DialogUtils.showLoginAgreement(
this,
getString(R.string.string_user_agreement_title_private),
Constants.USER_PRIVATE
)
} }
switch_message.setOnCheckedChangeListener { buttonView, isChecked -> switch_message.setOnCheckedChangeListener { buttonView, isChecked ->
......
...@@ -14,7 +14,6 @@ interface MainFragmentContact { ...@@ -14,7 +14,6 @@ interface MainFragmentContact {
} }
interface Presenter{ interface Presenter{
fun getCategory() fun getCategory()
fun getShowConfig() fun getConfigValue()
} }
} }
\ No newline at end of file
...@@ -40,7 +40,7 @@ class MainFragment : RefreshFragment<MainFragmentPresenter>(), MainFragmentConta ...@@ -40,7 +40,7 @@ class MainFragment : RefreshFragment<MainFragmentPresenter>(), MainFragmentConta
override fun lazyLoad() { override fun lazyLoad() {
presenter?.getCategory() presenter?.getCategory()
presenter?.getShowConfig() presenter?.getConfigValue()
} }
private fun initViewPager() { private fun initViewPager() {
......
...@@ -43,16 +43,17 @@ class MainFragmentPresenter : IBasePresenter, MainFragmentContact.Presenter { ...@@ -43,16 +43,17 @@ class MainFragmentPresenter : IBasePresenter, MainFragmentContact.Presenter {
// }) // })
} }
override fun getShowConfig() {
// RetrofitClient.retrofitService
// .getLiveConfig() override fun getConfigValue() {
// .compose(NetworkTransformer(mView)) RetrofitClient.retrofitService
// .subscribe(object : RxCallback<ShowConifgEntity>() { .getConfigValue()
// override fun onSuccess(data: ShowConifgEntity?) { .compose(NetworkTransformer(mView))
// VersionControl.saveConfig(data?.show?:false) .subscribe(object : RxCallback<String>() {
// override fun onSuccess(data: String?) {
// } SPUtil.put(Constants.CONFIG_VALUE,data)
// }) }
})
} }
......
...@@ -29,6 +29,7 @@ import com.hupu.tv.player.app.ui.activity.LoginActivity ...@@ -29,6 +29,7 @@ import com.hupu.tv.player.app.ui.activity.LoginActivity
import com.hupu.tv.player.app.ui.adapter.GiftAdapter import com.hupu.tv.player.app.ui.adapter.GiftAdapter
import com.hupu.tv.player.app.ui.adapter.MatchLiveAdapter import com.hupu.tv.player.app.ui.adapter.MatchLiveAdapter
import com.hupu.tv.player.app.ui.adapter.NewSignAdapter import com.hupu.tv.player.app.ui.adapter.NewSignAdapter
import com.hupu.tv.player.app.widget.CustomWebView
import com.hupu.tv.player.app.widget.customIm.CustomCircleImageView import com.hupu.tv.player.app.widget.customIm.CustomCircleImageView
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
...@@ -440,9 +441,11 @@ object DialogUtils { ...@@ -440,9 +441,11 @@ object DialogUtils {
fun showLoginAgreement(activity: AppCompatActivity?, title: String, content: String) { fun showLoginAgreement(activity: AppCompatActivity?, title: String, content: String) {
CustomDialog.show(activity, R.layout.dialog_login_agreement) { dialog, v -> CustomDialog.show(activity, R.layout.dialog_login_agreement) { dialog, v ->
// setView(dialog)
v.findViewById<TextView>(R.id.tv_title).text = title v.findViewById<TextView>(R.id.tv_title).text = title
v.findViewById<TextView>(R.id.tv_content).text = content v.findViewById<CustomWebView>(R.id.custom_webView).apply {
setProgressBar(v.findViewById(R.id.mProgressBar))
customLoadUrl(content)
}
v.findViewById<TextView>(R.id.tv_close).setOnClickListener { dialog.doDismiss() } v.findViewById<TextView>(R.id.tv_close).setOnClickListener { dialog.doDismiss() }
} }
...@@ -472,9 +475,12 @@ object DialogUtils { ...@@ -472,9 +475,12 @@ object DialogUtils {
activity?.let { activity?.let {
tvAgreement.highlightColor = it.resources.getColor(R.color.transparent) tvAgreement.highlightColor = it.resources.getColor(R.color.transparent)
} }
showLoginAgreement(
llLogin.visibility = View.GONE activity, activity?.getString(R.string.string_user_agreement_title_user).orEmpty(),
rlUserAgreement.visibility = View.VISIBLE Constants.USER_AGREE
)
// llLogin.visibility = View.GONE
// rlUserAgreement.visibility = View.VISIBLE
} }
} }
...@@ -483,8 +489,12 @@ object DialogUtils { ...@@ -483,8 +489,12 @@ object DialogUtils {
activity?.let { activity?.let {
tvAgreement.highlightColor = it.resources.getColor(R.color.transparent) tvAgreement.highlightColor = it.resources.getColor(R.color.transparent)
} }
llLogin.visibility = View.GONE showLoginAgreement(
rlUserPrivate.visibility = View.VISIBLE activity, activity?.getString(R.string.string_user_agreement_title_private).orEmpty(),
Constants.USER_PRIVATE
)
// llLogin.visibility = View.GONE
// rlUserPrivate.visibility = View.VISIBLE
} }
} }
...@@ -550,19 +560,26 @@ object DialogUtils { ...@@ -550,19 +560,26 @@ object DialogUtils {
activity?.let { activity?.let {
tvAgreement.highlightColor = it.resources.getColor(R.color.transparent) tvAgreement.highlightColor = it.resources.getColor(R.color.transparent)
} }
showLoginAgreement(
llLogin.visibility = View.GONE activity, activity?.getString(R.string.string_user_agreement_title_user).orEmpty(),
rlUserAgreement.visibility = View.VISIBLE Constants.USER_AGREE
)
// llLogin.visibility = View.GONE
// rlUserAgreement.visibility = View.VISIBLE
} }
} }
val twoSpan = object : ClickableSpan() { val twoSpan = object : ClickableSpan() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
activity?.let { activity?.let {
tvAgreement.highlightColor = it.resources.getColor(R.color.transparent) tvAgreement.highlightColor = it.resources.getColor(R.color.transparent)
} }
llLogin.visibility = View.GONE showLoginAgreement(
rlUserPrivate.visibility = View.VISIBLE activity, activity?.getString(R.string.string_user_agreement_title_private).orEmpty(),
Constants.USER_PRIVATE
)
// llLogin.visibility = View.GONE
// rlUserPrivate.visibility = View.VISIBLE
} }
} }
......
...@@ -11,21 +11,21 @@ import com.softgarden.baselibrary.utils.SPUtil ...@@ -11,21 +11,21 @@ import com.softgarden.baselibrary.utils.SPUtil
* *
*/ */
object VersionControl { object VersionControl {
private const val OFFICIAL_1 = "qj_01" private const val OFFICIAL_1 = "hd_01"
private const val OFFICIAL_2 = "qj_02" private const val OFFICIAL_2 = "hd_02"
private const val OFFICIAL_3 = "qj_03" private const val OFFICIAL_3 = "hd_03"
private const val exe6 = "qj_exe6" private const val exe6 = "hd_exe6"
private const val exe11 = "qj_exe11" private const val exe11 = "hd_exe11"
private const val OFFICIAL_1001 = "qj_1001" private const val OFFICIAL_1001 = "hd_1001"
private const val OFFICIAL_1002 = "qj_1002" private const val OFFICIAL_1002 = "hd_1002"
private const val OFFICIAL_1003 = "qj_1003" private const val OFFICIAL_1003 = "hd_1003"
private const val BAIDU = "qj_baidu" private const val BAIDU = "hd_baidu"
private const val VIVO = "qj_vivo_01" private const val VIVO = "hd_vivo_01"
private const val HUAWEI = "qj_huawei_01" private const val HUAWEI = "hd_huawei_01"
private const val OPPO = "qj_oppo_01" private const val OPPO = "hd_oppo_01"
private const val MEIZU = "qj_meizu" private const val MEIZU = "hd_meizu"
const val YINGYONGBAO = "qj_yingyongbao" const val YINGYONGBAO = "hd_yingyongbao"
const val MUBAOTOUTIAO = "qj_mubaotoutiao" const val MUBAOTOUTIAO = "hd_mubaotoutiao"
fun isShowLive(): Boolean { fun isShowLive(): Boolean {
......
...@@ -245,21 +245,25 @@ public class CustomChatPrimaryMenu extends RelativeLayout implements IChatPrimar ...@@ -245,21 +245,25 @@ public class CustomChatPrimaryMenu extends RelativeLayout implements IChatPrimar
// ToastUtil.Companion.s("敏感词汇不能发送,请检查后重新发送"); // ToastUtil.Companion.s("敏感词汇不能发送,请检查后重新发送");
// return; // return;
// } // }
String msg = checkSend(message);
if (listener != null) { if (listener != null) {
editText.setText(""); editText.setText("");
listener.onSendBtnClicked(message); listener.onSendBtnClicked(msg);
} }
} }
// private boolean checkSend(String content){ private String checkSend(String content){
// String regex = (String) SPUtil.Companion.get(Constants.CONFIG_VALUE, ""); String regex = (String) SPUtil.Companion.get(Constants.CONFIG_VALUE, "");
// Pattern pattern = Pattern.compile(regex); String[] split = regex.split(",");
// Matcher matcher = pattern.matcher(content); for (String s : split) {
// boolean matches =matcher.find(); if (content.contains(s)){
// LogUtils.i("regex = "+regex + "input content = "+content+ "matches = "+matches ); String replace = content.replace(s, "***");
// return matches; content = replace;
// } }
}
return content;
}
@Override @Override
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical" android:orientation="vertical"
tools:background="@color/black"> >
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="300dp" android:layout_width="@dimen/dp_360"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_23" android:layout_marginTop="@dimen/dp_23"
android:layout_marginBottom="@dimen/dp_23" android:layout_marginBottom="@dimen/dp_23"
android:background="@color/white" android:background="@color/white"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:minHeight="300dp" android:minHeight="700dp"
android:orientation="vertical" android:orientation="vertical"
app:cardCornerRadius="@dimen/dp_8" app:cardCornerRadius="@dimen/dp_8"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
android:id="@+id/rl_user_agreement" android:id="@+id/rl_user_agreement"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent">
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
android:gravity="center" android:gravity="center"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
android:textColor="@color/white" android:textColor="@color/white"
android:background="@color/main_select" android:background="@color/main_select"
tools:text="用户协议" tools:text="用户协议"
android:textSize="@dimen/dp_16" android:textSize="@dimen/sp_16"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
...@@ -48,23 +48,21 @@ ...@@ -48,23 +48,21 @@
android:id="@+id/tv_close" android:id="@+id/tv_close"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
<ScrollView
android:scrollbars="none" <ProgressBar
android:layout_below="@id/tv_title" android:layout_below="@id/tv_title"
android:paddingStart="@dimen/dp_15" android:id="@+id/mProgressBar"
android:paddingEnd="@dimen/dp_15" style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="2dp"
android:max="100"
android:visibility="gone" />
<TextView <com.hupu.tv.player.app.widget.CustomWebView
android:textColor="@color/normal_text_3" android:id="@+id/custom_webView"
android:id="@+id/tv_content" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="@string/string_user_agreement" /> android:layout_below="@id/mProgressBar" />
</ScrollView>
</RelativeLayout> </RelativeLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment