-
Notifications
You must be signed in to change notification settings - Fork 6
fix(reminder): 地点提醒常驻守护在进程被杀后无法恢复投递 #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
znnnnnnn-wil
merged 4 commits into
1024XEngineer:main
from
LUPENGHAN:fix/location-guard-stale-registration
Aug 29, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f7f558a
fix(reminder): 地点提醒常驻守护在进程被杀后无法恢复投递
LUPENGHAN 92f73c9
fix(reminder): 让 expo-task-manager 从本地源码编译,backport 上游修复才能真正生效
LUPENGHAN ff2d5bc
fix(reminder): 修复 CI 格式检查 + fennoai 审阅指出的两处失活恢复漏洞
LUPENGHAN ff6f5be
test: 集成测试改用 DEFAULT_GEOFENCE_RADIUS_METERS 常量,不再硬编码旧的 400
LUPENGHAN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| diff --git a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerInternalModule.java b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerInternalModule.java | ||
| index 1157a8d..f209272 100644 | ||
| --- a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerInternalModule.java | ||
| +++ b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerInternalModule.java | ||
| @@ -30,6 +30,7 @@ public class TaskManagerInternalModule implements InternalModule, TaskManagerInt | ||
|
|
||
| public TaskManagerInternalModule(Context context) { | ||
| mContextRef = new WeakReference<>(context); | ||
| + Log.i("TimeflowDiag", "TaskManagerInternalModule created id=" + System.identityHashCode(this)); | ||
| } | ||
|
|
||
| //region InternalModule | ||
| @@ -84,8 +85,11 @@ public class TaskManagerInternalModule implements InternalModule, TaskManagerInt | ||
| if (mEventsQueue != null) { | ||
| // `startObserving` on TaskManagerModule wasn't called yet - add event body to the queue. | ||
| mEventsQueue.add(body); | ||
| + Log.i("TimeflowDiag", "executeTaskWithBody QUEUED id=" + System.identityHashCode(this) | ||
| + + " queueSize=" + mEventsQueue.size()); | ||
| } else { | ||
| // Manager is already being observed by JS app, so we can execute the event immediately. | ||
| + Log.i("TimeflowDiag", "executeTaskWithBody EMIT id=" + System.identityHashCode(this)); | ||
| emitEvent(body); | ||
| } | ||
| } | ||
| @@ -101,6 +105,9 @@ public class TaskManagerInternalModule implements InternalModule, TaskManagerInt | ||
| @Override | ||
| public synchronized void flushQueuedEvents() { | ||
| // Execute any events that came before this call. | ||
| + Log.i("TimeflowDiag", "flushQueuedEvents called id=" + System.identityHashCode(this) | ||
| + + " queueWasNull=" + (mEventsQueue == null) | ||
| + + " queueSize=" + (mEventsQueue == null ? -1 : mEventsQueue.size())); | ||
| if (mEventsQueue != null) { | ||
| for (Bundle body : mEventsQueue) { | ||
| emitEvent(body); | ||
| @@ -188,8 +195,10 @@ public class TaskManagerInternalModule implements InternalModule, TaskManagerInt | ||
|
|
||
| private void emitEvent(Bundle body) { | ||
| if (mEmitEventWrapper != null) { | ||
| + Log.i("TimeflowDiag", "emitEvent -> mEmitEventWrapper.emit() id=" + System.identityHashCode(this)); | ||
| mEmitEventWrapper.emit(TaskManagerInterface.EVENT_NAME, body); | ||
| } else { | ||
| + Log.e("TimeflowDiag", "emitEvent SKIPPED: EmitEventWrapper is null, id=" + System.identityHashCode(this)); | ||
| Log.e("ExpoTaskManager", "EmitEventWrapper is not set. Failed to emit the TaskManager Event."); | ||
| } | ||
| } | ||
| diff --git a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerModule.kt b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerModule.kt | ||
| index fc42f02..58b6d06 100644 | ||
| --- a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerModule.kt | ||
| +++ b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskManagerModule.kt | ||
| @@ -81,14 +81,20 @@ class TaskManagerModule : Module() { | ||
| } | ||
|
|
||
| OnStartObserving { | ||
| + Log.i("TimeflowDiag", "OnStartObserving fired, internal id=" + System.identityHashCode(taskManagerInternal)) | ||
| val handler = Handler(Looper.getMainLooper()) | ||
| handler.postDelayed( | ||
| { | ||
| + Log.i("TimeflowDiag", "OnStartObserving delayed flush running, internal id=" + System.identityHashCode(taskManagerInternal)) | ||
| taskManagerInternal?.flushQueuedEvents() | ||
| }, | ||
| 1000 | ||
| ) | ||
| } | ||
| + | ||
| + OnStopObserving { | ||
| + Log.i("TimeflowDiag", "OnStopObserving fired, internal id=" + System.identityHashCode(taskManagerInternal)) | ||
| + } | ||
| } | ||
|
|
||
| private val appScopeKey: String | ||
| diff --git a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskService.java b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskService.java | ||
| index de829ca..8416444 100644 | ||
| --- a/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskService.java | ||
| +++ b/node_modules/expo-task-manager/android/src/main/java/expo/modules/taskManager/TaskService.java | ||
| @@ -242,6 +242,7 @@ public class TaskService implements SingletonModule, TaskServiceInterface { | ||
| // It may be called with null when the host activity is destroyed. | ||
| if (taskManager == null) { | ||
| sTaskManagers.remove(appScopeKey); | ||
| + sHeadlessTaskManagers.remove(appScopeKey); | ||
| return; | ||
| } | ||
|
|
||
| @@ -611,9 +612,7 @@ public class TaskService implements SingletonModule, TaskServiceInterface { | ||
| private void invalidateAppRecord(String appScopeKey) { | ||
| HeadlessAppLoader appLoader = getAppLoader(); | ||
| if (appLoader != null) { | ||
| - if (getAppLoader().invalidateApp(appScopeKey)) { | ||
| - sHeadlessTaskManagers.remove(appScopeKey); | ||
| - } | ||
| + appLoader.invalidateApp(appScopeKey); | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.