├── .github └── workflows │ └── android.yml ├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── java │ ├── cn │ │ └── zhaiyifan │ │ │ └── lyric │ │ │ ├── Constants.java │ │ │ ├── LyricUtils.java │ │ │ └── model │ │ │ └── Lyric.java │ ├── com │ │ └── android │ │ │ └── settingslib │ │ │ ├── utils │ │ │ └── BuildCompatUtils.java │ │ │ └── widget │ │ │ ├── MainSwitchBar.java │ │ │ ├── MainSwitchPreference.java │ │ │ └── OnMainSwitchChangeListener.java │ └── statusbar │ │ └── finder │ │ ├── CSLyricHelper.java │ │ ├── LrcGetter.kt │ │ ├── app │ │ ├── App.kt │ │ ├── LyricsActivity.kt │ │ ├── LyricsAdapter.kt │ │ ├── MusicListenerService.java │ │ ├── SettingsActivity.kt │ │ ├── broadcast │ │ │ └── LyricsBroadcastReceiver.kt │ │ └── event │ │ │ ├── AppsListChanged.kt │ │ │ ├── LyricSentenceUpdate.kt │ │ │ ├── LyricsChange.kt │ │ │ └── LyricsResultChange.kt │ │ ├── config │ │ └── Config.kt │ │ ├── data │ │ ├── db │ │ │ └── DatabaseHelper.kt │ │ ├── model │ │ │ ├── DataOrigin.kt │ │ │ ├── LyricItem.kt │ │ │ ├── LyricResult.kt │ │ │ └── MediaInfo.kt │ │ └── repository │ │ │ ├── ActiveRepository.kt │ │ │ ├── AliasRepository.kt │ │ │ ├── LyricRepository.kt │ │ │ ├── OriginRepository.kt │ │ │ └── ResRepository.kt │ │ ├── hook │ │ ├── BaseHook.kt │ │ ├── MainHook.kt │ │ ├── app │ │ │ └── SystemUI.kt │ │ ├── broadcast │ │ │ └── LyricRequestBroadcastReceiver.kt │ │ ├── helper │ │ │ └── MediaSessionManagerHelper.kt │ │ └── tool │ │ │ ├── EventTool.kt │ │ │ └── Tool.kt │ │ ├── misc │ │ └── Constants.java │ │ ├── modifier │ │ ├── AliasModifier.kt │ │ ├── HiraganaModifier.kt │ │ ├── KatakanaModifier.kt │ │ ├── Modifier.kt │ │ ├── OriginalModifier.kt │ │ ├── RemoveParenthesesModifier.kt │ │ └── SimplifiedModifier.kt │ │ ├── preferences │ │ ├── PackageListAdapter.java │ │ └── PackageListPreference.java │ │ ├── provider │ │ ├── ILrcProvider.java │ │ ├── KugouProvider.java │ │ ├── MusixMatchProvider.java │ │ ├── NeteaseProvider.java │ │ └── QQMusicProvider.java │ │ └── utils │ │ ├── CheckLanguageUtil.java │ │ ├── HttpRequestUtil.kt │ │ ├── LyricSearchUtil.java │ │ └── UnicodeUtil.java │ ├── res │ ├── color-night-v31 │ │ └── settingslib_switch_track_on.xml │ ├── color-v31 │ │ ├── settingslib_surface_light.xml │ │ ├── settingslib_switch_thumb_color.xml │ │ ├── settingslib_switch_track_color.xml │ │ └── settingslib_switch_track_off.xml │ ├── drawable-v24 │ │ ├── ic_add.xml │ │ ├── ic_launcher_foreground.xml │ │ └── ic_statusbar_icon.xml │ ├── drawable-v31 │ │ ├── settingslib_progress_horizontal.xml │ │ ├── settingslib_switch_bar_bg_disabled.xml │ │ ├── settingslib_switch_bar_bg_off.xml │ │ ├── settingslib_switch_bar_bg_on.xml │ │ ├── settingslib_switch_thumb.xml │ │ └── settingslib_switch_track.xml │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ └── ic_music.xml │ ├── layout-v31 │ │ ├── collapsing_toolbar_base_layout.xml │ │ └── settingslib_main_switch_bar.xml │ ├── layout │ │ ├── applist_preference_icon.xml │ │ ├── collapsing_toolbar_base_layout.xml │ │ ├── item_lyric.xml │ │ ├── lrcview.xml │ │ ├── settingslib_dropdown_preference.xml │ │ ├── settingslib_icon_frame.xml │ │ ├── settingslib_main_switch_bar.xml │ │ ├── settingslib_main_switch_layout.xml │ │ └── settingslib_preference.xml │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ ├── values-night-v31 │ │ ├── colors.xml │ │ └── themes.xml │ ├── values-night │ │ └── colors.xml │ ├── values-sw600dp │ │ └── dmiens.xml │ ├── values-sw720dp-land │ │ └── dmiens.xml │ ├── values-sw720dp │ │ └── dmiens.xml │ ├── values-v31 │ │ ├── colors.xml │ │ ├── config.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── style_preference.xml │ │ ├── styles.xml │ │ └── themes.xml │ ├── values-zh-rCN │ │ └── strings.xml │ ├── values-zh-rTW │ │ └── strings.xml │ ├── values │ │ ├── arrays.xml │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── themes.xml │ └── xml │ │ ├── network_security_config.xml │ │ └── root_preferences.xml │ └── sqldelight │ └── statusbar │ └── finder │ ├── active.sq │ ├── alias.sq │ ├── origin.sq │ └── res.sq ├── build.gradle ├── docs ├── README_zh-CN.md └── README_zh-TW.md ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── icon.svg ├── img ├── how2use.jpg ├── notificationAccess.jpg └── statusTrue.jpg └── settings.gradle /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: set up JDK 21 17 | uses: actions/setup-java@v3 18 | with: 19 | java-version: '21' 20 | distribution: 'temurin' 21 | cache: gradle 22 | 23 | - name: Grant execute permission for gradlew 24 | run: chmod +x gradlew 25 | 26 | # - name: Run Lint 27 | # run: ./gradlew updateLintBaseline 28 | # 29 | # - name: Upload lint-baseline.xml 30 | # uses: actions/upload-artifact@v3 31 | # with: 32 | # name: lint-baseline.xml 33 | # path: ./app/lint-baseline.xml 34 | 35 | - name: Build with Gradle 36 | run: | 37 | ./gradlew assembleDebug 38 | 39 | - name: Upload Debug APK 40 | uses: actions/upload-artifact@v4 41 | with: 42 | name: app 43 | path: ./app/build/outputs/apk/* 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | lint-baseline.xml 12 | /.ssh 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LyricsGetterExt 2 | 3 |
Lyrics Getter · Ext
6 | 7 | ( English / [简体中文](https://github.com/VictorModi/LyricsGetterExt/blob/main/docs/README_zh-CN.md) / [繁體中文](https://github.com/VictorModi/LyricsGetterExt/blob/main/docs/README_zh-TW.md) ) 8 |This still should try using BuildCompat.isAtLeastR() as source of truth, but also checking 31 | * for VERSION_SDK_INT and VERSION.CODENAME in case when BuildCompat implementation returned 32 | * false. Note that both checks should be >= and not = to make sure that when Android version 33 | * increases (i.e., from R to S), this does not stop working. 34 | * 35 | *
Supported configurations: 36 | * 37 | *
Note that Build.VERSION_CODES.S cannot be used here until final SDK is available, because
45 | * it is equal to Build.VERSION_CODES.CUR_DEVELOPMENT before API finalization.
46 | *
47 | * @return Whether the current OS version is higher or equal to S.
48 | */
49 | public static boolean isAtLeastS() {
50 | if (VERSION.SDK_INT < 30) {
51 | return false;
52 | }
53 |
54 | return (VERSION.CODENAME.equals("REL") && VERSION.SDK_INT >= 31)
55 | || (VERSION.CODENAME.length() == 1
56 | && VERSION.CODENAME.compareTo("S") >= 0
57 | && VERSION.CODENAME.compareTo("Z") <= 0);
58 | }
59 |
60 | private BuildCompatUtils() {}
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/android/settingslib/widget/MainSwitchPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.settingslib.widget;
18 |
19 | import android.content.Context;
20 | import android.content.res.TypedArray;
21 | import android.util.AttributeSet;
22 | import android.widget.Switch;
23 | import androidx.preference.PreferenceViewHolder;
24 | import androidx.preference.TwoStatePreference;
25 | import statusbar.finder.R;
26 |
27 | import java.util.ArrayList;
28 | import java.util.List;
29 |
30 | /**
31 | * MainSwitchPreference is a Preference with a customized Switch.
32 | * This component is used as the main switch of the page
33 | * to enable or disable the prefereces on the page.
34 | */
35 | public class MainSwitchPreference extends TwoStatePreference implements OnMainSwitchChangeListener {
36 |
37 | private final List LyricsGetter · 扩展 LyricsGetter · 擴充
5 |
28 |
34 |
40 |
6 |
30 |
36 |
42 |