Skip to content

Commit 2114024

Browse files
author
DrKLO
committed
Update to 3.4.2
Thanks to: DrKLO#1374 DrKLO#1383
1 parent 9b16959 commit 2114024

File tree

558 files changed

+46085
-22452
lines changed

Some content is hidden

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

558 files changed

+46085
-22452
lines changed

TMessagesProj/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ repositories {
66

77
dependencies {
88
compile 'com.android.support:support-v4:23.1.+'
9-
compile 'com.google.android.gms:play-services:3.2.+'
9+
compile "com.google.android.gms:play-services-gcm:8.4.0"
10+
compile "com.google.android.gms:play-services-maps:8.4.0"
1011
compile 'net.hockeyapp.android:HockeySDK:3.6.+'
1112
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
1213
}
@@ -16,6 +17,7 @@ android {
1617
buildToolsVersion '23.0.2'
1718

1819
useLibrary 'org.apache.http.legacy'
20+
defaultConfig.applicationId = "org.telegram.messenger"
1921

2022
compileOptions {
2123
sourceCompatibility JavaVersion.VERSION_1_7
@@ -50,6 +52,8 @@ android {
5052
debuggable false
5153
jniDebuggable false
5254
signingConfig signingConfigs.release
55+
minifyEnabled false
56+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
5357
}
5458

5559
foss {
@@ -77,9 +81,9 @@ android {
7781
}
7882

7983
defaultConfig {
80-
minSdkVersion 8
84+
minSdkVersion 9
8185
targetSdkVersion 23
82-
versionCode 695
83-
versionName "3.3.2"
86+
versionCode 719
87+
versionName "3.4.2"
8488
}
8589
}

TMessagesProj/config/debug/AndroidManifest.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,33 @@
3232
<activity android:name="net.hockeyapp.android.UpdateActivity" />
3333

3434
<receiver
35-
android:name=".GcmBroadcastReceiver"
35+
android:name="com.google.android.gms.gcm.GcmReceiver"
36+
android:exported="true"
3637
android:permission="com.google.android.c2dm.permission.SEND" >
3738
<intent-filter>
3839
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
3940
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
4041
<category android:name="org.telegram.messenger" />
4142
</intent-filter>
4243
</receiver>
44+
<service
45+
android:name=".GcmPushListenerService"
46+
android:exported="false" >
47+
<intent-filter>
48+
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
49+
</intent-filter>
50+
</service>
51+
<service
52+
android:name=".GcmInstanceIDListenerService"
53+
android:exported="false">
54+
<intent-filter>
55+
<action android:name="com.google.android.gms.iid.InstanceID" />
56+
</intent-filter>
57+
</service>
58+
<service
59+
android:name=".GcmRegistrationIntentService"
60+
android:exported="false">
61+
</service>
4362

4463
<uses-library android:name="com.google.android.maps" android:required="false"/>
4564

TMessagesProj/config/release/AndroidManifest.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,33 @@
3232
<activity android:name="net.hockeyapp.android.UpdateActivity" />
3333

3434
<receiver
35-
android:name=".GcmBroadcastReceiver"
35+
android:name="com.google.android.gms.gcm.GcmReceiver"
36+
android:exported="true"
3637
android:permission="com.google.android.c2dm.permission.SEND" >
3738
<intent-filter>
3839
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
3940
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
4041
<category android:name="org.telegram.messenger" />
4142
</intent-filter>
4243
</receiver>
44+
<service
45+
android:name=".GcmPushListenerService"
46+
android:exported="false" >
47+
<intent-filter>
48+
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
49+
</intent-filter>
50+
</service>
51+
<service
52+
android:name=".GcmInstanceIDListenerService"
53+
android:exported="false">
54+
<intent-filter>
55+
<action android:name="com.google.android.gms.iid.InstanceID" />
56+
</intent-filter>
57+
</service>
58+
<service
59+
android:name=".GcmRegistrationIntentService"
60+
android:exported="false">
61+
</service>
4362

4463
<uses-library android:name="com.google.android.maps" android:required="false"/>
4564

TMessagesProj/jni/Android.mk

Lines changed: 93 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
LOCAL_PATH := $(call my-dir)
22

3+
LOCAL_MODULE := avutil
4+
5+
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
6+
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavutil.a
7+
else
8+
ifeq ($(TARGET_ARCH_ABI),armeabi)
9+
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavutil.a
10+
else
11+
ifeq ($(TARGET_ARCH_ABI),x86)
12+
LOCAL_SRC_FILES := ./ffmpeg/i686/libavutil.a
13+
endif
14+
endif
15+
endif
16+
17+
include $(PREBUILT_STATIC_LIBRARY)
18+
19+
include $(CLEAR_VARS)
20+
21+
LOCAL_MODULE := avformat
22+
23+
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
24+
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavformat.a
25+
else
26+
ifeq ($(TARGET_ARCH_ABI),armeabi)
27+
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavformat.a
28+
else
29+
ifeq ($(TARGET_ARCH_ABI),x86)
30+
LOCAL_SRC_FILES := ./ffmpeg/i686/libavformat.a
31+
endif
32+
endif
33+
endif
34+
35+
include $(PREBUILT_STATIC_LIBRARY)
36+
37+
include $(CLEAR_VARS)
38+
39+
LOCAL_MODULE := avcodec
40+
41+
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
42+
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavcodec.a
43+
else
44+
ifeq ($(TARGET_ARCH_ABI),armeabi)
45+
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavcodec.a
46+
else
47+
ifeq ($(TARGET_ARCH_ABI),x86)
48+
LOCAL_SRC_FILES := ./ffmpeg/i686/libavcodec.a
49+
endif
50+
endif
51+
endif
52+
53+
include $(PREBUILT_STATIC_LIBRARY)
54+
355
include $(CLEAR_VARS)
456

557
LOCAL_MODULE := crypto
@@ -91,9 +143,6 @@ LOCAL_STATIC_LIBRARIES := cpufeatures
91143
LOCAL_MODULE := webp
92144

93145
ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),)
94-
# Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal
95-
# instructions to be generated for armv7a code. Instead target the neon code
96-
# specifically.
97146
NEON := c.neon
98147
else
99148
NEON := c
@@ -185,19 +234,14 @@ include $(BUILD_STATIC_LIBRARY)
185234

186235
include $(CLEAR_VARS)
187236
LOCAL_PRELINK_MODULE := false
188-
LOCAL_STATIC_LIBRARIES := webp sqlite tgnet breakpad
189237

190-
LOCAL_MODULE := tmessages.15
238+
LOCAL_MODULE := tmessages.17
191239
LOCAL_CFLAGS := -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
192240
LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
193-
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math
241+
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS
194242
LOCAL_CPPFLAGS := -DBSD=1 -ffast-math -Os -funroll-loops -std=c++11
195243
LOCAL_LDLIBS := -ljnigraphics -llog -lz
196-
ifeq ($(TARGET_ARCH_ABI),armeabi)
197-
LOCAL_ARM_MODE := thumb
198-
else
199-
LOCAL_ARM_MODE := arm
200-
endif
244+
LOCAL_STATIC_LIBRARIES := webp sqlite tgnet breakpad avformat avcodec avutil
201245

202246
LOCAL_SRC_FILES := \
203247
./opus/src/opus.c \
@@ -211,6 +255,23 @@ LOCAL_SRC_FILES := \
211255
./opus/src/mlp.c \
212256
./opus/src/mlp_data.c
213257

258+
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
259+
LOCAL_ARM_MODE := arm
260+
LOCAL_CPPFLAGS += -DLIBYUV_NEON
261+
LOCAL_CFLAGS += -DLIBYUV_NEON
262+
else
263+
ifeq ($(TARGET_ARCH_ABI),armeabi)
264+
LOCAL_ARM_MODE := arm
265+
266+
else
267+
ifeq ($(TARGET_ARCH_ABI),x86)
268+
LOCAL_ARM_MODE := arm
269+
LOCAL_SRC_FILE += \
270+
./libyuv/source/row_x86.asm
271+
endif
272+
endif
273+
endif
274+
214275
LOCAL_SRC_FILES += \
215276
./opus/silk/CNG.c \
216277
./opus/silk/code_signs.c \
@@ -346,10 +407,6 @@ LOCAL_SRC_FILES += \
346407
./opus/opusfile/opusfile.c \
347408
./opus/opusfile/stream.c
348409

349-
LOCAL_SRC_FILES += \
350-
./giflib/dgif_lib.c \
351-
./giflib/gifalloc.c
352-
353410
LOCAL_C_INCLUDES := \
354411
./opus/include \
355412
./opus/silk \
@@ -360,7 +417,8 @@ LOCAL_C_INCLUDES := \
360417
./libyuv/include \
361418
./boringssl/include \
362419
./breakpad/common/android/include \
363-
./breakpad
420+
./breakpad \
421+
./ffmpeg/include
364422

365423
LOCAL_SRC_FILES += \
366424
./libjpeg/jcapimin.c \
@@ -413,8 +471,8 @@ LOCAL_SRC_FILES += \
413471

414472
LOCAL_SRC_FILES += \
415473
./libyuv/source/compare_common.cc \
416-
./libyuv/source/compare_neon.cc \
417-
./libyuv/source/compare_posix.cc \
474+
./libyuv/source/compare_gcc.cc \
475+
./libyuv/source/compare_neon64.cc \
418476
./libyuv/source/compare_win.cc \
419477
./libyuv/source/compare.cc \
420478
./libyuv/source/convert_argb.cc \
@@ -425,43 +483,53 @@ LOCAL_SRC_FILES += \
425483
./libyuv/source/convert_to_i420.cc \
426484
./libyuv/source/convert.cc \
427485
./libyuv/source/cpu_id.cc \
428-
./libyuv/source/format_conversion.cc \
429486
./libyuv/source/mjpeg_decoder.cc \
430487
./libyuv/source/mjpeg_validate.cc \
431488
./libyuv/source/planar_functions.cc \
489+
./libyuv/source/rotate_any.cc \
432490
./libyuv/source/rotate_argb.cc \
491+
./libyuv/source/rotate_common.cc \
492+
./libyuv/source/rotate_gcc.cc \
433493
./libyuv/source/rotate_mips.cc \
434-
./libyuv/source/rotate_neon.cc \
435494
./libyuv/source/rotate_neon64.cc \
495+
./libyuv/source/rotate_win.cc \
436496
./libyuv/source/rotate.cc \
437497
./libyuv/source/row_any.cc \
438498
./libyuv/source/row_common.cc \
499+
./libyuv/source/row_gcc.cc \
439500
./libyuv/source/row_mips.cc \
440-
./libyuv/source/row_neon.cc \
441501
./libyuv/source/row_neon64.cc \
442-
./libyuv/source/row_posix.cc \
443502
./libyuv/source/row_win.cc \
503+
./libyuv/source/scale_any.cc \
444504
./libyuv/source/scale_argb.cc \
445505
./libyuv/source/scale_common.cc \
506+
./libyuv/source/scale_gcc.cc \
446507
./libyuv/source/scale_mips.cc \
447-
./libyuv/source/scale_neon.cc \
448508
./libyuv/source/scale_neon64.cc \
449-
./libyuv/source/scale_posix.cc \
450509
./libyuv/source/scale_win.cc \
451510
./libyuv/source/scale.cc \
452511
./libyuv/source/video_common.cc
453512

513+
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
514+
LOCAL_CFLAGS += -DLIBYUV_NEON
515+
LOCAL_SRC_FILES += \
516+
./libyuv/source/compare_neon.cc.neon \
517+
./libyuv/source/rotate_neon.cc.neon \
518+
./libyuv/source/row_neon.cc.neon \
519+
./libyuv/source/scale_neon.cc.neon
520+
endif
521+
454522
LOCAL_SRC_FILES += \
455523
./jni.c \
456524
./sqlite_cursor.c \
457525
./sqlite_database.c \
458526
./sqlite_statement.c \
459527
./sqlite.c \
460528
./audio.c \
461-
./gif.c \
462529
./utils.c \
463530
./image.c \
464531
./video.c \
532+
./gifvideo.cpp \
465533
./TgNetWrapper.cpp \
466534
./NativeLoader.cpp
467535

TMessagesProj/jni/NativeLoader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
#include "breakpad/client/linux/handler/exception_handler.h"
44
#include "breakpad/client/linux/handler/minidump_descriptor.h"
55

6-
static google_breakpad::ExceptionHandler *exceptionHandler;
6+
/*static google_breakpad::ExceptionHandler *exceptionHandler;
77
88
bool callback(const google_breakpad::MinidumpDescriptor &descriptor, void *context, bool succeeded) {
99
printf("dump path: %s\n", descriptor.path());
1010
return succeeded;
11-
}
11+
}*/
1212

1313
extern "C" {
1414
void Java_org_telegram_messenger_NativeLoader_init(JNIEnv* env, jobject obj, jstring filepath, bool enable) {
1515
return;
16-
if (enable) {
16+
/*if (enable) {
1717
const char *path = env->GetStringUTFChars(filepath, 0);
1818
google_breakpad::MinidumpDescriptor descriptor(path);
1919
exceptionHandler = new google_breakpad::ExceptionHandler(descriptor, NULL, callback, NULL, true, -1);
20-
}
20+
}*/
2121
}
2222
}

0 commit comments

Comments
 (0)