diff options
author | Wink Saville <wink@google.com> | 2011-05-26 18:19:08 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-26 18:19:08 -0700 |
commit | 885f8cd75f27ec6dc8ca75233bbcdc86ed041c8c (patch) | |
tree | f8417ed392bb68e6fbc3a5482fa2fef6b2a70c62 | |
parent | e55e5e7c406bdedc67c6e536c981146e2b335b43 (diff) | |
parent | 69d0855ed262ca1760bd81bae72a0565f53ca495 (diff) | |
download | frameworks_base-885f8cd75f27ec6dc8ca75233bbcdc86ed041c8c.zip frameworks_base-885f8cd75f27ec6dc8ca75233bbcdc86ed041c8c.tar.gz frameworks_base-885f8cd75f27ec6dc8ca75233bbcdc86ed041c8c.tar.bz2 |
Merge "DataConnection : Have a separate alarm for each APN type." into honeycomb-LTE
-rw-r--r-- | telephony/java/com/android/internal/telephony/DataConnectionTracker.java | 2 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java index 5ddfcd1..5d6aaa6 100644 --- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java @@ -304,7 +304,7 @@ public abstract class DataConnectionTracker extends Handler { mIsScreenOn = false; stopNetStatPoll(); startNetStatPoll(); - } else if (action.equals(getActionIntentReconnectAlarm())) { + } else if (action.startsWith(getActionIntentReconnectAlarm())) { log("Reconnect alarm. Previous state was " + mState); onActionIntentReconnectAlarm(intent); diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index e1a6fef..f6485a4 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -22,6 +22,7 @@ import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.content.Intent; +import android.content.IntentFilter; import android.database.ContentObserver; import android.database.Cursor; import android.net.ConnectivityManager; @@ -1427,7 +1428,13 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { AlarmManager am = (AlarmManager) mPhone.getContext().getSystemService(Context.ALARM_SERVICE); - Intent intent = new Intent(INTENT_RECONNECT_ALARM); + + // TODO : Register the receiver only once maybe in baseclass. + IntentFilter filter = new IntentFilter(); + filter.addAction(INTENT_RECONNECT_ALARM + '.'+apnContext.getApnType()); + mPhone.getContext().registerReceiver(mIntentReceiver, filter, null, mPhone); + + Intent intent = new Intent(INTENT_RECONNECT_ALARM + '.' + apnContext.getApnType()); intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_REASON, apnContext.getReason()); intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE, apnContext.getApnType()); apnContext.setReconnectIntent(PendingIntent.getBroadcast ( |