Merge "Cut the dependency to APN constants"
am: f1df59afe3
Change-Id: I140f294e0b044c66b925ae5c8ae6f2859c694753
This commit is contained in:
@@ -58,7 +58,6 @@ import android.util.Log;
|
|||||||
import android.util.SparseIntArray;
|
import android.util.SparseIntArray;
|
||||||
|
|
||||||
import com.android.internal.annotations.GuardedBy;
|
import com.android.internal.annotations.GuardedBy;
|
||||||
import com.android.internal.telephony.PhoneConstants;
|
|
||||||
import com.android.internal.util.Preconditions;
|
import com.android.internal.util.Preconditions;
|
||||||
import com.android.internal.util.Protocol;
|
import com.android.internal.util.Protocol;
|
||||||
|
|
||||||
@@ -711,6 +710,12 @@ public class ConnectivityManager {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public static final int TYPE_TEST = 18; // TODO: Remove this once NetworkTypes are unused.
|
public static final int TYPE_TEST = 18; // TODO: Remove this once NetworkTypes are unused.
|
||||||
|
|
||||||
|
// Deprecated constants for return values of startUsingNetworkFeature. They used to live
|
||||||
|
// in com.android.internal.telephony.PhoneConstants until they were made inaccessible.
|
||||||
|
private static final int DEPRECATED_PHONE_CONSTANT_APN_ALREADY_ACTIVE = 0;
|
||||||
|
private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_STARTED = 1;
|
||||||
|
private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_FAILED = 3;
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final int MAX_RADIO_TYPE = TYPE_TEST;
|
public static final int MAX_RADIO_TYPE = TYPE_TEST;
|
||||||
|
|
||||||
@@ -1407,7 +1412,7 @@ public class ConnectivityManager {
|
|||||||
if (netCap == null) {
|
if (netCap == null) {
|
||||||
Log.d(TAG, "Can't satisfy startUsingNetworkFeature for " + networkType + ", " +
|
Log.d(TAG, "Can't satisfy startUsingNetworkFeature for " + networkType + ", " +
|
||||||
feature);
|
feature);
|
||||||
return PhoneConstants.APN_REQUEST_FAILED;
|
return DEPRECATED_PHONE_CONSTANT_APN_REQUEST_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRequest request = null;
|
NetworkRequest request = null;
|
||||||
@@ -1417,9 +1422,9 @@ public class ConnectivityManager {
|
|||||||
Log.d(TAG, "renewing startUsingNetworkFeature request " + l.networkRequest);
|
Log.d(TAG, "renewing startUsingNetworkFeature request " + l.networkRequest);
|
||||||
renewRequestLocked(l);
|
renewRequestLocked(l);
|
||||||
if (l.currentNetwork != null) {
|
if (l.currentNetwork != null) {
|
||||||
return PhoneConstants.APN_ALREADY_ACTIVE;
|
return DEPRECATED_PHONE_CONSTANT_APN_ALREADY_ACTIVE;
|
||||||
} else {
|
} else {
|
||||||
return PhoneConstants.APN_REQUEST_STARTED;
|
return DEPRECATED_PHONE_CONSTANT_APN_REQUEST_STARTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1427,10 +1432,10 @@ public class ConnectivityManager {
|
|||||||
}
|
}
|
||||||
if (request != null) {
|
if (request != null) {
|
||||||
Log.d(TAG, "starting startUsingNetworkFeature for request " + request);
|
Log.d(TAG, "starting startUsingNetworkFeature for request " + request);
|
||||||
return PhoneConstants.APN_REQUEST_STARTED;
|
return DEPRECATED_PHONE_CONSTANT_APN_REQUEST_STARTED;
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, " request Failed");
|
Log.d(TAG, " request Failed");
|
||||||
return PhoneConstants.APN_REQUEST_FAILED;
|
return DEPRECATED_PHONE_CONSTANT_APN_REQUEST_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user