From the android 4.4 KK version, the whole CB processing is put in the MMS process.
Cell broadcasting requires the SIM card to be properly initialized before you can enable the cell broadcasting. When the SIM card is searched, it indicates that the current SIM card has not been initialized successfully. In this case, there is no way to enable the cell broadcasting.
As the cell broadcasting runs in the MMS process, the MMS process runs abnormally and reports "information" to stop.
Make the following changes in cellbroadcastcheckbox. Java:
Use the following method:
Private void setcbstate (final Boolean state ){
Mmslog. D (log_tag, "setcbstate start ");
If (mlistener! = NULL ){
Mlistener. onstarted (cellbroadcastcheckbox. This, false );
}
New thread (New runnable (){
Public void run (){
Mmslog. D (log_tag, "activatecellbroadcastsms start ");
Boolean issetsuccess = encapsulatedsmsmanager. activatecellbroadcastsms (State, mslotid );
Mmslog. D (log_tag, "activatecellbroadcastsms end issetsuccess =" + issetsuccess );
If (! Issetsuccess ){
Handlesetstateresponse ();
} Else {
Recoverchannelsettings setting =
New recoverchannelsettings (mslotid, getcontext (). getcontentresolver ());
Setting. updatechannelstatus ();
If (mlistener! = NULL ){
Mlistener. onfinished (cellbroadcastcheckbox. This, false );
}
}
Mmslog. D (log_tag, "setcbstate end ");
}
}). Start ();
}
To:
Private void setcbstate (final Boolean state ){
Mmslog. D (log_tag, "setcbstate start ");
If (mlistener! = NULL ){
Mlistener. onstarted (cellbroadcastcheckbox. This, false );
}
Mmslog. D (log_tag, "activatecellbroadcastsms start ");
Boolean issetsuccess = encapsulatedsmsmanager. activatecellbroadcastsms (State, mslotid );
Mmslog. D (log_tag, "activatecellbroadcastsms end issetsuccess =" + issetsuccess );
If (! Issetsuccess ){
Handlesetstateresponse ();
} Else {
New thread (New runnable (){
Public void run (){
Recoverchannelsettings setting =
New recoverchannelsettings (mslotid, getcontext (). getcontentresolver ());
Setting. updatechannelstatus ();
If (mlistener! = NULL ){
Mlistener. onfinished (cellbroadcastcheckbox. This, false );
}
Mmslog. D (log_tag, "setcbstate end ");
}
}). Start ();
}
}
When the SIM card is being searched for, the community broadcast prompts "information" to report a shutdown.