mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix lint error/warnings (#23333)
Summary: Fix lint errors and warning, which might be a cause of various crashes on older Android OS, using Android Support Library. ```bash ./gradlew :ReactAndroid:lint ``` [Android] [Changed] - fix lint error/warnings Pull Request resolved: https://github.com/facebook/react-native/pull/23333 Differential Revision: D14019322 Pulled By: mdvacca fbshipit-source-id: 74c98da269c318cf3b114c8d9c876186369f2b8c
This commit is contained in:
committed by
Facebook Github Bot
parent
8ccc55fbd3
commit
d2fc19f4aa
@@ -12,6 +12,7 @@ import javax.annotation.Nullable;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -67,6 +68,7 @@ public abstract class HeadlessJsTaskService extends Service implements HeadlessJ
|
||||
/**
|
||||
* Acquire a wake lock to ensure the device doesn't go to sleep while processing background tasks.
|
||||
*/
|
||||
@SuppressLint("WakelockTimeout")
|
||||
public static void acquireWakeLockNow(Context context) {
|
||||
if (sWakeLock == null || !sWakeLock.isHeld()) {
|
||||
PowerManager powerManager =
|
||||
|
||||
Reference in New Issue
Block a user