Commit 8233e89d authored by DrKLO's avatar DrKLO

Perfect forward secrecy in secret chats, phone change, telegram.me links support

parent 95de265e
...@@ -80,7 +80,7 @@ android { ...@@ -80,7 +80,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 21 targetSdkVersion 21
versionCode 397 versionCode 403
versionName "2.0.5" versionName "2.1.0"
} }
} }
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/AppName" android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start" android:theme="@style/Theme.TMessages.Start"
android:name="org.telegram.ui.ApplicationLoader" android:name=".ApplicationLoader"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:largeHeap="true"> android:largeHeap="true">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/AppName" android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start" android:theme="@style/Theme.TMessages.Start"
android:name="org.telegram.ui.ApplicationLoader" android:name=".ApplicationLoader"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:largeHeap="true"> android:largeHeap="true">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/AppName" android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start" android:theme="@style/Theme.TMessages.Start"
android:name="org.telegram.ui.ApplicationLoader" android:name=".ApplicationLoader"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:largeHeap="true"> android:largeHeap="true">
......
...@@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) ...@@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := tmessages.3 LOCAL_MODULE := tmessages.4
LOCAL_CFLAGS := -w -std=gnu99 -O2 -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 LOCAL_CFLAGS := -w -std=gnu99 -O2 -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 += -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 -DHAVE_STRCHRNUL=0 LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -DHAVE_STRCHRNUL=0
......
...@@ -589,7 +589,7 @@ static jint open(GifFileType *GifFileIn, int Error, int startPos, JNIEnv *env, j ...@@ -589,7 +589,7 @@ static jint open(GifFileType *GifFileIn, int Error, int startPos, JNIEnv *env, j
return (jint)(Error == 0 ? info : NULL); return (jint)(Error == 0 ? info : NULL);
} }
JNIEXPORT jlong JNICALL Java_org_telegram_ui_Views_GifDrawable_getAllocationByteCount(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT jlong JNICALL Java_org_telegram_ui_Components_GifDrawable_getAllocationByteCount(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return 0; return 0;
...@@ -602,7 +602,7 @@ JNIEXPORT jlong JNICALL Java_org_telegram_ui_Views_GifDrawable_getAllocationByte ...@@ -602,7 +602,7 @@ JNIEXPORT jlong JNICALL Java_org_telegram_ui_Views_GifDrawable_getAllocationByte
return sum; return sum;
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_reset(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_reset(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return; return;
...@@ -610,7 +610,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_reset(JNIEnv *env, ...@@ -610,7 +610,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_reset(JNIEnv *env,
reset(info); reset(info);
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_setSpeedFactor(JNIEnv *env, jclass class, jobject gifInfo, jfloat factor) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_setSpeedFactor(JNIEnv *env, jclass class, jobject gifInfo, jfloat factor) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return; return;
...@@ -618,7 +618,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_setSpeedFactor(JNI ...@@ -618,7 +618,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_setSpeedFactor(JNI
info->speedFactor = factor; info->speedFactor = factor;
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToTime(JNIEnv *env, jclass class, jobject gifInfo, jint desiredPos, jintArray jPixels) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_seekToTime(JNIEnv *env, jclass class, jobject gifInfo, jint desiredPos, jintArray jPixels) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL || jPixels == NULL) { if (info == NULL || jPixels == NULL) {
return; return;
...@@ -665,7 +665,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToTime(JNIEnv ...@@ -665,7 +665,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToTime(JNIEnv
} }
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToFrame(JNIEnv *env, jclass class, jobject gifInfo, jint desiredIdx, jintArray jPixels) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_seekToFrame(JNIEnv *env, jclass class, jobject gifInfo, jint desiredIdx, jintArray jPixels) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL|| jPixels==NULL) { if (info == NULL|| jPixels==NULL) {
return; return;
...@@ -701,7 +701,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToFrame(JNIEnv ...@@ -701,7 +701,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_seekToFrame(JNIEnv
} }
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_renderFrame(JNIEnv *env, jclass class, jintArray jPixels, jobject gifInfo, jintArray metaData) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_renderFrame(JNIEnv *env, jclass class, jintArray jPixels, jobject gifInfo, jintArray metaData) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL || jPixels == NULL) { if (info == NULL || jPixels == NULL) {
return; return;
...@@ -752,7 +752,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_renderFrame(JNIEnv ...@@ -752,7 +752,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_renderFrame(JNIEnv
(*env)->ReleaseIntArrayElements(env, metaData, rawMetaData, 0); (*env)->ReleaseIntArrayElements(env, metaData, rawMetaData, 0);
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_free(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_free(JNIEnv *env, jclass class, jobject gifInfo) {
if (gifInfo == NULL) { if (gifInfo == NULL) {
return; return;
} }
...@@ -765,7 +765,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_free(JNIEnv *env, ...@@ -765,7 +765,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_free(JNIEnv *env,
cleanUp(info); cleanUp(info);
} }
JNIEXPORT jstring JNICALL Java_org_telegram_ui_Views_GifDrawable_getComment(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT jstring JNICALL Java_org_telegram_ui_Components_GifDrawable_getComment(JNIEnv *env, jclass class, jobject gifInfo) {
if (gifInfo == NULL) { if (gifInfo == NULL) {
return NULL; return NULL;
} }
...@@ -773,14 +773,14 @@ JNIEXPORT jstring JNICALL Java_org_telegram_ui_Views_GifDrawable_getComment(JNIE ...@@ -773,14 +773,14 @@ JNIEXPORT jstring JNICALL Java_org_telegram_ui_Views_GifDrawable_getComment(JNIE
return (*env)->NewStringUTF(env, info->comment); return (*env)->NewStringUTF(env, info->comment);
} }
JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getLoopCount(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_GifDrawable_getLoopCount(JNIEnv *env, jclass class, jobject gifInfo) {
if (gifInfo == NULL) { if (gifInfo == NULL) {
return 0; return 0;
} }
return ((GifInfo *)gifInfo)->loopCount; return ((GifInfo *)gifInfo)->loopCount;
} }
JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getDuration(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_GifDrawable_getDuration(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return 0; return 0;
...@@ -793,7 +793,7 @@ JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getDuration(JNIEnv ...@@ -793,7 +793,7 @@ JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getDuration(JNIEnv
return sum; return sum;
} }
JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getCurrentPosition(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_GifDrawable_getCurrentPosition(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return 0; return 0;
...@@ -811,7 +811,7 @@ JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getCurrentPosition ...@@ -811,7 +811,7 @@ JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_getCurrentPosition
return (int) (sum + remainder); return (int) (sum + remainder);
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_saveRemainder(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_saveRemainder(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL) { if (info == NULL) {
return; return;
...@@ -819,7 +819,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_saveRemainder(JNIE ...@@ -819,7 +819,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_saveRemainder(JNIE
info->lastFrameReaminder = getRealTime() - info->nextStartTime; info->lastFrameReaminder = getRealTime() - info->nextStartTime;
} }
JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_restoreRemainder(JNIEnv *env, jclass class, jobject gifInfo) { JNIEXPORT void JNICALL Java_org_telegram_ui_Components_GifDrawable_restoreRemainder(JNIEnv *env, jclass class, jobject gifInfo) {
GifInfo *info = (GifInfo *)gifInfo; GifInfo *info = (GifInfo *)gifInfo;
if (info == NULL || info->lastFrameReaminder == ULONG_MAX) { if (info == NULL || info->lastFrameReaminder == ULONG_MAX) {
return; return;
...@@ -828,7 +828,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_restoreRemainder(J ...@@ -828,7 +828,7 @@ JNIEXPORT void JNICALL Java_org_telegram_ui_Views_GifDrawable_restoreRemainder(J
info->lastFrameReaminder = ULONG_MAX; info->lastFrameReaminder = ULONG_MAX;
} }
JNIEXPORT jint JNICALL Java_org_telegram_ui_Views_GifDrawable_openFile(JNIEnv *env, jclass class, jintArray metaData, jstring jfname) { JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_GifDrawable_openFile(JNIEnv *env, jclass class, jintArray metaData, jstring jfname) {
if (jfname == NULL) { if (jfname == NULL) {
setMetaData(0, 0, 0, D_GIF_ERR_OPEN_FAILED, env, metaData); setMetaData(0, 0, 0, D_GIF_ERR_OPEN_FAILED, env, metaData);
return (jint) NULL; return (jint) NULL;
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
android:installLocation="auto"> android:installLocation="auto">
<supports-screens android:anyDensity="true" <supports-screens android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true" android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true" android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true"/> android:xlargeScreens="true"/>
<uses-feature android:glEsVersion="0x00020000" android:required="false"/> <uses-feature android:glEsVersion="0x00020000" android:required="false"/>
...@@ -41,20 +41,20 @@ ...@@ -41,20 +41,20 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application <application
android:name=".ApplicationLoader"
android:allowBackup="false" android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/AppName" android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start" android:largeHeap="true"
android:name="org.telegram.ui.ApplicationLoader" android:theme="@style/Theme.TMessages.Start">
android:hardwareAccelerated="true"
android:largeHeap="true">
<activity <activity
android:name="org.telegram.ui.LaunchActivity" android:name="org.telegram.ui.LaunchActivity"
android:windowSoftInputMode="adjustPan" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
...@@ -95,6 +95,19 @@ ...@@ -95,6 +95,19 @@
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"/> <data android:mimeType="vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"/>
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="telegram.me" android:scheme="http" />
<data android:host="telegram.me" android:scheme="https" />
</intent-filter>
<intent-filter android:icon="@drawable/ic_launcher" android:priority="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tg" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name="org.telegram.ui.IntroActivity" android:name="org.telegram.ui.IntroActivity"
...@@ -105,9 +118,9 @@ ...@@ -105,9 +118,9 @@
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize|stateHidden"
android:taskAffinity="" android:taskAffinity=""
android:theme="@style/Theme.TMessages.PopupNotification"> android:theme="@style/Theme.TMessages.PopupNotification"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity> </activity>
<receiver android:name="org.telegram.android.SmsListener"> <receiver android:name="org.telegram.android.SmsListener">
...@@ -116,8 +129,7 @@ ...@@ -116,8 +129,7 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<service android:name="org.telegram.android.AuthenticatorService" <service android:name="org.telegram.android.AuthenticatorService" android:exported="true">
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.accounts.AccountAuthenticator"/> <action android:name="android.accounts.AccountAuthenticator"/>
</intent-filter> </intent-filter>
...@@ -125,8 +137,7 @@ ...@@ -125,8 +137,7 @@
android:resource="@xml/auth"/> android:resource="@xml/auth"/>
</service> </service>
<service android:name="org.telegram.android.ContactsSyncAdapterService" <service android:name="org.telegram.android.ContactsSyncAdapterService" android:exported="true">
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.content.SyncAdapter" /> <action android:name="android.content.SyncAdapter" />
</intent-filter> </intent-filter>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
package org.telegram.PhoneFormat; package org.telegram.PhoneFormat;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
package org.telegram.SQLite; package org.telegram.SQLite;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class SQLiteDatabase { public class SQLiteDatabase {
private final int sqliteHandle; private final int sqliteHandle;
......
...@@ -20,6 +20,9 @@ import android.graphics.Typeface; ...@@ -20,6 +20,9 @@ import android.graphics.Typeface;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.os.Environment; import android.os.Environment;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.util.StateSet; import android.util.StateSet;
import android.view.Display; import android.view.Display;
import android.view.Surface; import android.view.Surface;
...@@ -35,12 +38,14 @@ import android.widget.TextView; ...@@ -35,12 +38,14 @@ import android.widget.TextView;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import org.telegram.ui.Views.NumberPicker; import org.telegram.ui.Components.NumberPicker;
import org.telegram.ui.Components.TypefaceSpan;
import java.io.File; import java.io.File;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Hashtable; import java.util.Hashtable;
public class AndroidUtilities { public class AndroidUtilities {
...@@ -389,7 +394,7 @@ public class AndroidUtilities { ...@@ -389,7 +394,7 @@ public class AndroidUtilities {
encryptedChat.ttl = 60 * 60 * 24 * 7; encryptedChat.ttl = 60 * 60 * 24 * 7;
} }
if (oldValue != encryptedChat.ttl) { if (oldValue != encryptedChat.ttl) {
SendMessagesHelper.getInstance().sendTTLMessage(encryptedChat, null); SecretChatHelper.getInstance().sendTTLMessage(encryptedChat, null);
MessagesStorage.getInstance().updateEncryptedChatTTL(encryptedChat); MessagesStorage.getInstance().updateEncryptedChatTTL(encryptedChat);
} }
} }
...@@ -502,4 +507,21 @@ public class AndroidUtilities { ...@@ -502,4 +507,21 @@ public class AndroidUtilities {
} }
} }
} }
public static Spannable replaceBold(String str) {
int start;
ArrayList<Integer> bolds = new ArrayList<Integer>();
while ((start = str.indexOf("<b>")) != -1) {
int end = str.indexOf("</b>") - 3;
str = str.replaceFirst("<b>", "").replaceFirst("</b>", "");
bolds.add(start);
bolds.add(end);
}
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(str);
for (int a = 0; a < bolds.size() / 2; a++) {
TypefaceSpan span = new TypefaceSpan(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
stringBuilder.setSpan(span, bolds.get(a * 2), bolds.get(a * 2 + 1), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
}
return stringBuilder;
}
} }
...@@ -12,7 +12,7 @@ import android.content.BroadcastReceiver; ...@@ -12,7 +12,7 @@ import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class AppStartReceiver extends BroadcastReceiver { public class AppStartReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
......
...@@ -31,7 +31,7 @@ import org.telegram.messenger.TLObject; ...@@ -31,7 +31,7 @@ import org.telegram.messenger.TLObject;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
......
...@@ -29,7 +29,7 @@ import android.widget.TextView; ...@@ -29,7 +29,7 @@ import android.widget.TextView;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class Emoji { public class Emoji {
private static HashMap<Long, DrawableInfo> rects = new HashMap<Long, DrawableInfo>(); private static HashMap<Long, DrawableInfo> rects = new HashMap<Long, DrawableInfo>();
......
...@@ -16,7 +16,7 @@ import android.content.Intent; ...@@ -16,7 +16,7 @@ import android.content.Intent;
import org.json.JSONObject; import org.json.JSONObject;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class GcmBroadcastReceiver extends BroadcastReceiver { public class GcmBroadcastReceiver extends BroadcastReceiver {
......
...@@ -31,7 +31,7 @@ import org.telegram.messenger.FileLog; ...@@ -31,7 +31,7 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
......
...@@ -24,7 +24,7 @@ import org.telegram.messenger.FileLog; ...@@ -24,7 +24,7 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParser;
import java.io.File; import java.io.File;
......
...@@ -52,9 +52,9 @@ import org.telegram.messenger.R; ...@@ -52,9 +52,9 @@ import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import org.telegram.ui.Cells.ChatMediaCell; import org.telegram.ui.Cells.ChatMediaCell;
import org.telegram.ui.Views.GifDrawable; import org.telegram.ui.Components.GifDrawable;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
...@@ -809,7 +809,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel ...@@ -809,7 +809,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
} }
} }
if (send) { if (send) {
SendMessagesHelper.getInstance().sendScreenshotMessage(lastSecretChat, lastSecretChatVisibleMessages, null); SecretChatHelper.getInstance().sendScreenshotMessage(lastSecretChat, lastSecretChatVisibleMessages, null);
} }
} }
......
...@@ -25,7 +25,7 @@ import org.telegram.messenger.FileLog; ...@@ -25,7 +25,7 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.ui.Views.URLSpanNoUnderline; import org.telegram.ui.Components.URLSpanNoUnderline;
import java.util.AbstractMap; import java.util.AbstractMap;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -452,6 +452,60 @@ public class MessageObject { ...@@ -452,6 +452,60 @@ public class MessageObject {
return ""; return "";
} }
private boolean containsUrls(String message) {
if (message == null || message.length() < 3 || message.length() > 1024 * 20) {
return false;
}
boolean containsSomething = false;
int length = message.length();
int digitsInRow = 0;
int schemeSequence = 0;
int dotSequence = 0;
char lastChar = 0;
for (int i = 0; i < length; i++) {
char c = message.charAt(i);
if (c >= '0' && c <= '9') {
digitsInRow++;
if (digitsInRow >= 6) {
return true;
}
schemeSequence = 0;
dotSequence = 0;
} else if (c == ':') {
if (schemeSequence == 0) {
schemeSequence = 1;
} else {
schemeSequence = 0;
}
} else if (c == '/') {
if (schemeSequence == 2) {
return true;
}
if (schemeSequence == 1) {
schemeSequence++;
} else {
schemeSequence = 0;
}
} else if (c == '.') {
if (dotSequence == 0 && lastChar != ' ') {
dotSequence++;
} else {
dotSequence = 0;
}
} else if (c != ' ' && lastChar == '.' && dotSequence == 1) {
return true;
}
lastChar = c;
}
return false;
}
private void generateLayout() { private void generateLayout() {
if (type != 0 || messageOwner.to_id == null || messageText == null || messageText.length() == 0) { if (type != 0 || messageOwner.to_id == null || messageText == null || messageText.length() == 0) {
return; return;
...@@ -459,11 +513,11 @@ public class MessageObject { ...@@ -459,11 +513,11 @@ public class MessageObject {
textLayoutBlocks = new ArrayList<TextLayoutBlock>(); textLayoutBlocks = new ArrayList<TextLayoutBlock>();
if (messageText instanceof Spannable) { if (messageText instanceof Spannable && containsUrls(messageOwner.message)) {
if (messageOwner.message != null && messageOwner.message.contains(".") && (messageOwner.message.contains(".com") || messageOwner.message.contains("http") || messageOwner.message.contains(".ru") || messageOwner.message.contains(".org") || messageOwner.message.contains(".net"))) { if (messageOwner.message.length() < 100) {
Linkify.addLinks((Spannable)messageText, Linkify.WEB_URLS); Linkify.addLinks((Spannable) messageText, Linkify.WEB_URLS | Linkify.PHONE_NUMBERS);
} else if (messageText.length() < 100) { } else {
Linkify.addLinks((Spannable)messageText, Linkify.WEB_URLS | Linkify.EMAIL_ADDRESSES | Linkify.PHONE_NUMBERS); Linkify.addLinks((Spannable) messageText, Linkify.WEB_URLS);
} }
} }
...@@ -576,10 +630,7 @@ public class MessageObject { ...@@ -576,10 +630,7 @@ public class MessageObject {
} }
if (lineWidth > maxWidth + 100) { if (lineWidth > maxWidth + 100) {
int start = block.textLayout.getLineStart(n); lineWidth = maxWidth;
int end = block.textLayout.getLineEnd(n);
CharSequence text = block.textLayout.getText().subSequence(start, end);
continue;
} }
try { try {
......
...@@ -23,7 +23,7 @@ import java.util.zip.ZipFile; ...@@ -23,7 +23,7 @@ import java.util.zip.ZipFile;
public class NativeLoader { public class NativeLoader {
private final static int LIB_VERSION = 3; private final static int LIB_VERSION = 4;
private final static String LIB_NAME = "tmessages." + LIB_VERSION; private final static String LIB_NAME = "tmessages." + LIB_VERSION;
private final static String LIB_SO_NAME = "lib" + LIB_NAME + ".so"; private final static String LIB_SO_NAME = "lib" + LIB_NAME + ".so";
private final static String LOCALE_LIB_SO_NAME = "lib" + LIB_NAME + "loc.so"; private final static String LOCALE_LIB_SO_NAME = "lib" + LIB_NAME + "loc.so";
......
...@@ -33,7 +33,7 @@ import org.telegram.messenger.FileLog; ...@@ -33,7 +33,7 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import org.telegram.ui.LaunchActivity; import org.telegram.ui.LaunchActivity;
import org.telegram.ui.PopupNotificationActivity; import org.telegram.ui.PopupNotificationActivity;
......
...@@ -14,7 +14,7 @@ import android.content.SharedPreferences; ...@@ -14,7 +14,7 @@ import android.content.SharedPreferences;
import android.os.IBinder; import android.os.IBinder;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class NotificationsService extends Service { public class NotificationsService extends Service {
......
...@@ -14,7 +14,7 @@ import android.content.Intent; ...@@ -14,7 +14,7 @@ import android.content.Intent;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class ScreenReceiver extends BroadcastReceiver { public class ScreenReceiver extends BroadcastReceiver {
@Override @Override
......
...@@ -16,7 +16,7 @@ import android.support.v4.app.NotificationManagerCompat; ...@@ -16,7 +16,7 @@ import android.support.v4.app.NotificationManagerCompat;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
public class VideoEncodingService extends Service implements NotificationCenter.NotificationCenterDelegate { public class VideoEncodingService extends Service implements NotificationCenter.NotificationCenterDelegate {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright Nikolai Kudashov, 2013. * Copyright Nikolai Kudashov, 2013.
*/ */
package org.telegram.ui; package org.telegram.messenger;
import android.app.AlarmManager; import android.app.AlarmManager;
import android.app.Application; import android.app.Application;
...@@ -34,15 +34,10 @@ import org.telegram.android.ContactsController; ...@@ -34,15 +34,10 @@ import org.telegram.android.ContactsController;
import org.telegram.android.MediaController; import org.telegram.android.MediaController;
import org.telegram.android.NotificationsService; import org.telegram.android.NotificationsService;
import org.telegram.android.SendMessagesHelper; import org.telegram.android.SendMessagesHelper;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog;
import org.telegram.android.LocaleController; import org.telegram.android.LocaleController;
import org.telegram.android.MessagesController; import org.telegram.android.MessagesController;
import org.telegram.android.NativeLoader; import org.telegram.android.NativeLoader;
import org.telegram.android.ScreenReceiver; import org.telegram.android.ScreenReceiver;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
......
...@@ -21,7 +21,6 @@ import org.telegram.android.ContactsController; ...@@ -21,7 +21,6 @@ import org.telegram.android.ContactsController;
import org.telegram.android.LocaleController; import org.telegram.android.LocaleController;
import org.telegram.android.MessagesController; import org.telegram.android.MessagesController;
import org.telegram.android.NotificationCenter; import org.telegram.android.NotificationCenter;
import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -418,7 +417,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -418,7 +417,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
pushSessionId = Utilities.random.nextLong(); pushSessionId = Utilities.random.nextLong();
} }
if (currentDatacenterId == 0) { if (currentDatacenterId == 0) {
currentDatacenterId = 1; currentDatacenterId = 2;
} }
saveSession(); saveSession();
} }
...@@ -432,12 +431,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -432,12 +431,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
if (isTestBackend == 0) { if (isTestBackend == 0) {
Datacenter datacenter = new Datacenter(); Datacenter datacenter = new Datacenter();
datacenter.datacenterId = 1; datacenter.datacenterId = 1;
datacenter.addAddressAndPort("173.240.5.1", 443); datacenter.addAddressAndPort("149.154.175.50", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
datacenter = new Datacenter(); datacenter = new Datacenter();
datacenter.datacenterId = 2; datacenter.datacenterId = 2;
datacenter.addAddressAndPort("149.154.167.50", 443); datacenter.addAddressAndPort("149.154.167.51", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
datacenter = new Datacenter(); datacenter = new Datacenter();
...@@ -447,7 +446,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -447,7 +446,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
datacenter = new Datacenter(); datacenter = new Datacenter();
datacenter.datacenterId = 4; datacenter.datacenterId = 4;
datacenter.addAddressAndPort("149.154.167.90", 443); datacenter.addAddressAndPort("149.154.167.91", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
datacenter = new Datacenter(); datacenter = new Datacenter();
...@@ -473,7 +472,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -473,7 +472,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
} else if (datacenters.size() == 1) { } else if (datacenters.size() == 1) {
Datacenter datacenter = new Datacenter(); Datacenter datacenter = new Datacenter();
datacenter.datacenterId = 2; datacenter.datacenterId = 2;
datacenter.addAddressAndPort("149.154.167.50", 443); datacenter.addAddressAndPort("149.154.167.51", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
datacenter = new Datacenter(); datacenter = new Datacenter();
...@@ -483,12 +482,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -483,12 +482,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
datacenter = new Datacenter(); datacenter = new Datacenter();
datacenter.datacenterId = 4; datacenter.datacenterId = 4;
datacenter.addAddressAndPort("31.210.235.12", 443); datacenter.addAddressAndPort("149.154.167.91", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
datacenter = new Datacenter(); datacenter = new Datacenter();
datacenter.datacenterId = 5; datacenter.datacenterId = 5;
datacenter.addAddressAndPort("116.51.22.2", 443); datacenter.addAddressAndPort("149.154.171.5", 443);
datacenters.put(datacenter.datacenterId, datacenter); datacenters.put(datacenter.datacenterId, datacenter);
} }
} }
...@@ -1113,13 +1112,13 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -1113,13 +1112,13 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
request.retryCount++; request.retryCount++;
if ((request.flags & RPCRequest.RPCRequestClassDownloadMedia) != 0) { if (!request.salt && (request.flags & RPCRequest.RPCRequestClassDownloadMedia) != 0) {
int retryMax = 10; int retryMax = 10;
if ((request.flags & RPCRequest.RPCRequestClassForceDownload) == 0) { if ((request.flags & RPCRequest.RPCRequestClassForceDownload) == 0) {
if (request.wait) { if (request.wait) {
retryMax = 1; retryMax = 1;
} else { } else {
retryMax = 3; retryMax = 6;
} }
} }
if (request.retryCount >= retryMax) { if (request.retryCount >= retryMax) {
...@@ -2244,6 +2243,8 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -2244,6 +2243,8 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
} }
if (request.respondsToMessageId(resultMid)) { if (request.respondsToMessageId(resultMid)) {
request.retryCount = 0; request.retryCount = 0;
request.salt = true;
break;
} }
} }
} }
...@@ -2568,7 +2569,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. ...@@ -2568,7 +2569,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
if (message == null) { if (message == null) {
FileLog.e("tmessages", "***** Error parsing message: " + constructor); FileLog.e("tmessages", "***** Error parsing message: " + constructor);
} else { } else {
FileLog.e("tmessages", "received object " + message); FileLog.d("tmessages", "received object " + message);
processMessage(message, messageId, messageSeqNo, messageServerSalt, connection, 0, 0); processMessage(message, messageId, messageSeqNo, messageServerSalt, connection, 0, 0);
connection.addProcessedMessageId(messageId); connection.addProcessedMessageId(messageId);
......
...@@ -11,8 +11,6 @@ package org.telegram.messenger; ...@@ -11,8 +11,6 @@ package org.telegram.messenger;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import org.telegram.ui.ApplicationLoader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
......
...@@ -12,7 +12,6 @@ import android.net.Uri; ...@@ -12,7 +12,6 @@ import android.net.Uri;
import android.util.Log; import android.util.Log;
import org.telegram.android.time.FastDateFormat; import org.telegram.android.time.FastDateFormat;
import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
......
...@@ -11,8 +11,6 @@ package org.telegram.messenger; ...@@ -11,8 +11,6 @@ package org.telegram.messenger;
import android.app.Activity; import android.app.Activity;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.math.BigInteger; import java.math.BigInteger;
......
...@@ -37,6 +37,7 @@ public class RPCRequest { ...@@ -37,6 +37,7 @@ public class RPCRequest {
int serverFailureCount; int serverFailureCount;
int flags; int flags;
boolean wait = false; boolean wait = false;
boolean salt = false;
protected int retryCount = 0; protected int retryCount = 0;
protected int lastResendTime = 0; protected int lastResendTime = 0;
protected boolean completed = false; protected boolean completed = false;
......
...@@ -359,6 +359,13 @@ public class TLClassStore { ...@@ -359,6 +359,13 @@ public class TLClassStore {
classStore.put(TLRPC.TL_inputPhotoCrop.constructor, TLRPC.TL_inputPhotoCrop.class); classStore.put(TLRPC.TL_inputPhotoCrop.constructor, TLRPC.TL_inputPhotoCrop.class);
classStore.put(TLRPC.TL_messages_dialogs.constructor, TLRPC.TL_messages_dialogs.class); classStore.put(TLRPC.TL_messages_dialogs.constructor, TLRPC.TL_messages_dialogs.class);
classStore.put(TLRPC.TL_messages_dialogsSlice.constructor, TLRPC.TL_messages_dialogsSlice.class); classStore.put(TLRPC.TL_messages_dialogsSlice.constructor, TLRPC.TL_messages_dialogsSlice.class);
classStore.put(TLRPC.TL_account_sentChangePhoneCode.constructor, TLRPC.TL_account_sentChangePhoneCode.class);
classStore.put(TLRPC.TL_updateUserPhone.constructor, TLRPC.TL_updateUserPhone.class);
classStore.put(TLRPC.TL_decryptedMessageActionRequestKey.constructor, TLRPC.TL_decryptedMessageActionRequestKey.class);
classStore.put(TLRPC.TL_decryptedMessageActionAcceptKey.constructor, TLRPC.TL_decryptedMessageActionAcceptKey.class);
classStore.put(TLRPC.TL_decryptedMessageActionCommitKey.constructor, TLRPC.TL_decryptedMessageActionCommitKey.class);
classStore.put(TLRPC.TL_decryptedMessageActionAbortKey.constructor, TLRPC.TL_decryptedMessageActionAbortKey.class);
classStore.put(TLRPC.TL_decryptedMessageActionNoop.constructor, TLRPC.TL_decryptedMessageActionNoop.class);
classStore.put(TLRPC.TL_msg_container.constructor, TLRPC.TL_msg_container.class); classStore.put(TLRPC.TL_msg_container.constructor, TLRPC.TL_msg_container.class);
classStore.put(TLRPC.TL_fileEncryptedLocation.constructor, TLRPC.TL_fileEncryptedLocation.class); classStore.put(TLRPC.TL_fileEncryptedLocation.constructor, TLRPC.TL_fileEncryptedLocation.class);
......
...@@ -3675,6 +3675,7 @@ public class TLRPC { ...@@ -3675,6 +3675,7 @@ public class TLRPC {
public long random_id; public long random_id;
public ArrayList<TL_dcOption> dc_options = new ArrayList<TL_dcOption>(); public ArrayList<TL_dcOption> dc_options = new ArrayList<TL_dcOption>();
public ChatParticipants participants; public ChatParticipants participants;
public String phone;
public TL_privacyKeyStatusTimestamp key; public TL_privacyKeyStatusTimestamp key;
public ArrayList<PrivacyRule> rules = new ArrayList<PrivacyRule>(); public ArrayList<PrivacyRule> rules = new ArrayList<PrivacyRule>();
public EncryptedChat chat; public EncryptedChat chat;
...@@ -4009,6 +4010,22 @@ public class TLRPC { ...@@ -4009,6 +4010,22 @@ public class TLRPC {
} }
} }
public static class TL_updateUserPhone extends Update {
public static int constructor = 0x12b9417b;
public void readParams(AbsSerializedData stream) {
user_id = stream.readInt32();
phone = stream.readString();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeString(phone);
}
}
public static class TL_updatePrivacy extends Update { public static class TL_updatePrivacy extends Update {
public static int constructor = 0xee3b272a; public static int constructor = 0xee3b272a;
...@@ -4329,10 +4346,14 @@ public class TLRPC { ...@@ -4329,10 +4346,14 @@ public class TLRPC {
public static class DecryptedMessageAction extends TLObject { public static class DecryptedMessageAction extends TLObject {
public int start_seq_no; public int start_seq_no;
public int end_seq_no; public int end_seq_no;
public int layer;
public int ttl_seconds; public int ttl_seconds;
public int layer;
public ArrayList<Long> random_ids = new ArrayList<Long>(); public ArrayList<Long> random_ids = new ArrayList<Long>();
public long exchange_id;
public long key_fingerprint;
public byte[] g_b;
public SendMessageAction action; public SendMessageAction action;
public byte[] g_a;
} }
public static class TL_decryptedMessageActionSetMessageTTL extends DecryptedMessageAction { public static class TL_decryptedMessageActionSetMessageTTL extends DecryptedMessageAction {
...@@ -4356,6 +4377,24 @@ public class TLRPC { ...@@ -4356,6 +4377,24 @@ public class TLRPC {
} }
} }
public static class TL_decryptedMessageActionAcceptKey extends DecryptedMessageAction {
public static int constructor = 0x6fe1735b;
public void readParams(AbsSerializedData stream) {
exchange_id = stream.readInt64();
g_b = stream.readByteArray();
key_fingerprint = stream.readInt64();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeByteArray(g_b);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_decryptedMessageActionResend extends DecryptedMessageAction { public static class TL_decryptedMessageActionResend extends DecryptedMessageAction {
public static int constructor = 0x511110b0; public static int constructor = 0x511110b0;
...@@ -4409,6 +4448,22 @@ public class TLRPC { ...@@ -4409,6 +4448,22 @@ public class TLRPC {
} }
} }
public static class TL_decryptedMessageActionRequestKey extends DecryptedMessageAction {
public static int constructor = 0xf3c9611b;
public void readParams(AbsSerializedData stream) {
exchange_id = stream.readInt64();
g_a = stream.readByteArray();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeByteArray(g_a);
}
}
public static class TL_decryptedMessageActionTyping extends DecryptedMessageAction { public static class TL_decryptedMessageActionTyping extends DecryptedMessageAction {
public static int constructor = 0xccb27641; public static int constructor = 0xccb27641;
...@@ -5019,6 +5074,69 @@ public class TLRPC { ...@@ -5019,6 +5074,69 @@ public class TLRPC {
} }
} }
public static class TL_contacts_resolveUsername extends TLObject {
public static int constructor = 0xbf0131c;
public String username;
public Class responseClass () {
return User.class;
}
public void readParams(AbsSerializedData stream) {
username = stream.readString();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(username);
}
}
public static class TL_account_sendChangePhoneCode extends TLObject {
public static int constructor = 0xa407a8f4;
public String phone_number;
public Class responseClass () {
return TL_account_sentChangePhoneCode.class;
}
public void readParams(AbsSerializedData stream) {
phone_number = stream.readString();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
}
}
public static class TL_account_changePhone extends TLObject {
public static int constructor = 0x70c32edb;
public String phone_number;
public String phone_code_hash;
public String phone_code;
public Class responseClass () {
return User.class;
}
public void readParams(AbsSerializedData stream) {
phone_number = stream.readString();
phone_code_hash = stream.readString();
phone_code = stream.readString();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
stream.writeString(phone_code);
}
}
public static class InputAudio extends TLObject { public static class InputAudio extends TLObject {
public long id; public long id;
public long access_hash; public long access_hash;
...@@ -5900,6 +6018,24 @@ public class TLRPC { ...@@ -5900,6 +6018,24 @@ public class TLRPC {
} }
} }
public static class TL_account_sentChangePhoneCode extends TLObject {
public static int constructor = 0xa4f58c4c;
public String phone_code_hash;
public int send_call_timeout;
public void readParams(AbsSerializedData stream) {
phone_code_hash = stream.readString();
send_call_timeout = stream.readInt32();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_code_hash);
stream.writeInt32(send_call_timeout);
}
}
public static class InputFile extends TLObject { public static class InputFile extends TLObject {
public long id; public long id;
public int parts; public int parts;
...@@ -8819,6 +8955,7 @@ public class TLRPC { ...@@ -8819,6 +8955,7 @@ public class TLRPC {
public int date; public int date;
public TL_decryptedMessageLayer layer; public TL_decryptedMessageLayer layer;
public EncryptedFile file; public EncryptedFile file;
public boolean new_key_used;
public void readParams(AbsSerializedData stream) { public void readParams(AbsSerializedData stream) {
random_id = stream.readInt64(); random_id = stream.readInt64();
...@@ -8827,6 +8964,7 @@ public class TLRPC { ...@@ -8827,6 +8964,7 @@ public class TLRPC {
if (stream.readBool()) { if (stream.readBool()) {
file = (EncryptedFile) TLClassStore.Instance().TLdeserialize(stream, stream.readInt32()); file = (EncryptedFile) TLClassStore.Instance().TLdeserialize(stream, stream.readInt32());
} }
new_key_used = stream.readBool();
} }
public void serializeToStream(AbsSerializedData stream) { public void serializeToStream(AbsSerializedData stream) {
...@@ -8838,6 +8976,7 @@ public class TLRPC { ...@@ -8838,6 +8976,7 @@ public class TLRPC {
if (file != null) { if (file != null) {
file.serializeToStream(stream); file.serializeToStream(stream);
} }
stream.writeBool(new_key_used);
} }
} }
...@@ -9990,6 +10129,13 @@ public class TLRPC { ...@@ -9990,6 +10129,13 @@ public class TLRPC {
public int layer; public int layer;
public int seq_in; public int seq_in;
public int seq_out; public int seq_out;
public byte[] key_hash;
public short key_use_count_in;
public short key_use_count_out;
public long exchange_id;
public int key_create_date;
public long future_key_fingerprint;
public byte[] future_auth_key;
} }
public static class FileLocation extends TLObject { public static class FileLocation extends TLObject {
...@@ -10290,7 +10436,7 @@ public class TLRPC { ...@@ -10290,7 +10436,7 @@ public class TLRPC {
public static class invokeWithLayer extends TLObject { public static class invokeWithLayer extends TLObject {
public static int constructor = 0xda9b0d0d; public static int constructor = 0xda9b0d0d;
public int layer = 19; public int layer = 20;
public TLObject query; public TLObject query;
public void serializeToStream(AbsSerializedData stream) { public void serializeToStream(AbsSerializedData stream) {
...@@ -10406,6 +10552,45 @@ public class TLRPC { ...@@ -10406,6 +10552,45 @@ public class TLRPC {
} }
} }
public static class TL_decryptedMessageActionCommitKey extends DecryptedMessageAction {
public static int constructor = 0xec2e0b9b;
public void readParams(AbsSerializedData stream) {
exchange_id = stream.readInt64();
key_fingerprint = stream.readInt64();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_decryptedMessageActionAbortKey extends DecryptedMessageAction {
public static int constructor = 0xdd05ec6b;
public void readParams(AbsSerializedData stream) {
exchange_id = stream.readInt64();
}
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
}
}
public static class TL_decryptedMessageActionNoop extends DecryptedMessageAction {
public static int constructor = 0xa82fdd63;
public void serializeToStream(AbsSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_decryptedMessageActionScreenshotMessages extends DecryptedMessageAction { public static class TL_decryptedMessageActionScreenshotMessages extends DecryptedMessageAction {
public static int constructor = 0x8ac1f475; public static int constructor = 0x8ac1f475;
......
...@@ -13,7 +13,6 @@ import android.content.SharedPreferences; ...@@ -13,7 +13,6 @@ import android.content.SharedPreferences;
import android.util.Base64; import android.util.Base64;
import org.telegram.android.MessagesStorage; import org.telegram.android.MessagesStorage;
import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
......
...@@ -28,8 +28,6 @@ import net.hockeyapp.android.CrashManager; ...@@ -28,8 +28,6 @@ import net.hockeyapp.android.CrashManager;
import net.hockeyapp.android.CrashManagerListener; import net.hockeyapp.android.CrashManagerListener;
import net.hockeyapp.android.UpdateManager; import net.hockeyapp.android.UpdateManager;
import org.telegram.ui.ApplicationLoader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
......
...@@ -55,6 +55,7 @@ public class ActionBarMenuItem extends ImageView { ...@@ -55,6 +55,7 @@ public class ActionBarMenuItem extends ImageView {
private Runnable showMenuRunnable; private Runnable showMenuRunnable;
private boolean showFromBottom; private boolean showFromBottom;
private int menuHeight = AndroidUtilities.dp(16); private int menuHeight = AndroidUtilities.dp(16);
private boolean needOffset = Build.VERSION.SDK_INT >= 21;
public ActionBarMenuItem(Context context, ActionBarMenu menu, int background) { public ActionBarMenuItem(Context context, ActionBarMenu menu, int background) {
super(context); super(context);
...@@ -135,6 +136,10 @@ public class ActionBarMenuItem extends ImageView { ...@@ -135,6 +136,10 @@ public class ActionBarMenuItem extends ImageView {
showFromBottom = value; showFromBottom = value;
} }
public void setNeedOffset(boolean value) {
needOffset = Build.VERSION.SDK_INT >= 21 && value;
}
public TextView addSubItem(int id, String text, int icon) { public TextView addSubItem(int id, String text, int icon) {
if (popupLayout == null) { if (popupLayout == null) {
rect = new Rect(); rect = new Rect();
...@@ -247,29 +252,33 @@ public class ActionBarMenuItem extends ImageView { ...@@ -247,29 +252,33 @@ public class ActionBarMenuItem extends ImageView {
popupWindow.setFocusable(true); popupWindow.setFocusable(true);
if (popupLayout.getMeasuredWidth() == 0) { if (popupLayout.getMeasuredWidth() == 0) {
if (showFromBottom) { if (showFromBottom) {
popupWindow.showAsDropDown(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getBottomOffsetY()); popupWindow.showAsDropDown(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getOffsetY());
popupWindow.update(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getBottomOffsetY(), -1, -1); popupWindow.update(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getOffsetY(), -1, -1);
} else { } else {
popupWindow.showAsDropDown(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), -getMeasuredHeight()); popupWindow.showAsDropDown(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), getOffsetY());
popupWindow.update(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), -getMeasuredHeight(), -1, -1); popupWindow.update(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), getOffsetY(), -1, -1);
} }
} else { } else {
if (showFromBottom) { if (showFromBottom) {
popupWindow.showAsDropDown(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getBottomOffsetY()); popupWindow.showAsDropDown(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getOffsetY());
} else { } else {
popupWindow.showAsDropDown(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), -getMeasuredHeight()); popupWindow.showAsDropDown(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), getOffsetY());
} }
} }
} }
private int getBottomOffsetY() { private int getOffsetY() {
getLocationOnScreen(location); if (showFromBottom) {
int diff = location[1] - AndroidUtilities.statusBarHeight + getMeasuredHeight() - menuHeight; getLocationOnScreen(location);
int y = AndroidUtilities.dp(8) - menuHeight; int diff = location[1] - AndroidUtilities.statusBarHeight + getMeasuredHeight() - menuHeight;
if (diff < 0) { int y = AndroidUtilities.dp(8) - menuHeight;
y -= diff; if (diff < 0) {
y -= diff;
}
return y - (needOffset ? AndroidUtilities.statusBarHeight : 0);
} else {
return -getMeasuredHeight() - (needOffset ? AndroidUtilities.statusBarHeight : 0);
} }
return y;
} }
public boolean toggleSearch() { public boolean toggleSearch() {
...@@ -415,9 +424,9 @@ public class ActionBarMenuItem extends ImageView { ...@@ -415,9 +424,9 @@ public class ActionBarMenuItem extends ImageView {
super.onLayout(changed, left, top, right, bottom); super.onLayout(changed, left, top, right, bottom);
if (popupWindow != null && popupWindow.isShowing()) { if (popupWindow != null && popupWindow.isShowing()) {
if (showFromBottom) { if (showFromBottom) {
popupWindow.update(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getBottomOffsetY(), -1, -1); popupWindow.update(this, -popupLayout.getMeasuredWidth() + getMeasuredWidth() + AndroidUtilities.dp(14), getOffsetY(), -1, -1);
} else { } else {
popupWindow.update(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), -getMeasuredHeight(), -1, -1); popupWindow.update(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), getOffsetY(), -1, -1);
} }
} }
} }
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
package org.telegram.ui.ActionBar; package org.telegram.ui.ActionBar;
import android.content.Context; import android.content.Context;
import android.os.Build;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.ViewTreeObserver; import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.PopupWindow; import android.widget.PopupWindow;
...@@ -23,6 +25,7 @@ import org.telegram.messenger.FileLog; ...@@ -23,6 +25,7 @@ import org.telegram.messenger.FileLog;
import java.lang.reflect.Field; import java.lang.reflect.Field;
public class ActionBarPopupWindow extends PopupWindow { public class ActionBarPopupWindow extends PopupWindow {
private static final Field superListenerField; private static final Field superListenerField;
static { static {
Field f = null; Field f = null;
...@@ -132,6 +135,15 @@ public class ActionBarPopupWindow extends PopupWindow { ...@@ -132,6 +135,15 @@ public class ActionBarPopupWindow extends PopupWindow {
mSuperScrollListener = null; mSuperScrollListener = null;
} }
} }
if (Build.VERSION.SDK_INT >= 21) {
try {
Field field = PopupWindow.class.getDeclaredField("mWindowLayoutType");
field.setAccessible(true);
field.set(this, WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
} catch (Exception e) {
/* ignored */
}
}
} }
private void unregisterListener() { private void unregisterListener() {
......
...@@ -15,7 +15,7 @@ import android.view.ViewGroup; ...@@ -15,7 +15,7 @@ import android.view.ViewGroup;
import org.telegram.android.AndroidUtilities; import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController; import org.telegram.android.LocaleController;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.ApplicationLoader; import org.telegram.messenger.ApplicationLoader;
import org.telegram.ui.Cells.DividerCell; import org.telegram.ui.Cells.DividerCell;
import org.telegram.ui.Cells.LetterSectionCell; import org.telegram.ui.Cells.LetterSectionCell;
import org.telegram.ui.Cells.TextSettingsCell; import org.telegram.ui.Cells.TextSettingsCell;
......
...@@ -31,7 +31,7 @@ import org.telegram.messenger.R; ...@@ -31,7 +31,7 @@ import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.ui.PhotoViewer; import org.telegram.ui.PhotoViewer;
import org.telegram.ui.Views.AvatarDrawable; import org.telegram.ui.Components.AvatarDrawable;
public class ChatActionCell extends BaseCell { public class ChatActionCell extends BaseCell {
......
...@@ -25,9 +25,9 @@ import org.telegram.android.MessagesController; ...@@ -25,9 +25,9 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.android.MessageObject; import org.telegram.android.MessageObject;
import org.telegram.android.ImageReceiver; import org.telegram.android.ImageReceiver;
import org.telegram.ui.Views.AvatarDrawable; import org.telegram.ui.Components.AvatarDrawable;
import org.telegram.ui.Views.ProgressView; import org.telegram.ui.Components.ProgressView;
import org.telegram.ui.Views.SeekBar; import org.telegram.ui.Components.SeekBar;
import java.io.File; import java.io.File;
......
...@@ -28,7 +28,7 @@ import org.telegram.android.MessagesController; ...@@ -28,7 +28,7 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.android.MessageObject; import org.telegram.android.MessageObject;
import org.telegram.android.ImageReceiver; import org.telegram.android.ImageReceiver;
import org.telegram.ui.Views.AvatarDrawable; import org.telegram.ui.Components.AvatarDrawable;
public class ChatBaseCell extends BaseCell { public class ChatBaseCell extends BaseCell {
...@@ -482,7 +482,7 @@ public class ChatBaseCell extends BaseCell { ...@@ -482,7 +482,7 @@ public class ChatBaseCell extends BaseCell {
if (drawName && nameLayout != null) { if (drawName && nameLayout != null) {
canvas.save(); canvas.save();
canvas.translate(currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19) - nameOffsetX, AndroidUtilities.dp(10)); canvas.translate(currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19) - nameOffsetX, AndroidUtilities.dp(10));
namePaint.setColor(AvatarDrawable.getColorForId(currentUser.id)); namePaint.setColor(AvatarDrawable.getNameColorForId(currentUser.id));
nameLayout.draw(canvas); nameLayout.draw(canvas);
canvas.restore(); canvas.restore();
} }
......
...@@ -28,7 +28,7 @@ import org.telegram.android.MessagesController; ...@@ -28,7 +28,7 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.ui.Views.AvatarDrawable; import org.telegram.ui.Components.AvatarDrawable;
public class ChatContactCell extends ChatBaseCell { public class ChatContactCell extends ChatBaseCell {
......
...@@ -147,10 +147,10 @@ public class ChatMessageCell extends ChatBaseCell { ...@@ -147,10 +147,10 @@ public class ChatMessageCell extends ChatBaseCell {
} }
} else { } else {
if (isChat && !messageObject.isOut()) { if (isChat && !messageObject.isOut()) {
maxWidth = AndroidUtilities.displaySize.x - AndroidUtilities.dp(122); maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
drawName = true; drawName = true;
} else { } else {
maxWidth = AndroidUtilities.displaySize.x - AndroidUtilities.dp(80); maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
drawName = false; drawName = false;
} }
} }
......
...@@ -30,7 +30,7 @@ import org.telegram.android.MessagesController; ...@@ -30,7 +30,7 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.android.ImageReceiver; import org.telegram.android.ImageReceiver;
import org.telegram.ui.Views.AvatarDrawable; import org.telegram.ui.Components.AvatarDrawable;
public class DialogCell extends BaseCell { public class DialogCell extends BaseCell {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment