Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 1 commit
  • 1 file changed
  • 0 comments
  • 1 contributor
Oct 11, 2012
small changes on prefs 164c9e6
20  src/com/codeskraps/lolo/PrefsActivity.java
@@ -69,9 +69,7 @@ protected void onCreate(Bundle savedInstanceState) {
69 69
 		chkSync = (CheckBoxPreference) findPreference(Constants.SHOW_SYNC);
70 70
 		chk24 = (CheckBoxPreference) findPreference(Constants.HOUR24);
71 71
 		lstInterval = (ListPreference) findPreference(Constants.INTERVAL);
72  
-		Preference prefAbout = (Preference) findPreference(Constants.ABOUT);
73  
-
74  
-		prefAbout.setOnPreferenceClickListener(this);
  72
+		((Preference) findPreference(Constants.ABOUT)).setOnPreferenceClickListener(this);
75 73
 	}
76 74
 
77 75
 	@Override
@@ -122,8 +120,8 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
122 120
 		if (BuildConfig.DEBUG) Log.d(TAG, "onSharedPreferenceChanged");
123 121
 
124 122
 		if (key.equals(Constants.HOUR24)) {
125  
-			if (prefs.getBoolean(Constants.HOUR24, true)) 
126  
-				chk24.setSummary(getString(R.string.prefs24_summaryTwo));
  123
+			if (prefs.getBoolean(Constants.HOUR24, true)) chk24
  124
+					.setSummary(getString(R.string.prefs24_summaryTwo));
127 125
 			else chk24.setSummary(getString(R.string.prefs24_summaryOne));
128 126
 
129 127
 		} else if (key.equals(Constants.ONCLICK)) {
@@ -162,18 +160,10 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
162 160
 
163 161
 	@Override
164 162
 	public void onBackPressed() {
  163
+		if (BuildConfig.DEBUG) Log.d(TAG, "onBackPressed");
165 164
 		// This will be called either automatically for you on 2.0
166 165
 		// or later, or by the code above on earlier versions of the
167 166
 		// platform.
168  
-		if (BuildConfig.DEBUG) Log.d(TAG, "onBackPressed");
169  
-		resultIntent();
170  
-		finish();
171  
-		return;
172  
-	}
173  
-
174  
-	private void resultIntent() {
175  
-		if (BuildConfig.DEBUG) Log.d(TAG, "resultIntent");
176  
-
177 167
 		if (Constants.CONFIGURE_ACTION.equals(getIntent().getAction())) {
178 168
 			Intent intent = getIntent();
179 169
 			Bundle extras = intent.getExtras();
@@ -187,6 +177,8 @@ private void resultIntent() {
187 177
 			}
188 178
 		}
189 179
 		sendBroadcast(new Intent(Constants.FORCE_WIDGET_UPDATE));
  180
+
  181
+		super.onBackPressed();
190 182
 	}
191 183
 
192 184
 	@Override

No commit comments for this range

Something went wrong with that request. Please try again.