Buggy code:
private void updateVoiceNumberField ( ) { } @ Override protected void onPrepareDialog ( int id , Dialog dialog ) { } @ Override protected Dialog onCreateDialog ( int id ) { } public void onClick ( DialogInterface dialog , int which ) { } private void showVMDialog ( int msgStatus ) { } @ Override protected void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; if ( MSimCallFeaturesSubSetting . DBG ) MSimCallFeaturesSubSetting . log ( ( "onCreate().<seq2seq4repair_space>Intent:<seq2seq4repair_space>" + ( getIntent ( ) ) ) ) ; addPreferencesFromResource ( msim_call_feature_sub_setting ) ; mSubId = PhoneUtils . getSubIdFromIntent ( getIntent ( ) ) ; mSubscriptionPrefFDN = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_FDN_KEY ) ) ) ; mSubscriptionPrefGSM = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_GSM_UMTS_OPTIONS ) ) ) ; mSubscriptionPrefCDMA = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_CDMA_OPTIONS ) ) ) ; mSubscriptionPrefFDN . getIntent ( ) . putExtra ( SUBSCRIPTION_KEY , mSubId ) ; mSubscriptionPrefGSM . getIntent ( ) . putExtra ( SUBSCRIPTION_KEY , mSubId ) ; mSubscriptionPrefCDMA . getIntent ( ) . putExtra ( SUBSCRIPTION_KEY , mSubId ) ; MSimCallFeaturesSubSetting . log ( ( "settings<seq2seq4repair_space>onCreate<seq2seq4repair_space>subscription<seq2seq4repair_space>=" + ( mSubId ) ) ) ; mPhone = PhoneUtils . getPhoneFromSubId ( mSubId ) ; mAudioManager = ( ( AudioManager ) ( getSystemService ( AUDIO_SERVICE ) ) ) ; PreferenceScreen prefSet = getPreferenceScreen ( ) ; mSubMenuVoicemailSettings = ( ( EditPhoneNumberPreference ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_VOICEMAIL_KEY ) ) ) ; if ( ( mSubMenuVoicemailSettings ) != null ) { mSubMenuVoicemailSettings . setParentActivity ( this , MSimCallFeaturesSubSetting . VOICEMAIL_PREF_ID , this ) ; mSubMenuVoicemailSettings . setDialogOnClosedListener ( this ) ; mSubMenuVoicemailSettings . setDialogTitle ( voicemail_settings_number_label ) ; } mRingtonePreference = ( ( DefaultRingtonePreference ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_RINGTONE_KEY ) ) ) ; if ( ( mRingtonePreference ) != null ) { mRingtonePreference . setSubId ( mPhone . getPhoneId ( ) ) ; } mVoicemailProviders = ( ( ListPreference ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_VOICEMAIL_PROVIDER_KEY ) ) ) ; if ( ( mVoicemailProviders ) != null ) { mVoicemailProviders . setOnPreferenceChangeListener ( this ) ; mVoicemailSettings = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_VOICEMAIL_SETTING_KEY ) ) ) ; mVoicemailNotificationRingtone = findPreference ( MSimCallFeaturesSubSetting . BUTTON_VOICEMAIL_NOTIFICATION_RINGTONE_KEY ) ; mVoicemailNotificationVibrate = ( ( CheckBoxPreference ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_VOICEMAIL_NOTIFICATION_VIBRATE_KEY ) ) ) ; mVoicemailNotificationVibrate . setOnPreferenceChangeListener ( this ) ; initVoiceMailProviders ( ) ; } if ( ! ( getResources ( ) . getBoolean ( world_phone ) ) ) { Preference options = prefSet . findPreference ( MSimCallFeaturesSubSetting . BUTTON_CDMA_OPTIONS ) ; if ( options != null ) prefSet . removePreference ( options ) ; options = prefSet . findPreference ( MSimCallFeaturesSubSetting . BUTTON_GSM_UMTS_OPTIONS ) ; if ( options != null ) prefSet . removePreference ( options ) ; int phoneType = mPhone . getPhoneType ( ) ; if ( phoneType == ( PhoneConstants . PHONE_TYPE_CDMA ) ) { Preference fdnButton = prefSet . findPreference ( MSimCallFeaturesSubSetting . BUTTON_FDN_KEY ) ; if ( fdnButton != null ) prefSet . removePreference ( fdnButton ) ; if ( ! ( getResources ( ) . getBoolean ( config_voice_privacy_disable ) ) ) { addPreferencesFromResource ( cdma_call_privacy ) ; } } else if ( phoneType == ( PhoneConstants . PHONE_TYPE_GSM ) ) { addPreferencesFromResource ( gsm_umts_call_options ) ; mSubscriptionPrefEXPAND = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_CF_EXPAND_KEY ) ) ) ; mSubscriptionPrefMOREEXPAND = ( ( PreferenceScreen ) ( findPreference ( MSimCallFeaturesSubSetting . BUTTON_MORE_EXPAND_KEY ) ) ) ; mSubscriptionPrefEXPAND . getIntent ( ) . putExtra ( SUBSCRIPTION_KEY , mSubId ) ; mSubscriptionPrefMOREEXPAND . getIntent ( ) . putExtra ( SUBSCRIPTION_KEY , mSubId ) ; } else { throw new IllegalStateException ( ( "Unexpected<seq2seq4repair_space>phone<seq2seq4repair_space>type:<seq2seq4repair_space>" + phoneType ) ) ; } } mContactListIntent = new Intent ( Intent . ACTION_GET_CONTENT ) ; mContactListIntent . setType ( CONTENT_ITEM_TYPE ) ; if ( icicle == null ) { if ( ( getIntent ( ) . getAction ( ) . equals ( MSimCallFeaturesSubSetting . ACTION_ADD_VOICEMAIL ) ) && ( ( mVoicemailProviders ) != null ) ) { if ( MSimCallFeaturesSubSetting . DBG ) { MSimCallFeaturesSubSetting . log ( ( "ACTION_ADD_VOICEMAIL<seq2seq4repair_space>Intent<seq2seq4repair_space>is<seq2seq4repair_space>thrown.<seq2seq4repair_space>current<seq2seq4repair_space>VM<seq2seq4repair_space>data<seq2seq4repair_space>size:<seq2seq4repair_space>" + ( mVMProvidersData . size ( ) ) ) ) ; } if ( ( mVMProvidersData . size ( ) ) > 1 ) { simulatePreferenceClick ( mVoicemailProviders ) ; } else { onPreferenceChange ( mVoicemailProviders , MSimCallFeaturesSubSetting . DEFAULT_VM_PROVIDER_KEY ) ; mVoicemailProviders . setValue ( MSimCallFeaturesSubSetting . DEFAULT_VM_PROVIDER_KEY ) ; } } } updateVoiceNumberField ( ) ; mVMProviderSettingsForced = false ; mRingtoneLookupRunnable = new Runnable ( ) { @ Override public void run ( ) { if ( ( mVoicemailNotificationRingtone ) != null ) { SettingsUtil . updateRingtoneName ( mPhone . getContext ( ) , mRingtoneLookupComplete , TYPE_NOTIFICATION , mVoicemailNotificationRingtone . getKey ( ) , MSimCallFeaturesSubSetting . MSG_UPDATE_VOICEMAIL_RINGTONE_SUMMARY ) ; } if ( ( mRingtonePreference ) != null ) { <START_BUG> SettingsUtil . updateRingtoneName ( mPhone . getContext ( ) , mRingtoneLookupComplete , TYPE_RINGTONE , mRingtonePreference , MSimCallFeaturesSubSetting . MSG_UPDATE_RINGTONE_SUMMARY , mPhone . getPhoneId ( ) ) ; <END_BUG> } } } ; ActionBar actionBar = getActionBar ( ) ; if ( actionBar != null ) { actionBar . setDisplayHomeAsUpEnabled ( true ) ; } } @ Override protected void onResume ( ) { } private boolean isAirplaneModeOn ( ) { } private static void log ( String msg ) { } private void updateVMPreferenceWidgets ( String currentProviderSetting ) { } private void initVoiceMailProviders ( ) { } private String makeKeyForActivity ( ActivityInfo ai ) { } private void simulatePreferenceClick ( Preference preference ) { } private void maybeSaveSettingsForVoicemailProvider ( String key , MSimCallFeaturesSubSetting . VoiceMailProviderSettings newSettings ) { } private MSimCallFeaturesSubSetting . VoiceMailProviderSettings loadSettingsForVoiceMailProvider ( String key ) { } private void deleteSettingsForVoicemailProvider ( String key ) { } private String getCurrentVoicemailProviderKey ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static void goUpToTopLevelSetting ( Activity activity ) { } }

Fix:
SettingsUtil . updateRingtoneName ( mPhone . getContext ( ) , mRingtoneLookupComplete , TYPE_RINGTONE , mRingtonePreference . getKey ( ) , MSimCallFeaturesSubSetting . MSG_UPDATE_RINGTONE_SUMMARY , mPhone . getPhoneId ( ) ) ;