Permalink
Browse files

Fix mistake acquireWakeLockNow in headless js section

Summary:
https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java#L72
Closes #15237

Differential Revision: D5509750

Pulled By: javache

fbshipit-source-id: 96a88251d2f7e4670537b18b40c1822610d4f072
  • Loading branch information...
ivanzotov authored and facebook-github-bot committed Jul 28, 2017
1 parent 2444c54 commit 59da0660f27b06d7b4f01621bb68818a7e58a7e3
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/HeadlessJSAndroid.md
@@ -73,6 +73,6 @@ getApplicationContext().startService(service);
## Caveats
* By default, your app will crash if you try to run a task while the app is in the foreground. This is to prevent developers from shooting themselves in the foot by doing a lot of work in a task and slowing the UI. You can pass a fourth `boolean` argument to control this behaviour.
* If you start your service from a `BroadcastReceiver`, make sure to call `HeadlessJsTaskService.acquireWakelockNow()` before returning from `onReceive()`.
* If you start your service from a `BroadcastReceiver`, make sure to call `HeadlessJsTaskService.acquireWakeLockNow()` before returning from `onReceive()`.
[0]: https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)

0 comments on commit 59da066

Please sign in to comment.