1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
/**
 * set default apn
 * @param id
 */
private void setDefaultApn(int id) {
    // TODO Auto-generated method stub
  ContentResolver cr = getContentResolver();
  ContentValues cv = new ContentValues();
  cv.put("apn_id", id);

  try {
    cr.update(preferapnUri, cv, null, null);
   } catch (Exception e) {
    // TODO Auto-generated catch block
       e.printStackTrace();
  }
}