Removed "library url" settings from settings page which never worked right and led...
authorkenstir <kenstir@gmail.com>
Tue, 10 Dec 2013 01:59:35 +0000 (20:59 -0500)
committerkenstir <kenstir@gmail.com>
Tue, 10 Dec 2013 01:59:35 +0000 (20:59 -0500)
Open-ILS/src/Android/core/res/values/strings.xml
Open-ILS/src/Android/core/res/xml/preferences.xml
Open-ILS/src/Android/core/src/org/evergreen/android/views/ApplicationPreferences.java

index 3925ea5..346dd07 100644 (file)
     <string name="preference_password">Password</string>
     <string name="preference_password_summary">Enter your account password</string>
     <string name="preference_server_information_title">Server settings</string>
-    <string name="preference_server_information_summary">Library server settings</string>
-    <string name="preference_library_url_address">Library URL</string>
-    <string name="preference_library_url_address_summary">Please enter the URL in format http://</string>
     <string name="preference_notification_preference_screen_title">Notification settings</string>
     <string name="preference_notification_preference_screen_summary">Configure notifications and reminders for checkout items</string>
     <string name="preference_enable_notifications">Enable notifications</string>
index 07f1785..6902692 100644 (file)
@@ -2,15 +2,6 @@
 <PreferenceScreen
         xmlns:android="http://schemas.android.com/apk/res/android">
 
-        <PreferenceCategory
-          android:title="@string/preference_server_information_title" >
-               <EditTextPreference
-            android:key="library_url"
-            android:summary="@string/preference_library_url_address_summary"
-            android:title="@string/preference_library_url_address"
-         android:defaultValue="@string/ou_library_url"/>
-        </PreferenceCategory>
-  
        <PreferenceCategory
           android:title="@string/preference_notifications_title" >
         <CheckBoxPreference
index 6118564..0d5aa91 100644 (file)
@@ -54,8 +54,6 @@ public class ApplicationPreferences extends PreferenceActivity implements
 
     private Context context;
 
-    private Thread connectionThread = null;
-
     private Thread coreFilesDownload = null;
 
     @Override
@@ -68,9 +66,7 @@ public class ApplicationPreferences extends PreferenceActivity implements
         context = this;
         reference = this;
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-        // register preference listener
         prefs.registerOnSharedPreferenceChangeListener(this);
-
     }
 
     @Override
@@ -103,50 +99,8 @@ public class ApplicationPreferences extends PreferenceActivity implements
 
         boolean httpAddressChange = false;
 
-        connectionThread = new Thread(new Runnable() {
-
-            @Override
-            public void run() {
-            }
-        });
-
         boolean checkConnection = false;
 
-        if (key.equals(Const.KEY_LIBRARY_URL)) {
-            checkConnection = true;
-            GlobalConfigs.httpAddress = sharedPreferences.getString(Const.KEY_LIBRARY_URL, "");
-
-            httpAddressChange = true;
-            System.out.println("Show dialog");
-
-            progressDialog = ProgressDialog.show(context, "Core files",
-                    "Downloading FM_IDL and OrgTree");
-
-            coreFilesDownload = new Thread(new Runnable() {
-
-                @Override
-                public void run() {
-                    System.out.println("FM idl download");
-                    GlobalConfigs sg = GlobalConfigs.getGlobalConfigs(context);
-                    sg.loadIDLFile(context);
-                    sg.getOrganisations();
-                    sg.getCopyStatusesAvailable((ConnectivityManager) context
-                            .getSystemService(Context.CONNECTIVITY_SERVICE));
-                    runOnUiThread(new Runnable() {
-                        public void run() {
-                            progressDialog.dismiss();
-                        }
-                    });
-
-                    connectionThread.start();
-                }
-            });
-
-            coreFilesDownload.start();
-
-            // wait for execution
-
-        }
         if (key.equals("notifications_enabled")) {
 
             if (sharedPreferences.getBoolean("notifications_enabled", false)) {
@@ -193,26 +147,4 @@ public class ApplicationPreferences extends PreferenceActivity implements
         }
     }
 
-    /*
-     * Dialog interface for starting the network settings
-     */
-    DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
-        @Override
-        public void onClick(DialogInterface dialog, int which) {
-            switch (which) {
-            case DialogInterface.BUTTON_POSITIVE:
-                // Yes button clicked
-
-                context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
-
-                break;
-
-            case DialogInterface.BUTTON_NEGATIVE:
-                // No button clicked
-
-                break;
-            }
-        }
-    };
-
 }