Skip to content

Commit

Permalink
upstream: bump version to v10.14.3
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <[email protected]>
  • Loading branch information
qwq233 committed Jul 3, 2024
2 parents 7b8bff9 a982429 commit dc2fb1a
Show file tree
Hide file tree
Showing 71 changed files with 2,189 additions and 1,436 deletions.
2 changes: 1 addition & 1 deletion TMessagesProj/jni/gifvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 840,7 @@ enum PARAM_NUM {
PARAM_NUM_COUNT = 11,
};

extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileDrawable_getVideoInfo(JNIEnv *env, jclass clazz,jint sdkVersion, jstring src, jintArray data) {
extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileDrawable_getVideoInfo(JNIEnv *env, jclass clazz, jint sdkVersion, jstring src, jintArray data) {
VideoInfo *info = new VideoInfo();

char const *srcString = env->GetStringUTFChars(src, 0);
Expand Down
13 changes: 13 additions & 0 deletions TMessagesProj/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 122,19 @@
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="ton"/>
</intent>

<package android:name="com.android.chrome" />
<package android:name="org.mozilla.firefox" />
<package android:name="com.microsoft.emmx" />
<package android:name="com.opera.browser" />
<package android:name="com.opera.mini.native" />
<package android:name="com.brave.browser" />
<package android:name="com.duckduckgo.mobile.android" />
<package android:name="com.sec.android.app.sbrowser" />
<package android:name="com.vivaldi.browser" />
<package android:name="com.kiwibrowser.browser" />
<package android:name="com.UCMobile.intl" />
<package android:name="org.torproject.torbrowser" />
</queries>

<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 1844,7 @@ public String getValue(boolean format) {
calendar.set(Calendar.YEAR, Utilities.parseInt(date[0]));
calendar.set(Calendar.MONTH, Utilities.parseInt(date[1]) - 1);
calendar.set(Calendar.DAY_OF_MONTH, Utilities.parseInt(date[2]));
return LocaleController.getInstance().formatterYearMax.format(calendar.getTime());
return LocaleController.getInstance().getFormatterYearMax().format(calendar.getTime());
}
}
}
Expand Down Expand Up @@ -5924,17 5924,41 @@ public static boolean isWebAppLink(String url) {
case "http":
case "https": {
if (path.isEmpty()) return false;
ArrayList<String> segments = new ArrayList<>(uri.getPathSegments());
if (segments.size() > 0 && segments.get(0).equals("s")) {
segments.remove(0);
}
if (segments.size() > 0) {
if (segments.size() >= 3 && "s".equals(segments.get(1))) {
return false;
} else if (segments.size() > 1) {
return !TextUtils.isEmpty(segments.get(1));
} else if (segments.size() == 1) {
return !TextUtils.isEmpty(uri.getQueryParameter("startapp"));
String host = uri.getHost().toLowerCase();
Matcher prefixMatcher = LaunchActivity.PREFIX_T_ME_PATTERN.matcher(host);
boolean isPrefix = prefixMatcher.find();
if (host.equals("telegram.me") || host.equals("t.me") || host.equals("telegram.dog") || isPrefix) {
ArrayList<String> segments = new ArrayList<>(uri.getPathSegments());
if (segments.size() > 0 && segments.get(0).equals("s")) {
segments.remove(0);
}
if (segments.size() > 0) {
if (segments.size() >= 3 && "s".equals(segments.get(1))) {
return false;
} else if (segments.size() > 1) {
final String segment = segments.get(1);
if (TextUtils.isEmpty(segment)) return false;
switch (segment) {
case "joinchat":
case "login":
case "addstickers":
case "addemoji":
case "msg":
case "share":
case "confirmphone":
case "setlanguage":
case "addtheme":
case "boost":
case "c":
case "contact":
case "folder":
case "addlist":
return false;
}
return true;
} else if (segments.size() == 1) {
return !TextUtils.isEmpty(uri.getQueryParameter("startapp"));
}
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 31,8 @@ public class BuildVars {
public static boolean LOGS_ENABLED = true;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static final int BUILD_VERSION = 4911;
public static final String BUILD_VERSION_STRING = "10.14.2";
public static final int BUILD_VERSION = 4927;
public static final String BUILD_VERSION_STRING = "10.14.3";
public static final int APP_ID = 19797609;
public static final String APP_HASH = "e8f1567dbbf38944a1391c4d23c34b60";
public static final String APPCENTER_HASH = "PLACEHOLDER";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,48 390,50 @@ public String getInviteText(int contacts) {
}

public void checkAppAccount() {
AccountManager am = AccountManager.get(ApplicationLoader.applicationContext);
try {
Account[] accounts = am.getAccountsByType("top.qwq2333.nullgram");
systemAccount = null;
for (int a = 0; a < accounts.length; a ) {
Account acc = accounts[a];
boolean found = false;
for (int b = 0; b < UserConfig.MAX_ACCOUNT_COUNT; b ) {
TLRPC.User user = UserConfig.getInstance(b).getCurrentUser();
if (user != null && !PasscodeHelper.isAccountHidden(b)) {
if (acc.name.equals("" user.id)) {
if (b == currentAccount) {
systemAccount = acc;
systemAccount = null;
Utilities.globalQueue.postRunnable(() -> {
AccountManager am = AccountManager.get(ApplicationLoader.applicationContext);
try {
Account[] accounts = am.getAccountsByType("top.qwq2333.nullgram");
for (int a = 0; a < accounts.length; a ) {
Account acc = accounts[a];
boolean found = false;
for (int b = 0; b < UserConfig.MAX_ACCOUNT_COUNT; b ) {
TLRPC.User user = UserConfig.getInstance(b).getCurrentUser();
if (user != null) {
if (acc.name.equals("" user.id)) {
if (b == currentAccount) {
systemAccount = acc;
}
found = true;
break;
}
found = true;
break;
}
}
}
if (!found) {
try {
am.removeAccount(accounts[a], null, null);
} catch (Exception ignore) {
if (!found) {
try {
am.removeAccount(accounts[a], null, null);
} catch (Exception ignore) {

}
}

}
} catch (Throwable ignore) {

}
} catch (Throwable ignore) {

}
if (getUserConfig().isClientActivated()) {
readContacts();
if (systemAccount == null && !PasscodeHelper.isAccountHidden(currentAccount) ) {
try {
systemAccount = new Account("" getUserConfig().getClientUserId(), "top.qwq2333.nullgram");
am.addAccountExplicitly(systemAccount, "", null);
} catch (Exception ignore) {
if (getUserConfig().isClientActivated()) {
readContacts();
if (systemAccount == null) {
try {
systemAccount = new Account("" getUserConfig().getClientUserId(), "top.qwq2333.nullgram");
am.addAccountExplicitly(systemAccount, "", null);
} catch (Exception ignore) {

}
}
}
}
});
}

public void deleteUnknownAppAccounts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 1113,11 @@ public void run() {
if ((isAnimatedAvatar(cacheImage.filter) || AUTOPLAY_FILTER.equals(cacheImage.filter)) && !(cacheImage.imageLocation.document instanceof TLRPC.TL_documentEncrypted) && !precache) {
TLRPC.Document document = cacheImage.imageLocation.document instanceof TLRPC.Document ? cacheImage.imageLocation.document : null;
long size = document != null ? cacheImage.size : cacheImage.imageLocation.currentSize;
fileDrawable = new AnimatedFileDrawable(cacheImage.finalFilePath, fistFrame, notCreateStream ? 0 : size, cacheImage.priority, notCreateStream ? null : document, document == null && !notCreateStream ? cacheImage.imageLocation : null, cacheImage.parentObject, seekTo, cacheImage.currentAccount, false, cacheOptions);
int cacheType = document != null ? 1 : 0;
if (cacheImage.cacheType > 1) {
cacheType = cacheImage.cacheType;
}
fileDrawable = new AnimatedFileDrawable(cacheImage.finalFilePath, fistFrame, notCreateStream ? 0 : size, cacheImage.priority, notCreateStream ? null : document, document == null && !notCreateStream ? cacheImage.imageLocation : null, cacheImage.parentObject, seekTo, cacheImage.currentAccount, false, 0, 0, cacheOptions, cacheType);
fileDrawable.setIsWebmSticker(MessageObject.isWebM(document) || MessageObject.isVideoSticker(document) || isAnimatedAvatar(cacheImage.filter));
} else {

Expand Down
Loading

0 comments on commit dc2fb1a

Please sign in to comment.