mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 21:34:44 +02:00
Added fail-safe
This commit is contained in:
@@ -322,9 +322,10 @@ public class EmailProvider implements Parcelable {
|
||||
}
|
||||
|
||||
static EmailProvider getProvider(Context context, String id) throws FileNotFoundException {
|
||||
for (EmailProvider provider : loadProfiles(context))
|
||||
if (id.equals(provider.id))
|
||||
return provider;
|
||||
if (id != null)
|
||||
for (EmailProvider provider : loadProfiles(context))
|
||||
if (id.equals(provider.id))
|
||||
return provider;
|
||||
|
||||
throw new FileNotFoundException("provider id=" + id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user