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 | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 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 1913916..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 @@ -52,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; @@ -74,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); @@ -121,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) { @@ -162,6 +178,8 @@ 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); -- Gitblit v1.8.0