package se.blunden.xbmclauncher;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends Activity {
	
	private static final String TAG = "XBMCLauncher";
	private String xbmcActivity; 
	
	private void launch()
	{
		// Load preferences
		SharedPreferences settings;
		settings = getSharedPreferences("se.blunden.xbmclauncher_preferences", Context.MODE_PRIVATE);
		
		xbmcActivity = settings.getString("xbmc_variant", getString(R.string.xbmc_activity_default));
		
		// Build the Kodi/XBMC intent
        Intent activityIntent;
        activityIntent = new Intent(Intent.ACTION_MAIN);
        activityIntent.setComponent(ComponentName.unflattenFromString(xbmcActivity));
        /*
         * The launched activity will be considered the HOME activity and will be on top of the
         * stack as needed for the system to broadcast BOOT_COMPLETED.
         */
        activityIntent.addCategory(Intent.CATEGORY_HOME);
		
		try {
			startActivity(activityIntent);
			return;
		}
		catch (ActivityNotFoundException e)
		{
			Log.d(TAG, "Activity " + xbmcActivity + " not found. Launching settings activity...");
			
			Intent launchSettings = new Intent(this, LauncherSettingsActivity.class);
			startActivity(launchSettings);
		}
	}

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		launch();
		finish();
	}
}

@@ -417,44 +417,14 @@
 %22;%0D%0A
-%09private String xbmcActivity; %0D%0A%09%0D%0A%09
+%0D%0A    
 priv
@@ -597,22 +597,33 @@
 VATE);%0D%0A
-%09%09%0D%0A%09%09
+%0D%0A        String 
 xbmcActi
@@ -1228,22 +1228,16 @@
 );%0D%0A
-%09%09%09return;%0D%0A%09%09
+        
 %7D%0D%0A%09

Clean up the code slightly