зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1771164 - Have WDBA wait up to 12 hours for an interaction with the browser changed notification, and have notification remain on screen until user interacts with it. r=bhearsum,bytesized
No changes are needed to re-register the task with the extended `ExecutionTimeLimit` as that is handled by `PostUpdate` via calling `wdba` with the argument `register-task`. Differential Revision: https://phabricator.services.mozilla.com/D147374
This commit is contained in:
Родитель
49185fa716
Коммит
c7aaaea82e
|
@ -28,9 +28,9 @@
|
|||
|
||||
#define SEVEN_DAYS_IN_SECONDS (7 * 24 * 60 * 60)
|
||||
|
||||
// If the notification hasn't been activated or dismissed within 30 minutes,
|
||||
// If the notification hasn't been activated or dismissed within 12 hours,
|
||||
// stop waiting for it.
|
||||
#define NOTIFICATION_WAIT_TIMEOUT_MS (30 * 60 * 1000)
|
||||
#define NOTIFICATION_WAIT_TIMEOUT_MS (12 * 60 * 60 * 1000)
|
||||
// If the mutex hasn't been released within a few minutes, something is wrong
|
||||
// and we should give up on it
|
||||
#define MUTEX_TIMEOUT_MS (10 * 60 * 1000)
|
||||
|
@ -523,6 +523,7 @@ static NotificationActivities ShowNotification(
|
|||
toastTemplate.addAction(toastStrings->action1.get());
|
||||
toastTemplate.addAction(toastStrings->action2.get());
|
||||
toastTemplate.setImagePath(absImagePath.get());
|
||||
toastTemplate.setScenario(WinToastTemplate::Scenario::Reminder);
|
||||
ToastHandler* handler =
|
||||
new ToastHandler(whichNotification, isEnglishInstall, event.get(), aumi);
|
||||
INT64 id = WinToast::instance()->showToast(toastTemplate, handler, &error);
|
||||
|
|
|
@ -143,9 +143,12 @@ HRESULT RegisterTask(const wchar_t* uniqueToken,
|
|||
ENSURE(taskSettings->put_MultipleInstances(TASK_INSTANCES_IGNORE_NEW));
|
||||
ENSURE(taskSettings->put_StartWhenAvailable(VARIANT_TRUE));
|
||||
ENSURE(taskSettings->put_StopIfGoingOnBatteries(VARIANT_FALSE));
|
||||
// This cryptic string means "35 minutes". So, if the task runs for longer
|
||||
// than that, the process will be killed, because that should never happen.
|
||||
BStrPtr execTimeLimitBStr = BStrPtr(SysAllocString(L"PT35M"));
|
||||
// This cryptic string means "12 hours 5 minutes". So, if the task runs for
|
||||
// longer than that, the process will be killed, because that should never
|
||||
// happen. See
|
||||
// https://docs.microsoft.com/en-us/windows/win32/taskschd/tasksettings-executiontimelimit
|
||||
// for a detailed explanation of these strings.
|
||||
BStrPtr execTimeLimitBStr = BStrPtr(SysAllocString(L"PT12H5M"));
|
||||
ENSURE(taskSettings->put_ExecutionTimeLimit(execTimeLimitBStr.get()));
|
||||
|
||||
RefPtr<IRegistrationInfo> regInfo;
|
||||
|
|
Загрузка…
Ссылка в новой задаче