mirror of
http://gitea.winboll.cc/Studio/WinBoLL.git
synced 2026-07-04 22:29:33 +08:00
Compare commits
2 Commits
bdd8d1e2b6
...
5fc59f3305
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fc59f3305 | ||
|
|
b6ba73126f |
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Jun 02 08:54:20 HKT 2026
|
#Wed Jun 03 07:07:27 HKT 2026
|
||||||
stageCount=13
|
stageCount=15
|
||||||
libraryProject=libaes
|
libraryProject=libaes
|
||||||
baseVersion=15.20
|
baseVersion=15.20
|
||||||
publishVersion=15.20.12
|
publishVersion=15.20.14
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.20.13
|
baseBetaVersion=15.20.15
|
||||||
|
|||||||
@@ -7,9 +7,12 @@ package cc.winboll.studio.aes;
|
|||||||
*/
|
*/
|
||||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||||
import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
||||||
|
import cc.winboll.studio.libappbase.CrashHandler;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.ToastUtils;
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
import java.util.ArrayList;
|
import cc.winboll.studio.libappbase.utils.CrashHandleNotifyUtils;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
@@ -18,12 +21,25 @@ public class App extends GlobalApplication {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
try {
|
||||||
AESThemeUtil.init(null);
|
super.onCreate();
|
||||||
WinBoLLActivityManager.init(this);
|
ToastUtils.init(this);
|
||||||
|
WinBoLLActivityManager.init(this);
|
||||||
|
AESThemeUtil.init(null);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
PrintWriter pw = new PrintWriter(sw);
|
||||||
|
e.printStackTrace(pw);
|
||||||
|
pw.close();
|
||||||
|
String stackTraceStr = sw.toString();
|
||||||
|
CrashHandleNotifyUtils.handleUncaughtException(
|
||||||
|
this,
|
||||||
|
getPackageName(),
|
||||||
|
stackTraceStr,
|
||||||
|
CrashHandler.CrashActivity.class
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化 Toast 框架
|
|
||||||
ToastUtils.init(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ dependencies {
|
|||||||
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
||||||
|
|
||||||
// WinBoLL库 nexus.winboll.cc 地址
|
// WinBoLL库 nexus.winboll.cc 地址
|
||||||
//api 'cc.winboll.studio:libappbase:15.20.22'
|
api 'cc.winboll.studio:libappbase:15.20.25'
|
||||||
// 备用库 jitpack.io 地址
|
// 备用库 jitpack.io 地址
|
||||||
api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.22'
|
//api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.25'
|
||||||
|
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Jun 02 08:54:20 HKT 2026
|
#Wed Jun 03 07:07:27 HKT 2026
|
||||||
stageCount=13
|
stageCount=15
|
||||||
libraryProject=libaes
|
libraryProject=libaes
|
||||||
baseVersion=15.20
|
baseVersion=15.20
|
||||||
publishVersion=15.20.12
|
publishVersion=15.20.14
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.20.13
|
baseBetaVersion=15.20.15
|
||||||
|
|||||||
@@ -9,13 +9,10 @@ import android.app.Activity;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import cc.winboll.studio.libaes.R;
|
import cc.winboll.studio.libaes.R;
|
||||||
import cc.winboll.studio.libaes.activitys.DrawerFragmentActivity;
|
import cc.winboll.studio.libaes.activitys.DrawerFragmentActivity;
|
||||||
import cc.winboll.studio.libaes.models.AESThemeBean;
|
import cc.winboll.studio.libaes.models.AESThemeBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class AESThemeUtil {
|
public class AESThemeUtil {
|
||||||
@@ -33,7 +30,8 @@ public class AESThemeUtil {
|
|||||||
* 初始化主题样式ID集合
|
* 初始化主题样式ID集合
|
||||||
*/
|
*/
|
||||||
public static void init(ArrayList<Integer> themeStyleIDList) {
|
public static void init(ArrayList<Integer> themeStyleIDList) {
|
||||||
if(themeStyleIDList == null) {
|
|
||||||
|
if (themeStyleIDList == null) {
|
||||||
themeStyleIDList = new ArrayList<Integer>();
|
themeStyleIDList = new ArrayList<Integer>();
|
||||||
AESThemeBean.fillThemeStyleIDList(themeStyleIDList);
|
AESThemeBean.fillThemeStyleIDList(themeStyleIDList);
|
||||||
}
|
}
|
||||||
@@ -45,7 +43,7 @@ public class AESThemeUtil {
|
|||||||
* 获取当前主题样式ID
|
* 获取当前主题样式ID
|
||||||
*/
|
*/
|
||||||
public static int getThemeTypeID(Context context) {
|
public static int getThemeTypeID(Context context) {
|
||||||
AESThemeBean bean = AESThemeBean.loadBean(context, AESThemeBean.class);
|
AESThemeBean bean = AESThemeBean.loadBean(context, AESThemeBean.class);
|
||||||
return bean == null ? getThemeStyleID(AESThemeBean.ThemeType.AES) : bean.getCurrentThemeTypeID();
|
return bean == null ? getThemeStyleID(AESThemeBean.ThemeType.AES) : bean.getCurrentThemeTypeID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ dependencies {
|
|||||||
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
||||||
|
|
||||||
// WinBoLL库 nexus.winboll.cc 地址
|
// WinBoLL库 nexus.winboll.cc 地址
|
||||||
//api 'cc.winboll.studio:libappbase:15.20.22'
|
api 'cc.winboll.studio:libappbase:15.20.25'
|
||||||
//api 'cc.winboll.studio:libaes:15.20.12'
|
api 'cc.winboll.studio:libaes:15.20.14'
|
||||||
|
|
||||||
// 备用库 jitpack.io 地址
|
// 备用库 jitpack.io 地址
|
||||||
api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.22'
|
//api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.25'
|
||||||
api 'com.github.ZhanGSKen:libaes:aes-v15.20.12'
|
//api 'com.github.ZhanGSKen:libaes:aes-v15.20.14'
|
||||||
|
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Jun 02 20:00:52 HKT 2026
|
#Wed Jun 03 07:32:48 HKT 2026
|
||||||
stageCount=7
|
stageCount=8
|
||||||
libraryProject=libwinboll
|
libraryProject=libwinboll
|
||||||
baseVersion=15.20
|
baseVersion=15.20
|
||||||
publishVersion=15.20.6
|
publishVersion=15.20.7
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.20.7
|
baseBetaVersion=15.20.8
|
||||||
|
|||||||
@@ -108,12 +108,12 @@ dependencies {
|
|||||||
implementation 'androidx.biometric:biometric:1.1.0'
|
implementation 'androidx.biometric:biometric:1.1.0'
|
||||||
|
|
||||||
// WinBoLL库 nexus.winboll.cc 地址
|
// WinBoLL库 nexus.winboll.cc 地址
|
||||||
//api 'cc.winboll.studio:libappbase:15.20.22'
|
api 'cc.winboll.studio:libappbase:15.20.25'
|
||||||
//api 'cc.winboll.studio:libaes:15.20.12'
|
api 'cc.winboll.studio:libaes:15.20.14'
|
||||||
|
|
||||||
// 备用库 jitpack.io 地址
|
// 备用库 jitpack.io 地址
|
||||||
api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.22'
|
//api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.25'
|
||||||
api 'com.github.ZhanGSKen:libaes:aes-v15.20.12'
|
//api 'com.github.ZhanGSKen:libaes:aes-v15.20.14'
|
||||||
|
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Jun 02 20:00:52 HKT 2026
|
#Wed Jun 03 07:32:48 HKT 2026
|
||||||
stageCount=7
|
stageCount=8
|
||||||
libraryProject=libwinboll
|
libraryProject=libwinboll
|
||||||
baseVersion=15.20
|
baseVersion=15.20
|
||||||
publishVersion=15.20.6
|
publishVersion=15.20.7
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.20.7
|
baseBetaVersion=15.20.8
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -22,8 +21,12 @@ import android.widget.HorizontalScrollView;
|
|||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||||
|
import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
|
import cc.winboll.studio.libappbase.GlobalCrashActivity;
|
||||||
import cc.winboll.studio.libappbase.ToastUtils;
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
|
import cc.winboll.studio.libappbase.utils.CrashHandleNotifyUtils;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
@@ -33,58 +36,63 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.lang.Thread.UncaughtExceptionHandler;
|
import java.lang.Thread.UncaughtExceptionHandler;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
|
||||||
import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
public static final String TAG = "App";
|
public static final String TAG = "App";
|
||||||
|
|
||||||
public static final String COMPONENT_EN1 = "cc.winboll.studio.winboll.MainActivityEN1";
|
public static final String COMPONENT_EN1 = "cc.winboll.studio.winboll.MainActivityEN1";
|
||||||
public static final String COMPONENT_CN1 = "cc.winboll.studio.winboll.MainActivityCN1";
|
public static final String COMPONENT_CN1 = "cc.winboll.studio.winboll.MainActivityCN1";
|
||||||
public static final String COMPONENT_CN2 = "cc.winboll.studio.winboll.MainActivityCN2";
|
public static final String COMPONENT_CN2 = "cc.winboll.studio.winboll.MainActivityCN2";
|
||||||
public static final String ACTION_SWITCHTO_EN1 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_EN1";
|
public static final String ACTION_SWITCHTO_EN1 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_EN1";
|
||||||
public static final String ACTION_SWITCHTO_CN1 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_CN1";
|
public static final String ACTION_SWITCHTO_CN1 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_CN1";
|
||||||
public static final String ACTION_SWITCHTO_CN2 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_CN2";
|
public static final String ACTION_SWITCHTO_CN2 = "cc.winboll.studio.winboll.App.ACTION_SWITCHTO_CN2";
|
||||||
|
|
||||||
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
try {
|
||||||
//setIsDebugging(BuildConfig.DEBUG);
|
super.onCreate();
|
||||||
//setIsDebugging(false);
|
|
||||||
|
|
||||||
WinBoLLActivityManager.init(this);
|
|
||||||
|
|
||||||
// 初始化 AES 主题工具(注入当前应用命名空间的主题ID列表,按 ThemeType.ordinal() 顺序)
|
ToastUtils.init(this);
|
||||||
ArrayList<Integer> themeStyleList = new ArrayList<Integer>();
|
|
||||||
themeStyleList.add(R.style.MyAppTheme); // AES(0)
|
WinBoLLActivityManager.init(this);
|
||||||
themeStyleList.add(R.style.MyDepthAppTheme); // DEPTH(1)
|
|
||||||
themeStyleList.add(R.style.MySkyAppTheme); // SKY(2)
|
// 初始化 AES 主题工具(注入当前应用命名空间的主题ID列表,按 ThemeType.ordinal() 顺序)
|
||||||
themeStyleList.add(R.style.MyGoldenAppTheme); // GOLDEN(3)
|
ArrayList<Integer> themeStyleList = new ArrayList<Integer>();
|
||||||
themeStyleList.add(R.style.MyBearingAppTheme); // BEARING(4)
|
themeStyleList.add(R.style.MyAppTheme); // AES(0)
|
||||||
themeStyleList.add(R.style.MyMemorAppTheme); // MEMOR(5)
|
themeStyleList.add(R.style.MyDepthAppTheme); // DEPTH(1)
|
||||||
themeStyleList.add(R.style.MyTaoAppTheme); // TAO(6)
|
themeStyleList.add(R.style.MySkyAppTheme); // SKY(2)
|
||||||
AESThemeUtil.init(themeStyleList);
|
themeStyleList.add(R.style.MyGoldenAppTheme); // GOLDEN(3)
|
||||||
|
themeStyleList.add(R.style.MyBearingAppTheme); // BEARING(4)
|
||||||
// 初始化 Toast 框架
|
themeStyleList.add(R.style.MyMemorAppTheme); // MEMOR(5)
|
||||||
ToastUtils.init(this);
|
themeStyleList.add(R.style.MyTaoAppTheme); // TAO(6)
|
||||||
// 设置 Toast 布局样式
|
AESThemeUtil.init(themeStyleList);
|
||||||
//ToastUtils.setView(R.layout.view_toast);
|
|
||||||
//ToastUtils.setStyle(new WhiteToastStyle());
|
} catch (Throwable e) {
|
||||||
//ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
StringWriter sw = new StringWriter();
|
||||||
|
PrintWriter pw = new PrintWriter(sw);
|
||||||
//CrashHandler.getInstance().registerGlobal(this);
|
e.printStackTrace(pw);
|
||||||
//CrashHandler.getInstance().registerPart(this);
|
pw.close();
|
||||||
|
String stackTraceStr = sw.toString();
|
||||||
|
CrashHandleNotifyUtils.handleUncaughtException(
|
||||||
|
this,
|
||||||
|
getPackageName(),
|
||||||
|
stackTraceStr,
|
||||||
|
GlobalCrashActivity.class
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -92,8 +100,8 @@ public class App extends GlobalApplication {
|
|||||||
super.onTerminate();
|
super.onTerminate();
|
||||||
ToastUtils.release();
|
ToastUtils.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void write(InputStream input, OutputStream output) throws IOException {
|
public static void write(InputStream input, OutputStream output) throws IOException {
|
||||||
byte[] buf = new byte[1024 * 8];
|
byte[] buf = new byte[1024 * 8];
|
||||||
|
|||||||
Reference in New Issue
Block a user