PackageManager lock reduction utilities
Bug: 161323622
Define a Snapshotable interface that marks a class as supporting the
snapshot() methods. A snapshot is an immutable copy of a class that
supports read-only methods. Class attributes that are not required
for read-only methods are not coiped into the snapshot.
Watchable classes that are are Snapshotable exploit the Watchable
machinery to throw an exception if code attempts to modify a snapshot.
The Snapshotable functionality is tested in the existing WatcherTest
unit test.
Test: atest
* FrameworksServicesTests:WatcherTest
Change-Id: I279b378ddf71c3e753fcc4776e22fe859123bc14
8 files changed