diff options
author | John Wang <johnwang@google.com> | 2011-09-21 18:56:49 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-09-21 18:56:49 -0700 |
commit | 5dbe9228a95c4ee5bfcdf2791634f59ce119c0e6 (patch) | |
tree | 6ad137212b9a5f2a1ccad6f3264ef04b55657a7c /policy/src/com/android | |
parent | 19662a6a084878bf1b408de29d3dd26199756d0d (diff) | |
parent | 6588bba33fbf2756253d19764022a743e13573e9 (diff) | |
download | frameworks_base-5dbe9228a95c4ee5bfcdf2791634f59ce119c0e6.zip frameworks_base-5dbe9228a95c4ee5bfcdf2791634f59ce119c0e6.tar.gz frameworks_base-5dbe9228a95c4ee5bfcdf2791634f59ce119c0e6.tar.bz2 |
am 6588bba3: Merge "Notify the sim state after callback registration." into ics-factoryrom
* commit '6588bba33fbf2756253d19764022a743e13573e9':
Notify the sim state after callback registration.
Diffstat (limited to 'policy/src/com/android')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java index 958f555..2a23709 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java @@ -484,6 +484,9 @@ public class KeyguardUpdateMonitor { public void registerInfoCallback(InfoCallback callback) { if (!mInfoCallbacks.contains(callback)) { mInfoCallbacks.add(callback); + // notify the register the current state right away + // TODO: need call other callback methods + callback.onRefreshCarrierInfo(mTelephonyPlmn, mTelephonySpn); } else { if (DEBUG) Log.e(TAG, "Object tried to add another INFO callback", new Exception("Whoops")); @@ -497,6 +500,10 @@ public class KeyguardUpdateMonitor { public void registerSimStateCallback(SimStateCallback callback) { if (!mSimStateCallbacks.contains(callback)) { mSimStateCallbacks.add(callback); + // notify the register the current sim state right away, + // otherwise the register won't receive any state until + // sim state gets changed again. + callback.onSimStateChanged(mSimState); } else { if (DEBUG) Log.e(TAG, "Object tried to add another SIM callback", new Exception("Whoops")); |