Set the uid to AID_OTA_UPDATE when tagging sockets.
The AID_OTA_UPDATE uid is the one designated to tag OTA traffic.
Bug: 35423816
Test: Tested on marlin
Change-Id: I0e9f73a0ad978031a1cbbce3a94a7f28bc6781ce
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index 9d9f58b..f3d6a18 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -31,6 +31,7 @@
#ifdef __ANDROID__
#include <cutils/qtaguid.h>
+#include <private/android_filesystem_config.h>
#endif // __ANDROID__
#include "update_engine/certificate_checker.h"
@@ -61,7 +62,7 @@
curl_socket_t curlfd,
curlsocktype /* purpose */) {
#ifdef __ANDROID__
- qtaguid_tagSocket(curlfd, kUpdateEngineSocketTag, getuid());
+ qtaguid_tagSocket(curlfd, kUpdateEngineSocketTag, AID_OTA_UPDATE);
#endif // __ANDROID__
return CURL_SOCKOPT_OK;
}