Fix Android push encryption check

This commit is contained in:
Diego Mello 2023-06-22 17:22:47 -03:00
parent 472874f615
commit e03e03f841
1 changed files with 0 additions and 15 deletions

View File

@ -65,21 +65,6 @@ class Encryption {
private ReactApplicationContext reactContext;
public Room readRoom(final Ejson ejson) throws NoSuchFieldException {
int resId = reactContext.getResources().getIdentifier("rn_config_reader_custom_package", "string", reactContext.getPackageName());
String className = reactContext.getString(resId);
Class clazz = null;
Boolean isOfficial = false;
try {
clazz = Class.forName(className + ".BuildConfig");
Field IS_OFFICIAL = clazz.getField("IS_OFFICIAL");
isOfficial = (Boolean) IS_OFFICIAL.get(null);
} catch (ClassNotFoundException | IllegalAccessException e) {
e.printStackTrace();
}
String dbName = ejson.serverURL().replace("https://", "");
if (!isOfficial) {
dbName += "-experimental";
}
dbName += ".db";
Database database = new Database(dbName, reactContext, SQLiteDatabase.CREATE_IF_NECESSARY);
String[] query = {ejson.rid};