Compare commits
6 Commits
0eedbd75bb
...
contacts-v
| Author | SHA1 | Date | |
|---|---|---|---|
| e9c999dd73 | |||
| 96c828f27b | |||
| b48217cf91 | |||
| 177a9f66d4 | |||
| 6c8867e15c | |||
| 8a0b98cd4f |
44
build.gradle
44
build.gradle
@@ -1,6 +1,15 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
mavenLocal {
|
||||
// 设置本地Maven仓库路径
|
||||
url 'file:///sdcard/.m2/repository/'
|
||||
@@ -11,19 +20,6 @@ buildscript {
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||
// "WinBoLL Snapshot"
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
//println "mavenLocal : ==========="
|
||||
//println mavenLocal().url
|
||||
//println "mavenLocal : ==========="
|
||||
//mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
// 适配MIUI12
|
||||
@@ -35,6 +31,15 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
mavenLocal {
|
||||
// 设置本地Maven仓库路径
|
||||
url 'file:///sdcard/.m2/repository/'
|
||||
@@ -45,19 +50,6 @@ allprojects {
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||
// "WinBoLL Snapshot"
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
//println "mavenLocal : ==========="
|
||||
//println mavenLocal().url
|
||||
//println "mavenLocal : ==========="
|
||||
//mavenLocal()
|
||||
}
|
||||
ext {
|
||||
// 定义全局变量,常用于版本管理
|
||||
|
||||
@@ -55,7 +55,7 @@ dependencies {
|
||||
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
||||
|
||||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||||
api 'com.github.getActivity:XXPermissions:18.63'
|
||||
//api 'com.github.getActivity:XXPermissions:18.63'
|
||||
// 下拉控件
|
||||
api 'com.baoyz.pullrefreshlayout:library:1.2.0'
|
||||
// 拼音搜索
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Wed Apr 08 12:42:52 GMT 2026
|
||||
stageCount=7
|
||||
#Thu Apr 09 02:21:20 HKT 2026
|
||||
stageCount=9
|
||||
libraryProject=
|
||||
baseVersion=15.14
|
||||
publishVersion=15.14.6
|
||||
buildCount=1
|
||||
baseBetaVersion=15.14.7
|
||||
publishVersion=15.14.8
|
||||
buildCount=0
|
||||
baseBetaVersion=15.14.9
|
||||
|
||||
@@ -22,6 +22,7 @@ import cc.winboll.studio.libappbase.ToastUtils;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import cc.winboll.studio.contacts.dun.Rules;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen&豆包大模型<zhangsken@qq.com>
|
||||
@@ -119,6 +120,14 @@ public class CallLogAdapter extends RecyclerView.Adapter<CallLogAdapter.CallLogV
|
||||
clipboard.setPrimaryClip(clip);
|
||||
Toast.makeText(mContext, "Copy to clipboard.", Toast.LENGTH_SHORT).show();
|
||||
LogUtils.d(TAG, "showPhonePopupMenu: 号码" + callLog.getPhoneNumber() + "已复制到剪贴板");
|
||||
} else if (itemId == R.id.item_calllog_phonenumber_yundun_test) {
|
||||
// 跳转到添加联系人页面
|
||||
//if (Rules.getInstance(mContext).isAllowed(callLog.getPhoneNumber(), false)) {
|
||||
if (Rules.getInstance(mContext).isAllowed(callLog.getPhoneNumber(), true)) {
|
||||
ToastUtils.show(callLog.getPhoneNumber() + " Is Allowed By YunDun.");
|
||||
} else {
|
||||
ToastUtils.show("YunDun Defense The Phone " + callLog.getPhoneNumber() + "");
|
||||
}
|
||||
} else if (itemId == R.id.item_calllog_phonenumber_add_contact) {
|
||||
// 跳转到添加联系人页面
|
||||
ContactUtils.jumpToAddContact(mContext, callLog.getPhoneNumber());
|
||||
|
||||
@@ -91,7 +91,7 @@ public class Rules {
|
||||
saveDun();
|
||||
// 一键更新所有 DunTemperatureView 实例的盾值
|
||||
DunTemperatureView.updateDunValue(mSettingsModel.getDunTotalCount(), mSettingsModel.getDunCurrentCount());
|
||||
|
||||
|
||||
SettingsActivity.notifyDunInfoUpdate();
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,11 @@ public class Rules {
|
||||
SettingsBean.saveBean(mContext, mSettingsModel);
|
||||
}
|
||||
|
||||
public boolean isAllowed(String phoneNumber) {
|
||||
public boolean isAllowed(String phoneNumber) {
|
||||
return isAllowed(phoneNumber, false);
|
||||
}
|
||||
|
||||
public boolean isAllowed(String phoneNumber, boolean isTest) {
|
||||
// 没有启用云盾,默认允许接通任何电话
|
||||
if (!mSettingsModel.isEnableDun()) {
|
||||
LogUtils.d(TAG, String.format("没有启用云盾,默认允许接通任何电话。isAllowed(...) return true"));
|
||||
@@ -204,37 +208,40 @@ public class Rules {
|
||||
}
|
||||
}
|
||||
|
||||
if (isConnect) {
|
||||
// 如果防御结果为连接,则恢复防御盾牌最大值层数
|
||||
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
||||
LogUtils.d(TAG, String.format("防御结果为连接,恢复防御盾牌最大值层数 %d", mSettingsModel.getDunTotalCount()));
|
||||
saveDun();
|
||||
SettingsActivity.notifyDunInfoUpdate();
|
||||
} else if (isDefend) {
|
||||
// 如果触发了以上某个防御模块,减少防御盾牌层数
|
||||
int newDunCount = nDunCurrentCount;
|
||||
LogUtils.d(TAG, String.format("新的防御层数预计为 %d", newDunCount));
|
||||
// 如果不是规则测试时,就执行云盾防御机能。
|
||||
if (isTest == false) {
|
||||
if (isConnect) {
|
||||
// 如果防御结果为连接,则恢复防御盾牌最大值层数
|
||||
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
||||
LogUtils.d(TAG, String.format("防御结果为连接,恢复防御盾牌最大值层数 %d", mSettingsModel.getDunTotalCount()));
|
||||
saveDun();
|
||||
SettingsActivity.notifyDunInfoUpdate();
|
||||
} else if (isDefend) {
|
||||
// 如果触发了以上某个防御模块,减少防御盾牌层数
|
||||
int newDunCount = nDunCurrentCount;
|
||||
LogUtils.d(TAG, String.format("新的防御层数预计为 %d", newDunCount));
|
||||
|
||||
// 保证盾值在[1,DunTotalCount]之内其他值一律重置为 DunTotalCount。
|
||||
if (newDunCount > 0 && newDunCount < mSettingsModel.getDunTotalCount()) {
|
||||
mSettingsModel.setDunCurrentCount(newDunCount);
|
||||
LogUtils.d(TAG, String.format("设置防御层数为 %d", newDunCount));
|
||||
} else {
|
||||
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
||||
LogUtils.d(TAG, String.format("盾值不在[0,%d]区间,恢复防御最大值%d", mSettingsModel.getDunTotalCount(), mSettingsModel.getDunTotalCount()));
|
||||
}
|
||||
// 保证盾值在[1,DunTotalCount]之内其他值一律重置为 DunTotalCount。
|
||||
if (newDunCount > 0 && newDunCount < mSettingsModel.getDunTotalCount()) {
|
||||
mSettingsModel.setDunCurrentCount(newDunCount);
|
||||
LogUtils.d(TAG, String.format("设置防御层数为 %d", newDunCount));
|
||||
} else {
|
||||
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
||||
LogUtils.d(TAG, String.format("盾值不在[0,%d]区间,恢复防御最大值%d", mSettingsModel.getDunTotalCount(), mSettingsModel.getDunTotalCount()));
|
||||
}
|
||||
|
||||
saveDun();
|
||||
SettingsActivity.notifyDunInfoUpdate();
|
||||
}
|
||||
saveDun();
|
||||
SettingsActivity.notifyDunInfoUpdate();
|
||||
}
|
||||
|
||||
// 返回校验结果
|
||||
LogUtils.d(TAG, String.format("返回校验结果 isConnect == %s", isConnect));
|
||||
// 一键更新所有 DunTemperatureView 实例的盾值
|
||||
DunTemperatureView.updateDunValue(mSettingsModel.getDunTotalCount(), mSettingsModel.getDunCurrentCount());
|
||||
// 一键更新所有 DunTemperatureView 实例的盾值
|
||||
DunTemperatureView.updateDunValue(mSettingsModel.getDunTotalCount(), mSettingsModel.getDunCurrentCount());
|
||||
}
|
||||
|
||||
return isConnect;
|
||||
}
|
||||
// 返回校验结果
|
||||
LogUtils.d(TAG, String.format("返回校验结果 isConnect == %s", isConnect));
|
||||
return isConnect;
|
||||
}
|
||||
|
||||
public void add(String szPhoneConnectRule, boolean isAllowConnection, boolean isEnable) {
|
||||
_PhoneConnectRuleModelList.add(new PhoneConnectRuleBean(szPhoneConnectRule, isAllowConnection, isEnable));
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<item
|
||||
android:id="@+id/item_calllog_phonenumber_copy"
|
||||
android:title="Copy"/>
|
||||
<item
|
||||
android:id="@+id/item_calllog_phonenumber_yundun_test"
|
||||
android:title="YunDun Test"/>
|
||||
<item
|
||||
android:id="@+id/item_calllog_phonenumber_add_contact"
|
||||
android:title="Add Contact"/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Mar 16 19:52:21 GMT 2026
|
||||
#Wed Apr 08 17:37:24 GMT 2026
|
||||
stageCount=26
|
||||
libraryProject=
|
||||
baseVersion=15.11
|
||||
publishVersion=15.11.25
|
||||
buildCount=29
|
||||
buildCount=30
|
||||
baseBetaVersion=15.11.26
|
||||
|
||||
Reference in New Issue
Block a user