android_packages_modules_Co.../service
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Colitti 2139fcf345 Fix mobile data preferred on multi-user devices.
The mobile data preferred feature stores the list of UIDs in
Settings.Secure, which is per-user. But the code only sets, reads
and observes the setting for the current user instead of for all
users. This does not work on HSUM or automotive.

Fix this as follows:
- Register the ContentObserver on UserHandle.ALL
- Any time the observer fires, read the setting on all current
  users, and operate on the merged result.
- Ensure that the code gets called on ACTION_USER_ADDED and
  ACTION_USER_REMOVED.

Because the code now aggregates the setting for all UIDs, it
should just work on single-user devices. It should also work if
there are OEM devices that store all UIDs (for all users) in
Settings.Secure for user 0.

Because the bug is fixed, re-enable the test on automotive.

Also fix style nits.

Fix: 404186833
Flag: EXEMPT bug fix
Test: covered by existing CTS tests
Change-Id: I69ad789f1c7c7f3bab04ab8789dfb93ee0de553d
2025-08-08 15:36:55 +09:00
..
aidl_api/connectivity_native_aidl_interface Vendor AIDL interface for port blocking via eBPF 2022-03-25 09:14:48 -07:00
binder/android/net/connectivity/aidl Vendor AIDL interface for port blocking via eBPF 2022-03-25 09:14:48 -07:00
jni Create CommonConnectivityJni to share between modules 2025-07-23 05:47:12 +00:00
libconnectivity noop: change from deprecated __ANDROID_API_U__ to 34 2025-02-18 15:07:40 -08:00
native/libs/libclat libclat_test: use static libc++ 2025-02-21 11:59:49 -08:00
proto Add SystemMessages protos to Connectivity 2021-03-18 20:04:52 +09:00
ServiceConnectivityResources Automated log_list.json generation version 55.3 2025-06-12 10:10:54 -07:00
src/com/android Fix mobile data preferred on multi-user devices. 2025-08-08 15:36:55 +09:00
Android.bp Add ART profile to Connectivity service. 2025-07-29 07:12:08 -07:00
art-profile Add ART profile to Connectivity service. 2025-07-29 07:12:08 -07:00
jarjar-excludes.txt Conditionally include VCN in Tethering module 2024-12-09 12:04:12 -08:00
lint-baseline.xml Revert "Prepare for @RequiresApi class retention" 2024-06-26 19:14:30 +09:00
proguard.flags Move the Thread proguard flags to ConnectivityService's proguard.flags 2024-01-26 09:14:53 +00:00