title: Thread/Timer/App isn't getting stopped when I press the Back Button on the Splash Screen
body: <p>Even if I press the back button, my timer is still running and the next activity is executed after the specified time. How do I stop this?
  Splash.java :</p>
  
  <pre><code>package com.ultimate.biggboss;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.widget.VideoView;
  public class Splash extends Activity{
      VideoView vid;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.splash);
          vid = (VideoView)findViewById(R.id.video);
          String urlpath="android.resource://" + getPackageName() + "/" + R.raw.logoanimate;
          vid.setVideoURI(Uri.parse(urlpath));
          vid.start();
          Thread timer = new Thread(){
              public void run(){
                  try{
                      sleep(4400);
                  } catch (InterruptedException e){
                      e.printStackTrace();
                  }finally{ 
                      Intent openHome = new Intent(Splash.this, main.class);
                      startActivity(openHome);
                      finish();
                  }
              }
          };
          timer.start();
      }
  
  }
  </code></pre>
  
  <p>What code do I write and where in this class to stop the app as soon as I press the back button?</p>