2010-02-08 20:39:42 +00:00
|
|
|
/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
package org.torproject.android;
|
|
|
|
|
2010-03-01 05:52:44 +00:00
|
|
|
import org.torproject.android.service.TorServiceUtils;
|
|
|
|
|
2010-02-08 20:39:42 +00:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.preference.PreferenceActivity;
|
2010-02-27 23:56:46 +00:00
|
|
|
import android.util.Log;
|
2010-02-08 20:39:42 +00:00
|
|
|
|
|
|
|
public class SettingsPreferences
|
|
|
|
extends PreferenceActivity {
|
|
|
|
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
addPreferencesFromResource(R.xml.preferences);
|
2010-03-01 05:52:44 +00:00
|
|
|
|
|
|
|
if (!TorServiceUtils.hasRoot())
|
|
|
|
getPreferenceScreen().getPreference(3).setEnabled(false);
|
2010-02-08 20:39:42 +00:00
|
|
|
}
|
2010-02-27 23:56:46 +00:00
|
|
|
|
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see android.app.Activity#onStop()
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
protected void onStop() {
|
|
|
|
super.onStop();
|
|
|
|
|
|
|
|
Log.i(getClass().getName(),"Exiting Preferences");
|
|
|
|
}
|
|
|
|
|
2010-02-08 20:39:42 +00:00
|
|
|
}
|