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:
committed by
Robert Greenwalt
parent
9e5b1a4902
commit
092238916f
@@ -377,4 +377,7 @@
|
|||||||
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
|
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
|
||||||
<string-array name="config_twoDigitNumberPattern">
|
<string-array name="config_twoDigitNumberPattern">
|
||||||
</string-array>
|
</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>
|
</resources>
|
||||||
|
|||||||
@@ -730,7 +730,14 @@ public class CDMAPhone extends PhoneBase {
|
|||||||
String number = null;
|
String number = null;
|
||||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
|
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
// TODO: The default value of voicemail number should be read from a system property
|
// TODO: The default value of voicemail number should be read from a system property
|
||||||
|
|
||||||
|
// 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");
|
number = sp.getString(VM_NUMBER_CDMA, "*86");
|
||||||
|
}
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user