Skip to content

Commit

Permalink
update to 9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xaxtix committed Sep 21, 2022
1 parent 11edd5e commit e9a35ce
Show file tree
Hide file tree
Showing 82 changed files with 3,153 additions and 731 deletions.
37 changes: 36 additions & 1 deletion TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,33 @@ android {
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "String", "APP_CENTER_HASH", "\"\""
buildConfigField "boolean", "DEBUG_VERSION", "true"
buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
}

HA {
HA_private {
debuggable false
jniDebuggable false
minifyEnabled true
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "String", "APP_CENTER_HASH", "\"" + getProps("APP_CENTER_HASH_PRIVATE") + "\""
buildConfigField "boolean", "DEBUG_VERSION", "true"
buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "true"
}

HA_public {
debuggable false
jniDebuggable false
minifyEnabled true
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "String", "APP_CENTER_HASH", "\"" + getProps("APP_CENTER_HASH_PUBLIC") + "\""
buildConfigField "boolean", "DEBUG_VERSION", "true"
buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
}

standalone {
Expand All @@ -118,6 +136,9 @@ android {
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "String", "APP_CENTER_HASH", "\"\""
buildConfigField "boolean", "DEBUG_VERSION", "false"
buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
}

release {
Expand All @@ -128,8 +149,22 @@ android {
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "String", "APP_CENTER_HASH", "\"\""
buildConfigField "boolean", "DEBUG_VERSION", "false"
buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
}
}
}


def getProps(String propName) {
def propsFile = rootProject.file('local.properties')
if (propsFile.exists()) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
return props[propName]
} else {
return "";
}
}
apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.PowerManager;
import android.os.SystemClock;
Expand Down Expand Up @@ -474,6 +475,40 @@ public static void recycleBitmaps(ArrayList<Bitmap> bitmapToRecycle) {
}
}

public static void googleVoiceClientService_performAction(Intent intent, boolean isVerified, Bundle options) {
if (!isVerified) {
return;
}
AndroidUtilities.runOnUIThread(() -> {
try {
int currentAccount = UserConfig.selectedAccount;
ApplicationLoader.postInitApplication();
if (AndroidUtilities.needShowPasscode() || SharedConfig.isWaitingForPasscodeEnter) {
return;
}
String text = intent.getStringExtra("android.intent.extra.TEXT");
if (!TextUtils.isEmpty(text)) {
String contactUri = intent.getStringExtra("com.google.android.voicesearch.extra.RECIPIENT_CONTACT_URI");
String id = intent.getStringExtra("com.google.android.voicesearch.extra.RECIPIENT_CONTACT_CHAT_ID");
long uid = Long.parseLong(id);
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(uid);
if (user == null) {
user = MessagesStorage.getInstance(currentAccount).getUserSync(uid);
if (user != null) {
MessagesController.getInstance(currentAccount).putUser(user, true);
}
}
if (user != null) {
ContactsController.getInstance(currentAccount).markAsContacted(contactUri);
SendMessagesHelper.getInstance(currentAccount).sendMessage(text, user.id, null, null, null, true, null, null, null, true, 0, null, false);
}
}
} catch (Exception e) {
FileLog.e(e);
}
});
}

private static class LinkSpec {
String url;
int start;
Expand Down Expand Up @@ -2528,18 +2563,8 @@ public static void shakeViewSpring(View view, float shiftDp, Runnable endCallbac
}
}*/

public static void startAppCenter(Activity context) {

}

private static long lastUpdateCheckTime;

public static void checkForUpdates() {

}

public static void appCenterLog(Throwable e) {

ApplicationLoader.appCenterLog(e);
}

public static boolean shouldShowClipboardToast() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,4 +523,29 @@ public static boolean isNetworkOnline() {
}
return result;
}

public static void startAppCenter(Activity context) {
applicationLoaderInstance.startAppCenterInternal(context);
}

public static void checkForUpdates() {
applicationLoaderInstance.checkForUpdatesInternal();
}

public static void appCenterLog(Throwable e) {
applicationLoaderInstance.appCenterLogInternal(e);
}

protected void appCenterLogInternal(Throwable e) {

}

protected void checkForUpdatesInternal() {

}

protected void startAppCenterInternal(Activity context) {

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@

public class BuildVars {

public static boolean DEBUG_VERSION = true;
public static boolean LOGS_ENABLED = true;
public static boolean DEBUG_PRIVATE_VERSION = false;
public static boolean DEBUG_VERSION = BuildConfig.DEBUG_VERSION;
public static boolean LOGS_ENABLED = BuildConfig.DEBUG_VERSION;
public static boolean DEBUG_PRIVATE_VERSION = BuildConfig.DEBUG_PRIVATE_VERSION;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static int BUILD_VERSION = 2800;
public static String BUILD_VERSION_STRING = "9.0.1";
public static int BUILD_VERSION = 2808;
public static String BUILD_VERSION_STRING = "9.0.2";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
public static String APPCENTER_HASH = "f9726602-67c9-48d2-b5d0-4761f1c1a8f3";

public static String SMS_HASH = isStandaloneApp() ? "w0lkcmTZkKh" : (DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT");
public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=org.telegram.messenger";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface FileLoaderDelegate {
public static final int IMAGE_TYPE_SVG_WHITE = 4;
public static final int IMAGE_TYPE_THEME_PREVIEW = 5;

private final FileLoaderPriorityQueue largeFilesQueue = new FileLoaderPriorityQueue("large files queue", 1);
private final FileLoaderPriorityQueue largeFilesQueue = new FileLoaderPriorityQueue("large files queue", 2);
private final FileLoaderPriorityQueue filesQueue = new FileLoaderPriorityQueue("files queue", 3);
private final FileLoaderPriorityQueue imagesQueue = new FileLoaderPriorityQueue("imagesQueue queue", 6);
private final FileLoaderPriorityQueue audioQueue = new FileLoaderPriorityQueue("audioQueue queue", 3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.Log;
import android.view.View;

import androidx.annotation.Keep;

import org.telegram.tgnet.TLObject;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.AnimatedEmojiDrawable;
import org.telegram.ui.Components.AnimatedFileDrawable;
import org.telegram.ui.Components.LoadingStickerDrawable;
import org.telegram.ui.Components.RLottieDrawable;
Expand Down Expand Up @@ -711,6 +708,10 @@ public int getOrientation() {

public void setLayerNum(int value) {
currentLayerNum = value;
if (attachedToWindow) {
currentOpenedLayerFlags = NotificationCenter.getGlobalInstance().getCurrentHeavyOperationFlags();
currentOpenedLayerFlags &= ~currentLayerNum;
}
}

public void setImageBitmap(Bitmap bitmap) {
Expand Down
Loading

0 comments on commit e9a35ce

Please sign in to comment.