/**
 * $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 = XOPlayMediaActivity.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 getApplicationContext().getResources().getIdentifier("pr_privatekey", "raw", getApplicationContext().getPackageName());
            }

            public int getPRCertificate()
            {
                return getApplicationContext().getResources().getIdentifier("pr_certificate", "raw", getApplicationContext().getPackageName());
            }

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

        super.onCreate();

    }

}
