bug when picking app to start

This commit is contained in:
jens 2022-05-09 20:09:11 +02:00
parent 52a10fe626
commit 3f36c4c6b3

View File

@ -378,7 +378,7 @@ public class ActivityManageActionStartActivity extends Activity
public void onClick(View v)
{
int targetSdkVersion = getApplicationContext().getApplicationInfo().targetSdkVersion;
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && targetSdkVersion >= 30)
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && targetSdkVersion >= 30 && shouldShowRequestPermissionRationale(Manifest.permission.QUERY_ALL_PACKAGES))
{
requestPermissions(new String[] {Manifest.permission.QUERY_ALL_PACKAGES}, requestCodeForRequestQueryAllPackagesPermission);
}