Skip to content

Commit 0b857f1

Browse files
committed
Removed unnecessary comparison
1 parent 9a8c15b commit 0b857f1

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

engine/src/java/com/runrev/android/Engine.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,16 +1900,13 @@ else if (p_source.equals("library"))
19001900

19011901
private void onCameraRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults)
19021902
{
1903-
if (requestCode == CAMERA_PERMISSION_REQUEST_CODE)
1903+
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
19041904
{
1905-
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
1906-
{
1907-
onCameraPermissionGranted(m_source);
1908-
}
1909-
else
1910-
{
1911-
doPhotoPickerError("Permission denied. You can change this in the Settings app");
1912-
}
1905+
onCameraPermissionGranted(m_source);
1906+
}
1907+
else
1908+
{
1909+
doPhotoPickerError("Permission denied. You can change this in the Settings app");
19131910
}
19141911
}
19151912

@@ -1925,7 +1922,6 @@ private void onLocationRequestPermissionResult(int requestCode, String[] permiss
19251922
}
19261923
}
19271924

1928-
19291925
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
19301926
{
19311927
if (requestCode == CAMERA_PERMISSION_REQUEST_CODE)

0 commit comments

Comments
 (0)