Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apk
Commits
e9e40cb1
Commit
e9e40cb1
authored
Dec 09, 2017
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes
parent
5630ad86
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
20 deletions
+25
-20
build.gradle
TMessagesProj/build.gradle
+1
-1
ConnectionsManager.cpp
TMessagesProj/jni/tgnet/ConnectionsManager.cpp
+1
-1
NativeByteBuffer.cpp
TMessagesProj/jni/tgnet/NativeByteBuffer.cpp
+3
-3
BuildVars.java
...sProj/src/main/java/org/telegram/messenger/BuildVars.java
+1
-1
FileLoader.java
...Proj/src/main/java/org/telegram/messenger/FileLoader.java
+12
-7
MessagesStorage.java
...src/main/java/org/telegram/messenger/MessagesStorage.java
+1
-1
MusicPlayerService.java
.../main/java/org/telegram/messenger/MusicPlayerService.java
+6
-6
No files found.
TMessagesProj/build.gradle
View file @
e9e40cb1
...
...
@@ -91,7 +91,7 @@ android {
}
}
defaultConfig
.
versionCode
=
115
4
defaultConfig
.
versionCode
=
115
5
sourceSets
.
debug
{
manifest
.
srcFile
'config/debug/AndroidManifest.xml'
...
...
TMessagesProj/jni/tgnet/ConnectionsManager.cpp
View file @
e9e40cb1
...
...
@@ -1289,12 +1289,12 @@ void ConnectionsManager::processServerResponse(TLObject *message, int64_t messag
networkMessage
->
message
->
bytes
=
request
->
getObjectSize
();
networkMessage
->
message
->
body
=
std
::
unique_ptr
<
TLObject
>
(
request
);
networkMessage
->
message
->
seqno
=
connection
->
generateMessageSeqNo
(
false
);
resendRequests
[
networkMessage
->
message
->
msg_id
]
=
response
->
answer_msg_id
;
std
::
vector
<
std
::
unique_ptr
<
NetworkMessage
>>
array
;
array
.
push_back
(
std
::
unique_ptr
<
NetworkMessage
>
(
networkMessage
));
sendMessagesToConnection
(
array
,
connection
,
false
);
resendRequests
[
networkMessage
->
message
->
msg_id
]
=
response
->
answer_msg_id
;
}
else
if
(
confirm
)
{
connection
->
addMessageToConfirm
(
response
->
answer_msg_id
);
}
...
...
TMessagesProj/jni/tgnet/NativeByteBuffer.cpp
View file @
e9e40cb1
...
...
@@ -476,7 +476,7 @@ int32_t NativeByteBuffer::readBigInt32(bool *error) {
}
int64_t
NativeByteBuffer
::
readInt64
(
bool
*
error
)
{
if
(
_position
+
4
>
_limit
)
{
if
(
_position
+
8
>
_limit
)
{
if
(
error
!=
nullptr
)
{
*
error
=
true
;
}
...
...
@@ -521,7 +521,7 @@ bool NativeByteBuffer::readBool(bool *error) {
}
void
NativeByteBuffer
::
readBytes
(
uint8_t
*
b
,
uint32_t
length
,
bool
*
error
)
{
if
(
_position
+
length
>
_limit
)
{
if
(
length
>
_limit
-
_position
)
{
if
(
error
!=
nullptr
)
{
*
error
=
true
;
}
...
...
@@ -533,7 +533,7 @@ void NativeByteBuffer::readBytes(uint8_t *b, uint32_t length, bool *error) {
}
ByteArray
*
NativeByteBuffer
::
readBytes
(
uint32_t
length
,
bool
*
error
)
{
if
(
_position
+
length
>
_limit
)
{
if
(
length
>
_limit
-
_position
)
{
if
(
error
!=
nullptr
)
{
*
error
=
true
;
}
...
...
TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java
View file @
e9e40cb1
...
...
@@ -11,7 +11,7 @@ package org.telegram.messenger;
public
class
BuildVars
{
public
static
boolean
DEBUG_VERSION
=
false
;
public
static
boolean
DEBUG_PRIVATE_VERSION
=
false
;
public
static
int
BUILD_VERSION
=
115
4
;
public
static
int
BUILD_VERSION
=
115
5
;
public
static
String
BUILD_VERSION_STRING
=
"4.6"
;
public
static
int
APP_ID
=
0
;
//obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public
static
String
APP_HASH
=
""
;
//obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
...
...
TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java
View file @
e9e40cb1
...
...
@@ -808,18 +808,23 @@ public class FileLoader {
}
public
static
String
getDocumentFileName
(
TLRPC
.
Document
document
)
{
String
fileName
=
null
;
if
(
document
!=
null
)
{
if
(
document
.
file_name
!=
null
)
{
return
document
.
file_name
;
}
for
(
int
a
=
0
;
a
<
document
.
attributes
.
size
();
a
++)
{
TLRPC
.
DocumentAttribute
documentAttribute
=
document
.
attributes
.
get
(
a
);
if
(
documentAttribute
instanceof
TLRPC
.
TL_documentAttributeFilename
)
{
return
documentAttribute
.
file_name
;
fileName
=
document
.
file_name
;
}
else
{
for
(
int
a
=
0
;
a
<
document
.
attributes
.
size
();
a
++)
{
TLRPC
.
DocumentAttribute
documentAttribute
=
document
.
attributes
.
get
(
a
);
if
(
documentAttribute
instanceof
TLRPC
.
TL_documentAttributeFilename
)
{
fileName
=
documentAttribute
.
file_name
;
}
}
}
}
return
""
;
if
(
fileName
!=
null
)
{
fileName
=
fileName
.
replaceAll
(
"[\u0001-\u001f<>:\"/\\\\|?*\u007f]+"
,
""
).
trim
();
}
return
fileName
!=
null
?
fileName
:
""
;
}
public
static
String
getExtensionByMime
(
String
mime
)
{
...
...
TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java
View file @
e9e40cb1
...
...
@@ -4863,7 +4863,7 @@ public class MessagesStorage {
mentionsIdsMap
.
put
(
messageId
,
message
.
dialog_id
);
}
if
(!
MessageObject
.
isOut
(
message
)
&&
(
message
.
id
>
0
||
MessageObject
.
isUnread
(
message
)))
{
if
(!
(
message
.
action
instanceof
TLRPC
.
TL_messageActionHistoryClear
)
&&
!
MessageObject
.
isOut
(
message
)
&&
(
message
.
id
>
0
||
MessageObject
.
isUnread
(
message
)))
{
Integer
currentMaxId
=
dialogsReadMax
.
get
(
message
.
dialog_id
);
if
(
currentMaxId
==
null
)
{
SQLiteCursor
cursor
=
database
.
queryFinalized
(
"SELECT inbox_max FROM dialogs WHERE did = "
+
message
.
dialog_id
);
...
...
TMessagesProj/src/main/java/org/telegram/messenger/MusicPlayerService.java
View file @
e9e40cb1
...
...
@@ -193,17 +193,17 @@ public class MusicPlayerService extends Service implements NotificationCenter.No
if
(
MediaController
.
getInstance
().
isDownloadingCurrentMessage
())
{
playbackState
.
setState
(
PlaybackState
.
STATE_BUFFERING
,
0
,
1
).
setActions
(
0
);
bldr
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_previous
,
null
,
pendingPrev
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
loading_animation2
,
null
,
null
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_next
,
null
,
pendingNext
).
build
());
bldr
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_previous
,
""
,
pendingPrev
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
loading_animation2
,
""
,
null
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_next
,
""
,
pendingNext
).
build
());
}
else
{
playbackState
.
setState
(
isPlaying
?
PlaybackState
.
STATE_PLAYING
:
PlaybackState
.
STATE_PAUSED
,
MediaController
.
getInstance
().
getPlayingMessageObject
().
audioProgressSec
*
1000L
,
isPlaying
?
1
:
0
)
.
setActions
(
PlaybackState
.
ACTION_PLAY_PAUSE
|
PlaybackState
.
ACTION_PLAY
|
PlaybackState
.
ACTION_PAUSE
|
PlaybackState
.
ACTION_SKIP_TO_PREVIOUS
|
PlaybackState
.
ACTION_SKIP_TO_NEXT
);
bldr
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_previous
,
null
,
pendingPrev
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
isPlaying
?
R
.
drawable
.
ic_action_pause
:
R
.
drawable
.
ic_action_play
,
null
,
pendingPlaypause
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_next
,
null
,
pendingNext
).
build
());
bldr
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_previous
,
""
,
pendingPrev
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
isPlaying
?
R
.
drawable
.
ic_action_pause
:
R
.
drawable
.
ic_action_play
,
""
,
pendingPlaypause
).
build
())
.
addAction
(
new
Notification
.
Action
.
Builder
(
R
.
drawable
.
ic_action_next
,
""
,
pendingNext
).
build
());
}
mediaSession
.
setPlaybackState
(
playbackState
.
build
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment