mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Do not display Snackbar to get location permissions
This commit is contained in:
parent
e8925f5a02
commit
fa238b94aa
1 changed files with 0 additions and 16 deletions
|
|
@ -275,22 +275,6 @@ public class ShareActivity
|
||||||
Timber.d("Uri: %s", mediaUri.toString());
|
Timber.d("Uri: %s", mediaUri.toString());
|
||||||
Timber.d("Ext storage dir: %s", Environment.getExternalStorageDirectory());
|
Timber.d("Ext storage dir: %s", Environment.getExternalStorageDirectory());
|
||||||
|
|
||||||
useNewPermissions = false;
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
useNewPermissions = true;
|
|
||||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
locationPermitted = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check location permissions if M or newer for category suggestions, request via snackbar if not present
|
|
||||||
if (!locationPermitted) {
|
|
||||||
requestPermissionUsingSnackBar(
|
|
||||||
getString(R.string.location_permission_rationale),
|
|
||||||
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
|
|
||||||
REQUEST_PERM_ON_CREATE_LOCATION);
|
|
||||||
}
|
|
||||||
|
|
||||||
SingleUploadFragment shareView = (SingleUploadFragment) getSupportFragmentManager().findFragmentByTag("shareView");
|
SingleUploadFragment shareView = (SingleUploadFragment) getSupportFragmentManager().findFragmentByTag("shareView");
|
||||||
categorizationFragment = (CategorizationFragment) getSupportFragmentManager().findFragmentByTag("categorization");
|
categorizationFragment = (CategorizationFragment) getSupportFragmentManager().findFragmentByTag("categorization");
|
||||||
if (shareView == null && categorizationFragment == null) {
|
if (shareView == null && categorizationFragment == null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue