From 11edd5ee0d924b8db0bd9b2460c7abdf664ad716 Mon Sep 17 00:00:00 2001 From: xaxtix Date: Sun, 18 Sep 2022 21:02:37 +0400 Subject: [PATCH] update to 9.0.1 --- TMessagesProj/build.gradle | 2 +- TMessagesProj/jni/tgnet/ApiScheme.cpp | 7 ++----- .../org/telegram/messenger/AndroidUtilities.java | 3 --- .../main/java/org/telegram/messenger/BuildVars.java | 5 +++-- .../org/telegram/messenger/MediaDataController.java | 3 +++ .../src/main/java/org/telegram/tgnet/TLRPC.java | 12 ++++++------ gradle.properties | 4 ++-- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 3922d8d13..4ab052f38 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -72,7 +72,7 @@ android { coreLibraryDesugaringEnabled true } - defaultConfig.versionCode = 2759 + defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) defaultConfig { minSdkVersion 16 diff --git a/TMessagesProj/jni/tgnet/ApiScheme.cpp b/TMessagesProj/jni/tgnet/ApiScheme.cpp index d055a4df3..994a4aebc 100644 --- a/TMessagesProj/jni/tgnet/ApiScheme.cpp +++ b/TMessagesProj/jni/tgnet/ApiScheme.cpp @@ -241,12 +241,9 @@ void TL_config::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool & if ((flags & 4) != 0) { base_lang_pack_version = stream->readInt32(&error); } - if ((flags & 4) != 0) { - base_lang_pack_version = stream->readInt32(&error); + if ((flags & 32768) != 0) { + reactions_default = std::unique_ptr(Reaction::TLdeserialize(stream, stream->readUint32(&error), instanceNum, error)); } -// if ((flags & 32768) != 0) { -// reactions_default = std::unique_ptr(Reaction::TLdeserialize(stream, stream->readUint32(&error), instanceNum, error)); -// } } void TL_config::serializeToStream(NativeByteBuffer *stream) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java b/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java index 0ed72db7b..f6f9d1114 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java @@ -114,9 +114,6 @@ import com.android.internal.telephony.ITelephony; import com.google.android.gms.auth.api.phone.SmsRetriever; import com.google.android.gms.auth.api.phone.SmsRetrieverClient; import com.google.android.gms.tasks.Task; -import com.microsoft.appcenter.AppCenter; -import com.microsoft.appcenter.crashes.Crashes; -import com.microsoft.appcenter.distribute.Distribute; import org.telegram.PhoneFormat.PhoneFormat; import org.telegram.messenger.browser.Browser; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index ca1df2fcd..5286dab0b 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -24,10 +24,11 @@ public class BuildVars { public static boolean USE_CLOUD_STRINGS = true; public static boolean CHECK_UPDATES = true; public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29; - public static int BUILD_VERSION = 2799; - public static String BUILD_VERSION_STRING = "9.0.0"; + public static int BUILD_VERSION = 2800; + public static String BUILD_VERSION_STRING = "9.0.1"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; + public static String APPCENTER_HASH = "f9726602-67c9-48d2-b5d0-4761f1c1a8f3"; public static String SMS_HASH = isStandaloneApp() ? "w0lkcmTZkKh" : (DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT"); public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=org.telegram.messenger"; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java index 54a3422ff..0b5a4b9a3 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java @@ -2508,6 +2508,9 @@ public class MediaDataController extends BaseController { private static long calcStickersHash(ArrayList sets) { long acc = 0; for (int a = 0; a < sets.size(); a++) { + if (sets.get(a) == null) { + continue; + } TLRPC.StickerSet set = sets.get(a).set; if (set.archived) { continue; diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java index 4780e1ac0..ebfc5896e 100644 --- a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java +++ b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java @@ -35149,9 +35149,9 @@ public class TLRPC { if ((flags & 4) != 0) { base_lang_pack_version = stream.readInt32(exception); } -// if ((flags & 32768) != 0) { -// reactions_default = Reaction.TLdeserialize(stream, stream.readInt32(exception), exception); -// } + if ((flags & 32768) != 0) { + reactions_default = Reaction.TLdeserialize(stream, stream.readInt32(exception), exception); + } } public void serializeToStream(AbstractSerializedData stream) { @@ -35232,9 +35232,9 @@ public class TLRPC { if ((flags & 4) != 0) { stream.writeInt32(base_lang_pack_version); } -// if ((flags & 32768) != 0) { -// reactions_default.serializeToStream(stream); -// } + if ((flags & 32768) != 0) { + reactions_default.serializeToStream(stream); + } } } diff --git a/gradle.properties b/gradle.properties index a69122df0..665539055 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Sat Mar 12 05:53:50 MSK 2016 -APP_VERSION_NAME=8.9.2 -APP_VERSION_CODE=2756 +APP_VERSION_NAME=9.0.1 +APP_VERSION_CODE=2800 APP_PACKAGE=org.telegram.messenger RELEASE_KEY_PASSWORD=TelegramAndroidPswd RELEASE_KEY_ALIAS=tmessages