-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 增加 未激活时重启APP - 适配 Android SDK 32 - 升级 Android SDK为32 - 修复 无法读取扩展列表 - 优化 增加歌词左右位置 - 优化 隐藏图标时去除间隔 - 优化 代码 --- - Added restart APP when inactive - Adapt to Android SDK 32 - Upgrade Android SDK to 32 - Fixed unable to read the extension list - Optimized to increase the left and right position of lyrics - Optimized to remove the interval when hiding icons - Optimize the code
- Loading branch information
Showing
15 changed files
with
226 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
app/src/main/java/miui/statusbar/lyric/config/IconConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
package miui.statusbar.lyric.config; | ||
|
||
import android.annotation.SuppressLint; | ||
import android.content.SharedPreferences; | ||
import de.robv.android.xposed.XSharedPreferences; | ||
import miui.statusbar.lyric.utils.ConfigUtils; | ||
|
||
@SuppressLint("LongLogTag") | ||
public class IconConfig { | ||
private static final String KuGou = "UklGRmwCAABXRUJQVlA4WAoAAAAQAAAAHwAAHwAAQUxQSCACAAABP+SgbSRJOqdmH/6U745DROTHN8wEJcz/Mk3ndE7u3Hvgkg1ZXq67WLkYxfL4baNwgsQAEmzbNu3oxLZtm1Wx7ZQrtm07q99X76cHEf1n4LZtnBjemaTG6uwR4kBC9ejc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Ra4k/b/leZRbbTaPQfzr5QBnt3gqJn4Yxfr4ntAcFTkmfYprNXDiy+FoEb2G4D"; | ||
private static final String QQMusic = "UklGRrgBAABXRUJQVlA4WAoAAAAQAAAAHwAAHwAAQUxQSGsBAAABv+OwbRvBzZVy7tGIiJ/UK6S60rrOC6a7KPl8pkrt/yZlkkh1Vtsz9S424wz1AIi2bRtbdq7fRv79Z9u2bdvc7z/uvefWG0T0fwIgjrS3trS0tkcAIBuGrXv0ieY94K3ewjVN6eMMOlkpy1H/cX0x3+cBnC9cFk2S5Fx5VW0I+jWSk4IpqusQjlKdMnRT32rKUT+iCf0a7ot1wzRXKwc0DyiFGxReAEhRGgXyzxT3AJuiOXg+KT+C61PENMYsGG2i/Ay4smibsuAQOizW120eS7D7P1xEXHZnxyjGRK9/cImyL8mJxc/5bPNxAu2S9UHRqgP6K8FEQvCZgTkpaCy4MTVBumV4d2DcsAFxwjAJBH90XTLc6OoAjOgiFqeaJajnmjaZ71t5qNAEvpUFWT/VNPQphQ0S76uSgjl6S5KNpsg9yY8aSItWSXLFq/jHSPKgFJbxQ5I/3N/nD8nDOP7Q27vzTpLv24MxCAEAVlA4ICYAAADQAgCdASogACAAP/3+/3+/uzayKAgD8D+JaQAAPaOgAP7lagAAAA=="; | ||
private static final String MiGu = "UklGRqwAAABXRUJQVlA4TJ8AAAAvIMAHEHdgIG2b+De97Tcx//OvIG0Dpnv+dc7FKoA86CDwPwiHACGSJMlN6/87BEFQBEEQDMVIDMFhRIpGUCR2ZuUPQET/J0B/GHiBcQokwQRoxE14E3ALnU8A3uEKZUCZoLQo4lQ8OlrHhTqaVJ8QBpTY6ImCpSCP+TABiQp7DjlGTei/Ky9YEuosNN7TXNWeK++7rxTvmtyEJ17N/L8A"; | ||
private static final String Myplayer = "UklGRqwBAABXRUJQVlA4TJ8BAAAvH8AHEP+ioG0bxuUPehfE/M+/47aRHGkj3fzf5mx3FYUESaTpDRw1QAB/ADwIgsUAAih8obgAC1gAwB8FAAQAMIA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ygG+AXMlQyFw9HwbAAAAAElFTkSuQmCC"; | ||
ConfigUtils config; | ||
|
||
public IconConfig(XSharedPreferences xSharedPreferences) { | ||
config = new ConfigUtils(xSharedPreferences); | ||
} | ||
|
||
public String getIcon(String str) { | ||
String icon; | ||
switch (str) { | ||
case "KuGou": | ||
icon = getKuGou(); | ||
break; | ||
case "KuWo": | ||
icon = getKuWo(); | ||
break; | ||
case "Netease": | ||
icon = getNetease(); | ||
break; | ||
case "QQMusic": | ||
icon = getQQMusic(); | ||
break; | ||
case "MiGu": | ||
icon = getMiGu(); | ||
break; | ||
case "Myplayer": | ||
icon = getMyplayer(); | ||
break; | ||
default: | ||
icon = getDefault(); | ||
break; | ||
} | ||
return icon; | ||
} | ||
|
||
|
||
public void update() { | ||
config.update(); | ||
} | ||
|
||
|
||
private String getKuGou() { | ||
return config.optString("KuGou", KuGou); | ||
} | ||
|
||
public void setKuGou(String str) { | ||
config.put("KuGou", str); | ||
} | ||
|
||
|
||
private String getKuWo() { | ||
return config.optString("KuWo", KuWo); | ||
} | ||
|
||
public void setKuWo(String str) { | ||
config.put("KuWo", str); | ||
} | ||
|
||
|
||
private String getNetease() { | ||
return config.optString("Netease", Netease); | ||
} | ||
|
||
public void setNetease(String str) { | ||
config.put("Netease", str); | ||
} | ||
|
||
|
||
private String getQQMusic() { | ||
return config.optString("QQMusic", QQMusic); | ||
} | ||
|
||
public void setQQMusic(String str) { | ||
config.put("QQMusic", str); | ||
} | ||
|
||
|
||
private String getMiGu() { | ||
return config.optString("MiGu", MiGu); | ||
} | ||
|
||
public void setMiGu(String str) { | ||
config.put("MiGu", str); | ||
} | ||
|
||
|
||
private String getMyplayer() { | ||
return config.optString("Myplayer", Myplayer); | ||
} | ||
|
||
public void setMyplayer(String str) { | ||
config.put("Myplayer", str); | ||
} | ||
|
||
private String getDefault() { | ||
return config.optString("Default", Default); | ||
} | ||
|
||
public void setDefault(String str) { | ||
config.put("Default", str); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.