refactor(download): 重构下载模块代码格式和逻辑实现

- 格式化 ChildHandleDialog 类代码缩进和空行
- 优化 ChildHandleDialog 中的 onClick 方法使用 if-else 替代 switch
- 格式化 M3U8LiveDLoadActivity 类代码缩进和空行
- 优化 M3U8LiveDLoadActivity 中的菜单点击事件处理逻辑
- 格式化 M3U8VodDLoadActivity 类代码缩进和空行
- 添加必要的 import 语句和空行分隔
- 统一代码风格和提高可读性
This commit is contained in:
2026-07-25 19:02:09 +08:00
parent 8b74586403
commit 31cee5b0f5
28 changed files with 2109 additions and 1941 deletions

View File

@@ -1,57 +1,76 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace "com.lyy.frame"
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug{
debuggable true
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
dataBinding true
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dataBinding {
enabled = true
}
lintOptions {
abortOnError false
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
api "androidx.appcompat:appcompat:${rootProject.ext.XAppcompatVersion}"
api 'com.google.code.gson:gson:2.8.2'
api 'io.reactivex:rxandroid:1.2.0'
api 'io.reactivex:rxjava:1.1.5'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
implementation 'androidx.multidex:multidex:2.0.1'
api fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
api 'androidx.lifecycle:lifecycle-runtime:2.0.0'
api 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
api "androidx.appcompat:appcompat:${rootProject.ext.XAppcompatVersion}"
api 'com.google.code.gson:gson:2.8.2'
api 'io.reactivex:rxandroid:1.2.0'
api 'io.reactivex:rxjava:1.1.5'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
implementation 'androidx.multidex:multidex:2.0.1'
api 'androidx.lifecycle:lifecycle-runtime:2.0.0'
api 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
}