Merge "NPE check in the SyncStateContract BUG:5196483"
This commit is contained in:
@@ -74,6 +74,12 @@ public class SyncStateContract {
|
||||
Account account) throws RemoteException {
|
||||
Cursor c = provider.query(uri, DATA_PROJECTION, SELECT_BY_ACCOUNT,
|
||||
new String[]{account.name, account.type}, null);
|
||||
|
||||
// Unable to query the provider
|
||||
if (c == null) {
|
||||
throw new RemoteException();
|
||||
}
|
||||
|
||||
try {
|
||||
if (c.moveToNext()) {
|
||||
return c.getBlob(c.getColumnIndexOrThrow(Columns.DATA));
|
||||
@@ -123,6 +129,11 @@ public class SyncStateContract {
|
||||
Account account) throws RemoteException {
|
||||
Cursor c = provider.query(uri, DATA_PROJECTION, SELECT_BY_ACCOUNT,
|
||||
new String[]{account.name, account.type}, null);
|
||||
|
||||
if (c == null) {
|
||||
throw new RemoteException();
|
||||
}
|
||||
|
||||
try {
|
||||
if (c.moveToNext()) {
|
||||
long rowId = c.getLong(1);
|
||||
|
||||
Reference in New Issue
Block a user