From 399ac289f80b7a40aa4210341db6b447cacdcf14 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 09 八月 2022 17:42:33 +0800 Subject: [PATCH] 广告升级,隐私政策整改 --- app/src/main/java/com/tejia/lijin/app/ui/mine/SettingActivity.java | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 43 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/tejia/lijin/app/ui/mine/SettingActivity.java b/app/src/main/java/com/tejia/lijin/app/ui/mine/SettingActivity.java index d0ac900..58a7b83 100644 --- a/app/src/main/java/com/tejia/lijin/app/ui/mine/SettingActivity.java +++ b/app/src/main/java/com/tejia/lijin/app/ui/mine/SettingActivity.java @@ -20,6 +20,7 @@ import com.bumptech.glide.Glide; import com.nostra13.universalimageloader.core.ImageLoader; import com.tejia.lijin.app.ShoppingApplication; +import com.tejia.lijin.app.ui.invite.ShareBrowserTestActivity; import com.wpc.library.util.DataCleanManager; import com.wpc.library.util.GetManifestDataUtil; import com.wpc.library.util.SystemCommon; @@ -51,7 +52,7 @@ private TextView tv_version; private TextView tv_cache_num; private CheckBox cb_msg, cb_no_see_red_point, cb_no_see_reward_statistics, - cb_no_see_share_and_selection, cb_no_see_phone;// cb_no_see_invite_reward;, cb_open_share_red_packet//寮�鍚帹骞跨孩鍖� + cb_no_see_share_and_selection, cb_no_see_phone,cb_push;// cb_no_see_invite_reward;, cb_open_share_red_packet//寮�鍚帹骞跨孩鍖� private LinearLayout ll_clear_cache, ll_check_update, ll_person_info, ll_account_grade, ll_about_us, ll_exit_account; private int shareRedPacket, noBonusCount, noNewsRedDot, noShareRecordAndStorage, noDisplayPhoneNum; @@ -73,6 +74,7 @@ cb_no_see_share_and_selection = findViewById(R.id.cb_no_see_share_and_selection); cb_no_see_phone = findViewById(R.id.cb_no_see_phone); + cb_push= findViewById(R.id.cb_push); // cb_no_see_invite_reward = findViewById(R.id.cb_no_see_invite_reward); ll_clear_cache = findViewById(R.id.ll_clear_cache); ll_check_update = findViewById(R.id.ll_check_update); @@ -120,6 +122,21 @@ editor.commit(); } }); + + cb_push.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + UserCustomEvent.userSettingCommon(SettingActivity.this, "涓�у寲鎺ㄩ�佸紑鍏�"); + SharedPreferences.Editor editor = sp.edit(); + ToolUtil.notDisturb(SettingActivity.this, isChecked); + if (isChecked) + editor.putBoolean("doNotRecommend", true); + else + editor.putBoolean("doNotRecommend", false); + editor.commit(); + } + }); + cb_no_see_red_point.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { @@ -161,12 +178,35 @@ noDisplayPhoneNum = getIntent().getIntExtra("noDisplayPhoneNum", 0); cb_msg.setChecked(sp.getBoolean("doNotDisturb", false)); + cb_push.setChecked(sp.getBoolean("doNotRecommend", false)); + // cb_open_share_red_packet.setChecked(shareRedPacket == 1 ? true : false); cb_no_see_red_point.setChecked(noNewsRedDot == 1 ? true : false); cb_no_see_reward_statistics.setChecked(noBonusCount == 1 ? true : false); cb_no_see_share_and_selection.setChecked(noShareRecordAndStorage == 1 ? true : false); cb_no_see_phone.setChecked(noDisplayPhoneNum == 1 ? true : false); + + + findViewById(R.id.view_test).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { +//杩炵画鐐瑰嚮5涓嬭繘鍏ヨ皟璇曟ā寮� + if (System.currentTimeMillis() - debugLastClickTime < 500) { + debugCount++; + if (debugCount > 5) { + startActivity(new Intent(getApplicationContext(), ShareBrowserTestActivity.class)); + } + } else { + debugCount = 0; + } + debugLastClickTime = System.currentTimeMillis(); + } + }); } + + //璋冭瘯妯″紡 + long debugLastClickTime = 0; + int debugCount = 0; @Override protected void onResume() { @@ -260,7 +300,7 @@ break; case R.id.ll_person_info: - if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) + if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()), true)) return; if (getSharedPreferences("user", MODE_PRIVATE).getBoolean("isLogin", false)) { @@ -270,14 +310,13 @@ } break; case R.id.ll_account_grade: - if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) + if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()), true)) return; startActivity(new Intent(SettingActivity.this, AccountGradeActivity.class)); break; case R.id.ll_about_us: Intent intent2 = new Intent(ll_about_us.getContext(), ShareBrowserActivity.class); intent2.putExtra("url", SystemParamsUtil.getParam(getApplicationContext(), "about")); - intent2.putExtra("title", "鍏充簬鎴戜滑"); startActivity(intent2); break; -- Gitblit v1.8.0