Skip to content

Commit

Permalink
Update to 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed Jan 11, 2016
1 parent 9b16959 commit 2114024
Show file tree
Hide file tree
Showing 558 changed files with 46,085 additions and 22,452 deletions.
12 changes: 8 additions & 4 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ repositories {

dependencies {
compile 'com.android.support:support-v4:23.1.+'
compile 'com.google.android.gms:play-services:3.2.+'
compile "com.google.android.gms:play-services-gcm:8.4.0"
compile "com.google.android.gms:play-services-maps:8.4.0"
compile 'net.hockeyapp.android:HockeySDK:3.6.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
}
Expand All @@ -16,6 +17,7 @@ android {
buildToolsVersion '23.0.2'

useLibrary 'org.apache.http.legacy'
defaultConfig.applicationId = "org.telegram.messenger"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand Down Expand Up @@ -50,6 +52,8 @@ android {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

foss {
Expand Down Expand Up @@ -77,9 +81,9 @@ android {
}

defaultConfig {
minSdkVersion 8
minSdkVersion 9
targetSdkVersion 23
versionCode 695
versionName "3.3.2"
versionCode 719
versionName "3.4.2"
}
}
21 changes: 20 additions & 1 deletion TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,33 @@
<activity android:name="net.hockeyapp.android.UpdateActivity" />

<receiver
android:name=".GcmBroadcastReceiver"
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<service
android:name=".GcmPushListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name=".GcmInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service
android:name=".GcmRegistrationIntentService"
android:exported="false">
</service>

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

Expand Down
21 changes: 20 additions & 1 deletion TMessagesProj/config/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,33 @@
<activity android:name="net.hockeyapp.android.UpdateActivity" />

<receiver
android:name=".GcmBroadcastReceiver"
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<service
android:name=".GcmPushListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name=".GcmInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service
android:name=".GcmRegistrationIntentService"
android:exported="false">
</service>

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

Expand Down
118 changes: 93 additions & 25 deletions TMessagesProj/jni/Android.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
LOCAL_PATH := $(call my-dir)

LOCAL_MODULE := avutil

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavutil.a
else
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavutil.a
else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_SRC_FILES := ./ffmpeg/i686/libavutil.a
endif
endif
endif

include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := avformat

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavformat.a
else
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavformat.a
else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_SRC_FILES := ./ffmpeg/i686/libavformat.a
endif
endif
endif

include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := avcodec

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavcodec.a
else
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavcodec.a
else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_SRC_FILES := ./ffmpeg/i686/libavcodec.a
endif
endif
endif

include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := crypto
Expand Down Expand Up @@ -91,9 +143,6 @@ LOCAL_STATIC_LIBRARIES := cpufeatures
LOCAL_MODULE := webp

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

include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_STATIC_LIBRARIES := webp sqlite tgnet breakpad

LOCAL_MODULE := tmessages.15
LOCAL_MODULE := tmessages.17
LOCAL_CFLAGS := -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
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 -ffast-math
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
LOCAL_CPPFLAGS := -DBSD=1 -ffast-math -Os -funroll-loops -std=c++11
LOCAL_LDLIBS := -ljnigraphics -llog -lz
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_ARM_MODE := thumb
else
LOCAL_ARM_MODE := arm
endif
LOCAL_STATIC_LIBRARIES := webp sqlite tgnet breakpad avformat avcodec avutil

LOCAL_SRC_FILES := \
./opus/src/opus.c \
Expand All @@ -211,6 +255,23 @@ LOCAL_SRC_FILES := \
./opus/src/mlp.c \
./opus/src/mlp_data.c

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_ARM_MODE := arm
LOCAL_CPPFLAGS += -DLIBYUV_NEON
LOCAL_CFLAGS += -DLIBYUV_NEON
else
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_ARM_MODE := arm

else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILE += \
./libyuv/source/row_x86.asm
endif
endif
endif

LOCAL_SRC_FILES += \
./opus/silk/CNG.c \
./opus/silk/code_signs.c \
Expand Down Expand Up @@ -346,10 +407,6 @@ LOCAL_SRC_FILES += \
./opus/opusfile/opusfile.c \
./opus/opusfile/stream.c

LOCAL_SRC_FILES += \
./giflib/dgif_lib.c \
./giflib/gifalloc.c

LOCAL_C_INCLUDES := \
./opus/include \
./opus/silk \
Expand All @@ -360,7 +417,8 @@ LOCAL_C_INCLUDES := \
./libyuv/include \
./boringssl/include \
./breakpad/common/android/include \
./breakpad
./breakpad \
./ffmpeg/include

LOCAL_SRC_FILES += \
./libjpeg/jcapimin.c \
Expand Down Expand Up @@ -413,8 +471,8 @@ LOCAL_SRC_FILES += \

LOCAL_SRC_FILES += \
./libyuv/source/compare_common.cc \
./libyuv/source/compare_neon.cc \
./libyuv/source/compare_posix.cc \
./libyuv/source/compare_gcc.cc \
./libyuv/source/compare_neon64.cc \
./libyuv/source/compare_win.cc \
./libyuv/source/compare.cc \
./libyuv/source/convert_argb.cc \
Expand All @@ -425,43 +483,53 @@ LOCAL_SRC_FILES += \
./libyuv/source/convert_to_i420.cc \
./libyuv/source/convert.cc \
./libyuv/source/cpu_id.cc \
./libyuv/source/format_conversion.cc \
./libyuv/source/mjpeg_decoder.cc \
./libyuv/source/mjpeg_validate.cc \
./libyuv/source/planar_functions.cc \
./libyuv/source/rotate_any.cc \
./libyuv/source/rotate_argb.cc \
./libyuv/source/rotate_common.cc \
./libyuv/source/rotate_gcc.cc \
./libyuv/source/rotate_mips.cc \
./libyuv/source/rotate_neon.cc \
./libyuv/source/rotate_neon64.cc \
./libyuv/source/rotate_win.cc \
./libyuv/source/rotate.cc \
./libyuv/source/row_any.cc \
./libyuv/source/row_common.cc \
./libyuv/source/row_gcc.cc \
./libyuv/source/row_mips.cc \
./libyuv/source/row_neon.cc \
./libyuv/source/row_neon64.cc \
./libyuv/source/row_posix.cc \
./libyuv/source/row_win.cc \
./libyuv/source/scale_any.cc \
./libyuv/source/scale_argb.cc \
./libyuv/source/scale_common.cc \
./libyuv/source/scale_gcc.cc \
./libyuv/source/scale_mips.cc \
./libyuv/source/scale_neon.cc \
./libyuv/source/scale_neon64.cc \
./libyuv/source/scale_posix.cc \
./libyuv/source/scale_win.cc \
./libyuv/source/scale.cc \
./libyuv/source/video_common.cc

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -DLIBYUV_NEON
LOCAL_SRC_FILES += \
./libyuv/source/compare_neon.cc.neon \
./libyuv/source/rotate_neon.cc.neon \
./libyuv/source/row_neon.cc.neon \
./libyuv/source/scale_neon.cc.neon
endif

LOCAL_SRC_FILES += \
./jni.c \
./sqlite_cursor.c \
./sqlite_database.c \
./sqlite_statement.c \
./sqlite.c \
./audio.c \
./gif.c \
./utils.c \
./image.c \
./video.c \
./gifvideo.cpp \
./TgNetWrapper.cpp \
./NativeLoader.cpp

Expand Down
8 changes: 4 additions & 4 deletions TMessagesProj/jni/NativeLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#include "breakpad/client/linux/handler/exception_handler.h"
#include "breakpad/client/linux/handler/minidump_descriptor.h"

static google_breakpad::ExceptionHandler *exceptionHandler;
/*static google_breakpad::ExceptionHandler *exceptionHandler;
bool callback(const google_breakpad::MinidumpDescriptor &descriptor, void *context, bool succeeded) {
printf("dump path: %s\n", descriptor.path());
return succeeded;
}
}*/

extern "C" {
void Java_org_telegram_messenger_NativeLoader_init(JNIEnv* env, jobject obj, jstring filepath, bool enable) {
return;
if (enable) {
/*if (enable) {
const char *path = env->GetStringUTFChars(filepath, 0);
google_breakpad::MinidumpDescriptor descriptor(path);
exceptionHandler = new google_breakpad::ExceptionHandler(descriptor, NULL, callback, NULL, true, -1);
}
}*/
}
}
Loading

0 comments on commit 2114024

Please sign in to comment.