summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSreeram Ramachandran <sreeram@google.com>2014-07-11 17:38:09 -0700
committerSreeram Ramachandran <sreeram@google.com>2014-07-11 18:16:04 -0700
commit06b6cdaed5c68816faac9d2354c6caf61e65e19d (patch)
tree9538614f816f468479ea9a4d9cf6430034ec953a /core
parent325503caef80ebce0da3e4d5fa2ac3f917dd1b1d (diff)
downloadframeworks_base-06b6cdaed5c68816faac9d2354c6caf61e65e19d.zip
frameworks_base-06b6cdaed5c68816faac9d2354c6caf61e65e19d.tar.gz
frameworks_base-06b6cdaed5c68816faac9d2354c6caf61e65e19d.tar.bz2
Remove unnecessary code and APIs.
This stuff has been replaced by setNetworkForUser() in NetdClient. Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f
Diffstat (limited to 'core')
-rw-r--r--core/java/android/net/IConnectivityManager.aidl3
-rw-r--r--core/java/android/net/NetworkUtils.java5
-rw-r--r--core/java/android/os/INetworkManagementService.aidl5
-rw-r--r--core/jni/android_net_NetUtils.cpp8
-rw-r--r--core/res/AndroidManifest.xml10
-rw-r--r--core/res/res/values/strings.xml5
6 files changed, 0 insertions, 36 deletions
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index b9c6491..f61984a 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -42,9 +42,6 @@ import com.android.internal.net.VpnProfile;
/** {@hide} */
interface IConnectivityManager
{
- // Keep this in sync with framework/native/services/connectivitymanager/ConnectivityManager.h
- void markSocketAsUser(in ParcelFileDescriptor socket, int uid);
-
NetworkInfo getActiveNetworkInfo();
NetworkInfo getActiveNetworkInfoForUid(int uid);
NetworkInfo getNetworkInfo(int networkType);
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index af860b0..9b95305 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -106,11 +106,6 @@ public class NetworkUtils {
public native static String getDhcpError();
/**
- * Set the SO_MARK of {@code socketfd} to {@code mark}
- */
- public native static void markSocket(int socketfd, int mark);
-
- /**
* Binds the current process to the network designated by {@code netId}. All sockets created
* in the future (and not explicitly bound via a bound {@link SocketFactory} (see
* {@link Network#getSocketFactory}) will be bound to this network. Note that if this
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 077d94c..207dc4a 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -336,11 +336,6 @@ interface INetworkManagementService
void removeVpnUidRanges(int netId, in UidRange[] ranges);
/**
- * Get the SO_MARK associated with routing packets for user {@code uid}
- */
- int getMarkForUid(int uid);
-
- /**
* Exempts {@code host} from the routing set up by {@link setMarkedForwardingRoute}
* All connects to {@code host} will use the global routing table
*/
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 2325bc7..760ed45 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -246,13 +246,6 @@ static jstring android_net_utils_getDhcpError(JNIEnv* env, jobject clazz)
return env->NewStringUTF(::dhcp_get_errmsg());
}
-static void android_net_utils_markSocket(JNIEnv *env, jobject thiz, jint socket, jint mark)
-{
- if (setsockopt(socket, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) < 0) {
- jniThrowException(env, "java/lang/IllegalStateException", "Error marking socket");
- }
-}
-
static jboolean android_net_utils_bindProcessToNetwork(JNIEnv *env, jobject thiz, jint netId)
{
return (jboolean) !setNetworkForProcess(netId);
@@ -296,7 +289,6 @@ static JNINativeMethod gNetworkUtilMethods[] = {
{ "stopDhcp", "(Ljava/lang/String;)Z", (void *)android_net_utils_stopDhcp },
{ "releaseDhcpLease", "(Ljava/lang/String;)Z", (void *)android_net_utils_releaseDhcpLease },
{ "getDhcpError", "()Ljava/lang/String;", (void*) android_net_utils_getDhcpError },
- { "markSocket", "(II)V", (void*) android_net_utils_markSocket },
{ "bindProcessToNetwork", "(I)Z", (void*) android_net_utils_bindProcessToNetwork },
{ "getNetworkBoundToProcess", "()I", (void*) android_net_utils_getNetworkBoundToProcess },
{ "bindProcessToNetworkForHostResolution", "(I)Z", (void*) android_net_utils_bindProcessToNetworkForHostResolution },
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index c34a971..4725cfb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2602,16 +2602,6 @@
android:description="@string/permdesc_modifyNetworkAccounting"
android:protectionLevel="signature|system" />
- <!-- @SystemApi Allows an application to mark traffic as from another user for per user routing.
- Used by system wide services like media server that execute delegated network connections
- for users.
- @hide
- -->
- <permission android:name="android.permission.MARK_NETWORK_SOCKET"
- android:label="@string/permlab_markNetworkSocket"
- android:description="@string/permdesc_markNetworkSocket"
- android:protectionLevel="signature|system" />
-
<!-- C2DM permission.
@hide Used internally.
-->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 7c60c6e..db597fd 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2109,11 +2109,6 @@
<string name="permdesc_modifyNetworkAccounting">Allows the app to modify how network usage is accounted against apps. Not for use by normal apps.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_markNetworkSocket">modify socket marks</string>
- <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_markNetworkSocket">Allows the app to modify socket marks for routing</string>
-
- <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_accessNotifications">access notifications</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_accessNotifications">Allows the app to retrieve, examine, and clear notifications, including those posted by other apps.</string>