Commit Graph

6 Commits

Author SHA1 Message Date
Pinyao Ting
a407aa965d Fix AppPrediction/Smartspace leak
AppPrediction and Smartspace session info are associated with two types of Binder objects: one maps to the client object (i.e. AppPredictor/SmartspaceSession) that represents the session itself, the other one maps to the callback functions that handles incoming update at the client side.

The death recipient of the former performs the clean-up which removes
the session info object from system process followed by calling a destroy on the session info object, while the other one simply calls destroy.

Unfortunately upon destroy of the session info object, we unlink the
former from its death recipient, which means if the callback function
objects died before the session object in the client process, the death recipient is unlinked, therefore the clean-up will not be performed.

Both the callback function object and the session info object lives in the same process, when the process dies, both object dies, so there's no reason to having cleanup logic in both places.

This CL removes the death recipient associated with the callback in favor of the one associated with the session since the later provides more coverage, e.g. in case the process died before it start listening to prediction updates.

Bug: 230696939
Test: manual
Change-Id: I27641d347c2b436eaafba306842854a97a440f7a
2022-07-01 23:13:19 +00:00
Shashwat Razdan
013c30791e Resurrecting sessions when AiAi is bound for the first time
Fix: 186694105
Test: Manually built

Change-Id: I4e6c31c75eebfd2ba046d62740f3d08d1ab83982
2021-05-06 20:23:15 +00:00
Shashwat Razdan
8c63ca6581 Addressing the feedback received in the API review.
API Review bugs list is here: https://b.corp.google.com/issues?q=blockingid:176851064

Test: CTS tests:

Fixes:185226923
Fixes:185226755
Fixes:185226674
Fixes:185226597
Fixes:185226790
Fixes:184585058
Fixes:184585080
Fixes:184585117
Fixes:184585343
Fixes:184585079

Change-Id: Idacee5f95ce104d1fb6de40a04ac2b74691f977e
2021-04-20 08:06:25 +00:00
Shashwat Razdan
f20415ff42 Fixing the session resurrection issue in SmartspaceService. The fix re-registers callbacks after the service is bound after a restart.
Test: Built on device and tested manually
Bug:182330864
Change-Id: I0364ad0707f05e62f87c836d6e63b0134f6460a4
2021-04-02 21:29:58 +00:00
Shashwat Razdan
dc1662c659 Adding a permission based check in SmartspaceManagerService
Test: Added the permission to SysUI and checked that it is working
Bug: 182330864

Change-Id: I1a545d39bee3fec6423149f4f3146551c220fd30

Change-Id: I7ceafd9c530d4386e29cab96256e8aa3035d302d
2021-03-11 14:37:30 -08:00
Shashwat Razdan
d33e8c387a SmartspaceManager initial implementation
Bug: 176851064
Test: Deployed on Phone,CTS tests
Change-Id: I3e03628d4d0e0aec0b6442f0ee8949ac378a1572
2021-02-01 21:39:07 +00:00