use a method to make it overridable
[ouya-romlauncher.git] / src / de / cweiske / ouya / romlauncher / LaunchSnesActivity.java
similarity index 69%
rename from src/de/cweiske/ouya/gamelauncher/LaunchGameActivity.java
rename to src/de/cweiske/ouya/romlauncher/LaunchSnesActivity.java
index 085b5e9223dc1c0300dfbcf880c1b5450c73cbd8..a9941b88557b79d4ea64e199497cbbea53bf466c 100644 (file)
@@ -1,20 +1,4 @@
-/*
- * Copyright (C) 2012 OUYA, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.cweiske.ouya.gamelauncher;
+package de.cweiske.ouya.romlauncher;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -30,10 +14,10 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.Environment;
 
-public class LaunchGameActivity extends Activity
+abstract public class LaunchSnesActivity extends Activity
 {
-    String assetFilename = "FIXME_ASSETFILENAME";
-       
+    abstract protected String getAssetFilename();
+
     /**
      * Called when the activity is first created.
      */
@@ -42,9 +26,9 @@ public class LaunchGameActivity extends Activity
     {
         super.onCreate(savedInstanceState);
         
-        File extractedFile = extractFile(this.assetFilename);
+        File extractedFile = extractFile(getAssetFilename());
         if (extractedFile == null) {
-               System.err.println("Failed to extract file " + this.assetFilename);
+               System.err.println("Failed to extract file " + getAssetFilename());
                finish();
                return;
         }