From 97382a23c7e2608cb63a3f55b05d3b0c49ee4422 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 14 Jan 2024 19:55:30 +0800 Subject: [PATCH 1/3] fix: ci sdkmanager install Co-authored-by: KimmyXYC <69386744+KimmyXYC@users.noreply.github.com> --- .github/workflows/debug.yml | 16 ++++++++-------- .github/workflows/release.yml | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 590f4e6ba9..dd4a771b24 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -46,7 +46,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -79,7 +79,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -139,7 +139,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Fix BoringSSL @@ -176,7 +176,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Install Golang @@ -211,7 +211,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Install Rust @@ -244,7 +244,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -271,7 +271,7 @@ jobs: uses: android-actions/setup-android@v2 - name: Install NDK run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Fetch Status @@ -355,7 +355,7 @@ jobs: # uses: android-actions/setup-android@v2 # - name: Install NDK # run: | -# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null # echo "sdk.dir=${ANDROID_HOME}" > local.properties # echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties # - name: Fetch Status diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17e160014e..bf8785366f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -82,7 +82,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -142,7 +142,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Fix BoringSSL @@ -179,7 +179,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Install Golang @@ -214,7 +214,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Install Rust @@ -247,7 +247,7 @@ jobs: - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Native Build @@ -275,7 +275,7 @@ jobs: uses: android-actions/setup-android@v2 - name: Install NDK run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null + echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - name: Fetch Status From 0df858ae15571e3afe01c211e789f0bef8c21c4d Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 14 Jan 2024 20:01:33 +0800 Subject: [PATCH 2/3] chore: remove some premium suggestions Co-authored-by: tehcneko --- .../java/org/telegram/ui/DialogsActivity.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java index df215164d9..3d460d132e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java @@ -5437,28 +5437,28 @@ private int getMaxScrollYOffset() { } public boolean isPremiumRestoreHintVisible() { - if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { - return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium(); - } +// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { +// return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium(); +// } return false; } public boolean isPremiumChristmasHintVisible() { - if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { - return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_CHRISTMAS"); - } +// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { +// return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_CHRISTMAS"); +// } return false; } public boolean isPremiumHintVisible() { - if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { - if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) { - if (UserConfig.getInstance(currentAccount).isPremium() ? !BuildVars.useInvoiceBilling() && MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(true) != null : MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false) != null) { - isPremiumHintUpgrade = MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE"); - return true; - } - } - } +// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) { +// if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) { +// if (UserConfig.getInstance(currentAccount).isPremium() ? !BuildVars.useInvoiceBilling() && MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(true) != null : MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false) != null) { +// isPremiumHintUpgrade = MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE"); +// return true; +// } +// } +// } return false; } From 4eae3e215532b31ad9452c3281130071e259f5ea Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 14 Jan 2024 19:29:33 +0800 Subject: [PATCH 3/3] fix: wrapCanvasToFixClipping for vivo --- .../main/java/org/telegram/ui/Components/EditTextEffects.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextEffects.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextEffects.java index 6ca6dbd110..2407f9fbd6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextEffects.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextEffects.java @@ -282,7 +282,8 @@ public static boolean allowHackingTextCanvas() { Build.MANUFACTURER == null || !Build.MANUFACTURER.toLowerCase().contains("honor") && !Build.MANUFACTURER.toLowerCase().contains("huawei") && - !Build.MANUFACTURER.toLowerCase().contains("alps") + !Build.MANUFACTURER.toLowerCase().contains("alps") && + !Build.MANUFACTURER.toLowerCase().contains("vivo") ) && ( Build.MODEL == null || !Build.MODEL.toLowerCase().contains("mediapad")