From 8fc6855066a3943d99e50af0269c907e583166ec Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Sat, 13 Dec 2025 21:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=B1=BB=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- powerbell/build.properties | 4 ++-- .../services/ControlCenterService.java | 20 +++++++++---------- .../utils/NotificationManagerUtils.java | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/powerbell/build.properties b/powerbell/build.properties index d637350..35e5de3 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Sat Dec 13 12:30:20 GMT 2025 +#Sat Dec 13 13:01:24 GMT 2025 stageCount=16 libraryProject= baseVersion=15.12 publishVersion=15.12.15 -buildCount=3 +buildCount=5 baseBetaVersion=15.12.16 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 1e28f3c..3c27024 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 @@ -23,15 +23,15 @@ import cc.winboll.studio.libappbase.ToastUtils; import cc.winboll.studio.powerbell.App; import cc.winboll.studio.powerbell.MainActivity; import cc.winboll.studio.powerbell.R; +import cc.winboll.studio.powerbell.handlers.ControlCenterServiceHandler; import cc.winboll.studio.powerbell.models.AppConfigBean; import cc.winboll.studio.powerbell.models.NotificationMessage; -import cc.winboll.studio.powerbell.handlers.ControlCenterServiceHandler; import cc.winboll.studio.powerbell.receivers.ControlCenterServiceReceiver; 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.NotificationHelper; +import cc.winboll.studio.powerbell.utils.NotificationManagerUtils; import cc.winboll.studio.powerbell.utils.ServiceUtils; import cc.winboll.studio.powerbell.utils.StringUtils; @@ -48,7 +48,7 @@ public class ControlCenterService extends Service { AppConfigUtils mAppConfigUtils; AppCacheUtils mAppCacheUtils; // 前台服务通知工具 - NotificationHelper mNotificationHelper; + NotificationManagerUtils mNotificationManagerUtils; Notification notification; RemindThread mRemindThread; ControlCenterServiceHandler mControlCenterServiceHandler; @@ -72,7 +72,7 @@ public class ControlCenterService extends Service { isServiceRunning = false; mAppConfigUtils = App.getAppConfigUtils(this); mAppCacheUtils = App.getAppCacheUtils(this); - mNotificationHelper = new NotificationHelper(ControlCenterService.this); + mNotificationManagerUtils = new NotificationManagerUtils(ControlCenterService.this); if (mMyServiceConnection == null) { @@ -101,10 +101,10 @@ public class ControlCenterService extends Service { wakeupAndBindAssistant(); // 显示前台通知栏 // 在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); + NotificationManagerUtils notificationManagerUtils = new NotificationManagerUtils(this); + //Intent intent = new Intent(this, MainActivity.class); + notificationManagerUtils.startForegroundServiceNotify(ControlCenterService.this, new NotificationMessage(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(); @@ -260,9 +260,9 @@ public class ControlCenterService extends Service { for (int i = 0; i < 20; i++) { msg += szRemindMSG; } - NotificationHelper helper = new NotificationHelper(ControlCenterService.this); + NotificationManagerUtils notificationManagerUtils = new NotificationManagerUtils(ControlCenterService.this); Intent intent = new Intent(ControlCenterService.this, MainActivity.class); - helper.showTemporaryNotification(intent, getString(R.string.app_name), msg); + notificationManagerUtils.showTempAlertNotify(intent, getString(R.string.app_name), msg); diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationManagerUtils.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationManagerUtils.java index 273c9d7..138c297 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationManagerUtils.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/utils/NotificationManagerUtils.java @@ -375,7 +375,7 @@ public class NotificationManagerUtils { * @param bigContentView 下拉大布局(可选) */ public void showCustomLayoutNotify(Intent targetIntent, RemoteViews contentView, RemoteViews bigContentView) { - LogUtils.d(TAG, "【自定义布局通知】开始构建,布局ID:" + (contentView != null ? contentView.getLayoutId() : "null")); + LogUtils.d(TAG, "【自定义布局通知】开始构建,布局ID:" + (contentView != null ? contentView.getLayoutId() : null)); if (contentView == null) { LogUtils.e(TAG, "【自定义布局通知】构建失败:普通布局contentView为空"); return;