summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-07-29 11:41:21 +0900
committerLorenzo Colitti <lorenzo@google.com>2015-07-31 11:08:27 +0900
commitffc42b0b7be29ee4118e0515d5ab024927bcb8ca (patch)
tree2101af35baee3797ce8542187ff87114f1265c72 /services
parent5db4cc8fee8b919b5f62f222af92a4e995ca6a70 (diff)
downloadframeworks_base-ffc42b0b7be29ee4118e0515d5ab024927bcb8ca.zip
frameworks_base-ffc42b0b7be29ee4118e0515d5ab024927bcb8ca.tar.gz
frameworks_base-ffc42b0b7be29ee4118e0515d5ab024927bcb8ca.tar.bz2
Stop supporting legacy ConnectivityManager routing methods in M.
The methods startUsingNetworkFeature, stopUsingNetworkFeature and requestRouteToHost were @removed in all the M preview builds, but internal and external developers have noted that this imposes additional burden for applications that need to work across multiple platform versions because it causes compile-time errors. We switched from @removed back to @deprecated to avoid these problems. In order to effectively deprecate these methods, which are error-prone and insecure, make them throw UnsupportedOperationException if the app's target SDK is M or above. Because there are still one or two places in system code that use these APIs, exempt Process.SYSTEM_UID and the OMA-DM client from the check for now. Bug: 22728205 Change-Id: I790bd32f3aa8067cbb625962a209bb9232f4b58c
Diffstat (limited to 'services')
-rw-r--r--services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
index 3618e1a..19d29f3 100644
--- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
@@ -463,7 +463,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
mService = new WrappedConnectivityService(
mServiceContext, mNetManager, mStatsService, mPolicyService);
mService.systemReady();
- mCm = new ConnectivityManager(mService);
+ mCm = new ConnectivityManager(getContext(), mService);
}
private int transportToLegacyType(int transport) {