NekoX/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java

55 lines
2.3 KiB
Java
Raw Normal View History

/*
2020-09-30 15:48:47 +02:00
* This is the source code of Telegram for Android v. 7.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
2020-09-30 15:48:47 +02:00
* Copyright Nikolai Kudashov, 2013-2020.
*/
package org.telegram.messenger;
2018-07-30 04:07:02 +02:00
import android.content.Context;
import android.content.SharedPreferences;
public class BuildVars {
2018-07-30 04:07:02 +02:00
2014-10-07 22:14:27 +02:00
public static boolean DEBUG_VERSION = false;
2017-03-31 01:58:05 +02:00
public static boolean DEBUG_PRIVATE_VERSION = false;
public static boolean LOGS_ENABLED = false;
2019-01-23 18:03:33 +01:00
public static boolean USE_CLOUD_STRINGS = true;
2019-12-31 14:08:08 +01:00
public static boolean CHECK_UPDATES = true;
2021-06-25 02:43:10 +02:00
public static boolean NO_SCOPED_STORAGE = true/* || Build.VERSION.SDK_INT <= 28*/;
2021-08-07 01:55:04 +02:00
public static int BUILD_VERSION = 2390;
public static String BUILD_VERSION_STRING = "7.9.3";
2019-12-31 14:08:08 +01:00
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
2020-03-30 14:00:09 +02:00
public static String APPCENTER_HASH = "a5b5c4f5-51da-dedc-9918-d9766a22ca7c";
public static String APPCENTER_HASH_DEBUG = "f9726602-67c9-48d2-b5d0-4761f1c1a8f3";
2019-12-31 14:08:08 +01:00
//
2021-07-31 01:39:13 +02:00
public static String SMS_HASH = isStandaloneApp() ? "w0lkcmTZkKh" : (DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT");
2019-12-31 14:08:08 +01:00
public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=org.telegram.messenger";
2018-07-30 04:07:02 +02:00
static {
if (ApplicationLoader.applicationContext != null) {
SharedPreferences sharedPreferences = ApplicationLoader.applicationContext.getSharedPreferences("systemConfig", Context.MODE_PRIVATE);
2021-06-25 02:43:10 +02:00
LOGS_ENABLED = DEBUG_VERSION || sharedPreferences.getBoolean("logsEnabled", DEBUG_VERSION);
2018-07-30 04:07:02 +02:00
}
}
2021-07-31 01:39:13 +02:00
private static Boolean standaloneApp;
public static boolean isStandaloneApp() {
if (standaloneApp == null) {
standaloneApp = ApplicationLoader.applicationContext != null && "org.telegram.messenger.web".equals(ApplicationLoader.applicationContext.getPackageName());
}
return standaloneApp;
}
private static Boolean betaApp;
public static boolean isBetaApp() {
if (betaApp == null) {
betaApp = ApplicationLoader.applicationContext != null && "org.telegram.messenger.beta".equals(ApplicationLoader.applicationContext.getPackageName());
}
return betaApp;
}
}