package fi_81.cwp_morse_mangle;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class MainActivity extends Activity {
	private static final String TAG = "MainActivity";
	private static final int SETUP_RESULT = 0xbeef;
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		Log.d(TAG, "onCreate()");
		
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.main);
	}

	@Override
	public void onRestart() {
		Log.d(TAG, "onRestart()");

		super.onRestart();
	}

	@Override
	public void onStart() {
		Log.d(TAG, "onStart()");

		super.onStart();
	}
	
	@Override
	public void onResume() {
		Log.d(TAG, "onResume()");

		super.onResume();
	}
	
	@Override
	public void onPause() {
		Log.d(TAG, "onPause()");
		
		super.onPause();
	}
	
	@Override
	public void onStop() {
		Log.d(TAG, "onStop()");
		
		super.onStop();
	}
	
	@Override
	public void onDestroy() {
		Log.d(TAG, "onDestroy()");
		
		super.onDestroy();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		Log.d(TAG, "onCreateOptionsMenu()");
		
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.main_menu, menu);
		return true;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		Log.d(TAG, "onOptionsItemSelected()");
		
	    // Handle item selection
	    switch (item.getItemId()) {
	        case R.id.menu_settings:
	        	Intent i = new Intent(this, MainSettingsActivity.class);
	        	startActivity(i);
	        	return true;
	    }
	    
	    return false;
	}
}
@@ -328,59 +328,9 @@
 y%22;%0A
-%09private static final int SETUP_RESULT = 0xbeef;%0A%09
 %0A
+
 %09/**
@@ -462,27 +462,25 @@
 Create()%22);%0A
-%09%09
 %0A
+
 %09%09super.onCr
@@ -505,19 +505,17 @@
 State);%0A
-%09%09
 %0A
+
 %09%09setCon
@@ -718,26 +718,25 @@
 Start();%0A%09%7D%0A
-%09
 %0A
+
 %09@Override%0A%09
@@ -804,34 +804,33 @@
 .onResume();%0A%09%7D%0A
-%09
 %0A
+
 %09@Override%0A%09publ
@@ -872,27 +872,25 @@
 nPause()%22);%0A
-%09%09
 %0A
+
 %09%09super.onPa
@@ -895,26 +895,25 @@
 Pause();%0A%09%7D%0A
-%09
 %0A
+
 %09@Override%0A%09
@@ -957,27 +957,25 @@
 onStop()%22);%0A
-%09%09
 %0A
+
 %09%09super.onSt
@@ -979,26 +979,25 @@
 nStop();%0A%09%7D%0A
-%09
 %0A
+
 %09@Override%0A%09
@@ -1051,19 +1051,17 @@
 oy()%22);%0A
-%09%09
 %0A
+
 %09%09super.
@@ -1069,32 +1069,360 @@
 nDestroy();%0A%09%7D%0A%0A
+%09@Override%0A%09protected void onSaveInstanceState(Bundle outState) %7B%0A%09%09Log.d(TAG, %22onSaveInstanceState()%22);%0A%0A%09%09super.onSaveInstanceState(outState);%0A%09%7D%0A%0A%09@Override%0A%09protected void onRestoreInstanceState(Bundle savedInstanceState) %7B%0A%09%09Log.d(TAG, %22onRestoreInstanceState()%22);%0A%0A%09%09super.onRestoreInstanceState(savedInstanceState);%0A%0A%09%7D%0A%0A
 %09@Override%0A%09publ
@@ -1504,19 +1504,17 @@
 nu()%22);%0A
-%09%09
 %0A
+
 %09%09MenuIn
@@ -1612,18 +1612,17 @@
 rue;%0A%09%7D%0A
-%09
 %0A
+
 %09@Overri
@@ -1724,16 +1724,11 @@
 %22);%0A
+%0A
 %09%09
-%0A%09    
 // H
@@ -1749,20 +1749,17 @@
 ection%0A%09
-    
+%09
 switch (
@@ -1779,24 +1779,17 @@
 d()) %7B%0A%09
-        
+%09
 case R.i
@@ -1806,24 +1806,17 @@
 tings:%0A%09
-        
+%09
 %09Intent 
@@ -1866,24 +1866,17 @@
 lass);%0A%09
-        
+%09
 %09startAc
@@ -1891,16 +1891,9 @@
 );%0A%09
-        
+%09
 %09ret
@@ -1907,25 +1907,14 @@
 e;%0A%09
-    %7D%0A%09    %0A%09    
+%09%7D%0A%0A%09%09
 retu

Add SaveInstanceState/RestoreInstanceState logging