A space-efficient 2D matrix

Bug: Bug: 188447813

WatchedSparseBooleanMatrix is a space-efficient NxN boolean array
indexed by integers (the keys).  The integer indices need not be
contiguous.  The indices apply identically to rows and columns, so
there is only one mapping from index to internal row or column.

Test: atest
 * CtsContentTestCases:IntentFilterTest
 * CtsDynamicMimeHostTestCases
 * CtsRoleTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests
 * UserLifecycleTests#startUser
 * UserLifecycleTests#stopUser
 * UserLifecycleTests#switchUser
 * FrameworksServicesTests:WatcherTest
 * android.appsecurity.cts.EphemeralTest
 * android.appsecurity.cts.InstantAppUserTest

Change-Id: Ideafb5bad6b68913eceb8b1bbd2fb78dc5e82644
3 files changed