Permission

This commit is contained in:
Jens 2021-06-20 23:45:02 +02:00
parent e445b787a9
commit 07b0513eae

View File

@ -85,15 +85,6 @@ public class ActivityPermissions extends Activity
} }
}); });
// bRequestPermissions.setOnClickListener(new View.OnClickListener()
// {
// @Override
// public void onClick(View v)
// {
// finish();
// }
// });
bRequestPermissions.setOnClickListener(new View.OnClickListener() bRequestPermissions.setOnClickListener(new View.OnClickListener()
{ {
@Override @Override
@ -102,9 +93,6 @@ public class ActivityPermissions extends Activity
// Request the basic permissions, that are absolutely required. // Request the basic permissions, that are absolutely required.
//getRequiredPermissions(true); // request permissions to access sd card access and "receive boot completed" //getRequiredPermissions(true); // request permissions to access sd card access and "receive boot completed"
//fillPermissionMaps();
if(specificPermissionsToRequest != null) if(specificPermissionsToRequest != null)
requestSpecificPermission(specificPermissionsToRequest); requestSpecificPermission(specificPermissionsToRequest);
else else
@ -123,7 +111,6 @@ public class ActivityPermissions extends Activity
if(extras != null) if(extras != null)
{ {
specificPermissionsToRequest = extras.getStringArray(ActivityPermissions.intentExtraName);; specificPermissionsToRequest = extras.getStringArray(ActivityPermissions.intentExtraName);;
// requestSpecificPermission(permissionsToRequest);
tvPermissionsExplanationLong.setText(R.string.permissionsExplanationSmall); tvPermissionsExplanationLong.setText(R.string.permissionsExplanationSmall);
tvPermissionsExplanation.setText(""); tvPermissionsExplanation.setText("");
fillExplanationText(); fillExplanationText();
@ -940,15 +927,15 @@ public class ActivityPermissions extends Activity
startActivityForResult(intent, requestCodeForPermissionsNotifications); startActivityForResult(intent, requestCodeForPermissionsNotifications);
return; return;
} }
// else if (s.equalsIgnoreCase(permissionNameLocationBackground) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) else if (s.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
// { {
// requiredPermissions.remove(s); requiredPermissions.remove(s);
// cachedPermissionsToRequest = requiredPermissions; cachedPermissionsToRequest = requiredPermissions;
// Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
// intent.setData(Uri.parse("package:" + getPackageName())); intent.setData(Uri.parse("package:" + getPackageName()));
// startActivityForResult(intent, requestCodeForPermissionsBackgroundLocation); startActivityForResult(intent, requestCodeForPermissionsBackgroundLocation);
// return; return;
// } }
} }
} }