android_packages_modules_Co.../Tethering
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Junyu Lai f014ae2f2a Use MANAGE_USERS permission to check for admin user
The current implementation uses MANAGE_USERS, CREATE_USERS, or
QUERY_USERS to check if the user is an admin. However,
QUERY_USERS is not a privileged permission until Android U.
This can cause issues on devices running older Android versions
(e.g., T) where the tethering module requires this check but
doesn't have the necessary permission, leading to crashes.

This change updates the code to use MANAGE_USERS, a privileged
permission since 2015, to reliably determine if the user is
an admin across different Android versions.

Test: Manual on T device:
      1. Mock entitlement and enable hotspot
      2. Check granted permissions of android.uid.networkstack
Fix: 366816004
Change-Id: Iee060f0225d23c62d836f0211c63b649e539f77b
2024-10-28 17:31:22 +08:00
..
apex Use MANAGE_USERS permission to check for admin user 2024-10-28 17:31:22 +08:00
apishim Return false when tetherOffloadRuleAdd doesn't really add items 2024-09-02 14:32:07 +08:00
common/TetheringLib Merge "Make java_sdk_library dependencies explicit" into main 2024-09-10 19:12:45 +00:00
jni remove dead register_com_android_networkstack_tethering_BpfUtils 2023-11-07 17:23:11 -08:00
res Import translations. DO NOT MERGE ANYWHERE 2024-08-06 15:20:29 -07:00
src Introduce dependencies object for EntitlementManager 2024-10-21 10:22:48 +08:00
tests Introduce dependencies object for EntitlementManager 2024-10-21 10:22:48 +08:00
Android.bp Prefer framework-annotations-lib dependency 2024-09-27 18:41:54 +00:00
AndroidManifest.xml Use MANAGE_USERS permission to check for admin user 2024-10-28 17:31:22 +08:00
AndroidManifestBase.xml
jarjar-rules.txt Fix jarjar rules for tethering apk 2022-05-31 15:20:52 +08:00
lint-baseline.xml Baseline NewApi issues 2024-01-25 02:41:58 +00:00
OWNERS Revert "Add owners block for migration" 2021-05-31 10:34:04 +00:00
proguard.flags SyncSM10: explicitly keep TetheringUtils jni methods 2023-09-14 14:39:25 +00:00