Merge "Remove unused intent from filter and unused method."

This commit is contained in:
Wink Saville
2010-09-03 13:17:00 -07:00
committed by Android (Google) Code Review

View File

@@ -105,10 +105,9 @@ public class MobileDataStateTracker implements NetworkStateTracker {
mTarget = target;
mContext = context;
IntentFilter filter =
new IntentFilter(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
IntentFilter filter = new IntentFilter();
filter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
filter.addAction(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED);
filter.addAction(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
mContext.registerReceiver(new MobileDataStateReceiver(), filter);
mMobileDataState = Phone.DataState.DISCONNECTED;
@@ -192,7 +191,7 @@ public class MobileDataStateTracker implements NetworkStateTracker {
ConnectivityManager.TYPE_MOBILE);
if (mConnectivityManager == null) {
IBinder b = ServiceManager.getService(
mContext.CONNECTIVITY_SERVICE);
Context.CONNECTIVITY_SERVICE);
mConnectivityManager = IConnectivityManager.Stub.asInterface(b);
}
try {
@@ -251,7 +250,6 @@ public class MobileDataStateTracker implements NetworkStateTracker {
" broadcast" + reason == null ? "" : "(" + reason + ")");
setDetailedState(DetailedState.FAILED, reason, apnName);
}
TelephonyManager tm = TelephonyManager.getDefault();
}
}
@@ -268,15 +266,6 @@ public class MobileDataStateTracker implements NetworkStateTracker {
return mNetworkInfo.isAvailable();
}
/**
* {@inheritDoc}
* The mobile data network subtype indicates what generation network technology is in effect,
* e.g., GPRS, EDGE, UMTS, etc.
*/
public int getNetworkSubtype() {
return TelephonyManager.getDefault().getNetworkType();
}
/**
* Return the system properties name associated with the tcp buffer sizes
* for this network.
@@ -333,16 +322,6 @@ public class MobileDataStateTracker implements NetworkStateTracker {
return (setEnableApn(mApnType, false) != Phone.APN_REQUEST_FAILED);
}
/**
* Record the detailed state of a network, and if it is a
* change from the previous state, send a notification to
* any listeners.
* @param state the new @{code DetailedState}
*/
private void setDetailedState(NetworkInfo.DetailedState state) {
setDetailedState(state, null, null);
}
/**
* Record the detailed state of a network, and if it is a
* change from the previous state, send a notification to
@@ -372,10 +351,6 @@ public class MobileDataStateTracker implements NetworkStateTracker {
}
}
private void setDetailedStateInternal(NetworkInfo.DetailedState state) {
mNetworkInfo.setDetailedState(state, null, null);
}
public void setTeardownRequested(boolean isRequested) {
mTeardownRequested = isRequested;
}