Crespo4G: Voicemail: Add 'config_telephony_...' for Sprint

'*86' which is set now as a default at CDMAPhone.java,
is default voicemail number for Verizon.
For Sprint, we use user's own number for voicemail.

So we add codes in CDMAPhone.java to use
'config_telephony_use_own_number_for_voicemail',
and use config.xml to set this value as false.
Then we overlay Sprint's own config.xml file to
override 'config_telephony_use_own_number_for_voicemail' as a true.

Change-Id: I110914bdfa9a79aaba89d3b80edbcf044e9aabee
This commit is contained in:
Samyeoul Choi
2011-02-24 11:03:29 -08:00
committed by Robert Greenwalt
parent 9e5b1a4902
commit 092238916f
2 changed files with 11 additions and 1 deletions

View File

@@ -377,4 +377,7 @@
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
<string-array name="config_twoDigitNumberPattern">
</string-array>
<!-- The VoiceMail default value is displayed to my own number if it is true -->
<bool name="config_telephony_use_own_number_for_voicemail">false</bool>
</resources>

View File

@@ -730,7 +730,14 @@ public class CDMAPhone extends PhoneBase {
String number = null;
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
// TODO: The default value of voicemail number should be read from a system property
number = sp.getString(VM_NUMBER_CDMA, "*86");
// Read platform settings for dynamic voicemail number
if (getContext().getResources().getBoolean(com.android.internal
.R.bool.config_telephony_use_own_number_for_voicemail)) {
number = sp.getString(VM_NUMBER_CDMA, getLine1Number());
} else {
number = sp.getString(VM_NUMBER_CDMA, "*86");
}
return number;
}