mirror of https://github.com/M66B/FairEmail.git
Added fail-safe
This commit is contained in:
parent
9cf72bc018
commit
7b78f30037
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue