Skip to content

Commit 5dbe922

Browse files
John WangAndroid Git Automerger
authored andcommitted
am 6588bba: Merge "Notify the sim state after callback registration." into ics-factoryrom
* commit '6588bba33fbf2756253d19764022a743e13573e9': Notify the sim state after callback registration.
2 parents 19662a6 + 6588bba commit 5dbe922

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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"));

0 commit comments

Comments
 (0)