Skip to content

Commit

Permalink
Tidied up code style on Database.java
Browse files Browse the repository at this point in the history
Tidied up code style
  • Loading branch information
TwinProduction authored Nov 26, 2016
1 parent 1a3384f commit 04f37e6
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions app/src/main/java/com/keepassdroid/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,13 @@ public void LoadData(Context ctx, Uri uri, String password, Uri keyfile, UpdateS
throw ContentFileNotFoundException.getInstance(keyfile);
}
LoadData(ctx, is, password, kfIs, status, debug);

}

public void LoadData(Context ctx, InputStream is, String password, InputStream kfIs, boolean debug) throws IOException, InvalidDBException {
LoadData(ctx, is, password, kfIs, new UpdateStatus(), debug);
}

public void LoadData(Context ctx, InputStream is, String password, InputStream kfIs, UpdateStatus status, boolean debug) throws IOException, InvalidDBException {

BufferedInputStream bis = new BufferedInputStream(is);

if ( ! bis.markSupported() ) {
Expand All @@ -132,32 +130,23 @@ public void LoadData(Context ctx, InputStream is, String password, InputStream k
pm = imp.openDatabase(bis, password, kfIs, status);
if ( pm != null ) {
PwGroup root = pm.rootGroup;

pm.populateGlobals(root);

LoadData(ctx, pm, password, kfIs, status);
}

loaded = true;
}

public void LoadData(Context ctx, PwDatabase pm, String password, InputStream keyInputStream, UpdateStatus status) {
if ( pm != null ) {
passwordEncodingError = !pm.validatePasswordEncoding(password);
}

searchHelper = new SearchDbHelper(ctx);

loaded = true;
}

public PwGroup Search(String str) {
if (searchHelper == null) { return null; }

PwGroup group = searchHelper.search(this, str);

return group;

return searchHelper.search(this, str);
}

public void SaveData(Context ctx) throws IOException, PwDbOutputException {
Expand Down Expand Up @@ -203,9 +192,7 @@ public void SaveData(Context ctx, Uri uri) throws IOException, PwDbOutputExcepti
pmo.output();
os.close();
}

mUri = uri;

}

public void clear() {
Expand All @@ -229,5 +216,4 @@ public void markAllGroupsAsDirty() {
dirty.add(pm.rootGroup);
}
}

}

0 comments on commit 04f37e6

Please sign in to comment.