Compare commits

...

15 Commits

Author SHA1 Message Date
ZhanGSKen
99bf804625 <apputils>APK 9.2.9 release Publish. 2025-01-23 02:43:51 +08:00
ZhanGSKen
261259e61e 应用类重构 2025-01-23 02:43:15 +08:00
ZhanGSKen
9aaf3433bd <libapputils>Library Release 9.2.8 2025-01-23 02:30:30 +08:00
ZhanGSKen
b739510951 <apputils>APK 9.2.8 release Publish. 2025-01-23 02:30:17 +08:00
ZhanGSKen
903359d9a2 <libapputils>Library Release 9.2.7 2025-01-23 02:17:45 +08:00
ZhanGSKen
69e7e72ed8 <apputils>APK 9.2.7 release Publish. 2025-01-23 02:17:32 +08:00
ZhanGSKen
a96ba362b4 应用类重构 2025-01-23 02:16:53 +08:00
ZhanGSKen
6447bcf924 <libapputils>Library Release 9.2.6 2025-01-23 01:54:40 +08:00
ZhanGSKen
18ed325731 <apputils>APK 9.2.6 release Publish. 2025-01-23 01:54:23 +08:00
ZhanGSKen
16e3d10b63 吐司框架分离初始化步骤 2025-01-23 01:53:06 +08:00
ZhanGSKen
8b0e8b00ae <libapputils>Library Release 9.2.5 2025-01-23 01:34:24 +08:00
ZhanGSKen
7f61ff1470 <apputils>APK 9.2.5 release Publish. 2025-01-23 01:34:03 +08:00
ZhanGSKen
c4e0c23a0c 应用介绍页添加 Gitea APP 子项目文件夹直接链接方式 2025-01-23 01:33:10 +08:00
ZhanGSKen
c7d26bbc3d 清理应用提示信息 2025-01-23 01:14:06 +08:00
ZhanGSKen
4968bbaeae <apputils>APK 9.2.4 release Publish. 2025-01-22 21:22:05 +08:00
13 changed files with 76 additions and 64 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Wed Jan 22 21:17:58 HKT 2025 #Thu Jan 23 02:43:51 HKT 2025
stageCount=4 stageCount=10
libraryProject=libapputils libraryProject=libapputils
baseVersion=9.2 baseVersion=9.2
publishVersion=9.2.3 publishVersion=9.2.9
buildCount=0 buildCount=0
baseBetaVersion=9.2.4 baseBetaVersion=9.2.10

View File

@@ -5,14 +5,12 @@ package cc.winboll.studio.apputils;
* @Date 2024/12/08 15:10:51 * @Date 2024/12/08 15:10:51
* @Describe 全局应用类 * @Describe 全局应用类
*/ */
import android.app.Application;
import android.view.Gravity; import android.view.Gravity;
import cc.winboll.studio.GlobalApplication; import cc.winboll.studio.libapputils.app.WinBollGlobalApplication;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.hjq.toast.style.WhiteToastStyle; import com.hjq.toast.style.WhiteToastStyle;
import cc.winboll.studio.libapputils.app.WinBollUtils;
public class App extends GlobalApplication { public class App extends WinBollGlobalApplication {
public static final String TAG = "App"; public static final String TAG = "App";
@@ -21,9 +19,12 @@ public class App extends GlobalApplication {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
// 初始化 WinBoll 框架 // 初始化 Toast 框架
WinBollUtils.getInstance(this).init(this); ToastUtils.init(this);
// 设置 Toast 布局样式
//ToastUtils.setView(R.layout.view_toast);
ToastUtils.setStyle(new WhiteToastStyle());
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
} }
} }

View File

@@ -174,6 +174,8 @@ final public class MainActivity extends WinBollActivity {
appInfo.setAppIcon(cc.winboll.studio.libapputils.R.drawable.ic_winboll); appInfo.setAppIcon(cc.winboll.studio.libapputils.R.drawable.ic_winboll);
appInfo.setAppDescription("APPUtils Description"); appInfo.setAppDescription("APPUtils Description");
appInfo.setAppGitName("APP"); appInfo.setAppGitName("APP");
appInfo.setAppGitAPPBranch("apputils");
appInfo.setAppGitAPPSubProjectFolder("apputils");
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP"); appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP");
appInfo.setAppAPKName("APPUtils"); appInfo.setAppAPKName("APPUtils");
appInfo.setAppAPKFolderName("APPUtils"); appInfo.setAppAPKFolderName("APPUtils");

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Wed Jan 22 21:17:58 HKT 2025 #Thu Jan 23 02:43:51 HKT 2025
stageCount=4 stageCount=10
libraryProject=libapputils libraryProject=libapputils
baseVersion=9.2 baseVersion=9.2
publishVersion=9.2.3 publishVersion=9.2.9
buildCount=0 buildCount=0
baseBetaVersion=9.2.4 baseBetaVersion=9.2.10

View File

@@ -81,7 +81,7 @@ public class AssetsHtmlActivity extends WinBollActivity {
if (szTemp != null && !szTemp.trim().equals("")) { if (szTemp != null && !szTemp.trim().equals("")) {
mszHtmlFileName = szTemp.trim(); mszHtmlFileName = szTemp.trim();
} }
ToastUtils.show(mszHtmlFileName); //ToastUtils.show(mszHtmlFileName);
} }
// 与其他应用分享 html 帮助 // 与其他应用分享 html 帮助

View File

@@ -64,7 +64,7 @@ abstract public class WinBollActivity extends AppCompatActivity {
// 传入的Intent action在Activity清单的intent-filter的action节点里有定义 // 传入的Intent action在Activity清单的intent-filter的action节点里有定义
if (intent.getAction() != null) { if (intent.getAction() != null) {
if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) { if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) {
WinBollUtils.setIsDebug(true); WinBollGlobalApplication.setIsDebug(true);
//ToastUtils.show!("WinBollApplication.setIsDebug(true) by action : " + intent.getAction()); //ToastUtils.show!("WinBollApplication.setIsDebug(true) by action : " + intent.getAction());
} }
@@ -356,7 +356,7 @@ abstract public class WinBollActivity extends AppCompatActivity {
if (isAddWinBollToolBar()) { if (isAddWinBollToolBar()) {
getMenuInflater().inflate(R.menu.toolbar_winboll_shared_main, menu); getMenuInflater().inflate(R.menu.toolbar_winboll_shared_main, menu);
} }
if (WinBollUtils.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
getMenuInflater().inflate(R.menu.toolbar_studio_debug, menu); getMenuInflater().inflate(R.menu.toolbar_studio_debug, menu);
} }
return super.onCreateOptionsMenu(menu); return super.onCreateOptionsMenu(menu);

View File

@@ -171,11 +171,11 @@ public class WinBollActivityManager {
//ToastUtils.show("finishAll() activity"); //ToastUtils.show("finishAll() activity");
if (activity != null && !activity.isFinishing() && !activity.isDestroyed()) { if (activity != null && !activity.isFinishing() && !activity.isDestroyed()) {
//ToastUtils.show("activity != null ..."); //ToastUtils.show("activity != null ...");
if (WinBollUtils.getInstance(mContext).getWinBollUI_TYPE() == WinBollUtils.WinBollUI_TYPE.Service) { if (WinBollGlobalApplication.getWinBollUI_TYPE() == WinBollGlobalApplication.WinBollUI_TYPE.Service) {
// 结束窗口和最近任务栏, 建议前台服务类应用使用,可以方便用户再次调用 UI 操作。 // 结束窗口和最近任务栏, 建议前台服务类应用使用,可以方便用户再次调用 UI 操作。
activity.finishAndRemoveTask(); activity.finishAndRemoveTask();
//ToastUtils.show("finishAll() activity.finishAndRemoveTask();"); //ToastUtils.show("finishAll() activity.finishAndRemoveTask();");
} else if (WinBollUtils.getInstance(mContext).getWinBollUI_TYPE() == WinBollUtils.WinBollUI_TYPE.Aplication) { } else if (WinBollGlobalApplication.getWinBollUI_TYPE() == WinBollGlobalApplication.WinBollUI_TYPE.Aplication) {
// 结束窗口保留最近任务栏,建议前台服务类应用使用,可以保持应用的系统自觉性。 // 结束窗口保留最近任务栏,建议前台服务类应用使用,可以保持应用的系统自觉性。
activity.finish(); activity.finish();
//ToastUtils.show("finishAll() activity.finish();"); //ToastUtils.show("finishAll() activity.finish();");

View File

@@ -7,25 +7,11 @@ import cc.winboll.studio.libapputils.bean.DebugBean;
import cc.winboll.studio.libapputils.log.LogUtils; import cc.winboll.studio.libapputils.log.LogUtils;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.hjq.toast.style.WhiteToastStyle; import com.hjq.toast.style.WhiteToastStyle;
import cc.winboll.studio.GlobalApplication;
public class WinBollUtils { public class WinBollGlobalApplication extends GlobalApplication {
public static final String TAG = "WinBollUtils"; public static final String TAG = "WinBollGlobalApplication";
//
// 单件结构模块
//
static volatile WinBollUtils _WinBollUtils;
Context mContext;
WinBollUtils(Context context) {
mContext = context;
}
public static synchronized WinBollUtils getInstance(Context context) {
if (_WinBollUtils == null) {
_WinBollUtils = new WinBollUtils(context);
}
return _WinBollUtils;
}
public static enum WinBollUI_TYPE { public static enum WinBollUI_TYPE {
Aplication, // 退出应用后保持最近任务栏任务记录主窗口 Aplication, // 退出应用后保持最近任务栏任务记录主窗口
@@ -42,7 +28,7 @@ public class WinBollUtils {
static volatile boolean isDebug = false; static volatile boolean isDebug = false;
public static void setIsDebug(boolean isDebug) { public static void setIsDebug(boolean isDebug) {
WinBollUtils.isDebug = isDebug; WinBollGlobalApplication.isDebug = isDebug;
} }
public static boolean isDebug() { public static boolean isDebug() {
@@ -59,7 +45,7 @@ public class WinBollUtils {
// //
// 获取 WinBoll 应用 UI 类型 // 获取 WinBoll 应用 UI 类型
// //
public static WinBollUI_TYPE getWinBollUI_TYPE() { public synchronized static WinBollUI_TYPE getWinBollUI_TYPE() {
return _mWinBollUI_TYPE; return _mWinBollUI_TYPE;
} }
@@ -67,19 +53,15 @@ public class WinBollUtils {
return mMyActivityLifecycleCallbacks; return mMyActivityLifecycleCallbacks;
} }
public void init(Application application) { @Override
public void onCreate() {
super.onCreate();
// 应用环境初始化, 基本调试环境 // 应用环境初始化, 基本调试环境
// //
// 初始化日志模块 // 初始化日志模块
LogUtils.init(mContext); LogUtils.init(this);
// 初始化 Toast 框架
ToastUtils.init(application);
// 设置 Toast 布局样式
//ToastUtils.setView(R.layout.view_toast);
ToastUtils.setStyle(new WhiteToastStyle());
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
// 设置应用调试标志 // 设置应用调试标志
DebugBean debugBean = DebugBean.loadBean(mContext, DebugBean.class); DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class);
if (debugBean == null) { if (debugBean == null) {
//ToastUtils.show("debugBean == null"); //ToastUtils.show("debugBean == null");
setIsDebug(false); setIsDebug(false);
@@ -89,8 +71,8 @@ public class WinBollUtils {
} }
// 应用窗口管理模块参数设置 // 应用窗口管理模块参数设置
// //
mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks(application); mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks(this);
application.registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks); registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks);
// 设置默认 WinBoll 应用 UI 类型 // 设置默认 WinBoll 应用 UI 类型
setWinBollUI_TYPE(WinBollUI_TYPE.Service); setWinBollUI_TYPE(WinBollUI_TYPE.Service);
//ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE()); //ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE());

View File

@@ -20,6 +20,10 @@ public class APPInfo implements Serializable {
String appDescription; String appDescription;
// 应用Git仓库地址 // 应用Git仓库地址
String appGitName; String appGitName;
// 应用Git仓库分支
String appGitAPPBranch;
// 应用Git仓库子项目文件夹
String appGitAPPSubProjectFolder;
// 应用主页 // 应用主页
String appHomePage; String appHomePage;
// 应用包名称 // 应用包名称
@@ -27,27 +31,46 @@ public class APPInfo implements Serializable {
// 应用包存储文件夹名称 // 应用包存储文件夹名称
String appAPKFolderName; String appAPKFolderName;
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appHomePage, String appAPKName, String appAPKFolderName) { public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) {
this.appName = appName; this.appName = appName;
this.appIcon = appIcon; this.appIcon = appIcon;
this.appDescription = appDescription; this.appDescription = appDescription;
this.appGitName = appGitName; this.appGitName = appGitName;
this.appGitAPPBranch = appGitAPPBranch;
this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder;
this.appHomePage = appHomePage; this.appHomePage = appHomePage;
this.appAPKName = appAPKName; this.appAPKName = appAPKName;
this.appAPKFolderName = appAPKFolderName; this.appAPKFolderName = appAPKFolderName;
} }
public APPInfo() { public APPInfo() {
this.appName = "WinBoll-APP"; this.appName = "WinBoll-APP";
this.appIcon = R.drawable.ic_launcher; this.appIcon = R.drawable.ic_launcher;
this.appDescription = "WinBoll APP"; this.appDescription = "WinBoll APP";
this.appGitName = "APP"; this.appGitName = "APP";
this.appGitAPPBranch = "app";
this.appGitAPPSubProjectFolder = "app";
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";
} }
public void setAppGitAPPBranch(String appGitAPPBranch) {
this.appGitAPPBranch = appGitAPPBranch;
}
public String getAppGitAPPBranch() {
return appGitAPPBranch;
}
public void setAppGitAPPSubProjectFolder(String appGitAPPSubProjectFolder) {
this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder;
}
public String getAppGitAPPSubProjectFolder() {
return appGitAPPSubProjectFolder;
}
public void setAppIcon(int appIcon) { public void setAppIcon(int appIcon) {
this.appIcon = appIcon; this.appIcon = appIcon;
} }

View File

@@ -9,7 +9,7 @@ import android.os.Bundle;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import cc.winboll.studio.libapputils.R; import cc.winboll.studio.libapputils.R;
import cc.winboll.studio.libapputils.app.WinBollActivity; import cc.winboll.studio.libapputils.app.WinBollActivity;
import cc.winboll.studio.libapputils.app.WinBollUtils; import cc.winboll.studio.libapputils.app.WinBollGlobalApplication;
public class LogActivity extends WinBollActivity { public class LogActivity extends WinBollActivity {
@@ -44,7 +44,7 @@ public class LogActivity extends WinBollActivity {
setContentView(R.layout.activity_log); setContentView(R.layout.activity_log);
mLogView = findViewById(R.id.logview); mLogView = findViewById(R.id.logview);
if (WinBollUtils.isDebug()) { mLogView.start(); } if (WinBollGlobalApplication.isDebug()) { mLogView.start(); }
} }
@Override @Override

View File

@@ -7,7 +7,7 @@ package cc.winboll.studio.libapputils.log;
* @Describe 应用日志类 * @Describe 应用日志类
*/ */
import android.content.Context; import android.content.Context;
import cc.winboll.studio.libapputils.app.WinBollUtils; import cc.winboll.studio.libapputils.app.WinBollGlobalApplication;
import cc.winboll.studio.libapputils.util.FileUtils; import cc.winboll.studio.libapputils.util.FileUtils;
import dalvik.system.DexFile; import dalvik.system.DexFile;
import java.io.BufferedReader; import java.io.BufferedReader;
@@ -61,7 +61,7 @@ public class LogUtils {
// 初始化函数 // 初始化函数
// //
public static void init(Context context, LOG_LEVEL logLevel) { public static void init(Context context, LOG_LEVEL logLevel) {
if (WinBollUtils.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
// 初始化日志缓存文件路径 // 初始化日志缓存文件路径
_mfLogCacheDir = new File(context.getApplicationContext().getExternalCacheDir(), TAG); _mfLogCacheDir = new File(context.getApplicationContext().getExternalCacheDir(), TAG);
if (!_mfLogCacheDir.exists()) { if (!_mfLogCacheDir.exists()) {

View File

@@ -19,7 +19,7 @@ import android.widget.LinearLayout;
import cc.winboll.studio.libapputils.R; import cc.winboll.studio.libapputils.R;
import cc.winboll.studio.libapputils.app.AppVersionUtils; import cc.winboll.studio.libapputils.app.AppVersionUtils;
import cc.winboll.studio.libapputils.app.WinBollActivityManager; import cc.winboll.studio.libapputils.app.WinBollActivityManager;
import cc.winboll.studio.libapputils.app.WinBollUtils; import cc.winboll.studio.libapputils.app.WinBollGlobalApplication;
import cc.winboll.studio.libapputils.bean.APPInfo; import cc.winboll.studio.libapputils.bean.APPInfo;
import cc.winboll.studio.libapputils.bean.DebugBean; import cc.winboll.studio.libapputils.bean.DebugBean;
import cc.winboll.studio.libapputils.log.LogUtils; import cc.winboll.studio.libapputils.log.LogUtils;
@@ -88,6 +88,8 @@ public class AboutView extends LinearLayout {
appInfo.setAppAPKFolderName(typedArray.getString(R.styleable.AboutView_app_apkfoldername)); appInfo.setAppAPKFolderName(typedArray.getString(R.styleable.AboutView_app_apkfoldername));
appInfo.setAppAPKName(typedArray.getString(R.styleable.AboutView_app_apkname)); appInfo.setAppAPKName(typedArray.getString(R.styleable.AboutView_app_apkname));
appInfo.setAppGitName(typedArray.getString(R.styleable.AboutView_app_gitname)); appInfo.setAppGitName(typedArray.getString(R.styleable.AboutView_app_gitname));
appInfo.setAppGitAPPBranch(typedArray.getString(R.styleable.AboutView_app_gitappbranch));
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));
// 返回一个绑定资源结束的信号给资源 // 返回一个绑定资源结束的信号给资源
@@ -103,7 +105,7 @@ public class AboutView extends LinearLayout {
mszAppDescription = mAPPInfo.getAppDescription(); mszAppDescription = mAPPInfo.getAppDescription();
mnAppIcon = mAPPInfo.getAppIcon(); mnAppIcon = mAPPInfo.getAppIcon();
mszWinBollServerHost = WinBollUtils.isDebug() ? "https://dev.winboll.cc": "https://www.winboll.cc"; mszWinBollServerHost = WinBollGlobalApplication.isDebug() ? "https://dev.winboll.cc": "https://www.winboll.cc";
try { try {
mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName; mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
@@ -112,9 +114,9 @@ public class AboutView extends LinearLayout {
} }
mszCurrentAppPackageName = mszAppAPKName + "_" + mszAppVersionName + ".apk"; mszCurrentAppPackageName = mszAppAPKName + "_" + mszAppVersionName + ".apk";
mszHomePage = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName; mszHomePage = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName;
mszGitea = "https://gitea.winboll.cc/Studio/" + mszAppGitName + ".git"; mszGitea = "https://gitea.winboll.cc/Studio/" + mszAppGitName + "/src/branch/" + mAPPInfo.getAppGitAPPBranch() + "/" + mAPPInfo.getAppGitAPPSubProjectFolder();
if (WinBollUtils.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
LayoutInflater inflater = LayoutInflater.from(mContext); LayoutInflater inflater = LayoutInflater.from(mContext);
View addedView = inflater.inflate(R.layout.view_about_dev, this, false); View addedView = inflater.inflate(R.layout.view_about_dev, this, false);
LinearLayout llMain = addedView.findViewById(R.id.viewaboutdevLinearLayout1); LinearLayout llMain = addedView.findViewById(R.id.viewaboutdevLinearLayout1);
@@ -205,7 +207,7 @@ public class AboutView extends LinearLayout {
// 定义应用调试按钮 // 定义应用调试按钮
// //
Element elementAppMode; Element elementAppMode;
if (WinBollUtils.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll); elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll);
elementAppMode.setOnClickListener(mAppNormalOnClickListener); elementAppMode.setOnClickListener(mAppNormalOnClickListener);
} else { } else {
@@ -271,7 +273,7 @@ public class AboutView extends LinearLayout {
if (intent != null) { if (intent != null) {
intent.setAction(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW); intent.setAction(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
WinBollUtils.setIsDebug(true); WinBollGlobalApplication.setIsDebug(true);
DebugBean.saveBean(context, new DebugBean(true)); DebugBean.saveBean(context, new DebugBean(true));
WinBollActivityManager.getInstance(context).finishAll(); WinBollActivityManager.getInstance(context).finishAll();
@@ -283,7 +285,7 @@ public class AboutView extends LinearLayout {
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName()); Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
if (intent != null) { if (intent != null) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
WinBollUtils.setIsDebug(false); WinBollGlobalApplication.setIsDebug(false);
DebugBean.saveBean(context, new DebugBean(false)); DebugBean.saveBean(context, new DebugBean(false));
WinBollActivityManager.getInstance(context).finishAll(); WinBollActivityManager.getInstance(context).finishAll();
@@ -309,7 +311,7 @@ public class AboutView extends LinearLayout {
String szUrl = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName; String szUrl = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName;
// 构建包含认证信息的请求 // 构建包含认证信息的请求
String credential = ""; String credential = "";
if (WinBollUtils.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
credential = Credentials.basic(metDevUserName.getText().toString(), metDevUserPassword.getText().toString()); credential = Credentials.basic(metDevUserName.getText().toString(), metDevUserPassword.getText().toString());
PrefUtils.saveString(mContext, "metDevUserName", metDevUserName.getText().toString()); PrefUtils.saveString(mContext, "metDevUserName", metDevUserName.getText().toString());
PrefUtils.saveString(mContext, "metDevUserPassword", metDevUserPassword.getText().toString()); PrefUtils.saveString(mContext, "metDevUserPassword", metDevUserPassword.getText().toString());

View File

@@ -5,6 +5,8 @@
<attr name="app_apkfoldername" format="string" /> <attr name="app_apkfoldername" format="string" />
<attr name="app_apkname" format="string" /> <attr name="app_apkname" format="string" />
<attr name="app_gitname" format="string" /> <attr name="app_gitname" format="string" />
<attr name="app_gitappbranch" format="string" />
<attr name="app_gitappsubprojectfolder" format="string" />
<attr name="appdescription" format="string" /> <attr name="appdescription" format="string" />
<attr name="appicon" format="reference" /> <attr name="appicon" format="reference" />
</declare-styleable> </declare-styleable>