Compare commits
17 Commits
mymessagem
...
appbase
| Author | SHA1 | Date | |
|---|---|---|---|
| 69b18343c9 | |||
| e1bd959842 | |||
| bad38e37ae | |||
| 08eb360dbd | |||
| 819018b149 | |||
| 6e6b262e86 | |||
| 9665856b1b | |||
| 052bbce839 | |||
| 90102f4eea | |||
| 759a08cec9 | |||
| 42cc7a2822 | |||
| c9c95d6ab0 | |||
| bc9bd47daa | |||
| 4bec8c3e9e | |||
| e726c9d435 | |||
| 5277913606 | |||
| c1bd31df2f |
@@ -24,13 +24,13 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cc.winboll.studio.appbase"
|
||||
minSdkVersion 21
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "15.15"
|
||||
versionName "15.16"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Apr 28 17:08:30 HKT 2026
|
||||
stageCount=22
|
||||
#Sat May 09 21:14:54 GMT 2026
|
||||
stageCount=0
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.21
|
||||
buildCount=0
|
||||
baseBetaVersion=15.15.22
|
||||
baseVersion=15.16
|
||||
publishVersion=15.16.0
|
||||
buildCount=1
|
||||
baseBetaVersion=15.16.1
|
||||
|
||||
@@ -19,28 +19,16 @@
|
||||
android:launchMode="singleTop"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation">
|
||||
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".MainActivityAlias"
|
||||
android:label="@string/app_name"
|
||||
android:exported="true"
|
||||
android:resizeableActivity="true"
|
||||
android:launchMode="singleTop"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".Main2Activity"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -162,25 +162,7 @@ public class MainActivity extends Activity {
|
||||
startActivity(aboutIntent);
|
||||
}
|
||||
|
||||
public void onSplitScreenMode(View view) {
|
||||
LogUtils.d(TAG, "onSplitScreenMode() 分屏测试按钮已点击");
|
||||
ToastUtils.show("分屏测试:已启动新窗口");
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
||||
android.graphics.Rect bounds = new android.graphics.Rect();
|
||||
getWindow().getDecorView().getDisplay().getRectSize(bounds);
|
||||
int height = bounds.height();
|
||||
int width = bounds.width();
|
||||
bounds.set(0, 0, width, height / 2);
|
||||
LogUtils.d(TAG, "onSplitScreenMode() 分屏窗口范围: " + bounds);
|
||||
android.content.Intent intent = new android.content.Intent(this, MainActivityAlias.class);
|
||||
intent.setFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
LogUtils.d(TAG, "onSplitScreenMode() 准备启动MainActivityAlias");
|
||||
android.app.ActivityOptions options = android.app.ActivityOptions.makeBasic();
|
||||
options.setLaunchBounds(bounds);
|
||||
startActivity(intent, options.toBundle());
|
||||
LogUtils.d(TAG, "onSplitScreenMode() MainActivityAlias已启动");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onMultiInstance(View view) {
|
||||
LogUtils.d(TAG, "onMultiInstance() 多开窗口按钮已点击");
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package cc.winboll.studio.appbase;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toolbar;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
|
||||
public class MainActivityAlias extends MainActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setActionBar(toolbar);
|
||||
}
|
||||
}
|
||||
@@ -83,17 +83,7 @@
|
||||
android:onClick="onToastUtilsTest"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="分屏测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="#81C7F5"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onSplitScreenMode"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -98,7 +98,6 @@ allprojects {
|
||||
options.compilerArgs << "-parameters"
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
// 可选:确保编码一致
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ android {
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 30
|
||||
}
|
||||
buildTypes {
|
||||
@@ -18,6 +18,10 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Apr 28 17:08:04 HKT 2026
|
||||
stageCount=22
|
||||
#Sat May 09 21:14:54 GMT 2026
|
||||
stageCount=0
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.21
|
||||
buildCount=0
|
||||
baseBetaVersion=15.15.22
|
||||
baseVersion=15.16
|
||||
publishVersion=15.16.0
|
||||
buildCount=1
|
||||
baseBetaVersion=15.16.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -62,11 +62,11 @@ public class BackupUtils {
|
||||
|
||||
// 核心修改:入参Map非空且非空集合时,使用入参初始化;否则内部new HashMap()
|
||||
this.mDataDirFileMap = (dataDirFileMap != null && !dataDirFileMap.isEmpty())
|
||||
? new HashMap<>(dataDirFileMap) // 新建Map避免外部篡改内部数据
|
||||
: new HashMap<>();
|
||||
? new HashMap<String, String>(dataDirFileMap)
|
||||
: new HashMap<String, String>();
|
||||
this.mSdcardFileMap = (sdcardFileMap != null && !sdcardFileMap.isEmpty())
|
||||
? new HashMap<>(sdcardFileMap) // 深拷贝,隔离外部引用
|
||||
: new HashMap<>();
|
||||
? new HashMap<String, String>(sdcardFileMap)
|
||||
: new HashMap<String, String>();
|
||||
|
||||
LogUtils.d(TAG, "BackupUtils初始化完成 → SFTP服务器:" + ftpAuthModel.getFtpServer() + ":" + ftpAuthModel.getFtpPort() + " | 上传目录:" + mFtpTargetDir);
|
||||
LogUtils.d(TAG, "SDCard Map基础根目录:" + (mAppExternalFilesDir == null ? "获取失败" : mAppExternalFilesDir.getAbsolutePath()));
|
||||
|
||||
1
libwinboll/.gitignore
vendored
Normal file
1
libwinboll/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
38
libwinboll/build.gradle
Normal file
38
libwinboll/build.gradle
Normal file
@@ -0,0 +1,38 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply from: '../.winboll/winboll_lib_build.gradle'
|
||||
apply from: '../.winboll/winboll_lint_build.gradle'
|
||||
|
||||
android {
|
||||
// 适配MIUI12
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 30
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 网络连接类库
|
||||
api 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
// Gson
|
||||
api 'com.google.code.gson:gson:2.8.9'
|
||||
// Html 解析
|
||||
api 'org.jsoup:jsoup:1.13.1'
|
||||
// 添加JSch依赖(SFTP核心,com.jcraft:jsch:0.1.54)
|
||||
api 'com.jcraft:jsch:0.1.54'
|
||||
|
||||
// WinBoLL库 nexus.winboll.cc 地址
|
||||
api 'cc.winboll.studio:libaes:15.15.2'
|
||||
api 'cc.winboll.studio:libappbase:15.15.11'
|
||||
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
8
libwinboll/build.properties
Normal file
8
libwinboll/build.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sat May 09 19:01:46 GMT 2026
|
||||
stageCount=27
|
||||
libraryProject=libwinboll
|
||||
baseVersion=15.11
|
||||
publishVersion=15.11.26
|
||||
buildCount=29
|
||||
baseBetaVersion=15.11.27
|
||||
17
libwinboll/proguard-rules.pro
vendored
Normal file
17
libwinboll/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in C:/tools/adt-bundle-windows-x86_64-20131030/sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
12
libwinboll/src/main/AndroidManifest.xml
Normal file
12
libwinboll/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.libwinboll" >
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name=".WinBoLLLibraryActivity">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package cc.winboll.studio.libwinboll;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import cc.winboll.studio.libappbase.ToastUtils;
|
||||
|
||||
public class WinBoLLLibraryActivity extends Activity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_winbolllibrary);
|
||||
|
||||
ToastUtils.show("WinBoLLLibraryActivity onCreate");
|
||||
}
|
||||
}
|
||||
BIN
libwinboll/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
BIN
libwinboll/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
libwinboll/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
BIN
libwinboll/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
libwinboll/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
BIN
libwinboll/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
libwinboll/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
BIN
libwinboll/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
11
libwinboll/src/main/res/layout/activity_winbolllibrary.xml
Normal file
11
libwinboll/src/main/res/layout/activity_winbolllibrary.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="cc.winboll.studio.libwinboll.WinBoLLLibraryActivity"/>
|
||||
|
||||
</LinearLayout>
|
||||
5
libwinboll/src/main/res/values-v21/styles.xml
Normal file
5
libwinboll/src/main/res/values-v21/styles.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Material.Light">
|
||||
</style>
|
||||
</resources>
|
||||
7
libwinboll/src/main/res/values/strings.xml
Normal file
7
libwinboll/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="lib_name">libwinboll</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
|
||||
</resources>
|
||||
5
libwinboll/src/main/res/values/styles.xml
Normal file
5
libwinboll/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
|
||||
</style>
|
||||
</resources>
|
||||
@@ -72,6 +72,7 @@
|
||||
|
||||
// WinBoLL 项目编译设置
|
||||
//include ':winboll'
|
||||
//include ':libwinboll'
|
||||
//rootProject.name = "winboll"
|
||||
|
||||
// RegExpUtils 项目编译设置
|
||||
|
||||
@@ -50,6 +50,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':libwinboll')
|
||||
|
||||
api 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Wed May 06 13:39:52 CST 2026
|
||||
#Sat May 09 19:01:46 GMT 2026
|
||||
stageCount=27
|
||||
libraryProject=
|
||||
libraryProject=libwinboll
|
||||
baseVersion=15.11
|
||||
publishVersion=15.11.26
|
||||
buildCount=22
|
||||
buildCount=29
|
||||
baseBetaVersion=15.11.27
|
||||
|
||||
@@ -41,28 +41,29 @@ public class MainActivity extends DrawerFragmentActivity {
|
||||
initMainHandler();
|
||||
|
||||
if (mBrowserFragment == null) {
|
||||
String externalUrl = extractExternalUrl(getIntent());
|
||||
if (externalUrl != null) {
|
||||
mBrowserFragment = BrowserFragment.newInstance(externalUrl);
|
||||
} else {
|
||||
mBrowserFragment = new BrowserFragment();
|
||||
}
|
||||
addFragment(mBrowserFragment);
|
||||
LogUtils.d(TAG, "The code in this line is not fix yet.");
|
||||
// String externalUrl = extractExternalUrl(getIntent());
|
||||
// if (externalUrl != null) {
|
||||
// mBrowserFragment = BrowserFragment.newInstance(externalUrl);
|
||||
// } else {
|
||||
// mBrowserFragment = new BrowserFragment();
|
||||
// }
|
||||
// addFragment(mBrowserFragment);
|
||||
}
|
||||
showFragment(mBrowserFragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
String externalUrl = extractExternalUrl(intent);
|
||||
if (externalUrl != null && mBrowserFragment != null && mBrowserFragment.getBrowserHandler() != null) {
|
||||
Message msg = Message.obtain();
|
||||
msg.what = BrowserFragment.MSG_OPEN_URL;
|
||||
msg.obj = externalUrl;
|
||||
mBrowserFragment.getBrowserHandler().sendMessage(msg);
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// protected void onNewIntent(Intent intent) {
|
||||
// super.onNewIntent(intent);
|
||||
// String externalUrl = extractExternalUrl(intent);
|
||||
// if (externalUrl != null && mBrowserFragment != null && mBrowserFragment.getBrowserHandler() != null) {
|
||||
// Message msg = Message.obtain();
|
||||
// msg.what = BrowserFragment.MSG_OPEN_URL;
|
||||
// msg.obj = externalUrl;
|
||||
// mBrowserFragment.getBrowserHandler().sendMessage(msg);
|
||||
// }
|
||||
// }
|
||||
|
||||
private String extractExternalUrl(Intent intent) {
|
||||
if (intent != null && Intent.ACTION_VIEW.equals(intent.getAction())) {
|
||||
@@ -191,6 +192,10 @@ public class MainActivity extends DrawerFragmentActivity {
|
||||
} else if (nItemId == R.id.item_termux_env_test) {
|
||||
Intent intent = new Intent(getApplicationContext(), TermuxEnvTestActivity.class);
|
||||
|
||||
WinBoLLActivityManager.getInstance().startWinBoLLActivity(getApplicationContext(), intent, AboutActivity.class);
|
||||
} else if (nItemId == R.id.item_library_activity) {
|
||||
Intent intent = new Intent(getApplicationContext(), cc.winboll.studio.libwinboll.WinBoLLLibraryActivity.class);
|
||||
|
||||
WinBoLLActivityManager.getInstance().startWinBoLLActivity(getApplicationContext(), intent, AboutActivity.class);
|
||||
} else {
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<item
|
||||
android:id="@+id/item_termux_env_test"
|
||||
android:title="TermuxEnvTestActivity"/>
|
||||
<item
|
||||
android:id="@+id/item_library_activity"
|
||||
android:title="WinBoLLLibraryActivity"/>
|
||||
</menu>
|
||||
</item>
|
||||
</menu>
|
||||
|
||||
Reference in New Issue
Block a user