Merge remote-tracking branch 'origin/aes' into appbase

This commit is contained in:
ZhanGSKen 2025-04-03 11:18:22 +08:00
commit 2e02cd3553
7 changed files with 82 additions and 34 deletions

View File

@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Wed Apr 02 20:09:04 HKT 2025 #Thu Apr 03 11:14:05 HKT 2025
stageCount=6 stageCount=7
libraryProject=libaes libraryProject=libaes
baseVersion=15.2 baseVersion=15.2
publishVersion=15.2.5 publishVersion=15.2.6
buildCount=0 buildCount=0
baseBetaVersion=15.2.6 baseBetaVersion=15.2.7

View File

@ -86,6 +86,8 @@ public class AboutActivity extends WinBollActivity implements IWinBollActivity {
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=AES"); appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=AES");
appInfo.setAppAPKName("AES"); appInfo.setAppAPKName("AES");
appInfo.setAppAPKFolderName("AES"); appInfo.setAppAPKFolderName("AES");
//appInfo.setIsAddDebugTools(false);
appInfo.setIsAddDebugTools(BuildConfig.DEBUG);
return new AboutView(mContext, appInfo); return new AboutView(mContext, appInfo);
} }
} }

View File

@ -51,6 +51,6 @@ dependencies {
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
//api 'androidx.fragment:fragment:1.1.0' //api 'androidx.fragment:fragment:1.1.0'
api 'cc.winboll.studio:libapputils:15.2.1' api 'cc.winboll.studio:libapputils:15.2.2'
api 'cc.winboll.studio:libappbase:15.2.2' api 'cc.winboll.studio:libappbase:15.2.2'
} }

View File

@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Wed Apr 02 20:08:50 HKT 2025 #Thu Apr 03 11:13:53 HKT 2025
stageCount=6 stageCount=7
libraryProject=libaes libraryProject=libaes
baseVersion=15.2 baseVersion=15.2
publishVersion=15.2.5 publishVersion=15.2.6
buildCount=0 buildCount=0
baseBetaVersion=15.2.6 baseBetaVersion=15.2.7

View File

@ -32,7 +32,9 @@ public class APPInfo implements Serializable {
String appAPKName; String appAPKName;
// 应用包存储文件夹名称 // 应用包存储文件夹名称
String appAPKFolderName; String appAPKFolderName;
// 是否添加调试工具
boolean isAddDebugTools;
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) { public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) {
this.appName = appName; this.appName = appName;
this.appIcon = appIcon; this.appIcon = appIcon;
@ -44,6 +46,21 @@ public class APPInfo implements Serializable {
this.appHomePage = appHomePage; this.appHomePage = appHomePage;
this.appAPKName = appAPKName; this.appAPKName = appAPKName;
this.appAPKFolderName = appAPKFolderName; this.appAPKFolderName = appAPKFolderName;
this.isAddDebugTools = false;
}
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName, boolean isAddDebugTools) {
this.appName = appName;
this.appIcon = appIcon;
this.appDescription = appDescription;
this.appGitName = appGitName;
this.appGitOwner = appGitOwner;
this.appGitAPPBranch = appGitAPPBranch;
this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder;
this.appHomePage = appHomePage;
this.appAPKName = appAPKName;
this.appAPKFolderName = appAPKFolderName;
this.isAddDebugTools = isAddDebugTools;
} }
public APPInfo() { public APPInfo() {
@ -58,6 +75,15 @@ public class APPInfo implements Serializable {
this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP"; this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP";
this.appAPKName = "APP"; this.appAPKName = "APP";
this.appAPKFolderName = "APP"; this.appAPKFolderName = "APP";
this.isAddDebugTools = false;
}
public void setIsAddDebugTools(boolean isAddDebugTools) {
this.isAddDebugTools = isAddDebugTools;
}
public boolean isAddDebugTools() {
return isAddDebugTools;
} }
public void setAppGitOwner(String appGitOwner) { public void setAppGitOwner(String appGitOwner) {

View File

@ -32,6 +32,7 @@ import okhttp3.Credentials;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;
import mehdi.sakout.aboutpage.BuildConfig;
public class AboutView extends LinearLayout { public class AboutView extends LinearLayout {
@ -50,6 +51,7 @@ public class AboutView extends LinearLayout {
String mszAppGitName = ""; String mszAppGitName = "";
String mszAppVersionName = ""; String mszAppVersionName = "";
String mszCurrentAppPackageName = ""; String mszCurrentAppPackageName = "";
boolean mIsAddDebugTools;
volatile String mszNewestAppPackageName = ""; volatile String mszNewestAppPackageName = "";
String mszAppDescription = ""; String mszAppDescription = "";
String mszHomePage = ""; String mszHomePage = "";
@ -91,6 +93,7 @@ public class AboutView extends LinearLayout {
appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder)); appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder));
appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription)); appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription));
appInfo.setAppIcon(typedArray.getResourceId(R.styleable.AboutView_appicon, R.drawable.ic_winboll)); appInfo.setAppIcon(typedArray.getResourceId(R.styleable.AboutView_appicon, R.drawable.ic_winboll));
appInfo.setIsAddDebugTools(typedArray.getBoolean(R.styleable.AboutView_is_adddebugtools, false));
// 返回一个绑定资源结束的信号给资源 // 返回一个绑定资源结束的信号给资源
typedArray.recycle(); typedArray.recycle();
return appInfo; return appInfo;
@ -210,16 +213,6 @@ public class AboutView extends LinearLayout {
}; };
protected View createAboutPage() { protected View createAboutPage() {
// 定义应用调试按钮
//
Element elementAppMode;
if (GlobalApplication.isDebuging()) {
elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll);
elementAppMode.setOnClickListener(mAppNormalOnClickListener);
} else {
elementAppMode = new Element(mContext.getString(R.string.app_debug), R.drawable.ic_winboll);
elementAppMode.setOnClickListener(mAppDebugOnClickListener);
}
// 定义 GitWeb 按钮 // 定义 GitWeb 按钮
// //
Element elementGitWeb = new Element(mContext.getString(R.string.gitea_home), R.drawable.ic_winboll); Element elementGitWeb = new Element(mContext.getString(R.string.gitea_home), R.drawable.ic_winboll);
@ -237,8 +230,8 @@ public class AboutView extends LinearLayout {
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
} }
View aboutPage = new AboutPage(mContext) AboutPage aboutPage = new AboutPage(mContext);
.setDescription(szAppInfo) aboutPage.setDescription(szAppInfo)
//.isRTL(false) //.isRTL(false)
//.setCustomFont(String) // or Typeface //.setCustomFont(String) // or Typeface
.setImage(mnAppIcon) .setImage(mnAppIcon)
@ -247,17 +240,31 @@ public class AboutView extends LinearLayout {
//.addGroup("Connect with us") //.addGroup("Connect with us")
.addEmail("ZhanGSKen@AliYun.Com") .addEmail("ZhanGSKen@AliYun.Com")
.addWebsite(mszHomePage) .addWebsite(mszHomePage)
.addItem(elementAppMode)
.addItem(elementGitWeb) .addItem(elementGitWeb)
.addItem(elementAppUpdate) .addItem(elementAppUpdate);
//.addFacebook("the.medy") //.addFacebook("the.medy")
//.addTwitter("medyo80") //.addTwitter("medyo80")
//.addYoutube("UCdPQtdWIsg7_pi4mrRu46vA") //.addYoutube("UCdPQtdWIsg7_pi4mrRu46vA")
//.addPlayStore("com.ideashower.readitlater.pro") //.addPlayStore("com.ideashower.readitlater.pro")
//.addGitHub("medyo") //.addGitHub("medyo")
//.addInstagram("medyo80") //.addInstagram("medyo80")
.create(); //.create();
return aboutPage;
if (mAPPInfo.isAddDebugTools()) {
// 定义应用调试按钮
//
Element elementAppMode;
if (GlobalApplication.isDebuging()) {
elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll);
elementAppMode.setOnClickListener(mAppNormalOnClickListener);
} else {
elementAppMode = new Element(mContext.getString(R.string.app_debug), R.drawable.ic_winboll);
elementAppMode.setOnClickListener(mAppDebugOnClickListener);
}
aboutPage.addItem(elementAppMode);
}
return aboutPage.create();
} }
View.OnClickListener mAppDebugOnClickListener = new View.OnClickListener(){ View.OnClickListener mAppDebugOnClickListener = new View.OnClickListener(){
@ -328,7 +335,7 @@ public class AboutView extends LinearLayout {
String password = "WinBollPowerByZhanGSKen"; String password = "WinBollPowerByZhanGSKen";
credential = Credentials.basic(username, password); credential = Credentials.basic(username, password);
} }
Request request = new Request.Builder() Request request = new Request.Builder()
.url(szUrl) .url(szUrl)
.header("Accept", "text/plain") // 设置正确的Content-Type头 .header("Accept", "text/plain") // 设置正确的Content-Type头

View File

@ -11,7 +11,20 @@
<attr name="attrAToolbarStartColor" format="color" /> <attr name="attrAToolbarStartColor" format="color" />
<attr name="attrAToolbarCenterColor" format="color" /> <attr name="attrAToolbarCenterColor" format="color" />
<attr name="attrAToolbarEndColor" format="color" /> <attr name="attrAToolbarEndColor" format="color" />
<declare-styleable name="AboutView">
<attr name="app_name" format="string" />
<attr name="app_apkfoldername" format="string" />
<attr name="app_apkname" format="string" />
<attr name="app_gitname" format="string" />
<attr name="app_gitowner" format="string" />
<attr name="app_gitappbranch" format="string" />
<attr name="app_gitappsubprojectfolder" format="string" />
<attr name="appdescription" format="string" />
<attr name="appicon" format="reference" />
<attr name="is_adddebugtools" format="boolean" />
</declare-styleable>
<declare-styleable name="AToolbar"> <declare-styleable name="AToolbar">
<attr name="attrAToolbarTitleTextColor"/> <attr name="attrAToolbarTitleTextColor"/>
<attr name="attrAToolbarStartColor"/> <attr name="attrAToolbarStartColor"/>