Import/export classifier data

pull/190/head
M66B 4 years ago
parent 1b69db2b93
commit 7e6c18e21e

@ -628,6 +628,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
jexport.put("accounts", jaccounts);
jexport.put("answers", janswers);
jexport.put("certificates", jcertificates);
jexport.put("classifier", MessageClassifier.toJson());
jexport.put("settings", jsettings);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -952,6 +953,9 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
}
if (jimport.has("classifier"))
MessageClassifier.fromJson(jimport.getJSONObject("classifier"));
// Settings
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();

Loading…
Cancel
Save