[ Merge of http://go/wvgerrit/124004 ] When the CDM creates a new usage entry for an offline or streaming license, the new entry is immediately moved to the lowest available entry index that has been marked as vacant (kStorageTypeUnknown). When a license is released, its meta data that is managed by the CDM is cleared; however, the usage entry's index is marked vacant, but it is not released. This creates wasted entry space in the usage table. Unfortunately, defragging the table is computationally expensive and may not be able to actually free up much space depending on when it is performed. For a typical user, this will likely not be an issue as the table can get quite large compared to the number of licenses an app uses and the table is partially cleaned on each boot. GTS tests, however, have reached a point where they fill the usage table before all tests are complete. This is causing many unexpected failures for devices. Most of these tests release their license, but the CDM never reaches a state where it can clean up the table. By moving newly created entries to the lowest available index directly after creating the entries, the table never needs to grow unless all entries are in use. Clean up is now almost never required. Bug: 180639135 Bug: 180638990 Bug: 180638530 Test: MediaDrmTest#testWidevineApi28 Change-Id: I1a68d90d51384094298b27037778747ce7435374
This is the source code for the Widevine Content Decryption Module (CDM) for the Android OS. It provides the libwvdrmengine plugin for DRM. Partners who are integrating a device should be familiar with the documents in the docs directory. This source code is NOT open source, and is not part of AOSP. However, it is released to partners external to Google after official Android releases. For this reason, partners should look for bug fixes and software updates on the widevine branches: +------------------------------+------------------------------+ |Android Version |Branch | +------------------------------+------------------------------+ |Android L |lmp-mr1-widevine-release | +------------------------------+------------------------------+ |Android M MR1 |mnc-mr1-widevine-release | +------------------------------+------------------------------+ |Android N MR2 |nyc-mr2-widevine-release | +------------------------------+------------------------------+ |Android OC |oc-widevine-release | +------------------------------+------------------------------+ |Android OC MR1 |oc-mr1-widevine-release | +------------------------------+------------------------------+ |Android Pi |pi-widevine-release | +------------------------------+------------------------------+