am 885f8cd7: Merge "DataConnection : Have a separate alarm for each APN type." into honeycomb-LTE
* commit '885f8cd75f27ec6dc8ca75233bbcdc86ed041c8c': DataConnection : Have a separate alarm for each APN type.
This commit is contained in:
@@ -304,7 +304,7 @@ public abstract class DataConnectionTracker extends Handler {
|
|||||||
mIsScreenOn = false;
|
mIsScreenOn = false;
|
||||||
stopNetStatPoll();
|
stopNetStatPoll();
|
||||||
startNetStatPoll();
|
startNetStatPoll();
|
||||||
} else if (action.equals(getActionIntentReconnectAlarm())) {
|
} else if (action.startsWith(getActionIntentReconnectAlarm())) {
|
||||||
log("Reconnect alarm. Previous state was " + mState);
|
log("Reconnect alarm. Previous state was " + mState);
|
||||||
onActionIntentReconnectAlarm(intent);
|
onActionIntentReconnectAlarm(intent);
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import android.content.ContentResolver;
|
|||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
import android.database.ContentObserver;
|
import android.database.ContentObserver;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
@@ -1427,7 +1428,13 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
|
|
||||||
AlarmManager am =
|
AlarmManager am =
|
||||||
(AlarmManager) mPhone.getContext().getSystemService(Context.ALARM_SERVICE);
|
(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_REASON, apnContext.getReason());
|
||||||
intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE, apnContext.getApnType());
|
intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE, apnContext.getApnType());
|
||||||
apnContext.setReconnectIntent(PendingIntent.getBroadcast (
|
apnContext.setReconnectIntent(PendingIntent.getBroadcast (
|
||||||
|
|||||||
Reference in New Issue
Block a user