Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 393c96de authored by Connie Huang's avatar Connie Huang
Browse files

Invalidate the CSS token after default duration (10 minutes) to improve security.

See go/l2a-css. This change also adds an adb command to set the token
validity duration for testing purposes. The duration cannot exceed the
default token duration.
`adb shell cmd contextual_search set token-duration 200000`

Bug: 338598282
Test: CTS and manual tests
Change-Id: I0f996f5f6f3eaaf12900dbebd44d9c8d04308f15
(cherry picked from commit 7de3d5d3cdc7c516edcf0062c9a3ca4acee9bce1)

Modify ContextualSearchService to refresh token in the callback.

Checks the enableTokenRefresh aconfig flag to determine if CSS should
call the callback with a new token each time getContextualSearchState
is called. If true, the callback will be called twice:
- Once with a fresh token for the next getContextualSearchState call.
- A second time with the assist state.

FLAG:android.app.contextualsearch.flags.enable_token_refreshBug: 338598282
Test: CTS and tested on device
Change-Id: I73c2db2758b396482d1f4e78d50febf0606eb8ad
parent 6cdb4905
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment