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
68aeaeef
Commit
68aeaeef
authored
Jun 15, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed jnigraphics use from native lib(not found on some devices), bug fixes
parent
8c9616cb
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
221 additions
and
252 deletions
+221
-252
build.gradle
TMessagesProj/build.gradle
+1
-1
Android.mk
TMessagesProj/jni/Android.mk
+1
-1
image.c
TMessagesProj/jni/image.c
+53
-54
libtmessages.so
TMessagesProj/libs/armeabi-v7a/libtmessages.so
+0
-0
libtmessages.so
TMessagesProj/libs/armeabi/libtmessages.so
+0
-0
libtmessages.so
TMessagesProj/libs/x86/libtmessages.so
+0
-0
ConnectionsManager.java
.../main/java/org/telegram/messenger/ConnectionsManager.java
+12
-1
Emoji.java
...sagesProj/src/main/java/org/telegram/messenger/Emoji.java
+38
-27
NativeLoader.java
...oj/src/main/java/org/telegram/messenger/NativeLoader.java
+0
-6
Utilities.java
...sProj/src/main/java/org/telegram/messenger/Utilities.java
+1
-2
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+1
-3
ChatProfileActivity.java
...oj/src/main/java/org/telegram/ui/ChatProfileActivity.java
+27
-1
GroupCreateFinalActivity.java
...c/main/java/org/telegram/ui/GroupCreateFinalActivity.java
+2
-1
LoginActivitySmsView.java
...j/src/main/java/org/telegram/ui/LoginActivitySmsView.java
+31
-105
ActionBarLayer.java
.../java/org/telegram/ui/Views/ActionBar/ActionBarLayer.java
+5
-1
EmojiView.java
...esProj/src/main/java/org/telegram/ui/Views/EmojiView.java
+3
-3
document_item.xml
TMessagesProj/src/main/res/layout-ar/document_item.xml
+0
-1
group_create_final_layout.xml
...Proj/src/main/res/layout-ar/group_create_final_layout.xml
+1
-2
group_create_row_layout.xml
...esProj/src/main/res/layout-ar/group_create_row_layout.xml
+0
-1
location_view_layout.xml
...sagesProj/src/main/res/layout-ar/location_view_layout.xml
+0
-1
notification_layout.xml
TMessagesProj/src/main/res/layout-ar/notification_layout.xml
+12
-6
chat_action_change_photo_layout.xml
...j/src/main/res/layout/chat_action_change_photo_layout.xml
+0
-1
chat_group_incoming_contact_layout.xml
...rc/main/res/layout/chat_group_incoming_contact_layout.xml
+2
-2
chat_group_incoming_document_layout.xml
...c/main/res/layout/chat_group_incoming_document_layout.xml
+0
-3
chat_group_incoming_location_layout.xml
...c/main/res/layout/chat_group_incoming_location_layout.xml
+0
-2
chat_header_layout.xml
TMessagesProj/src/main/res/layout/chat_header_layout.xml
+5
-4
chat_incoming_contact_layout.xml
...Proj/src/main/res/layout/chat_incoming_contact_layout.xml
+9
-4
chat_incoming_document_layout.xml
...roj/src/main/res/layout/chat_incoming_document_layout.xml
+0
-1
chat_incoming_location_layout.xml
...roj/src/main/res/layout/chat_incoming_location_layout.xml
+0
-1
chat_outgoing_contact_layout.xml
...Proj/src/main/res/layout/chat_outgoing_contact_layout.xml
+16
-8
chat_outgoing_document_layout.xml
...roj/src/main/res/layout/chat_outgoing_document_layout.xml
+0
-2
chat_outgoing_location_layout.xml
...roj/src/main/res/layout/chat_outgoing_location_layout.xml
+0
-1
document_item.xml
TMessagesProj/src/main/res/layout/document_item.xml
+0
-1
group_create_final_layout.xml
...gesProj/src/main/res/layout/group_create_final_layout.xml
+1
-2
group_create_row_layout.xml
...sagesProj/src/main/res/layout/group_create_row_layout.xml
+0
-1
location_view_layout.xml
TMessagesProj/src/main/res/layout/location_view_layout.xml
+0
-1
settings_wallpapers_other_row.xml
...roj/src/main/res/layout/settings_wallpapers_other_row.xml
+0
-1
No files found.
TMessagesProj/build.gradle
View file @
68aeaeef
...
@@ -81,7 +81,7 @@ android {
...
@@ -81,7 +81,7 @@ android {
defaultConfig
{
defaultConfig
{
minSdkVersion
8
minSdkVersion
8
targetSdkVersion
19
targetSdkVersion
19
versionCode
25
5
versionCode
25
6
versionName
"1.5.3"
versionName
"1.5.3"
}
}
}
}
TMessagesProj/jni/Android.mk
View file @
68aeaeef
...
@@ -7,7 +7,7 @@ LOCAL_CFLAGS := -w -std=gnu99 -O3 -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_U
...
@@ -7,7 +7,7 @@ LOCAL_CFLAGS := -w -std=gnu99 -O3 -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_U
LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT
LOCAL_CPPFLAGS := -DBSD=1 -ffast-math -O3 -funroll-loops
LOCAL_CPPFLAGS := -DBSD=1 -ffast-math -O3 -funroll-loops
LOCAL_LDLIBS := -llog -lm
-ljnigraphics
LOCAL_LDLIBS := -llog -lm
LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := \
./opus/src/opus.c \
./opus/src/opus.c \
...
...
TMessagesProj/jni/image.c
View file @
68aeaeef
#include <jni.h>
#include <jni.h>
#include <stdio.h>
#include <stdio.h>
#include <setjmp.h>
#include <setjmp.h>
#include <android/bitmap.h>
#include <libjpeg/jpeglib.h>
#include <libjpeg/jpeglib.h>
#include "utils.h"
#include "utils.h"
...
@@ -17,12 +16,10 @@ METHODDEF(void) my_error_exit(j_common_ptr cinfo) {
...
@@ -17,12 +16,10 @@ METHODDEF(void) my_error_exit(j_common_ptr cinfo) {
longjmp
(
myerr
->
setjmp_buffer
,
1
);
longjmp
(
myerr
->
setjmp_buffer
,
1
);
}
}
JNIEXPORT
void
Java_org_telegram_messenger_Utilities_loadBitmap
(
JNIEnv
*
env
,
jclass
class
,
jstring
path
,
j
object
bitmap
,
int
scale
)
{
JNIEXPORT
void
Java_org_telegram_messenger_Utilities_loadBitmap
(
JNIEnv
*
env
,
jclass
class
,
jstring
path
,
j
intArray
bitmap
,
int
scale
,
int
format
,
int
width
,
int
height
)
{
AndroidBitmapInfo
info
;
int
i
;
int
i
;
if
((
i
=
AndroidBitmap_getInfo
(
env
,
bitmap
,
&
info
))
>=
0
)
{
char
*
fileName
=
(
*
env
)
->
GetStringUTFChars
(
env
,
path
,
NULL
);
char
*
fileName
=
(
*
env
)
->
GetStringUTFChars
(
env
,
path
,
NULL
);
FILE
*
infile
;
FILE
*
infile
;
...
@@ -34,6 +31,8 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
...
@@ -34,6 +31,8 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
jerr
.
pub
.
error_exit
=
my_error_exit
;
jerr
.
pub
.
error_exit
=
my_error_exit
;
if
(
!
setjmp
(
jerr
.
setjmp_buffer
))
{
if
(
!
setjmp
(
jerr
.
setjmp_buffer
))
{
unsigned
char
*
bitmapBuf
=
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
bitmap
,
0
);
if
(
bitmapBuf
)
{
jpeg_create_decompress
(
&
cinfo
);
jpeg_create_decompress
(
&
cinfo
);
jpeg_stdio_src
(
&
cinfo
,
infile
);
jpeg_stdio_src
(
&
cinfo
,
infile
);
...
@@ -45,17 +44,22 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
...
@@ -45,17 +44,22 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
jpeg_start_decompress
(
&
cinfo
);
jpeg_start_decompress
(
&
cinfo
);
int
row_stride
=
cinfo
.
output_width
*
cinfo
.
output_components
;
int
row_stride
=
cinfo
.
output_width
*
cinfo
.
output_components
;
JSAMPARRAY
buffer
=
(
*
cinfo
.
mem
->
alloc_sarray
)
((
j_common_ptr
)
&
cinfo
,
JPOOL_IMAGE
,
row_stride
,
1
);
JSAMPARRAY
buffer
=
(
*
cinfo
.
mem
->
alloc_sarray
)
((
j_common_ptr
)
&
cinfo
,
JPOOL_IMAGE
,
row_stride
,
1
);
int
stride
=
width
;
if
(
format
==
0
)
{
stride
*=
4
;
}
else
if
(
format
==
1
)
{
stride
*=
2
;
}
unsigned
char
*
pixels
;
unsigned
char
*
pixels
=
bitmapBuf
;
if
((
i
=
AndroidBitmap_lockPixels
(
env
,
bitmap
,
&
pixels
))
>=
0
)
{
int
rowCount
=
min
(
cinfo
.
output_height
,
info
.
height
);
int
rowCount
=
min
(
cinfo
.
output_height
,
height
);
int
colCount
=
min
(
cinfo
.
output_width
,
info
.
width
);
int
colCount
=
min
(
cinfo
.
output_width
,
width
);
while
(
cinfo
.
output_scanline
<
rowCount
)
{
while
(
cinfo
.
output_scanline
<
rowCount
)
{
jpeg_read_scanlines
(
&
cinfo
,
buffer
,
1
);
jpeg_read_scanlines
(
&
cinfo
,
buffer
,
1
);
if
(
info
.
format
==
ANDROID_BITMAP_FORMAT_RGBA_8888
)
{
if
(
format
==
0
)
{
if
(
cinfo
.
out_color_space
==
JCS_GRAYSCALE
)
{
if
(
cinfo
.
out_color_space
==
JCS_GRAYSCALE
)
{
for
(
i
=
0
;
i
<
colCount
;
i
++
)
{
for
(
i
=
0
;
i
<
colCount
;
i
++
)
{
float
alpha
=
buffer
[
0
][
i
]
/
255
.
0
f
;
float
alpha
=
buffer
[
0
][
i
]
/
255
.
0
f
;
...
@@ -67,26 +71,24 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
...
@@ -67,26 +71,24 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
}
else
{
}
else
{
int
c
=
0
;
int
c
=
0
;
for
(
i
=
0
;
i
<
colCount
;
i
++
)
{
for
(
i
=
0
;
i
<
colCount
;
i
++
)
{
pixels
[
i
*
4
]
=
buffer
[
0
][
i
*
3
];
pixels
[
i
*
4
]
=
buffer
[
0
][
i
*
3
+
2
];
pixels
[
i
*
4
+
1
]
=
buffer
[
0
][
i
*
3
+
1
];
pixels
[
i
*
4
+
1
]
=
buffer
[
0
][
i
*
3
+
1
];
pixels
[
i
*
4
+
2
]
=
buffer
[
0
][
i
*
3
+
2
];
pixels
[
i
*
4
+
2
]
=
buffer
[
0
][
i
*
3
];
pixels
[
i
*
4
+
3
]
=
255
;
pixels
[
i
*
4
+
3
]
=
255
;
c
+=
4
;
c
+=
4
;
}
}
}
}
}
else
if
(
info
.
format
==
ANDROID_BITMAP_FORMAT_RGB_565
)
{
}
else
if
(
format
==
1
)
{
}
}
pixels
+=
info
.
stride
;
pixels
+=
stride
;
}
}
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
bitmap
,
bitmapBuf
,
0
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
jpeg_finish_decompress
(
&
cinfo
);
}
else
{
}
else
{
throwException
(
env
,
"AndroidBitmap_lockPixels() failed ! error=%d"
,
i
);
throwException
(
env
,
"can't get bitmap buff"
);
}
}
jpeg_finish_decompress
(
&
cinfo
);
}
else
{
}
else
{
throwException
(
env
,
"the JPEG code has signaled an error"
);
throwException
(
env
,
"the JPEG code has signaled an error"
);
}
}
...
@@ -94,11 +96,8 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
...
@@ -94,11 +96,8 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
jpeg_destroy_decompress
(
&
cinfo
);
jpeg_destroy_decompress
(
&
cinfo
);
fclose
(
infile
);
fclose
(
infile
);
}
else
{
}
else
{
throwException
(
env
,
"can't open %s
\n
"
,
fileName
);
throwException
(
env
,
"can't open %s
"
,
fileName
);
}
}
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
path
,
fileName
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
path
,
fileName
);
}
else
{
throwException
(
env
,
"AndroidBitmap_getInfo() failed ! error=%d"
,
i
);
}
}
}
TMessagesProj/libs/armeabi-v7a/libtmessages.so
View file @
68aeaeef
No preview for this file type
TMessagesProj/libs/armeabi/libtmessages.so
View file @
68aeaeef
No preview for this file type
TMessagesProj/libs/x86/libtmessages.so
View file @
68aeaeef
No preview for this file type
TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java
View file @
68aeaeef
...
@@ -65,6 +65,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
...
@@ -65,6 +65,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
private
long
lastPingTime
=
System
.
currentTimeMillis
();
private
long
lastPingTime
=
System
.
currentTimeMillis
();
private
long
lastPushPingTime
=
System
.
currentTimeMillis
();
private
long
lastPushPingTime
=
System
.
currentTimeMillis
();
private
int
nextSleepTimeout
=
30000
;
private
int
nextSleepTimeout
=
30000
;
private
long
nextPingId
=
0
;
private
static
volatile
ConnectionsManager
Instance
=
null
;
private
static
volatile
ConnectionsManager
Instance
=
null
;
public
static
ConnectionsManager
getInstance
()
{
public
static
ConnectionsManager
getInstance
()
{
...
@@ -2337,7 +2338,6 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
...
@@ -2337,7 +2338,6 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
}
}
}
}
static
long
nextPingId
=
0
;
private
ByteBufferDesc
generatePingData
(
TcpConnection
connection
)
{
private
ByteBufferDesc
generatePingData
(
TcpConnection
connection
)
{
if
(
connection
==
null
)
{
if
(
connection
==
null
)
{
return
null
;
return
null
;
...
@@ -2347,6 +2347,17 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
...
@@ -2347,6 +2347,17 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
ping
.
ping_id
=
nextPingId
++;
ping
.
ping_id
=
nextPingId
++;
ping
.
disconnect_delay
=
35
;
ping
.
disconnect_delay
=
35
;
pingIdToDate
.
put
(
ping
.
ping_id
,
(
int
)(
System
.
currentTimeMillis
()
/
1000
));
pingIdToDate
.
put
(
ping
.
ping_id
,
(
int
)(
System
.
currentTimeMillis
()
/
1000
));
if
(
pingIdToDate
.
size
()
>
20
)
{
ArrayList
<
Long
>
itemsToDelete
=
new
ArrayList
<
Long
>();
for
(
Long
pid
:
pingIdToDate
.
keySet
())
{
if
(
pid
<
nextPingId
-
10
)
{
itemsToDelete
.
add
(
pid
);
}
}
for
(
Long
pid
:
itemsToDelete
)
{
pingIdToDate
.
remove
(
pid
);
}
}
NetworkMessage
networkMessage
=
new
NetworkMessage
();
NetworkMessage
networkMessage
=
new
NetworkMessage
();
networkMessage
.
protoMessage
=
wrapMessage
(
ping
,
connection
,
false
);
networkMessage
.
protoMessage
=
wrapMessage
(
ping
,
connection
,
false
);
...
...
TMessagesProj/src/main/java/org/telegram/messenger/Emoji.java
View file @
68aeaeef
...
@@ -13,7 +13,6 @@ import java.io.InputStream;
...
@@ -13,7 +13,6 @@ import java.io.InputStream;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Locale
;
import
java.util.Locale
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Canvas
;
import
android.graphics.Canvas
;
import
android.graphics.ColorFilter
;
import
android.graphics.ColorFilter
;
...
@@ -34,8 +33,21 @@ public class Emoji {
...
@@ -34,8 +33,21 @@ public class Emoji {
private
static
int
drawImgSize
,
bigImgSize
;
private
static
int
drawImgSize
,
bigImgSize
;
private
static
boolean
inited
=
false
;
private
static
boolean
inited
=
false
;
private
static
Paint
placeholderPaint
;
private
static
Paint
placeholderPaint
;
private
static
Bitmap
emojiBmp
[]
=
new
Bitmap
[
5
];
private
static
EmojiBitmap
emojiBmp
[]
=
new
Emoji
Bitmap
[
5
];
private
static
boolean
loadingEmoji
[]
=
new
boolean
[
5
];
private
static
boolean
loadingEmoji
[]
=
new
boolean
[
5
];
private
static
int
emojiFullSize
;
private
static
class
EmojiBitmap
{
public
int
[]
colors
;
public
int
width
;
public
int
height
;
public
EmojiBitmap
(
int
[]
colors
,
int
width
,
int
height
)
{
this
.
colors
=
colors
;
this
.
width
=
width
;
this
.
height
=
height
;
}
}
private
static
final
int
[]
cols
=
{
private
static
final
int
[]
cols
=
{
13
,
10
,
15
,
10
,
14
13
,
10
,
15
,
10
,
14
...
@@ -190,22 +202,21 @@ public class Emoji {
...
@@ -190,22 +202,21 @@ public class Emoji {
0x00000000D83DDD34
L
,
0x00000000D83DDD35
L
,
0x00000000D83DDD3B
L
,
0x00000000D83DDD36
L
,
0x00000000D83DDD37
L
,
0x00000000D83DDD38
L
,
0x00000000D83DDD39
L
}};
0x00000000D83DDD34
L
,
0x00000000D83DDD35
L
,
0x00000000D83DDD3B
L
,
0x00000000D83DDD36
L
,
0x00000000D83DDD37
L
,
0x00000000D83DDD38
L
,
0x00000000D83DDD39
L
}};
static
{
static
{
int
imgSize
=
30
;
if
(
Utilities
.
density
<=
1.0f
)
{
if
(
Utilities
.
density
<=
1.0f
)
{
img
Size
=
30
;
emojiFull
Size
=
30
;
}
else
if
(
Utilities
.
density
<=
1.5f
)
{
}
else
if
(
Utilities
.
density
<=
1.5f
)
{
img
Size
=
45
;
emojiFull
Size
=
45
;
}
else
if
(
Utilities
.
density
<=
2.0f
)
{
}
else
if
(
Utilities
.
density
<=
2.0f
)
{
img
Size
=
60
;
emojiFull
Size
=
60
;
}
else
{
}
else
{
img
Size
=
90
;
emojiFull
Size
=
90
;
}
}
drawImgSize
=
Utilities
.
dp
(
20
);
drawImgSize
=
Utilities
.
dp
(
20
);
bigImgSize
=
Utilities
.
dp
(
30
);
bigImgSize
=
Utilities
.
dp
(
30
);
for
(
int
j
=
1
;
j
<
data
.
length
;
j
++)
{
for
(
int
j
=
1
;
j
<
data
.
length
;
j
++)
{
for
(
int
i
=
0
;
i
<
data
[
j
].
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
data
[
j
].
length
;
i
++)
{
Rect
rect
=
new
Rect
((
i
%
cols
[
j
-
1
])
*
imgSize
,
(
i
/
cols
[
j
-
1
])
*
imgSize
,
(
i
%
cols
[
j
-
1
]
+
1
)
*
imgSize
,
(
i
/
cols
[
j
-
1
]
+
1
)
*
img
Size
);
Rect
rect
=
new
Rect
((
i
%
cols
[
j
-
1
])
*
emojiFullSize
,
(
i
/
cols
[
j
-
1
])
*
emojiFullSize
,
emojiFullSize
,
emojiFull
Size
);
rects
.
put
(
data
[
j
][
i
],
new
DrawableInfo
(
rect
,
(
byte
)(
j
-
1
)));
rects
.
put
(
data
[
j
][
i
],
new
DrawableInfo
(
rect
,
(
byte
)(
j
-
1
)));
}
}
}
}
...
@@ -213,7 +224,7 @@ public class Emoji {
...
@@ -213,7 +224,7 @@ public class Emoji {
placeholderPaint
.
setColor
(
0x00000000
);
placeholderPaint
.
setColor
(
0x00000000
);
}
}
private
static
Bitmap
loadEmoji
(
final
int
page
)
{
private
static
void
loadEmoji
(
final
int
page
)
{
try
{
try
{
float
scale
=
1.0f
;
float
scale
=
1.0f
;
int
imageResize
=
1
;
int
imageResize
=
1
;
...
@@ -241,8 +252,10 @@ public class Emoji {
...
@@ -241,8 +252,10 @@ public class Emoji {
opts
.
inJustDecodeBounds
=
true
;
opts
.
inJustDecodeBounds
=
true
;
BitmapFactory
.
decodeFile
(
imageFile
.
getAbsolutePath
(),
opts
);
BitmapFactory
.
decodeFile
(
imageFile
.
getAbsolutePath
(),
opts
);
final
Bitmap
colorsBitmap
=
Bitmap
.
createBitmap
(
opts
.
outWidth
/
imageResize
,
opts
.
outHeight
/
imageResize
,
Bitmap
.
Config
.
ARGB_8888
);
int
width
=
opts
.
outWidth
/
imageResize
;
Utilities
.
loadBitmap
(
imageFile
.
getAbsolutePath
(),
colorsBitmap
,
imageResize
);
int
height
=
opts
.
outHeight
/
imageResize
;
int
[]
bitmap
=
new
int
[
width
*
height
];
Utilities
.
loadBitmap
(
imageFile
.
getAbsolutePath
(),
bitmap
,
imageResize
,
0
,
width
,
height
);
imageName
=
String
.
format
(
Locale
.
US
,
"emoji%.01fx_a_%d.jpg"
,
scale
,
page
);
imageName
=
String
.
format
(
Locale
.
US
,
"emoji%.01fx_a_%d.jpg"
,
scale
,
page
);
imageFile
=
ApplicationLoader
.
applicationContext
.
getFileStreamPath
(
imageName
);
imageFile
=
ApplicationLoader
.
applicationContext
.
getFileStreamPath
(
imageName
);
...
@@ -252,21 +265,19 @@ public class Emoji {
...
@@ -252,21 +265,19 @@ public class Emoji {
is
.
close
();
is
.
close
();
}
}
Utilities
.
loadBitmap
(
imageFile
.
getAbsolutePath
(),
colorsBitmap
,
imageResize
);
Utilities
.
loadBitmap
(
imageFile
.
getAbsolutePath
(),
bitmap
,
imageResize
,
0
,
width
,
height
);
final
EmojiBitmap
emojiBitmap
=
new
EmojiBitmap
(
bitmap
,
width
,
height
);
Utilities
.
RunOnUIThread
(
new
Runnable
()
{
Utilities
.
RunOnUIThread
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
emojiBmp
[
page
]
=
colors
Bitmap
;
emojiBmp
[
page
]
=
emoji
Bitmap
;
NotificationCenter
.
getInstance
().
postNotificationName
(
999
);
NotificationCenter
.
getInstance
().
postNotificationName
(
999
);
}
}
});
});
return
colorsBitmap
;
}
catch
(
Throwable
x
)
{
}
catch
(
Throwable
x
)
{
FileLog
.
e
(
"tmessages"
,
"Error loading emoji"
,
x
);
FileLog
.
e
(
"tmessages"
,
"Error loading emoji"
,
x
);
}
}
return
null
;
}
}
private
static
void
loadEmojiAsync
(
final
int
page
)
{
private
static
void
loadEmojiAsync
(
final
int
page
)
{
...
@@ -330,20 +341,20 @@ public class Emoji {
...
@@ -330,20 +341,20 @@ public class Emoji {
@Override
@Override
public
void
draw
(
Canvas
canvas
)
{
public
void
draw
(
Canvas
canvas
)
{
if
(
emojiBmp
[
info
.
page
]
==
null
)
{
EmojiBitmap
bitmap
=
emojiBmp
[
info
.
page
];
if
(
bitmap
==
null
)
{
loadEmojiAsync
(
info
.
page
);
loadEmojiAsync
(
info
.
page
);
canvas
.
drawRect
(
getBounds
(),
placeholderPaint
);
canvas
.
drawRect
(
getBounds
(),
placeholderPaint
);
return
;
return
;
}
}
Rect
b
=
copyBounds
();
int
size
=
fullSize
?
bigImgSize
:
drawImgSize
;
int
cX
=
b
.
centerX
(),
cY
=
b
.
centerY
();
float
scale
=
(
float
)
size
/
(
float
)
emojiFullSize
;
b
.
left
=
cX
-
(
fullSize
?
bigImgSize
:
drawImgSize
)
/
2
;
int
offset
=
(
getBounds
().
width
()
-
size
)
/
2
;
b
.
right
=
cX
+
(
fullSize
?
bigImgSize
:
drawImgSize
)
/
2
;
b
.
top
=
cY
-
(
fullSize
?
bigImgSize
:
drawImgSize
)
/
2
;
canvas
.
save
();
b
.
bottom
=
cY
+
(
fullSize
?
bigImgSize
:
drawImgSize
)
/
2
;
canvas
.
scale
(
scale
,
scale
);
if
(!
canvas
.
quickReject
(
b
.
left
,
b
.
top
,
b
.
right
,
b
.
bottom
,
Canvas
.
EdgeType
.
AA
))
{
canvas
.
drawBitmap
(
bitmap
.
colors
,
info
.
rect
.
top
*
bitmap
.
width
+
info
.
rect
.
left
,
bitmap
.
width
,
offset
,
offset
,
info
.
rect
.
right
,
info
.
rect
.
bottom
,
true
,
paint
);
canvas
.
drawBitmap
(
emojiBmp
[
info
.
page
],
info
.
rect
,
b
,
paint
);
canvas
.
restore
();
}
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java
View file @
68aeaeef
...
@@ -54,12 +54,6 @@ public class NativeLoader {
...
@@ -54,12 +54,6 @@ public class NativeLoader {
return
;
return
;
}
}
try
{
System
.
loadLibrary
(
"jnigraphics"
);
}
catch
(
Error
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
try
{
try
{
String
folder
=
null
;
String
folder
=
null
;
long
libSize
=
0
;
long
libSize
=
0
;
...
...
TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java
View file @
68aeaeef
...
@@ -17,7 +17,6 @@ import android.content.SharedPreferences;
...
@@ -17,7 +17,6 @@ import android.content.SharedPreferences;
import
android.content.pm.ActivityInfo
;
import
android.content.pm.ActivityInfo
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.database.Cursor
;
import
android.database.Cursor
;
import
android.graphics.Bitmap
;
import
android.graphics.Point
;
import
android.graphics.Point
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
import
android.net.Uri
;
import
android.net.Uri
;
...
@@ -156,7 +155,7 @@ public class Utilities {
...
@@ -156,7 +155,7 @@ public class Utilities {
public
native
static
long
doPQNative
(
long
_what
);
public
native
static
long
doPQNative
(
long
_what
);
public
native
static
byte
[]
aesIgeEncryption
(
byte
[]
_what
,
byte
[]
_key
,
byte
[]
_iv
,
boolean
encrypt
,
boolean
changeIv
,
int
len
);
public
native
static
byte
[]
aesIgeEncryption
(
byte
[]
_what
,
byte
[]
_key
,
byte
[]
_iv
,
boolean
encrypt
,
boolean
changeIv
,
int
len
);
public
native
static
void
aesIgeEncryption2
(
ByteBuffer
_what
,
byte
[]
_key
,
byte
[]
_iv
,
boolean
encrypt
,
boolean
changeIv
,
int
len
);
public
native
static
void
aesIgeEncryption2
(
ByteBuffer
_what
,
byte
[]
_key
,
byte
[]
_iv
,
boolean
encrypt
,
boolean
changeIv
,
int
len
);
public
native
static
void
loadBitmap
(
String
path
,
Bitmap
bitmap
,
int
scale
);
public
native
static
void
loadBitmap
(
String
path
,
int
[]
bitmap
,
int
scale
,
int
format
,
int
width
,
int
height
);
public
static
void
lockOrientation
(
Activity
activity
)
{
public
static
void
lockOrientation
(
Activity
activity
)
{
if
(
prevOrientation
!=
-
10
)
{
if
(
prevOrientation
!=
-
10
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
68aeaeef
...
@@ -2335,10 +2335,8 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2335,10 +2335,8 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
dayArr
.
remove
(
obj
);
dayArr
.
remove
(
obj
);
if
(
dayArr
.
isEmpty
())
{
if
(
dayArr
.
isEmpty
())
{
messagesByDays
.
remove
(
obj
.
dateKey
);
messagesByDays
.
remove
(
obj
.
dateKey
);
if
(
index
!=
-
1
)
{
messages
.
remove
(
index
);
messages
.
remove
(
index
);
}
}
}
updated
=
true
;
updated
=
true
;
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java
View file @
68aeaeef
...
@@ -31,6 +31,7 @@ import android.widget.ListView;
...
@@ -31,6 +31,7 @@ import android.widget.ListView;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
org.telegram.messenger.LocaleController
;
import
org.telegram.messenger.LocaleController
;
import
org.telegram.messenger.MessagesStorage
;
import
org.telegram.messenger.TLRPC
;
import
org.telegram.messenger.TLRPC
;
import
org.telegram.messenger.ConnectionsManager
;
import
org.telegram.messenger.ConnectionsManager
;
import
org.telegram.messenger.FileLog
;
import
org.telegram.messenger.FileLog
;
...
@@ -51,6 +52,7 @@ import java.util.ArrayList;
...
@@ -51,6 +52,7 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.concurrent.Semaphore
;
public
class
ChatProfileActivity
extends
BaseFragment
implements
NotificationCenter
.
NotificationCenterDelegate
,
ContactsActivity
.
ContactsActivityDelegate
,
PhotoViewer
.
PhotoViewerProvider
{
public
class
ChatProfileActivity
extends
BaseFragment
implements
NotificationCenter
.
NotificationCenterDelegate
,
ContactsActivity
.
ContactsActivityDelegate
,
PhotoViewer
.
PhotoViewerProvider
{
private
ListView
listView
;
private
ListView
listView
;
...
@@ -63,6 +65,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -63,6 +65,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
private
int
totalMediaCount
=
-
1
;
private
int
totalMediaCount
=
-
1
;
private
int
onlineCount
=
-
1
;
private
int
onlineCount
=
-
1
;
private
ArrayList
<
Integer
>
sortedUsers
=
new
ArrayList
<
Integer
>();
private
ArrayList
<
Integer
>
sortedUsers
=
new
ArrayList
<
Integer
>();
private
TLRPC
.
Chat
currentChat
;
private
int
avatarRow
;
private
int
avatarRow
;
private
int
settingsSectionRow
;
private
int
settingsSectionRow
;
...
@@ -85,12 +88,35 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -85,12 +88,35 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
@Override
@Override
public
boolean
onFragmentCreate
()
{
public
boolean
onFragmentCreate
()
{
super
.
onFragmentCreate
();
super
.
onFragmentCreate
();
chat_id
=
getArguments
().
getInt
(
"chat_id"
,
0
);
currentChat
=
MessagesController
.
getInstance
().
chats
.
get
(
chat_id
);
if
(
currentChat
==
null
)
{
final
Semaphore
semaphore
=
new
Semaphore
(
0
);
MessagesStorage
.
getInstance
().
storageQueue
.
postRunnable
(
new
Runnable
()
{
@Override
public
void
run
()
{
currentChat
=
MessagesStorage
.
getInstance
().
getChat
(
chat_id
);
semaphore
.
release
();
}
});
try
{
semaphore
.
acquire
();
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
if
(
currentChat
!=
null
)
{
MessagesController
.
getInstance
().
chats
.
put
(
currentChat
.
id
,
currentChat
);
}
else
{
return
false
;
}
}
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
updateInterfaces
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
updateInterfaces
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
chatInfoDidLoaded
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
chatInfoDidLoaded
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
mediaCountDidLoaded
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
mediaCountDidLoaded
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
closeChats
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
MessagesController
.
closeChats
);
chat_id
=
getArguments
().
getInt
(
"chat_id"
,
0
);
updateOnlineCount
();
updateOnlineCount
();
MessagesController
.
getInstance
().
getMediaCount
(-
chat_id
,
classGuid
,
true
);
MessagesController
.
getInstance
().
getMediaCount
(-
chat_id
,
classGuid
,
true
);
avatarUpdater
.
delegate
=
new
AvatarUpdater
.
AvatarUpdaterDelegate
()
{
avatarUpdater
.
delegate
=
new
AvatarUpdater
.
AvatarUpdaterDelegate
()
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java
View file @
68aeaeef
...
@@ -208,6 +208,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
...
@@ -208,6 +208,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
});
});
avatarImage
=
(
BackupImageView
)
fragmentView
.
findViewById
(
R
.
id
.
settings_avatar_image
);
avatarImage
=
(
BackupImageView
)
fragmentView
.
findViewById
(
R
.
id
.
settings_avatar_image
);
avatarImage
.
setImageResource
(
R
.
drawable
.
group_blue
);
nameTextView
=
(
EditText
)
fragmentView
.
findViewById
(
R
.
id
.
bubble_input_text
);
nameTextView
=
(
EditText
)
fragmentView
.
findViewById
(
R
.
id
.
bubble_input_text
);
nameTextView
.
setHint
(
LocaleController
.
getString
(
"EnterGroupNamePlaceholder"
,
R
.
string
.
EnterGroupNamePlaceholder
));
nameTextView
.
setHint
(
LocaleController
.
getString
(
"EnterGroupNamePlaceholder"
,
R
.
string
.
EnterGroupNamePlaceholder
));
...
@@ -304,7 +305,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
...
@@ -304,7 +305,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
}
}
Bundle
args2
=
new
Bundle
();
Bundle
args2
=
new
Bundle
();
args2
.
putInt
(
"chat_id"
,
(
Integer
)
args
[
0
]);
args2
.
putInt
(
"chat_id"
,
(
Integer
)
args
[
0
]);
presentFragment
(
new
ChatActivity
(
args2
));
presentFragment
(
new
ChatActivity
(
args2
)
,
true
);
}
}
});
});
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/LoginActivitySmsView.java
View file @
68aeaeef
...
@@ -48,7 +48,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -48,7 +48,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
private
Bundle
currentParams
;
private
Bundle
currentParams
;
private
Timer
timeTimer
;
private
Timer
timeTimer
;
private
final
Integer
timerSync
=
1
;
private
static
final
Integer
timerSync
=
1
;
private
volatile
int
time
=
60000
;
private
volatile
int
time
=
60000
;
private
double
lastCurrentTime
;
private
double
lastCurrentTime
;
private
boolean
waitingForSms
=
false
;
private
boolean
waitingForSms
=
false
;
...
@@ -130,18 +130,17 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -130,18 +130,17 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
Utilities
.
showKeyboard
(
codeField
);
Utilities
.
showKeyboard
(
codeField
);
codeField
.
requestFocus
();
codeField
.
requestFocus
();
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
timeText
.
setText
(
String
.
format
(
"%s 1:00"
,
LocaleController
.
getString
(
"CallText"
,
R
.
string
.
CallText
)));
timeText
.
setText
(
String
.
format
(
"%s 1:00"
,
LocaleController
.
getString
(
"CallText"
,
R
.
string
.
CallText
)));
lastCurrentTime
=
System
.
currentTimeMillis
();
lastCurrentTime
=
System
.
currentTimeMillis
();
createTimer
();
}
private
void
createTimer
()
{
if
(
timeTimer
!=
null
)
{
return
;
}
timeTimer
=
new
Timer
();
timeTimer
=
new
Timer
();
timeTimer
.
schedule
(
new
TimerTask
()
{
timeTimer
.
schedule
(
new
TimerTask
()
{
@Override
@Override
...
@@ -159,12 +158,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -159,12 +158,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
timeText
.
setText
(
String
.
format
(
"%s %d:%02d"
,
LocaleController
.
getString
(
"CallText"
,
R
.
string
.
CallText
),
minutes
,
seconds
));
timeText
.
setText
(
String
.
format
(
"%s %d:%02d"
,
LocaleController
.
getString
(
"CallText"
,
R
.
string
.
CallText
),
minutes
,
seconds
));
}
else
{
}
else
{
timeText
.
setText
(
LocaleController
.
getString
(
"Calling"
,
R
.
string
.
Calling
));
timeText
.
setText
(
LocaleController
.
getString
(
"Calling"
,
R
.
string
.
Calling
));
synchronized
(
timerSync
)
{
destroyTimer
();
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
TLRPC
.
TL_auth_sendCall
req
=
new
TLRPC
.
TL_auth_sendCall
();
TLRPC
.
TL_auth_sendCall
req
=
new
TLRPC
.
TL_auth_sendCall
();
req
.
phone_number
=
requestPhone
;
req
.
phone_number
=
requestPhone
;
req
.
phone_code_hash
=
phoneHash
;
req
.
phone_code_hash
=
phoneHash
;
...
@@ -180,6 +174,19 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -180,6 +174,19 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
},
0
,
1000
);
},
0
,
1000
);
}
}
private
void
destroyTimer
()
{
try
{
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
}
@Override
@Override
public
void
onNextPressed
()
{
public
void
onNextPressed
()
{
if
(
nextPressed
)
{
if
(
nextPressed
)
{
...
@@ -193,16 +200,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -193,16 +200,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
req
.
phone_number
=
requestPhone
;
req
.
phone_number
=
requestPhone
;
req
.
phone_code
=
codeField
.
getText
().
toString
();
req
.
phone_code
=
codeField
.
getText
().
toString
();
req
.
phone_code_hash
=
phoneHash
;
req
.
phone_code_hash
=
phoneHash
;
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
if
(
delegate
!=
null
)
{
if
(
delegate
!=
null
)
{
delegate
.
needShowProgress
();
delegate
.
needShowProgress
();
}
}
...
@@ -215,19 +213,11 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -215,19 +213,11 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
if
(
delegate
==
null
)
{
if
(
delegate
==
null
)
{
return
;
return
;
}
}
delegate
.
needHideProgress
();
nextPressed
=
false
;
nextPressed
=
false
;
if
(
error
==
null
)
{
if
(
error
==
null
)
{
TLRPC
.
TL_auth_authorization
res
=
(
TLRPC
.
TL_auth_authorization
)
response
;
TLRPC
.
TL_auth_authorization
res
=
(
TLRPC
.
TL_auth_authorization
)
response
;
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
UserConfig
.
clearConfig
();
UserConfig
.
clearConfig
();
MessagesStorage
.
getInstance
().
cleanUp
();
MessagesStorage
.
getInstance
().
cleanUp
();
MessagesController
.
getInstance
().
cleanUp
();
MessagesController
.
getInstance
().
cleanUp
();
...
@@ -248,55 +238,9 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -248,55 +238,9 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
params
.
putString
(
"phoneHash"
,
phoneHash
);
params
.
putString
(
"phoneHash"
,
phoneHash
);
params
.
putString
(
"code"
,
req
.
phone_code
);
params
.
putString
(
"code"
,
req
.
phone_code
);
delegate
.
setPage
(
2
,
true
,
params
,
false
);
delegate
.
setPage
(
2
,
true
,
params
,
false
);
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
}
else
{
if
(
timeTimer
==
null
)
{
timeTimer
=
new
Timer
();
timeTimer
.
schedule
(
new
TimerTask
()
{
@Override
public
void
run
()
{
double
currentTime
=
System
.
currentTimeMillis
();
double
diff
=
currentTime
-
lastCurrentTime
;
time
-=
diff
;
lastCurrentTime
=
currentTime
;
Utilities
.
RunOnUIThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
time
>=
1000
)
{
int
minutes
=
time
/
1000
/
60
;
int
seconds
=
time
/
1000
-
minutes
*
60
;
timeText
.
setText
(
String
.
format
(
"%s %d:%02d"
,
LocaleController
.
getString
(
"CallText"
,
R
.
string
.
CallText
),
minutes
,
seconds
));
}
else
{
}
else
{
timeText
.
setText
(
LocaleController
.
getString
(
"Calling"
,
R
.
string
.
Calling
));
createTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
TLRPC
.
TL_auth_sendCall
req
=
new
TLRPC
.
TL_auth_sendCall
();
req
.
phone_number
=
requestPhone
;
req
.
phone_code_hash
=
phoneHash
;
ConnectionsManager
.
getInstance
().
performRpc
(
req
,
new
RPCRequest
.
RPCRequestDelegate
()
{
@Override
public
void
run
(
TLObject
response
,
TLRPC
.
TL_error
error
)
{
}
},
null
,
true
,
RPCRequest
.
RPCRequestClassGeneric
|
RPCRequest
.
RPCRequestClassFailOnServerErrors
|
RPCRequest
.
RPCRequestClassWithoutLogin
);
}
}
});
}
},
0
,
1000
);
}
if
(
error
.
text
.
contains
(
"PHONE_NUMBER_INVALID"
))
{
if
(
error
.
text
.
contains
(
"PHONE_NUMBER_INVALID"
))
{
delegate
.
needShowAlert
(
LocaleController
.
getString
(
"InvalidPhoneNumber"
,
R
.
string
.
InvalidPhoneNumber
));
delegate
.
needShowAlert
(
LocaleController
.
getString
(
"InvalidPhoneNumber"
,
R
.
string
.
InvalidPhoneNumber
));
}
else
if
(
error
.
text
.
contains
(
"PHONE_CODE_EMPTY"
)
||
error
.
text
.
contains
(
"PHONE_CODE_INVALID"
))
{
}
else
if
(
error
.
text
.
contains
(
"PHONE_CODE_EMPTY"
)
||
error
.
text
.
contains
(
"PHONE_CODE_INVALID"
))
{
...
@@ -318,16 +262,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -318,16 +262,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
@Override
@Override
public
void
onBackPressed
()
{
public
void
onBackPressed
()
{
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
currentParams
=
null
;
currentParams
=
null
;
Utilities
.
setWaitingForSms
(
false
);
Utilities
.
setWaitingForSms
(
false
);
NotificationCenter
.
getInstance
().
removeObserver
(
this
,
998
);
NotificationCenter
.
getInstance
().
removeObserver
(
this
,
998
);
...
@@ -339,16 +274,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
...
@@ -339,16 +274,7 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
super
.
onDestroyActivity
();
super
.
onDestroyActivity
();
Utilities
.
setWaitingForSms
(
false
);
Utilities
.
setWaitingForSms
(
false
);
NotificationCenter
.
getInstance
().
removeObserver
(
this
,
998
);
NotificationCenter
.
getInstance
().
removeObserver
(
this
,
998
);
try
{
destroyTimer
();
synchronized
(
timerSync
)
{
if
(
timeTimer
!=
null
)
{
timeTimer
.
cancel
();
timeTimer
=
null
;
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
waitingForSms
=
false
;
waitingForSms
=
false
;
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/ActionBar/ActionBarLayer.java
View file @
68aeaeef
...
@@ -455,6 +455,7 @@ public class ActionBarLayer extends FrameLayout {
...
@@ -455,6 +455,7 @@ public class ActionBarLayer extends FrameLayout {
LayoutInflater
li
=
(
LayoutInflater
)
getContext
().
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
LayoutInflater
li
=
(
LayoutInflater
)
getContext
().
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
actionOverlay
=
li
.
inflate
(
resourceId
,
null
);
actionOverlay
=
li
.
inflate
(
resourceId
,
null
);
addView
(
actionOverlay
);
addView
(
actionOverlay
);
actionOverlay
.
setVisibility
(
GONE
);
actionOverlay
.
setOnClickListener
(
new
OnClickListener
()
{
actionOverlay
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -484,9 +485,12 @@ public class ActionBarLayer extends FrameLayout {
...
@@ -484,9 +485,12 @@ public class ActionBarLayer extends FrameLayout {
actionOverlay
.
setVisibility
(!
isSearchFieldVisible
&&
isBackOverlayVisible
?
VISIBLE
:
GONE
);
actionOverlay
.
setVisibility
(!
isSearchFieldVisible
&&
isBackOverlayVisible
?
VISIBLE
:
GONE
);
if
(
actionOverlay
.
getVisibility
()
==
VISIBLE
)
{
if
(
actionOverlay
.
getVisibility
()
==
VISIBLE
)
{
ViewGroup
.
LayoutParams
layoutParams
=
actionOverlay
.
getLayoutParams
();
ViewGroup
.
LayoutParams
layoutParams
=
actionOverlay
.
getLayoutParams
();
layoutParams
.
width
=
widthMeasureSpec
-
(
menu
!=
null
?
menu
.
getMeasuredWidth
()
:
0
)
;
layoutParams
.
width
=
LayoutParams
.
WRAP_CONTENT
;
layoutParams
.
height
=
LayoutParams
.
MATCH_PARENT
;
layoutParams
.
height
=
LayoutParams
.
MATCH_PARENT
;
actionOverlay
.
setLayoutParams
(
layoutParams
);
actionOverlay
.
setLayoutParams
(
layoutParams
);
actionOverlay
.
measure
(
widthMeasureSpec
,
heightMeasureSpec
);
layoutParams
.
width
=
Math
.
min
(
actionOverlay
.
getMeasuredWidth
()
+
Utilities
.
dp
(
4
),
widthMeasureSpec
-
(
menu
!=
null
?
menu
.
getMeasuredWidth
()
:
0
));
actionOverlay
.
setLayoutParams
(
layoutParams
);
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/EmojiView.java
View file @
68aeaeef
...
@@ -232,11 +232,11 @@ public class EmojiView extends LinearLayout {
...
@@ -232,11 +232,11 @@ public class EmojiView extends LinearLayout {
}
}
};
};
localObject
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
localObject
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
paramAnonymousV
iew
)
{
public
void
onClick
(
View
v
iew
)
{
if
(
EmojiView
.
this
.
listener
!=
null
)
{
if
(
EmojiView
.
this
.
listener
!=
null
)
{
EmojiView
.
this
.
listener
.
onEmojiSelected
(
EmojiView
.
this
.
convert
((
Long
)
paramAnonymousV
iew
.
getTag
()));
EmojiView
.
this
.
listener
.
onEmojiSelected
(
EmojiView
.
this
.
convert
((
Long
)
v
iew
.
getTag
()));
}
}
EmojiView
.
this
.
addToRecent
((
Long
)
paramAnonymousV
iew
.
getTag
());
EmojiView
.
this
.
addToRecent
((
Long
)
v
iew
.
getTag
());
}
}
});
});
localObject
.
setBackgroundResource
(
R
.
drawable
.
list_selector
);
localObject
.
setBackgroundResource
(
R
.
drawable
.
list_selector
);
...
...
TMessagesProj/src/main/res/layout-ar/document_item.xml
View file @
68aeaeef
...
@@ -69,7 +69,6 @@
...
@@ -69,7 +69,6 @@
android:id=
"@+id/docs_item_thumb"
android:id=
"@+id/docs_item_thumb"
android:layout_width=
"55dp"
android:layout_width=
"55dp"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:scaleType=
"centerCrop"
android:layout_marginTop=
"11dp"
android:layout_marginTop=
"11dp"
android:layout_gravity=
"top|right"
/>
android:layout_gravity=
"top|right"
/>
...
...
TMessagesProj/src/main/res/layout-ar/group_create_final_layout.xml
View file @
68aeaeef
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
<org.telegram.ui.Views.BackupImageView
<org.telegram.ui.Views.BackupImageView
android:id=
"@+id/settings_avatar_image"
android:id=
"@+id/settings_avatar_image"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
/>
android:src=
"@drawable/group_blue"
/>
<ImageButton
<ImageButton
android:id=
"@+id/settings_change_avatar_button"
android:id=
"@+id/settings_change_avatar_button"
...
...
TMessagesProj/src/main/res/layout-ar/group_create_row_layout.xml
View file @
68aeaeef
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
android:layout_width=
"50dp"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_height=
"50dp"
android:id=
"@+id/messages_list_row_avatar"
android:id=
"@+id/messages_list_row_avatar"
android:contentDescription=
""
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_gravity=
"top|right"
/>
android:layout_gravity=
"top|right"
/>
...
...
TMessagesProj/src/main/res/layout-ar/location_view_layout.xml
View file @
68aeaeef
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
<org.telegram.ui.Views.BackupImageView
<org.telegram.ui.Views.BackupImageView
android:layout_width=
"64dp"
android:layout_width=
"64dp"
android:layout_height=
"64dp"
android:layout_height=
"64dp"
android:contentDescription=
""
android:id=
"@+id/location_avatar_view"
android:id=
"@+id/location_avatar_view"
android:layout_marginRight=
"12dp"
android:layout_marginRight=
"12dp"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
...
...
TMessagesProj/src/main/res/layout-ar/notification_layout.xml
View file @
68aeaeef
...
@@ -5,17 +5,20 @@
...
@@ -5,17 +5,20 @@
android:id=
"@+id/container_view"
android:id=
"@+id/container_view"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<FrameLayout
android:layout_width=
"fill_parent"
<FrameLayout
android:layout_width=
"fill_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"#ffffff"
>
android:background=
"#ffffff"
>
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"48dp"
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"48dp"
android:layout_width=
"48dp"
android:layout_width=
"48dp"
android:id=
"@+id/avatar_image"
android:id=
"@+id/avatar_image"
android:layout_gravity=
"right|top"
/>
android:layout_gravity=
"right|top"
/>
<FrameLayout
android:layout_width=
"fill_parent"
<FrameLayout
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_marginLeft=
"40dp"
android:layout_marginLeft=
"40dp"
android:orientation=
"vertical"
android:orientation=
"vertical"
...
@@ -23,7 +26,8 @@
...
@@ -23,7 +26,8 @@
android:layout_gravity=
"top|right"
android:layout_gravity=
"top|right"
android:id=
"@+id/text_layout"
>
android:id=
"@+id/text_layout"
>
<TextView
android:layout_height=
"wrap_content"
<TextView
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:gravity=
"right|center"
android:gravity=
"right|center"
android:textSize=
"15dp"
android:textSize=
"15dp"
...
@@ -34,7 +38,8 @@
...
@@ -34,7 +38,8 @@
android:layout_gravity=
"top|right"
android:layout_gravity=
"top|right"
android:singleLine=
"true"
/>
android:singleLine=
"true"
/>
<TextView
android:layout_height=
"wrap_content"
<TextView
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:gravity=
"right|center"
android:gravity=
"right|center"
android:textColor=
"#000000"
android:textColor=
"#000000"
...
@@ -47,7 +52,8 @@
...
@@ -47,7 +52,8 @@
</FrameLayout>
</FrameLayout>
<ImageView
android:layout_height=
"40dp"
<ImageView
android:layout_height=
"40dp"
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_gravity=
"left|center"
android:layout_gravity=
"left|center"
android:src=
"@drawable/ic_profile_cross"
android:src=
"@drawable/ic_profile_cross"
...
...
TMessagesProj/src/main/res/layout/chat_action_change_photo_layout.xml
View file @
68aeaeef
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
android:layout_width=
"64dp"
android:layout_width=
"64dp"
android:layout_height=
"64dp"
android:layout_height=
"64dp"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:scaleType=
"fitCenter"
android:id=
"@+id/chat_photo_image"
/>
android:id=
"@+id/chat_photo_image"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
TMessagesProj/src/main/res/layout/chat_group_incoming_contact_layout.xml
View file @
68aeaeef
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:layout_marginLeft=
"6dp"
android:layout_marginLeft=
"6dp"
android:id=
"@+id/chat_group_avatar_image"
android:id=
"@+id/chat_group_avatar_image"
android:scaleType=
"fitCenter"
android:layout_marginBottom=
"2dp"
android:layout_marginBottom=
"2dp"
android:layout_marginRight=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_gravity=
"bottom"
/>
android:layout_gravity=
"bottom"
/>
...
@@ -34,7 +33,8 @@
...
@@ -34,7 +33,8 @@
android:id=
"@+id/shared_layout"
android:id=
"@+id/shared_layout"
android:layout_weight=
"1"
>
android:layout_weight=
"1"
>
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
android:layout_width=
"42dp"
android:layout_width=
"42dp"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
...
...
TMessagesProj/src/main/res/layout/chat_group_incoming_document_layout.xml
View file @
68aeaeef
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:layout_marginLeft=
"6dp"
android:layout_marginLeft=
"6dp"
android:id=
"@+id/chat_group_avatar_image"
android:id=
"@+id/chat_group_avatar_image"
android:scaleType=
"fitCenter"
android:layout_marginBottom=
"2dp"
android:layout_marginBottom=
"2dp"
android:layout_marginRight=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_gravity=
"bottom"
/>
android:layout_gravity=
"bottom"
/>
...
@@ -38,8 +37,6 @@
...
@@ -38,8 +37,6 @@
android:layout_width=
"42dp"
android:layout_width=
"42dp"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:background=
"#40b7c9d7"
android:background=
"#40b7c9d7"
android:src=
"@drawable/doc_blue"
android:scaleType=
"center"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
<org.telegram.ui.Views.TightTextView
<org.telegram.ui.Views.TightTextView
...
...
TMessagesProj/src/main/res/layout/chat_group_incoming_location_layout.xml
View file @
68aeaeef
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:layout_marginLeft=
"6dp"
android:layout_marginLeft=
"6dp"
android:id=
"@+id/chat_group_avatar_image"
android:id=
"@+id/chat_group_avatar_image"
android:scaleType=
"fitCenter"
android:layout_marginBottom=
"2dp"
android:layout_marginBottom=
"2dp"
android:layout_gravity=
"bottom"
/>
android:layout_gravity=
"bottom"
/>
...
@@ -31,7 +30,6 @@
...
@@ -31,7 +30,6 @@
android:layout_width=
"100dp"
android:layout_width=
"100dp"
android:layout_margin=
"6dp"
android:layout_margin=
"6dp"
android:layout_gravity=
"top"
android:layout_gravity=
"top"
android:scaleType=
"centerCrop"
android:id=
"@+id/chat_photo_image"
/>
android:id=
"@+id/chat_photo_image"
/>
<LinearLayout
<LinearLayout
...
...
TMessagesProj/src/main/res/layout/chat_header_layout.xml
View file @
68aeaeef
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
>
android:layout_alignParentRight=
"true"
>
...
...
TMessagesProj/src/main/res/layout/chat_incoming_contact_layout.xml
View file @
68aeaeef
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
android:id=
"@+id/shared_layout"
android:id=
"@+id/shared_layout"
android:layout_weight=
"1"
>
android:layout_weight=
"1"
>
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
android:layout_width=
"42dp"
android:layout_width=
"42dp"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
...
@@ -57,18 +58,21 @@
...
@@ -57,18 +58,21 @@
</FrameLayout>
</FrameLayout>
<FrameLayout
android:layout_width=
"wrap_content"
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"8dp"
android:layout_marginLeft=
"8dp"
android:layout_gravity=
"top"
android:layout_gravity=
"top"
android:id=
"@+id/add_contact_view"
>
android:id=
"@+id/add_contact_view"
>
<FrameLayout
android:layout_height=
"54dp"
<FrameLayout
android:layout_height=
"54dp"
android:layout_width=
"1dp"
android:layout_width=
"1dp"
android:background=
"#e8e8e8"
android:background=
"#e8e8e8"
android:paddingRight=
"8dp"
/>
android:paddingRight=
"8dp"
/>
<ImageView
android:layout_width=
"38dp"
<ImageView
android:layout_width=
"38dp"
android:layout_height=
"54dp"
android:layout_height=
"54dp"
android:src=
"@drawable/ic_ab_add_member"
android:src=
"@drawable/ic_ab_add_member"
android:scaleType=
"center"
android:scaleType=
"center"
...
@@ -79,4 +83,5 @@
...
@@ -79,4 +83,5 @@
</FrameLayout>
</FrameLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
TMessagesProj/src/main/res/layout/chat_incoming_document_layout.xml
View file @
68aeaeef
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:background=
"#40b7c9d7"
android:background=
"#40b7c9d7"
android:src=
"@drawable/doc_blue"
android:src=
"@drawable/doc_blue"
android:scaleType=
"center"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
<TextView
<TextView
...
...
TMessagesProj/src/main/res/layout/chat_incoming_location_layout.xml
View file @
68aeaeef
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_margin=
"6dp"
android:layout_margin=
"6dp"
android:layout_gravity=
"top"
android:layout_gravity=
"top"
android:scaleType=
"centerCrop"
android:minHeight=
"100dp"
android:minHeight=
"100dp"
android:minWidth=
"100dp"
android:minWidth=
"100dp"
android:id=
"@+id/chat_photo_image"
/>
android:id=
"@+id/chat_photo_image"
/>
...
...
TMessagesProj/src/main/res/layout/chat_outgoing_contact_layout.xml
View file @
68aeaeef
...
@@ -16,19 +16,22 @@
...
@@ -16,19 +16,22 @@
android:layout_gravity=
"top|right"
android:layout_gravity=
"top|right"
android:id=
"@+id/chat_bubble_layout"
>
android:id=
"@+id/chat_bubble_layout"
>
<FrameLayout
android:layout_width=
"wrap_content"
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_gravity=
"top"
android:layout_gravity=
"top"
android:id=
"@+id/add_contact_view"
>
android:id=
"@+id/add_contact_view"
>
<FrameLayout
android:layout_height=
"54dp"
<FrameLayout
android:layout_height=
"54dp"
android:layout_width=
"1dp"
android:layout_width=
"1dp"
android:background=
"#aa70b15c"
android:background=
"#aa70b15c"
android:paddingLeft=
"8dp"
android:paddingLeft=
"8dp"
android:layout_gravity=
"right"
/>
android:layout_gravity=
"right"
/>
<ImageView
android:layout_width=
"40dp"
<ImageView
android:layout_width=
"40dp"
android:layout_height=
"54dp"
android:layout_height=
"54dp"
android:src=
"@drawable/ic_ab_add_member"
android:src=
"@drawable/ic_ab_add_member"
android:scaleType=
"center"
android:scaleType=
"center"
...
@@ -38,16 +41,19 @@
...
@@ -38,16 +41,19 @@
</FrameLayout>
</FrameLayout>
<FrameLayout
android:layout_height=
"58dp"
<FrameLayout
android:layout_height=
"58dp"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:id=
"@+id/shared_layout"
android:id=
"@+id/shared_layout"
android:layout_weight=
"1"
>
android:layout_weight=
"1"
>
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"42dp"
android:layout_width=
"42dp"
android:layout_width=
"42dp"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
<TextView
android:layout_height=
"wrap_content"
<TextView
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:scrollHorizontally=
"true"
android:scrollHorizontally=
"true"
android:paddingLeft=
"51dp"
android:paddingLeft=
"51dp"
...
@@ -59,7 +65,8 @@
...
@@ -59,7 +65,8 @@
android:ellipsize=
"end"
android:ellipsize=
"end"
android:id=
"@+id/chat_user_group_name"
/>
android:id=
"@+id/chat_user_group_name"
/>
<TextView
android:layout_height=
"wrap_content"
<TextView
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:paddingLeft=
"51dp"
android:paddingLeft=
"51dp"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
...
@@ -68,7 +75,8 @@
...
@@ -68,7 +75,8 @@
android:maxLines=
"1"
android:maxLines=
"1"
android:id=
"@+id/phone_text_view"
/>
android:id=
"@+id/phone_text_view"
/>
<LinearLayout
android:layout_width=
"wrap_content"
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/chat_time_layout"
android:id=
"@+id/chat_time_layout"
android:layout_gravity=
"bottom|right"
>
android:layout_gravity=
"bottom|right"
>
...
...
TMessagesProj/src/main/res/layout/chat_outgoing_document_layout.xml
View file @
68aeaeef
...
@@ -80,8 +80,6 @@
...
@@ -80,8 +80,6 @@
android:layout_width=
"42dp"
android:layout_width=
"42dp"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:background=
"#408ed057"
android:background=
"#408ed057"
android:src=
"@drawable/doc_green"
android:scaleType=
"center"
android:id=
"@+id/contact_avatar"
/>
android:id=
"@+id/contact_avatar"
/>
<org.telegram.ui.Views.TightTextView
<org.telegram.ui.Views.TightTextView
...
...
TMessagesProj/src/main/res/layout/chat_outgoing_location_layout.xml
View file @
68aeaeef
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_margin=
"6dp"
android:layout_margin=
"6dp"
android:layout_gravity=
"top"
android:layout_gravity=
"top"
android:scaleType=
"centerCrop"
android:minHeight=
"100dp"
android:minHeight=
"100dp"
android:minWidth=
"100dp"
android:minWidth=
"100dp"
android:id=
"@+id/chat_photo_image"
/>
android:id=
"@+id/chat_photo_image"
/>
...
...
TMessagesProj/src/main/res/layout/document_item.xml
View file @
68aeaeef
...
@@ -59,7 +59,6 @@
...
@@ -59,7 +59,6 @@
android:id=
"@+id/docs_item_thumb"
android:id=
"@+id/docs_item_thumb"
android:layout_width=
"55dp"
android:layout_width=
"55dp"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:scaleType=
"centerCrop"
android:layout_marginTop=
"11dp"
android:layout_marginTop=
"11dp"
android:layout_gravity=
"top|left"
/>
android:layout_gravity=
"top|left"
/>
...
...
TMessagesProj/src/main/res/layout/group_create_final_layout.xml
View file @
68aeaeef
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
<org.telegram.ui.Views.BackupImageView
<org.telegram.ui.Views.BackupImageView
android:id=
"@+id/settings_avatar_image"
android:id=
"@+id/settings_avatar_image"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
/>
android:src=
"@drawable/group_blue"
/>
<ImageButton
<ImageButton
android:id=
"@+id/settings_change_avatar_button"
android:id=
"@+id/settings_change_avatar_button"
...
...
TMessagesProj/src/main/res/layout/group_create_row_layout.xml
View file @
68aeaeef
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
android:layout_width=
"50dp"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_height=
"50dp"
android:id=
"@+id/messages_list_row_avatar"
android:id=
"@+id/messages_list_row_avatar"
android:contentDescription=
""
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_gravity=
"top"
/>
android:layout_gravity=
"top"
/>
...
...
TMessagesProj/src/main/res/layout/location_view_layout.xml
View file @
68aeaeef
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
<org.telegram.ui.Views.BackupImageView
<org.telegram.ui.Views.BackupImageView
android:layout_width=
"64dp"
android:layout_width=
"64dp"
android:layout_height=
"64dp"
android:layout_height=
"64dp"
android:contentDescription=
""
android:id=
"@+id/location_avatar_view"
android:id=
"@+id/location_avatar_view"
android:layout_marginLeft=
"12dp"
android:layout_marginLeft=
"12dp"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
...
...
TMessagesProj/src/main/res/layout/settings_wallpapers_other_row.xml
View file @
68aeaeef
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<org.telegram.ui.Views.BackupImageView
<org.telegram.ui.Views.BackupImageView
android:layout_height=
"100dp"
android:layout_height=
"100dp"
android:layout_width=
"100dp"
android:layout_width=
"100dp"
android:scaleType=
"centerCrop"
android:id=
"@+id/image"
android:id=
"@+id/image"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:background=
"#5A475866"
/>
android:background=
"#5A475866"
/>
...
...
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