aboutsummaryrefslogtreecommitdiff
path: root/car-lib/src/android/car/trust
AgeCommit message (Collapse)Author
2018-06-21Associate user id with unlock token handleHongwei Wang
Note: this assumes user-0 is always unlocked otherwise one would not be able to access shared preference for user-0 when cold booted to lock screen. To test this CL, turn on the following system property android.car.systemuser.headless=true This build flag will make Android boot into a headless user-0 model and user-0 will always be unlocked. Bluetooth stack gets restarted every time switching user. This CL also ensures the BLE trust agent service is started after bluetooth finishes rebooting. Current limitations: - Unlock token works only if user sets password - Unlock token is not activated till user finishes lock-unlock once Bug: 78602296 Bug: 77854782 Test: unlock user by trust device on Mojave Change-Id: Ifc2bf97593adbb77d518d6b11c06ea5234a4ebbd
2018-04-24Deprecate the LocalBroadcastManagerHongwei Wang
LocalBroadcastManager works within one process and since the car trust agent runs in user-0 as a singleton, secondary users won't be able to use LocalBroadcastManager to communicate with the underlying service. This also reduces the final apk size due to the removal of support library. Due to the asynchronous nature of TrustAgentService in framework, for intance, the result of addEscrowToken would be delivered in a separate onEscrowTokenAdded callback. When enrolment client tries to add escrow token, followings would happen - Enrolment client calls CarTrustAgentBleService.setTokenResponseCallback and sets itself as the callback - Enrolment client calls CarTrustAgentBleService.addEscrowToken - CarTrustAgentBleService delegates the call to TrustAgentService - onEscrowTokenAdded is delivered to TrustAgentService and callbacks to enrolment client What's next: - CarEnrolmentActivity should not store the handle information, it should be CarTrustAgentBleService's responsibility - Associate the token/handle with user id, see b/77854782 Bug: 76008345 Test: manual Change-Id: I9f28f14cd7ae08786ef3b2825735b15c7de80507
2018-04-17Merges CarEnrolmentService and CarUnlockServiceHongwei Wang
This is a major overhaul of car TrustAgent component for I/O 2018 trust device demo Highlights: - Reduces the number of services from 3 to 2. Would like to be one but CarBleTrustAgent[TrustAgent] declares its onBind method as final - CarEnrolmentActivity lives as a reference how to communicate with CarTrustAgentBleService and maybe removed from the final release - Both CarBleTrustAgent[TrustAgent] and CarEnrolmentActivity talk to the CarTrustAgentBleService for token exchanging What's next: - Simplify the reference CarEnrolmentActivity, it currently holds implementations should live in underlying service Bug: 76008345 Test: manual Change-Id: I54090db88c1f701b1e79f623ac0c415be55f59b9