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