File tree Expand file tree Collapse file tree
policy/src/com/android/internal/policy/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -484,6 +484,9 @@ interface SimStateCallback {
484484 public void registerInfoCallback (InfoCallback callback ) {
485485 if (!mInfoCallbacks .contains (callback )) {
486486 mInfoCallbacks .add (callback );
487+ // notify the register the current state right away
488+ // TODO: need call other callback methods
489+ callback .onRefreshCarrierInfo (mTelephonyPlmn , mTelephonySpn );
487490 } else {
488491 if (DEBUG ) Log .e (TAG , "Object tried to add another INFO callback" ,
489492 new Exception ("Whoops" ));
@@ -497,6 +500,10 @@ public void registerInfoCallback(InfoCallback callback) {
497500 public void registerSimStateCallback (SimStateCallback callback ) {
498501 if (!mSimStateCallbacks .contains (callback )) {
499502 mSimStateCallbacks .add (callback );
503+ // notify the register the current sim state right away,
504+ // otherwise the register won't receive any state until
505+ // sim state gets changed again.
506+ callback .onSimStateChanged (mSimState );
500507 } else {
501508 if (DEBUG ) Log .e (TAG , "Object tried to add another SIM callback" ,
502509 new Exception ("Whoops" ));
You can’t perform that action at this time.
0 commit comments