]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: Add default values to preferences.xml so a selection is shown the first...
authorpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Sun, 18 Jan 2009 00:36:13 +0000 (00:36 +0000)
committerpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Sun, 18 Jan 2009 00:36:13 +0000 (00:36 +0000)
Also clean up copyright notices in some .xml files.

git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1758 72b678ce-9140-0410-bee8-679b907dd61a

res/layout/dialog_allow_access.xml
res/layout/dialog_filename.xml
res/xml/preferences.xml
src/org/openintents/safe/FrontDoor.java
src/org/openintents/safe/Preferences.java

index 725b4a634c7161f9be9f1da3cf5be0566f0928dd..ca1577535dd4416b1390bd28f4250103bfed2ebc 100644 (file)
@@ -1,7 +1,7 @@
 <?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.
index c9b4bfa94fbec174a577fc84161585523df0df4e..afe7ceec04d8b0c7ee3fe9b6f61f990a16d53425 100644 (file)
@@ -1,7 +1,7 @@
 <?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.
index 947d475ea9779f33d6d24762360435bb05a3e718..453eacd006760e732c375a9d621cc365a8fb4de2 100644 (file)
@@ -26,7 +26,9 @@
             
         <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"
@@ -34,7 +36,8 @@
                 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
index 4d7ce4d7bf9186fbf46340d72ce39e93724f349c..a15ff769614c18831d10c71d2f376e1e2e230415 100644 (file)
@@ -80,7 +80,7 @@ public class FrontDoor extends Activity {
                        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
index 6161c64d9cef89c061d9ad5d21d1cfca348c1b36..7256b7faa1ba4742389bd7d8d8990dfc204d286d 100644 (file)
@@ -6,6 +6,8 @@ import android.preference.PreferenceActivity;
 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) {