Fix cursor is empty in ApnEditor
If cursor.moveToFirst() returns false, the cursor is empty which cause crash. Check whether the curse is empty to fix. Fix: 288716180 Test: manual - on ApnEditor page Test: m RunSettingsRoboTests Change-Id: If850cd3feca3d3d520a653c2490d1049a8a87fdc
This commit is contained in:
@@ -1440,8 +1440,7 @@ public class ApnEditor extends SettingsPreferenceFragment
|
||||
null /* selection */,
|
||||
null /* selectionArgs */,
|
||||
null /* sortOrder */)) {
|
||||
if (cursor != null) {
|
||||
cursor.moveToFirst();
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
apnData = new ApnData(uri, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user