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

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

Watcher/Watchable classes for PackageManagerService

Bug: 161323622

The Watcher and Watchable classes provide Observer/Observable
functionality for PackageManagerService.  Watchers register with
Watchables to be notified when the Watchable changes.

WatchedArrayMap and WatchedSparseArray provide ArrayMap and
SparseArray functionality, respectively.  Each is a Watchable that
automatically watches any Watchables that are stored in it. It is
important that the arrays watch stored elements only if the array
itself is being watched.

WatchedSparseBooleanArray is a simple Watchable version of
SparseBooleanArray.

This CL adds the new classes and a test class but does not use them
otherwise.

Test: atest
 * FrameworksServicesTests:WatcherTest

Change-Id: I381595c075b74099c52e9e17a9a2c32f87db563d
parent 67dd9ce1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment