解决:铃声改变,来短信,短信设置中默认铃声的名称没有同步更新

来源:互联网 发布:mysql界面设置中文 编辑:程序博客网 时间:2024/05/03 23:01

短信界面没有关闭的情况下,在设置中进行操作,短信设置界面中不会进行刷新。因此在当MessagingPreferenceActivity处于活动(onResume)的时候重新初始化,添加代码如下:


    protected void onResume() {
        super.onResume();
        loadPrefs();

        // Since the enabled notifications pref can be changed outside of this activity,
        // we have to reload it whenever we resume.
        setEnabledNotificationsPref();
        // Initialize the sms signature
        updateSignatureStatus();
        registerListeners();
        boolean airplaneModeOn = isAirplaneModeOn();
        // Caused by the ICC card state maybe changed outside of this activity,
        // we need to update the state of the SMSC preference.
        updateSMSCPref(ALL_SUB, airplaneModeOn);
    }
0 0
原创粉丝点击