use of com.keepassdroid.utils.SprEngineV4 in project KeePassDX by Kunzisoft.
the class SprEngineTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
Context ctx = getContext();
AssetManager am = ctx.getAssets();
InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
ImporterV4 importer = new ImporterV4();
db = importer.openDatabase(is, "12345", null);
is.close();
spr = new SprEngineV4();
}
use of com.keepassdroid.utils.SprEngineV4 in project KeePassDX by Kunzisoft.
the class PwEntryV4 method getExtraFields.
@Override
public Map<String, String> getExtraFields() {
Map<String, String> extraFields = super.getExtraFields();
SprEngineV4 spr = new SprEngineV4();
// Display custom fields
if (fields.size() > 0) {
for (Map.Entry<String, ProtectedString> pair : fields.entrySet()) {
String key = pair.getKey();
// TODO Add hidden style for protection field
if (!PwEntryV4.isStandardField(key)) {
extraFields.put(key, spr.compile(pair.getValue().toString(), this, mDatabase));
}
}
}
return extraFields;
}
Aggregations