Cleaning
This commit is contained in:
parent
681f40d2e7
commit
cba527375e
1 changed files with 2 additions and 2 deletions
|
@ -114,8 +114,8 @@ public class SettingsFragment extends Fragment implements View.OnClickListener,
|
||||||
case R.id.btn_camera:
|
case R.id.btn_camera:
|
||||||
//check for permission
|
//check for permission
|
||||||
// ActivityCompat.requestPermissions(parent, new String[]{Manifest.permission.CAMERA}, 1);
|
// ActivityCompat.requestPermissions(parent, new String[]{Manifest.permission.CAMERA}, 1);
|
||||||
if ((ActivityCompat.checkSelfPermission((MainActivity) getActivity(), android.Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED)
|
if ((ActivityCompat.checkSelfPermission(parent, android.Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED)
|
||||||
&&(ActivityCompat.checkSelfPermission((MainActivity) getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)) {
|
&&(ActivityCompat.checkSelfPermission(parent, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)) {
|
||||||
openCamera(view);
|
openCamera(view);
|
||||||
}else{
|
}else{
|
||||||
Toast.makeText(getActivity(), "No Camera or Storage Permissions granted.\n\"An App is nothing without its permissions\"", Toast.LENGTH_LONG).show();
|
Toast.makeText(getActivity(), "No Camera or Storage Permissions granted.\n\"An App is nothing without its permissions\"", Toast.LENGTH_LONG).show();
|
||||||
|
|
Loading…
Reference in a new issue