mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-02-26 16:47:45 +01:00
Don't use Intent.resolveActivity()
This commit is contained in:
parent
995f5277cc
commit
d5e0793494
@ -1,6 +1,7 @@
|
||||
package dummydomain.yetanothercallblocker;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -322,9 +323,10 @@ public class BlacklistActivity extends AppCompatActivity {
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType("*/*");
|
||||
|
||||
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||
try {
|
||||
startActivityForResult(intent, REQUEST_CODE_IMPORT);
|
||||
} else {
|
||||
} catch (ActivityNotFoundException e) {
|
||||
LOG.warn("onImportBlacklistClicked()", e);
|
||||
Toast.makeText(this, R.string.error, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user