OSDN Git Service

Make a copy of data stored in LockSettingsStorage cache
authorRubin Xu <rubinxu@google.com>
Fri, 15 Mar 2019 11:38:36 +0000 (11:38 +0000)
committerRubin Xu <rubinxu@google.com>
Fri, 15 Mar 2019 11:44:03 +0000 (11:44 +0000)
commit4728d2114cae96127211637aea682ea89ceb7e24
tree2ab70c972c2498d1d5381865a87de2700c69332f
parentbbe1969596ac122e87193ca9200ad8963ddc5b30
Make a copy of data stored in LockSettingsStorage cache

In general the cache should store copies of the original data
to prevent the caller from accidentally corrupting the cache after
the data is cached. This wasn't an issue until recently when
LockSettingsService starts to aggressively zeroize buffers,
which caused some unit test failures.

Bug: 120484642
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
Change-Id: I8cc61789f19613cca8ed36ca34aa42fe6b2ad674
services/core/java/com/android/server/locksettings/LockSettingsStorage.java