feat: 安装流程优化-2024/7/31-优化补充 https://jira.shanqu.cc/browse/GHZSCY-6368
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
This commit is contained in:
@ -36,6 +36,8 @@ public class NDownloadService extends Service {
|
||||
public static final String KEY_SERVICE_ACTION = "service_action";
|
||||
public static final String START_FOREGROUND = "start_foreground";
|
||||
|
||||
public static final String ACTION_SHOW_SUSPEND_WINDOW = "action_show_suspend_window";
|
||||
|
||||
private static final String SERVICE_CHANNEL_ID = "Halo_Download";
|
||||
|
||||
private static NDownloadService sService = null;
|
||||
@ -73,6 +75,10 @@ public class NDownloadService extends Service {
|
||||
|
||||
if (START_FOREGROUND.equals(serviceAction)) {
|
||||
startForegroundIfNeeded(randomNotificationId);
|
||||
} else if (ACTION_SHOW_SUSPEND_WINDOW.equals(serviceAction)) {
|
||||
DownloadEntity entry = (DownloadEntity) intent.getSerializableExtra(DownloadConfig.KEY_DOWNLOAD_ENTRY);
|
||||
showDownloadSuspendWindowIfNeeded(entry);
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
|
||||
String statusString = intent.getStringExtra(DownloadConfig.KEY_DOWNLOAD_ACTION);
|
||||
|
||||
Reference in New Issue
Block a user