case 12:
//号码长度为10则区号长度为3
String numberPref4 = number.substring(0, 4);
cursor = db.rawQuery(
"select city from info where area=?",
new String[]{numberPref4});
if(cursor.moveToFirst()){
address = cursor.getString(0);
}
cursor.close();
break;
case 4:
//电话号码为4位,则表示android模拟器自身
address = context.getApplicationContext().getResources().getString(R.string.emulator_number);
break;
default:
break;
}
}//end of big "else"
Log.i(TAG, "comingNumber is: " + number);
Log.i(TAG, "Arddess is: " + address);
db.close();
}