Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" am: 914ef6bb34 am: a4b472a38f am: 172ddfea29 am: b39f3e6f2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952099 Change-Id: I6b3b75ddd650fb52983def1c05b581b0048f329d
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package android.net;
|
package android.net;
|
||||||
|
|
||||||
|
import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
@@ -213,6 +215,18 @@ public class TrafficStats {
|
|||||||
sStatsService = statsManager.getBinder();
|
sStatsService = statsManager.getBinder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attach the socket tagger implementation to the current process, to
|
||||||
|
* get notified when a socket's {@link FileDescriptor} is assigned to
|
||||||
|
* a thread. See {@link SocketTagger#set(SocketTagger)}.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi(client = MODULE_LIBRARIES)
|
||||||
|
public static void attachSocketTagger() {
|
||||||
|
NetworkManagementSocketTagger.install();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set active tag to use when accounting {@link Socket} traffic originating
|
* Set active tag to use when accounting {@link Socket} traffic originating
|
||||||
* from the current thread. Only one active tag per thread is supported.
|
* from the current thread. Only one active tag per thread is supported.
|
||||||
|
|||||||
Reference in New Issue
Block a user