chore: 清理项目并规范化

- 删除重复的 XMBOX-Release 目录(与 apk/ 目录功能重复)
- 删除临时清理脚本和无关工具文件(bfg.jar, cleaner.bat)
- 从 Git 中移除本地配置文件(gradle.properties.local)
- 删除空的 local-repo 目录和 .DS_Store 文件
- 更新项目名称:rootProject.name 从 'TV' 改为 'XMBOX'
- 更新通知渠道名称从 'TV' 改为 'XMBOX'
- 更新关于对话框文本,移除 GitHub 链接
- 更新 .gitignore,添加更多忽略规则
- 从 settings.gradle 中注释掉未使用的 chaquo 模块
This commit is contained in:
您的名字
2025-11-09 18:22:19 +08:00
parent 3441bbc8f0
commit a0888f7930
24 changed files with 31 additions and 149 deletions
@@ -131,6 +131,8 @@ public class App extends Application {
OkHttp.get().setDoh(Doh.objectFrom(Setting.getDoh()));
EventBus.builder().addIndex(new EventIndex()).installDefaultEventBus();
CaocConfig.Builder.create().backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT).errorActivity(CrashActivity.class).apply();
// Ensure default notification channel exists for foreground playback service (TV flavor too)
Notify.createChannel();
// 初始化自动缓存清理
initCacheCleaner();
@@ -4,6 +4,7 @@ import android.Manifest;
import android.app.Notification;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
@@ -40,7 +41,7 @@ public class Notify {
public static void createChannel() {
NotificationManagerCompat notifyMgr = NotificationManagerCompat.from(App.get());
notifyMgr.createNotificationChannel(new NotificationChannelCompat.Builder(DEFAULT, NotificationManagerCompat.IMPORTANCE_LOW).setName("TV").build());
notifyMgr.createNotificationChannel(new NotificationChannelCompat.Builder(DEFAULT, NotificationManagerCompat.IMPORTANCE_LOW).setName("XMBOX").build());
}
public static String getError(int resId, Throwable e) {
@@ -49,7 +50,7 @@ public class Notify {
}
public static void show(Notification notification) {
if (ActivityCompat.checkSelfPermission(App.get(), Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) return;
if (Build.VERSION.SDK_INT >= 33 && ActivityCompat.checkSelfPermission(App.get(), Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) return;
NotificationManagerCompat.from(App.get()).notify(ID, notification);
}
+1 -1
View File
@@ -25,7 +25,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="本项目仅用于学习Android开发,代码改自FongMi/TV (https://github.com/FongMi/TV)。"
android:text="本项目仅用于学习Android开发,代码改自FongMi/TV项目。"
android:textColor="@color/white"
android:textSize="14sp"
android:layout_marginTop="8dp" />