Skip to content
Commit 96e2d98c authored by Antonio Kantek's avatar Antonio Kantek
Browse files

[DO NOT MERGE] Fixes CompanionDeviceManagerTest

Context: 'getCallingUserId' always return 0, but assocation was created
and added to user under test (e.g. user 10, 11, etc).

The main issue is in CompanionDeviceManagerService#updateAssociations
when readAllAssocations is read using user 0 (the one retrieved via
getCallinguserId, and not the user under test).

Test switching user:
1. Create new user: `adb shell pm create-user "blah"`
2. Switch user: `adb shell am switch-user <id for blah>`
3. Run test again: `atest CompanionDeviceManagerTest`

Fixes: 147898029
Test: atest CompanionDeviceManagerTest
Test: tested switching user (see script above)
Change-Id: I87aa504684277e7c03d84fe6a7f011f661f63d8a
parent 8a6e5383
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment