From 378fd10aa77131c2418150439830bceaef34cff3 Mon Sep 17 00:00:00 2001 From: chiachangwang Date: Fri, 17 Feb 2023 02:48:47 +0000 Subject: [PATCH] Update design to fix non-protected broadcast from system issue ActivityManager checks if there is any non-protected broadcast sent from the system to prevent malwares sending the fake intent. This could be fixed with declaring it as a protected broadcast which is the current implementation. However, the uid in the AndroidManifest for tethering is networkstack uid. Though system only check whether the intent is defined as protected broadcast or not regardless of where the protected intent is defined, it is confusing to define the protected intent in tethering AndroidManifest. Thus, update to alternative way to fulfill the protection in ActivityManager to declare the required permission in the broadcast filter and specify the expected package name of the intent. Bug: 269383522 Bug: 259000745 Test: atest FrameworksNetTests Test: manually check no am_wtf log complains sending non-protected broadcast from system Change-Id: I04986aed4fb92f85adcbac8a61665f3f465e2eab --- Tethering/AndroidManifest.xml | 1 - .../server/connectivity/AutomaticOnOffKeepaliveTracker.java | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Tethering/AndroidManifest.xml b/Tethering/AndroidManifest.xml index 23467e78d9..6a363b09ab 100644 --- a/Tethering/AndroidManifest.xml +++ b/Tethering/AndroidManifest.xml @@ -45,7 +45,6 @@ -