Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Format
  • Loading branch information
hamdikahloun committed Oct 30, 2020
commit 358ab0be38e26ec34622b916f19550335c1f4f0d
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ private Boolean checkPermissions() {
ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_COARSE_LOCATION)
== PackageManager.PERMISSION_GRANTED;

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P &&
!grantedChangeWifiState && !grantedAccessFine && !grantedAccessCoarse) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P
&& !grantedChangeWifiState
&& !grantedAccessFine
&& !grantedAccessCoarse) {
Log.w(
TAG,
"Attempted to get Wi-Fi data that requires additional permission(s).\n"
Expand All @@ -111,8 +113,9 @@ private Boolean checkPermissions() {
return false;
}

if (Build.VERSION.SDK_INT == Build.VERSION_CODES.P &&
!grantedAccessFine && !grantedAccessCoarse) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.P
&& !grantedAccessFine
&& !grantedAccessCoarse) {
Log.w(
TAG,
"Attempted to get Wi-Fi data that requires additional permission(s).\n"
Expand All @@ -124,8 +127,8 @@ private Boolean checkPermissions() {
return false;
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q &&
(!grantedAccessFine || !grantedChangeWifiState)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
&& (!grantedAccessFine || !grantedChangeWifiState)) {
Log.w(
TAG,
"Attempted to get Wi-Fi data that requires additional permission(s).\n"
Expand Down