<?xml version="1.0" encoding="utf-8"?>
<!--
/*
- * Copyright (C) 2006-2008 Google Inc.
+ * Copyright (C) 2007-2009 OpenIntents.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
- * Copyright (C) 2006-2008 Google Inc.
+ * Copyright (C) 2007-2009 OpenIntents.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
<CheckBoxPreference
android:title="@string/pref_title_external_access"
- android:summary="@string/pref_summary_external_access" android:key="external_access"/>
+ android:summary="@string/pref_summary_external_access"\r
+ android:key="external_access"\r
+ android:defaultValue="false"/>
<ListPreference
android:key="lock_timeout"
android:summary="@string/pref_summary_lock_timeout"
android:entries="@array/pref_entries_lock_timeout"
android:entryValues="@array/pref_entryvalues_lock_timeout"
- android:dialogTitle="@string/pref_dialog_title_lock_timeout" />
+ android:dialogTitle="@string/pref_dialog_title_lock_timeout"\r
+ android:defaultValue="5" />
</PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file
switch (requestCode) {\r
case REQUEST_CODE_ASK_PASSWORD:\r
masterKey = data.getStringExtra("masterKey");\r
- String timeout = mPreferences.getString("lock_timeout", "5"); \r
+ String timeout = mPreferences.getString(Preferences.PREFERENCE_LOCK_TIMEOUT, Preferences.PREFERENCE_LOCK_TIMEOUT_DEFAULT_VALUE); \r
int timeoutMinutes=5; // default to 5\r
try {\r
timeoutMinutes = Integer.valueOf(timeout);\r
public class Preferences extends PreferenceActivity {
public static final String PREFERENCE_ALLOW_EXTERNAL_ACCESS = "external_access";
+ public static final String PREFERENCE_LOCK_TIMEOUT = "lock_timeout";
+ public static final String PREFERENCE_LOCK_TIMEOUT_DEFAULT_VALUE = "5";
@Override
protected void onCreate(Bundle savedInstanceState) {