[Modify]隐私政策弹窗移除
This commit is contained in:
@@ -504,10 +504,7 @@ public class XChatApplication extends BaseApp {
|
||||
BasicConfig.INSTANCE.setAppContext(this.getApplicationContext());
|
||||
SharedPreferenceUtils.init(this);
|
||||
ResUtil.init(this);
|
||||
boolean isShowPrivacyAgreement = (boolean) SharedPreferenceUtils.get(SplashActivity.SHOW_PRIVACY_AGREEMENT, true);
|
||||
if (!isShowPrivacyAgreement) {
|
||||
initOtherSDK();
|
||||
}
|
||||
initOtherSDK();
|
||||
initContext(this);
|
||||
//首次启动事件
|
||||
HashMap<String, Object> map = new HashMap<>(2);
|
||||
|
@@ -35,7 +35,7 @@ import com.yizhuan.xchat_android_library.common.util.DeviceUtil;
|
||||
* @author xiaoyu
|
||||
* @date 2017/12/30
|
||||
*/
|
||||
public class SplashActivity extends AppCompatActivity implements View.OnClickListener, PrivacyAgreementDialog.OnCallBack {
|
||||
public class SplashActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
public static final String SHOW_PRIVACY_AGREEMENT = "show_privacy_agreement";
|
||||
private static final int COUNT_DOWN_TIME = 3;
|
||||
@@ -84,18 +84,10 @@ public class SplashActivity extends AppCompatActivity implements View.OnClickLis
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
protected void initiate() {
|
||||
checkPrivacyAgreement();
|
||||
}
|
||||
|
||||
|
||||
private void checkPrivacyAgreement() {
|
||||
boolean isShowPrivacyAgreement = (boolean) SharedPreferenceUtils.get(SHOW_PRIVACY_AGREEMENT, true);
|
||||
if (isShowPrivacyAgreement) {
|
||||
PrivacyAgreementDialog privacyAgreementDialog = new PrivacyAgreementDialog(this);
|
||||
privacyAgreementDialog.setCancelable(false);
|
||||
privacyAgreementDialog.setCanceledOnTouchOutside(false);
|
||||
privacyAgreementDialog.setOnCallBack(this);
|
||||
privacyAgreementDialog.show();
|
||||
showSplash(true);
|
||||
SharedPreferenceUtils.put(SHOW_PRIVACY_AGREEMENT, false);
|
||||
} else {
|
||||
showSplash(false);
|
||||
}
|
||||
@@ -103,7 +95,7 @@ public class SplashActivity extends AppCompatActivity implements View.OnClickLis
|
||||
|
||||
private void showSplash(boolean first) {
|
||||
|
||||
if(!TextUtils.isEmpty(DeviceUtil.getAndroidID())){
|
||||
if (!TextUtils.isEmpty(DeviceUtil.getAndroidID())) {
|
||||
OaidUtil.setOaid(DeviceUtil.getAndroidID());
|
||||
if (first) ChannelPageModel.get().checkAd();
|
||||
}
|
||||
@@ -185,14 +177,4 @@ public class SplashActivity extends AppCompatActivity implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(boolean isConfirm) {
|
||||
if (isConfirm) {
|
||||
SharedPreferenceUtils.put(SHOW_PRIVACY_AGREEMENT, false);
|
||||
XChatApplication.initOtherSDK();
|
||||
showSplash(true);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user