Null check cursor
Mock provider is returning null on this query in testing. b/12085240 Change-Id: Ifa5edc03707a6050acdbd5184a44409d46004e7e
This commit is contained in:
parent
05723aa0f6
commit
b9d071a493
@ -115,7 +115,7 @@ public class MailActivityEmail extends com.android.mail.ui.MailActivity {
|
||||
Account.CONTENT_URI,
|
||||
Account.ID_PROJECTION,
|
||||
null, null, null);
|
||||
boolean enable = c.getCount() > 0;
|
||||
boolean enable = c != null && c.getCount() > 0;
|
||||
setServicesEnabled(context, enable);
|
||||
return enable;
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user