Skip to content

Commit d374d48

Browse files
committed
update to 9.5.0
1 parent 1ac56c6 commit d374d48

File tree

962 files changed

+6930
-5765
lines changed

Some content is hidden

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

962 files changed

+6930
-5765
lines changed

‎TMessagesProj/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ configurations.all {
1717
}
1818

1919
dependencies {
20-
implementation 'androidx.core:core:1.6.0'
20+
implementation 'androidx.core:core:1.9.0'
2121
implementation 'androidx.palette:palette:1.0.0'
2222
implementation 'androidx.exifinterface:exifinterface:1.3.3'
2323
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'

‎TMessagesProj/jni/tgnet/ApiScheme.cpp

+14-8
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,19 @@ void TL_config::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &
196196
notify_default_delay_ms = stream->readInt32(&error);
197197
push_chat_period_ms = stream->readInt32(&error);
198198
push_chat_limit = stream->readInt32(&error);
199-
saved_gifs_limit = stream->readInt32(&error);
199+
// saved_gifs_limit = stream->readInt32(&error);
200200
edit_time_limit = stream->readInt32(&error);
201201
revoke_time_limit = stream->readInt32(&error);
202202
revoke_pm_time_limit = stream->readInt32(&error);
203203
rating_e_decay = stream->readInt32(&error);
204204
stickers_recent_limit = stream->readInt32(&error);
205-
stickers_faved_limit = stream->readInt32(&error);
205+
// stickers_faved_limit = stream->readInt32(&error);
206206
channels_read_media_period = stream->readInt32(&error);
207207
if ((flags & 1) != 0) {
208208
tmp_sessions = stream->readInt32(&error);
209209
}
210-
pinned_dialogs_count_max = stream->readInt32(&error);
211-
pinned_infolder_count_max = stream->readInt32(&error);
210+
// pinned_dialogs_count_max = stream->readInt32(&error);
211+
// pinned_infolder_count_max = stream->readInt32(&error);
212212
call_receive_timeout_ms = stream->readInt32(&error);
213213
call_ring_timeout_ms = stream->readInt32(&error);
214214
call_connect_timeout_ms = stream->readInt32(&error);
@@ -244,6 +244,9 @@ void TL_config::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &
244244
if ((flags & 32768) != 0) {
245245
reactions_default = std::unique_ptr<Reaction>(Reaction::TLdeserialize(stream, stream->readUint32(&error), instanceNum, error));
246246
}
247+
if ((flags & 65536) != 0) {
248+
autologin_token = stream->readString(&error);
249+
}
247250
}
248251

249252
void TL_config::serializeToStream(NativeByteBuffer *stream) {
@@ -271,19 +274,19 @@ void TL_config::serializeToStream(NativeByteBuffer *stream) {
271274
stream->writeInt32(notify_default_delay_ms);
272275
stream->writeInt32(push_chat_period_ms);
273276
stream->writeInt32(push_chat_limit);
274-
stream->writeInt32(saved_gifs_limit);
277+
// stream->writeInt32(saved_gifs_limit);
275278
stream->writeInt32(edit_time_limit);
276279
stream->writeInt32(revoke_time_limit);
277280
stream->writeInt32(revoke_pm_time_limit);
278281
stream->writeInt32(rating_e_decay);
279282
stream->writeInt32(stickers_recent_limit);
280-
stream->writeInt32(stickers_faved_limit);
283+
// stream->writeInt32(stickers_faved_limit);
281284
stream->writeInt32(channels_read_media_period);
282285
if ((flags & 1) != 0) {
283286
stream->writeInt32(tmp_sessions);
284287
}
285-
stream->writeInt32(pinned_dialogs_count_max);
286-
stream->writeInt32(pinned_infolder_count_max);
288+
// stream->writeInt32(pinned_dialogs_count_max);
289+
// stream->writeInt32(pinned_infolder_count_max);
287290
stream->writeInt32(call_receive_timeout_ms);
288291
stream->writeInt32(call_ring_timeout_ms);
289292
stream->writeInt32(call_connect_timeout_ms);
@@ -319,6 +322,9 @@ void TL_config::serializeToStream(NativeByteBuffer *stream) {
319322
if ((flags & 32768) != 0 && reactions_default != nullptr) {
320323
reactions_default->serializeToStream(stream);
321324
}
325+
if ((flags & 65536) != 0) {
326+
stream->writeString(autologin_token);
327+
}
322328
}
323329

324330
TLObject *TL_help_getConfig::deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error) {

‎TMessagesProj/jni/tgnet/ApiScheme.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Reaction : public TLObject {
105105
class TL_config : public TLObject {
106106

107107
public:
108-
static const uint32_t constructor = 0x232566ac;
108+
static const uint32_t constructor = 0xcc1a241e;
109109

110110
int32_t flags;
111111
int32_t date;
@@ -125,17 +125,17 @@ class TL_config : public TLObject {
125125
int32_t notify_default_delay_ms;
126126
int32_t push_chat_period_ms;
127127
int32_t push_chat_limit;
128-
int32_t saved_gifs_limit;
128+
// int32_t saved_gifs_limit;
129129
int32_t edit_time_limit;
130130
int32_t revoke_time_limit;
131131
int32_t revoke_pm_time_limit;
132132
int32_t rating_e_decay;
133133
int32_t stickers_recent_limit;
134-
int32_t stickers_faved_limit;
134+
// int32_t stickers_faved_limit;
135135
int32_t channels_read_media_period;
136136
int32_t tmp_sessions;
137-
int32_t pinned_dialogs_count_max;
138-
int32_t pinned_infolder_count_max;
137+
// int32_t pinned_dialogs_count_max;
138+
// int32_t pinned_infolder_count_max;
139139
int32_t call_receive_timeout_ms;
140140
int32_t call_ring_timeout_ms;
141141
int32_t call_connect_timeout_ms;
@@ -153,6 +153,7 @@ class TL_config : public TLObject {
153153
int32_t lang_pack_version;
154154
int32_t base_lang_pack_version;
155155
std::unique_ptr<Reaction> reactions_default;
156+
std::string autologin_token;
156157

157158
static TL_config *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
158159
void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);

‎TMessagesProj/jni/tgnet/ConnectionsManager.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,7 @@ int32_t ConnectionsManager::sendRequestInternal(TLObject *object, onCompleteFunc
17701770
request->rpcRequest = wrapInLayer(object, getDatacenterWithId(datacenterId), request);
17711771
auto cancelledIterator = tokensToBeCancelled.find(request->requestToken);
17721772
if (cancelledIterator != tokensToBeCancelled.end()) {
1773+
if (LOGS_ENABLED) DEBUG_D("(3) request is cancelled before sending, token %d", request->requestToken);
17731774
tokensToBeCancelled.erase(cancelledIterator);
17741775
delete request;
17751776
return request->requestToken;
@@ -1801,6 +1802,7 @@ int32_t ConnectionsManager::sendRequest(TLObject *object, onCompleteFunc onCompl
18011802
request->rpcRequest = wrapInLayer(object, getDatacenterWithId(datacenterId), request);
18021803
auto cancelledIterator = tokensToBeCancelled.find(request->requestToken);
18031804
if (cancelledIterator != tokensToBeCancelled.end()) {
1805+
if (LOGS_ENABLED) DEBUG_D("(1) request is cancelled before sending, token %d", requestToken);
18041806
tokensToBeCancelled.erase(cancelledIterator);
18051807
delete request;
18061808
}
@@ -1847,6 +1849,7 @@ void ConnectionsManager::sendRequest(TLObject *object, onCompleteFunc onComplete
18471849
if (LOGS_ENABLED) DEBUG_D("send request wrapped %p - %s", request->rpcRequest.get(), typeid(*(request->rpcRequest.get())).name());
18481850
auto cancelledIterator = tokensToBeCancelled.find(request->requestToken);
18491851
if (cancelledIterator != tokensToBeCancelled.end()) {
1852+
if (LOGS_ENABLED) DEBUG_D("(2) request is cancelled before sending, token %d", requestToken);
18501853
tokensToBeCancelled.erase(cancelledIterator);
18511854
delete request;
18521855
return;
@@ -1981,6 +1984,7 @@ bool ConnectionsManager::cancelRequestInternal(int32_t token, int64_t messageId,
19811984
}
19821985

19831986
if (token != 0 && connectionState == ConnectionStateWaitingForNetwork) {
1987+
if (LOGS_ENABLED) DEBUG_D("request is tried to be cancelled, but it does not even exist, token %d", token);
19841988
tokensToBeCancelled.insert(token);
19851989
}
19861990

‎TMessagesProj/jni/voip/org_telegram_messenger_voip_Instance.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -726,13 +726,24 @@ JNIEXPORT jlong JNICALL Java_org_telegram_messenger_voip_NativeInstance_makeNati
726726
bool isRtc = endpointObject.getBooleanField("isRtc");
727727
if (isRtc) {
728728
RtcServer rtcServer;
729+
rtcServer.id = static_cast<uint8_t>(endpointObject.getIntField("reflectorId"));
729730
rtcServer.host = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("ipv4"));
730731
rtcServer.port = static_cast<uint16_t>(endpointObject.getIntField("port"));
731732
rtcServer.login = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("username"));
732733
rtcServer.password = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("password"));
733734
rtcServer.isTurn = endpointObject.getBooleanField("turn");
734735
descriptor.rtcServers.push_back(std::move(rtcServer));
735736
} else {
737+
RtcServer rtcServer;
738+
rtcServer.id = static_cast<uint8_t>(endpointObject.getIntField("reflectorId"));
739+
rtcServer.host = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("ipv4"));
740+
rtcServer.port = static_cast<uint16_t>(endpointObject.getIntField("port"));
741+
rtcServer.login = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("username"));
742+
rtcServer.password = tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("password"));
743+
rtcServer.isTurn = true;
744+
rtcServer.isTcp = endpointObject.getBooleanField("tcp");
745+
descriptor.rtcServers.push_back(std::move(rtcServer));
746+
736747
Endpoint endpoint;
737748
endpoint.endpointId = endpointObject.getLongField("id");
738749
endpoint.host = EndpointHost{tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("ipv4")), tgvoip::jni::JavaStringToStdString(env, endpointObject.getStringField("ipv6"))};
@@ -744,7 +755,7 @@ JNIEXPORT jlong JNICALL Java_org_telegram_messenger_voip_NativeInstance_makeNati
744755
memcpy(endpoint.peerTag, peerTagBytes, 16);
745756
env->ReleaseByteArrayElements(peerTag, peerTagBytes, JNI_ABORT);
746757
}
747-
descriptor.endpoints.push_back(std::move(endpoint));
758+
descriptor.endpoints.push_back(std::move(endpoint));
748759
}
749760
}
750761

‎TMessagesProj/jni/voip/tgcalls/v2/InstanceV2Impl.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,9 @@ class InstanceV2ImplInternal : public std::enable_shared_from_this<InstanceV2Imp
10871087
beginQualityTimer(0);
10881088
beginLogTimer(0);
10891089

1090-
1090+
NativeNetworkingImpl::State initialNetworkState;
1091+
initialNetworkState.isReadyToSendData = false;
1092+
onNetworkStateUpdated(initialNetworkState);
10911093
}
10921094

10931095
void beginQualityTimer(int delayMs) {

‎TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_track_jni.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int32_t AudioTrackJni::StartPlayout() {
176176
int32_t AudioTrackJni::StopPlayout() {
177177
RTC_LOG(LS_INFO) << "StopPlayout";
178178
RTC_DCHECK(thread_checker_.IsCurrent());
179-
if (!initialized_ || !playing_) {
179+
if (!initialized_ || !playing_ || j_audio_track_ == nullptr) {
180180
return 0;
181181
}
182182
if (!j_audio_track_->StopPlayout()) {

‎TMessagesProj/src/main/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
<category android:name="android.intent.category.LAUNCHER" />
110110
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
111111
</intent-filter>
112+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
112113
</activity-alias>
113114

114115
<activity-alias
@@ -124,6 +125,7 @@
124125
<category android:name="android.intent.category.LAUNCHER" />
125126
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
126127
</intent-filter>
128+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
127129
</activity-alias>
128130

129131
<activity-alias
@@ -139,6 +141,7 @@
139141
<category android:name="android.intent.category.LAUNCHER" />
140142
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
141143
</intent-filter>
144+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
142145
</activity-alias>
143146

144147
<activity-alias
@@ -154,6 +157,7 @@
154157
<category android:name="android.intent.category.LAUNCHER" />
155158
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
156159
</intent-filter>
160+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
157161
</activity-alias>
158162

159163
<activity-alias
@@ -169,6 +173,7 @@
169173
<category android:name="android.intent.category.LAUNCHER" />
170174
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
171175
</intent-filter>
176+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
172177
</activity-alias>
173178

174179
<activity-alias
@@ -184,6 +189,7 @@
184189
<category android:name="android.intent.category.LAUNCHER" />
185190
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
186191
</intent-filter>
192+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
187193
</activity-alias>
188194

189195
<activity

‎TMessagesProj/src/main/assets/arctic.attheme

-17
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ chats_menuPhone=-1006632961
1313
avatar_actionBarIconOrange=-8684677
1414
chat_outViews=-1258291201
1515
avatar_actionBarSelectorCyan=-8684677
16-
chat_secretTimerBackground=1375731712
1716
chat_outViaBotNameText=-1
1817
profile_actionPressedBackground=-13924376
19-
chat_inPreviewInstantSelectedText=-13464859
2018
location_sendLocationBackground=-11492107
2119
avatar_nameInMessageViolet=-8163354
2220
chat_inAudioSelectedProgress=-2034434
@@ -38,7 +36,6 @@ chats_menuPhoneCats=-1
3836
chat_outPreviewLine=-1
3937
chat_inViaBotNameText=-13464859
4038
chat_outVoiceSeekbar=1895825407
41-
chat_outFileIcon=-6113593
4239
chats_menuTopShadowCats=2924287
4340
chats_nameMessage_threeLines=-12434359
4441
chat_inFileProgress=-1
@@ -67,7 +64,6 @@ chat_topPanelLine=-364404226
6764
chat_outInstantSelected=-1
6865
chat_outSentCheck=-922746881
6966
key_graySectionText=-8156525
70-
chat_outFileSelectedIcon=-7883067
7167
dialogButton=-13987604
7268
actionBarDefaultSubtitle=-7630182
7369
contextProgressInner2=-826024458
@@ -107,16 +103,13 @@ chat_messagePanelSend=-12935426
107103
windowBackgroundWhiteRedText2=-1817262
108104
avatar_backgroundBlue=-11491866
109105
chat_inSentClock=-5195068
110-
chat_outLoaderPhoto=-6113080
111106
chat_botSwitchToInlineText=-13464859
112107
chats_nameMessageArchived=-7237231
113-
dialogTextRed2=-1354403
114108
chats_tabUnreadUnactiveBackground=-13655305
115109
avatar_subtitleInProfileOrange=-16777216
116110
chat_outSentCheckSelected=-1191182337
117111
chat_inVenueInfoSelectedText=-7099204
118112
dialogTextBlue2=-14772773
119-
dialogTextBlue3=-14839830
120113
dialogTextBlue4=-15625752
121114
actionBarTabActiveText=-13590803
122115
chat_topPanelMessage=-8354167
@@ -206,7 +199,6 @@ wallpaperFileOffset=-1
206199
chat_outBubbleShadow=868467
207200
chat_outVenueNameText=-11822380
208201
chat_outTextSelectionHighlight=1802747885
209-
chats_menuCloudBackgroundCats=-12545584
210202
chats_verifiedBackground=-12998152
211203
chat_inTimeSelectedText=-7099204
212204
chat_outFileBackgroundSelected=1351271669
@@ -223,7 +215,6 @@ chat_outFileNameText=-1
223215
picker_enabledButton=-14180619
224216
avatar_nameInMessagePink=-3453050
225217
windowBackgroundWhiteGrayText=-7629665
226-
musicPicker_buttonBackground=-12212482
227218
chat_serviceIcon=-1
228219
avatar_actionBarSelectorViolet=-8684677
229220
avatar_nameInMessageBlue=-13464859
@@ -238,10 +229,8 @@ chat_inVenueInfoText=-6182221
238229
chat_replyPanelIcons=-12086038
239230
chat_outSentClockSelected=1895825407
240231
featuredStickers_addedIcon=-13325569
241-
musicPicker_checkbox=-12405250
242232
chat_outFileBackground=1351271669
243233
chat_attachSendBackground=-12608006
244-
dialogBadgeBackground=-13852434
245234
chat_outBubbleSelected=-13332255
246235
avatar_backgroundInProfileBlue=-13330708
247236
chat_lockIcon=-9211021
@@ -253,7 +242,6 @@ chat_inFileInfoSelectedText=-7099204
253242
chat_wallpaper=-2562829
254243
chat_outMenuSelected=-1862270977
255244
fastScrollActive=-12409618
256-
chat_outLoaderPhotoSelected=-6113593
257245
chat_muteIcon=1718842227
258246
chat_selectedBackground=756261375
259247
chat_recordedVoiceBackground=-12675093
@@ -263,7 +251,6 @@ chat_addContact=-14775579
263251
switchTrackChecked=-11884552
264252
chat_inLoader=-12015626
265253
chat_adminSelectedText=-6769974
266-
chat_outPreviewInstantSelectedText=-1
267254
avatar_actionBarIconBlue=-12433070
268255
chat_outTimeText=-1056964609
269256
chat_attachAudioText=-2209977
@@ -277,16 +264,13 @@ chat_outReplyMediaMessageText=-1056964609
277264
chat_textSelectBackground=1027252973
278265
actionBarTabSelector=136982325
279266
player_buttonActive=-13851650
280-
chat_outLoaderPhotoIcon=-1
281267
chat_attachFileText=-15423260
282268
chat_outContactBackground=-1
283269
sharedMedia_linkPlaceholder=-723724
284270
windowBackgroundWhiteBlueText7=-12149279
285-
chat_outLocationBackground=1352257013
286271
windowBackgroundWhiteBlueText3=-13530406
287272
windowBackgroundWhiteBlueText5=-12935951
288273
windowBackgroundWhiteBlueText4=-12675352
289-
chat_replyPanelMessage=-13355980
290274
chat_inViewsSelected=-6373686
291275
windowBackgroundWhiteLinkSelection=560114147
292276
inappPlayerClose=-7563878
@@ -304,7 +288,6 @@ chat_sentError=-65536
304288
avatar_actionBarSelectorRed=-8684677
305289
chat_inAudioDurationSelectedText=-7099204
306290
chat_outAudioSeekbarSelected=1487394047
307-
chat_outLoaderPhotoIconSelected=-1314571
308291
avatar_actionBarIconGreen=-8291461
309292
chat_outReplyMessageText=-1
310293
chat_recordedVoiceDot=-833978

0 commit comments

Comments
 (0)