tags:

views:

13

answers:

0

Working with Android FroYo, I'd like to cause the RIL primitive named DEACTIVATE_DATA_CALL to appear in the logcat radio log. I can do it manually via GUI, I used the Delete APN menu to delete an existing APN and found the required RIL primitive. However I'd like to get the same log including the above RIL primitive using an automatic test. I wrote my own deleteAPN() test, (see code below) the APN was deleted from the menu, unfortunately the RIL primitive DEACTIVATE_DATA_CALL doesn't appear in the log.

My code:

String networkOperator = mTelephonyManager.getNetworkOperator(); 
if (networkOperator != null) { 

   String selection = "numeric = '" + networkOperator + "'"; 
   cursor = mTargetContext.getContentResolver().query(Telephony.Carriers.CONTENT_URI, null, selection, null, null);

   if (cursor != null){ 
      int idindex = cursor.getColumnIndex("_id"); 
      cursor.moveToFirst(); 
      int id = cursor.getShort(idindex); 

      mTargetContext.getContentResolver().delete(Telephony.Carriers.CONTENT_URI, selection, null );

      // finish(); 

   }
}