/**
 * $URL$
 * DAAND
 * Copyright (C) 2004 - 2013, INSIDE Secure BV. All rights reserved.
 */
package com.insidesecure.drm.android.reference.xoplayer;

import com.insidesecure.drm.android.reference.DRMAgentDelegate;
import com.insidesecure.drm.android.reference.DRMFusionAgentReferenceApplication;
import com.insidesecure.drm.android.reference.xoplayer.activities.*;

public class DRMFusionAgentReferenceWithXOPlayerApplication extends DRMFusionAgentReferenceApplication {
    private String TAG = "DRMFusionAgentReferenceWithXOApplication";

    @Override
    public void onCreate() {
        sSettingsClass = XOPlayerSettingsActivity.class;
        sPlayMediaActivityClass = PlayMediaXOPlayerActivity.class;
        sUsesNativePlayer = true;
        sEnableStrictMode = true;

        DRMAgentDelegate.setSelectedMediaPlayer("EXOPLAYER");
        DRMAgentDelegate.setRuntimeActivationData(
                getApplicationContext().getResources().getIdentifier("drmagent", "raw", getApplicationContext().getPackageName()));

        sSupportBackgroundDownloadAndPlay = false;

        // XO Player version for use in the 'About' box (obtained from DAAND main pom file)
        sMiscVersionInfo = "\nXO Player Version: " + VersionPlayer.XO_PLAYER_VERSION;

        sCertificateProvider = new DRMAgentDelegate.CertificateProvider() {
            public int getPRPrivateKey() {
                return R.raw.pr_privatekey;
            }

            public int getPRCertificate() {
                return R.raw.pr_certificate;
            }

            @Override
            public String toString() {
                return TAG;
            }
        };

        super.onCreate();
    }
}
