Skip to content
Browse files

SuppressLint("MissingPermission") in Location, NetInfo, Vibration mod… (


Location, NetInfo and Vibration modules require its own permissions to work properly, and Android Studio and lint shows warning in the modules because permissions are not found in AndroidManifest.xml of ReactAndroid, due to that not all apps require these functionalities/permissions. Therefore, developers have to add required permissions if they want to use before mentioned functionalities.

This PR suppresses missing permission warnings.

[Android] [Changed] - Suppress missing permission warnings
Pull Request resolved: #23294

Differential Revision: D13959120

Pulled By: cpojer

fbshipit-source-id: 10526f1218989b805528a5415e03371d5865be63
  • Loading branch information...
dulmandakh authored and facebook-github-bot committed Feb 5, 2019
1 parent 38eb2a7 commit d53dbb0dfb99bdee5cd7eeaaa6f4ae51dcca00c5
@@ -7,6 +7,7 @@

package com.facebook.react.modules.location;

import android.annotation.SuppressLint;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
@@ -32,6 +33,7 @@
* Native module that exposes Geolocation to JS.
@ReactModule(name = LocationModule.NAME)
public class LocationModule extends ReactContextBaseJavaModule {

@@ -7,6 +7,7 @@

package com.facebook.react.modules.netinfo;

import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -30,6 +31,7 @@
* Module that monitors and provides information about the connectivity state of the device.
@ReactModule(name = NetInfoModule.NAME)
public class NetInfoModule extends ReactContextBaseJavaModule
implements LifecycleEventListener {
@@ -7,6 +7,7 @@

package com.facebook.react.modules.vibration;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Vibrator;

@@ -16,6 +17,7 @@
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.module.annotations.ReactModule;

@ReactModule(name = VibrationModule.NAME)
public class VibrationModule extends ReactContextBaseJavaModule {

0 comments on commit d53dbb0

Please sign in to comment.
You can’t perform that action at this time.