summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2013-08-13 12:41:06 -0700
committerWink Saville <wink@google.com>2013-08-15 21:14:30 -0700
commite63411f28b81a0c9f7fee1d0b3a0765606c9a6f2 (patch)
tree17f1cd00743c4eeafdd7c12a78a3ac85c7f8938c /services
parent1c2cb6533bfebf8b930850215e24327420e34a4b (diff)
downloadframeworks_base-e63411f28b81a0c9f7fee1d0b3a0765606c9a6f2.zip
frameworks_base-e63411f28b81a0c9f7fee1d0b3a0765606c9a6f2.tar.gz
frameworks_base-e63411f28b81a0c9f7fee1d0b3a0765606c9a6f2.tar.bz2
In isMobileOk don't execute finally if mobile data is not supported.
Move the early return outside the try {} finally so we don't call setEnableFailFastMobileData(DctContants.DISABLED). Otherwise referencing counting is wrong and an exception is thrown in DcTrackerBase. Bug: 10304904 Change-Id: I5ba5121e473bada9f3daa8d6f3d3577cec8212fc
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/ConnectivityService.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 00935f3..fa016f4 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3732,13 +3732,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
Random rand = new Random();
mParams = params;
- try {
- if (mCs.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false) {
- log("isMobileOk: not mobile capable");
- result = ConnectivityManager.CMP_RESULT_CODE_NO_CONNECTION;
- return result;
- }
+ if (mCs.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false) {
+ log("isMobileOk: not mobile capable");
+ result = ConnectivityManager.CMP_RESULT_CODE_NO_CONNECTION;
+ return result;
+ }
+ try {
// Enable fail fast as we'll do retries here and use a
// hipri connection so the default connection stays active.
log("isMobileOk: start hipri url=" + params.mUrl);