OSDN Git Service

Check different CellLocation type in GsmDataConnectionTracker
authorKazuhiro Ondo <kazuhiro.ondo@motorola.com>
Sat, 2 Apr 2011 01:19:22 +0000 (20:19 -0500)
committerWink Saville <wink@google.com>
Fri, 8 Apr 2011 18:42:51 +0000 (11:42 -0700)
commit8968f9f6d47585daf0f81db3ba7f54b1d7ae3498
treed33973a28eedb58d1f15b3a79f81c83a97ddfa19
parent5203a5bc28a5ae432eab236780b2f97bdec71dbf
Check different CellLocation type in GsmDataConnectionTracker

Addressing phone app crash in GsmDataConnectionTracker when CDMALTEPhone
is used. CDMALTEPhone uses CDMA SST so getCellLocation() was returning
an instance of CdmaCellLocation. This was causing a crash when GsmDCT
type casts the instance as GsmCellLocation.

This patch tries to check the instance type before retrieving corresponding
cell id.

Change-Id: I6ac9cd4dc078552dc58d4d9350494a7b608c2b98
telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java