diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle
index 9a0583cbd..424fa9c68 100644
--- a/TMessagesProj/build.gradle
+++ b/TMessagesProj/build.gradle
@@ -22,7 +22,6 @@ dependencies {
compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
- implementation 'com.google.firebase:firebase-config:19.1.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
diff --git a/TMessagesProj/src/main/AndroidManifest.xml b/TMessagesProj/src/main/AndroidManifest.xml
index 3ea874298..eee518224 100644
--- a/TMessagesProj/src/main/AndroidManifest.xml
+++ b/TMessagesProj/src/main/AndroidManifest.xml
@@ -403,6 +403,10 @@
+
+
diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java b/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java
index 8d23c7582..efe6eb4b8 100644
--- a/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java
+++ b/TMessagesProj/src/main/java/org/telegram/tgnet/ConnectionsManager.java
@@ -10,9 +10,6 @@ import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
-
import org.json.JSONArray;
import org.json.JSONObject;
import org.telegram.messenger.AccountInstance;
@@ -1223,7 +1220,6 @@ public class ConnectionsManager extends BaseController {
private static class FirebaseTask extends AsyncTask {
private int currentAccount;
- private FirebaseRemoteConfig firebaseRemoteConfig;
public FirebaseTask(int instance) {
super();
@@ -1235,43 +1231,14 @@ public class ConnectionsManager extends BaseController {
if (native_isTestBackend(currentAccount) != 0) {
throw new Exception("test backend");
}
- firebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
- FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder().setDeveloperModeEnabled(BuildConfig.DEBUG).build();
- firebaseRemoteConfig.setConfigSettings(configSettings);
- String currentValue = firebaseRemoteConfig.getString("ipconfigv3");
- if (BuildVars.LOGS_ENABLED) {
- FileLog.d("current firebase value = " + currentValue);
- }
-
- firebaseRemoteConfig.fetch(0).addOnCompleteListener(finishedTask -> {
- final boolean success = finishedTask.isSuccessful();
- Utilities.stageQueue.postRunnable(() -> {
- currentTask = null;
- String config = null;
- if (success) {
- firebaseRemoteConfig.activateFetched();
- config = firebaseRemoteConfig.getString("ipconfigv3");
- }
- if (!TextUtils.isEmpty(config)) {
- byte[] bytes = Base64.decode(config, Base64.DEFAULT);
- try {
- NativeByteBuffer buffer = new NativeByteBuffer(bytes.length);
- buffer.writeBytes(bytes);
- int date = (int) (firebaseRemoteConfig.getInfo().getFetchTimeMillis() / 1000);
- native_applyDnsConfig(currentAccount, buffer.address, AccountInstance.getInstance(currentAccount).getUserConfig().getClientPhone(), date);
- } catch (Exception e) {
- FileLog.e(e);
- }
- } else {
- if (BuildVars.LOGS_ENABLED) {
- FileLog.d("failed to get firebase result");
- FileLog.d("start dns txt task");
- }
- DnsTxtLoadTask task = new DnsTxtLoadTask(currentAccount);
- task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, null, null, null);
- currentTask = task;
- }
- });
+ Utilities.stageQueue.postRunnable(() -> {
+ if (BuildVars.LOGS_ENABLED) {
+ FileLog.d("failed to get firebase result");
+ FileLog.d("start dns txt task");
+ }
+ DnsTxtLoadTask task = new DnsTxtLoadTask(currentAccount);
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, null, null, null);
+ currentTask = task;
});
} catch (Throwable e) {
Utilities.stageQueue.postRunnable(() -> {