package com.dailymotion.websdksample;

import android.os.Build;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;

import com.dailymotion.websdk.DMWebVideoView;

public class SampleActivity extends Activity {

    private DMWebVideoView mVideoView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.screen_sample);

        mVideoView = ((DMWebVideoView) findViewById(R.id.dmWebVideoView));
        mVideoView.setVideoId("x2frsoi", false);


    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.sample, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        finish();
        return true;
    }

    @Override
    public void onBackPressed() {
        mVideoView.handleBackPress(this);
    }

    @Override
    protected void onPause() {
        super.onPause();

        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
            mVideoView.onPause();
        }
    }

    @Override
    protected void onResume() {
        super.onResume();

        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
            mVideoView.onResume();
        }
    }
}

@@ -592,18 +592,16 @@
 false);%0A
-%0A%0A
     %7D%0A%0A%0A
@@ -1119,32 +1119,33 @@
 e();%0A%0A        if
+ 
 (Build.VERSION.S
@@ -1176,32 +1176,33 @@
 CODES.HONEYCOMB)
+ 
 %7B%0A            mV
@@ -1321,16 +1321,17 @@
       if
+ 
 (Build.V
@@ -1378,16 +1378,17 @@
 NEYCOMB)
+ 
 %7B%0A      

fix indentation