diff --git a/.gitmodules b/.gitmodules index 6828285..c97416e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "winboll-x"] - path = winboll-x - url = https://gitea.winboll.cc/Studio/WinBollX.git [submodule "libjc/jcc/libs"] path = libjc/jcc/libs url = https://gitea.winboll.cc/Studio/APP_libjc_jcc_libs.git diff --git a/LICENSE b/LICENSE index 9746919..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,73 +1,201 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. + 1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS -APPENDIX: How to apply the Apache License to your work. + APPENDIX: How to apply the Apache License to your work. -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -Copyright 2024 ZhanGSKen + Copyright [yyyy] [name of copyright owner] -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index b3319e1..67c6f0f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# ☁ ☁ ☁ WinBoLL APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ +# OriginMaster +【OriginMaster】WinBoLL 源生态计划。正如话,我需要一个 Point, 去撬动成个地球。 + +######## +## ☁ ☁ ☁ WinBoLL APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ # ☁ ☁ WinBoLL Studio Android 应用开源项目。☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ # ☁ ☁ ☁ WinBoLL 网站地址 https://www.winboll.cc/ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ diff --git a/aes/build.properties b/aes/build.properties index ec4f107..9a2583a 100644 --- a/aes/build.properties +++ b/aes/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 29 15:14:41 HKT 2025 -stageCount=1 +#Mon May 12 18:10:35 HKT 2025 +stageCount=4 libraryProject=libaes baseVersion=15.6 -publishVersion=15.6.0 +publishVersion=15.6.3 buildCount=0 -baseBetaVersion=15.6.1 +baseBetaVersion=15.6.4 diff --git a/aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java b/aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java index 228cd19..08d3d47 100644 --- a/aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java +++ b/aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.aes; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/24 23:52:29 * @Describe AES应用介绍窗口 */ @@ -10,13 +10,14 @@ import android.content.Context; import android.os.Bundle; import android.view.ViewGroup; import android.widget.LinearLayout; +import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import cc.winboll.studio.libaes.winboll.APPInfo; import cc.winboll.studio.libaes.winboll.AboutView; import cc.winboll.studio.libappbase.GlobalApplication; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -public class AboutActivity extends WinBoLLActivity implements IWinBoLLActivity { +public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity { public static final String TAG = "AboutActivity"; diff --git a/aes/src/main/java/cc/winboll/studio/aes/App.java b/aes/src/main/java/cc/winboll/studio/aes/App.java index b656adb..5c4419e 100644 --- a/aes/src/main/java/cc/winboll/studio/aes/App.java +++ b/aes/src/main/java/cc/winboll/studio/aes/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.aes; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/13 19:03:58 * @Describe AES应用类 */ diff --git a/aes/src/main/java/cc/winboll/studio/aes/MainActivity.java b/aes/src/main/java/cc/winboll/studio/aes/MainActivity.java index 73fcd02..2dac13b 100644 --- a/aes/src/main/java/cc/winboll/studio/aes/MainActivity.java +++ b/aes/src/main/java/cc/winboll/studio/aes/MainActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.aes; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/13 19:05:52 * @Describe 应用主窗口 */ diff --git a/aes/src/main/java/cc/winboll/studio/aes/WinBoLLActivity.java b/aes/src/main/java/cc/winboll/studio/aes/WinBoLLActivity.java deleted file mode 100644 index af25247..0000000 --- a/aes/src/main/java/cc/winboll/studio/aes/WinBoLLActivity.java +++ /dev/null @@ -1,60 +0,0 @@ -package cc.winboll.studio.aes; - -import android.app.Activity; -import android.os.Bundle; -import androidx.appcompat.app.AppCompatActivity; -import cc.winboll.studio.libaes.beans.AESThemeBean; -import cc.winboll.studio.libaes.utils.AESThemeUtil; -import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -import android.view.MenuItem; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/30 00:34:02 - * @Describe WinBoLL 活动窗口通用基类 - */ -public class WinBoLLActivity extends AppCompatActivity implements IWinBoLLActivity { - - public static final String TAG = "WinBoLLActivity"; - - protected volatile AESThemeBean.ThemeType mThemeType; - - @Override - public Activity getActivity() { - return this; - } - - @Override - public String getTag() { - return TAG; - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - mThemeType = getThemeType(); - setThemeStyle(); - super.onCreate(savedInstanceState); - } - - AESThemeBean.ThemeType getThemeType() { - /*SharedPreferences sharedPreferences = getSharedPreferences( - SHAREDPREFERENCES_NAME, MODE_PRIVATE); - return AESThemeBean.ThemeType.values()[((sharedPreferences.getInt(DRAWER_THEME_TYPE, AESThemeBean.ThemeType.DEFAULT.ordinal())))]; - */ - return AESThemeBean.getThemeStyleType(AESThemeUtil.getThemeTypeID(getApplicationContext())); - } - - void setThemeStyle() { - //setTheme(AESThemeBean.getThemeStyle(getThemeType())); - setTheme(AESThemeUtil.getThemeTypeID(getApplicationContext())); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if(item.getItemId() == android.R.id.home) { - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } -} diff --git a/appbase/build.gradle b/appbase/build.gradle index 66b0085..e2b0377 100644 --- a/appbase/build.gradle +++ b/appbase/build.gradle @@ -30,7 +30,7 @@ android { // versionName 更新后需要手动设置 // .winboll/winbollBuildProps.properties 文件的 stageCount=0 // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0" - versionName "15.7" + versionName "15.8" if(true) { versionName = genVersionName("${versionName}") } diff --git a/appbase/build.properties b/appbase/build.properties index 3cb59e8..a25f57f 100644 --- a/appbase/build.properties +++ b/appbase/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 29 14:47:34 HKT 2025 -stageCount=7 +#Tue May 13 11:05:12 HKT 2025 +stageCount=1 libraryProject=libappbase -baseVersion=15.7 -publishVersion=15.7.6 +baseVersion=15.8 +publishVersion=15.8.0 buildCount=0 -baseBetaVersion=15.7.7 +baseBetaVersion=15.8.1 diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/App.java b/appbase/src/main/java/cc/winboll/studio/appbase/App.java index 74f9bbc..4db9ad0 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/App.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/05 09:54:42 * @Describe APPbase 应用类 */ diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/MainActivity.java b/appbase/src/main/java/cc/winboll/studio/appbase/MainActivity.java index 4001ad4..4ed4da2 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/MainActivity.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/MainActivity.java @@ -11,6 +11,7 @@ import android.widget.CheckBox; import android.widget.Toolbar; import cc.winboll.studio.appbase.R; import cc.winboll.studio.appbase.activities.NewActivity; +import cc.winboll.studio.appbase.activities.WinBoLLActivity; import cc.winboll.studio.appbase.services.MainService; import cc.winboll.studio.appbase.services.TestDemoBindService; import cc.winboll.studio.appbase.services.TestDemoService; @@ -18,12 +19,13 @@ import cc.winboll.studio.libappbase.CrashHandler; import cc.winboll.studio.libappbase.GlobalApplication; import cc.winboll.studio.libappbase.GlobalCrashActivity; import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.LogView; import cc.winboll.studio.libappbase.sos.SOS; import cc.winboll.studio.libappbase.utils.ToastUtils; import cc.winboll.studio.libappbase.widgets.StatusWidget; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivity { +public class MainActivity extends WinBoLLActivity implements IWinBoLLActivity { public static final String TAG = "MainActivity"; @@ -38,7 +40,7 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit } Toolbar mToolbar; - //LogView mLogView; + LogView mLogView; @Override protected void onCreate(Bundle savedInstanceState) { @@ -51,12 +53,8 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1); cbIsDebugMode.setChecked(GlobalApplication.isDebuging()); - //mLogView = findViewById(R.id.activitymainLogView1); - -// if (GlobalApplication.isDebuging()) { -// mLogView.start(); -// ToastUtils.show("LogView start."); -// } + mLogView = findViewById(R.id.logview); + mLogView.start(); } @Override @@ -72,8 +70,6 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit return super.onOptionsItemSelected(item); } - - @Override protected void onDestroy() { super.onDestroy(); @@ -87,7 +83,7 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit GlobalApplication.setIsDebuging(isDebuging); GlobalApplication.saveDebugStatus(); } - + public void onPreviewGlobalCrashActivity(View view) { Intent intent = new Intent(this, GlobalCrashActivity.class); intent.putExtra(CrashHandler.EXTRA_CRASH_INFO, "Demo log..."); @@ -137,8 +133,6 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit startService(intent); } - - public void onStopTestDemoService(View view) { Intent intent = new Intent(this, TestDemoService.class); @@ -179,5 +173,11 @@ public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivit GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(this, NewActivity.class); } + @Override + protected void onResume() { + super.onResume(); + mLogView.start(); + } + } diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/MyTileService.java b/appbase/src/main/java/cc/winboll/studio/appbase/MyTileService.java index 3f3fcca..457d8e7 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/MyTileService.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/MyTileService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 19:30:10 */ import android.content.Context; diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/WinBoLLActivityBase.java b/appbase/src/main/java/cc/winboll/studio/appbase/WinBoLLActivityBase.java deleted file mode 100644 index 71b4e40..0000000 --- a/appbase/src/main/java/cc/winboll/studio/appbase/WinBoLLActivityBase.java +++ /dev/null @@ -1,81 +0,0 @@ -package cc.winboll.studio.appbase; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 15:34:16 - * @Describe 应用活动窗口基类 - */ -import android.app.Activity; -import android.os.Bundle; -import android.os.PersistableBundle; -import android.view.MenuItem; -import cc.winboll.studio.appbase.App; -import cc.winboll.studio.appbase.R; -import cc.winboll.studio.libappbase.GlobalApplication; -import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog; -import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager; - -public class WinBoLLActivityBase extends Activity implements IWinBoLLActivity { - - public static final String TAG = "WinBoLLActivityBase"; - - @Override - public Activity getActivity() { - return this; - } - - @Override - public String getTag() { - return TAG; - } - - WinBoLLActivityManager getWinBoLLActivityManager() { - return WinBoLLActivityManager.getInstance(GlobalApplication.getInstance()); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWinBoLLActivityManager().add(this); - } - - @Override - public void onPostCreate(Bundle savedInstanceState, PersistableBundle persistentState) { - super.onPostCreate(savedInstanceState, persistentState); - } - - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) { - GlobalApplication.getWinBoLLActivityManager().startLogActivity(this); - return true; - } else if(item.getItemId() == cc.winboll.studio.appbase.R.id.item_minimal) { - //moveTaskToBack(true); - exit(); - } - // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。 - return super.onOptionsItemSelected(item); - } - - void exit() { - YesNoAlertDialog.show(this, "Exit " + getString(R.string.app_name), "Close all activity and exit?", new YesNoAlertDialog.OnDialogResultListener(){ - - @Override - public void onYes() { - App.getWinBoLLActivityManager().finishAll(); - } - - @Override - public void onNo() { - } - }); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - getWinBoLLActivityManager().registeRemove(this); - } -} diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java b/appbase/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java index b722a1d..b1872e8 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 11:46:40 * @Describe 测试窗口2 */ @@ -12,11 +12,10 @@ import android.view.MenuItem; import android.view.View; import android.widget.Toolbar; import cc.winboll.studio.appbase.R; -import cc.winboll.studio.appbase.WinBoLLActivityBase; import cc.winboll.studio.libappbase.GlobalApplication; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -public class New2Activity extends WinBoLLActivityBase implements IWinBoLLActivity { +public class New2Activity extends WinBoLLActivity implements IWinBoLLActivity { public static final String TAG = "New2Activity"; @@ -74,7 +73,7 @@ public class New2Activity extends WinBoLLActivityBase implements IWinBoLLActivit @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) { - GlobalApplication.getWinBoLLActivityManager().startLogActivity(this); + //GlobalApplication.getWinBoLLActivityManager().startLogActivity(this); return true; } // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。 diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java b/appbase/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java index d55ff1d..7cedbe6 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 05:04:22 */ import android.app.Activity; @@ -11,11 +11,10 @@ import android.view.MenuItem; import android.view.View; import android.widget.Toolbar; import cc.winboll.studio.appbase.R; -import cc.winboll.studio.appbase.WinBoLLActivityBase; import cc.winboll.studio.libappbase.GlobalApplication; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -public class NewActivity extends WinBoLLActivityBase implements IWinBoLLActivity { +public class NewActivity extends WinBoLLActivity implements IWinBoLLActivity { public static final String TAG = "NewActivity"; @@ -72,7 +71,7 @@ public class NewActivity extends WinBoLLActivityBase implements IWinBoLLActivity @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) { - GlobalApplication.getWinBoLLActivityManager().startLogActivity(this); + //GlobalApplication.getWinBoLLActivityManager().startLogActivity(this); return true; } // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。 diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/activities/WinBoLLActivity.java b/appbase/src/main/java/cc/winboll/studio/appbase/activities/WinBoLLActivity.java new file mode 100644 index 0000000..3071f98 --- /dev/null +++ b/appbase/src/main/java/cc/winboll/studio/appbase/activities/WinBoLLActivity.java @@ -0,0 +1,24 @@ +package cc.winboll.studio.appbase.activities; + +/** + * @Author ZhanGSKen + * @Date 2025/05/10 09:48 + * @Describe WinBoLL 窗口基础类 + */ +import android.app.Activity; +import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; + +public class WinBoLLActivity extends Activity implements IWinBoLLActivity { + + public static final String TAG = "WinBoLLActivity"; + + @Override + public Activity getActivity() { + return this; + } + + @Override + public String getTag() { + return TAG; + } +} diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java b/appbase/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java index 9bda14b..db180e9 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.handlers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:51:40 */ import android.os.Handler; diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java b/appbase/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java index 5df134e..0e125ea 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 07:06:13 */ import android.util.JsonReader; diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java b/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java index f702494..fccca87 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:47:22 * @Describe TestServiceBean */ diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java b/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java index 90f7518..c1398e3 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:49:21 * @Describe TestDemoServiceBean */ diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java b/appbase/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java index 70561c9..0943119 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.receivers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/24 07:11:44 */ import android.content.BroadcastReceiver; diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java b/appbase/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java index a502f10..ef02d5f 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.receivers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:58:04 * @Describe 主要广播接收器 */ @@ -10,16 +10,18 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import cc.winboll.studio.appbase.models.WinBoLLNewsBean; import cc.winboll.studio.appbase.services.MainService; import cc.winboll.studio.appbase.widgets.APPNewsWidget; import cc.winboll.studio.libappbase.AppUtils; import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libappbase.sos.APPModel; +import cc.winboll.studio.libappbase.models.APPModel; +import cc.winboll.studio.libappbase.models.WinBoLLModel; +import cc.winboll.studio.libappbase.models.WinBoLLNewsBean; import cc.winboll.studio.libappbase.sos.SOS; import cc.winboll.studio.libappbase.sos.SOSObject; -import cc.winboll.studio.libappbase.sos.WinBoLL; import cc.winboll.studio.libappbase.utils.ToastUtils; +import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; +import cc.winboll.studio.libappbase.winboll.WinBoLL; import java.io.IOException; import java.lang.ref.WeakReference; import java.text.SimpleDateFormat; @@ -42,21 +44,21 @@ public class MainReceiver extends BroadcastReceiver { String szAction = intent.getAction(); if (szAction.equals(ACTION_BOOT_COMPLETED)) { ToastUtils.show("ACTION_BOOT_COMPLETED"); - } else if (szAction.equals(WinBoLL.ACTION_BIND)) { + } else if (szAction.equals(IWinBoLLActivity.ACTION_BIND)) { LogUtils.d(TAG, "ACTION_BIND"); LogUtils.d(TAG, String.format("context.getPackageName() %s", context.getPackageName())); LogUtils.d(TAG, String.format("intent.getAction() %s", intent.getAction())); - String szAPPModel = intent.getStringExtra(WinBoLL.EXTRA_APPMODEL); - LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel)); - if (szAPPModel != null && !szAPPModel.equals("")) { + String szWinBoLLModel = intent.getStringExtra(WinBoLL.EXTRA_WINBOLLMODEL); + LogUtils.d(TAG, String.format("szAPPModel %s", szWinBoLLModel)); + if (szWinBoLLModel != null && !szWinBoLLModel.equals("")) { try { - APPModel bean = APPModel.parseStringToBean(szAPPModel, APPModel.class); + WinBoLLModel bean = WinBoLLModel.parseStringToBean(szWinBoLLModel, WinBoLLModel.class); if (bean != null) { String szAppPackageName = bean.getAppPackageName(); LogUtils.d(TAG, String.format("szAppPackageName %s", szAppPackageName)); String szAppMainServiveName = bean.getAppMainServiveName(); LogUtils.d(TAG, String.format("szAppMainServiveName %s", szAppMainServiveName)); - mwrService.get().bindAPPModelConnection(bean); + mwrService.get().bindWinBoLLModelConnection(bean); } } catch (IOException e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java b/appbase/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java index 8db3f50..e5436c6 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:38:31 * @Describe 守护进程服务 */ diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/services/MainService.java b/appbase/src/main/java/cc/winboll/studio/appbase/services/MainService.java index fdbbd62..b3dd1d4 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/services/MainService.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/services/MainService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:56:41 * @Describe 拨号主服务 * 参考: @@ -18,15 +18,16 @@ import android.content.ServiceConnection; import android.os.Binder; import android.os.IBinder; import cc.winboll.studio.appbase.MyTileService; -import cc.winboll.studio.appbase.models.MainServiceBean; import cc.winboll.studio.appbase.handlers.MainServiceHandler; +import cc.winboll.studio.appbase.models.MainServiceBean; import cc.winboll.studio.appbase.receivers.MainReceiver; import cc.winboll.studio.appbase.services.AssistantService; import cc.winboll.studio.appbase.threads.MainServiceThread; import cc.winboll.studio.appbase.widgets.APPNewsWidget; import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.models.APPModel; +import cc.winboll.studio.libappbase.models.WinBoLLModel; import java.util.ArrayList; -import cc.winboll.studio.libappbase.sos.APPModel; public class MainService extends Service { @@ -182,7 +183,7 @@ public class MainService extends Service { } } - public void bindAPPModelConnection(APPModel bean) { + public void bindWinBoLLModelConnection(WinBoLLModel bean) { LogUtils.d(TAG, "bindAPPModelConnection(...)"); // 清理旧的绑定链接 for (int i = mAPPModelConnectionList.size() - 1; i > -1; i--) { @@ -203,7 +204,7 @@ public class MainService extends Service { Intent intentWidget = new Intent(this, APPNewsWidget.class); intentWidget.setAction(APPNewsWidget.ACTION_WAKEUP_SERVICE); - APPModel appSOSBean = new APPModel(bean.getAppPackageName(), bean.getAppMainServiveName()); + WinBoLLModel appSOSBean = new WinBoLLModel(bean.getAppPackageName(), bean.getAppMainServiveName()); intentWidget.putExtra("APPSOSBean", appSOSBean.toString()); sendBroadcast(intentWidget); } @@ -212,7 +213,7 @@ public class MainService extends Service { ComponentName mComponentName; - boolean isBindToAPP(APPModel bean) { + boolean isBindToAPP(WinBoLLModel bean) { return mComponentName != null && mComponentName.getClassName().equals(bean.getAppMainServiveName()) && mComponentName.getPackageName().equals(bean.getAppPackageName()); diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java b/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java index 043a256..1359e5e 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:45:49 * @Describe 启动时申请绑定到APPBase主服务的服务示例 */ @@ -10,11 +10,12 @@ import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.IBinder; -import cc.winboll.studio.appbase.models.TestDemoBindServiceBean; -import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libappbase.sos.WinBoLL; import cc.winboll.studio.appbase.App; +import cc.winboll.studio.appbase.models.TestDemoBindServiceBean; +import cc.winboll.studio.appbase.services.TestDemoBindService; +import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.libappbase.sos.SOS; +import cc.winboll.studio.libappbase.winboll.WinBoLL; public class TestDemoBindService extends Service { diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java b/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java index 4991b86..4902f5f 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:39:24 * @Describe 普通服务示例 */ @@ -12,7 +12,6 @@ import android.os.Binder; import android.os.IBinder; import cc.winboll.studio.appbase.models.TestDemoServiceBean; import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libappbase.sos.WinBoLL; public class TestDemoService extends Service { diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java b/appbase/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java index 25d7231..917e7f2 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.threads; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:46:44 */ import android.content.Context; diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java b/appbase/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java index 0c7c7e5..56822c7 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java +++ b/appbase/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java @@ -1,6 +1,6 @@ package cc.winboll.studio.appbase.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/15 14:41:25 * @Describe TimeWidget */ @@ -12,16 +12,17 @@ import android.content.Context; import android.content.Intent; import android.widget.RemoteViews; import cc.winboll.studio.appbase.R; -import cc.winboll.studio.appbase.models.WinBoLLNewsBean; import cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener; import cc.winboll.studio.libappbase.AppUtils; import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libappbase.sos.APPModel; -import cc.winboll.studio.libappbase.sos.WinBoLL; +import cc.winboll.studio.libappbase.models.APPModel; +import cc.winboll.studio.libappbase.models.WinBoLLNewsBean; +import cc.winboll.studio.libappbase.winboll.WinBoLL; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import cc.winboll.studio.libappbase.models.WinBoLLModel; public class APPNewsWidget extends AppWidgetProvider { @@ -57,11 +58,11 @@ public class APPNewsWidget extends AppWidgetProvider { } }else if (intent.getAction().equals(ACTION_WAKEUP_SERVICE)) { LogUtils.d(TAG, "ACTION_WAKEUP_SERVICE"); - String szAPPModel = intent.getStringExtra(WinBoLL.EXTRA_APPMODEL); - LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel)); - if (szAPPModel != null && !szAPPModel.equals("")) { + String szWinBoLLModel = intent.getStringExtra(WinBoLL.EXTRA_WINBOLLMODEL); + LogUtils.d(TAG, String.format("szWinBoLLModel %s", szWinBoLLModel)); + if (szWinBoLLModel != null && !szWinBoLLModel.equals("")) { try { - APPModel bean = APPModel.parseStringToBean(szAPPModel, APPModel.class); + WinBoLLModel bean = WinBoLLModel.parseStringToBean(szWinBoLLModel, WinBoLLModel.class); if (bean != null) { String szAppPackageName = bean.getAppPackageName(); LogUtils.d(TAG, String.format("szAppPackageName %s", szAppPackageName)); diff --git a/appbase/src/main/res/layout/activity_main.xml b/appbase/src/main/res/layout/activity_main.xml index a0e011f..61a1475 100644 --- a/appbase/src/main/res/layout/activity_main.xml +++ b/appbase/src/main/res/layout/activity_main.xml @@ -212,5 +212,10 @@ + + diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/App.java b/apputils/src/main/java/cc/winboll/studio/apputils/App.java index 4c81010..a96c41d 100644 --- a/apputils/src/main/java/cc/winboll/studio/apputils/App.java +++ b/apputils/src/main/java/cc/winboll/studio/apputils/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.apputils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 15:10:51 * @Describe 全局应用类 */ diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/AssetsHtmlActivity.java b/apputils/src/main/java/cc/winboll/studio/apputils/AssetsHtmlActivity.java index b504503..63c0745 100644 --- a/apputils/src/main/java/cc/winboll/studio/apputils/AssetsHtmlActivity.java +++ b/apputils/src/main/java/cc/winboll/studio/apputils/AssetsHtmlActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.apputils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/03 11:02:49 * @Describe 一个可以浏览随 APP 附带的 Html 文档的窗口 */ diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/QRCodeDecodeActivity.java b/apputils/src/main/java/cc/winboll/studio/apputils/QRCodeDecodeActivity.java index cd74712..5cf01a7 100644 --- a/apputils/src/main/java/cc/winboll/studio/apputils/QRCodeDecodeActivity.java +++ b/apputils/src/main/java/cc/winboll/studio/apputils/QRCodeDecodeActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.apputils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/18 10:32:21 * @Describe 二维码扫码解码窗口 */ diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/TestBBMorseCodeActivity.java b/apputils/src/main/java/cc/winboll/studio/apputils/TestBBMorseCodeActivity.java index 1781971..4789183 100644 --- a/apputils/src/main/java/cc/winboll/studio/apputils/TestBBMorseCodeActivity.java +++ b/apputils/src/main/java/cc/winboll/studio/apputils/TestBBMorseCodeActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.apputils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/23 16:14:45 */ import android.app.Activity; diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/TestStringToQRCodeViewActivity.java b/apputils/src/main/java/cc/winboll/studio/apputils/TestStringToQRCodeViewActivity.java deleted file mode 100644 index a77addd..0000000 --- a/apputils/src/main/java/cc/winboll/studio/apputils/TestStringToQRCodeViewActivity.java +++ /dev/null @@ -1,36 +0,0 @@ -package cc.winboll.studio.apputils; - -/** - * @Author ZhanGSKen@QQ.COM - * @Date 2025/01/17 19:50:46 - */ -import android.app.Activity; -import android.os.Bundle; -import android.widget.Toolbar; -import cc.winboll.studio.apputils.R; -import cc.winboll.studio.libapputils.views.StringToQrCodeView; - -public class TestStringToQRCodeViewActivity extends Activity { - - public static final String TAG = "TestStringToQrCodeViewActivity"; - - StringToQrCodeView mStringToQrCodeView; -// -// @Override -// public Activity getActivity() { -// return this; -// } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_teststringtoqrcodeview); - - // 初始化工具栏 - Toolbar mToolbar = findViewById(R.id.toolbar); - mToolbar.setSubtitle(TAG); - setActionBar(mToolbar); - - mStringToQrCodeView = findViewById(R.id.activityteststringtoqrcodeviewStringToQrCodeView1); - } -} diff --git a/apputils/src/main/java/cc/winboll/studio/apputils/WinBoLLActivityBase.java b/apputils/src/main/java/cc/winboll/studio/apputils/WinBoLLActivityBase.java deleted file mode 100644 index 91c285e..0000000 --- a/apputils/src/main/java/cc/winboll/studio/apputils/WinBoLLActivityBase.java +++ /dev/null @@ -1,51 +0,0 @@ -package cc.winboll.studio.apputils; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 17:11:37 - * @Describe 应用活动窗口基类 - */ -import android.app.Activity; -import android.os.Bundle; -import android.os.PersistableBundle; -import cc.winboll.studio.libappbase.GlobalApplication; -import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; -import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager; - -public class WinBoLLActivityBase extends Activity implements IWinBoLLActivity { - - public static final String TAG = "WinBoLLActivityBase"; - - @Override - public Activity getActivity() { - return this; - } - - @Override - public String getTag() { - return TAG; - } - - WinBoLLActivityManager getWinBoLLActivityManager() { - return WinBoLLActivityManager.getInstance(GlobalApplication.getInstance()); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWinBoLLActivityManager().add(this); - } - - @Override - public void onPostCreate(Bundle savedInstanceState, PersistableBundle persistentState) { - super.onPostCreate(savedInstanceState, persistentState); - } - - - - @Override - protected void onDestroy() { - super.onDestroy(); - getWinBoLLActivityManager().registeRemove(this); - } -} diff --git a/autoinstaller/build.gradle b/autoinstaller/build.gradle index ba56e67..d91dba5 100644 --- a/autoinstaller/build.gradle +++ b/autoinstaller/build.gradle @@ -19,7 +19,7 @@ def genVersionName(def versionName){ android { compileSdkVersion 32 - buildToolsVersion "33.0.3" + buildToolsVersion "32.0.0" defaultConfig { applicationId "cc.winboll.studio.autoinstaller" @@ -29,7 +29,7 @@ android { // versionName 更新后需要手动设置 // .winboll/winbollBuildProps.properties 文件的 stageCount=0 // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0" - versionName "5.0" + versionName "15.2" if(true) { versionName = genVersionName("${versionName}") } @@ -41,30 +41,33 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } } dependencies { - api 'cc.winboll.studio:winboll-shared:1.1.0' - api 'io.github.medyo:android-about-page:2.0.0' - api 'com.github.getActivity:ToastUtils:10.5' - api 'com.jcraft:jsch:0.1.55' - api 'org.jsoup:jsoup:1.13.1' - api 'com.squareup.okhttp3:okhttp:4.4.1' - - api 'androidx.appcompat:appcompat:1.0.0' - api 'androidx.fragment:fragment:1.0.0' - api 'com.google.android.material:material:1.0.0' - - api 'androidx.vectordrawable:vectordrawable-animated:1.0.0' - api 'androidx.lifecycle:lifecycle-livedata:1.0.0' - - //api 'cc.winboll.studio:libaes:6.3.2' - //api 'cc.winboll.studio:libapputils:8.3.8' - api fileTree(dir: 'libs', include: ['*.jar']) + api 'cc.winboll.studio:libaes:15.6.0' + api 'cc.winboll.studio:libapputils:15.3.4' + api 'cc.winboll.studio:libappbase:15.7.6' + + // SSH + api 'com.jcraft:jsch:0.1.55' + // Html 解析 + api 'org.jsoup:jsoup:1.13.1' + // 二维码类库 + api 'com.google.zxing:core:3.4.1' + api 'com.journeyapps:zxing-android-embedded:3.6.0' + // 应用介绍页类库 + api 'io.github.medyo:android-about-page:2.0.0' + // 吐司类库 + api 'com.github.getActivity:ToastUtils:10.5' + // 网络连接类库 + api 'com.squareup.okhttp3:okhttp:4.4.1' + // AndroidX 类库 + api 'androidx.appcompat:appcompat:1.1.0' + api 'com.google.android.material:material:1.4.0' + //api 'androidx.viewpager:viewpager:1.0.0' + //api 'androidx.vectordrawable:vectordrawable:1.1.0' + //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' + //api 'androidx.fragment:fragment:1.1.0' + } diff --git a/autoinstaller/build.properties b/autoinstaller/build.properties index 1db8525..d987d28 100644 --- a/autoinstaller/build.properties +++ b/autoinstaller/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Thu Jan 02 02:39:56 HKT 2025 -stageCount=4 +#Sun May 04 05:32:00 GMT 2025 +stageCount=1 libraryProject= -baseVersion=5.0 -publishVersion=5.0.3 -buildCount=0 -baseBetaVersion=5.0.4 +baseVersion=15.2 +publishVersion=15.2.0 +buildCount=74 +baseBetaVersion=15.2.1 diff --git a/autoinstaller/src/main/AndroidManifest.xml b/autoinstaller/src/main/AndroidManifest.xml index 0da8a10..c496adb 100644 --- a/autoinstaller/src/main/AndroidManifest.xml +++ b/autoinstaller/src/main/AndroidManifest.xml @@ -23,6 +23,8 @@ + + + android:theme="@style/MyAppTheme"> + + + + + + + + + + * @Date 2024/04/28 02:39:58 * @Describe 全局应用类 */ import android.view.Gravity; +import cc.winboll.studio.libappbase.GlobalApplication; import com.hjq.toast.ToastUtils; -import cc.winboll.studio.shared.app.WinBollApplication; +import com.hjq.toast.style.WhiteToastStyle; -public class App extends WinBollApplication { +public class App extends GlobalApplication { public static final String TAG = "App"; @Override public void onCreate() { super.onCreate(); - setIsDebug(BuildConfig.DEBUG); + // 初始化 Toast 框架 ToastUtils.init(this); // 设置 Toast 布局样式 - ToastUtils.setView(R.layout.toast_custom_view); - //ToastUtils.setStyle(new WhiteToastStyle()); + //ToastUtils.setView(R.layout.view_toast); + ToastUtils.setStyle(new WhiteToastStyle()); ToastUtils.setGravity(Gravity.BOTTOM, 0, 200); } } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/AppBaseTileService.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/AppBaseTileService.java new file mode 100644 index 0000000..ec9a7c8 --- /dev/null +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/AppBaseTileService.java @@ -0,0 +1,12 @@ +package cc.winboll.studio.autoinstaller; + +/** + * @Author ZhanGSKen + * @Date 2025/04/15 09:24:46 + * @Describe 磁贴工具服务类 + */ +import android.service.quicksettings.Tile; +import android.service.quicksettings.TileService; +import cc.winboll.studio.autoinstaller.models.AppConfigs; + + diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/FileListener.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/FileListener.java index 3bbf54e..157c8b4 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/FileListener.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/FileListener.java @@ -1,7 +1,7 @@ package cc.winboll.studio.autoinstaller; import android.os.FileObserver; -import cc.winboll.studio.shared.log.LogUtils; +import cc.winboll.studio.libappbase.LogUtils; public class FileListener extends FileObserver { public final static String TAG = "FileListener"; diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/MainActivity.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/MainActivity.java index 6ef2406..ce0c0f4 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/MainActivity.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/MainActivity.java @@ -6,21 +6,24 @@ import android.graphics.Color; import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.os.Handler; +import android.os.Message; import android.view.View; import android.widget.EditText; import android.widget.RadioButton; import android.widget.SimpleAdapter; import android.widget.Switch; import android.widget.TextClock; -import android.widget.Toast; import androidx.core.content.FileProvider; -import cc.winboll.studio.shared.log.LogUtils; -import cc.winboll.studio.shared.log.LogView; import cc.winboll.studio.autoinstaller.MainActivity; -import cc.winboll.studio.autoinstaller.beans.AppConfigs; +import cc.winboll.studio.autoinstaller.models.APKModel; +import cc.winboll.studio.autoinstaller.models.AppConfigs; import cc.winboll.studio.autoinstaller.services.MainService; import cc.winboll.studio.autoinstaller.utils.NotificationUtil; +import cc.winboll.studio.autoinstaller.utils.PackageUtil; import cc.winboll.studio.autoinstaller.views.ListViewForScrollView; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.LogView; import com.hjq.toast.ToastUtils; import java.io.File; import java.util.ArrayList; @@ -30,8 +33,13 @@ import java.util.Map; public class MainActivity extends Activity { public static final String TAG = "MainActivity"; + public static final int MSG_UPDATE_STATUS = 0; + private static final int INSTALL_PERMISSION_CODE = 1; + static MainActivity _MainActivity; + + ArrayList _APKModelList = new ArrayList(); LogView mLogView; TextClock mTextClock; EditText mEditText; @@ -60,9 +68,11 @@ public class MainActivity extends Activity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + _MainActivity = this; initView(); - if (getIntent().getAction().equals(ACTION_NEW_INSTALLTASK)) { + String action = getIntent().getAction(); + if ((action != null) && action.equals(ACTION_NEW_INSTALLTASK)) { mszInstalledPackageName = getIntent().getStringExtra(EXTRA_INSTALLED_PACKAGENAME); mszInstalledAPKFilePath = getIntent().getStringExtra(EXTRA_INSTALLED_APKFILEPATH); installAPK(); @@ -76,11 +86,7 @@ public class MainActivity extends Activity { mLogView = findViewById(R.id.logview); mLogView.start(); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(this); - if (appConfigs == null) { - appConfigs = new AppConfigs(); - AppConfigs.saveAppConfigs(this, appConfigs); - } + AppConfigs appConfigs = AppConfigs.getInstance(this).loadAppConfigs(this); if (appConfigs.getSetupMode() == AppConfigs.SetupMode.WATCHOUTPUTINSTALLER) { ((RadioButton)findViewById(R.id.activitymainRadioButton1)).setChecked(true); @@ -131,23 +137,44 @@ public class MainActivity extends Activity { } + String getLastApkPackageName() { + APKModel.loadBeanList(this, _APKModelList, APKModel.class); + if (_APKModelList.size() > 0) { + return _APKModelList.get(_APKModelList.size() - 1).getApkPackageName(); + } + return ""; + } + public void onOpenAPP(View view) { - if (mszInstalledPackageName.trim().equals("")) { + String szInstalledPackageName = getLastApkPackageName(); + LogUtils.d(TAG, "szInstalledPackageName : " + szInstalledPackageName); + if (szInstalledPackageName.trim().equals("")) { ToastUtils.show("Installed APP package name is null."); return; } - Intent intent = getPackageManager().getLaunchIntentForPackage(mszInstalledPackageName); - if (intent != null) { - startActivity(intent); - } else { - // 若没能获取到启动意图,可进行相应提示等操作,比如跳转到应用商店让用户下载该应用(示例) - Intent marketIntent = new Intent(Intent.ACTION_VIEW); - marketIntent.setData(Uri.parse("market://details?id=" + mszInstalledPackageName)); - startActivity(marketIntent); - } + PackageUtil.openAPP(this, szInstalledPackageName); } +// public void onOpenAPP(View view) { +// String szInstalledPackageName = getLastApkPackageName(); +// if (szInstalledPackageName.trim().equals("")) { +// ToastUtils.show("Installed APP package name is null."); +// return; +// } +// +// Intent intent = getPackageManager().getLaunchIntentForPackage(mszInstalledPackageName); +// if (intent != null) { +// //ToastUtils.show("startActivity"); +// startActivity(intent); +// } else { +// // 若没能获取到启动意图,可进行相应提示等操作,比如跳转到应用商店让用户下载该应用(示例) +// Intent marketIntent = new Intent(Intent.ACTION_VIEW); +// marketIntent.setData(Uri.parse("market://details?id=" + mszInstalledPackageName)); +// startActivity(marketIntent); +// } +// } + public void onInstallAPK(View view) { installAPK(); } @@ -185,17 +212,22 @@ public class MainActivity extends Activity { } public void onLockPath(View view) { - AppConfigs appConfigs = AppConfigs.loadAppConfigs(this); - Switch sw = (Switch)view; - if (sw.isChecked()) { + setMainServiceStatus(sw.isChecked()); + } + + public void setMainServiceStatus(boolean isEnable) { + AppConfigs appConfigs = AppConfigs.getInstance(this).loadAppConfigs(this); + + Switch sw = (Switch)findViewById(R.id.activitymainSwitch1); + if (isEnable) { String szFilePath = mEditText.getText().toString(); // 设置空路径时退出 // if (szFilePath.trim().equals("")) { sw.setChecked(false); - Toast.makeText(getApplication(), "监控路径为空。", Toast.LENGTH_SHORT).show(); + ToastUtils.show("监控路径为空。"); return; } @@ -236,7 +268,7 @@ public class MainActivity extends Activity { stopWatchingFile(); } - AppConfigs.saveAppConfigs(this, appConfigs); + AppConfigs.getInstance(this).saveAppConfigs(this, appConfigs); } void stopWatchingFile() { @@ -251,8 +283,6 @@ public class MainActivity extends Activity { Intent intentService = new Intent(MainActivity.this, MainService.class); //intentService.putExtra(MainService.EXTRA_APKFILEPATH, szAPKFilePath); startService(intentService); - - } /* @@ -298,7 +328,7 @@ public class MainActivity extends Activity { }*/ public void onChangeSetupMode(View view) { - AppConfigs appConfigs = AppConfigs.loadAppConfigs(this); + AppConfigs appConfigs = AppConfigs.getInstance(this).loadAppConfigs(this); if (view.getId() == R.id.activitymainRadioButton1) { appConfigs.setSetupMode(AppConfigs.SetupMode.WATCHOUTPUTINSTALLER); @@ -307,6 +337,42 @@ public class MainActivity extends Activity { appConfigs.setSetupMode(AppConfigs.SetupMode.NEWAPKINFONEWAPKINFO); ((RadioButton)findViewById(R.id.activitymainRadioButton1)).setChecked(false); } - AppConfigs.saveAppConfigs(this, appConfigs); + AppConfigs.getInstance(this).saveAppConfigs(this, appConfigs); + } + + // 定义Handler + static Handler _Handler = new Handler() { + @Override + public void handleMessage(Message msg) { + super.handleMessage(msg); + if (msg.what == MSG_UPDATE_STATUS) { + if (_MainActivity != null) { + boolean isEnableMainService = (boolean)msg.obj; + // 处理消息,这里更新 MainService 的状态 + _MainActivity.setMainServiceStatus(isEnableMainService); + } + } + } + }; + + static void updateMainServiceStatus(boolean isEnable) { + if (_Handler != null) { + Message msg = new Message(); + msg.obj = isEnable; + msg.what = MSG_UPDATE_STATUS; + _Handler.sendMessage(msg); + } + } + + public static void stopMainService() { + if (_MainActivity != null && _Handler != null) { + updateMainServiceStatus(false); + } + } + + public static void startMainService() { + if (_MainActivity != null && _Handler != null) { + updateMainServiceStatus(true); + } } } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/APKModel.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/APKModel.java new file mode 100644 index 0000000..b202be7 --- /dev/null +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/APKModel.java @@ -0,0 +1,75 @@ +package cc.winboll.studio.autoinstaller.models; + +/** + * @Author ZhanGSKen + * @Date 2025/04/02 20:50:29 + * @Describe 监控的 APK 安装文件对应的应用信息数据模型 + */ +import android.util.JsonReader; +import android.util.JsonWriter; +import cc.winboll.studio.libappbase.BaseBean; +import java.io.IOException; + +public class APKModel extends BaseBean { + + public static final String TAG = "APPModel"; + + // 每次更新的 APK 文件对应的应用包名称 + String apkPackageName; + + public APKModel() { + this.apkPackageName = ""; + } + + public APKModel(String apkPackageName) { + this.apkPackageName = apkPackageName; + } + + public void setApkPackageName(String apkPackageName) { + this.apkPackageName = apkPackageName; + } + + public String getApkPackageName() { + return apkPackageName; + } + + + + @Override + public String getName() { + return APKModel.class.getName(); + } + + @Override + public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException { + super.writeThisToJsonWriter(jsonWriter); + jsonWriter.name("appPackageName").value(getApkPackageName()); + + } + + @Override + public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException { + if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else { + if (name.equals("appPackageName")) { + setApkPackageName(jsonReader.nextString()); + } else { + return false; + } + } + return true; + } + + @Override + public BaseBean readBeanFromJsonReader(JsonReader jsonReader) throws IOException { + jsonReader.beginObject(); + while (jsonReader.hasNext()) { + String name = jsonReader.nextName(); + if (!initObjectsFromJsonReader(jsonReader, name)) { + jsonReader.skipValue(); + } + } + // 结束 JSON 对象 + jsonReader.endObject(); + return this; + } +} diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/beans/AppConfigs.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/AppConfigs.java similarity index 71% rename from autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/beans/AppConfigs.java rename to autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/AppConfigs.java index f06959f..f4a06da 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/beans/AppConfigs.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/AppConfigs.java @@ -1,20 +1,21 @@ -package cc.winboll.studio.autoinstaller.beans; +package cc.winboll.studio.autoinstaller.models; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 17:36:01 * @Describe 应用配置数据类 */ import android.content.Context; import android.util.JsonReader; import android.util.JsonWriter; -import cc.winboll.studio.autoinstaller.beans.AppConfigs; +import cc.winboll.studio.autoinstaller.models.AppConfigs; import cc.winboll.studio.autoinstaller.utils.FileUtil; +import cc.winboll.studio.libappbase.LogUtils; +import com.hjq.toast.ToastUtils; import java.io.IOException; import java.io.Serializable; import java.io.StringReader; import java.io.StringWriter; -import cc.winboll.studio.shared.log.LogUtils; public class AppConfigs implements Serializable { @@ -26,6 +27,21 @@ public class AppConfigs implements Serializable { NEWAPKINFONEWAPKINFO // 调用[应用信息查看器]打开应用包 }; + static volatile AppConfigs _AppConfigs; + Context mContext; + + AppConfigs(Context context) { + mContext = context.getApplicationContext(); + } + + public static synchronized AppConfigs getInstance(Context context) { + if (_AppConfigs == null) { + _AppConfigs = new AppConfigs(context); + _AppConfigs.loadAppConfigs(_AppConfigs.mContext); + } + return _AppConfigs; + } + // 监控文件路径 private String watchingFilePath = ""; @@ -85,8 +101,8 @@ public class AppConfigs implements Serializable { return ""; } - public static AppConfigs parseAppConfigs(String szAppConfigs) { - AppConfigs appConfigs = new AppConfigs(); + public AppConfigs parseAppConfigs(String szAppConfigs) { + AppConfigs appConfigs = new AppConfigs(mContext); // 创建 JsonWriter 对象 StringReader stringReader = new StringReader(szAppConfigs); JsonReader jsonReader = new @@ -121,20 +137,35 @@ public class AppConfigs implements Serializable { static String getDataPath(Context context) { return context.getExternalFilesDir(TAG) + "/" + TAG + ".json"; } - - public static AppConfigs loadAppConfigs(Context context) { + + public AppConfigs loadAppConfigs() { AppConfigs appConfigs = null; try { - String szJson = FileUtil.readFile(getDataPath(context)); - appConfigs = AppConfigs.parseAppConfigs(szJson); + String szJson = FileUtil.readFile(getDataPath(mContext)); + appConfigs = AppConfigs.getInstance(mContext).parseAppConfigs(szJson); } catch (IOException e) { LogUtils.d(TAG, e.getMessage(), Thread.currentThread().getStackTrace()); } return appConfigs; } - public static void saveAppConfigs(Context context, AppConfigs appConfigs) { + public AppConfigs loadAppConfigs(Context context) { + AppConfigs appConfigs = null; try { + String szJson = FileUtil.readFile(getDataPath(context.getApplicationContext())); + appConfigs = AppConfigs.getInstance(mContext).parseAppConfigs(szJson); + if(appConfigs != null) { + _AppConfigs = appConfigs; + } + } catch (IOException e) { + LogUtils.d(TAG, e.getMessage(), Thread.currentThread().getStackTrace()); + } + return _AppConfigs; + } + + public void saveAppConfigs(Context context, AppConfigs appConfigs) { + try { + ToastUtils.show(String.format("AppConfigs set enable service to %s", appConfigs.isEnableService())); //LogUtils.d(TAG, "appConfigs is : " + appConfigs.toString()); String szJson = appConfigs.toString(); FileUtil.writeFile(getDataPath(context), szJson); @@ -142,4 +173,8 @@ public class AppConfigs implements Serializable { LogUtils.d(TAG, e.getMessage(), Thread.currentThread().getStackTrace()); } } + + public void saveAppConfigs() { + saveAppConfigs(mContext, this); + } } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/MainServiceBean.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/MainServiceBean.java new file mode 100644 index 0000000..15044db --- /dev/null +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/models/MainServiceBean.java @@ -0,0 +1,67 @@ +package cc.winboll.studio.autoinstaller.models; +import android.util.JsonReader; +import android.util.JsonWriter; +import cc.winboll.studio.libappbase.BaseBean; +import java.io.IOException; + +/** + * @Author ZhanGSKen + * @Date 2025/04/15 09:27:39 + * @Describe MainServiceBean + */ +public class MainServiceBean extends BaseBean { + + public static final String TAG = "MainServiceBean"; + + boolean isEnable; + + public MainServiceBean() { + this.isEnable = false; + } + + public void setIsEnable(boolean isEnable) { + this.isEnable = isEnable; + } + + public boolean isEnable() { + return isEnable; + } + + @Override + public String getName() { + return MainServiceBean.class.getName(); + } + + @Override + public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException { + super.writeThisToJsonWriter(jsonWriter); + jsonWriter.name("isEnable").value(isEnable()); + + } + + @Override + public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException { + if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else { + if (name.equals("isEnable")) { + setIsEnable(jsonReader.nextBoolean()); + } else { + return false; + } + } + return true; + } + + @Override + public BaseBean readBeanFromJsonReader(JsonReader jsonReader) throws IOException { + jsonReader.beginObject(); + while (jsonReader.hasNext()) { + String name = jsonReader.nextName(); + if (!initObjectsFromJsonReader(jsonReader, name)) { + jsonReader.skipValue(); + } + } + // 结束 JSON 对象 + jsonReader.endObject(); + return this; + } +} diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/receivers/MainReceiver.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/receivers/MainReceiver.java index b2cf4a4..6bfa951 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/receivers/MainReceiver.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/receivers/MainReceiver.java @@ -4,12 +4,12 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Build; -import cc.winboll.studio.autoinstaller.beans.AppConfigs; +import cc.winboll.studio.autoinstaller.models.AppConfigs; import cc.winboll.studio.autoinstaller.services.MainService; -import cc.winboll.studio.shared.log.LogUtils; +import cc.winboll.studio.libappbase.LogUtils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/06 13:19:38 * @Describe 应用消息接收类 */ @@ -23,7 +23,7 @@ public class MainReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { String szAction = intent.getAction(); if (szAction.equals(ACTION_BOOT_COMPLETED)) { - AppConfigs appConfigs = AppConfigs.loadAppConfigs(context); + AppConfigs appConfigs = AppConfigs.getInstance(context).loadAppConfigs(context); if (appConfigs.isEnableService()) { Intent intentService = new Intent(context, MainService.class); //intentService.putExtra(MainService.EXTRA_APKFILEPATH, appConfigs.getWatchingFilePath()); diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/AssistantService.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/AssistantService.java index 54b83aa..158ffc5 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/AssistantService.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/AssistantService.java @@ -6,11 +6,11 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; -import cc.winboll.studio.autoinstaller.beans.AppConfigs; +import cc.winboll.studio.autoinstaller.models.AppConfigs; import cc.winboll.studio.autoinstaller.utils.ServiceUtil; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 20:16:00 * @Describe MainService 守护进程服务 */ @@ -46,7 +46,7 @@ public class AssistantService extends Service { public int onStartCommand(Intent intent, int flags, int startId) { //LogUtils.d(TAG, "call onStartCommand(...)"); run(); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(AssistantService.this); + AppConfigs appConfigs = AppConfigs.getInstance(AssistantService.this).loadAppConfigs(AssistantService.this); return appConfigs.isEnableService() ? Service.START_STICKY: super.onStartCommand(intent, flags, startId); } @@ -68,7 +68,7 @@ public class AssistantService extends Service { // void run() { //LogUtils.d(TAG, "call run()"); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(AssistantService.this); + AppConfigs appConfigs = AppConfigs.getInstance(AssistantService.this).loadAppConfigs(AssistantService.this); if (appConfigs.isEnableService()) { if (mIsThreadAlive == false) { // 设置运行状态 @@ -101,7 +101,7 @@ public class AssistantService extends Service { @Override public void onServiceDisconnected(ComponentName name) { //LogUtils.d(TAG, "call onServiceDisconnected(...)"); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(AssistantService.this); + AppConfigs appConfigs = AppConfigs.getInstance(AssistantService.this).loadAppConfigs(AssistantService.this); if (appConfigs.isEnableService()) { wakeupAndBindMain(); } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/MainService.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/MainService.java index 2531088..2a08f54 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/MainService.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/services/MainService.java @@ -10,25 +10,32 @@ import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Message; +import android.service.quicksettings.Tile; +import android.service.quicksettings.TileService; import android.widget.Toast; import androidx.core.content.FileProvider; -import cc.winboll.studio.shared.log.LogUtils; import cc.winboll.studio.autoinstaller.FileListener; import cc.winboll.studio.autoinstaller.MainActivity; -import cc.winboll.studio.autoinstaller.beans.AppConfigs; +import cc.winboll.studio.autoinstaller.R; +import cc.winboll.studio.autoinstaller.models.APKModel; +import cc.winboll.studio.autoinstaller.models.AppConfigs; import cc.winboll.studio.autoinstaller.services.AssistantService; import cc.winboll.studio.autoinstaller.services.MainService; import cc.winboll.studio.autoinstaller.utils.NotificationUtil; import cc.winboll.studio.autoinstaller.utils.PackageUtil; import cc.winboll.studio.autoinstaller.utils.ServiceUtil; -import com.hjq.toast.ToastUtils; +import cc.winboll.studio.libappbase.LogUtils; import java.io.File; import java.lang.ref.WeakReference; +import java.util.ArrayList; public class MainService extends Service { public static String TAG = "MainService"; + + Context mContext; + ArrayList _APKModelList = new ArrayList(); private static boolean _mIsServiceAlive; //String mszAPKFilePath; //String mszAPKFileName; @@ -47,6 +54,7 @@ public class MainService extends Service { @Override public void onCreate() { super.onCreate(); + mContext = this; LogUtils.d(TAG, "onCreate()"); _mIsServiceAlive = false; mHandler = new MyHandler(MainService.this); @@ -55,11 +63,14 @@ public class MainService extends Service { } run(); + + // 初始化磁贴工具服务 + MainTileService mainTileService = new MainTileService(this); } private void run() { - AppConfigs appConfigs = AppConfigs.loadAppConfigs(MainService.this); + AppConfigs appConfigs = AppConfigs.getInstance(MainService.this).loadAppConfigs(MainService.this); if (appConfigs.isEnableService()) { if (_mIsServiceAlive == false) { // 设置运行状态 @@ -74,7 +85,8 @@ public class MainService extends Service { startWatchingFile(appConfigs.getWatchingFilePath()); - LogUtils.d(TAG, "running..."); + //LogUtils.d(TAG, "running..."); + //ToastUtils.show("running..."); } else { LogUtils.d(TAG, "_mIsServiceAlive is " + Boolean.toString(_mIsServiceAlive)); @@ -94,6 +106,7 @@ public class MainService extends Service { } _mIsServiceAlive = false; LogUtils.d(TAG, "onDestroy()"); + mContext = null; } @Override @@ -101,7 +114,7 @@ public class MainService extends Service { LogUtils.d(TAG, "onStartCommand"); run(); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(MainService.this); + AppConfigs appConfigs = AppConfigs.getInstance(MainService.this).loadAppConfigs(MainService.this); return appConfigs.isEnableService() ? Service.START_STICKY: super.onStartCommand(intent, flags, startId); } @@ -118,7 +131,7 @@ public class MainService extends Service { @Override public void onServiceDisconnected(ComponentName name) { //LogUtils.d(TAG, "call onServiceConnected(...)"); - AppConfigs appConfigs = AppConfigs.loadAppConfigs(MainService.this); + AppConfigs appConfigs = AppConfigs.getInstance(MainService.this).loadAppConfigs(MainService.this); if (appConfigs.isEnableService()) { // 唤醒守护进程 wakeupAndBindAssistant(); @@ -160,7 +173,7 @@ public class MainService extends Service { }); mFileListener.startWatching(); - ToastUtils.show("Start watching."); + //ToastUtils.show("Start watching."); } else { // 父级文件夹不存在,就提示用户 Toast.makeText(getApplication(), fParentDir.toString() + " no exist.", Toast.LENGTH_SHORT).show(); @@ -176,6 +189,9 @@ public class MainService extends Service { // 调用[应用信息查看器]打开应用包 // private void installAPK(String szAPKFilePath) { + String szAPKPackageName = PackageUtil.getPackageNameFromApk(this, szAPKFilePath); + saveAPKInfo(szAPKPackageName); + long nTimeNow = System.currentTimeMillis(); /*SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss", Locale.getDefault()); @@ -210,15 +226,24 @@ public class MainService extends Service { // void installAPK2(String szAPKFilePath) { LogUtils.d(TAG, "installAPK2()"); + String szAPKPackageName = PackageUtil.getPackageNameFromApk(this, szAPKFilePath); + saveAPKInfo(szAPKPackageName); + Intent intent = new Intent(this, MainActivity.class); intent.setAction(MainActivity.ACTION_NEW_INSTALLTASK); - intent.putExtra(MainActivity.EXTRA_INSTALLED_PACKAGENAME, PackageUtil.getPackageNameFromApk(this, szAPKFilePath)); + intent.putExtra(MainActivity.EXTRA_INSTALLED_PACKAGENAME, szAPKPackageName); intent.putExtra(MainActivity.EXTRA_INSTALLED_APKFILEPATH, szAPKFilePath); // Intent.ACTION_VIEW); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); this.startActivity(intent); } + void saveAPKInfo(String szApkPackageName) { + APKModel.loadBeanList(this, _APKModelList, APKModel.class); + _APKModelList.add(new APKModel(szApkPackageName)); + APKModel.saveBeanList(this, _APKModelList, APKModel.class); + } + // // static class MyHandler extends Handler { @@ -231,7 +256,7 @@ public class MainService extends Service { switch (message.what) { case MSG_INSTALL_APK: { - AppConfigs appConfigs = AppConfigs.loadAppConfigs(theActivity); + AppConfigs appConfigs = AppConfigs.getInstance(theActivity).loadAppConfigs(theActivity); if (appConfigs.getSetupMode() == AppConfigs.SetupMode.WATCHOUTPUTINSTALLER) { theActivity.installAPK2((String)message.obj); } else if (appConfigs.getSetupMode() == AppConfigs.SetupMode.NEWAPKINFONEWAPKINFO) { @@ -245,4 +270,21 @@ public class MainService extends Service { super.handleMessage(message); } } + + static class MainTileService extends TileService { + Context mContext; + MainTileService(Context context) { + mContext = context; + } + + @Override + public void onStartListening() { + super.onStartListening(); + Tile tile = getQsTile(); + tile.setIcon(android.graphics.drawable.Icon.createWithResource(this, R.drawable.ic_android)); + // 更新磁贴状态 + tile.setState((mContext == null || mContext.getApplicationContext() == null )?Tile.STATE_INACTIVE: Tile.STATE_ACTIVE); + tile.updateTile(); + } + } } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/FileUtil.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/FileUtil.java index 4204bab..7e9f236 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/FileUtil.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/FileUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.autoinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 17:56:31 * @Describe 文件管理类 */ diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/NotificationUtil.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/NotificationUtil.java index 310d648..151648f 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/NotificationUtil.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/NotificationUtil.java @@ -55,8 +55,9 @@ public class NotificationUtil { Notification mForegroundNotification = new Notification.Builder(service, szServiceChannelID) .setAutoCancel(true) - .setContentTitle(service.getString(R.string.app_name)) - .setContentText(service.TAG + " is started.") + //.setContentTitle(service.getString(R.string.app_name)) + .setContentTitle(service.TAG + " is started.") + //.setContentText(service.TAG + " is started.") .setWhen(System.currentTimeMillis()) .setSmallIcon(R.drawable.ic_launcher) //设置红色 diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/PackageUtil.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/PackageUtil.java index 33fcdb0..6f0c95f 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/PackageUtil.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/PackageUtil.java @@ -1,14 +1,16 @@ package cc.winboll.studio.autoinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/11 06:28:50 * @Describe 一个获取安卓APK安装文件的应用包名的函数 */ import android.content.Context; +import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; -import cc.winboll.studio.shared.log.LogUtils; +import android.content.pm.ResolveInfo; +import cc.winboll.studio.libappbase.LogUtils; public class PackageUtil { @@ -27,4 +29,20 @@ public class PackageUtil { } return ""; } + + public static void openAPP(Context context, String packageName) { + // 这里假设要打开微信,微信的包名是com.tencent.mm + //String packageName = "com.tencent.mm"; + LogUtils.d(TAG, "packageName : " + packageName); + PackageManager packageManager = context.getPackageManager(); + Intent intent = packageManager.getLaunchIntentForPackage(packageName); + if (intent != null) { + ResolveInfo resolveInfo = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); + if (resolveInfo != null) { + LogUtils.d(TAG, "startActivity..."); + context.startActivity(intent); + } + } + + } } diff --git a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/ServiceUtil.java b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/ServiceUtil.java index b53155c..ef0c152 100644 --- a/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/ServiceUtil.java +++ b/autoinstaller/src/main/java/cc/winboll/studio/autoinstaller/utils/ServiceUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.autoinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 20:20:03 * @Describe 服务类工具 */ diff --git a/autoinstaller/src/main/res/drawable/ic_android.xml b/autoinstaller/src/main/res/drawable/ic_android.xml new file mode 100644 index 0000000..6c69cd1 --- /dev/null +++ b/autoinstaller/src/main/res/drawable/ic_android.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/autoinstaller/src/main/res/drawable/ic_cloud.xml b/autoinstaller/src/main/res/drawable/ic_cloud.xml new file mode 100644 index 0000000..c116648 --- /dev/null +++ b/autoinstaller/src/main/res/drawable/ic_cloud.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/autoinstaller/src/main/res/drawable/ic_cloud_outline.xml b/autoinstaller/src/main/res/drawable/ic_cloud_outline.xml new file mode 100644 index 0000000..a8ed00c --- /dev/null +++ b/autoinstaller/src/main/res/drawable/ic_cloud_outline.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/autoinstaller/src/main/res/layout/activity_main.xml b/autoinstaller/src/main/res/layout/activity_main.xml index de79fc6..d4327fd 100644 --- a/autoinstaller/src/main/res/layout/activity_main.xml +++ b/autoinstaller/src/main/res/layout/activity_main.xml @@ -132,7 +132,7 @@ - AutoInstaller + AutoInstaller diff --git a/autoinstaller/src/main/res/values/styles.xml b/autoinstaller/src/main/res/values/styles.xml new file mode 100644 index 0000000..e11b9da --- /dev/null +++ b/autoinstaller/src/main/res/values/styles.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/autoinstaller/src/main/res/values/themes.xml b/autoinstaller/src/main/res/values/themes.xml deleted file mode 100644 index 89d5280..0000000 --- a/autoinstaller/src/main/res/values/themes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index ab63fe7..5b577c8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { - // 本地 Maven 仓库(默认路径为 ~/.m2/repository) - mavenLocal() - // 或自定义本地仓库路径 - maven { url "file:///sdcard/.m2/repository" } - + mavenLocal { + // 设置本地Maven仓库路径 + url 'file:///sdcard/.m2/repository/' + } // Nexus Maven 库地址 // "WinBoLL Release" maven { url "https://nexus.winboll.cc/repository/maven-public/" } @@ -20,7 +19,13 @@ buildscript { maven { url "https://jitpack.io" } mavenCentral() google() + //println "mavenLocal : ===========" + //println mavenLocal().url + //println "mavenLocal : ===========" //mavenLocal() + + // WinBoLL.CC 紧急备用 Maven 仓库 + maven { url 'https://spare-maven.winboll.cc/repository/' } } dependencies { classpath 'com.android.tools.build:gradle:7.2.1' // 对应 compileSdkVersion 32 @@ -31,6 +36,11 @@ buildscript { allprojects { repositories { + mavenLocal { + // 设置本地Maven仓库路径 + url 'file:///sdcard/.m2/repository/' + } + // Nexus Maven 库地址 // "WinBoLL Release" maven { url "https://nexus.winboll.cc/repository/maven-public/" } @@ -45,7 +55,13 @@ allprojects { maven { url "https://jitpack.io" } mavenCentral() google() - mavenLocal() + //println "mavenLocal : ===========" + //println mavenLocal().url + //println "mavenLocal : ===========" + //mavenLocal() + + // WinBoLL.CC 紧急备用 Maven 仓库 + maven { url 'https://spare-maven.winboll.cc/repository/' } } ext { // 定义全局变量,常用于版本管理 diff --git a/contacts/README.md b/contacts/README.md index a1f131a..d48aa8b 100644 --- a/contacts/README.md +++ b/contacts/README.md @@ -24,7 +24,7 @@ https://github.com/aJIEw/PhoneCallApp.git 1. Fork 本仓库 2. 新建 Feat_xxx 分支 -3. 提交代码 : ZhanGSKen(ZhanGSKen@AliYun.Com) +3. 提交代码 : ZhanGSKen(ZhanGSKen) 4. 新建 Pull Request diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/App.java b/contacts/src/main/java/cc/winboll/studio/contacts/App.java index c5a8621..9493dd2 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/App.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 15:10:51 * @Describe 全局应用类 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/AboutActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/AboutActivity.java index 453062b..c8d71cb 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/AboutActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/AboutActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/31 15:15:54 * @Describe 应用介绍窗口 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/CallActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/CallActivity.java index ebff426..07bfd00 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/CallActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/CallActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 17:15:46 * @Describe 拨号窗口 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/DialerActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/DialerActivity.java index ed1afa8..2a73792 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/DialerActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/DialerActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 20:18:26 */ import android.content.Intent; diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/SettingsActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/SettingsActivity.java index 09bd722..5ce6f7c 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/SettingsActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/SettingsActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/21 05:37:42 */ import android.content.Context; diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/UnitTestActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/UnitTestActivity.java index 6c42de2..9b59cbc 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/UnitTestActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/UnitTestActivity.java @@ -11,7 +11,7 @@ import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.libappbase.LogView; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 16:07:04 */ public class UnitTestActivity extends Activity { diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/activities/WinBollActivity.java b/contacts/src/main/java/cc/winboll/studio/contacts/activities/WinBollActivity.java index c54650e..afbb888 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/activities/WinBollActivity.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/activities/WinBollActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/31 15:16:45 * @Describe 应用窗口基类 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/CallLogAdapter.java b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/CallLogAdapter.java index a986ad8..8ad75ba 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/CallLogAdapter.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/CallLogAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.adapters; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/26 13:09:32 * @Describe CallLogAdapter */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ContactAdapter.java b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ContactAdapter.java index ea5cc77..9b561b4 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ContactAdapter.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ContactAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.adapters; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/26 13:35:44 * @Describe ContactAdapter */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ImagePagerAdapter.java b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ImagePagerAdapter.java index 974c4ce..ea8ed41 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ImagePagerAdapter.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/ImagePagerAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.adapters; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 14:20:38 * @Describe ImagePagerAdapter */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/PhoneConnectRuleAdapter.java b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/PhoneConnectRuleAdapter.java index 8483c55..03805b9 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/adapters/PhoneConnectRuleAdapter.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/adapters/PhoneConnectRuleAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.adapters; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 17:27:41 * @Describe PhoneConnectRuleAdapter */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/CallLogModel.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/CallLogModel.java index 32f7d58..afb9254 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/CallLogModel.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/CallLogModel.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/26 13:10:57 * @Describe CallLogModel */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/ContactModel.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/ContactModel.java index cf3c559..1e56444 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/ContactModel.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/ContactModel.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/26 13:37:00 * @Describe ContactModel */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/MainServiceBean.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/MainServiceBean.java index de752f3..93c5cea 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/MainServiceBean.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/MainServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 07:06:13 */ import android.util.JsonReader; diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/PhoneConnectRuleModel.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/PhoneConnectRuleModel.java index 3975902..5bc0bd6 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/PhoneConnectRuleModel.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/PhoneConnectRuleModel.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/21 09:52:10 * @Describe 电话黑名单规则 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/RingTongBean.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/RingTongBean.java index 5db7262..db2f67e 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/RingTongBean.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/RingTongBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/24 18:47:11 * @Describe 手机铃声设置参数类 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/beans/SettingsModel.java b/contacts/src/main/java/cc/winboll/studio/contacts/beans/SettingsModel.java index cacfc4f..ed1360a 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/beans/SettingsModel.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/beans/SettingsModel.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.beans; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 19:51:40 * @Describe SettingsModel */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/bobulltoon/TomCat.java b/contacts/src/main/java/cc/winboll/studio/contacts/bobulltoon/TomCat.java index ffd20eb..b1b8273 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/bobulltoon/TomCat.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/bobulltoon/TomCat.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.bobulltoon; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 13:47:48 * @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/dun/Rules.java b/contacts/src/main/java/cc/winboll/studio/contacts/dun/Rules.java index 8137f38..97295ee 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/dun/Rules.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/dun/Rules.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.dun; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/21 06:15:10 * @Describe 云盾防御规则 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/CallLogFragment.java b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/CallLogFragment.java index d39033e..d8dac2a 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/CallLogFragment.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/CallLogFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.fragments; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 12:57:00 * @Describe 拨号 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/ContactsFragment.java b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/ContactsFragment.java index 356201e..a10a6be 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/ContactsFragment.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/ContactsFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.fragments; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 12:57:50 * @Describe 联系人 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/LogFragment.java b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/LogFragment.java index 656b7d1..a448180 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/fragments/LogFragment.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/fragments/LogFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.fragments; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/20 12:58:15 * @Describe 应用日志 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/handlers/MainServiceHandler.java b/contacts/src/main/java/cc/winboll/studio/contacts/handlers/MainServiceHandler.java index d19cd99..d58d82d 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/handlers/MainServiceHandler.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/handlers/MainServiceHandler.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.handlers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:51:40 */ import android.os.Handler; diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/receivers/MainReceiver.java b/contacts/src/main/java/cc/winboll/studio/contacts/receivers/MainReceiver.java index 924ddab..4c87528 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/receivers/MainReceiver.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/receivers/MainReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.receivers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:58:04 * @Describe 主要广播接收器 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/services/AssistantService.java b/contacts/src/main/java/cc/winboll/studio/contacts/services/AssistantService.java index 6fd8673..7670c9b 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/services/AssistantService.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/services/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:38:31 * @Describe 守护进程服务 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/services/MainService.java b/contacts/src/main/java/cc/winboll/studio/contacts/services/MainService.java index f61cde5..b948631 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/services/MainService.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/services/MainService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:56:41 * @Describe 拨号主服务 * 参考: diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/threads/MainServiceThread.java b/contacts/src/main/java/cc/winboll/studio/contacts/threads/MainServiceThread.java index c703d83..9d694b7 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/threads/MainServiceThread.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/threads/MainServiceThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.threads; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:46:44 */ import android.content.Context; diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/utils/ContactUtils.java b/contacts/src/main/java/cc/winboll/studio/contacts/utils/ContactUtils.java index cc91eec..93e814c 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/utils/ContactUtils.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/utils/ContactUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/06 21:08:16 * @Describe ContactUtils */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/utils/EditTextIntUtils.java b/contacts/src/main/java/cc/winboll/studio/contacts/utils/EditTextIntUtils.java index 5b05034..f13ab4a 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/utils/EditTextIntUtils.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/utils/EditTextIntUtils.java @@ -3,7 +3,7 @@ import android.widget.EditText; import cc.winboll.studio.libappbase.LogUtils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/04/13 00:59:13 * @Describe Int类型数字输入框工具集 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/utils/IntUtils.java b/contacts/src/main/java/cc/winboll/studio/contacts/utils/IntUtils.java index 60c9639..6d66b11 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/utils/IntUtils.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/utils/IntUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/04/13 01:16:28 * @Describe Int数字操作工具集 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/utils/PhoneUtils.java b/contacts/src/main/java/cc/winboll/studio/contacts/utils/PhoneUtils.java index 9fa3e17..6a4c536 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/utils/PhoneUtils.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/utils/PhoneUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/26 15:21:48 * @Describe PhoneUtils */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/utils/RegexPPiUtils.java b/contacts/src/main/java/cc/winboll/studio/contacts/utils/RegexPPiUtils.java index c00a9f2..3403c76 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/utils/RegexPPiUtils.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/utils/RegexPPiUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 19:00:21 * @Describe .* 前置预防针 regex pointer preventive injection diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/views/DuInfoTextView.java b/contacts/src/main/java/cc/winboll/studio/contacts/views/DuInfoTextView.java index 62d968c..94710a5 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/views/DuInfoTextView.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/views/DuInfoTextView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.views; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 21:11:03 * @Describe 云盾防御信息 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/views/LeftScrollView.java b/contacts/src/main/java/cc/winboll/studio/contacts/views/LeftScrollView.java index 2bebd41..9a557f1 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/views/LeftScrollView.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/views/LeftScrollView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.views; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/04 10:51:50 * @Describe CustomHorizontalScrollView */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/views/ScrollDoView.java b/contacts/src/main/java/cc/winboll/studio/contacts/views/ScrollDoView.java index 1a915d4..3166065 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/views/ScrollDoView.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/views/ScrollDoView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.views; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/19 14:04:20 * @Describe 云盾滑视度热备控件 */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidget.java b/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidget.java index 8a9b7c0..94707e6 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidget.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidget.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 14:49:31 * @Describe APPStatusWidget */ diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidgetClickListener.java b/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidgetClickListener.java index 016ccb2..c65cf63 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidgetClickListener.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/widgets/APPStatusWidgetClickListener.java @@ -1,7 +1,7 @@ package cc.winboll.studio.contacts.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 14:59:55 * @Describe WidgetButtonClickListener */ diff --git a/jc/src/main/java/cc/winboll/studio/jc/App.java b/jc/src/main/java/cc/winboll/studio/jc/App.java index 406657c..69b2ce4 100644 --- a/jc/src/main/java/cc/winboll/studio/jc/App.java +++ b/jc/src/main/java/cc/winboll/studio/jc/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.jc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/11/28 15:42:47 * @Describe 全局应用类 */ diff --git a/jcndk/src/cc/winboll/studio/jcndk/FileUtils.java b/jcndk/src/cc/winboll/studio/jcndk/FileUtils.java index 13f2061..bdbee09 100644 --- a/jcndk/src/cc/winboll/studio/jcndk/FileUtils.java +++ b/jcndk/src/cc/winboll/studio/jcndk/FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.jcndk; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/08 16:31:28 * @Describe 文件工具类 */ diff --git a/jcndk/src/cc/winboll/studio/jcndk/services/JCMainService.java b/jcndk/src/cc/winboll/studio/jcndk/services/JCMainService.java index a6f701a..00bf332 100644 --- a/jcndk/src/cc/winboll/studio/jcndk/services/JCMainService.java +++ b/jcndk/src/cc/winboll/studio/jcndk/services/JCMainService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.jcndk.services; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/09 11:19:28 * @Describe JC 主服务类 */ diff --git a/libaes/build.gradle b/libaes/build.gradle index 84124b2..6e72c8e 100644 --- a/libaes/build.gradle +++ b/libaes/build.gradle @@ -21,6 +21,9 @@ android { dependencies { api fileTree(dir: 'libs', include: ['*.jar']) + //api 'cc.winboll.studio:libaes:15.6.0' + api 'cc.winboll.studio:libapputils:15.3.4' + api 'cc.winboll.studio:libappbase:15.7.6' // 吐司类库 api 'com.github.getActivity:ToastUtils:10.5' @@ -50,7 +53,4 @@ dependencies { //api 'androidx.vectordrawable:vectordrawable:1.1.0' //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' //api 'androidx.fragment:fragment:1.1.0' - - api 'cc.winboll.studio:libapputils:15.3.4' - api 'cc.winboll.studio:libappbase:15.7.6' } diff --git a/libaes/build.properties b/libaes/build.properties index 83303dd..9a2583a 100644 --- a/libaes/build.properties +++ b/libaes/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 29 15:14:21 HKT 2025 -stageCount=1 +#Mon May 12 18:10:35 HKT 2025 +stageCount=4 libraryProject=libaes baseVersion=15.6 -publishVersion=15.6.0 +publishVersion=15.6.3 buildCount=0 -baseBetaVersion=15.6.1 +baseBetaVersion=15.6.4 diff --git a/libaes/src/main/AndroidManifest.xml b/libaes/src/main/AndroidManifest.xml index d8cbd79..7c90bad 100644 --- a/libaes/src/main/AndroidManifest.xml +++ b/libaes/src/main/AndroidManifest.xml @@ -5,27 +5,34 @@ - - - - - - - - + \ No newline at end of file diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/activitys/DrawerFragmentActivity.java b/libaes/src/main/java/cc/winboll/studio/libaes/activitys/DrawerFragmentActivity.java index 9698899..b6b934f 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/activitys/DrawerFragmentActivity.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/activitys/DrawerFragmentActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/13 18:58:54 * @Describe 可以加入Fragment的有抽屉的活动窗口抽象类 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/beans/AESThemeBean.java b/libaes/src/main/java/cc/winboll/studio/libaes/beans/AESThemeBean.java index 44fd998..568d1d3 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/beans/AESThemeBean.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/beans/AESThemeBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/14 02:42:57 * @Describe 主题元素项目类 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/beans/DrawerMenuBean.java b/libaes/src/main/java/cc/winboll/studio/libaes/beans/DrawerMenuBean.java index 88f01f0..004ef64 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/beans/DrawerMenuBean.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/beans/DrawerMenuBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/14 01:53:34 * @Describe 抽屉菜单项目类 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientServiceBean.java b/libaes/src/main/java/cc/winboll/studio/libaes/beans/WinBoLLClientServiceBean.java similarity index 66% rename from libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientServiceBean.java rename to libaes/src/main/java/cc/winboll/studio/libaes/beans/WinBoLLClientServiceBean.java index 000b5db..32bb757 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientServiceBean.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/beans/WinBoLLClientServiceBean.java @@ -1,9 +1,8 @@ -package cc.winboll.studio.libaes.winboll; +package cc.winboll.studio.libaes.beans; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 19:05:15 - * @Describe WinBoLLService 运行参数配置 + * @Author ZhanGSKen + * @Date 2025/05/03 19:16 */ import android.content.Context; import android.util.JsonReader; @@ -14,11 +13,16 @@ import java.io.IOException; public class WinBoLLClientServiceBean extends BaseBean { public static final String TAG = "WinBoLLClientServiceBean"; - - volatile boolean isEnable; - + + // 服务是否正在使用中 + boolean isEnable; + public WinBoLLClientServiceBean() { - isEnable = false; + this.isEnable = false; + } + + public WinBoLLClientServiceBean(boolean isEnable) { + this.isEnable = isEnable; } public void setIsEnable(boolean isEnable) { @@ -29,6 +33,7 @@ public class WinBoLLClientServiceBean extends BaseBean { return isEnable; } + @Override public String getName() { return WinBoLLClientServiceBean.class.getName(); @@ -38,17 +43,17 @@ public class WinBoLLClientServiceBean extends BaseBean { public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException { super.writeThisToJsonWriter(jsonWriter); WinBoLLClientServiceBean bean = this; - jsonWriter.name("isEnable").value(bean.isEnable()); + //jsonWriter.name("logLevel").value(bean.getLogLevel().ordinal()); } @Override public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException { if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else { - if (name.equals("isEnable")) { - setIsEnable(jsonReader.nextBoolean()); - } else { - return false; - } +// if (name.equals("logLevel")) { +// setLogLevel(LogUtils.LOG_LEVEL.values()[jsonReader.nextInt()]); +// } else { +// return false; +// } } return true; } @@ -68,11 +73,6 @@ public class WinBoLLClientServiceBean extends BaseBean { } public static WinBoLLClientServiceBean loadWinBoLLClientServiceBean(Context context) { - WinBoLLClientServiceBean bean = WinBoLLClientServiceBean.loadBean(context, WinBoLLClientServiceBean.class); - return bean == null ? new WinBoLLClientServiceBean() : bean; - } - - public static boolean saveWinBoLLServiceBean(WinBoLLClientService service, WinBoLLClientServiceBean bean) { - return WinBoLLClientServiceBean.saveBean(service, bean); + return new WinBoLLClientServiceBean(); } } diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryActivity.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryActivity.java index 664a07d..b7017fa 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryActivity.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryActivity.java @@ -10,7 +10,7 @@ import cc.winboll.studio.libaes.activitys.DrawerFragmentActivity; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/15 00:58:10 * @Describe 第二级窗口 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryFragment.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryFragment.java index db149ce..29240e5 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryFragment.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/SecondaryLibraryFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 02:36:34 * @Describe SecondaryLibraryFragment */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAButtonFragment.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAButtonFragment.java index 6dcf11d..aa6bf69 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAButtonFragment.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAButtonFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:27:50 * @Describe TestAButtonFragment */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestASupportToolbarActivity.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestASupportToolbarActivity.java index 5fcfa97..faa4e28 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestASupportToolbarActivity.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestASupportToolbarActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:14:00 * @Describe TestASupportToolbarActivity */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAToolbarActivity.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAToolbarActivity.java index 02af7f9..30c9261 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAToolbarActivity.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestAToolbarActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:16:07 * @Describe TestAToolbarActivity */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestDrawerFragmentActivity.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestDrawerFragmentActivity.java index bbfecd2..23e3295 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestDrawerFragmentActivity.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestDrawerFragmentActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/30 15:00:51 */ import android.app.Activity; diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestViewPageFragment.java b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestViewPageFragment.java index a7253c8..ab9449d 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestViewPageFragment.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/unittests/TestViewPageFragment.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.unittests; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:35:56 * @Describe TestViewPageFragment */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/utils/AESThemeUtil.java b/libaes/src/main/java/cc/winboll/studio/libaes/utils/AESThemeUtil.java index 5caab19..964898a 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/utils/AESThemeUtil.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/utils/AESThemeUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/11/29 22:52:09 * @Describe AES 主题工具集 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/utils/AppVersionUtils.java b/libaes/src/main/java/cc/winboll/studio/libaes/utils/AppVersionUtils.java index f684626..11cf967 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/utils/AppVersionUtils.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/utils/AppVersionUtils.java @@ -2,7 +2,7 @@ package cc.winboll.studio.libaes.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2024/08/12 14:45:35 * @Describe 应用版本工具集 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/AButton.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/AButton.java index 7b3162b..4838725 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/AButton.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/AButton.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:41:22 * @Describe AButton */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/ACard.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/ACard.java index ba6330b..7c69ad2 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/ACard.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/ACard.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:44:27 * @Describe ACard */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTCSeekBar.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTCSeekBar.java index 22344b8..4a4e7a2 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTCSeekBar.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTCSeekBar.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:46:30 * @Describe AOneHundredPercantClickToCommitSeekBar */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTSCard.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTSCard.java index 996e6e2..9ff4c86 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTSCard.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/AOHPCTSCard.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:49:23 * @Describe AOneHundredPercantClickToStartCard */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/ASupportToolbar.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/ASupportToolbar.java index 78c468b..8e4439f 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/ASupportToolbar.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/ASupportToolbar.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:54:40 * @Describe ASupportToolbar */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/ATickProgressBar.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/ATickProgressBar.java index 58a49a1..4b574a8 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/ATickProgressBar.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/ATickProgressBar.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:56:38 * @Describe ATickProgressBar */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/views/AToolbar.java b/libaes/src/main/java/cc/winboll/studio/libaes/views/AToolbar.java index 83df6ed..f1c9248 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/views/AToolbar.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/views/AToolbar.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/16 01:58:01 * @Describe AToolbar */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/APPInfo.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/APPInfo.java index 9ee7030..451e58c 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/APPInfo.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/APPInfo.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/01/20 14:19:02 * @Describe 应用信息类 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AboutView.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AboutView.java index 1765310..4fdde5d 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AboutView.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AboutView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/24 15:08:52 * @Describe WinBoLL应用介绍视图 */ @@ -238,7 +238,7 @@ public class AboutView extends LinearLayout { //.addItem(versionElement) //.addItem(adsElement) //.addGroup("Connect with us") - .addEmail("ZhanGSKen@AliYun.Com") + .addEmail("ZhanGSKen") .addWebsite(mszHomePage) .addItem(elementGitWeb) .addItem(elementAppUpdate); diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AssistantService.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AssistantService.java index f2f8028..640e1fd 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AssistantService.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/28 19:12:12 * @Describe 应用主要服务组件类守护进程服务组件类 */ @@ -11,7 +11,8 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; -import cc.winboll.studio.libaes.winboll.WinBoLLClientService; +import cc.winboll.studio.libaes.beans.WinBoLLClientServiceBean; +import cc.winboll.studio.libaes.winboll.AssistantService; import cc.winboll.studio.libappbase.utils.ServiceUtils; public class AssistantService extends Service { diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/EWUIStatusIconDrawable.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/EWUIStatusIconDrawable.java index 33e511e..a468bdf 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/EWUIStatusIconDrawable.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/EWUIStatusIconDrawable.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libaes.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/28 19:11:27 * @Describe WinBoLL UI 状态图标枚举 */ diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/IWinBoLLClientServiceBinder.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/IWinBoLLClientServiceBinder.java deleted file mode 100644 index 65087ad..0000000 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/IWinBoLLClientServiceBinder.java +++ /dev/null @@ -1,17 +0,0 @@ -package cc.winboll.studio.libaes.winboll; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 19:08:45 - * @Describe WinBoLLService 服务 Binder。 - */ -import android.graphics.drawable.Drawable; - -public interface IWinBoLLClientServiceBinder { - - public static final String TAG = "IWinBoLLClientServiceBinder"; - - public WinBoLLClientService getService(); - - public Drawable getCurrentStatusIconDrawable(); -} diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientService.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientService.java index 12fcd43..d4e93a6 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientService.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLClientService.java @@ -1,192 +1,21 @@ package cc.winboll.studio.libaes.winboll; -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 19:06:54 - * @Describe WinBoLL 客户端服务 - */ import android.app.Service; -import android.content.ComponentName; -import android.content.Context; import android.content.Intent; -import android.content.ServiceConnection; -import android.graphics.drawable.Drawable; import android.os.IBinder; -import cc.winboll.studio.libaes.winboll.AssistantService; -import cc.winboll.studio.libappbase.GlobalApplication; -import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libappbase.utils.ServiceUtils; -import cc.winboll.studio.libapputils.utils.PrefUtils; -import com.hjq.toast.ToastUtils; - -public class WinBoLLClientService extends Service implements IWinBoLLClientServiceBinder { +/** + * @Author ZhanGSKen + * @Date 2025/05/03 19:28 + */ +public class WinBoLLClientService extends Service { + public static final String TAG = "WinBoLLClientService"; - - WinBoLLClientServiceBean mWinBoLLClientServiceBean; - MyServiceConnection mMyServiceConnection; - volatile boolean mIsWinBoLLClientThreadRunning; - volatile boolean mIsEnableService; - volatile WinBoLLClientThread mWinBoLLClientThread; - - public boolean isWinBoLLClientThreadRunning() { - return mIsWinBoLLClientThreadRunning; - } - - @Override - public WinBoLLClientService getService() { - return WinBoLLClientService.this; - } - - @Override - public Drawable getCurrentStatusIconDrawable() { - return mIsWinBoLLClientThreadRunning ? - getDrawable(EWUIStatusIconDrawable.getIconDrawableId(EWUIStatusIconDrawable.NORMAL)) - : getDrawable(EWUIStatusIconDrawable.getIconDrawableId(EWUIStatusIconDrawable.NEWS)); - } - + @Override public IBinder onBind(Intent intent) { + return null; } - - @Override - public void onCreate() { - //ToastUtils.show("onCreate"); - super.onCreate(); - mWinBoLLClientThread = null; - mWinBoLLClientServiceBean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(this); - mIsEnableService = mWinBoLLClientServiceBean.isEnable(); - - if (mMyServiceConnection == null) { - mMyServiceConnection = new MyServiceConnection(); - } - - // 由系统启动时,应用可以通过下面函数实例化实际服务进程。 - runMainThread(); - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - //ToastUtils.show("onStartCommand"); - // 由应用 Intent 启动时,应用可以通过下面函数实例化实际服务进程。 - runMainThread(); - - // 返回运行参数持久化存储后,服务状态控制参数 - // 无论 Intent 传入如何,服务状态一直以持久化存储后的参数控制, - // PS: 另外当然可以通过 Intent 传入的指标来修改 mWinBoLLServiceBean, - // 不过本服务的应用方向会变得繁琐, - // 现阶段只要满足手机端启动与停止本服务,WinBoLL 客户端实例运行在手机端就可以了。 - return mIsEnableService ? Service.START_STICKY: super.onStartCommand(intent, flags, startId); - } - - synchronized void runMainThread() { - if (mWinBoLLClientThread == null) { - //ToastUtils.show("runMainThread()"); - mWinBoLLClientThread = new WinBoLLClientThread(); - mWinBoLLClientThread.start(); - } - } - - void syncWinBoLLClientThreadStatus() { - mWinBoLLClientServiceBean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(this); - mIsEnableService = mWinBoLLClientServiceBean.isEnable(); - LogUtils.d(TAG, String.format("mIsEnableService %s", mIsEnableService)); - } - - - // 唤醒和绑定守护进程 - // - void wakeupAndBindAssistant() { - if (ServiceUtils.isServiceRunning(getApplicationContext(), AssistantService.class.getName()) == false) { - startService(new Intent(WinBoLLClientService.this, AssistantService.class)); - //LogUtils.d(TAG, "call wakeupAndBindAssistant() : Binding... AssistantService"); - bindService(new Intent(WinBoLLClientService.this, AssistantService.class), mMyServiceConnection, Context.BIND_IMPORTANT); - } - } - - // 主进程与守护进程连接时需要用到此类 - // - private class MyServiceConnection implements ServiceConnection { - @Override - public void onServiceConnected(ComponentName name, IBinder service) { - - } - - @Override - public void onServiceDisconnected(ComponentName name) { - mWinBoLLClientServiceBean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(WinBoLLClientService.this); - if (mWinBoLLClientServiceBean.isEnable()) { - // 唤醒守护进程 - wakeupAndBindAssistant(); - } - } - } - - @Override - public void onDestroy() { - super.onDestroy(); - //ToastUtils.show("onDestroy"); - } - - @Override - public void onStart(Intent intent, int startId) { - super.onStart(intent, startId); - } - - void setWinBoLLServiceEnableStatus(boolean isEnable) { - WinBoLLClientServiceBean bean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(this); - bean.setIsEnable(isEnable); - WinBoLLClientServiceBean.saveWinBoLLServiceBean(this, bean); - } - - boolean getWinBoLLServiceEnableStatus(Context context) { - mWinBoLLClientServiceBean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(context); - return mWinBoLLClientServiceBean.isEnable(); - } - - /*public interface OnServiceStatusChangeListener { - void onServerStatusChange(boolean isServiceAlive); - } - - public void setOnServerStatusChangeListener(OnServiceStatusChangeListener l) { - mOnServerStatusChangeListener = l; - }*/ - - class WinBoLLClientThread extends Thread { - @Override - public void run() { - super.run(); - LogUtils.d(TAG, "run syncWinBoLLClientThreadStatus"); - syncWinBoLLClientThreadStatus(); - if (mIsEnableService) { - if (mIsWinBoLLClientThreadRunning == false) { - // 设置运行状态 - mIsWinBoLLClientThreadRunning = true; - LogUtils.d(TAG, "WinBoLLClientThread run()"); - - // 唤醒守护进程 - //wakeupAndBindAssistant(); - - while (mIsEnableService) { - // 显示运行状态 - WinBoLLServiceStatusView.startConnection(); - LogUtils.d(TAG, String.format("while mIsEnableService is %s", mIsEnableService)); - - try { - Thread.sleep(10 * 1000); - } catch (InterruptedException e) { - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - syncWinBoLLClientThreadStatus(); - } - - // 服务进程退出, 重置进程运行状态 - WinBoLLServiceStatusView.stopConnection(); - mIsWinBoLLClientThreadRunning = false; - mWinBoLLClientThread = null; - } - } - } - } -} + +} \ No newline at end of file diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLMail.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLMail.java deleted file mode 100644 index 6f49c90..0000000 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLMail.java +++ /dev/null @@ -1,22 +0,0 @@ -package cc.winboll.studio.libaes.winboll; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 19:13:20 - * @Describe WinBoLL 邮件服务 - */ -import android.app.Service; -import android.content.Intent; -import android.os.IBinder; - -public class WinBoLLMail extends Service { - - public static final String TAG = "WinBoLLMail"; - - @Override - public IBinder onBind(Intent intent) { - - return null; - } - -} diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServerConnectionThread.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServerConnectionThread.java deleted file mode 100644 index 5e3e833..0000000 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServerConnectionThread.java +++ /dev/null @@ -1,106 +0,0 @@ -package cc.winboll.studio.libaes.winboll; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/29 15:57:28 - * @Describe WinBoLL 服务器服务情况测试访问进程。 - */ -import cc.winboll.studio.libappbase.LogUtils; -import java.io.IOException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Credentials; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; - -// 新增自定义回调接口 -interface TextCallback { - void onSuccess(String text); - void onFailure(Exception e); -} - -public class WinBoLLServerConnectionThread extends Thread { - - public static final String TAG = "WinBoLLClientService"; - - private final String url; - private final String username; - private final String password; - private final int connectTimeout; - private final int readTimeout; - private final int maxRetries; - private final TextCallback callback; // 新增回调成员变量 - - // 新增带回调的构造函数 - public WinBoLLServerConnectionThread(String url, String username, String password, TextCallback callback) { - this(url, username, password, 10000, 10000, 5, callback); - } - - // 修改原有构造函数,添加回调参数 - public WinBoLLServerConnectionThread(String url, String username, String password, - int connectTimeout, int readTimeout, int maxRetries, TextCallback callback) { - this.url = url; - this.username = username; - this.password = password; - this.connectTimeout = connectTimeout; - this.readTimeout = readTimeout; - this.maxRetries = maxRetries; - this.callback = callback; - } - - @Override - public void run() { - LogUtils.d(TAG, String.format("run() url %s\nusername %s\npassword %s", url, username, password)); - String credential = Credentials.basic(username, password); - LogUtils.d(TAG, String.format("credential %s", credential)); - - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder() - .url(url) - .header("Accept", "text/plain") - .header("Authorization", credential) - .build(); - - Call call = client.newCall(request); - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - // 优先调用自定义回调 - if (callback != null) { - callback.onFailure(e); - } else { - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - if (!response.isSuccessful()) { - if (callback != null) { - callback.onFailure(new Exception("Unexpected code " + response)); - } else { - LogUtils.d(TAG, "Unexpected code " + response, Thread.currentThread().getStackTrace()); - } - return; - } - - try { - String text = response.body().string(); - // 优先调用自定义回调 - if (callback != null) { - callback.onSuccess(text); - } else { - LogUtils.d(TAG, text); - } - } catch (Exception e) { - if (callback != null) { - callback.onFailure(e); - } else { - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - } - } - }); - } -} diff --git a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServiceStatusView.java b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServiceStatusView.java index f91acc9..14a56e2 100644 --- a/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServiceStatusView.java +++ b/libaes/src/main/java/cc/winboll/studio/libaes/winboll/WinBoLLServiceStatusView.java @@ -1,473 +1,38 @@ package cc.winboll.studio.libaes.winboll; +import android.content.Context; +import android.util.AttributeSet; +import android.widget.LinearLayout; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/28 17:41:55 - * @Describe WinBoLL 服务主机连接状态视图 + * @Author ZhanGSKen + * @Date 2025/05/03 19:14 */ -import cc.winboll.studio.libaes.R; -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.ServiceConnection; -import android.graphics.drawable.Drawable; -import android.os.Handler; -import android.os.IBinder; -import android.os.Message; -import android.util.AttributeSet; -import android.view.View; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; -import cc.winboll.studio.libaes.winboll.WinBoLLClientService; -import cc.winboll.studio.libappbase.GlobalApplication; -import cc.winboll.studio.libappbase.LogUtils; -import cc.winboll.studio.libapputils.utils.PrefUtils; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -//import okhttp3.Authenticator; -//import okhttp3.Credentials; -//import okhttp3.OkHttpClient; -//import okhttp3.Request; -//import okhttp3.Response; -//import okhttp3.Route; - public class WinBoLLServiceStatusView extends LinearLayout { - + public static final String TAG = "WinBoLLServiceStatusView"; - - public static final int MSG_CONNECTION_INFO = 0; - public static final int MSG_UPDATE_CONNECTION_STATUS = 1; - - static WinBoLLServiceStatusView _WinBoLLServiceStatusView; - Context mContext; - //boolean mIsConnected; - volatile ConnectionThread mConnectionThread; - - String mszServerHost; - WinBoLLClientService mWinBoLLService; - ImageView mImageView; - TextView mTextView; - WinBoLLServiceViewHandler mWinBoLLServiceViewHandler; - //WebView mWebView; - static volatile ConnectionStatus mConnectionStatus; - View.OnClickListener mViewOnClickListener; - static String _mUserName; - static String _mPassword; - - static enum ConnectionStatus { - DISCONNECTED, - START_CONNECT, - CONNECTING, - CONNECTED; - }; - - boolean isBound = false; - ServiceConnection connection = new ServiceConnection() { - @Override - public void onServiceConnected(ComponentName name, IBinder service) { - IWinBoLLClientServiceBinder binder = (IWinBoLLClientServiceBinder) service; - mWinBoLLService = binder.getService(); - isBound = true; - // 可以在这里调用Service的方法进行通信,比如获取数据 - mImageView.setBackgroundDrawable(mWinBoLLService.getCurrentStatusIconDrawable()); - } - - @Override - public void onServiceDisconnected(ComponentName name) { - isBound = false; - } - }; - + public WinBoLLServiceStatusView(Context context) { super(context); - mContext = context; - initView(); } public WinBoLLServiceStatusView(Context context, AttributeSet attrs) { super(context, attrs); - mContext = context; - initView(); } public WinBoLLServiceStatusView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - mContext = context; - initView(); } public WinBoLLServiceStatusView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); - mContext = context; - initView(); } - - ConnectionStatus getConnectionStatus() { - return false ? - ConnectionStatus.CONNECTED - : ConnectionStatus.DISCONNECTED; - } - - void initView() { - _WinBoLLServiceStatusView = this; - - mImageView = new ImageView(mContext); - setImageViewByConnection(mImageView, false); - mConnectionStatus = getConnectionStatus(); - //mIsConnected = false; - //mWinBoLLServerHostConnectionStatus = WinBoLLServerHostConnectionStatus.DISCONNECTED; - //ToastUtils.show("initView()"); - - mViewOnClickListener = new View.OnClickListener(){ - @Override - public void onClick(View v) { - LogUtils.d(TAG, "onClick()"); - if (mConnectionStatus == ConnectionStatus.CONNECTED) { - LogUtils.d(TAG, "Click to stop service."); - WinBoLLClientServiceBean bean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(mContext); - bean.setIsEnable(false); - WinBoLLClientServiceBean.saveBean(mContext, bean); - Intent intent = new Intent(mContext, WinBoLLClientService.class); - mContext.stopService(intent); - //stopConnectionThread(); - mTextView.setText(""); - setImageViewByConnection(mImageView, false); - mConnectionStatus = ConnectionStatus.DISCONNECTED; - } else if (mConnectionStatus == ConnectionStatus.DISCONNECTED) { - LogUtils.d(TAG, "Click to start service."); - WinBoLLClientServiceBean bean = WinBoLLClientServiceBean.loadWinBoLLClientServiceBean(mContext); - bean.setIsEnable(true); - WinBoLLClientServiceBean.saveBean(mContext, bean); - Intent intent = new Intent(mContext, WinBoLLClientService.class); - mContext.startService(intent); - //startConnectionThread(); - } - } - }; - setOnClickListener(mViewOnClickListener); - addView(mImageView); - mTextView = new TextView(mContext); - mWinBoLLServiceViewHandler = new WinBoLLServiceViewHandler(this); - addView(mTextView); - /*mWebView = new WebView(mContext); - mWebView.setWebViewClient(new WebViewClient() { - @Override - public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { - // 弹出系统基本HTTP验证窗口 - handler.proceed("username", "password"); - } - }); - addView(mWebView);*/ - } - - void checkWinBoLLServerStatusAndUpdateCurrentView() { - LogUtils.d(TAG, "checkWinBoLLServerStatusAndUpdateCurrentView()"); - /*if (getConnectionStatus() == ConnectionStatus.CONNECTED) { - mConnectionStatus = ConnectionStatus.CONNECTED; - } else { - mConnectionStatus = ConnectionStatus.DISCONNECTED; - }*/ - } - - public void setServerHost(String szWinBoLLServerHost) { - mszServerHost = szWinBoLLServerHost; - } - - public void setAuthInfo(String username, String password) { - _mUserName = username; - _mPassword = password; - } - - void setImageViewByConnection(ImageView imageView, boolean isConnected) { - //mIsConnected = isConnected; - // 获取vector drawable - Drawable drawable = mContext.getDrawable(isConnected ? R.drawable.ic_dev_connected : R.drawable.ic_dev_disconnected); - if (drawable != null) { - imageView.setImageDrawable(drawable); - } - } - - TextCallback apiTextCallback = new TextCallback() { - @Override - public void onSuccess(String text) { - // 处理成功响应 - LogUtils.d(TAG, text); - } - - @Override - public void onFailure(Exception e) { - // 处理失败情况 - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - }; - - TextCallback cipTextCallback = new TextCallback() { - @Override - public void onSuccess(String text) { - // 处理成功响应 - LogUtils.d(TAG, text); - LogUtils.d(TAG, "Develop Host Connection IP is : " + text); - mConnectionStatus = ConnectionStatus.CONNECTED; - // 获取当前时间 - LocalDateTime now = LocalDateTime.now(); - // 定义时间格式 - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); - // 按照指定格式格式化时间并输出 - String formattedDateTime = now.format(formatter); - String msg = "ClientIP<" + formattedDateTime + ">: " + text; - mWinBoLLServiceViewHandler.postMessageText(msg); - mWinBoLLServiceViewHandler.postMessageConnectionStatus(true); - - } - - @Override - public void onFailure(Exception e) { - // 处理失败情况 - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - // 处理网络请求失败 - setImageViewByConnection(mImageView, false); - mWinBoLLServiceViewHandler.postMessageText(e.getMessage()); - mWinBoLLServiceViewHandler.postMessageConnectionStatus(false); - } - }; - - public void requestAPIWithBasicAuth() { - String targetUrl = "https://" + (GlobalApplication.isDebuging() ?"dev.winboll": "winboll") + ".cc/api/"; // 替换为实际测试的URL - requestWithBasicAuth(targetUrl, apiTextCallback); - } - - public void requestCIPWithBasicAuth() { - String targetUrl = mszServerHost + "/cip/?simple=true"; - requestWithBasicAuth(targetUrl, cipTextCallback); - } - - public void requestWithBasicAuth(String targetUrl, TextCallback callback) { - String username = ""; - String password = ""; - if (GlobalApplication.isDebuging()) { - username = PrefUtils.getString(mContext, "metDevUserName", ""); - password = PrefUtils.getString(mContext, "metDevUserPassword", ""); - } else { - username = "WinBoLL"; - password = "WinBoLLPowerByZhanGSKen"; - } + + + void setServerHost(String szWinBoLLServerHost) { - LogUtils.d(TAG, String.format("Connection Start. targetUrl %s", targetUrl)); - WinBoLLServerConnectionThread thread = new WinBoLLServerConnectionThread( - targetUrl, - username, - password, - cipTextCallback - ); - thread.start(); } - - /*void requestWithBasicAuth(final WinBoLLServiceViewHandler textViewHandler, String targetUrl, final String username, final String password) { - // 用户名和密码,替换为实际的认证信息 - //String username = "your_username"; - //String password = "your_password"; - LogUtils.d(TAG, "requestWithBasicAuth(...)"); - LogUtils.d(TAG, String.format("targetUrl %s", targetUrl)); - - // 构建包含认证信息的请求 - String credential = Credentials.basic(username, password); - LogUtils.d(TAG, String.format("credential %s", credential)); - - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder() - .url(targetUrl) - .header("Accept", "text/plain") // 设置正确的Content-Type头 - .header("Authorization", credential) - .build(); - - Call call = client.newCall(request); - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - // 处理网络请求失败 - setImageViewByConnection(mImageView, false); - textViewHandler.postMessageText(e.getMessage()); - textViewHandler.postMessageConnectionStatus(false); - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - //String sz = "请求失败,状态码: " + response.code(); - //setImageViewByConnection(mImageView, false); - //LogUtils.d(TAG, sz); - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - if (!response.isSuccessful()) { - setImageViewByConnection(mImageView, false); - textViewHandler.postMessageText("Unexpected code " + response); - textViewHandler.postMessageConnectionStatus(false); - LogUtils.d(TAG, "Unexpected code " + response, Thread.currentThread().getStackTrace()); - return; - } - - try { - // 读取响应体作为字符串,注意这里可能需要解码 - String text = response.body().string(); - LogUtils.d(TAG, "Develop Host Connection IP is : " + text); - mConnectionStatus = ConnectionStatus.CONNECTED; - // 获取当前时间 - LocalDateTime now = LocalDateTime.now(); - // 定义时间格式 - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); - // 按照指定格式格式化时间并输出 - String formattedDateTime = now.format(formatter); - textViewHandler.postMessageText("ClientIP<" + formattedDateTime + ">: " + text); - textViewHandler.postMessageConnectionStatus(true); - - //org.jsoup.nodes.Document doc = org.jsoup.Jsoup.parse(text); - //LogUtils.d(TAG, doc.text()); - - // 使用id选择器找到具有特定id的元素 - //org.jsoup.nodes.Element elementWithId = doc.select("#LastRelease").first(); // 获取第一个匹配的元素 - - // 提取并打印元素的文本内容 - //mszNewestAppPackageName = elementWithId.text(); - //ToastUtils.delayedShow(text + "\n" + mszNewestAppPackageName, 5000); - - //mHandler.sendMessage(mHandler.obtainMessage(MSG_APPUPDATE_CHECKED)); - //System.out.println(response.body().string()); - // mConnectionStatus = ConnectionStatus.CONNECTED; - // // 获取当前时间 - // LocalDateTime now = LocalDateTime.now(); - // - // // 定义时间格式 - // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); - // // 按照指定格式格式化时间并输出 - // String formattedDateTime = now.format(formatter); - // //System.out.println(formattedDateTime); - // textViewHandler.postMessageText("ClientIP<" + formattedDateTime + ">: " + response.body().string()); - // textViewHandler.postMessageConnectionStatus(true); - } catch (Exception e) { - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - } - }); - - }*/ - - class WinBoLLServiceViewHandler extends Handler { - WinBoLLServiceStatusView mDevelopHostConnectionStatusView; - - public WinBoLLServiceViewHandler(WinBoLLServiceStatusView view) { - mDevelopHostConnectionStatusView = view; - } - - @Override - public void handleMessage(Message msg) { - if (msg.what == MSG_CONNECTION_INFO) { - mDevelopHostConnectionStatusView.mTextView.setText((String)msg.obj); - } else if (msg.what == MSG_UPDATE_CONNECTION_STATUS) { - mDevelopHostConnectionStatusView.setImageViewByConnection(mImageView, (boolean)msg.obj); - mDevelopHostConnectionStatusView.mConnectionStatus = ((boolean)msg.obj) ? ConnectionStatus.CONNECTED : ConnectionStatus.DISCONNECTED; - } - super.handleMessage(msg); - } - - void postMessageText(String szMSG) { - Message msg = new Message(); - msg.what = MSG_CONNECTION_INFO; - msg.obj = szMSG; - sendMessage(msg); - } - - void postMessageConnectionStatus(boolean isConnected) { - Message msg = new Message(); - msg.what = MSG_UPDATE_CONNECTION_STATUS; - msg.obj = isConnected; - sendMessage(msg); - } + + void setAuthInfo(String szDevUserName, String szDevUserPassword) { + } - - public static void startConnection() { - if (_WinBoLLServiceStatusView != null) { - _WinBoLLServiceStatusView.startConnectionThread(); - } - } - - public static void stopConnection() { - if (_WinBoLLServiceStatusView != null) { - _WinBoLLServiceStatusView.stopConnectionThread(); - } - } - - void startConnectionThread() { - if (mConnectionStatus == ConnectionStatus.DISCONNECTED) { - mConnectionStatus = ConnectionStatus.START_CONNECT; - LogUtils.d(TAG, "startConnectionThread"); - if (mConnectionThread != null) { - LogUtils.d(TAG, "mConnectionThread != null"); - mConnectionThread.mIsExist = true; - } - mConnectionThread = new ConnectionThread(); - mConnectionThread.start(); - } else if (mConnectionStatus == ConnectionStatus.CONNECTING) { - //LogUtils.d(TAG, "mConnectionStatus == ConnectionStatus.CONNECTING"); - } else if (mConnectionStatus == ConnectionStatus.CONNECTED) { - //LogUtils.d(TAG, "mConnectionStatus == ConnectionStatus.CONNECTED"); - } else { - LogUtils.d(TAG, String.format("Unknow mConnectionStatus %s, can not start ConnectionThread.", mConnectionStatus)); - } - } - - void stopConnectionThread() { - LogUtils.d(TAG, "stopConnectionThread"); - if (mConnectionThread != null) { - LogUtils.d(TAG, "mConnectionThread != null"); - mConnectionThread.mIsExist = true; - mConnectionThread = null; - } - } - - - - class ConnectionThread extends Thread { - - public volatile boolean mIsExist; - - //DevelopHostConnectionStatusViewHandler mDevelopHostConnectionStatusViewHandler; - - //public ConnectionThread(DevelopHostConnectionStatusViewHandler developHostConnectionStatusViewHandler) { - //mDevelopHostConnectionStatusViewHandler = developHostConnectionStatusViewHandler; - //} - public ConnectionThread() { - mIsExist = false; - } - - @Override - public void run() { - super.run(); - while (mIsExist == false) { - if (mConnectionStatus == ConnectionStatus.START_CONNECT) { - mConnectionStatus = ConnectionStatus.CONNECTING; - //requestAPIWithBasicAuth(); - requestCIPWithBasicAuth(); - } else if (mConnectionStatus == ConnectionStatus.CONNECTED - || mConnectionStatus == ConnectionStatus.DISCONNECTED) { - //ToastUtils.show("mWinBoLLServerHostConnectionStatus " + mConnectionStatus); - LogUtils.d(TAG, String.format("mConnectionStatus done %s", mConnectionStatus)); - } else { - LogUtils.d(TAG, String.format("mConnectionStatus unknow %s", mConnectionStatus)); - } - - try { - Thread.sleep(5 * 1000); - } catch (InterruptedException e) { - LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); - } - } - //ToastUtils.show("ConnectionThread exit."); - LogUtils.d(TAG, "ConnectionThread exit."); - } - } - - /*WinBoLLService.OnServiceStatusChangeListener mOnServerStatusChangeListener = new WinBoLLService.OnServiceStatusChangeListener(){ - @Override - public void onServerStatusChange(boolean isServiceAlive) { - } - };*/ } diff --git a/libappbase/build.properties b/libappbase/build.properties index faa715a..e9770c4 100644 --- a/libappbase/build.properties +++ b/libappbase/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 29 14:47:16 HKT 2025 -stageCount=7 +#Tue May 13 11:05:02 HKT 2025 +stageCount=1 libraryProject=libappbase -baseVersion=15.7 -publishVersion=15.7.6 +baseVersion=15.8 +publishVersion=15.8.0 buildCount=0 -baseBetaVersion=15.7.7 +baseBetaVersion=15.8.1 diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/AppUtils.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/AppUtils.java index 37f8546..1a0ceba 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/AppUtils.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/AppUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/15 20:05:03 * @Describe AppUtils */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/BaseBean.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/BaseBean.java index 5fd8243..82505d8 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/BaseBean.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/BaseBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/15 11:11:52 * @Describe Json Bean 基础类。 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/CrashHandler.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/CrashHandler.java index 5bfb740..9baedc9 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/CrashHandler.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/CrashHandler.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:22:12 * @Describe 异常处理类 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalApplication.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalApplication.java index f00b139..428dd92 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalApplication.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalApplication.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/05 10:10:23 * @Describe 全局应用类 */ @@ -9,11 +9,11 @@ import android.app.Application; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; -import android.os.Handler; -import android.os.Looper; +import cc.winboll.studio.libappbase.GlobalApplication; +import cc.winboll.studio.libappbase.models.APPModel; import cc.winboll.studio.libappbase.utils.ToastUtils; -import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager; import cc.winboll.studio.libappbase.winboll.MyActivityLifecycleCallbacks; +import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager; public class GlobalApplication extends Application { @@ -30,7 +30,7 @@ public class GlobalApplication extends Application { public static void saveDebugStatus() { if (_GlobalApplication != null) { - APPBaseModel.saveBeanToFile(getAPPBaseModelFilePath(), new APPBaseModel(GlobalApplication.isDebuging)); + APPModel.saveBeanToFile(getAPPModelFilePath(), new APPModel(GlobalApplication.isDebuging)); } } @@ -38,8 +38,8 @@ public class GlobalApplication extends Application { return _GlobalApplication; } - static String getAPPBaseModelFilePath() { - return _GlobalApplication.getDataDir().getPath() + "/APPBaseModel.json"; + static String getAPPModelFilePath() { + return _GlobalApplication.getDataDir().getPath() + "/APPModel.json"; } public static boolean isDebuging() { @@ -69,12 +69,12 @@ public class GlobalApplication extends Application { ToastUtils.init(this); // 应用保存的调试标志 - APPBaseModel appBaseModel = APPBaseModel.loadBeanFromFile(getAPPBaseModelFilePath(), APPBaseModel.class); - if (appBaseModel == null) { + APPModel appModel = APPModel.loadBeanFromFile(getAPPModelFilePath(), APPModel.class); + if (appModel == null) { setIsDebuging(false); saveDebugStatus(); } else { - setIsDebuging(appBaseModel.isDebuging()); + setIsDebuging(appModel.isDebuging()); } getWinBoLLActivityManager().setWinBoLLUI_TYPE(WinBoLLActivityManager.WinBoLLUI_TYPE.Service); diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashActivity.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashActivity.java index 0509ac9..ff926a5 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashActivity.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/11 00:14:05 */ import android.app.Activity; diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashReportView.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashReportView.java index 5ae634f..1fa8afa 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashReportView.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/GlobalCrashReportView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/11 20:18:30 * @Describe 应用崩溃报告视图 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtils.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtils.java index e3524d5..7d11bca 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtils.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:44:06 * @Describe LogUtils * @Describe 应用日志类 diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsBean.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsBean.java index 6cc415d..ce73245 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsBean.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/23 15:39:07 * @Describe LogUtils 数据配置类。 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsClassTAGBean.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsClassTAGBean.java index d3d4505..bd79833 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsClassTAGBean.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogUtilsClassTAGBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/04 14:17:02 * @Describe 日志类class TAG 标签数据类 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogView.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogView.java index 345489f..c37f385 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogView.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:36:18 * @Describe 日志视图类,继承 RelativeLayout 类。 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogViewThread.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogViewThread.java index 00d06b2..3e992aa 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/LogViewThread.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/LogViewThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:43:50 * @Describe 日志视图线程类 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/UTF8FileUtils.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/UTF8FileUtils.java index ae6dfea..7a86d72 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/UTF8FileUtils.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/UTF8FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe UTF-8编码文件工具类 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/dialogs/YesNoAlertDialog.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/dialogs/YesNoAlertDialog.java index 84446d7..51facb9 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/dialogs/YesNoAlertDialog.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/dialogs/YesNoAlertDialog.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.dialogs; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/28 17:40:47 * @Date 2024/08/12 14:46:25 * @Describe 询问用户确定与否的选择框 diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/APPBaseModel.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/APPModel.java similarity index 81% rename from libappbase/src/main/java/cc/winboll/studio/libappbase/APPBaseModel.java rename to libappbase/src/main/java/cc/winboll/studio/libappbase/models/APPModel.java index a71f1d1..84b93d8 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/APPBaseModel.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/APPModel.java @@ -1,28 +1,28 @@ -package cc.winboll.studio.libappbase; +package cc.winboll.studio.libappbase.models; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/25 02:52:46 - * @Describe 基础应用数据模型 + * @Author ZhanGSKen + * @Date 2025/03/02 10:28:08 + * @Describe 应用调试模型 */ import android.util.JsonReader; import android.util.JsonWriter; import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; -public class APPBaseModel extends BaseBean { +public class APPModel extends BaseBean { - public static final String TAG = "APPBaseModel"; + public static final String TAG = "APPModel"; // 应用是否处于正在调试状态 // boolean isDebuging = false; - public APPBaseModel() { + public APPModel() { this.isDebuging = false; } - public APPBaseModel(boolean isDebuging) { + public APPModel(boolean isDebuging) { this.isDebuging = isDebuging; } @@ -36,7 +36,7 @@ public class APPBaseModel extends BaseBean { @Override public String getName() { - return APPBaseModel.class.getName(); + return APPModel.class.getName(); } @Override diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/APPModel.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLModel.java similarity index 79% rename from libappbase/src/main/java/cc/winboll/studio/libappbase/sos/APPModel.java rename to libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLModel.java index 5a3543f..d5d71b0 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/APPModel.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLModel.java @@ -1,28 +1,33 @@ -package cc.winboll.studio.libappbase.sos; +package cc.winboll.studio.libappbase.models; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/02 10:28:08 - * @Describe APPModel + * @Author ZhanGSKen + * @Date 2025/05/10 10:16 + * @Describe WinBoLLModel */ import android.util.JsonReader; import android.util.JsonWriter; import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; -public class APPModel extends BaseBean { - - public static final String TAG = "APPModel"; - +public class WinBoLLModel extends BaseBean { + + public static final String TAG = "WinBoLLModel"; + String appPackageName; String appMainServiveName; - public APPModel() { + public WinBoLLModel() { this.appPackageName = ""; this.appMainServiveName = ""; } - public APPModel(String appPackageName, String appMainServiveName) { + public WinBoLLModel(boolean isDebuging, String appPackageName, String appMainServiveName) { + this.appPackageName = appPackageName; + this.appMainServiveName = appMainServiveName; + } + + public WinBoLLModel(String appPackageName, String appMainServiveName) { this.appPackageName = appPackageName; this.appMainServiveName = appMainServiveName; } @@ -53,7 +58,6 @@ public class APPModel extends BaseBean { super.writeThisToJsonWriter(jsonWriter); jsonWriter.name("appPackageName").value(getAppPackageName()); jsonWriter.name("appMainServiveName").value(getAppMainServiveName()); - } @Override @@ -84,3 +88,4 @@ public class APPModel extends BaseBean { return this; } } + diff --git a/appbase/src/main/java/cc/winboll/studio/appbase/models/WinBoLLNewsBean.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLNewsBean.java similarity index 90% rename from appbase/src/main/java/cc/winboll/studio/appbase/models/WinBoLLNewsBean.java rename to libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLNewsBean.java index 8d70a3a..56cbd80 100644 --- a/appbase/src/main/java/cc/winboll/studio/appbase/models/WinBoLLNewsBean.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/models/WinBoLLNewsBean.java @@ -1,20 +1,19 @@ -package cc.winboll.studio.appbase.models; - -/** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/02/17 10:05:09 - * @Describe APPSOSReportBean - */ +package cc.winboll.studio.libappbase.models; import android.util.JsonReader; import android.util.JsonWriter; import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; +/** + * @Author ZhanGSKen + * @Date 2025/05/10 09:36 + * @Describe WinBoLL 应用消息数据模型 + */ public class WinBoLLNewsBean extends BaseBean { public static final String TAG = "WinBoLLNewsBean"; - protected String message; + String message; public WinBoLLNewsBean() { this.message = ""; @@ -41,7 +40,6 @@ public class WinBoLLNewsBean extends BaseBean { public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException { super.writeThisToJsonWriter(jsonWriter); jsonWriter.name("message").value(getMessage()); - } @Override diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/receiver/MyBroadcastReceiver.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/receiver/MyBroadcastReceiver.java index cad96e3..620734c 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/receiver/MyBroadcastReceiver.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/receiver/MyBroadcastReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.receiver; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 21:19:09 * @Describe MyBroadcastReceiver */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOS.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOS.java index b6b8852..c64a2e6 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOS.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOS.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.sos; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 09:36:29 * @Describe WinBoLL 应用 SOS 机理保护类 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterService.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterService.java index d76b036..d98f1d5 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterService.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.sos; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/27 14:00:21 * @Describe Simple Operate Signal Service Center. * 简单操作信号服务中心 diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceModel.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceModel.java index 095248d..131769e 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceModel.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceModel.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.sos; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/02 09:49:45 * @Describe SOSCenterServiceModel * Simple Operate Signal Service Model. diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceReceiver.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceReceiver.java index 4464a0c..ca1765b 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceReceiver.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSCenterServiceReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.sos; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/27 14:04:35 * @Describe SOSCenterServiceReceiver */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSObject.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSObject.java index 8d309db..7465b24 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSObject.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/SOSObject.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.sos; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/27 14:12:05 * @Describe SOSBean */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ServiceUtils.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ServiceUtils.java index 047ec8a..5006999 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ServiceUtils.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ServiceUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 19:38:20 * @Describe 服务工具集 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ToastUtils.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ToastUtils.java index 476a20a..83ff87f 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ToastUtils.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/utils/ToastUtils.java @@ -3,7 +3,7 @@ import android.content.Context; import android.widget.Toast; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/12 12:02:31 */ public class ToastUtils { diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/views/HorizontalListView.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/views/HorizontalListView.java index 083b3a4..16f28dd 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/views/HorizontalListView.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/views/HorizontalListView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.views; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/12 12:29:01 * @Describe 水平布局的 ListView */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidget.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidget.java index 0219949..3323df6 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidget.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidget.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 20:32:12 */ import android.app.PendingIntent; diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidgetClickListener.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidgetClickListener.java index 19ceed3..a4fdc38 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidgetClickListener.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/widgets/StatusWidgetClickListener.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 20:33:53 * @Describe APPWidgetClickListener */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/IWinBoLLActivity.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/IWinBoLLActivity.java index 4bed92a..a1e8c83 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/IWinBoLLActivity.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/IWinBoLLActivity.java @@ -1,18 +1,17 @@ package cc.winboll.studio.libappbase.winboll; +import android.app.Activity; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/24 08:23:40 - * @Describe WinBoLL 活动窗口通用接口 + * @Author ZhanGSKen + * @Date 2025/05/10 09:34 + * @Describe WinBoLL 窗口操作接口 */ -import android.app.Activity; -import android.widget.Toolbar; - -public interface IWinBoLLActivity { +public abstract interface IWinBoLLActivity { public static final String TAG = "IWinBoLLActivity"; - // 获取活动窗口 - abstract public Activity getActivity(); - abstract public String getTag(); + public static final String ACTION_BIND = IWinBoLLActivity.class.getName() + ".ACTION_BIND"; + + public Activity getActivity(); + public String getTag(); } diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/LogActivity.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/LogActivity.java index 09d5407..7c48c10 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/LogActivity.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/LogActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 20:34:47 * @Describe 应用日志窗口 */ diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/MyActivityLifecycleCallbacks.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/MyActivityLifecycleCallbacks.java index 774ab8b..2990cc0 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/MyActivityLifecycleCallbacks.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/MyActivityLifecycleCallbacks.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libappbase.winboll; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 04:29:19 */ import android.app.Activity; diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/WinBoLL.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLL.java similarity index 77% rename from libappbase/src/main/java/cc/winboll/studio/libappbase/sos/WinBoLL.java rename to libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLL.java index 080c7e0..b0ee734 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/sos/WinBoLL.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLL.java @@ -1,20 +1,21 @@ -package cc.winboll.studio.libappbase.sos; +package cc.winboll.studio.libappbase.winboll; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/02 09:54:28 + * @Author ZhanGSKen + * @Date 2025/05/10 10:13 * @Describe WinBoLL 系列应用通用管理类 */ import android.content.Context; import android.content.Intent; import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.models.WinBoLLModel; public class WinBoLL { public static final String TAG = "WinBoLL"; public static final String ACTION_BIND = WinBoLL.class.getName() + ".ACTION_BIND"; - public static final String EXTRA_APPMODEL = "EXTRA_APPMODEL"; + public static final String EXTRA_WINBOLLMODEL = "EXTRA_WINBOLLMODEL"; public static void bindToAPPBase(Context context, String appMainService) { LogUtils.d(TAG, "bindToAPPBase(...)"); @@ -30,7 +31,7 @@ public class WinBoLL { static void startBind(Context context, String toPackage, String appMainService) { Intent intent = new Intent(ACTION_BIND); - intent.putExtra(EXTRA_APPMODEL, (new APPModel(toPackage, appMainService)).toString()); + intent.putExtra(EXTRA_WINBOLLMODEL, (new WinBoLLModel(toPackage, appMainService)).toString()); intent.setPackage(toPackage); LogUtils.d(TAG, String.format("ACTION_BIND :\nTo Package : %s\nAPP Main Service : %s", toPackage, appMainService)); context.sendBroadcast(intent); diff --git a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLLActivityManager.java b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLLActivityManager.java index 013ee8f..c38b9e1 100644 --- a/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLLActivityManager.java +++ b/libappbase/src/main/java/cc/winboll/studio/libappbase/winboll/WinBoLLActivityManager.java @@ -1,13 +1,14 @@ package cc.winboll.studio.libappbase.winboll; /** - * @Author ZhanGSKen@AliYun.Com - * @Date 2025/03/24 08:25:43 + * @Author ZhanGSKen + * @Date 2025/05/10 10:02 * @Describe 应用活动窗口管理器 * 参考 : * android 类似微信小程序多任务窗口 及 设置 TaskDescription 修改 icon 和 label * https://blog.csdn.net/qq_29364417/article/details/109379915?app_version=6.4.2&code=app_1562916241&csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22109379915%22%2C%22source%22%3A%22weixin_38986226%22%7D&uLinkId=usr1mkqgl919blen&utm_source=app */ +import android.app.Activity; import android.app.ActivityManager; import android.app.TaskStackBuilder; import android.content.Context; @@ -21,97 +22,69 @@ import java.util.Map; public class WinBoLLActivityManager { - public static final String TAG = "WinBoLLActivityManager"; - public static final String EXTRA_TAG = "EXTRA_TAG"; + public static final String TAG = "IWinBoLLActivityManager"; - public static enum WinBoLLUI_TYPE { - Aplication, // 退出应用后,保持最近任务栏任务记录主窗口 - Service // 退出应用后,清理所有最近任务栏任务记录窗口 - }; - // 应用类型标志 - static volatile WinBoLLUI_TYPE _mWinBoLLUI_TYPE = WinBoLLUI_TYPE.Service; + public enum WinBoLLUI_TYPE { Aplication, Service } - GlobalApplication mGlobalApplication; - static volatile WinBoLLActivityManager _Instance; - static volatile Map _mapIWinBoLLList; - volatile IWinBoLLActivity mFirstIWinBoLLActivity; + Context mContext; + volatile static WinBoLLActivityManager _mIWinBoLLActivityManager; + Map mActivityListMap; - WinBoLLActivityManager(GlobalApplication application) { - mGlobalApplication = application; - _mapIWinBoLLList = new HashMap(); + volatile static WinBoLLUI_TYPE _WinBoLLUI_TYPE = WinBoLLUI_TYPE.Service; + public static void setWinBoLLUI_TYPE(WinBoLLUI_TYPE winBoLLUI_TYPE) { + _WinBoLLUI_TYPE = winBoLLUI_TYPE; } - public static synchronized WinBoLLActivityManager getInstance(GlobalApplication application) { - LogUtils.d(TAG, "getInstance"); - if (_Instance == null) { - LogUtils.d(TAG, "_Instance == null"); - _Instance = new WinBoLLActivityManager(application); + public static WinBoLLUI_TYPE getWinBoLLUI_TYPE() { + return _WinBoLLUI_TYPE; + } + WinBoLLActivityManager(Context context) { + mContext = context; + mActivityListMap = new HashMap(); + } + + public static synchronized WinBoLLActivityManager getInstance(Context context) { + if (_mIWinBoLLActivityManager == null) { + _mIWinBoLLActivityManager = new WinBoLLActivityManager(context); } - return _Instance; + return _mIWinBoLLActivityManager; } - // - // 设置 WinBoLL 应用 UI 类型 - // - public synchronized static void setWinBoLLUI_TYPE(WinBoLLUI_TYPE mWinBoLLUI_TYPE) { - _mWinBoLLUI_TYPE = mWinBoLLUI_TYPE; - } - - // - // 获取 WinBoLL 应用 UI 类型 - // - public synchronized static WinBoLLUI_TYPE getWinBoLLUI_TYPE() { - return _mWinBoLLUI_TYPE; - } - - // - // 把Activity添加到管理中 - // - public void add(T iWinBoLL) { - String tag = ((IWinBoLLActivity)iWinBoLL).getTag(); - LogUtils.d(TAG, String.format("add(T iWinBoLL) tag is %s", tag)); - if (isActive(tag)) { - LogUtils.d(TAG, String.format("isActive(tag) is true, tag : %s.", tag)); + /** + * 把Activity添加到管理中 + */ + public void add(T activity) { + if (isActive(activity.getTag())) { + LogUtils.d(TAG, String.format("add(...) %s is active.", activity.getTag())); } else { - // 设置起始活动窗口,以便最后退出时提问 - if (mFirstIWinBoLLActivity == null && _mapIWinBoLLList.size() == 0) { - LogUtils.d(TAG, "Set firstIWinBoLLActivity, iWinBoLL.getTag() is %s" + iWinBoLL.getTag()); - mFirstIWinBoLLActivity = iWinBoLL; - } - - // 添加到活动窗口列表 - _mapIWinBoLLList.put(iWinBoLL.getTag(), iWinBoLL); - LogUtils.d(TAG, String.format("Add activity : %s\n_mapActivityList.size() : %d", iWinBoLL.getTag(), _mapIWinBoLLList.size())); + mActivityListMap.put(activity.getTag(), activity); + LogUtils.d(TAG, String.format("Add activity : %s\n_mapActivityList.size() : %d", activity.getTag(), mActivityListMap.size())); } } - // // activity: 为 null 时, - // intent.putExtra 函数 EXTRA_TAG 参数为 tag + // intent.putExtra 函数 "tag" 参数为 tag // activity: 不为 null 时, // intent.putExtra 函数 "tag" 参数为 activity.getTag() // public void startWinBoLLActivity(Context context, Class clazz) { try { // 如果窗口已存在就重启窗口 - String tag = ((IWinBoLLActivity)clazz.newInstance()).getTag(); - LogUtils.d(TAG, String.format("startWinBoLLActivity(Context context, Class clazz) tag is %s", tag)); + String tag = clazz.newInstance().getTag(); if (isActive(tag)) { resumeActivity(context, tag); return; } - //ToastUtils.show("startWinBoLLActivity(Context context, Class clazz)"); // 新建一个任务窗口 Intent intent = new Intent(context, clazz); //打开多任务窗口 flags intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - intent.putExtra(EXTRA_TAG, tag); - context.startActivity(intent); + intent.putExtra("tag", tag); + mContext.startActivity(intent); } catch (InstantiationException | IllegalAccessException e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); } @@ -120,8 +93,7 @@ public class WinBoLLActivityManager { public void startWinBoLLActivity(Context context, Intent intent, Class clazz) { try { // 如果窗口已存在就重启窗口 - String tag = ((IWinBoLLActivity)clazz.newInstance()).getTag(); - LogUtils.d(TAG, String.format("startWinBoLLActivity(Context context, Intent intent, Class clazz) tag is %s", tag)); + String tag = clazz.newInstance().getTag(); if (isActive(tag)) { resumeActivity(context, tag); return; @@ -132,130 +104,94 @@ public class WinBoLLActivityManager { //打开多任务窗口 flags intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - intent.putExtra(EXTRA_TAG, tag); - context.startActivity(intent); + intent.putExtra("tag", tag); + mContext.startActivity(intent); } catch (InstantiationException | IllegalAccessException e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); } } - public void startLogActivity(Context context) { - // 如果窗口已存在就重启窗口 - String tag = LogActivity.TAG; - if (isActive(tag)) { - resumeActivity(context, tag); - return; - } - - // 新建一个任务窗口 - Intent intent = new Intent(context, LogActivity.class); - //打开多任务窗口 flags - // Define the bounds. -// Rect bounds = new Rect(0, 0, 800, 200); -// // Set the bounds as an activity option. -// ActivityOptions options = ActivityOptions.makeBasic(); -// options.setLaunchBounds(bounds); - intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); - intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); - - intent.putExtra(EXTRA_TAG, tag); - - //context.startActivity(intent, options.toBundle()); - context.startActivity(intent); - } - - public boolean isFirstIWinBoLLActivity(IWinBoLLActivity iWinBoLLActivity) { - return mFirstIWinBoLLActivity != null && mFirstIWinBoLLActivity == iWinBoLLActivity; - } - - // - // 判断 tag绑定的 MyActivity是否存在 - // + /** + * 判断 tag绑定的 MyActivity是否存在 + */ public boolean isActive(String tag) { - LogUtils.d(TAG, String.format("isActive(String tag) tag is %s", tag)); - //printIWinBoLLListInfo(); - IWinBoLLActivity iWinBoLL = getIWinBoLL(tag); - if (iWinBoLL != null) { - //LogUtils.d(TAG, "isActive(...) activity != null tag " + tag); - //ToastUtils.show("activity != null tag " + tag); - //判断是否为 BaseActivity,如果已经销毁,则移除 - if (iWinBoLL.getActivity().isFinishing() || iWinBoLL.getActivity().isDestroyed()) { - _mapIWinBoLLList.remove(iWinBoLL.getTag()); - //_mWinBoLLActivityList.remove(activity); - LogUtils.d(TAG, String.format("isActive(...) remove activity.\ntag : %s", tag)); - return false; - } else { - LogUtils.d(TAG, String.format("isActive(...) activity is exist.\ntag : %s", tag)); - return true; + //printAvtivityListInfo(); + IWinBoLLActivity iWinBoLLActivity = getIWinBoLLActivity(tag); + if (iWinBoLLActivity != null) { + Activity activity = iWinBoLLActivity.getActivity(); + if (activity != null) { + LogUtils.d(TAG, "isActive(...) activity != null tag " + tag); + //ToastUtils.show("activity != null tag " + tag); + //判断是否为 BaseActivity,如果已经销毁,则移除 + if (activity.isFinishing() || activity.isDestroyed()) { + mActivityListMap.remove(iWinBoLLActivity.getTag()); + //_mIWinBoLLActivityList.remove(activity); + LogUtils.d(TAG, String.format("isActive(...) remove activity.\ntag : %s", tag)); + return false; + } else { + LogUtils.d(TAG, String.format("isActive(...) activity is exist.\ntag : %s", tag)); + return true; + } } - } else { - LogUtils.d(TAG, String.format("isActive(...) iWinBoLL is null tag by %s", tag)); - return false; } + return false; + } - static IWinBoLLActivity getIWinBoLL(String tag) { - LogUtils.d(TAG, String.format("getIWinBoLL(String tag) %s", tag)); - return _mapIWinBoLLList.get(tag); + IWinBoLLActivity getIWinBoLLActivity(String tag) { + return mActivityListMap.get(tag); } - // - // 找到tag 绑定的 BaseActivity ,通过 getTaskId() 移动到前台 - // + /** + * 找到tag 绑定的 BaseActivity ,通过 getTaskId() 移动到前台 + */ public void resumeActivity(Context context, String tag) { - LogUtils.d(TAG, "resumeActivity(Context context, String tag)"); - T iWinBoLL = (T)getIWinBoLL(tag); - LogUtils.d(TAG, String.format("iWinBoLL.getTag() %s", iWinBoLL.getTag())); - //LogUtils.d(TAG, "activity " + activity.getTag()); - if (iWinBoLL != null && !iWinBoLL.getActivity().isFinishing() && !iWinBoLL.getActivity().isDestroyed()) { - resumeActivity(context, iWinBoLL); + LogUtils.d(TAG, "resumeActivty"); + T iWinBoLLActivity = (T)getIWinBoLLActivity(tag); + LogUtils.d(TAG, "activity " + iWinBoLLActivity.getTag()); + if (iWinBoLLActivity != null && iWinBoLLActivity.getActivity() != null && !iWinBoLLActivity.getActivity().isFinishing() && !iWinBoLLActivity.getActivity().isDestroyed()) { + resumeActivity(context, iWinBoLLActivity); } } - // - // 找到tag 绑定的 BaseActivity ,通过 getTaskId() 移动到前台 - // - public void resumeActivity(Context context, T iWinBoLL) { - LogUtils.d(TAG, "resumeActivity(Context context, T iWinBoLL)"); - ActivityManager am = (ActivityManager) mGlobalApplication.getSystemService(Context.ACTIVITY_SERVICE); + /** + * 找到tag 绑定的 BaseActivity ,通过 getTaskId() 移动到前台 + */ + public void resumeActivity(Context context, T activity) { + ActivityManager am = (ActivityManager) activity.getActivity().getSystemService(Context.ACTIVITY_SERVICE); //返回启动它的根任务(home 或者 MainActivity) - Intent intent = new Intent(mGlobalApplication, iWinBoLL.getClass()); - TaskStackBuilder stackBuilder = TaskStackBuilder.create(mGlobalApplication); + Intent intent = new Intent(context, activity.getClass()); + TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); stackBuilder.addNextIntentWithParentStack(intent); stackBuilder.startActivities(); //moveTaskToFront(YourTaskId, 0); - //ToastUtils.show("resumeActivity am.moveTaskToFront"); - LogUtils.d(TAG, String.format("iWinBoLL.getActivity().getTaskId() %d", iWinBoLL.getActivity().getTaskId())); - am.moveTaskToFront(iWinBoLL.getActivity().getTaskId(), ActivityManager.MOVE_TASK_NO_USER_ACTION); LogUtils.d(TAG, "am.moveTaskToFront"); + //ToastUtils.show("resumeActivity am.moveTaskToFront"); + am.moveTaskToFront(activity.getActivity().getTaskId(), ActivityManager.MOVE_TASK_NO_USER_ACTION); } - // - // 结束所有 Activity - // + /** + * 结束所有 Activity + */ public void finishAll() { try { - for (String key : _mapIWinBoLLList.keySet()) { - //System.out.println("Key: " + key + ", Value: " + _mapActivityList.get(key)); - IWinBoLLActivity iWinBoLL = _mapIWinBoLLList.get(key); - //ToastUtils.show("finishAll() activity"); - if (iWinBoLL != null && !iWinBoLL.getActivity().isFinishing() && !iWinBoLL.getActivity().isDestroyed()) { + //ToastUtils.show(String.format("finishAll() size : %d", _mIWinBoLLActivityList.size())); + for (int i = mActivityListMap.size() - 1; i > -1; i--) { + IWinBoLLActivity iWinBoLLActivity = mActivityListMap.get(i); + ToastUtils.show("finishAll() activity"); + if (iWinBoLLActivity != null && iWinBoLLActivity.getActivity() != null && !iWinBoLLActivity.getActivity().isFinishing() && !iWinBoLLActivity.getActivity().isDestroyed()) { //ToastUtils.show("activity != null ..."); - if (getWinBoLLUI_TYPE() == WinBoLLUI_TYPE.Service) { + if (GlobalApplication.getWinBoLLActivityManager().getWinBoLLUI_TYPE() == WinBoLLUI_TYPE.Service) { // 结束窗口和最近任务栏, 建议前台服务类应用使用,可以方便用户再次调用 UI 操作。 - iWinBoLL.getActivity().finishAndRemoveTask(); + iWinBoLLActivity.getActivity().finishAndRemoveTask(); //ToastUtils.show("finishAll() activity.finishAndRemoveTask();"); - } else if (getWinBoLLUI_TYPE() == WinBoLLUI_TYPE.Aplication) { + } else if (GlobalApplication.getWinBoLLActivityManager().getWinBoLLUI_TYPE() == WinBoLLUI_TYPE.Aplication) { // 结束窗口保留最近任务栏,建议前台服务类应用使用,可以保持应用的系统自觉性。 - iWinBoLL.getActivity().finish(); + iWinBoLLActivity.getActivity().finish(); //ToastUtils.show("finishAll() activity.finish();"); } else { - LogUtils.d(TAG, "WinBoLLApplication.WinBoLLUI_TYPE error."); - //ToastUtils.show("WinBoLLApplication.WinBoLLUI_TYPE error."); + ToastUtils.show("WinBollApplication.WinBollUI_TYPE error."); } } } @@ -264,17 +200,17 @@ public class WinBoLLActivityManager { } } - // - // 结束指定Activity - // - public void finish(T iWinBoLL) { + /** + * 结束指定Activity + */ + public void finish(T iWinBoLLActivity) { try { - if (iWinBoLL != null && !iWinBoLL.getActivity().isFinishing() && !iWinBoLL.getActivity().isDestroyed()) { + if (iWinBoLLActivity != null && iWinBoLLActivity.getActivity() != null && !iWinBoLLActivity.getActivity().isFinishing() && !iWinBoLLActivity.getActivity().isDestroyed()) { //根据tag 移除 MyActivity //String tag= activity.getTag(); - //_mWinBoLLActivityList.remove(tag); + //_mIWinBoLLActivityList.remove(tag); //ToastUtils.show("remove"); - //ToastUtils.show("_mWinBoLLActivityArrayMap.size() " + Integer.toString(_mWinBoLLActivityArrayMap.size())); + //ToastUtils.show("_mIWinBoLLActivityArrayMap.size() " + Integer.toString(_mIWinBoLLActivityArrayMap.size())); // 窗口回调规则: // [] 当前窗口位置 >> 调度出的窗口位置 @@ -283,11 +219,10 @@ public class WinBoLLActivityManager { // ★:0 1 2 [3] 4 >> 2 // ★:0 1 2 3 [4] >> 3 // ★:[0] >> 直接关闭当前窗口 - //LogUtils.d(TAG, "finish no yet."); - IWinBoLLActivity preIWinBoLL = getPreIWinBoLL(iWinBoLL); - iWinBoLL.getActivity().finish(); - if (preIWinBoLL != null) { - resumeActivity(mGlobalApplication, preIWinBoLL); + IWinBoLLActivity preActivity = getPreActivity(iWinBoLLActivity); + iWinBoLLActivity.getActivity().finish(); + if (preActivity != null) { + resumeActivity(mContext, preActivity); } } @@ -296,24 +231,21 @@ public class WinBoLLActivityManager { } } - // - // 获取窗口队列中的前一个窗口 - // - IWinBoLLActivity getPreIWinBoLL(IWinBoLLActivity iWinBoLL) { + IWinBoLLActivity getPreActivity(IWinBoLLActivity iWinBoLLActivity) { try { boolean bingo = false; - IWinBoLLActivity preIWinBoLL = null; - for (Map.Entry entity : _mapIWinBoLLList.entrySet()) { - if (entity.getKey().equals(iWinBoLL.getTag())) { + IWinBoLLActivity preIWinBoLLActivity = null; + for (Map.Entry entity : mActivityListMap.entrySet()) { + if (entity.getKey().equals(iWinBoLLActivity.getTag())) { bingo = true; - //LogUtils.d(TAG, "bingo"); + LogUtils.d(TAG, "bingo"); break; } - preIWinBoLL = entity.getValue(); + preIWinBoLLActivity = entity.getValue(); } if (bingo) { - return preIWinBoLL; + return preIWinBoLLActivity; } } catch (Exception e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); @@ -322,26 +254,19 @@ public class WinBoLLActivityManager { return null; } - // - // 从管理列表中移除管理项 - // - public boolean registeRemove(T activity) { - IWinBoLLActivity iWinBoLLTest = _mapIWinBoLLList.get(activity.getTag()); - if (iWinBoLLTest != null) { - _mapIWinBoLLList.remove(activity.getTag()); + public boolean registeRemove(T iWinBoLLActivity) { + IWinBoLLActivity iWinBoLLActivityTest = mActivityListMap.get(iWinBoLLActivity.getTag()); + if (iWinBoLLActivityTest != null) { + mActivityListMap.remove(iWinBoLLActivity.getTag()); return true; } return false; } - // - // 打印管理列表项列表里的信息 - // - public static void printIWinBoLLListInfo() { - //LogUtils.d(TAG, "printAvtivityListInfo"); - if (!_mapIWinBoLLList.isEmpty()) { - StringBuilder sb = new StringBuilder("Map entries : " + Integer.toString(_mapIWinBoLLList.size())); - Iterator> iterator = _mapIWinBoLLList.entrySet().iterator(); + public void printAvtivityListInfo() { + if (!mActivityListMap.isEmpty()) { + StringBuilder sb = new StringBuilder("Map entries : " + Integer.toString(mActivityListMap.size())); + Iterator> iterator = mActivityListMap.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = iterator.next(); sb.append("\nKey: " + entry.getKey() + ", \nValue: " + entry.getValue().getTag()); @@ -354,3 +279,4 @@ public class WinBoLLActivityManager { } } } + diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/git/IAPPFiles.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/git/IAPPFiles.java index cbcc4bd..02cca75 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/git/IAPPFiles.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/git/IAPPFiles.java @@ -7,7 +7,7 @@ import java.util.HashMap; import java.util.Map; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 12:30:59 * @Describe 应用文件接口基础类 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/BBMorseCodeUtils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/BBMorseCodeUtils.java index e764ade..7e02d33 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/BBMorseCodeUtils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/BBMorseCodeUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/23 16:17:54 * @Describe 哔哔振动响铃工具集 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/FileUtils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/FileUtils.java index b022d6b..f377a4b 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/FileUtils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 文件工具类 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/MD5Utils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/MD5Utils.java index 5b9aa76..66c1e75 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/MD5Utils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/MD5Utils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/19 15:26:58 */ import java.math.BigInteger; diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/PrefUtils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/PrefUtils.java index 6f0a1e6..ca83164 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/PrefUtils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/PrefUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/11/28 15:03:12 * @Describe 应用变量保存工具 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/QRCodeGenerator.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/QRCodeGenerator.java index bc5903c..3435c48 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/QRCodeGenerator.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/QRCodeGenerator.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/17 20:49:55 * @Describe 二维码工具 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/ServiceUtils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/ServiceUtils.java index cfc2930..7d40dc3 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/ServiceUtils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/ServiceUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 20:09:02 * @Describe 应用服务组件工具类 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/UriUtils.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/UriUtils.java index 04b1d18..23c2dfe 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/UriUtils.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/utils/UriUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Describe Uri 资源管理工具类 */ import android.content.ContentResolver; diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/views/SimpleWebView.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/views/SimpleWebView.java index 6765fa4..27e38be 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/views/SimpleWebView.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/views/SimpleWebView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/03 11:05:45 * @Describe 简单网页视图类 */ diff --git a/libapputils/src/main/java/cc/winboll/studio/libapputils/views/StringToQrCodeView.java b/libapputils/src/main/java/cc/winboll/studio/libapputils/views/StringToQrCodeView.java index 40577eb..61bc27d 100644 --- a/libapputils/src/main/java/cc/winboll/studio/libapputils/views/StringToQrCodeView.java +++ b/libapputils/src/main/java/cc/winboll/studio/libapputils/views/StringToQrCodeView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libapputils.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/19 13:49:14 * @Describe 把字符串转化为二维码的视图 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/JCCommandThread.java b/libjc/src/main/java/cc/winboll/studio/libjc/JCCommandThread.java index 50a1e0d..6b8b94f 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/JCCommandThread.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/JCCommandThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/07 17:34:56 * @Describe JC命令行执行类 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorStream.java b/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorStream.java index 33b9188..483572b 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorStream.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorStream.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/07 13:46:40 * @Describe JC 错误输出流 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorThread.java b/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorThread.java index d00102a..1eb5ed7 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorThread.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/JCErrorThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/07 13:51:14 * @Describe 错误输出流进程 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputStream.java b/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputStream.java index b55d263..1853a69 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputStream.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputStream.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/07 12:32:19 * @Describe 控制台输出流接口类 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputThread.java b/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputThread.java index 5579b59..84301dd 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputThread.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/JCOutputThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/07 13:27:26 * @Describe JC输出流进程 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/Main.java b/libjc/src/main/java/cc/winboll/studio/libjc/Main.java index 22dd372..b362c56 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/Main.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/Main.java @@ -10,7 +10,7 @@ public class Main { public final static String TAG = "Main"; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/09 17:03:50 * @Describe 当前源码实例的运行模式。 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/TestClassA.java b/libjc/src/main/java/cc/winboll/studio/libjc/TestClassA.java index 84670e0..a385192 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/TestClassA.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/TestClassA.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/06 11:14:19 * @Describe 测试类A */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/TestClassB.java b/libjc/src/main/java/cc/winboll/studio/libjc/TestClassB.java index 22c25ee..a9b79a3 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/TestClassB.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/TestClassB.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/09 08:49:08 * @Describe 测试类B */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/bean/BaseBean.java b/libjc/src/main/java/cc/winboll/studio/libjc/bean/BaseBean.java index 73146dd..2b4109f 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/bean/BaseBean.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/bean/BaseBean.java @@ -1,7 +1,7 @@ package main.java.cc.winboll.studio.libjc.bean; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/23 15:40:30 * @Describe Json Bean 基础类。 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/cmd/ListJarClassHasMain.java b/libjc/src/main/java/cc/winboll/studio/libjc/cmd/ListJarClassHasMain.java index 5be74e2..60e8a35 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/cmd/ListJarClassHasMain.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/cmd/ListJarClassHasMain.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc.cmd; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/11 12:43:29 * @Describe 列举定义了main函数的所有类。 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/net/MesaageBean.java b/libjc/src/main/java/cc/winboll/studio/libjc/net/MesaageBean.java index 4e860e6..5fa15f4 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/net/MesaageBean.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/net/MesaageBean.java @@ -5,7 +5,7 @@ import java.io.IOException; import main.java.cc.winboll.studio.libjc.bean.BaseBean; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/09 20:07:06 * @Describe 消息类 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/util/FileUtils.java b/libjc/src/main/java/cc/winboll/studio/libjc/util/FileUtils.java index 183d2a6..f4f06ec 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/util/FileUtils.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/util/FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:46:32 * @Describe 文件处理工具 */ diff --git a/libjc/src/main/java/cc/winboll/studio/libjc/util/LogUtils.java b/libjc/src/main/java/cc/winboll/studio/libjc/util/LogUtils.java index 9724f54..7156e72 100644 --- a/libjc/src/main/java/cc/winboll/studio/libjc/util/LogUtils.java +++ b/libjc/src/main/java/cc/winboll/studio/libjc/util/LogUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.libjc.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/06 18:47:05 * @Describe 日志类 */ diff --git a/mj/src/main/java/cc/winboll/studio/mj/App.java b/mj/src/main/java/cc/winboll/studio/mj/App.java index eaea7d3..f6f4c3d 100644 --- a/mj/src/main/java/cc/winboll/studio/mj/App.java +++ b/mj/src/main/java/cc/winboll/studio/mj/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mj; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/11/28 15:42:47 * @Describe 全局应用类 */ diff --git a/mj/src/main/java/cc/winboll/studio/mj/activities/AboutActivity.java b/mj/src/main/java/cc/winboll/studio/mj/activities/AboutActivity.java index cb46aa9..40c82ae 100644 --- a/mj/src/main/java/cc/winboll/studio/mj/activities/AboutActivity.java +++ b/mj/src/main/java/cc/winboll/studio/mj/activities/AboutActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mj.activities; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/14 13:20:33 * @Describe 应用关于对话窗口 */ diff --git a/mymessagemanager/README.md b/mymessagemanager/README.md index 75856f4..b17ab1d 100644 --- a/mymessagemanager/README.md +++ b/mymessagemanager/README.md @@ -23,7 +23,7 @@ 1. Fork 本仓库 2. 新建 Feat_xxx 分支 -3. 提交代码:ZhanGSKen(ZhanGSKen@QQ.COM) +3. 提交代码:ZhanGSKen(ZhanGSKen) 4. 新建 Pull Request diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/GlobalApplication.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/GlobalApplication.java index a14351e..abccc9c 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/GlobalApplication.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/GlobalApplication.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2023/07/24 01:46:59 * @Describe 全局应用类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AboutActivity.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AboutActivity.java index 51750d6..4e1e4da 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AboutActivity.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AboutActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/14 13:20:33 * @Describe 应用关于对话窗口 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AppSettingsActivity.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AppSettingsActivity.java index 2704fe6..e4aa350 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AppSettingsActivity.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/AppSettingsActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/12 20:03:42 * @Describe 应用设置窗口 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSReceiveRuleActivity.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSReceiveRuleActivity.java index c043091..ddbd8f6 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSReceiveRuleActivity.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSReceiveRuleActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 12:50:52 * @Describe 短信匹配过滤规则设置窗口 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSRecycleActivity.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSRecycleActivity.java index 1c61a0a..4a1d75a 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSRecycleActivity.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/SMSRecycleActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 16:56:18 * @Describe 短信回收站 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/TTSPlayRuleActivity.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/TTSPlayRuleActivity.java index 8ecdd29..72838e9 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/TTSPlayRuleActivity.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/activitys/TTSPlayRuleActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.activitys; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 12:50:52 * @Describe TTS 语音播放规则规则设置窗口 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSAcceptRuleArrayAdapter.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSAcceptRuleArrayAdapter.java index 992bf08..c675e87 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSAcceptRuleArrayAdapter.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSAcceptRuleArrayAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.adapters; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/20 12:27:34 * @Describe 短信过滤规则数据适配器 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSRecycleAdapter.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSRecycleAdapter.java index 1f6e71d..9226383 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSRecycleAdapter.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/SMSRecycleAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.adapters; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 17:07:34 * @Describe 短信回收站短信数据适配器 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/TTSRuleBeanRecyclerViewAdapter.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/TTSRuleBeanRecyclerViewAdapter.java index 075abb7..8ee2b0e 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/TTSRuleBeanRecyclerViewAdapter.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/adapters/TTSRuleBeanRecyclerViewAdapter.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.adapters; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/18 16:08:20 * @Describe TTSRuleBean RecyclerView Adapter */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean.java index 364e942..9de5964 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/02 20:07:44 * @Describe 应用配置数据类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean_V1.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean_V1.java index f712c84..cbedfe8 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean_V1.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/AppConfigBean_V1.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2023/06/30 23:21:27 * @Describe 应用配置数据类,V1 旧版。 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/MessageNotificationBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/MessageNotificationBean.java index 5088b6c..935742a 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/MessageNotificationBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/MessageNotificationBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 13:10:44 * @Describe 短信通知栏消息结构 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/PhoneBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/PhoneBean.java index ca37ff0..c5278c1 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/PhoneBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/PhoneBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 13:10:44 * @Describe 联系人信息类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean.java index cd145eb..0b11bfe 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/30 10:57:14 * @Describe 短信接收规则类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean_V1.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean_V1.java index 0c32443..13488fc 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean_V1.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSAcceptRuleBean_V1.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/30 10:57:14 * @Describe 短信接收规则类,V1 旧版。 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSBean.java index 7534844..1258302 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/30 10:57:14 * @Describe 短信信息类 参考资料: diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSRecycleBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSRecycleBean.java index 7da594b..5ed966e 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSRecycleBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/SMSRecycleBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/20 01:51:44 * @Describe 回收站短信存储类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean.java index 41ce4f0..523d64e 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/28 20:22:12 * @Describe TTS 语音播放规则类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean_V1.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean_V1.java index b4e2c95..3426a62 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean_V1.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSPlayRuleBean_V1.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/28 20:22:12 * @Describe TTS 语音播放规则类,V1 旧版。 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSSpeakTextBean.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSSpeakTextBean.java index 149db9a..bcdf157 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSSpeakTextBean.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/beans/TTSSpeakTextBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/28 20:22:12 * @Describe TTS 语音播放文本内容类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/dialogs/YesNoAlertDialog.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/dialogs/YesNoAlertDialog.java index 7296109..9175920 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/dialogs/YesNoAlertDialog.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/dialogs/YesNoAlertDialog.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.dialogs; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/30 09:53:26 * @Describe 用户确定与否选择框 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/receivers/MainReceiver.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/receivers/MainReceiver.java index 254039d..540a7a7 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/receivers/MainReceiver.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/receivers/MainReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.receivers; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/28 20:22:12 * @Describe 在文件 AndroidManifest.xml 注册监听的广播接收类, * 用于接收系统启动完毕的广播消息。 diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/AssistantService.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/AssistantService.java index efd81f3..853d076 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/AssistantService.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.services; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用主要服务组件类守护进程服务组件类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/DefaultSMSManagerService.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/DefaultSMSManagerService.java index bcdf546..3643163 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/DefaultSMSManagerService.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/DefaultSMSManagerService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.services; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:48:01 * @Describe 默认短信应用服务组件类 * 注册安卓系统默认短信应用使用。 diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/MainService.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/MainService.java index 3b8b4ce..f4e976c 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/MainService.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/MainService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.services; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用主要服务组件类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/TTSPlayService.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/TTSPlayService.java index 607546b..a47185e 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/TTSPlayService.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/services/TTSPlayService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.services; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe TTS 语音播放服务组件类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil.java index 627ce6a..412ea89 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/02 21:43:52 * @Describe 应用配置工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil_V1.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil_V1.java index 6404807..90537e6 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil_V1.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppConfigUtil_V1.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用配置工具类,V1 旧版。 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppGoToSettingsUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppGoToSettingsUtil.java index 9d169ce..3839aba 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppGoToSettingsUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/AppGoToSettingsUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/31 17:58:27 * @Describe 调用应用属性设置页工具类 * 来源:https://blog.csdn.net/zhuhai__yizhi/article/details/78737593 diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/FileUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/FileUtil.java index 49fa200..f1a5b61 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/FileUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/FileUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 文件工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/NotificationUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/NotificationUtil.java index 1c94e56..75c1824 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/NotificationUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/NotificationUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用通知栏工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PermissionUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PermissionUtil.java index ea0cf52..1865c75 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PermissionUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PermissionUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/01 13:02:30 * @Describe 应用权限申请工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PhoneUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PhoneUtil.java index 7001c12..95330b3 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PhoneUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/PhoneUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 手机联系人工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/RegexPPiUtils.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/RegexPPiUtils.java index 8387f39..8e27dc3 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/RegexPPiUtils.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/RegexPPiUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 19:00:21 * @Describe .* 前置预防针 regex pointer preventive injection diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSReceiveRuleUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSReceiveRuleUtil.java index 1c8949b..1ddbe9f 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSReceiveRuleUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSReceiveRuleUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2023/07/01 05:59:25 * @Describe 短信接收过滤规则工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSRecycleUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSRecycleUtil.java index 01012ef..f1147ad 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSRecycleUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSRecycleUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 19:29:59 * @Describe 短信回收站工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSUtil.java index 0cf09f1..8d01042 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/SMSUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用短信管理工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ServiceUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ServiceUtil.java index 68957f6..fac2224 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ServiceUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ServiceUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用服务组件工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TTSPlayRuleUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TTSPlayRuleUtil.java index c954dbd..84388c0 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TTSPlayRuleUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TTSPlayRuleUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe TTS 语音播放工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TextToSpeechUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TextToSpeechUtil.java index a0f62b5..199840c 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TextToSpeechUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/TextToSpeechUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/03 10:27:46 * @Describe TTS语音播放工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java index 22f0243..be72eaf 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 应用主题工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java index f80a892..74ed5ad 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe Uri 资源管理工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java index 2aa9d61..65456ae 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/24 16:20:13 * @Describe 用户视觉系统保护模式工具集 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java index 1b56d0b..4801805 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe Uri 视图元素工具类 */ diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java index 6c9ebb6..9b0b43f 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2023/07/25 13:37:55 */ import android.content.Context; diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java index 60104ce..8d36f93 100644 --- a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java +++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.mymessagemanager.views; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2023/07/24 15:08:31 * @Describe TTS语音规则视图 */ diff --git a/powerbell/README.md b/powerbell/README.md index 2b1c309..1e06533 100644 --- a/powerbell/README.md +++ b/powerbell/README.md @@ -23,7 +23,7 @@ 1. Fork 本仓库 2. 新建 Feat_xxx 分支 -3. 提交代码 : ZhanGSKen(ZhanGSKen@QQ.COM) +3. 提交代码 : ZhanGSKen(ZhanGSKen) 4. 新建 Pull Request diff --git a/powerbell/build.gradle b/powerbell/build.gradle index 80fddb2..bd4fdd2 100644 --- a/powerbell/build.gradle +++ b/powerbell/build.gradle @@ -19,7 +19,7 @@ def genVersionName(def versionName){ android { compileSdkVersion 32 - buildToolsVersion "33.0.3" + buildToolsVersion "32.0.0" defaultConfig { applicationId "cc.winboll.studio.powerbell" @@ -29,7 +29,7 @@ android { // versionName 更新后需要手动设置 // .winboll/winbollBuildProps.properties 文件的 stageCount=0 // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0" - versionName "4.0" + versionName "15.3" if(true) { versionName = genVersionName("${versionName}") } @@ -41,17 +41,39 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } } dependencies { - api 'cc.winboll.studio:winboll-shared:1.8.0' - api 'io.github.medyo:android-about-page:2.0.0' + api fileTree(dir: 'libs', include: ['*.jar']) + api 'cc.winboll.studio:libaes:15.6.0' + api 'cc.winboll.studio:libapputils:15.3.4' + api 'cc.winboll.studio:libappbase:15.7.6' + + // 吐司提示库 api 'com.github.getActivity:ToastUtils:10.5' + // 应用介绍页类库 + api 'io.github.medyo:android-about-page:2.0.0' + // SSH + api 'com.jcraft:jsch:0.1.55' + // Html 解析 + api 'org.jsoup:jsoup:1.13.1' + // 二维码类库 + api 'com.google.zxing:core:3.4.1' + api 'com.journeyapps:zxing-android-embedded:3.6.0' + // 网络连接类库 + api 'com.squareup.okhttp3:okhttp:4.4.1' + + // AndroidX 类库 + api 'androidx.appcompat:appcompat:1.1.0' + api 'com.google.android.material:material:1.4.0' + //api 'androidx.viewpager:viewpager:1.0.0' + //api 'androidx.vectordrawable:vectordrawable:1.1.0' + //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' + //api 'androidx.fragment:fragment:1.1.0' + + + /*api 'cc.winboll.studio:winboll-shared:1.8.0' + api 'io.github.medyo:android-about-page:2.0.0' api 'com.jcraft:jsch:0.1.55' api 'org.jsoup:jsoup:1.13.1' api 'com.squareup.okhttp3:okhttp:4.4.1' @@ -67,6 +89,5 @@ dependencies { api 'com.squareup.okhttp3:okhttp:4.4.1' api 'cc.winboll.studio:libaes:7.6.0' - - api fileTree(dir: 'libs', include: ['*.jar']) + */ } diff --git a/powerbell/build.properties b/powerbell/build.properties index 005367c..c6ca083 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Thu Jan 02 11:13:45 HKT 2025 -stageCount=6 +#Sat May 03 06:21:11 GMT 2025 +stageCount=1 libraryProject= -baseVersion=4.0 -publishVersion=4.0.5 -buildCount=0 -baseBetaVersion=4.0.6 +baseVersion=15.3 +publishVersion=15.3.0 +buildCount=5 +baseBetaVersion=15.3.1 diff --git a/powerbell/src/beta/AndroidManifest.xml b/powerbell/src/beta/AndroidManifest.xml index a2a877c..7ca0b75 100644 --- a/powerbell/src/beta/AndroidManifest.xml +++ b/powerbell/src/beta/AndroidManifest.xml @@ -6,20 +6,18 @@ tools:replace="android:icon" android:icon="@drawable/ic_launcher_beta"> - + diff --git a/powerbell/src/main/AndroidManifest.xml b/powerbell/src/main/AndroidManifest.xml index b7d17be..93ad2bc 100644 --- a/powerbell/src/main/AndroidManifest.xml +++ b/powerbell/src/main/AndroidManifest.xml @@ -2,10 +2,9 @@ - - - - + + + @@ -22,8 +21,15 @@ + + + + + + + + android:launchMode="singleTask" + android:exported="true"> @@ -110,6 +117,8 @@ android:name="android.max_aspect" android:value="4.0"/> + + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/GlobalApplication.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/App.java similarity index 75% rename from powerbell/src/main/java/cc/winboll/studio/powerbell/GlobalApplication.java rename to powerbell/src/main/java/cc/winboll/studio/powerbell/App.java index 3dba865..6e2c6a9 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/GlobalApplication.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/App.java @@ -2,14 +2,14 @@ package cc.winboll.studio.powerbell; import android.content.Context; import android.view.Gravity; +import cc.winboll.studio.libappbase.GlobalApplication; import cc.winboll.studio.powerbell.receivers.GlobalApplicationReceiver; import cc.winboll.studio.powerbell.utils.AppCacheUtils; import cc.winboll.studio.powerbell.utils.AppConfigUtils; -import cc.winboll.studio.shared.app.WinBollApplication; import com.hjq.toast.ToastUtils; -import com.hjq.toast.style.WhiteToastStyle; +import java.io.File; -public class GlobalApplication extends WinBollApplication { +public class App extends GlobalApplication { public static final String TAG = "GlobalApplication"; @@ -17,16 +17,29 @@ public class GlobalApplication extends WinBollApplication { static AppConfigUtils _mAppConfigUtils; static AppCacheUtils _mAppCacheUtils; GlobalApplicationReceiver mReceiver; + static String szTempDir = ""; + + public static String getTempDirPath() { + return szTempDir; + } @Override public void onCreate() { super.onCreate(); + // 初始化临时文件夹目录 + File fTempDir = new File(getExternalCacheDir(), "TempDir"); + if(!fTempDir.exists()) { + fTempDir.mkdirs(); + } + szTempDir = fTempDir.getAbsolutePath(); + + // 初始化 Toast 框架 ToastUtils.init(this); // 设置 Toast 布局样式 //ToastUtils.setView(R.layout.toast_custom_view); - ToastUtils.setStyle(new WhiteToastStyle()); + //ToastUtils.setStyle(new WhiteToastStyle()); ToastUtils.setGravity(Gravity.BOTTOM, 0, 200); // 设置数据配置存储工具 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/MainActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/MainActivity.java index c2a5eb6..3e7527b 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/MainActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/MainActivity.java @@ -12,14 +12,14 @@ import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; import cc.winboll.studio.libaes.views.AToolbar; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.LogView; import cc.winboll.studio.powerbell.MainActivity; import cc.winboll.studio.powerbell.activities.AboutActivity; import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity; +import cc.winboll.studio.powerbell.activities.BatteryReporterActivity; import cc.winboll.studio.powerbell.activities.ClearRecordActivity; import cc.winboll.studio.powerbell.fragments.MainViewFragment; -import cc.winboll.studio.powerbell.utils.NotificationUtils; -import cc.winboll.studio.shared.log.LogUtils; -import cc.winboll.studio.shared.log.LogView; public class MainActivity extends Activity { public static final String TAG = "MainActivity"; @@ -28,7 +28,7 @@ public class MainActivity extends Activity { public static MainActivity _mMainActivity; LogView mLogView; //ArrayList mlistFragment; - GlobalApplication mApplication; + App mApplication; //AppConfigUtils mAppConfigUtils; Menu mMenu; Fragment mCurrentShowFragment; @@ -48,12 +48,13 @@ public class MainActivity extends Activity { mLogView.updateLogView(); _mMainActivity = MainActivity.this; - mApplication = (GlobalApplication) getApplication(); + mApplication = (App) getApplication(); //mAppConfigUtils = AppConfigUtils.getInstance(mApplication); // 初始化工具栏 mAToolbar = (AToolbar) findViewById(R.id.toolbar); setActionBar(mAToolbar); + //mAToolbar.setSubtitle("Main"); mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); if (mMainViewFragment == null) { @@ -64,8 +65,10 @@ public class MainActivity extends Activity { } showFragment(mMainViewFragment); - NotificationUtils notificationUtils = new NotificationUtils(this); - notificationUtils.createNotificationChannel(); +// NotificationHelper notificationUtils = new NotificationHelper(this); +// notificationUtils.createNotificationChannels(); + + } void showFragment(Fragment fragment) { @@ -113,7 +116,7 @@ public class MainActivity extends Activity { protected void onResume() { super.onResume(); // 回到窗口自动取消提醒消息 - NotificationUtils.cancelRemindNotification(this); + //NotificationHelper.cancelRemindNotification(this); reloadBackground(); } @@ -140,8 +143,11 @@ public class MainActivity extends Activity { super.onOptionsItemSelected(item); int menuItemId = item.getItemId(); if (menuItemId == R.id.action_about) { + Intent intent = new Intent(this, AboutActivity.class); + startActivity(intent); + } else if (menuItemId == R.id.action_battery_reporter) { Intent intent = new Intent(); - intent.setClass(this, AboutActivity.class); + intent.setClass(this, BatteryReporterActivity.class); startActivity(intent); } else if (menuItemId == R.id.action_clearrecord) { Intent intent = new Intent(); diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/AboutActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/AboutActivity.java index fa5e526..2a03da5 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/AboutActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/AboutActivity.java @@ -1,42 +1,65 @@ package cc.winboll.studio.powerbell.activities; /** - * @Author ZhanGSKen@QQ.COM - * @Date 2024/07/12 13:33:59 - * @Describe AboutActivity + * @Author ZhanGSKen + * @Date 2025/03/25 01:16:32 + * @Describe 应用介绍窗口 */ import android.app.Activity; +import android.content.Context; import android.os.Bundle; -import android.view.View; +import android.view.ViewGroup; +import android.widget.LinearLayout; import cc.winboll.studio.libaes.views.AToolbar; +import cc.winboll.studio.libaes.winboll.APPInfo; +import cc.winboll.studio.libaes.winboll.AboutView; import cc.winboll.studio.powerbell.R; public class AboutActivity extends Activity { - public static final String TAG = "AboutActivity"; + Context mContext; - AToolbar mAToolbar; + public static final String TAG = "AboutActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); + mContext = this; // 初始化工具栏 - mAToolbar = (AToolbar) findViewById(R.id.toolbar); - setActionBar(mAToolbar); - //mAToolbar.setTitle(getTitle() + "-" + getString(R.string.subtitle_activity_backgroundpicture)); - mAToolbar.setSubtitle(R.string.subtitle_activity_about); - mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); - mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText); - //mAToolbar.setBackgroundColor(getColor(R.color.colorPrimary)); + AToolbar mAToolbar = (AToolbar) findViewById(R.id.toolbar); setActionBar(mAToolbar); + mAToolbar.setSubtitle(getString(R.string.text_about)); + //mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); getActionBar().setDisplayHomeAsUpEnabled(true); - mAToolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - finish(); - } - }); + + AboutView aboutView = CreateAboutView(); + // 在 Activity 的 onCreate 或其他生命周期方法中调用 + LinearLayout llRoot = findViewById(R.id.root_ll); + //layout.setOrientation(LinearLayout.VERTICAL); + // 创建布局参数(宽度和高度) + ViewGroup.LayoutParams params = new ViewGroup.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT + ); + llRoot.addView(aboutView, params); + + } + + public AboutView CreateAboutView() { + String szBranchName = "powerbell"; + APPInfo appInfo = new APPInfo(); + appInfo.setAppName(getString(R.string.app_name)); + appInfo.setAppIcon(R.drawable.ic_launcher); + appInfo.setAppDescription(getString(R.string.app_description)); + appInfo.setAppGitName("APP"); + appInfo.setAppGitOwner("Studio"); + appInfo.setAppGitAPPBranch(szBranchName); + appInfo.setAppGitAPPSubProjectFolder(szBranchName); + appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=PowerBell"); + appInfo.setAppAPKName("PowerBell"); + appInfo.setAppAPKFolderName("PowerBell"); + return new AboutView(mContext, appInfo); } } diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java index d004aa3..2ddca5f 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java @@ -7,12 +7,14 @@ import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.os.Environment; import android.provider.MediaStore; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import cc.winboll.studio.libaes.views.AToolbar; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.utils.ToastUtils; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity; import cc.winboll.studio.powerbell.beans.BackgroundPictureBean; @@ -20,8 +22,6 @@ import cc.winboll.studio.powerbell.dialogs.BackgroundPicturePreviewDialog; import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils; import cc.winboll.studio.powerbell.utils.FileUtils; import cc.winboll.studio.powerbell.utils.UriUtil; -import cc.winboll.studio.shared.log.LogUtils; -import com.hjq.toast.ToastUtils; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -59,18 +59,21 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { static String _mszCommonFileType = "jpeg"; // 背景图片的压缩比 int mnPictureCompress = 100; + static String _RecivedPictureFileName; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_backgroundpicture); + initEnv(); mBackgroundPictureUtils = BackgroundPictureUtils.getInstance(this); mfBackgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir()); if (!mfBackgroundDir.exists()) { mfBackgroundDir.mkdirs(); } - mfPictureDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), getString(R.string.app_projectname)); + //mfPictureDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), getString(R.string.app_projectname)); + mfPictureDir = new File(App.getTempDirPath()); if (!mfPictureDir.exists()) { mfPictureDir.mkdirs(); } @@ -84,8 +87,8 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { setActionBar(mAToolbar); //mAToolbar.setTitle(getTitle() + "-" + getString(R.string.subtitle_activity_backgroundpicture)); mAToolbar.setSubtitle(R.string.subtitle_activity_backgroundpicture); - mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); - mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText); + //mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); + //mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText); //mAToolbar.setBackgroundColor(getColor(R.color.colorPrimary)); setActionBar(mAToolbar); getActionBar().setDisplayHomeAsUpEnabled(true); @@ -130,6 +133,11 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { } } + void initEnv() { + LogUtils.d(TAG, "initEnv()"); + _RecivedPictureFileName = "Recived.data"; + } + public static String getBackgroundFileName() { return _mszRecivedCropPicture; } @@ -145,7 +153,7 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { // 加载背景 startCropImageActivity(false); } - + // // 更新预览背景 // @@ -330,10 +338,9 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { } public static File getRecivedPictureFile(Context context) { - String szRecivedPictureFileName = "Recived.data"; BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(context); utils.loadBackgroundPictureBean(); - return new File(utils.getBackgroundDir(), szRecivedPictureFileName); + return new File(utils.getBackgroundDir(), _RecivedPictureFileName); } @Override diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BatteryReporterActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BatteryReporterActivity.java new file mode 100644 index 0000000..a82d8a5 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BatteryReporterActivity.java @@ -0,0 +1,51 @@ +package cc.winboll.studio.powerbell.activities; + +/** + * @Author ZhanGSKen + * @Date 2025/03/22 14:20:15 + */ +import android.app.Activity; +import android.os.Bundle; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import cc.winboll.studio.powerbell.R; +import cc.winboll.studio.powerbell.adapters.BatteryAdapter; +import cc.winboll.studio.powerbell.beans.BatteryData; +import java.util.Arrays; +import java.util.List; + +public class BatteryReporterActivity extends Activity { + public static final String TAG = "BatteryReporterActivity"; + + private RecyclerView rvBatteryReport; + private BatteryAdapter adapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_battery_reporter); + + rvBatteryReport = findViewById(R.id.rvBatteryReport); + setupRecyclerView(); + loadSampleData(); + } + + private void setupRecyclerView() { + adapter = new BatteryAdapter(); + rvBatteryReport.setLayoutManager(new LinearLayoutManager(this)); + rvBatteryReport.setAdapter(adapter); + rvBatteryReport.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL)); + } + + private void loadSampleData() { + List dataList = Arrays.asList( + new BatteryData(95, "01:23:45", "00:05:12"), + new BatteryData(80, "02:15:30", "00:10:00"), + new BatteryData(65, "03:45:15", "00:15:30"), + new BatteryData(50, "05:00:00", "00:20:45") + ); + adapter.updateData(dataList); + } +} + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/ClearRecordActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/ClearRecordActivity.java index 19bbd28..0ce0f16 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/ClearRecordActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/ClearRecordActivity.java @@ -7,14 +7,14 @@ import android.view.View; import android.widget.TextView; import cc.winboll.studio.libaes.views.AOHPCTCSeekBar; import cc.winboll.studio.libaes.views.AToolbar; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.utils.ToastUtils; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.beans.BatteryInfoBean; import cc.winboll.studio.powerbell.receivers.ControlCenterServiceReceiver; import cc.winboll.studio.powerbell.utils.AppCacheUtils; import cc.winboll.studio.powerbell.utils.StringUtils; -import cc.winboll.studio.shared.log.LogUtils; -import com.hjq.toast.ToastUtils; import java.util.ArrayList; public class ClearRecordActivity extends Activity { @@ -23,21 +23,21 @@ public class ClearRecordActivity extends Activity { AToolbar mAToolbar; TextView mtvRecordText; - GlobalApplication mApplication; + App mApplication; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_clearrecord); - mApplication = (GlobalApplication) getApplication(); + mApplication = (App) getApplication(); // 初始化工具栏 mAToolbar = (AToolbar) findViewById(R.id.toolbar); setActionBar(mAToolbar); //mAToolbar.setTitle(getTitle() + " - " + getString(R.string.subtitle_activity_clearrecord)); mAToolbar.setSubtitle(R.string.subtitle_activity_clearrecord); - mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); - mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText); + //mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText); + //mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText); //mAToolbar.setBackgroundColor(getColor(R.color.colorPrimary)); setActionBar(mAToolbar); getActionBar().setDisplayHomeAsUpEnabled(true); diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/adapters/BatteryAdapter.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/adapters/BatteryAdapter.java new file mode 100644 index 0000000..0e58860 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/adapters/BatteryAdapter.java @@ -0,0 +1,61 @@ +package cc.winboll.studio.powerbell.adapters; + +/** + * @Author ZhanGSKen + * @Date 2025/03/22 14:38:55 + * @Describe 电池报告数据适配器 + */ +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; +import cc.winboll.studio.powerbell.R; +import cc.winboll.studio.powerbell.adapters.BatteryAdapter; +import cc.winboll.studio.powerbell.beans.BatteryData; +import java.util.ArrayList; +import java.util.List; + +public class BatteryAdapter extends RecyclerView.Adapter { + public static final String TAG = "BatteryAdapter"; + private List dataList = new ArrayList<>(); + + public void updateData(List newData) { + dataList = newData; + notifyDataSetChanged(); + } + + @Override + public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + View view = LayoutInflater.from(parent.getContext()) + .inflate(R.layout.item_battery_report, parent, false); + return new ViewHolder(view); + } + + @Override + public void onBindViewHolder(ViewHolder holder, int position) { + BatteryData item = dataList.get(position); + holder.tvLevel.setText(String.format("%d%%", item.getCurrentLevel())); + holder.tvDischargeTime.setText("使用时间: " + item.getDischargeTime()); + holder.tvChargeTime.setText("充电时间: " + item.getChargeTime()); + } + + @Override + public int getItemCount() { + return dataList.size(); + } + + static class ViewHolder extends RecyclerView.ViewHolder { + TextView tvLevel; + TextView tvDischargeTime; + TextView tvChargeTime; + + ViewHolder(View itemView) { + super(itemView); + tvLevel = itemView.findViewById(R.id.tvLevel); + tvDischargeTime = itemView.findViewById(R.id.tvDischargeTime); + tvChargeTime = itemView.findViewById(R.id.tvChargeTime); + } + } +} + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/AppConfigBean.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/AppConfigBean.java index 597c133..f5ed58e 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/AppConfigBean.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/AppConfigBean.java @@ -1,13 +1,13 @@ package cc.winboll.studio.powerbell.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/04/29 17:24:53 * @Describe 应用运行参数类 */ import android.util.JsonReader; import android.util.JsonWriter; -import cc.winboll.studio.shared.app.BaseBean; +import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; import java.io.Serializable; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BackgroundPictureBean.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BackgroundPictureBean.java index 2e8f4fa..ae818a8 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BackgroundPictureBean.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BackgroundPictureBean.java @@ -1,13 +1,13 @@ package cc.winboll.studio.powerbell.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/18 11:52:28 * @Describe 应用背景图片数据类 */ import android.util.JsonReader; import android.util.JsonWriter; -import cc.winboll.studio.shared.app.BaseBean; +import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; public class BackgroundPictureBean extends BaseBean { diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryData.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryData.java new file mode 100644 index 0000000..7f8ee95 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryData.java @@ -0,0 +1,26 @@ +package cc.winboll.studio.powerbell.beans; + +/** + * @Author ZhanGSKen + * @Date 2025/03/22 14:30:51 + * @Describe 电池报告数据模型 + */ +public class BatteryData { + + public static final String TAG = "BatteryData"; + + private int currentLevel; + private String dischargeTime; + private String chargeTime; + + public BatteryData(int currentLevel, String dischargeTime, String chargeTime) { + this.currentLevel = currentLevel; + this.dischargeTime = dischargeTime; + this.chargeTime = chargeTime; + } + + public int getCurrentLevel() { return currentLevel; } + public String getDischargeTime() { return dischargeTime; } + public String getChargeTime() { return chargeTime; } +} + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryInfoBean.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryInfoBean.java index b108ac4..3063c88 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryInfoBean.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/BatteryInfoBean.java @@ -2,7 +2,7 @@ package cc.winboll.studio.powerbell.beans; import android.util.JsonReader; import android.util.JsonWriter; -import cc.winboll.studio.shared.app.BaseBean; +import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; import java.io.Serializable; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/ControlCenterServiceBean.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/ControlCenterServiceBean.java index c7d1369..dab23cf 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/ControlCenterServiceBean.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/beans/ControlCenterServiceBean.java @@ -1,13 +1,13 @@ package cc.winboll.studio.powerbell.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/18 07:06:07 * @Describe 服务控制参数 */ import android.util.JsonReader; import android.util.JsonWriter; -import cc.winboll.studio.shared.app.BaseBean; +import cc.winboll.studio.libappbase.BaseBean; import java.io.IOException; public class ControlCenterServiceBean extends BaseBean { diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java index bf11607..82b35e1 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java @@ -1,5 +1,4 @@ package cc.winboll.studio.powerbell.dialogs; -import cc.winboll.studio.powerbell.R; import android.app.Dialog; import android.content.Context; import android.content.Intent; @@ -10,17 +9,18 @@ import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; +import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.powerbell.MainActivity; +import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity; import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils; import cc.winboll.studio.powerbell.utils.FileUtils; import cc.winboll.studio.powerbell.utils.UriUtil; -import cc.winboll.studio.shared.log.LogUtils; import java.io.File; import java.io.IOException; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/04/25 16:27:53 * @Describe 背景图片的接收分享文件后的预览对话框 */ @@ -37,6 +37,8 @@ public class BackgroundPicturePreviewDialog extends Dialog { public BackgroundPicturePreviewDialog(Context context) { super(context); setContentView(R.layout.dialog_backgroundpicturepreview); + initEnv(); + mContext = context; mBackgroundPictureUtils = ((BackgroundPictureActivity)context).mBackgroundPictureUtils; @@ -68,6 +70,11 @@ public class BackgroundPicturePreviewDialog extends Dialog { } }); } + + void initEnv() { + LogUtils.d(TAG, "initEnv()"); + mszPreReceivedFileName = "PreReceived.data"; + } void copyAndViewRecivePicture(ImageView imageView) { //AppConfigUtils appConfigUtils = AppConfigUtils.getInstance((GlobalApplication)mContext.getApplicationContext()); @@ -87,7 +94,6 @@ public class BackgroundPicturePreviewDialog extends Dialog { } File fSrcImage = new File(szSrcImage); - mszPreReceivedFileName = "PreReceived.data"; //mszPreReceivedFileName = DateUtils.getDateNowString() + "-" + fSrcImage.getName(); File mfPreReceivedPhoto = new File(activity.mBackgroundPictureUtils.getBackgroundDir(), mszPreReceivedFileName); // 复制源图片到剪裁文件 @@ -96,7 +102,7 @@ public class BackgroundPicturePreviewDialog extends Dialog { LogUtils.d(TAG, "copyFileUsingFileChannels"); Drawable drawable = Drawable.createFromPath(mfPreReceivedPhoto.getPath()); imageView.setBackground(drawable); - LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName); + //LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName); } catch (IOException e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); } diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/YesNoAlertDialog.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/YesNoAlertDialog.java index b972d0f..d6ab3d2 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/YesNoAlertDialog.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/YesNoAlertDialog.java @@ -1,7 +1,7 @@ package cc.winboll.studio.powerbell.dialogs; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/10 19:32:55 * @Describe 用户确定与否选择框 */ diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java index 0c22da2..0e63a91 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java @@ -17,7 +17,8 @@ import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.Switch; import android.widget.TextView; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity; import cc.winboll.studio.powerbell.beans.BackgroundPictureBean; @@ -27,12 +28,11 @@ import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils; import cc.winboll.studio.powerbell.utils.ServiceUtils; import cc.winboll.studio.powerbell.views.BatteryDrawable; import cc.winboll.studio.powerbell.views.VerticalSeekBar; -import cc.winboll.studio.shared.log.LogUtils; import java.io.File; public class MainViewFragment extends Fragment { - public static final String TAG = MainViewFragment.class.getSimpleName(); + public static final String TAG = "MainViewFragment"; public static final int MSG_RELOAD_APPCONFIG = 0; public static final int MSG_CURRENTVALUEBATTERY = 1; @@ -78,7 +78,7 @@ public class MainViewFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_mainview, container, false); _mMainViewFragment = MainViewFragment.this; - mAppConfigUtils = GlobalApplication.getAppConfigUtils(getActivity()); + mAppConfigUtils = App.getAppConfigUtils(getActivity()); // 获取指定ID的View实例 final View mainImageView = mView.findViewById(R.id.fragmentmainviewImageView1); @@ -308,6 +308,7 @@ public class MainViewFragment extends Fragment { String szBackgroundFilePath = BackgroundPictureUtils.getInstance(getActivity()).getBackgroundDir() + BackgroundPictureActivity.getBackgroundFileName(); File fBackgroundFilePath = new File(szBackgroundFilePath); LogUtils.d(TAG, "szBackgroundFilePath : " + szBackgroundFilePath); + LogUtils.d(TAG, String.format("fBackgroundFilePath.exists() %s", fBackgroundFilePath.exists())); if (bean.isUseBackgroundFile() && fBackgroundFilePath.exists()) { Drawable drawableBackground = Drawable.createFromPath(szBackgroundFilePath); drawableBackground.setAlpha(120); diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/ControlCenterServiceReceiver.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/ControlCenterServiceReceiver.java index 007fd9e..53ae052 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/ControlCenterServiceReceiver.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/ControlCenterServiceReceiver.java @@ -4,11 +4,11 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.powerbell.beans.AppConfigBean; import cc.winboll.studio.powerbell.services.ControlCenterService; import cc.winboll.studio.powerbell.utils.AppConfigUtils; import cc.winboll.studio.powerbell.utils.BatteryUtils; -import cc.winboll.studio.shared.log.LogUtils; import java.lang.ref.WeakReference; public class ControlCenterServiceReceiver extends BroadcastReceiver { @@ -52,6 +52,13 @@ public class ControlCenterServiceReceiver extends BroadcastReceiver { appConfigBean.setCurrentValue(nTheQuantityOfElectricity); appConfigBean.setIsCharging(isCharging); mwrService.get().startRemindThread(appConfigBean); + + // 保存电池报告 + // 示例数据更新逻辑 +// List newData = new ArrayList<>(adapter.getDataList()); +// newData.add(0, new BatteryData(percentage, "00:00:00", "00:00:00")); +// adapter.updateData(newData); + // 保存好新的电池状态标志 _mIsCharging = isCharging; _mnTheQuantityOfElectricityOld = nTheQuantityOfElectricity; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/GlobalApplicationReceiver.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/GlobalApplicationReceiver.java index 3d7dde3..1f533a5 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/GlobalApplicationReceiver.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/GlobalApplicationReceiver.java @@ -4,18 +4,18 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.fragments.MainViewFragment; import cc.winboll.studio.powerbell.utils.AppConfigUtils; import cc.winboll.studio.powerbell.utils.BatteryUtils; -import cc.winboll.studio.powerbell.utils.NotificationUtils; +import cc.winboll.studio.powerbell.utils.NotificationHelper; public class GlobalApplicationReceiver extends BroadcastReceiver { public static final String TAG = "GlobalApplicationReceiver"; AppConfigUtils mAppConfigUtils; - GlobalApplication mGlobalApplication; + App mGlobalApplication; // 存储电量指示值, // 用于校验电量消息时的电量变化 static volatile int _mnTheQuantityOfElectricityOld = -1; @@ -24,10 +24,10 @@ public class GlobalApplicationReceiver extends BroadcastReceiver { // 便利封装 registerAction() 函数 GlobalApplicationReceiver mReceiver; - public GlobalApplicationReceiver(GlobalApplication globalApplication) { + public GlobalApplicationReceiver(App globalApplication) { mReceiver = this; mGlobalApplication = globalApplication; - mAppConfigUtils = GlobalApplication.getAppConfigUtils(mGlobalApplication); + mAppConfigUtils = App.getAppConfigUtils(mGlobalApplication); } @Override @@ -45,9 +45,9 @@ public class GlobalApplicationReceiver extends BroadcastReceiver { // 新电池状态标志某一个有变化就更新显示信息 if (_mIsCharging != isCharging || _mnTheQuantityOfElectricityOld != nTheQuantityOfElectricity) { // 电池状态改变先取消旧的提醒消息 - NotificationUtils.cancelRemindNotification(context); + //NotificationHelper.cancelRemindNotification(context); - GlobalApplication.getAppCacheUtils(context).addChangingTime(nTheQuantityOfElectricity); + App.getAppCacheUtils(context).addChangingTime(nTheQuantityOfElectricity); MainViewFragment.sendMsgCurrentValueBattery(nTheQuantityOfElectricity); // 保存好新的电池状态标志 _mIsCharging = isCharging; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/MainReceiver.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/MainReceiver.java index 4e30152..87ea5c5 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/MainReceiver.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/receivers/MainReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.powerbell.receivers; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/06 15:01:39 * @Describe 应用广播消息接收类 */ @@ -9,10 +9,10 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Build; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.services.ControlCenterService; import cc.winboll.studio.powerbell.utils.ServiceUtils; -import cc.winboll.studio.shared.log.LogUtils; public class MainReceiver extends BroadcastReceiver { @@ -27,7 +27,7 @@ public class MainReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { String szAction = intent.getAction(); if (szAction.equals(ACTION_BOOT_COMPLETED)) { - boolean isEnableService = GlobalApplication.getAppConfigUtils(context).getIsEnableService(); + boolean isEnableService = App.getAppConfigUtils(context).getIsEnableService(); if (isEnableService) { if (ServiceUtils.isServiceAlive(context.getApplicationContext(), ControlCenterService.class.getName()) == false) { LogUtils.d(TAG, "wakeupAndBindMain() Wakeup... ControlCenterService"); diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/services/AssistantService.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/services/AssistantService.java index 893bfb4..48a6a7c 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/services/AssistantService.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/services/AssistantService.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.services.ControlCenterService; import cc.winboll.studio.powerbell.utils.AppConfigUtils; import cc.winboll.studio.powerbell.utils.ServiceUtils; @@ -29,7 +29,7 @@ public class AssistantService extends Service { public void onCreate() { //LogUtils.d(TAG, "onCreate"); super.onCreate(); - mAppConfigUtils = GlobalApplication.getAppConfigUtils(this); + mAppConfigUtils = App.getAppConfigUtils(this); //mMyBinder = new MyBinder(); if (mMyServiceConnection == null) { diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/services/ControlCenterService.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/services/ControlCenterService.java index 20cc497..d073071 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/services/ControlCenterService.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/services/ControlCenterService.java @@ -8,14 +8,19 @@ package cc.winboll.studio.powerbell.services; * Android Service之onStartCommand方法研究 * https://blog.csdn.net/cyp331203/article/details/38920491 */ -import cc.winboll.studio.powerbell.R; +import android.app.Notification; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; -import cc.winboll.studio.powerbell.GlobalApplication; +import android.widget.RemoteViews; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libappbase.utils.ToastUtils; +import cc.winboll.studio.powerbell.App; +import cc.winboll.studio.powerbell.MainActivity; +import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.beans.AppConfigBean; import cc.winboll.studio.powerbell.beans.NotificationMessage; import cc.winboll.studio.powerbell.handlers.ControlCenterServiceHandler; @@ -24,11 +29,11 @@ import cc.winboll.studio.powerbell.services.AssistantService; import cc.winboll.studio.powerbell.threads.RemindThread; import cc.winboll.studio.powerbell.utils.AppCacheUtils; import cc.winboll.studio.powerbell.utils.AppConfigUtils; -import cc.winboll.studio.powerbell.utils.NotificationUtils; +import cc.winboll.studio.powerbell.utils.NotificationHelper; import cc.winboll.studio.powerbell.utils.ServiceUtils; import cc.winboll.studio.powerbell.utils.StringUtils; -import cc.winboll.studio.shared.log.LogUtils; -import com.hjq.toast.ToastUtils; +import android.os.Handler; +import android.os.Looper; public class ControlCenterService extends Service { @@ -43,7 +48,8 @@ public class ControlCenterService extends Service { AppConfigUtils mAppConfigUtils; AppCacheUtils mAppCacheUtils; // 前台服务通知工具 - NotificationUtils mNotificationUtils; + NotificationHelper mNotificationHelper; + Notification notification; RemindThread mRemindThread; ControlCenterServiceHandler mControlCenterServiceHandler; MyServiceConnection mMyServiceConnection; @@ -64,9 +70,11 @@ public class ControlCenterService extends Service { super.onCreate(); _mControlCenterService = ControlCenterService.this; isServiceRunning = false; - mAppConfigUtils = GlobalApplication.getAppConfigUtils(this); - mAppCacheUtils = GlobalApplication.getAppCacheUtils(this); - mNotificationUtils = new NotificationUtils(ControlCenterService.this); + mAppConfigUtils = App.getAppConfigUtils(this); + mAppCacheUtils = App.getAppCacheUtils(this); + mNotificationHelper = new NotificationHelper(ControlCenterService.this); + + if (mMyServiceConnection == null) { mMyServiceConnection = new MyServiceConnection(); } @@ -92,19 +100,33 @@ public class ControlCenterService extends Service { // 唤醒守护进程 wakeupAndBindAssistant(); // 显示前台通知栏 - NotificationMessage notificationMessage=createNotificationMessage(); - //Toast.makeText(getApplication(), "", Toast.LENGTH_SHORT).show(); - mNotificationUtils.createForegroundNotification(this, notificationMessage); - mNotificationUtils.createRemindNotification(this, notificationMessage); + // 在Service中 + NotificationHelper helper = new NotificationHelper(this); + Intent intent = new Intent(this, MainActivity.class); + notification = helper.showForegroundNotification(intent, getString(R.string.app_name), "Service Running, Click to open app"); + startForeground(NotificationHelper.FOREGROUND_NOTIFICATION_ID, notification); + +// NotificationMessage notificationMessage=createNotificationMessage(); +// //Toast.makeText(getApplication(), "", Toast.LENGTH_SHORT).show(); +// mNotificationUtils.createForegroundNotification(this, notificationMessage); +// mNotificationUtils.createRemindNotification(this, notificationMessage); if (mControlCenterServiceReceiver == null) { // 注册广播接收器 mControlCenterServiceReceiver = new ControlCenterServiceReceiver(this); mControlCenterServiceReceiver.registerAction(this); } - startRemindThread(mAppConfigUtils.mAppConfigBean); - ToastUtils.show("Service Is Start."); - LogUtils.i(TAG, "Service Is Start."); + + new Handler(Looper.getMainLooper()).postDelayed(new Runnable(){ + + @Override + public void run() { + startRemindThread(mAppConfigUtils.mAppConfigBean); + ToastUtils.show("Service Is Start."); + LogUtils.i(TAG, "Service Is Start."); + } + }, 2000); + } } @@ -118,7 +140,7 @@ public class ControlCenterService extends Service { } NotificationMessage createNotificationMessage() { - String szTitle = ((GlobalApplication)getApplication()).getString(R.string.app_name); + String szTitle = ((App)getApplication()).getString(R.string.app_name); String szContent = getValuesString() + " {?} " + StringUtils.formatPCMListString(mAppCacheUtils.getArrayListBatteryInfo()); return new NotificationMessage(szTitle, szContent); } @@ -126,19 +148,19 @@ public class ControlCenterService extends Service { // 更新前台通知 // public void updateServiceNotification() { - mNotificationUtils.updateForegroundNotification(ControlCenterService.this, createNotificationMessage()); + //mNotificationUtils.updateForegroundNotification(ControlCenterService.this, createNotificationMessage()); } // 更新前台通知 // public void updateServiceNotification(NotificationMessage notificationMessage) { - mNotificationUtils.updateForegroundNotification(ControlCenterService.this, notificationMessage); + //mNotificationUtils.updateForegroundNotification(ControlCenterService.this, notificationMessage); } // 更新前台通知 // public void updateRemindNotification(NotificationMessage notificationMessage) { - mNotificationUtils.updateRemindNotification(ControlCenterService.this, notificationMessage); + //mNotificationUtils.updateRemindNotification(ControlCenterService.this, notificationMessage); } // 唤醒和绑定守护进程 @@ -234,10 +256,32 @@ public class ControlCenterService extends Service { } public void appenRemindMSG(String szRemindMSG) { - NotificationMessage notificationMessage = createNotificationMessage(); - notificationMessage.setRemindMSG(szRemindMSG); - //LogUtils.d(TAG, "notificationMessage : " + notificationMessage.getRemindMSG()); - updateRemindNotification(notificationMessage); + String msg = ""; + for (int i = 0; i < 20; i++) { + msg += szRemindMSG; + } + NotificationHelper helper = new NotificationHelper(ControlCenterService.this); + Intent intent = new Intent(ControlCenterService.this, MainActivity.class); + helper.showTemporaryNotification(intent, getString(R.string.app_name), msg); + + + +// NotificationMessage notificationMessage = createNotificationMessage(); +// notificationMessage.setRemindMSG(szRemindMSG); +// //LogUtils.d(TAG, "notificationMessage : " + notificationMessage.getRemindMSG()); +// updateRemindNotification(notificationMessage); + } + + // 设置颜色背景 + public static RemoteViews setLinearLayoutColor(RemoteViews remoteViews, int viewId, int color) { + remoteViews.setInt(viewId, "setBackgroundColor", color); + return remoteViews; + } + + // 设置Drawable背景 + public static RemoteViews setLinearLayoutDrawable(RemoteViews remoteViews, int viewId, int drawableRes) { + remoteViews.setInt(viewId, "setBackgroundResource", drawableRes); + return remoteViews; } // diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/threads/RemindThread.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/threads/RemindThread.java index 69ed6bf..59d74e6 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/threads/RemindThread.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/threads/RemindThread.java @@ -2,8 +2,8 @@ package cc.winboll.studio.powerbell.threads; import android.content.Context; import android.os.Message; +import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.powerbell.handlers.ControlCenterServiceHandler; -import cc.winboll.studio.shared.log.LogUtils; import java.lang.ref.WeakReference; public class RemindThread extends Thread { diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppCacheUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppCacheUtils.java index 8233777..6d21004 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppCacheUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppCacheUtils.java @@ -1,8 +1,8 @@ package cc.winboll.studio.powerbell.utils; import android.content.Context; +import cc.winboll.studio.libappbase.LogUtils; import cc.winboll.studio.powerbell.beans.BatteryInfoBean; -import cc.winboll.studio.shared.log.LogUtils; import java.util.ArrayList; public class AppCacheUtils { diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppConfigUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppConfigUtils.java index e1c2be0..a9e93d5 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppConfigUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/AppConfigUtils.java @@ -2,14 +2,14 @@ package cc.winboll.studio.powerbell.utils; import android.app.Activity; import android.content.Context; -import cc.winboll.studio.powerbell.GlobalApplication; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.MainActivity; import cc.winboll.studio.powerbell.beans.AppConfigBean; import cc.winboll.studio.powerbell.beans.ControlCenterServiceBean; import cc.winboll.studio.powerbell.dialogs.YesNoAlertDialog; import cc.winboll.studio.powerbell.fragments.MainViewFragment; import cc.winboll.studio.powerbell.services.ControlCenterService; -import cc.winboll.studio.shared.log.LogUtils; import java.io.File; // 应用配置工具类 @@ -42,7 +42,7 @@ public class AppConfigUtils { volatile String mszBackgroundFileName = ""; // 保存应用实例 - GlobalApplication mApplication; + App mApplication; AppConfigUtils(Context context) { mContext = context; @@ -193,7 +193,7 @@ public class AppConfigUtils { // void saveConfigData() { // 更新配置先取消一下旧的的提醒消息 - NotificationUtils.cancelRemindNotification(mContext); + //NotificationHelper.cancelRemindNotification(mContext); AppConfigBean.saveBean(mContext, mAppConfigBean); // 通知活动窗口和服务配置已更新 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BackgroundPictureUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BackgroundPictureUtils.java index b5c7057..ac124b6 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BackgroundPictureUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BackgroundPictureUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.powerbell.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/18 12:07:20 * @Describe 背景图片工具集 */ diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BatteryUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BatteryUtils.java index 79a5df0..31ff2d9 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BatteryUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/BatteryUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.powerbell.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/18 04:32:46 * @Describe 电池工具类 */ diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/FileUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/FileUtils.java index 2ca8e15..59caa2c 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/FileUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/FileUtils.java @@ -2,7 +2,7 @@ package cc.winboll.studio.powerbell.utils; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; -import cc.winboll.studio.shared.log.LogUtils; +import cc.winboll.studio.libappbase.LogUtils; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/ImageUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/ImageUtils.java index 77cfa81..0528b07 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/ImageUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/ImageUtils.java @@ -3,7 +3,7 @@ package cc.winboll.studio.powerbell.utils; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import cc.winboll.studio.shared.log.LogUtils; +import cc.winboll.studio.libappbase.LogUtils; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationHelper.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationHelper.java new file mode 100644 index 0000000..3edef25 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationHelper.java @@ -0,0 +1,151 @@ +package cc.winboll.studio.powerbell.utils; + +/** + * @Author ZhanGSKen + * @Date 2025/03/22 04:39:40 + * @Describe 通知工具类 + */ +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.Context; +import android.content.Intent; +import android.graphics.BitmapFactory; +import android.os.Build; +import android.widget.RemoteViews; +import androidx.annotation.RequiresApi; +import androidx.core.app.NotificationCompat; +import cc.winboll.studio.powerbell.R; + +public class NotificationHelper { + public static final String TAG = "NotificationHelper"; + + // 渠道ID和名称 + private static final String CHANNEL_ID_FOREGROUND = "foreground_channel"; + private static final String CHANNEL_NAME_FOREGROUND = "Foreground Service"; + private static final String CHANNEL_ID_TEMPORARY = "temporary_channel"; + private static final String CHANNEL_NAME_TEMPORARY = "Temporary Notifications"; + + // 通知ID + public static final int FOREGROUND_NOTIFICATION_ID = 1001; + public static final int TEMPORARY_NOTIFICATION_ID = 2001; + + private final Context mContext; + private final NotificationManager mNotificationManager; + + public NotificationHelper(Context context) { + mContext = context; + mNotificationManager = context.getSystemService(NotificationManager.class); + createNotificationChannels(); + } + + @RequiresApi(api = Build.VERSION_CODES.O) + private void createNotificationChannels() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + createForegroundChannel(); + createTemporaryChannel(); + } + } + + @RequiresApi(api = Build.VERSION_CODES.O) + private void createForegroundChannel() { + NotificationChannel channel = new NotificationChannel( + CHANNEL_ID_FOREGROUND, + CHANNEL_NAME_FOREGROUND, + NotificationManager.IMPORTANCE_LOW + ); + channel.setDescription("Persistent service notifications"); + channel.setSound(null, null); + channel.enableVibration(false); + mNotificationManager.createNotificationChannel(channel); + } + + @RequiresApi(api = Build.VERSION_CODES.O) + private void createTemporaryChannel() { + NotificationChannel channel = new NotificationChannel( + CHANNEL_ID_TEMPORARY, + CHANNEL_NAME_TEMPORARY, + NotificationManager.IMPORTANCE_HIGH + ); + channel.setDescription("Temporary alert notifications"); + channel.setSound(null, null); + channel.enableVibration(true); + channel.setVibrationPattern(new long[]{100, 200, 300, 400}); + channel.setBypassDnd(true); + mNotificationManager.createNotificationChannel(channel); + } + + // 显示常驻通知(通常用于前台服务) + public Notification showForegroundNotification(Intent intent, String title, String content) { + PendingIntent pendingIntent = createPendingIntent(intent); + + Notification notification = new NotificationCompat.Builder(mContext, CHANNEL_ID_FOREGROUND) + .setSmallIcon(R.drawable.ic_launcher) + .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_launcher)) + //.setContentTitle(title + "\n" + content) + .setContentTitle(content) + //.setContentText(content) + .setContentIntent(pendingIntent) + .setPriority(NotificationCompat.PRIORITY_LOW) + .setOngoing(true) + .build(); + + mNotificationManager.notify(FOREGROUND_NOTIFICATION_ID, notification); + return notification; + } + + // 显示临时通知(自动消失) + public void showTemporaryNotification(Intent intent, String title, String content) { + PendingIntent pendingIntent = createPendingIntent(intent); + + Notification notification = new NotificationCompat.Builder(mContext, CHANNEL_ID_TEMPORARY) + .setSmallIcon(R.drawable.ic_launcher) + .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_launcher)) + .setContentTitle(title) + .setContentText(content) + .setContentIntent(pendingIntent) + .setPriority(NotificationCompat.PRIORITY_HIGH) + .setAutoCancel(true) + .setVibrate(new long[]{100, 200, 300, 400}) + .build(); + + mNotificationManager.notify(TEMPORARY_NOTIFICATION_ID, notification); + } + + // 创建自定义布局通知(可扩展) + public void showCustomNotification(Intent intent, RemoteViews contentView, RemoteViews bigContentView) { + PendingIntent pendingIntent = createPendingIntent(intent); + + Notification notification = new NotificationCompat.Builder(mContext, CHANNEL_ID_TEMPORARY) + .setSmallIcon(R.drawable.ic_launcher) + .setContentIntent(pendingIntent) + .setContent(contentView) + .setCustomBigContentView(bigContentView) + .setPriority(NotificationCompat.PRIORITY_HIGH) + .setAutoCancel(true) + .build(); + + mNotificationManager.notify(TEMPORARY_NOTIFICATION_ID + 1, notification); + } + + // 取消所有通知 + public void cancelAllNotifications() { + mNotificationManager.cancelAll(); + } + + // 创建PendingIntent(兼容不同API版本) + private PendingIntent createPendingIntent(Intent intent) { + int flags = PendingIntent.FLAG_UPDATE_CURRENT; +// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { +// flags |= PendingIntent.FLAG_IMMUTABLE; +// } + return PendingIntent.getActivity( + mContext, + 0, + intent, + flags + ); + } +} + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils2.java similarity index 83% rename from powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils.java rename to powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils2.java index 5bcb692..a2fe111 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationUtils2.java @@ -18,14 +18,15 @@ import android.media.RingtoneManager; import android.os.Build; import android.view.View; import android.widget.RemoteViews; +import androidx.annotation.RequiresApi; import cc.winboll.studio.powerbell.MainActivity; import cc.winboll.studio.powerbell.R; import cc.winboll.studio.powerbell.beans.NotificationMessage; import cc.winboll.studio.powerbell.services.ControlCenterService; -public class NotificationUtils { +public class NotificationUtils2 { - public static final String TAG = NotificationUtils.class.getSimpleName(); + public static final String TAG = NotificationHelper.class.getSimpleName(); Context mContext; NotificationManager mNotificationManager; @@ -45,19 +46,53 @@ public class NotificationUtils { private static String _mszChannelIDRemind = "2"; private static String _mszChannelNameRemind = "Remind"; - public NotificationUtils(Context context) { +// public NotificationUtils(Context context) { +// mContext = context; +// mNotificationManager = (NotificationManager) context.getSystemService( +// Context.NOTIFICATION_SERVICE); +// } + + public NotificationUtils2(Context context) { mContext = context; - mNotificationManager = (NotificationManager) context.getSystemService( - Context.NOTIFICATION_SERVICE); + mNotificationManager = context.getSystemService(NotificationManager.class); + //createNotificationChannels(); } - public void createNotificationChannel() { - NotificationChannel channel1 = new NotificationChannel(_mszChannelIDService, _mszChannelNameService, NotificationManager.IMPORTANCE_DEFAULT); - channel1.setSound(null, null); - mNotificationManager.createNotificationChannel(channel1); - NotificationChannel channel2 = new NotificationChannel(_mszChannelIDRemind, _mszChannelNameRemind, NotificationManager.IMPORTANCE_HIGH); - channel2.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE), Notification.AUDIO_ATTRIBUTES_DEFAULT); - mNotificationManager.createNotificationChannel(channel2); + @RequiresApi(api = Build.VERSION_CODES.O) + public void createNotificationChannels() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + createServiceChannel(); + createRemindChannel(); + } + } + + @RequiresApi(api = Build.VERSION_CODES.O) + private void createServiceChannel() { + NotificationChannel channel = new NotificationChannel( + _mszChannelIDService, + _mszChannelNameService, + NotificationManager.IMPORTANCE_LOW + ); + channel.setDescription("Background service updates"); + channel.setSound(null, null); + channel.enableVibration(false); + mNotificationManager.createNotificationChannel(channel); + } + + @RequiresApi(api = Build.VERSION_CODES.O) + private void createRemindChannel() { + NotificationChannel channel = new NotificationChannel( + _mszChannelIDRemind, + _mszChannelNameRemind, + NotificationManager.IMPORTANCE_HIGH + ); + channel.setDescription("Critical reminders"); + channel.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM), null); + channel.enableVibration(true); + channel.setVibrationPattern(new long[]{100, 200, 300, 400}); + channel.setBypassDnd(true); + channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC); + mNotificationManager.createNotificationChannel(channel); } // 创建并发送服务通知 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/UriUtil.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/UriUtil.java index 062894d..1adb60d 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/UriUtil.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/UriUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.powerbell.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/28 04:23:04 * @Describe UriUtil */ diff --git a/powerbell/src/main/res/drawable/divider_line.xml b/powerbell/src/main/res/drawable/divider_line.xml new file mode 100644 index 0000000..f9365df --- /dev/null +++ b/powerbell/src/main/res/drawable/divider_line.xml @@ -0,0 +1,7 @@ + + + + diff --git a/powerbell/src/main/res/layout/activity_about.xml b/powerbell/src/main/res/layout/activity_about.xml index db74ef6..2a679e4 100644 --- a/powerbell/src/main/res/layout/activity_about.xml +++ b/powerbell/src/main/res/layout/activity_about.xml @@ -6,20 +6,26 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="wrap_content"> - + + + + + diff --git a/powerbell/src/main/res/layout/activity_backgroundpicture.xml b/powerbell/src/main/res/layout/activity_backgroundpicture.xml index 348b505..32197b4 100644 --- a/powerbell/src/main/res/layout/activity_backgroundpicture.xml +++ b/powerbell/src/main/res/layout/activity_backgroundpicture.xml @@ -26,29 +26,27 @@ android:layout_height="wrap_content" android:layout_below="@id/toolbar"> - + + android:id="@+id/activitybackgroundpictureAButton5" + android:layout_alignParentLeft="true" + android:layout_margin="5dp"/> + android:id="@+id/activitybackgroundpictureAButton4" + android:layout_alignParentRight="true" + android:layout_margin="5dp"/> - + + + + + + + + diff --git a/powerbell/src/main/res/layout/activity_main.xml b/powerbell/src/main/res/layout/activity_main.xml index 031be4a..874c31a 100644 --- a/powerbell/src/main/res/layout/activity_main.xml +++ b/powerbell/src/main/res/layout/activity_main.xml @@ -33,10 +33,10 @@ - diff --git a/powerbell/src/main/res/layout/custom_notification.xml b/powerbell/src/main/res/layout/custom_notification.xml new file mode 100644 index 0000000..53ddf4b --- /dev/null +++ b/powerbell/src/main/res/layout/custom_notification.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/powerbell/src/main/res/layout/custom_notification_expanded.xml b/powerbell/src/main/res/layout/custom_notification_expanded.xml new file mode 100644 index 0000000..b93059b --- /dev/null +++ b/powerbell/src/main/res/layout/custom_notification_expanded.xml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/powerbell/src/main/res/layout/item_battery_report.xml b/powerbell/src/main/res/layout/item_battery_report.xml new file mode 100644 index 0000000..048d3a8 --- /dev/null +++ b/powerbell/src/main/res/layout/item_battery_report.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/powerbell/src/main/res/menu/toolbar_main.xml b/powerbell/src/main/res/menu/toolbar_main.xml index 3518127..dce9de9 100644 --- a/powerbell/src/main/res/menu/toolbar_main.xml +++ b/powerbell/src/main/res/menu/toolbar_main.xml @@ -1,5 +1,8 @@ + diff --git a/powerbell/src/main/res/values-zh/strings.xml b/powerbell/src/main/res/values-zh/strings.xml index b0bea11..5773772 100644 --- a/powerbell/src/main/res/values-zh/strings.xml +++ b/powerbell/src/main/res/values-zh/strings.xml @@ -1,7 +1,7 @@ 能源钟 - 手机电量变化铃声提醒应用。 + 一个接收手机电量信息的应用,当电量值达到设定范围时会提醒用户。 本应用崩溃了,作者水平有限,敬请谅解! Main View About diff --git a/powerbell/src/main/res/values/attrs.xml b/powerbell/src/main/res/values/attrs.xml index f0b8edb..045e125 100644 --- a/powerbell/src/main/res/values/attrs.xml +++ b/powerbell/src/main/res/values/attrs.xml @@ -1,9 +1,3 @@ - - - - - - diff --git a/powerbell/src/main/res/values/colors.xml b/powerbell/src/main/res/values/colors.xml index a5e1a53..800b26b 100644 --- a/powerbell/src/main/res/values/colors.xml +++ b/powerbell/src/main/res/values/colors.xml @@ -25,7 +25,7 @@ #FF0072A4 #FF33C1FF #FFFCC500 - @color/colorShui + @color/colorShuiDark @color/colorFeng @color/colorShui #FFFFFF00 diff --git a/powerbell/src/main/res/values/strings.xml b/powerbell/src/main/res/values/strings.xml index b3be1aa..c70425a 100644 --- a/powerbell/src/main/res/values/strings.xml +++ b/powerbell/src/main/res/values/strings.xml @@ -2,10 +2,11 @@ PowerBell PowerBell - Mobile phone power change ringtone alert app. + A mobile app that receives battery level information from a phone and alerts the user when the battery level reaches a predefined range. This application has crashed, the author level is limited, please understand! Main View About + Battery Reporter Clear Record Change Picture Developer View diff --git a/powerbell/src/main/res/values/styles.xml b/powerbell/src/main/res/values/styles.xml index e3ee98a..6509201 100644 --- a/powerbell/src/main/res/values/styles.xml +++ b/powerbell/src/main/res/values/styles.xml @@ -1,9 +1,9 @@ - - + + diff --git a/timestamp/src/stage/AndroidManifest.xml b/timestamp/src/stage/AndroidManifest.xml new file mode 100644 index 0000000..9188677 --- /dev/null +++ b/timestamp/src/stage/AndroidManifest.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/timestamp/src/stage/res/values/strings.xml b/timestamp/src/stage/res/values/strings.xml new file mode 100644 index 0000000..ace0c41 --- /dev/null +++ b/timestamp/src/stage/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/App.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/App.java index 1d16348..f966b4d 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/App.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.watchoutputinstaller; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/04/28 02:39:58 * @Describe 全局应用类 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/beans/AppConfigs.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/beans/AppConfigs.java index 0c23563..dd9ce64 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/beans/AppConfigs.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/beans/AppConfigs.java @@ -1,7 +1,7 @@ package cc.winboll.studio.watchoutputinstaller.beans; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 17:36:01 * @Describe 应用配置数据类 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/receivers/MainReceiver.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/receivers/MainReceiver.java index deecc40..d5df6bf 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/receivers/MainReceiver.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/receivers/MainReceiver.java @@ -9,7 +9,7 @@ import cc.winboll.studio.watchoutputinstaller.services.MainService; import cc.winboll.studio.shared.log.LogUtils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/06/06 13:19:38 * @Describe 应用消息接收类 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/services/AssistantService.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/services/AssistantService.java index c17f2ff..b57c9cc 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/services/AssistantService.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/services/AssistantService.java @@ -10,7 +10,7 @@ import cc.winboll.studio.watchoutputinstaller.beans.AppConfigs; import cc.winboll.studio.watchoutputinstaller.utils.ServiceUtil; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 20:16:00 * @Describe MainService 守护进程服务 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/FileUtil.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/FileUtil.java index acf3d82..ff97d04 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/FileUtil.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/FileUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.watchoutputinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 17:56:31 * @Describe 文件管理类 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/PackageUtil.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/PackageUtil.java index a398770..466dc1a 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/PackageUtil.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/PackageUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.watchoutputinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/11 06:28:50 * @Describe 一个获取安卓APK安装文件的应用包名的函数 */ diff --git a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/ServiceUtil.java b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/ServiceUtil.java index 5e9f508..92a8b6e 100644 --- a/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/ServiceUtil.java +++ b/watchoutputinstaller/src/main/java/cc/winboll/studio/watchoutputinstaller/utils/ServiceUtil.java @@ -1,7 +1,7 @@ package cc.winboll.studio.watchoutputinstaller.utils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/05/27 20:20:03 * @Describe 服务类工具 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/intent/action.java b/winboll-shared/src/main/java/cc/winboll/studio/intent/action.java index 11040ad..49c10fc 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/intent/action.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/intent/action.java @@ -1,7 +1,7 @@ package cc.winboll.studio.intent; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/24 18:51:20 */ public class action { diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/AboutActivity.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/AboutActivity.java index 4d25be3..b3d9d68 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/AboutActivity.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/AboutActivity.java @@ -11,7 +11,7 @@ import cc.winboll.studio.shared.app.WinBollActivityManager; import cc.winboll.studio.shared.log.LogUtils; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/14 13:20:33 * @Describe AboutFragment Test */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/HelpActivity.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/HelpActivity.java index 404081b..8f2b1a1 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/HelpActivity.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/activities/HelpActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.activities; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/03 11:02:49 * @Describe HelpActivity */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/ads/ADsView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/ads/ADsView.java index 46f09cc..b1ded9f 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/ads/ADsView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/ads/ADsView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.ads; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 15:37:35 * @Describe WinBoll 应用推广视图 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/AppVersionUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/AppVersionUtils.java index 4acc52c..e6e2ceb 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/AppVersionUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/AppVersionUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:45:35 * @Describe 应用版本工具集 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/BaseBean.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/BaseBean.java index b2e4dd3..7a3becd 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/BaseBean.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/BaseBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/23 15:40:30 * @Describe Json Bean 基础类。 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/CrashHandler.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/CrashHandler.java index 9c8ed54..84d8ce4 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/CrashHandler.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/CrashHandler.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:22:12 * @Describe 异常处理类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/FileUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/FileUtils.java index a8738e2..b5d4e02 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/FileUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:46:32 * @Describe 文件处理工具 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/MyActivityLifecycleCallbacks.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/MyActivityLifecycleCallbacks.java index a56187b..1b2e57f 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/MyActivityLifecycleCallbacks.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/MyActivityLifecycleCallbacks.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/24 11:02:08 */ import android.app.Activity; diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivity.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivity.java index 1ac6bc5..f5f8310 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivity.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:32:08 * @Describe WinBoll 活动窗口基础类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivityManager.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivityManager.java index f72f875..7ec43d7 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivityManager.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/app/WinBollActivityManager.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.app; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 16:09:15 * @Describe 应用活动窗口管理器 * 参考 : diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/bean/DebugBean.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/bean/DebugBean.java index 624c4c7..c9defd7 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/bean/DebugBean.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/bean/DebugBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.bean; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/25 12:38:07 * @Describe 应用调试配置类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/git/IAPPFiles.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/git/IAPPFiles.java index ab73ff7..e2c10ed 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/git/IAPPFiles.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/git/IAPPFiles.java @@ -8,7 +8,7 @@ import java.util.HashMap; import java.util.Map; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 12:30:59 * @Describe 应用文件接口基础类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogActivity.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogActivity.java index aa18d3f..85c3757 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogActivity.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogActivity.java @@ -9,7 +9,7 @@ import cc.winboll.studio.shared.app.WinBollApplication; import android.view.View; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 15:07:58 * @Describe WinBoll 应用日志窗口 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtils.java index f43e0b7..ebd8715 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.log; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 13:44:06 * @Describe LogUtils * @Describe 应用日志类 diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsBean.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsBean.java index 2cc02ad..4e132f4 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsBean.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.log; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/23 15:39:07 * @Describe LogUtils 数据配置类。 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsClassTAGBean.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsClassTAGBean.java index 06e38ea..1e62a76 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsClassTAGBean.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogUtilsClassTAGBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.log; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/04 14:17:02 * @Describe 日志类class TAG 标签数据类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogView.java index 22375ae..be0abe7 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.log; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:36:18 * @Describe 日志视图类,继承 RelativeLayout 类。 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogViewThread.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogViewThread.java index 05e0e98..b0e495b 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogViewThread.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/log/LogViewThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.log; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:43:50 * @Describe 日志视图线程类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/AssistantService.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/AssistantService.java index 8d16ef6..8b64fbd 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/AssistantService.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.service; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 20:15:42 * @Describe 应用主要服务组件类守护进程服务组件类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/EWUIStatusIconDrawable.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/EWUIStatusIconDrawable.java index d4e05bb..75ade97 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/EWUIStatusIconDrawable.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/EWUIStatusIconDrawable.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.service; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 08:37:31 * @Describe WinBoll UI 状态图标枚举 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/IWinBollClientServiceBinder.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/IWinBollClientServiceBinder.java index 69b9e30..a602bb0 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/IWinBollClientServiceBinder.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/IWinBollClientServiceBinder.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.service; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 23:40:05 * @Describe WinBollService 服务 Binder。 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientService.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientService.java index 1823638..25e7c3d 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientService.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientService.java @@ -16,7 +16,7 @@ import java.io.FileDescriptor; import android.graphics.drawable.Drawable; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 19:42:07 * @Describe WinBoll 客户端服务 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientServiceBean.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientServiceBean.java index 691ed53..a41bc86 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientServiceBean.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollClientServiceBean.java @@ -6,7 +6,7 @@ import android.util.JsonWriter; import android.content.Context; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 19:44:57 * @Describe WinBollService 运行参数配置 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollMail.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollMail.java index 0c714c1..74352ea 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollMail.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/service/WinBollMail.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.service; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/09 08:19:06 * @Describe WinBoll 邮件服务 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/FileUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/FileUtils.java index ae74c86..97c2927 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/FileUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/FileUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/07/19 14:30:57 * @Describe 文件工具类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/MD5Utils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/MD5Utils.java index e434f8a..c083d33 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/MD5Utils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/MD5Utils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/19 15:26:58 */ import java.math.BigInteger; diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/PrefUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/PrefUtils.java index b3c8f41..a1efe4f 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/PrefUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/PrefUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/11/28 15:03:12 * @Describe 应用变量保存工具 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/ServiceUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/ServiceUtils.java index c65b076..da87161 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/ServiceUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/ServiceUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/08 20:09:02 * @Describe 应用服务组件工具类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/UriUtils.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/UriUtils.java index aad77f8..2d2a6aa 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/util/UriUtils.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/util/UriUtils.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.util; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Describe Uri 资源管理工具类 */ import android.content.ContentResolver; diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/AboutView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/AboutView.java index b47970b..1355069 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/AboutView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/AboutView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.view; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:38:03 * @Describe AboutView */ @@ -200,7 +200,7 @@ public class AboutView extends LinearLayout { //.addItem(versionElement) //.addItem(adsElement) //.addGroup("Connect with us") - .addEmail("ZhanGSKen@QQ.COM") + .addEmail("ZhanGSKen") .addWebsite(mszHomePage) .addItem(elementAppMode) .addItem(elementGitWeb) diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/SimpleWebView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/SimpleWebView.java index 9f26804..82a7fb6 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/SimpleWebView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/SimpleWebView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.view; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/03 11:05:45 * @Describe 简单网页视图类 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/StringToQrCodeView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/StringToQrCodeView.java index fe7113d..5c0a571 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/StringToQrCodeView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/StringToQrCodeView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.view; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/19 13:49:14 */ import android.content.Context; diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/WinBollServiceStatusView.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/WinBollServiceStatusView.java index 760978a..61fd6b1 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/WinBollServiceStatusView.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/WinBollServiceStatusView.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.view; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/07 20:15:47 * @Describe WinBoll 服务主机连接状态视图 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/YesNoAlertDialog.java b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/YesNoAlertDialog.java index d3b6e30..4bdeef2 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/shared/view/YesNoAlertDialog.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/shared/view/YesNoAlertDialog.java @@ -1,7 +1,7 @@ package cc.winboll.studio.shared.view; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/08/12 14:46:25 * @Describe 询问用户确定与否的选择框 */ diff --git a/winboll-shared/src/main/java/cc/winboll/studio/unittest/UnitTestActivity.java b/winboll-shared/src/main/java/cc/winboll/studio/unittest/UnitTestActivity.java index 1f54981..626495d 100644 --- a/winboll-shared/src/main/java/cc/winboll/studio/unittest/UnitTestActivity.java +++ b/winboll-shared/src/main/java/cc/winboll/studio/unittest/UnitTestActivity.java @@ -16,7 +16,7 @@ import com.hjq.toast.ToastUtils; import java.util.UUID; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/19 14:00:26 */ public class UnitTestActivity extends WinBollActivity { diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/App.java b/winboll/src/main/java/cc/winboll/studio/appbase/App.java index 74f9bbc..4db9ad0 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/App.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2025/01/05 09:54:42 * @Describe APPbase 应用类 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/MyTileService.java b/winboll/src/main/java/cc/winboll/studio/appbase/MyTileService.java index 3f3fcca..457d8e7 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/MyTileService.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/MyTileService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 19:30:10 */ import android.content.Context; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/WinBollActivityBase.java b/winboll/src/main/java/cc/winboll/studio/appbase/WinBollActivityBase.java index 54765d8..a168459 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/WinBollActivityBase.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/WinBollActivityBase.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/28 15:34:16 * @Describe 应用活动窗口基类 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java b/winboll/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java index 37f4422..f71b94b 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/activities/New2Activity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 11:46:40 * @Describe 测试窗口2 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java b/winboll/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java index 907c3ad..eca3d4d 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/activities/NewActivity.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.activities; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/25 05:04:22 */ import android.app.Activity; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java b/winboll/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java index 9bda14b..db180e9 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/handlers/MainServiceHandler.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.handlers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:51:40 */ import android.os.Handler; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java b/winboll/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java index 5df134e..0e125ea 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/models/MainServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 07:06:13 */ import android.util.JsonReader; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java b/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java index f702494..fccca87 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoBindServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:47:22 * @Describe TestServiceBean */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java b/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java index 90f7518..c1398e3 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/models/TestDemoServiceBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:49:21 * @Describe TestDemoServiceBean */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/models/WinBollNewsBean.java b/winboll/src/main/java/cc/winboll/studio/appbase/models/WinBollNewsBean.java index 66ee6b6..13c5f3a 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/models/WinBollNewsBean.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/models/WinBollNewsBean.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.models; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/17 10:05:09 * @Describe APPSOSReportBean */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java b/winboll/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java index 70561c9..0943119 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/receivers/APPNewsWidgetClickListener.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.receivers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/24 07:11:44 */ import android.content.BroadcastReceiver; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java b/winboll/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java index 498f877..fe1b037 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/receivers/MainReceiver.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.receivers; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:58:04 * @Describe 主要广播接收器 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java b/winboll/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java index 8db3f50..e5436c6 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/services/AssistantService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:38:31 * @Describe 守护进程服务 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/services/MainService.java b/winboll/src/main/java/cc/winboll/studio/appbase/services/MainService.java index fdbbd62..a14e3ef 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/services/MainService.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/services/MainService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/13 06:56:41 * @Describe 拨号主服务 * 参考: diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java b/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java index 14209de..51e65f6 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoBindService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:45:49 * @Describe 启动时申请绑定到APPBase主服务的服务示例 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java b/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java index 6098dce..8d97def 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/services/TestDemoService.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.services; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/03/07 12:39:24 * @Describe 普通服务示例 */ diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java b/winboll/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java index 25d7231..917e7f2 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/threads/MainServiceThread.java @@ -1,7 +1,7 @@ package cc.winboll.studio.appbase.threads; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/14 03:46:44 */ import android.content.Context; diff --git a/winboll/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java b/winboll/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java index c844983..c3017cc 100644 --- a/winboll/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java +++ b/winboll/src/main/java/cc/winboll/studio/appbase/widgets/APPNewsWidget.java @@ -1,6 +1,6 @@ package cc.winboll.studio.appbase.widgets; /** - * @Author ZhanGSKen@AliYun.Com + * @Author ZhanGSKen * @Date 2025/02/15 14:41:25 * @Describe TimeWidget */ diff --git a/wvmapp/src/main/java/cc/winboll/studio/wvmapp/App.java b/wvmapp/src/main/java/cc/winboll/studio/wvmapp/App.java index 99a3209..f4961c2 100644 --- a/wvmapp/src/main/java/cc/winboll/studio/wvmapp/App.java +++ b/wvmapp/src/main/java/cc/winboll/studio/wvmapp/App.java @@ -1,7 +1,7 @@ package cc.winboll.studio.wvmapp; /** - * @Author ZhanGSKen@QQ.COM + * @Author ZhanGSKen * @Date 2024/12/20 08:34:57 * @Describe 全局应用 */