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