Skip to content
Commit e3c68fa8 authored by Lee Shombert's avatar Lee Shombert
Browse files

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
parent b9fa3af4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment