Skip to content

Commit

Permalink
Update to 5.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed May 14, 2019
1 parent e397bd9 commit 2cf2a45
Show file tree
Hide file tree
Showing 3,181 changed files with 40,902 additions and 27,793 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
57 changes: 35 additions & 22 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ configurations {
compile.exclude module: 'support-v4'
}

configurations.all {
exclude group: 'com.google.firebase', module: 'firebase-core'
}

dependencies {
implementation 'androidx.core:core:1.1.0-beta01'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'

implementation 'com.airbnb.android:lottie:3.0.1'

compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-config:16.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.google.firebase:firebase-config:16.5.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.android.gms:play-services-wallet:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.android.support:support-core-ui:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
implementation 'com.android.support:support-core-utils:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:palette-v7:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'net.hockeyapp.android:HockeySDK:5.1.1'
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'
Expand Down Expand Up @@ -89,11 +92,11 @@ android {
debugMultidex {
initWith debug
minifyEnabled false
multiDexEnabled true
dependencies{
multiDexEnabled true
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
manifestPlaceholders = [applicationClassName:"MultiDexApplicationLoader"]
manifestPlaceholders = [applicationClassName: "MultiDexApplicationLoader"]
}

HA {
Expand All @@ -115,15 +118,13 @@ android {
}
}

defaultConfig.versionCode = 1517

sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
}

sourceSets.debugMultidex {
manifest.srcFile 'config/debug/AndroidManifest.xml'
java.srcDirs = ['src/multidex/java']
java.srcDirs = ['src/multidex/java']
}

sourceSets.HA {
Expand Down Expand Up @@ -242,12 +243,24 @@ android {
}
}

defaultConfig.versionCode = 1591

applicationVariants.all { variant ->
variant.outputs.all { output ->
output.processManifest.doLast {
output.getProcessManifestProvider().get().doLast {
def abiVersion = variant.productFlavors.get(0).abiVersionCode
String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"

def outputDir = manifestOutputDirectory
File directory
if (outputDir instanceof File) {
directory = outputDir
} else {
directory = outputDir.get().asFile
}

String manifestPath = directory.toString() + "/AndroidManifest.xml"
def manifestContent = file(manifestPath).getText()

manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', defaultConfig.versionCode), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion))
file(manifestPath).write(manifestContent)
}
Expand All @@ -256,17 +269,17 @@ android {

variantFilter { variant ->
def names = variant.flavors*.name
if(variant.buildType.name!="release" && !names.contains("afat")){
if (variant.buildType.name != "release" && !names.contains("afat")) {
setIgnore(true)
}
}

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionName "5.4.0"
versionName "5.6.1"

vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

externalNativeBuild {
ndkBuild {
Expand All @@ -275,7 +288,7 @@ android {
}
}

manifestPlaceholders = [applicationClassName:"ApplicationLoader"]
manifestPlaceholders = [applicationClassName: "ApplicationLoader"]
}
}

Expand Down
7 changes: 4 additions & 3 deletions TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:roundIcon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/AppNameBeta"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true"
android:supportsRtl="false"
Expand All @@ -40,6 +39,8 @@

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

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

<receiver
tools:replace="android:enabled"
Expand Down
7 changes: 5 additions & 2 deletions TMessagesProj/config/debug/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>

<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:roundIcon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/AppNameBeta"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
Expand All @@ -41,6 +42,8 @@

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

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

<receiver
tools:replace="android:enabled"
Expand Down
21 changes: 0 additions & 21 deletions TMessagesProj/config/foss/AndroidManifest.xml

This file was deleted.

7 changes: 5 additions & 2 deletions TMessagesProj/config/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:roundIcon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
Expand All @@ -40,6 +40,9 @@

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

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
Expand Down
8 changes: 6 additions & 2 deletions TMessagesProj/config/release/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>

<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:roundIcon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
Expand All @@ -41,6 +42,9 @@

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

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
Expand Down
4 changes: 1 addition & 3 deletions TMessagesProj/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ endif

include $(PREBUILT_STATIC_LIBRARY)

TGVOIP_ADDITIONAL_CFLAGS := -DTGVOIP_NO_VIDEO
include $(MY_LOCAL_PATH)/libtgvoip/Android.mk
LOCAL_PATH := $(MY_LOCAL_PATH) # restore local path after include

Expand Down Expand Up @@ -123,7 +124,6 @@ LOCAL_SRC_FILES := \
./tgnet/Request.cpp \
./tgnet/Timer.cpp \
./tgnet/TLObject.cpp \
./tgnet/FileLoadOperation.cpp \
./tgnet/ProxyCheckInfo.cpp \
./tgnet/Handshake.cpp \
./tgnet/Config.cpp
Expand Down Expand Up @@ -547,8 +547,6 @@ LOCAL_SRC_FILES += \
./SqliteWrapper.cpp \
./TgNetWrapper.cpp \
./NativeLoader.cpp \
./emoji/emoji_suggestions_data.cpp \
./emoji/emoji_suggestions.cpp \
./exoplayer/flac_jni.cc \
./exoplayer/flac_parser.cc \
./exoplayer/opus_jni.cc \
Expand Down
9 changes: 7 additions & 2 deletions TMessagesProj/jni/SqliteWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,20 @@ jlong Java_org_telegram_SQLite_SQLiteDatabase_opendb(JNIEnv *env, jobject object
return (jlong) handle;
}

jint Java_org_telegram_SQLite_SQLiteCursor_columnCount(JNIEnv *env, jobject object, jlong statementHandle) {
sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
return sqlite3_column_count(handle);
}

jint Java_org_telegram_SQLite_SQLiteCursor_columnType(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
return sqlite3_column_type(handle, columnIndex);
}

jboolean Java_org_telegram_SQLite_SQLiteCursor_columnIsNull(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
jint Java_org_telegram_SQLite_SQLiteCursor_columnIsNull(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
int valType = sqlite3_column_type(handle, columnIndex);
return (jboolean) (SQLITE_NULL == valType);
return SQLITE_NULL == valType ? 1 : 0;
}

jint Java_org_telegram_SQLite_SQLiteCursor_columnIntValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
Expand Down
Loading

0 comments on commit 2cf2a45

Please sign in to comment.