]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
remove unused method
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index 2b587c8ed4ad6d01331577122702e2f8c8ef6eec..6c7fb195719bb97ea7b5e6c2fc1dac03adb8ef34 100644 (file)
@@ -90,44 +90,7 @@ public final class MobileLedgerProfile {
             db.endTransaction();
         }
     }
-    public static List<MobileLedgerProfile> createInitialProfileList() {
-        List<MobileLedgerProfile> result = new ArrayList<>();
-        MobileLedgerProfile first =
-                new MobileLedgerProfile(UUID.randomUUID().toString(), "default", "", false, "", "");
-        first.storeInDB();
-        result.add(first);
 
-        return result;
-    }
-    public static MobileLedgerProfile loadUUIDFromDB(String profileUUID) {
-        SQLiteDatabase db = MLDB.getReadableDatabase();
-        String name;
-        String url;
-        String authUser;
-        String authPassword;
-        Boolean useAuthentication;
-        try (Cursor cursor = db.rawQuery("SELECT name, url, use_authentication, auth_user, " +
-                                         "auth_password FROM profiles WHERE uuid=?",
-                new String[]{profileUUID}))
-        {
-            if (cursor.moveToNext()) {
-                name = cursor.getString(0);
-                url = cursor.getString(1);
-                useAuthentication = cursor.getInt(2) == 1;
-                authUser = useAuthentication ? cursor.getString(3) : null;
-                authPassword = useAuthentication ? cursor.getString(4) : null;
-            }
-            else {
-                name = "Unknown profile";
-                url = "Https://server/url";
-                useAuthentication = false;
-                authUser = authPassword = null;
-            }
-        }
-
-        return new MobileLedgerProfile(profileUUID, name, url, useAuthentication, authUser,
-                authPassword);
-    }
     public String getUuid() {
         return uuid;
     }