diff options
| author | 2024-06-05 02:00:01 +0000 | |
|---|---|---|
| committer | 2024-06-11 02:33:46 +0000 | |
| commit | 393c96de0020e54d7fb56858a509250c7cadcd36 (patch) | |
| tree | 4bc2df367b746ab9045c2a5a41bec1fe5f1090ea /libs/androidfw/StringPool.cpp | |
| parent | 6cdb49052fd9da66bb7fdc7ad870997915a8f534 (diff) | |
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions