load

Loads an Aconfig Package from Aconfig Storage.

This method attempts to load the specified Aconfig package.

Note: This method differs from the platform implementation in that is guaranteed to return an empty package if the packageName is not found in the container, rather than throwing an exception.

Platform-specific behavior:

  • Prior to API level 36, this method always returns an empty package

Return

An instance of AconfigPackageCompat, which may be empty if the package is not found in the container.

Parameters

packageName

The name of the Aconfig package to load.

Throws

if there is an error reading from Aconfig Storage, such as if the storage system is not found or there is an error reading the storage file. The specific error code can be obtained using AconfigStorageReadException.getErrorCode.