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 https://github.com/facebook/react-native/pull/15237

Differential Revision: D5509750

Pulled By: javache

fbshipit-source-id: 96a88251d2f7e4670537b18b40c1822610d4f072
This commit is contained in:
Ivan Zotov 2017-07-28 03:09:44 -07:00 committed by Facebook Github Bot
parent 2444c54654
commit 59da0660f2
1 changed files with 1 additions and 1 deletions

View File

@ -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)