summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorTony Mak <tonymak@google.com>2017-03-28 18:50:01 +0100
committerTony Mak <tonymak@google.com>2017-03-29 10:03:39 +0000
commitec319aba34deb91f89ec4e15004eee62d5f2801c (patch)
tree5300d7e858a180d131e6f4034923943e94a506ea /tools/aapt2/diff/Diff.cpp
parent76c32a35a956fa3a4559c6ed9512f4083ec011b7 (diff)
Introduce AMS.getLastResumedActivityUserId to fix work profile icon issue
Problem: Work profile status bar icon feeature is relied on two callbacks 1. onForegroundProfileSwitch (AMS.setResumedActivityLocked) 2. appTransitionStarting (WMS) We assume callback 1 is always called before 2, but it is not the case. These two callbacks are triggered by two handlers in two different threads, and hence race condition happens. Solution: Not rely on onForegroundProfileSwitch to update mManagedProfileFocused flag anymore. Query getLastResumedActivityUserId in appTransitionStarting. Also, make sure mLastResumedActivity is updated before sending message to WMS in setResumedActivityLocked. Test: Start a work app, observe that the work icon is shown. Test: Start a personal app, observe that work icon is gone. Test: Dock the work app, tap on it (give it focus), observe that work icon is shown. Test: Start a work app, switch user, can see the icon is gone. Switch back, icon is back. Bug: 34159089 Change-Id: I2cee141d18e8b7d5607b26dd7a2fd5bc9cd0ebb3
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions