Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class com/facebook/react/DebugCorePackage$$ReactModuleInfoProvider : com/
public abstract class com/facebook/react/HeadlessJsTaskService : android/app/Service, com/facebook/react/jstasks/HeadlessJsTaskEventListener {
public static final field Companion Lcom/facebook/react/HeadlessJsTaskService$Companion;
public fun <init> ()V
public static final fun acquireWakeLockNow (Landroid/content/Context;)V
protected final fun getReactContext ()Lcom/facebook/react/bridge/ReactContext;
protected final fun getReactHost ()Lcom/facebook/react/ReactHost;
protected final fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public abstract class HeadlessJsTaskService : Service(), HeadlessJsTaskEventList
* Acquire a wake lock to ensure the device doesn't go to sleep while processing background
* tasks.
*/
@JvmStatic
@SuppressLint("WakelockTimeout")
public fun acquireWakeLockNow(context: Context) {
if (wakeLock == null || wakeLock?.isHeld == false) {
Expand Down