From f147e7cfbf867f0213018f42ef685c6473ce1004 Mon Sep 17 00:00:00 2001 From: Neko Qiqi Date: Tue, 26 Mar 2024 22:48:28 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9APush=20message=20format=20from=20gi?= =?UTF-8?q?thub=20to=20telegram=20channel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 14 ++++---------- .github/workflows/android_pr.yml | 7 ++++--- .../hyperceiler/ui/fragment/MainFragment.java | 12 ++++-------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1e8e1500d2..42e42ccb00 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -67,11 +67,6 @@ jobs: name: HyperCeiler Canary path: ${{ env.APK_FILE_CANARY }} - - name: Commit - run: | - text="${{ github.event.sha }} ${{ github.event.head_commit.message }}" - echo "commit=$(echo $text | sed 's/\([][\\`.*^$\/+?{}()=!|:-]\)/\\\1/g')" >> $GITHUB_ENV - - name: Post to Canary Channel if: ${{ github.ref == 'refs/heads/main' && github.ref_type != 'tag' && contains(github.event.head_commit.message, '[skip post]') == false && contains(github.event.head_commit.message, 's#') == false }} shell: bash @@ -80,11 +75,10 @@ jobs: BOT_TOKEN: ${{ secrets.BOT_TOKEN }} CANARY: ${{ env.APK_FILE_CANARY }} COMMIT_MESSAGE: |+ - **New push to github\!** - - `${{ env.commit }}` - - by ${{ github.event.head_commit.author.name }} + New push to GitHub Action + ``` + ${{ github.event.head_commit.message }} + ```by `${{ github.event.head_commit.author.name }}` See commit detail [here](${{ github.event.head_commit.url }}) run: | ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))') diff --git a/.github/workflows/android_pr.yml b/.github/workflows/android_pr.yml index 281dcdea0a..d1a6787592 100644 --- a/.github/workflows/android_pr.yml +++ b/.github/workflows/android_pr.yml @@ -56,9 +56,10 @@ jobs: GROUP_DEBUG_ID: ${{ secrets.GROUP_DEBUG_ID }} BOT_TOKEN: ${{ secrets.BOT_TOKEN }} DEBUG: ${{ env.APK_FILE_DEBUG }} - COMMIT_MESSAGE: |+ - **New PR to gitHub\!** - by ${{ github.triggering_actor }} + COMMIT_MESSAGE: |+ + New push to GitHub Action + by `${{ github.triggering_actor }}` + See commit detail [here](${{ github.event.head_commit.url }}) run: | ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))') cd ${{ github.workspace }} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/MainFragment.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/MainFragment.java index 80383ec163..0dbf5e20cd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/MainFragment.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/MainFragment.java @@ -26,13 +26,11 @@ import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isAndroidVersion; import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion; -import android.content.Intent; import android.content.res.Resources; import android.content.res.XmlResourceParser; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.text.SpannableString; import android.view.View; import androidx.annotation.NonNull; @@ -45,11 +43,9 @@ import com.sevtinge.hyperceiler.R; import com.sevtinge.hyperceiler.prefs.PreferenceHeader; -import com.sevtinge.hyperceiler.prefs.RecommendPreference; import com.sevtinge.hyperceiler.prefs.TipsPreference; import com.sevtinge.hyperceiler.ui.MainActivityContextHelper; import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment; -import com.sevtinge.hyperceiler.ui.fragment.helper.CantSeeAppsFragment; import com.sevtinge.hyperceiler.ui.fragment.helper.HomepageEntrance; import com.sevtinge.hyperceiler.utils.PackagesUtils; import com.sevtinge.hyperceiler.utils.ThreadPoolManager; @@ -193,10 +189,10 @@ public void isOfficialRom() { public boolean getIsOfficialRom() { return ( !getBaseOs().startsWith("V") && - !getBaseOs().startsWith("Xiaomi") && - !getBaseOs().startsWith("Redmi") && - !getBaseOs().startsWith("POCO") && - !getBaseOs().isEmpty() + !getBaseOs().startsWith("Xiaomi") && + !getBaseOs().startsWith("Redmi") && + !getBaseOs().startsWith("POCO") && + !getBaseOs().isEmpty() ) || !getRomAuthor().isEmpty() || Objects.equals(SystemSDKKt.getHost(), "xiaomi.eu") ||