From a31b4bf4aecf02bc8abf6f9e3f76974bee8aaf2f Mon Sep 17 00:00:00 2001
From: mdtrooper <tres.14159@gmail.com>
Date: Thu, 5 Dec 2013 17:13:23 +0000
Subject: [PATCH] 2013-12-05  Miguel de Dios  <miguel.dedios@artica.es>

	* src/pandroid_event_viewer/pandorafms/Options.java: fixed the save
	state of check in background, before it run but didn't show.

	* res/layout/main.xml: added id for the tag.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9180 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 extras/pandroid_event_viewer/ChangeLog                |  7 +++++++
 extras/pandroid_event_viewer/res/layout/main.xml      |  1 +
 .../src/pandroid_event_viewer/pandorafms/Options.java | 11 ++++++++---
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/extras/pandroid_event_viewer/ChangeLog b/extras/pandroid_event_viewer/ChangeLog
index 509af55962..307d4d12e6 100644
--- a/extras/pandroid_event_viewer/ChangeLog
+++ b/extras/pandroid_event_viewer/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-05  Miguel de Dios  <miguel.dedios@artica.es>
+	
+	* src/pandroid_event_viewer/pandorafms/Options.java: fixed the save
+	state of check in background, before it run but didn't show.
+	
+	* res/layout/main.xml: added id for the tag.
+
 2013-12-05  Miguel de Dios  <miguel.dedios@artica.es>
 	
 	* src/pandroid_event_viewer/pandorafms/Info.java,
diff --git a/extras/pandroid_event_viewer/res/layout/main.xml b/extras/pandroid_event_viewer/res/layout/main.xml
index ce91957926..15c8f2c9e5 100644
--- a/extras/pandroid_event_viewer/res/layout/main.xml
+++ b/extras/pandroid_event_viewer/res/layout/main.xml
@@ -182,6 +182,7 @@
                     android:layout_gravity="center_vertical"
                     android:layout_weight="1"
                     android:paddingRight="5dip"
+                    android:id="@+id/tag_textview"
                     android:text="@string/tag_label_str" />
 
                 <EditText
diff --git a/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Options.java b/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Options.java
index 9f059013c2..e1f5c3ebc3 100644
--- a/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Options.java
+++ b/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Options.java
@@ -88,6 +88,9 @@ public class Options extends Activity {
 		text = (EditText) findViewById(R.id.timeout_connections);
 		text.setText(Integer.toString(preferences.getInt("timeout_connections", 10)));
 		
+		CheckBox cb = (CheckBox) findViewById(R.id.background_service_on);
+		cb.setChecked(preferences.getBoolean("background_service", false));
+		
 		
 		Spinner combo = (Spinner) findViewById(R.id.refresh_combo);
 		ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
@@ -108,7 +111,6 @@ public class Options extends Activity {
 		int key_seconds = this.timeout2arrayKey(preferences.getInt("timeout_connections", 10));
 		combo.setSelection(key_seconds);
 		
-		((CheckBox) findViewById(R.id.background_service_on)).setChecked(true);
 		final Button button = (Button) findViewById(R.id.update_options);
 		button.setOnClickListener(new View.OnClickListener() {
 			public void onClick(View v) {
@@ -124,7 +126,7 @@ public class Options extends Activity {
 
 		// Notification
 		boolean vibration = preferences.getBoolean("vibration", true);
-		CheckBox cb = (CheckBox) findViewById(R.id.vibration_on);
+		cb = (CheckBox) findViewById(R.id.vibration_on);
 		cb.setChecked(vibration);
 		boolean led = preferences.getBoolean("led", false);
 		cb = (CheckBox) findViewById(R.id.led_flash_on);
@@ -286,9 +288,12 @@ public class Options extends Activity {
 		editorPreferences.putInt("timeout_connections",
 				arrayKey2timeout(combo.getSelectedItemPosition()));
 		
+		CheckBox cb = (CheckBox) findViewById(R.id.background_service_on);
+		editorPreferences.putBoolean("background_service", cb.isChecked());
+		
 
 		// Notification settings
-		CheckBox cb = (CheckBox) findViewById(R.id.vibration_on);
+		cb = (CheckBox) findViewById(R.id.vibration_on);
 		editorPreferences.putBoolean("vibration", cb.isChecked());
 		cb = (CheckBox) findViewById(R.id.led_flash_on);
 		editorPreferences.putBoolean("led", cb.isChecked());