Skip to content

Commit c122c49

Browse files
committed
Update to 12.0.1
- Updated BoringSSL to version 0.20251807.0
2 parents d72b75d + ddc90f1 commit c122c49

File tree

224 files changed

+23505
-7917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+23505
-7917
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM gradle:8.6.0-jdk17
1+
FROM gradle:8.7.0-jdk17
22

33
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip
4-
ENV ANDROID_API_LEVEL android-34
5-
ENV ANDROID_BUILD_TOOLS_VERSION 34.0.0
4+
ENV ANDROID_API_LEVEL android-35
5+
ENV ANDROID_BUILD_TOOLS_VERSION 35.0.0
66
ENV ANDROID_HOME /usr/local/android-sdk-linux
77
ENV ANDROID_NDK_VERSION 21.4.7075529
8-
ENV ANDROID_VERSION 34
8+
ENV ANDROID_VERSION 35
99
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/
1010
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
1111

@@ -22,8 +22,8 @@ RUN $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "build-t
2222
"platforms;android-${ANDROID_VERSION}" \
2323
"platform-tools" \
2424
"ndk;$ANDROID_NDK_VERSION"
25-
RUN cp $ANDROID_HOME/build-tools/30.0.3/dx $ANDROID_HOME/build-tools/34.0.0/dx
26-
RUN cp $ANDROID_HOME/build-tools/30.0.3/lib/dx.jar $ANDROID_HOME/build-tools/34.0.0/lib/dx.jar
25+
RUN cp $ANDROID_HOME/build-tools/30.0.3/dx $ANDROID_HOME/build-tools/35.0.0/dx
26+
RUN cp $ANDROID_HOME/build-tools/30.0.3/lib/dx.jar $ANDROID_HOME/build-tools/35.0.0/lib/dx.jar
2727
ENV PATH ${ANDROID_NDK_HOME}:$PATH
2828
ENV PATH ${ANDROID_NDK_HOME}/prebuilt/linux-x86_64/bin/:$PATH
2929

TMessagesProj/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def getStringForConfig(String s) {
7373

7474
def isWindows = String.valueOf(DefaultNativePlatform.currentOperatingSystem.toFamilyName() == OperatingSystemFamily.WINDOWS)
7575
android {
76-
compileSdkVersion 34
76+
compileSdkVersion 35
7777
buildToolsVersion '36.0.0'
7878
ndkVersion = "28.2.13676358"
7979

@@ -106,7 +106,7 @@ android {
106106

107107
defaultConfig {
108108
minSdkVersion 24
109-
targetSdkVersion 34
109+
targetSdkVersion 35
110110

111111
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
112112

@@ -136,7 +136,7 @@ android {
136136
externalNativeBuild {
137137
cmake {
138138
version = '3.21.0+'
139-
arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-24'
139+
arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-24' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
140140
}
141141
}
142142
}
@@ -186,7 +186,7 @@ android {
186186
buildConfigField "int", "VERSION_NUM", "7"
187187
}
188188
}
189-
namespace = 'org.telegram.messenger'
189+
namespace 'org.telegram.messenger'
190190
}
191191

192192

TMessagesProj/jni/Application.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
APP_PLATFORM := android-16
1+
APP_PLATFORM := android-21
2+
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
23
NDK_TOOLCHAIN_VERSION := clang
3-
APP_STL := c++_static
4+
APP_STL := c++_static
5+
6+
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
7+
LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"

TMessagesProj/jni/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.6.0)
1+
cmake_minimum_required(VERSION 3.10.2)
22
project(YATGram)
33

44
find_program(CCACHE ccache)
@@ -649,6 +649,8 @@ target_include_directories(${NATIVE_LIB} PUBLIC
649649
tde2e/include
650650
)
651651

652+
target_link_options(${NATIVE_LIB} PRIVATE "-Wl,-z,max-page-size=16384")
653+
target_link_options(${NATIVE_LIB} PRIVATE "-Wl,-z,common-page-size=16384")
652654
target_link_libraries(${NATIVE_LIB}
653655
-Wl,--whole-archive rnnoise openh264 voipandroid -Wl,--no-whole-archive
654656
tgvoip

TMessagesProj/jni/boringssl

Submodule boringssl updated 70 files

TMessagesProj/jni/intro/IntroRenderer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <stdlib.h>
44
#include <string.h>
55
#include <jni.h>
6+
#include <string.h>
67

78
static int32_t is_initialized = 0;
89
static float _coefficientsX[TIMING_NUM][4], _coefficientsY[TIMING_NUM][4];

TMessagesProj/jni/patches/boringssl/0001-only-build-what-we-need.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ index 06ce07e95..c34d6d24a 100644
4747
- install(TARGETS bssl)
4848
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
4949
install(EXPORT OpenSSLTargets
50-
FILE OpenSSLTargets.cmake
51-
diff --git a/gen/sources.cmake b/gen/sources.cmake
52-
index df53126ed..1a7f26684 100644
50+
FILE OpenSSLTargets.cmakediff --git a/gen/sources.cmake b/gen/sources.cmake
51+
index 00ac47eec..b80e28aae 100644
5352
--- a/gen/sources.cmake
5453
+++ b/gen/sources.cmake
5554
@@ -242,35 +242,6 @@ set(
@@ -88,7 +87,7 @@ index df53126ed..1a7f26684 100644
8887
set(
8988
CRYPTO_SOURCES
9089

91-
@@ -735,424 +706,6 @@ set(
90+
@@ -734,425 +705,6 @@ set(
9291
gen/crypto/md5-x86_64-win.asm
9392
)
9493

@@ -236,6 +235,7 @@ index df53126ed..1a7f26684 100644
236235
- crypto/fipsmodule/ecdsa/ecdsa_sign_tests.txt
237236
- crypto/fipsmodule/ecdsa/ecdsa_verify_tests.txt
238237
- crypto/fipsmodule/keccak/keccak_tests.txt
238+
- crypto/fipsmodule/rand/ctrdrbg_df_vectors.txt
239239
- crypto/fipsmodule/rand/ctrdrbg_vectors.txt
240240
- crypto/hmac/hmac_tests.txt
241241
- crypto/hpke/hpke_test_vectors.txt
@@ -513,7 +513,7 @@ index df53126ed..1a7f26684 100644
513513
set(
514514
FUZZ_SOURCES
515515

516-
@@ -1205,1617 +758,6 @@ set(
516+
@@ -1205,1617 +757,6 @@ set(
517517
util/fipstools/acvp/modulewrapper/modulewrapper.h
518518
)
519519

@@ -2131,7 +2131,7 @@ index df53126ed..1a7f26684 100644
21312131
set(
21322132
SSL_SOURCES
21332133

2134-
@@ -2874,72 +816,3 @@ set(
2134+
@@ -2874,72 +815,3 @@ set(
21352135

21362136
ssl/internal.h
21372137
)

TMessagesProj/jni/tgnet/ApiScheme.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ void TL_emojiStatus::readParams(NativeByteBuffer *stream, int32_t instanceNum, b
476476
flags = stream->readInt32(&error);
477477
document_id = stream->readInt64(&error);
478478
if ((flags & 1) != 0) {
479-
until = stream->readInt64(&error);
479+
until = stream->readInt32(&error);
480480
}
481481
}
482482

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
org.gradle.jvmargs=-Xmx1536m
13+
14+
# When configured, Gradle will run in incubating parallel mode.
15+
# This option should only be used with decoupled projects. More details, visit
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true
18+
19+
# AndroidX package structure to make it clearer which packages are bundled with the
20+
# Android operating system, and which are packaged with your app's APK
21+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
22+
android.useAndroidX=true

TMessagesProj/src/main/java/androidx/recyclerview/widget/RecyclerView.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5241,6 +5241,13 @@ public boolean hasPendingAdapterUpdates() {
52415241
|| mAdapterHelper.hasPendingUpdates();
52425242
}
52435243

5244+
public boolean canStopFlinger = true;
5245+
private boolean isFlingerWorking = false;
5246+
5247+
public boolean isFlingerWorking() {
5248+
return isFlingerWorking;
5249+
}
5250+
52445251
class ViewFlinger implements Runnable {
52455252
private int mLastFlingX;
52465253
private int mLastFlingY;
@@ -5260,6 +5267,7 @@ class ViewFlinger implements Runnable {
52605267
@Override
52615268
public void run() {
52625269
if (mLayout == null) {
5270+
canStopFlinger = true;
52635271
stop();
52645272
return; // no layout, cannot scroll.
52655273
}
@@ -5280,6 +5288,7 @@ public void run() {
52805288
// Keep a local reference so that if it is changed during onAnimation method, it won't
52815289
// cause unexpected behaviors
52825290
final OverScroller scroller = mOverScroller;
5291+
isFlingerWorking = true;
52835292
if (scroller.computeScrollOffset()) {
52845293
final int x = scroller.getCurrX();
52855294
final int y = scroller.getCurrY();
@@ -5394,6 +5403,8 @@ public void run() {
53945403
}
53955404
}
53965405

5406+
isFlingerWorking = false;
5407+
53975408
SmoothScroller smoothScroller = mLayout.mSmoothScroller;
53985409
// call this after the onAnimation is complete not to have inconsistent callbacks etc.
53995410
if (smoothScroller != null && smoothScroller.isPendingInitialRun()) {
@@ -5501,6 +5512,7 @@ private int computeScrollDuration(int dx, int dy, int vx, int vy) {
55015512
}
55025513

55035514
public void stop() {
5515+
if (!canStopFlinger) return;
55045516
removeCallbacks(this);
55055517
mOverScroller.abortAnimation();
55065518
}
@@ -11776,8 +11788,8 @@ public SmoothScroller() {
1177611788
* stop calling SmoothScroller in each animation step.</p>
1177711789
*/
1177811790
void start(RecyclerView recyclerView, LayoutManager layoutManager) {
11779-
1178011791
// Stop any previous ViewFlinger animations now because we are about to start a new one.
11792+
recyclerView.canStopFlinger = true;
1178111793
recyclerView.mViewFlinger.stop();
1178211794

1178311795
if (mStarted) {

0 commit comments

Comments
 (0)