Skip to content

Commit 61adb41

Browse files
committed
fix: remove invalid handle validation that was rejecting valid callback handles
The handle validation was too strict and incorrectly rejected valid callback handles (including 0) which caused all initialize calls to fail in integration tests
1 parent 272779e commit 61adb41

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/WorkmanagerPlugin.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ class WorkmanagerPlugin :
4949
try {
5050
val handle = request.callbackHandle
5151

52-
// Validate the handle
53-
if (handle <= 0L) {
54-
callback(Result.failure(Exception("Invalid callback handle provided to initialize")))
55-
return
56-
}
57-
5852
// Save to SharedPreferences
5953
preferenceManager.saveCallbackDispatcherHandleKey(handle)
6054

0 commit comments

Comments
 (0)