Compare commits
	
		
			64 Commits
		
	
	
		
			numtable-v
			...
			9e9402f84e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					9e9402f84e | ||
| 
						 | 
					ec18330022 | ||
| 
						 | 
					23920a7ff1 | ||
| 
						 | 
					17c373c490 | ||
| 
						 | 
					5f7c94b349 | ||
| 
						 | 
					c2b739d345 | ||
| 
						 | 
					67a05cd457 | ||
| 
						 | 
					554ab758bf | ||
| 
						 | 
					20e118cd34 | ||
| 
						 | 
					f370ae8ffb | ||
| 
						 | 
					c92c874ea1 | ||
| 
						 | 
					90a6116c0a | ||
| 
						 | 
					45208ecbb1 | ||
| 
						 | 
					c28d655fe3 | ||
| 
						 | 
					4b5905f74e | ||
| 
						 | 
					6bd01780ec | ||
| 
						 | 
					a6699262f8 | ||
| 
						 | 
					ea2d38defc | ||
| 
						 | 
					e430b7abe4 | ||
| 
						 | 
					945eadb617 | ||
| 
						 | 
					c5bffc5eef | ||
| 
						 | 
					88597fe407 | ||
| 
						 | 
					53f985533a | ||
| 
						 | 
					a3950f13ad | ||
| 
						 | 
					c878e9dc02 | ||
| 
						 | 
					f2f7cab330 | ||
| 
						 | 
					6c8b0dcfa5 | ||
| 
						 | 
					7de8a4f084 | ||
| 
						 | 
					219c6614be | ||
| 
						 | 
					0f5bb020b9 | ||
| 
						 | 
					7794ff80ec | ||
| 
						 | 
					7463ad3352 | ||
| 
						 | 
					753032efed | ||
| 
						 | 
					2b4c43c9af | ||
| 
						 | 
					711c98d556 | ||
| 
						 | 
					202205588a | ||
| 
						 | 
					42c4978b44 | ||
| 
						 | 
					1a2b7b862d | ||
| 
						 | 
					eb253b374f | ||
| 
						 | 
					c4e88e9593 | ||
| 
						 | 
					08d9d92ae4 | ||
| 
						 | 
					74841c08dc | ||
| 
						 | 
					945bacb825 | ||
| 
						 | 
					0e464495fd | ||
| 
						 | 
					e8682ce410 | ||
| 
						 | 
					2e4003dae0 | ||
| 
						 | 
					198b0975ce | ||
| 
						 | 
					24a578a9d2 | ||
| 
						 | 
					46de24447f | ||
| 
						 | 
					ac1c008035 | ||
| 
						 | 
					b124487cb1 | ||
| 
						 | 
					9621d35f79 | ||
| 
						 | 
					17de0832a6 | ||
| 
						 | 
					1320984829 | ||
| 
						 | 
					abf1e5ba42 | ||
| 
						 | 
					1cd2f88038 | ||
| 
						 | 
					3f6e583d68 | ||
| 
						 | 
					271456bfcd | ||
| 
						 | 
					ee5458d82c | ||
| 
						 | 
					3a83367f71 | ||
| 
						 | 
					74b9350a6a | ||
| 
						 | 
					d2858f23f7 | ||
| 
						 | 
					89dac91cc6 | ||
| 
						 | 
					3809c1bcab | 
@@ -113,10 +113,10 @@ if [[ $? -eq 0 ]]; then
 | 
			
		||||
    # 如果Git已经提交了所有代码就执行标签和应用发布操作
 | 
			
		||||
 | 
			
		||||
    # 预先询问是否添加工作流标签
 | 
			
		||||
    echo "Add Github Workflows Tag? (yes/No)"
 | 
			
		||||
	result=$(askAddWorkflowsTag)
 | 
			
		||||
	nAskAddWorkflowsTag=$?
 | 
			
		||||
	echo $result
 | 
			
		||||
    #echo "Add Github Workflows Tag? (yes/No)"
 | 
			
		||||
	#result=$(askAddWorkflowsTag)
 | 
			
		||||
	#nAskAddWorkflowsTag=$?
 | 
			
		||||
	#echo $result
 | 
			
		||||
 | 
			
		||||
    # 发布应用
 | 
			
		||||
	echo "Publishing WinBoLL APK ..."
 | 
			
		||||
@@ -138,17 +138,17 @@ if [[ $? -eq 0 ]]; then
 | 
			
		||||
	fi
 | 
			
		||||
    
 | 
			
		||||
    # 添加 GitHub 工作流标签
 | 
			
		||||
	if [[ $nAskAddWorkflowsTag -eq 1 ]]; then
 | 
			
		||||
	#if [[ $nAskAddWorkflowsTag -eq 1 ]]; then
 | 
			
		||||
	    # 如果用户选择添加工作流标签
 | 
			
		||||
    	result=$(addWorkflowsTag $1)
 | 
			
		||||
		if [[ $? -eq 0 ]]; then
 | 
			
		||||
		    echo $result
 | 
			
		||||
    	#result=$(addWorkflowsTag $1)
 | 
			
		||||
		#if [[ $? -eq 0 ]]; then
 | 
			
		||||
		#    echo $result
 | 
			
		||||
		    # 工作流标签添加成功
 | 
			
		||||
		else
 | 
			
		||||
			echo -e "${0}: addWorkflowsTag $1\n${result}\nAdd workflows tag cancel."
 | 
			
		||||
			exit 1 # addWorkflowsTag 异常
 | 
			
		||||
		fi
 | 
			
		||||
	fi
 | 
			
		||||
		#else
 | 
			
		||||
			#echo -e "${0}: addWorkflowsTag $1\n${result}\nAdd workflows tag cancel."
 | 
			
		||||
			#exit 1 # addWorkflowsTag 异常
 | 
			
		||||
		#fi
 | 
			
		||||
	#fi
 | 
			
		||||
	
 | 
			
		||||
	## 清理更新描述文件内容
 | 
			
		||||
	echo "" > $1/app_update_description.txt
 | 
			
		||||
 
 | 
			
		||||
@@ -114,9 +114,11 @@
 | 
			
		||||
 | 
			
		||||
# 本项目要实际运用需要注意以下几个步骤:
 | 
			
		||||
# 在项目根目录下:
 | 
			
		||||
## 1. 项目模块编译环境设置(必须),settings.gradle-demo 要复制为 settings.gradle,并取消相应项目模块的注释。
 | 
			
		||||
## 2. 项目 Android SDK 编译环境设置(可选),local.properties-demo 要复制为 local.properties,并按需要设置 Android SDK 目录。
 | 
			
		||||
## 3. 类库型模块编译环境设置(可选),winboll.properties-demo 要复制为 winboll.properties,并按需要设置 WinBoLL Maven 库登录用户信息。
 | 
			
		||||
## ★. 项目模块编译环境设置(必须),settings.gradle-demo 要复制为 settings.gradle,并取消相应项目模块的注释。
 | 
			
		||||
## ★. 项目 Android SDK 编译环境设置(可选),local.properties-demo 要复制为 local.properties,并按需要设置 Android SDK 目录。
 | 
			
		||||
## ★. 应用签名密钥 keystore 设置问题。一般调试编译只需用【Termux】cd 进 GenKeyStore 目录执行 $ bash gen_debug_keystore.sh 命令即可完成设置。
 | 
			
		||||
## ☆. 应用 WiBoLL 签名密钥配置问题<非必须考虑>。设置时需要 clone 【keystore】模块源码并拷贝模块目录的 appkey.jks 与 appkey.keystore 到项目根目录即可。
 | 
			
		||||
## ☆. 类库型模块编译环境设置(可选),winboll.properties-demo 要复制为 winboll.properties,并按需要设置 WinBoLL Maven 库登录用户信息。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# ☆类库型项目编译方法
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ android {
 | 
			
		||||
        // versionName 更新后需要手动设置 
 | 
			
		||||
        // 项目模块目录的 build.gradle 文件的 stageCount=0
 | 
			
		||||
        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
			
		||||
        versionName "15.8" 
 | 
			
		||||
        versionName "15.9" 
 | 
			
		||||
        if(true) {
 | 
			
		||||
            versionName = genVersionName("${versionName}")
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Sun Jun 08 21:14:52 HKT 2025
 | 
			
		||||
stageCount=2
 | 
			
		||||
#Sat Jun 28 12:59:51 HKT 2025
 | 
			
		||||
stageCount=3
 | 
			
		||||
libraryProject=libaes
 | 
			
		||||
baseVersion=15.8
 | 
			
		||||
publishVersion=15.8.1
 | 
			
		||||
baseVersion=15.9
 | 
			
		||||
publishVersion=15.9.2
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.8.2
 | 
			
		||||
baseBetaVersion=15.9.3
 | 
			
		||||
 
 | 
			
		||||
@@ -83,7 +83,7 @@ public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity
 | 
			
		||||
        appInfo.setAppGitOwner("Studio");
 | 
			
		||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
			
		||||
        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
			
		||||
        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=2&fromuid=1");
 | 
			
		||||
        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=3&extra=page%3D1");
 | 
			
		||||
        appInfo.setAppAPKName("AES");
 | 
			
		||||
        appInfo.setAppAPKFolderName("AES");
 | 
			
		||||
        //appInfo.setIsAddDebugTools(false);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Sun Jun 01 08:03:56 GMT 2025
 | 
			
		||||
#Thu Jun 19 12:49:47 GMT 2025
 | 
			
		||||
stageCount=0
 | 
			
		||||
libraryProject=
 | 
			
		||||
baseVersion=15.0
 | 
			
		||||
publishVersion=15.0.0
 | 
			
		||||
buildCount=24
 | 
			
		||||
buildCount=26
 | 
			
		||||
baseBetaVersion=15.0.1
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ android {
 | 
			
		||||
        // versionName 更新后需要手动设置 
 | 
			
		||||
        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
			
		||||
        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
			
		||||
        versionName "15.8"
 | 
			
		||||
        versionName "15.9"
 | 
			
		||||
        if(true) {
 | 
			
		||||
            versionName = genVersionName("${versionName}")
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Thu Jun 05 08:59:45 GMT 2025
 | 
			
		||||
stageCount=8
 | 
			
		||||
#Thu Jul 17 11:39:14 HKT 2025
 | 
			
		||||
stageCount=2
 | 
			
		||||
libraryProject=libappbase
 | 
			
		||||
baseVersion=15.8
 | 
			
		||||
publishVersion=15.8.7
 | 
			
		||||
buildCount=14
 | 
			
		||||
baseBetaVersion=15.8.8
 | 
			
		||||
baseVersion=15.9
 | 
			
		||||
publishVersion=15.9.1
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.9.2
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Sun May 04 05:32:00 GMT 2025
 | 
			
		||||
stageCount=1
 | 
			
		||||
#Tue Jun 24 09:54:47 HKT 2025
 | 
			
		||||
stageCount=3
 | 
			
		||||
libraryProject=
 | 
			
		||||
baseVersion=15.2
 | 
			
		||||
publishVersion=15.2.0
 | 
			
		||||
buildCount=74
 | 
			
		||||
baseBetaVersion=15.2.1
 | 
			
		||||
publishVersion=15.2.2
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.2.3
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
https://github.com/aJIEw/PhoneCallApp.git
 | 
			
		||||
 | 
			
		||||
#### 介绍
 | 
			
		||||
通讯录与拨号
 | 
			
		||||
这是可以根据正则表达式匹配拦截骚扰电话的手机拨号应用。
 | 
			
		||||
 | 
			
		||||
#### 软件架构
 | 
			
		||||
适配安卓应用 [AIDE Pro] 的 Gradle 编译结构。
 | 
			
		||||
 
 | 
			
		||||
@@ -45,9 +45,9 @@ android {
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.8.0'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.1'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.1'
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.9.2'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
			
		||||
    
 | 
			
		||||
    // 权限请求框架:https://github.com/getActivity/XXPermissions
 | 
			
		||||
    api 'com.github.getActivity:XXPermissions:18.63'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Tue May 20 13:02:18 HKT 2025
 | 
			
		||||
stageCount=3
 | 
			
		||||
#Sun Jul 27 15:39:49 HKT 2025
 | 
			
		||||
stageCount=13
 | 
			
		||||
libraryProject=
 | 
			
		||||
baseVersion=15.3
 | 
			
		||||
publishVersion=15.3.2
 | 
			
		||||
publishVersion=15.3.12
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.3.3
 | 
			
		||||
baseBetaVersion=15.3.13
 | 
			
		||||
 
 | 
			
		||||
@@ -79,12 +79,12 @@ public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity
 | 
			
		||||
        APPInfo appInfo = new APPInfo();
 | 
			
		||||
        appInfo.setAppName("Contacts");
 | 
			
		||||
        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
			
		||||
        appInfo.setAppDescription("通讯录与拨号");
 | 
			
		||||
        appInfo.setAppGitName("APP");
 | 
			
		||||
        appInfo.setAppDescription("这是可以根据正则表达式匹配拦截骚扰电话的手机拨号应用。");
 | 
			
		||||
        appInfo.setAppGitName("APPBase");
 | 
			
		||||
        appInfo.setAppGitOwner("Studio");
 | 
			
		||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
			
		||||
        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
			
		||||
        appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=Contacts");
 | 
			
		||||
        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=4&extra=page%3D1");
 | 
			
		||||
        appInfo.setAppAPKName("Contacts");
 | 
			
		||||
        appInfo.setAppAPKFolderName("Contacts");
 | 
			
		||||
        return new AboutView(mContext, appInfo);
 | 
			
		||||
 
 | 
			
		||||
@@ -198,6 +198,9 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
			
		||||
            settingsModel.setDunTotalCount(Integer.parseInt(etDunTotalCount.getText().toString()));
 | 
			
		||||
            settingsModel.setDunResumeSecondCount(Integer.parseInt(etDunResumeSecondCount.getText().toString()));
 | 
			
		||||
            settingsModel.setDunResumeCount(Integer.parseInt(etDunResumeCount.getText().toString()));
 | 
			
		||||
			
 | 
			
		||||
			// 应用效果提示
 | 
			
		||||
			ToastUtils.show((settingsModel.getDunTotalCount() == 1)?"电话骚扰防御力几乎为0。":String.format("以下设置将在连拨%d次后接通电话。", settingsModel.getDunTotalCount()));
 | 
			
		||||
        }
 | 
			
		||||
        settingsModel.setIsEnableDun(isEnableDun);
 | 
			
		||||
        Rules.getInstance(this).saveDun();
 | 
			
		||||
@@ -207,6 +210,7 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
			
		||||
        etDunTotalCount.setText(Integer.toString(settingsModel.getDunTotalCount()));
 | 
			
		||||
        etDunResumeSecondCount.setText(Integer.toString(settingsModel.getDunResumeSecondCount()));
 | 
			
		||||
        etDunResumeCount.setText(Integer.toString(settingsModel.getDunResumeCount()));
 | 
			
		||||
		
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void updateStreamVolumeTextView() {
 | 
			
		||||
@@ -243,6 +247,9 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
			
		||||
        Rules.getInstance(this).resetDefaultBoBullToonURL();
 | 
			
		||||
        EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
 | 
			
		||||
        etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
 | 
			
		||||
		
 | 
			
		||||
		final TomCat tomCat = TomCat.getInstance(this);
 | 
			
		||||
		tomCat.cleanBoBullToon();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void onDownloadBoBullToon(View view) {
 | 
			
		||||
@@ -330,4 +337,8 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
			
		||||
    public void onAbout(View view) {
 | 
			
		||||
        App.getWinBoLLActivityManager().startWinBoLLActivity(this, AboutActivity.class);
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	public void onLogView(View view) {
 | 
			
		||||
        App.getWinBoLLActivityManager().startLogActivity(this);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,13 +5,18 @@ package cc.winboll.studio.contacts.adapters;
 | 
			
		||||
 * @Date 2025/02/26 13:09:32
 | 
			
		||||
 * @Describe CallLogAdapter
 | 
			
		||||
 */
 | 
			
		||||
import android.content.ClipData;
 | 
			
		||||
import android.content.ClipboardManager;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Button;
 | 
			
		||||
import android.widget.PopupMenu;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import android.widget.Toast;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
import cc.winboll.studio.contacts.R;
 | 
			
		||||
@@ -36,6 +41,10 @@ public class CallLogAdapter extends RecyclerView.Adapter<CallLogAdapter.CallLogV
 | 
			
		||||
        this.callLogList = callLogList;
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	public void relaodContacts() {
 | 
			
		||||
		this.mContactUtils.relaodContacts();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    @Override
 | 
			
		||||
    public CallLogViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
 | 
			
		||||
@@ -47,6 +56,38 @@ public class CallLogAdapter extends RecyclerView.Adapter<CallLogAdapter.CallLogV
 | 
			
		||||
    public void onBindViewHolder(@NonNull CallLogViewHolder holder, int position) {
 | 
			
		||||
        final CallLogModel callLog = callLogList.get(position);
 | 
			
		||||
        holder.phoneNumber.setText(callLog.getPhoneNumber() + "☎" + mContactUtils.getContactsName(callLog.getPhoneNumber()));
 | 
			
		||||
		holder.phoneNumber.setOnLongClickListener(new View.OnLongClickListener() {
 | 
			
		||||
				@Override
 | 
			
		||||
				public boolean onLongClick(View p1) {
 | 
			
		||||
					// 弹出复制菜单
 | 
			
		||||
					PopupMenu menu = new PopupMenu(mContext, holder.phoneNumber);
 | 
			
		||||
					//加载菜单资源
 | 
			
		||||
					menu.getMenuInflater().inflate(R.menu.toolbar_calllog_phonenumber, menu.getMenu());
 | 
			
		||||
					//设置点击事件的响应
 | 
			
		||||
					menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
							@Override
 | 
			
		||||
							public boolean onMenuItemClick(MenuItem menuItem) {
 | 
			
		||||
								int nItemId = menuItem.getItemId();
 | 
			
		||||
								if (nItemId == R.id.item_calllog_phonenumber_copy) {
 | 
			
		||||
									// Gets a handle to the clipboard service.
 | 
			
		||||
									ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
 | 
			
		||||
									// Creates a new text clip to put on the clipboard
 | 
			
		||||
									ClipData clip = ClipData.newPlainText("simple text", callLog.getPhoneNumber());
 | 
			
		||||
									// Set the clipboard's primary clip.
 | 
			
		||||
									clipboard.setPrimaryClip(clip);
 | 
			
		||||
									Toast.makeText(mContext, "Copy to clipboard.", Toast.LENGTH_SHORT).show();
 | 
			
		||||
								}
 | 
			
		||||
 | 
			
		||||
								return true;
 | 
			
		||||
							}
 | 
			
		||||
						});
 | 
			
		||||
					//一定要调用show()来显示弹出式菜单
 | 
			
		||||
					menu.show();
 | 
			
		||||
 | 
			
		||||
					return true;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		
 | 
			
		||||
        holder.callStatus.setText(callLog.getCallStatus());
 | 
			
		||||
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
 | 
			
		||||
        holder.callDate.setText(dateFormat.format(callLog.getCallDate()));
 | 
			
		||||
 
 | 
			
		||||
@@ -5,19 +5,25 @@ package cc.winboll.studio.contacts.adapters;
 | 
			
		||||
 * @Date 2025/02/26 13:35:44
 | 
			
		||||
 * @Describe ContactAdapter
 | 
			
		||||
 */
 | 
			
		||||
import android.content.ClipData;
 | 
			
		||||
import android.content.ClipboardManager;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Button;
 | 
			
		||||
import android.widget.LinearLayout;
 | 
			
		||||
import android.widget.PopupMenu;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import android.widget.Toast;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
import cc.winboll.studio.contacts.R;
 | 
			
		||||
import cc.winboll.studio.contacts.beans.ContactModel;
 | 
			
		||||
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
 | 
			
		||||
import com.hjq.toast.ToastUtils;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
 | 
			
		||||
 | 
			
		||||
public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactViewHolder> {
 | 
			
		||||
 | 
			
		||||
@@ -26,8 +32,10 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
			
		||||
    private static final int REQUEST_CALL_PHONE = 1;
 | 
			
		||||
 | 
			
		||||
    private List<ContactModel> contactList;
 | 
			
		||||
	Context mContext;
 | 
			
		||||
 | 
			
		||||
    public ContactAdapter(List<ContactModel> contactList) {
 | 
			
		||||
    public ContactAdapter(Context context, List<ContactModel> contactList) {
 | 
			
		||||
		mContext = context;
 | 
			
		||||
        this.contactList = contactList;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -41,6 +49,37 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
			
		||||
    @Override
 | 
			
		||||
    public void onBindViewHolder(@NonNull ContactViewHolder holder, int position) {
 | 
			
		||||
        final ContactModel contact = contactList.get(position);
 | 
			
		||||
		holder.llPhoneNumberMain.setOnLongClickListener(new View.OnLongClickListener() {
 | 
			
		||||
				@Override
 | 
			
		||||
				public boolean onLongClick(View p1) {
 | 
			
		||||
					// 弹出复制菜单
 | 
			
		||||
					PopupMenu menu = new PopupMenu(mContext, holder.llPhoneNumberMain);
 | 
			
		||||
					//加载菜单资源
 | 
			
		||||
					menu.getMenuInflater().inflate(R.menu.toolbar_contact_phonenumber, menu.getMenu());
 | 
			
		||||
					//设置点击事件的响应
 | 
			
		||||
					menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
							@Override
 | 
			
		||||
							public boolean onMenuItemClick(MenuItem menuItem) {
 | 
			
		||||
								int nItemId = menuItem.getItemId();
 | 
			
		||||
								if (nItemId == R.id.item_contact_phonenumber_copy) {
 | 
			
		||||
									// Gets a handle to the clipboard service.
 | 
			
		||||
									ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
 | 
			
		||||
									// Creates a new text clip to put on the clipboard
 | 
			
		||||
									ClipData clip = ClipData.newPlainText("simple text", contact.getNumber());
 | 
			
		||||
									// Set the clipboard's primary clip.
 | 
			
		||||
									clipboard.setPrimaryClip(clip);
 | 
			
		||||
									Toast.makeText(mContext, "Copy to clipboard.", Toast.LENGTH_SHORT).show();
 | 
			
		||||
								}
 | 
			
		||||
 | 
			
		||||
								return true;
 | 
			
		||||
							}
 | 
			
		||||
						});
 | 
			
		||||
					//一定要调用show()来显示弹出式菜单
 | 
			
		||||
					menu.show();
 | 
			
		||||
 | 
			
		||||
					return true;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
        holder.contactName.setText(contact.getName());
 | 
			
		||||
        holder.contactNumber.setText(contact.getNumber());
 | 
			
		||||
 | 
			
		||||
@@ -69,12 +108,14 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class ContactViewHolder extends RecyclerView.ViewHolder {
 | 
			
		||||
		LinearLayout llPhoneNumberMain;
 | 
			
		||||
        TextView contactName;
 | 
			
		||||
        TextView contactNumber;
 | 
			
		||||
        AOHPCTCSeekBar dialAOHPCTCSeekBar;
 | 
			
		||||
        
 | 
			
		||||
        public ContactViewHolder(@NonNull View itemView) {
 | 
			
		||||
            super(itemView);
 | 
			
		||||
			llPhoneNumberMain = itemView.findViewById(R.id.itemcontactLinearLayout1);
 | 
			
		||||
            contactName = itemView.findViewById(R.id.contact_name);
 | 
			
		||||
            contactNumber = itemView.findViewById(R.id.contact_number);
 | 
			
		||||
            dialAOHPCTCSeekBar = itemView.findViewById(R.id.aohpctcseekbar_dial);
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@ package cc.winboll.studio.contacts.adapters;
 | 
			
		||||
 */
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MotionEvent;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Button;
 | 
			
		||||
@@ -20,6 +21,7 @@ import cc.winboll.studio.contacts.R;
 | 
			
		||||
import cc.winboll.studio.contacts.beans.PhoneConnectRuleModel;
 | 
			
		||||
import cc.winboll.studio.contacts.dun.Rules;
 | 
			
		||||
import cc.winboll.studio.contacts.views.LeftScrollView;
 | 
			
		||||
import cc.winboll.studio.libappbase.LogUtils;
 | 
			
		||||
import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog;
 | 
			
		||||
import com.hjq.toast.ToastUtils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
@@ -60,6 +62,10 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
			
		||||
            final SimpleViewHolder simpleViewHolder = (SimpleViewHolder) holder;
 | 
			
		||||
            String szView = model.getRuleText().trim().equals("") ?"[NULL]": model.getRuleText();
 | 
			
		||||
            simpleViewHolder.tvRuleText.setText(szView);
 | 
			
		||||
            simpleViewHolder.checkBoxAllow.setChecked(model.isAllowConnection());
 | 
			
		||||
			simpleViewHolder.checkBoxAllow.setEnabled(false);
 | 
			
		||||
            simpleViewHolder.checkBoxEnable.setChecked(model.isEnable());
 | 
			
		||||
			simpleViewHolder.checkBoxEnable.setEnabled(false);
 | 
			
		||||
            simpleViewHolder.scrollView.setOnActionListener(new LeftScrollView.OnActionListener(){
 | 
			
		||||
 | 
			
		||||
                    @Override
 | 
			
		||||
@@ -215,16 +221,22 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
			
		||||
 | 
			
		||||
        private final LeftScrollView scrollView;
 | 
			
		||||
        private final TextView tvRuleText;
 | 
			
		||||
		CheckBox checkBoxAllow;
 | 
			
		||||
        CheckBox checkBoxEnable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public SimpleViewHolder(@NonNull ViewGroup parent, @NonNull View itemView) {
 | 
			
		||||
            super(itemView);
 | 
			
		||||
            scrollView = itemView.findViewById(R.id.scrollView);
 | 
			
		||||
            //tvRuleText = itemView.findViewById(R.id.ruletext_tv);
 | 
			
		||||
            tvRuleText = new TextView(itemView.getContext());
 | 
			
		||||
			LayoutInflater inflater = LayoutInflater.from(itemView.getContext());
 | 
			
		||||
		    View viewContent = inflater.inflate(R.layout.view_phone_connect_rule_simple_content, parent, false);
 | 
			
		||||
            tvRuleText = viewContent.findViewById(R.id.ruletext_tv);
 | 
			
		||||
            checkBoxAllow = viewContent.findViewById(R.id.checkbox_allow);
 | 
			
		||||
            checkBoxEnable = viewContent.findViewById(R.id.checkbox_enable);
 | 
			
		||||
            //tvRuleText = new TextView(itemView.getContext());
 | 
			
		||||
            scrollView.setContentWidth(parent.getWidth());
 | 
			
		||||
            //scrollView.setContentWidth(600);
 | 
			
		||||
            scrollView.addContentLayout(tvRuleText);
 | 
			
		||||
            scrollView.addContentLayout(viewContent);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
@@ -243,5 +255,9 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
			
		||||
            buttonConfirm = itemView.findViewById(R.id.button_confirm);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	private void setCheckBoxTouchListener(CheckBox checkBox) {
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -155,6 +155,19 @@ public class TomCat {
 | 
			
		||||
        return mContext.getExternalFilesDir(TAG);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public void cleanBoBullToon() {
 | 
			
		||||
		String destinationFolder = getWorkingFolder().getPath(); // 替换为实际的目标文件夹路径
 | 
			
		||||
		// 删除旧文件
 | 
			
		||||
		File fOldFolder = new File(destinationFolder);
 | 
			
		||||
		if (fOldFolder.exists()) {
 | 
			
		||||
			deleteFolderRecursive(fOldFolder);
 | 
			
		||||
			fOldFolder.mkdirs();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		ToastUtils.show("已清空 BoBullToon 数据!");
 | 
			
		||||
		LogUtils.d(TAG, "已清空 BoBullToon 数据");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    public boolean loadPhoneBoBullToon() {
 | 
			
		||||
        listPhoneBoBullToon.clear();
 | 
			
		||||
        File fBoBullToon = new File(getWorkingFolder(), "bobulltoon");
 | 
			
		||||
 
 | 
			
		||||
@@ -145,6 +145,14 @@ public class Rules {
 | 
			
		||||
            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 检验拨不通号码群
 | 
			
		||||
        if (!isDefend && MainService.isPhoneInBoBullToon(phoneNumber)) {
 | 
			
		||||
            LogUtils.d(TAG, String.format("PhoneNumber %s\n Is In BoBullToon", phoneNumber));
 | 
			
		||||
            isDefend = true;
 | 
			
		||||
            isConnect = false;
 | 
			
		||||
            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 查询通讯录是否有该联系人
 | 
			
		||||
        boolean isPhoneInContacts = ContactUtils.getInstance(mContext).isPhoneInContacts(mContext, phoneNumber);
 | 
			
		||||
        if (!isDefend) {
 | 
			
		||||
@@ -158,14 +166,6 @@ public class Rules {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 检验拨不通号码群
 | 
			
		||||
        if (!isDefend && MainService.isPhoneInBoBullToon(phoneNumber)) {
 | 
			
		||||
            LogUtils.d(TAG, String.format("PhoneNumber %s\n Is In BoBullToon", phoneNumber));
 | 
			
		||||
            isDefend = true;
 | 
			
		||||
            isConnect = false;
 | 
			
		||||
            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 正则匹配规则名单校验
 | 
			
		||||
        if (!isDefend) {
 | 
			
		||||
            for (int i = 0; i < _PhoneConnectRuleModelList.size(); i++) {
 | 
			
		||||
 
 | 
			
		||||
@@ -161,4 +161,12 @@ public class CallLogFragment extends Fragment {
 | 
			
		||||
            _CallLogFragment.triggerUpdate();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
	public void onResume() {
 | 
			
		||||
		super.onResume();
 | 
			
		||||
		//ToastUtils.show("onResume");
 | 
			
		||||
		callLogAdapter.relaodContacts();
 | 
			
		||||
		readCallLog();  // 窗口回显时更新通话记录
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ public class ContactsFragment extends Fragment {
 | 
			
		||||
        super.onViewCreated(view, savedInstanceState);
 | 
			
		||||
        recyclerView = view.findViewById(R.id.contacts_recycler_view);
 | 
			
		||||
        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
 | 
			
		||||
        contactAdapter = new ContactAdapter(contactList);
 | 
			
		||||
        contactAdapter = new ContactAdapter(getContext(), contactList);
 | 
			
		||||
        recyclerView.setAdapter(contactAdapter);
 | 
			
		||||
 | 
			
		||||
        searchEditText = view.findViewById(R.id.search_edit_text);
 | 
			
		||||
@@ -163,5 +163,12 @@ public class ContactsFragment extends Fragment {
 | 
			
		||||
        }
 | 
			
		||||
        contactAdapter.notifyDataSetChanged();
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
	public void onResume() {
 | 
			
		||||
		super.onResume();
 | 
			
		||||
		//ToastUtils.show("onResume");
 | 
			
		||||
		readContacts();  // 窗口回显时更新联系人列表
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,8 @@ public class LeftScrollView extends HorizontalScrollView {
 | 
			
		||||
        init();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void addContentLayout(TextView textView) {
 | 
			
		||||
        contentLayout.addView(textView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
 | 
			
		||||
    public void addContentLayout(View viewContent) {
 | 
			
		||||
        contentLayout.addView(viewContent, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContentWidth(int contentWidth) {
 | 
			
		||||
 
 | 
			
		||||
@@ -269,6 +269,19 @@
 | 
			
		||||
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:orientation="horizontal"
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:gravity="center_horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:text="<<==向左拉动列表项可编辑内容"/>
 | 
			
		||||
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<androidx.recyclerview.widget.RecyclerView
 | 
			
		||||
				android:id="@+id/recycler_view"
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
@@ -287,6 +300,12 @@
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:gravity="right">
 | 
			
		||||
 | 
			
		||||
				<Button
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:text="LogView"
 | 
			
		||||
					android:onClick="onLogView"/>
 | 
			
		||||
 | 
			
		||||
				<Button
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,10 @@
 | 
			
		||||
		<Button
 | 
			
		||||
			android:layout_width="wrap_content"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:text="Test Main"
 | 
			
		||||
			android:onClick="onTestMain"/>
 | 
			
		||||
			android:text="Add Demo Rules(While size is 0) and Test"
 | 
			
		||||
			android:onClick="onTestMain"
 | 
			
		||||
			android:textSize="10sp"
 | 
			
		||||
			android:textAllCaps="false"/>
 | 
			
		||||
 | 
			
		||||
	</LinearLayout>
 | 
			
		||||
 | 
			
		||||
@@ -43,7 +45,8 @@
 | 
			
		||||
			android:layout_width="wrap_content"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:text="Test Phone"
 | 
			
		||||
			android:onClick="onTestPhone"/>
 | 
			
		||||
			android:onClick="onTestPhone"
 | 
			
		||||
			android:textAllCaps="false"/>
 | 
			
		||||
 | 
			
		||||
	</LinearLayout>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@
 | 
			
		||||
	<LinearLayout
 | 
			
		||||
		android:orientation="horizontal"
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="wrap_content">
 | 
			
		||||
		android:layout_height="wrap_content"
 | 
			
		||||
		android:id="@+id/itemcontactLinearLayout1">
 | 
			
		||||
 | 
			
		||||
		<TextView
 | 
			
		||||
			android:id="@+id/contact_number"
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@
 | 
			
		||||
			android:id="@+id/checkbox_allow"
 | 
			
		||||
			android:layout_width="wrap_content"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:text="允许连接"/>
 | 
			
		||||
			android:text="连接"/>
 | 
			
		||||
 | 
			
		||||
        <CheckBox
 | 
			
		||||
            android:id="@+id/checkbox_enable"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,55 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<HorizontalScrollView
 | 
			
		||||
    xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
			
		||||
	android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="wrap_content"
 | 
			
		||||
    android:scrollbars="none"
 | 
			
		||||
    android:id="@+id/scrollView">
 | 
			
		||||
 | 
			
		||||
    <LinearLayout
 | 
			
		||||
        android:layout_width="wrap_content"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
        <!-- 内容区域 -->
 | 
			
		||||
        <LinearLayout
 | 
			
		||||
            android:id="@+id/content_layout"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:padding="16dp"
 | 
			
		||||
            android:background="@color/white">
 | 
			
		||||
            <!-- 这里放置你的列表项内容 -->
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/text_view"
 | 
			
		||||
                android:layout_width="0dp"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_weight="1"
 | 
			
		||||
                android:textSize="16sp"/>
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
 | 
			
		||||
        <!-- 操作按钮 -->
 | 
			
		||||
        <LinearLayout
 | 
			
		||||
            android:id="@+id/action_layout"
 | 
			
		||||
            android:layout_width="wrap_content"
 | 
			
		||||
            android:layout_height="match_parent"
 | 
			
		||||
            android:orientation="horizontal"
 | 
			
		||||
            android:background="@color/lightgray">
 | 
			
		||||
 | 
			
		||||
            <Button
 | 
			
		||||
                android:id="@+id/edit_btn"
 | 
			
		||||
                android:layout_width="80dp"
 | 
			
		||||
                android:layout_height="match_parent"
 | 
			
		||||
                android:text="编辑"
 | 
			
		||||
                android:background="@color/blue" />
 | 
			
		||||
 | 
			
		||||
            <Button
 | 
			
		||||
                android:id="@+id/delete_btn"
 | 
			
		||||
                android:layout_width="80dp"
 | 
			
		||||
                android:layout_height="match_parent"
 | 
			
		||||
                android:text="删除"
 | 
			
		||||
                android:background="@color/red" />
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
    </LinearLayout>
 | 
			
		||||
</HorizontalScrollView>
 | 
			
		||||
@@ -0,0 +1,35 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout
 | 
			
		||||
	xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
			
		||||
	android:orientation="horizontal"
 | 
			
		||||
	android:layout_width="match_parent"
 | 
			
		||||
	android:layout_height="wrap_content"
 | 
			
		||||
	android:layout_gravity="center_vertical"
 | 
			
		||||
	android:gravity="center_vertical">
 | 
			
		||||
 | 
			
		||||
	<TextView
 | 
			
		||||
		android:layout_width="wrap_content"
 | 
			
		||||
		android:layout_height="wrap_content"
 | 
			
		||||
		android:text="Text"
 | 
			
		||||
		android:layout_weight="1.0"
 | 
			
		||||
		android:id="@+id/ruletext_tv"/>
 | 
			
		||||
 | 
			
		||||
	<CheckBox
 | 
			
		||||
		android:id="@+id/checkbox_allow"
 | 
			
		||||
		android:layout_width="wrap_content"
 | 
			
		||||
		android:layout_height="wrap_content"
 | 
			
		||||
		android:text="连接"
 | 
			
		||||
		android:clickable="false"
 | 
			
		||||
		android:focusable="false"/>
 | 
			
		||||
 | 
			
		||||
	<CheckBox
 | 
			
		||||
		android:id="@+id/checkbox_enable"
 | 
			
		||||
		android:layout_width="wrap_content"
 | 
			
		||||
		android:layout_height="wrap_content"
 | 
			
		||||
		android:text="启用"
 | 
			
		||||
		android:clickable="false"
 | 
			
		||||
		android:focusable="false"/>
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	xmlns:app="http://schemas.android.com/apk/res-auto">
 | 
			
		||||
    
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/item_calllog_phonenumber_copy"
 | 
			
		||||
        android:title="Copy"/>
 | 
			
		||||
    
 | 
			
		||||
</menu>
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	xmlns:app="http://schemas.android.com/apk/res-auto">
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/item_contact_phonenumber_copy"
 | 
			
		||||
        android:title="Copy"/>
 | 
			
		||||
    
 | 
			
		||||
</menu>
 | 
			
		||||
@@ -2,6 +2,6 @@
 | 
			
		||||
<resources>
 | 
			
		||||
 | 
			
		||||
    <string name="app_name">Contacts</string>
 | 
			
		||||
    <string name="default_bobulltoon_url">http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip</string>
 | 
			
		||||
    <string name="default_bobulltoon_url">https://gitea.winboll.cc/Studio/BoBullToon/archive/main.zip</string>
 | 
			
		||||
 | 
			
		||||
</resources>
 | 
			
		||||
 
 | 
			
		||||
@@ -42,23 +42,24 @@ android {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    compileOptions {
 | 
			
		||||
    /*compileOptions {
 | 
			
		||||
        sourceCompatibility JavaVersion.VERSION_11
 | 
			
		||||
        targetCompatibility JavaVersion.VERSION_11
 | 
			
		||||
    }
 | 
			
		||||
    }*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
	api project(':libjc')
 | 
			
		||||
	api 'cc.winboll.studio:libaes:15.9.1'
 | 
			
		||||
	api 'cc.winboll.studio:libapputils:15.8.4'
 | 
			
		||||
	api 'cc.winboll.studio:libappbase:15.8.4'
 | 
			
		||||
	
 | 
			
		||||
    // https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on
 | 
			
		||||
    //implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
 | 
			
		||||
    implementation 'org.bouncycastle:bcprov-jdk15to18:1.69'
 | 
			
		||||
    implementation 'org.bouncycastle:bcpkix-jdk15to18:1.69'
 | 
			
		||||
 | 
			
		||||
	api project(':libjc')
 | 
			
		||||
    api 'androidx.appcompat:appcompat:1.0.0'
 | 
			
		||||
	api 'com.google.android.material:material:1.0.0'
 | 
			
		||||
    
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:9.1.0'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:1.0.3'
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Fri Jan 10 22:03:57 GMT 2025
 | 
			
		||||
#Tue Jun 24 11:17:30 GMT 2025
 | 
			
		||||
stageCount=0
 | 
			
		||||
libraryProject=libjc
 | 
			
		||||
baseVersion=1.0
 | 
			
		||||
publishVersion=1.0.0
 | 
			
		||||
buildCount=133
 | 
			
		||||
buildCount=135
 | 
			
		||||
baseBetaVersion=1.0.1
 | 
			
		||||
 
 | 
			
		||||
@@ -15,10 +15,10 @@ import android.widget.LinearLayout;
 | 
			
		||||
import android.widget.ScrollView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import cc.winboll.studio.jc.R;
 | 
			
		||||
import cc.winboll.studio.libapputils.log.LogUtils;
 | 
			
		||||
import cc.winboll.studio.libjc.JAR_RUNNING_MODE;
 | 
			
		||||
import cc.winboll.studio.libjc.JCMainThread;
 | 
			
		||||
import cc.winboll.studio.libjc.net.JCSocketClient;
 | 
			
		||||
import cc.winboll.studio.libjc.util.LogUtils;
 | 
			
		||||
import cc.winboll.studio.libjc.Main;
 | 
			
		||||
 | 
			
		||||
final public class MainActivity extends Activity implements JCMainThread.OnMessageListener {
 | 
			
		||||
 | 
			
		||||
@@ -77,7 +77,7 @@ final public class MainActivity extends Activity implements JCMainThread.OnMessa
 | 
			
		||||
        // 启动主线程
 | 
			
		||||
        _JCMainThread = JCMainThread.getInstance(getPackageName());
 | 
			
		||||
        _JCMainThread.setOnLogListener(this);
 | 
			
		||||
        _JCMainThread.setRunningMode(JAR_RUNNING_MODE.JC);
 | 
			
		||||
        //_JCMainThread.setRunningMode(Main.JAR_RUNNING_MODE.JC);
 | 
			
		||||
        _JCMainThread.start();
 | 
			
		||||
 | 
			
		||||
        // 设置 WinBoll 应用 UI 类型
 | 
			
		||||
 
 | 
			
		||||
@@ -21,8 +21,8 @@ android {
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.2'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.2'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
			
		||||
    
 | 
			
		||||
    // 吐司类库
 | 
			
		||||
    api 'com.github.getActivity:ToastUtils:10.5'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Tue Jun 03 19:16:41 HKT 2025
 | 
			
		||||
stageCount=2
 | 
			
		||||
#Sat Jun 28 12:59:30 HKT 2025
 | 
			
		||||
stageCount=3
 | 
			
		||||
libraryProject=libaes
 | 
			
		||||
baseVersion=15.8
 | 
			
		||||
publishVersion=15.8.1
 | 
			
		||||
baseVersion=15.9
 | 
			
		||||
publishVersion=15.9.2
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.8.2
 | 
			
		||||
baseBetaVersion=15.9.3
 | 
			
		||||
 
 | 
			
		||||
@@ -107,7 +107,7 @@ public class AboutView extends LinearLayout {
 | 
			
		||||
        mszAppDescription = mAPPInfo.getAppDescription();
 | 
			
		||||
        mnAppIcon = mAPPInfo.getAppIcon();
 | 
			
		||||
 | 
			
		||||
        mszWinBoLLServerHost = GlobalApplication.isDebuging() ?  "https://dev.winboll.cc": "https://www.winboll.cc";
 | 
			
		||||
        mszWinBoLLServerHost = GlobalApplication.isDebuging() ?  "https://yun-preivew.winboll.cc": "https://yun.winboll.cc";
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Thu Jun 05 08:59:45 GMT 2025
 | 
			
		||||
stageCount=8
 | 
			
		||||
#Thu Jul 17 11:39:14 HKT 2025
 | 
			
		||||
stageCount=2
 | 
			
		||||
libraryProject=libappbase
 | 
			
		||||
baseVersion=15.8
 | 
			
		||||
publishVersion=15.8.7
 | 
			
		||||
buildCount=14
 | 
			
		||||
baseBetaVersion=15.8.8
 | 
			
		||||
baseVersion=15.9
 | 
			
		||||
publishVersion=15.9.1
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.9.2
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Fri Jan 10 22:03:57 GMT 2025
 | 
			
		||||
#Tue Jun 24 11:17:30 GMT 2025
 | 
			
		||||
stageCount=0
 | 
			
		||||
libraryProject=libjc
 | 
			
		||||
baseVersion=1.0
 | 
			
		||||
publishVersion=1.0.0
 | 
			
		||||
buildCount=133
 | 
			
		||||
buildCount=135
 | 
			
		||||
baseBetaVersion=1.0.1
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ public class Main {
 | 
			
		||||
    public final static int JAR_RUNNING_MODE_JCNDK_DEBUG = 4;
 | 
			
		||||
    public final static int JAR_RUNNING_MODE_JC = 5;
 | 
			
		||||
    public final static int JAR_RUNNING_MODE_JC_DEBUG = 6;
 | 
			
		||||
    public enum JAR_RUNNING_MODE {
 | 
			
		||||
    public static enum JAR_RUNNING_MODE {
 | 
			
		||||
        UNKNOWN(JAR_RUNNING_MODE_UNKNOWN),
 | 
			
		||||
        CONSOLE(JAR_RUNNING_MODE_CONSOLE),
 | 
			
		||||
        CONSOLE_DEBUG(JAR_RUNNING_MODE_CONSOLE_DEBUG),
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ android {
 | 
			
		||||
        // versionName 更新后需要手动设置 
 | 
			
		||||
        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
			
		||||
        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
			
		||||
        versionName "15.2" 
 | 
			
		||||
        versionName "15.3" 
 | 
			
		||||
        if(true) {
 | 
			
		||||
            versionName = genVersionName("${versionName}")
 | 
			
		||||
        }
 | 
			
		||||
@@ -45,9 +45,9 @@ android {
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.8.0'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.1'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.1'
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.9.2'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
			
		||||
    
 | 
			
		||||
	api 'io.github.medyo:android-about-page:2.0.0'
 | 
			
		||||
    api 'com.github.getActivity:ToastUtils:10.5'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Tue May 20 20:39:06 HKT 2025
 | 
			
		||||
stageCount=6
 | 
			
		||||
#Thu Jul 03 13:50:15 HKT 2025
 | 
			
		||||
stageCount=2
 | 
			
		||||
libraryProject=
 | 
			
		||||
baseVersion=15.2
 | 
			
		||||
publishVersion=15.2.5
 | 
			
		||||
baseVersion=15.3
 | 
			
		||||
publishVersion=15.3.1
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.2.6
 | 
			
		||||
baseBetaVersion=15.3.2
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
			
		||||
import cc.winboll.studio.mymessagemanager.App;
 | 
			
		||||
import cc.winboll.studio.mymessagemanager.R;
 | 
			
		||||
 | 
			
		||||
public class AboutActivity extends WinBollActivity implements IWinBoLLActivity {
 | 
			
		||||
public class AboutActivity extends WinBoLLActivity implements IWinBoLLActivity {
 | 
			
		||||
 | 
			
		||||
    public static final String TAG = "AboutActivity";
 | 
			
		||||
 | 
			
		||||
@@ -79,11 +79,11 @@ public class AboutActivity extends WinBollActivity implements IWinBoLLActivity {
 | 
			
		||||
        appInfo.setAppName(getString(R.string.app_name));
 | 
			
		||||
        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
			
		||||
        appInfo.setAppDescription(getString(R.string.app_description));
 | 
			
		||||
        appInfo.setAppGitName("APP");
 | 
			
		||||
        appInfo.setAppGitName("APPBase");
 | 
			
		||||
        appInfo.setAppGitOwner("Studio");
 | 
			
		||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
			
		||||
        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
			
		||||
        appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=MyMessageManager");
 | 
			
		||||
        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=5&extra=page%3D1");
 | 
			
		||||
        appInfo.setAppAPKName("MyMessageManager");
 | 
			
		||||
        appInfo.setAppAPKFolderName("MyMessageManager");
 | 
			
		||||
        return new AboutView(mContext, appInfo);
 | 
			
		||||
 
 | 
			
		||||
@@ -103,6 +103,9 @@ abstract public class BaseActivity extends AppCompatActivity {
 | 
			
		||||
        } else if (R.id.item_defaulttheme == item.getItemId()) {
 | 
			
		||||
            AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
 | 
			
		||||
            recreate();
 | 
			
		||||
        } else if (R.id.item_defaulttheme == item.getItemId()) {
 | 
			
		||||
            AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
 | 
			
		||||
            recreate();
 | 
			
		||||
        }
 | 
			
		||||
        //ToastUtils.show("nThemeStyleID " + Integer.toString(nThemeStyleID));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -269,17 +269,9 @@ public class MainActivity extends BaseActivity {
 | 
			
		||||
    public boolean onCreateOptionsMenu(Menu menu) {
 | 
			
		||||
        //return super.onCreateOptionsMenu(menu);
 | 
			
		||||
        getMenuInflater().inflate(R.menu.toolbar_main, menu);
 | 
			
		||||
 | 
			
		||||
        /*ThemeUtil.BaseTheme baseTheme = ThemeUtil.getTheme(mAppConfigUtil.mAppConfigBean.getAppThemeID());
 | 
			
		||||
        if (baseTheme == ThemeUtil.BaseTheme.DEFAULT) {
 | 
			
		||||
            menu.findItem(R.id.app_defaulttheme).setChecked(true);
 | 
			
		||||
        } else if (baseTheme == ThemeUtil.BaseTheme.SKY) {
 | 
			
		||||
            menu.findItem(R.id.app_skytheme).setChecked(true);
 | 
			
		||||
        } else if (baseTheme == ThemeUtil.BaseTheme.GOLDEN) {
 | 
			
		||||
            menu.findItem(R.id.app_goldentheme).setChecked(true);
 | 
			
		||||
        }*/
 | 
			
		||||
 | 
			
		||||
        return super.onCreateOptionsMenu(menu);
 | 
			
		||||
        super.onCreateOptionsMenu(menu);
 | 
			
		||||
		getMenuInflater().inflate(R.menu.toolbar_main2, menu);
 | 
			
		||||
		return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void reloadSMS() {
 | 
			
		||||
@@ -306,7 +298,7 @@ public class MainActivity extends BaseActivity {
 | 
			
		||||
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
			
		||||
            startActivity(i);
 | 
			
		||||
		} else if (nItemId ==  R.id.app_log) {
 | 
			
		||||
            //App.getWinBoLLActivityManager().startLogActivity(this);
 | 
			
		||||
            App.getWinBoLLActivityManager().startLogActivity(this);
 | 
			
		||||
        } else if (nItemId ==  R.id.app_unittest) {
 | 
			
		||||
            Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
 | 
			
		||||
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
			
		||||
 
 | 
			
		||||
@@ -13,9 +13,9 @@ import cc.winboll.studio.libaes.beans.AESThemeBean;
 | 
			
		||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
 | 
			
		||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
			
		||||
 | 
			
		||||
public class WinBollActivity extends AppCompatActivity implements IWinBoLLActivity {
 | 
			
		||||
public class WinBoLLActivity extends AppCompatActivity implements IWinBoLLActivity {
 | 
			
		||||
 | 
			
		||||
    public static final String TAG = "WinBollActivity";
 | 
			
		||||
    public static final String TAG = "WinBoLLActivity";
 | 
			
		||||
 | 
			
		||||
    protected volatile AESThemeBean.ThemeType mThemeType;
 | 
			
		||||
 | 
			
		||||
@@ -34,7 +34,7 @@
 | 
			
		||||
 | 
			
		||||
	</ScrollView>
 | 
			
		||||
 | 
			
		||||
	<cc.winboll.studio.shared.log.LogView
 | 
			
		||||
	<cc.winboll.studio.libappbase.LogView
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="0dp"
 | 
			
		||||
		android:layout_weight="1.0"
 | 
			
		||||
 
 | 
			
		||||
@@ -17,26 +17,4 @@
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_smsrule"
 | 
			
		||||
        android:title="@string/text_smsrule"/>
 | 
			
		||||
    <item android:title="@string/app_developoptions">
 | 
			
		||||
        <menu>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_log"
 | 
			
		||||
                android:title="@string/app_log"/>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_unittest"
 | 
			
		||||
                android:title="@string/app_unittest"/>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_crashtest"
 | 
			
		||||
                android:title="@string/app_crashtest"/>
 | 
			
		||||
        </menu>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_appsettings"
 | 
			
		||||
        android:title="@string/text_appsettings"/>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_about"
 | 
			
		||||
        android:title="@string/app_about"/>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_smsrecycle"
 | 
			
		||||
        android:title="@string/app_smsrecycle"/>
 | 
			
		||||
</menu>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								mymessagemanager/src/main/res/menu/toolbar_main2.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								mymessagemanager/src/main/res/menu/toolbar_main2.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	xmlns:app="http://schemas.android.com/apk/res-auto">
 | 
			
		||||
	<item android:title="@string/app_developoptions">
 | 
			
		||||
        <menu>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_log"
 | 
			
		||||
                android:title="@string/app_log"/>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_unittest"
 | 
			
		||||
                android:title="@string/app_unittest"/>
 | 
			
		||||
            <item
 | 
			
		||||
                android:id="@+id/app_crashtest"
 | 
			
		||||
                android:title="@string/app_crashtest"/>
 | 
			
		||||
        </menu>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_appsettings"
 | 
			
		||||
        android:title="@string/text_appsettings"/>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_about"
 | 
			
		||||
        android:title="@string/app_about"/>
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/app_smsrecycle"
 | 
			
		||||
        android:title="@string/app_smsrecycle"/>
 | 
			
		||||
</menu>
 | 
			
		||||
@@ -22,6 +22,7 @@
 | 
			
		||||
 | 
			
		||||
// JC 项目编译设置
 | 
			
		||||
//include ':jc'
 | 
			
		||||
//include ':libjc'
 | 
			
		||||
//rootProject.name = "jc"
 | 
			
		||||
 | 
			
		||||
// AES 项目编译设置
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user