@@ -0,0 +1,1812 @@
+/*%0A * Copyright (C) 2017 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.google.android.exoplayer2.drm;%0A%0Aimport com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest;%0Aimport com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest;%0Aimport com.google.android.exoplayer2.util.Assertions;%0Aimport java.io.IOException;%0Aimport java.util.UUID;%0A%0A/**%0A * A %7B@link MediaDrmCallback%7D that provides a fixed response to key requests. Provisioning is not%0A * supported. This implementation is primarily useful for providing locally stored keys to decrypt%0A * ClearKey protected content. It is not suitable for use with Widevine or PlayReady protected%0A * content.%0A */%0Apublic final class LocalMediaDrmCallback implements MediaDrmCallback %7B%0A%0A  private final byte%5B%5D keyResponse;%0A%0A  /**%0A   * @param keyResponse The fixed response for all key requests.%0A   */%0A  public LocalMediaDrmCallback(byte%5B%5D keyResponse) %7B%0A    this.keyResponse = Assertions.checkNotNull(keyResponse);%0A  %7D%0A%0A  @Override%0A  public byte%5B%5D executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException %7B%0A    throw new UnsupportedOperationException();%0A  %7D%0A%0A  @Override%0A  public byte%5B%5D executeKeyRequest(UUID uuid, KeyRequest request) throws Exception %7B%0A    return keyResponse;%0A  %7D%0A%0A%7D%0A

Add LocalMediaDrmCallback. Useful for providing local keys.