├── .gitee
└── ISSUE_TEMPLATE.zh-CN.md
├── .gitignore
├── .idea
├── .gitignore
├── assetWizardSettings.xml
├── compiler.xml
├── deploymentTargetDropDown.xml
├── gradle.xml
├── misc.xml
└── vcs.xml
├── PS
├── bk.9.jpg
├── bk.jpg
├── bk.psd
├── bk_circle.png
├── bk_circle.psd
└── captcha.psd
├── app
├── .gitignore
├── build.gradle
├── libs
│ └── fetch.jar
├── proguard-rules.pro
├── release
│ └── output-metadata.json
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── ecsoft
│ │ └── cloudreve
│ │ └── ExampleInstrumentedTest.java
│ ├── debug
│ ├── ic_app_launcher-playstore.png
│ └── res
│ │ ├── drawable
│ │ └── ic_app_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_app_launcher.xml
│ │ └── ic_app_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_app_launcher.png
│ │ ├── ic_app_launcher_foreground.png
│ │ └── ic_app_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_app_launcher.png
│ │ ├── ic_app_launcher_foreground.png
│ │ └── ic_app_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_app_launcher.png
│ │ ├── ic_app_launcher_foreground.png
│ │ └── ic_app_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_app_launcher.png
│ │ ├── ic_app_launcher_foreground.png
│ │ └── ic_app_launcher_round.png
│ │ └── mipmap-xxxhdpi
│ │ ├── ic_app_launcher.png
│ │ ├── ic_app_launcher_foreground.png
│ │ └── ic_app_launcher_round.png
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── audio.html
│ │ ├── data.db
│ │ ├── image.html
│ │ ├── task.db
│ │ ├── video.html
│ │ └── x5.tbs
│ ├── java
│ │ └── com
│ │ │ └── ecsoft
│ │ │ └── cloudreve
│ │ │ ├── AboutMeActivity.java
│ │ │ ├── AuthenticationLoginActivity.java
│ │ │ ├── BuildActivity.java
│ │ │ ├── DownloadTaskManageActivity.java
│ │ │ ├── FileInfoActivity.java
│ │ │ ├── ForgetPasswordActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MultiMediaPreviewActivity.java
│ │ │ ├── NetworkSettingActivity.java
│ │ │ ├── OfficePreviewActivity.java
│ │ │ ├── OpenScreenActivity.java
│ │ │ ├── RegisterActivity.java
│ │ │ ├── SettingsInfoActivity.java
│ │ │ ├── TBSViewActivity.java
│ │ │ ├── UploadActivity.java
│ │ │ ├── WelcomeActivity.java
│ │ │ ├── config
│ │ │ └── GlobalRunningConfiguration.java
│ │ │ ├── database
│ │ │ ├── CopyDBUtils.java
│ │ │ └── DbSettingsService.java
│ │ │ ├── download
│ │ │ └── entity
│ │ │ │ ├── DownloadTaskPO.java
│ │ │ │ └── DownloadTasks.java
│ │ │ ├── network
│ │ │ ├── CheckNetworkConnection.java
│ │ │ ├── config
│ │ │ │ ├── NetworkTrafficRouter.java
│ │ │ │ └── NetworkTrafficUrlBuilder.java
│ │ │ └── util
│ │ │ │ ├── HttpDownListener.java
│ │ │ │ └── OKHTTPUtil.java
│ │ │ ├── preview
│ │ │ └── MultiMediaPreviewWebHtmlUtil.java
│ │ │ ├── service
│ │ │ └── DownloadService.java
│ │ │ ├── storage
│ │ │ ├── FileNameUtil.java
│ │ │ ├── FileStorageUtil.java
│ │ │ └── entity
│ │ │ │ └── FileSizePO.java
│ │ │ ├── system
│ │ │ ├── ClipboardUtil.java
│ │ │ └── UriUtil.java
│ │ │ ├── time
│ │ │ ├── GreetWordUtil.java
│ │ │ ├── TimeFormatUtil.java
│ │ │ └── TimeUtils.java
│ │ │ └── ui
│ │ │ ├── fileType
│ │ │ └── FileTypeJudgeUtil.java
│ │ │ └── recyclerView
│ │ │ ├── adapter
│ │ │ ├── DownloadTaskAdapter.java
│ │ │ ├── FileTreeAdapter.java
│ │ │ └── SystemSettingsAdapter.java
│ │ │ └── entity
│ │ │ ├── FileTreePO.java
│ │ │ └── SystemSettingPO.java
│ └── res
│ │ ├── anim
│ │ ├── user_info_dialog_in.xml
│ │ └── user_info_dialog_out.xml
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── bk.jpg
│ │ ├── bk_circle.png
│ │ ├── captcha.jpg
│ │ ├── cloudreve.xml
│ │ ├── ic_bk_user_info_topper.xml
│ │ ├── ic_dialog_icon_action_create_dir.xml
│ │ ├── ic_dialog_icon_rename.xml
│ │ ├── ic_donation_qr_code.png
│ │ ├── ic_ic_icon_folder.xml
│ │ ├── ic_icon_about.xml
│ │ ├── ic_icon_action_create_dir.xml
│ │ ├── ic_icon_action_upload.xml
│ │ ├── ic_icon_back.xml
│ │ ├── ic_icon_back_last_dir.xml
│ │ ├── ic_icon_coffee.xml
│ │ ├── ic_icon_delete.xml
│ │ ├── ic_icon_dialog_construction.xml
│ │ ├── ic_icon_dialog_warning.xml
│ │ ├── ic_icon_download.xml
│ │ ├── ic_icon_email.xml
│ │ ├── ic_icon_file_audio.xml
│ │ ├── ic_icon_file_doc.xml
│ │ ├── ic_icon_file_image.xml
│ │ ├── ic_icon_file_tree_file.xml
│ │ ├── ic_icon_file_tree_folder.xml
│ │ ├── ic_icon_file_upload.xml
│ │ ├── ic_icon_file_video.xml
│ │ ├── ic_icon_key.xml
│ │ ├── ic_icon_office_preview_error.png
│ │ ├── ic_icon_preview.xml
│ │ ├── ic_icon_rename.xml
│ │ ├── ic_icon_right.xml
│ │ ├── ic_icon_settings.xml
│ │ ├── ic_icon_settings_create_time.xml
│ │ ├── ic_icon_settings_group.xml
│ │ ├── ic_icon_settings_network.xml
│ │ ├── ic_icon_settings_nickname.xml
│ │ ├── ic_icon_settings_uid.xml
│ │ ├── ic_icon_share.xml
│ │ ├── ic_icon_user_icon.xml
│ │ ├── ic_iconlogo.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_net_dir.xml
│ │ ├── ic_net_error.xml
│ │ ├── ic_net_gif.xml
│ │ ├── ic_net_jpg.xml
│ │ ├── ic_net_mov.xml
│ │ ├── ic_net_mp4.xml
│ │ ├── ic_net_pdf.xml
│ │ ├── ic_net_png.xml
│ │ ├── ic_net_ppt.xml
│ │ ├── ic_net_psd.xml
│ │ ├── ic_net_rar.xml
│ │ ├── ic_net_success.xml
│ │ ├── ic_net_svg.xml
│ │ ├── ic_net_txt.xml
│ │ ├── ic_net_unkonow.xml
│ │ ├── ic_net_video.xml
│ │ ├── ic_net_warnning.xml
│ │ ├── ic_net_word.xml
│ │ ├── ic_net_xlsx.xml
│ │ ├── ic_net_zip.xml
│ │ ├── ic_png_icon_cloudreve.png
│ │ ├── layer_list_progressbar_memory_space.xml
│ │ ├── shape_bk_donation.xml
│ │ ├── shape_bk_download_count.xml
│ │ ├── shape_bk_general_color.xml
│ │ ├── shape_bk_main_card_all.xml
│ │ ├── shape_bk_main_card_audio.xml
│ │ ├── shape_bk_main_card_doc.xml
│ │ ├── shape_bk_main_card_image.xml
│ │ ├── shape_bk_main_card_video.xml
│ │ ├── shape_bk_show_dir_all.xml
│ │ ├── shape_bk_show_dir_audio.xml
│ │ ├── shape_bk_show_dir_doc.xml
│ │ ├── shape_bk_show_dir_image.xml
│ │ ├── shape_bk_show_dir_video.xml
│ │ ├── shape_btn_general.xml
│ │ ├── shape_btn_skip.xml
│ │ ├── shape_btn_welcome_start.xml
│ │ ├── shape_dialog_close_tab.xml
│ │ ├── shape_icon_green_circle.xml
│ │ ├── shape_icon_pp_circle.xml
│ │ ├── shape_icon_red_circle.xml
│ │ ├── shape_icon_theme_color_circle.xml
│ │ ├── shape_small_btn.xml
│ │ ├── shape_small_btn_outline.xml
│ │ └── shape_underline_tab.xml
│ │ ├── layout
│ │ ├── activity_about_me.xml
│ │ ├── activity_authentication_login.xml
│ │ ├── activity_build.xml
│ │ ├── activity_download_task_manage.xml
│ │ ├── activity_file_info.xml
│ │ ├── activity_forget_password.xml
│ │ ├── activity_main.xml
│ │ ├── activity_multi_media_preview.xml
│ │ ├── activity_network_setting.xml
│ │ ├── activity_office_preview.xml
│ │ ├── activity_open_screen.xml
│ │ ├── activity_register.xml
│ │ ├── activity_settings_info.xml
│ │ ├── activity_tbsview.xml
│ │ ├── activity_upload.xml
│ │ ├── activity_welcome.xml
│ │ ├── dialog_create_dir.xml
│ │ ├── dialog_office_preview_error_notice.xml
│ │ ├── dialog_reg_email_auth.xml
│ │ ├── dialog_rename_file.xml
│ │ ├── dialog_share_file.xml
│ │ ├── dialog_user_info.xml
│ │ ├── item_download_task.xml
│ │ ├── item_file_tree_file.xml
│ │ └── item_settings.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values-night
│ │ └── themes.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test
│ └── java
│ └── com
│ └── ecsoft
│ └── cloudreve
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/.gitee/ISSUE_TEMPLATE.zh-CN.md:
--------------------------------------------------------------------------------
1 | ### 该问题是怎么引起的?
2 |
3 |
4 |
5 | ### 重现步骤
6 |
7 |
8 |
9 | ### 报错信息
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build and Release Folders
2 | bin-debug/
3 | bin-release/
4 | [Oo]bj/
5 | [Bb]in/
6 |
7 | # Other files and folders
8 | .settings/
9 |
10 | # Executables
11 | *.swf
12 | *.air
13 | *.ipa
14 | *.apk
15 |
16 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
17 | # should NOT be excluded as they contain compiler settings and other important
18 | # information for Eclipse / Flash Builder.
19 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/PS/bk.9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/bk.9.jpg
--------------------------------------------------------------------------------
/PS/bk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/bk.jpg
--------------------------------------------------------------------------------
/PS/bk.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/bk.psd
--------------------------------------------------------------------------------
/PS/bk_circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/bk_circle.png
--------------------------------------------------------------------------------
/PS/bk_circle.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/bk_circle.psd
--------------------------------------------------------------------------------
/PS/captcha.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/PS/captcha.psd
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 |
6 |
7 | android {
8 | namespace 'com.ecsoft.cloudreve'
9 | compileSdk 32
10 |
11 | defaultConfig {
12 | applicationId "com.ecsoft.cloudreve"
13 | minSdk 26
14 | targetSdk 32
15 | versionCode 1
16 | versionName "1.0"
17 |
18 |
19 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20 | }
21 |
22 | buildTypes {
23 | release {
24 | minifyEnabled false
25 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
26 | }
27 | }
28 | compileOptions {
29 | sourceCompatibility JavaVersion.VERSION_1_8
30 | targetCompatibility JavaVersion.VERSION_1_8
31 | }
32 |
33 | buildTypes {
34 | release {
35 | minifyEnabled true
36 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37 | }
38 | }
39 | }
40 |
41 |
42 | dependencies {
43 |
44 | implementation 'androidx.appcompat:appcompat:1.4.1'
45 | implementation 'com.google.android.material:material:1.5.0'
46 | implementation 'com.datadoghq.okhttp3:okhttp:3.12.15'
47 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
48 | implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
49 | testImplementation 'junit:junit:4.13.2'
50 | androidTestImplementation 'androidx.test.ext:junit:1.1.3'
51 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
52 | implementation 'com.daimajia.easing:library:2.0@aar'
53 | implementation 'com.daimajia.androidanimations:library:2.2@aar'
54 |
55 | implementation 'com.getbase:floatingactionbutton:1.10.1'
56 |
57 | implementation 'com.tencent.tbs:tbssdk:44226'
58 |
59 | // implementation 'com.liulishuo.filedownloader:library:1.7.7'
60 | }
--------------------------------------------------------------------------------
/app/libs/fetch.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/libs/fetch.jar
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | # 腾讯TBS混淆设置
24 | -dontwarn dalvik.**
25 | -dontwarn com.tencent.smtt.**
26 |
27 | -keep class com.tencent.smtt.** {
28 | *;
29 | }
30 |
31 | -keep class com.tencent.tbs.** {
32 | *;
33 | }
34 |
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.ecsoft.cloudreve",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/ecsoft/cloudreve/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.ecsoft.cloudreve", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/debug/ic_app_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/ic_app_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/debug/res/drawable/ic_app_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_app_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_app_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_app_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-hdpi/ic_app_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_app_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-hdpi/ic_app_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_app_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-hdpi/ic_app_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_app_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-mdpi/ic_app_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_app_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-mdpi/ic_app_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_app_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-mdpi/ic_app_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_app_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xhdpi/ic_app_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_app_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xhdpi/ic_app_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_app_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xhdpi/ic_app_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxhdpi/ic_app_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/debug/res/mipmap-xxxhdpi/ic_app_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/assets/audio.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TITLE
8 |
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/assets/data.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/assets/data.db
--------------------------------------------------------------------------------
/app/src/main/assets/image.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TITLE
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/assets/task.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/assets/task.db
--------------------------------------------------------------------------------
/app/src/main/assets/video.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TITLE
8 |
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/assets/x5.tbs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/assets/x5.tbs
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/AboutMeActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.ImageView;
8 |
9 | public class AboutMeActivity extends AppCompatActivity {
10 |
11 | private ImageView ivBack;
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_about_me);
17 | initViewComponent();
18 | initViewEvent();
19 | }
20 |
21 | private void initViewEvent() {
22 | ivBack.setOnClickListener(new View.OnClickListener() {
23 | @Override
24 | public void onClick(View view) {
25 | finish();
26 | }
27 | });
28 | }
29 |
30 | private void initViewComponent() {
31 | ivBack = findViewById(R.id.iv_back);
32 | }
33 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/BuildActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.app.AlertDialog;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 |
12 | import com.ecsoft.cloudreve.config.GlobalRunningConfiguration;
13 | import com.ecsoft.cloudreve.database.CopyDBUtils;
14 | import com.ecsoft.cloudreve.database.DbSettingsService;
15 |
16 | import java.io.File;
17 |
18 | public class BuildActivity extends AppCompatActivity {
19 |
20 | private EditText etServerAddress;
21 | private EditText etServerPort;
22 | private Button btnEnterCloudDisk;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_build);
28 |
29 | initViewComponent();
30 | initViewEvent();
31 | }
32 |
33 | private void initViewEvent() {
34 | btnEnterCloudDisk.setOnClickListener(new View.OnClickListener() {
35 | @Override
36 | public void onClick(View view) {
37 | // 单击事件被触发
38 | String serverAddress = "";
39 | String serverPort = "";
40 | serverAddress = etServerAddress.getText().toString();
41 | serverPort= etServerPort.getText().toString();
42 | if (!serverAddress.equals("") && !serverPort.equals("")){
43 | if (serverAddress.charAt(serverAddress.length() - 1) == '/'){
44 | // 判断输入的地址最后有没有 "/",如:https://baidu.com/ 转为——https://baidu.com
45 | serverAddress = serverAddress.replace("/","");
46 | }
47 |
48 | try {
49 | int serverPortInt = Integer.parseInt(serverPort);
50 | if (!(serverPortInt > 0 && serverPortInt < 65535)){
51 | new AlertDialog.Builder(BuildActivity.this)
52 | .setTitle("错误")
53 | .setMessage("请输入合法的 Cloudreve 服务端端口\n端口 ∈ (0,65535]")
54 | .setPositiveButton("返回填写",null)
55 | .setCancelable(false)
56 | .setIcon(R.drawable.ic_icon_dialog_warning)
57 | .show();
58 | return;
59 | }
60 | } catch (Exception e){
61 | new AlertDialog.Builder(BuildActivity.this)
62 | .setTitle("错误")
63 | .setMessage("请输入合法的 Cloudreve 服务端端口\n端口 ∈ (0,65535]")
64 | .setPositiveButton("返回填写",null)
65 | .setCancelable(false)
66 | .setIcon(R.drawable.ic_icon_dialog_warning)
67 | .show();
68 | return;
69 | }
70 | // 各方面都校验完毕开始创建数据库并写入数据
71 | createDatabase();
72 | // 写出数据
73 | DbSettingsService dbSettingsService = new DbSettingsService(BuildActivity.this);
74 | dbSettingsService.setSettings("network_address",serverAddress);
75 | dbSettingsService.setSettings("network_port",serverPort);
76 | GlobalRunningConfiguration.network_address = serverAddress;
77 | GlobalRunningConfiguration.network_port = serverPort;
78 |
79 | // 载入开屏Activity,结束客户端的搭建
80 | Intent intent = new Intent(BuildActivity.this,OpenScreenActivity.class);
81 | startActivity(intent);
82 | finish();
83 |
84 | } else {
85 | new AlertDialog.Builder(BuildActivity.this)
86 | .setTitle("提示")
87 | .setMessage("请输入完整的地址和端口号,保证客户端正常连接服务器哟~")
88 | .setPositiveButton("返回填写",null)
89 | .setCancelable(false)
90 | .setIcon(R.drawable.ic_icon_dialog_warning)
91 | .show();
92 | }
93 | }
94 | });
95 | }
96 |
97 | private void initViewComponent() {
98 | etServerAddress = findViewById(R.id.et_server_addr);
99 | etServerPort = findViewById(R.id.et_server_port);
100 | btnEnterCloudDisk = findViewById(R.id.btn_enter_your_cloud_disk);
101 | }
102 |
103 | private void createDatabase(){
104 | String fileStr = "/data/data/" + getPackageName() + "/data.db";
105 | File file = new File(fileStr);
106 | if (!file.exists()){ // 数据库文件不存在复制数据库
107 | CopyDBUtils.copyDbFile(BuildActivity.this,"data.db");
108 | Intent intent = new Intent(BuildActivity.this,WelcomeActivity.class);
109 | startActivity(intent);
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/DownloadTaskManageActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 | import androidx.recyclerview.widget.LinearLayoutManager;
6 | import androidx.recyclerview.widget.RecyclerView;
7 |
8 | import android.os.Bundle;
9 | import android.os.Handler;
10 | import android.os.Message;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.widget.ImageView;
14 |
15 | import com.ecsoft.cloudreve.ui.recyclerView.adapter.DownloadTaskAdapter;
16 |
17 | public class DownloadTaskManageActivity extends AppCompatActivity {
18 |
19 | private ImageView ivBack;
20 | private RecyclerView rvDownloadTask;
21 |
22 | private Thread getDownloadThread = new Thread(new Runnable() {
23 | @Override
24 | public void run() {
25 | while (true){
26 |
27 | handler.sendEmptyMessage(HANDLER_GET_UNFINISHED_TASK);
28 |
29 | try {
30 | Thread.sleep(500);
31 | } catch (InterruptedException e) {
32 | e.printStackTrace();
33 | }
34 | }
35 | }
36 | });
37 |
38 | private static final int HANDLER_GET_UNFINISHED_TASK = 0x10001;
39 |
40 | private Handler handler = new Handler(new Handler.Callback() {
41 | @Override
42 | public boolean handleMessage(@NonNull Message message) {
43 | switch (message.what){
44 | case HANDLER_GET_UNFINISHED_TASK:{
45 | DownloadTaskAdapter adapter = new DownloadTaskAdapter(DownloadTaskManageActivity.this);
46 | LinearLayoutManager linearLayoutManager = new LinearLayoutManager(DownloadTaskManageActivity.this);
47 | linearLayoutManager.setOrientation(RecyclerView.VERTICAL);
48 | rvDownloadTask.setLayoutManager(linearLayoutManager);
49 | rvDownloadTask.setAdapter(adapter);
50 | break;
51 | }
52 | }
53 | return false;
54 | }
55 | });
56 |
57 | @Override
58 | protected void onCreate(Bundle savedInstanceState) {
59 | super.onCreate(savedInstanceState);
60 | setContentView(R.layout.activity_download_task_manage);
61 |
62 | if (getSupportActionBar() !=null){
63 | getSupportActionBar().hide();
64 | }
65 |
66 | initViewComponent();
67 | initViewData();
68 | initViewEvent();
69 | }
70 |
71 | private void initViewEvent() {
72 | ivBack.setOnClickListener(new View.OnClickListener() {
73 | @Override
74 | public void onClick(View view) {
75 |
76 | finish();
77 | }
78 | });
79 | }
80 |
81 | private void initViewData() {
82 | // 载入视图
83 | refreshDownloadTask();
84 |
85 | }
86 |
87 | private void initViewComponent() {
88 | ivBack = findViewById(R.id.iv_back);
89 | rvDownloadTask = findViewById(R.id.rv_download_task);
90 | }
91 | public void refreshDownloadTask(){
92 | getDownloadThread.start();
93 | }
94 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/MultiMediaPreviewActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.webkit.WebView;
9 | import android.webkit.WebViewClient;
10 | import android.widget.ImageView;
11 |
12 | import com.ecsoft.cloudreve.preview.MultiMediaPreviewWebHtmlUtil;
13 |
14 | public class MultiMediaPreviewActivity extends AppCompatActivity {
15 |
16 | private WebView wvPreview;
17 | private ImageView ivBack;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_multi_media_preview);
23 |
24 | if (getSupportActionBar() != null) getSupportActionBar().hide();
25 |
26 | initViewComponent();
27 | initViewData();
28 | initViewEvent();
29 | }
30 |
31 | private void initViewEvent() {
32 | ivBack.setOnClickListener(new View.OnClickListener() {
33 | @Override
34 | public void onClick(View view) {
35 | finish();
36 | }
37 | });
38 | }
39 |
40 | private void initViewData() {
41 | Intent intent = getIntent();
42 | String srcUrl = intent.getStringExtra("src");
43 | String multiType = intent.getStringExtra("multiType");
44 | String showHtml = MultiMediaPreviewWebHtmlUtil.readAssetsText(MultiMediaPreviewActivity.this, multiType);
45 | showHtml = showHtml.replace("{THE_APP_SRC_URL}",srcUrl); // 将占位符替换
46 | wvPreview.getSettings().setJavaScriptEnabled(true); // 允许JavaScript代码运行
47 | wvPreview.setWebViewClient(new WebViewClient()); // 设置客户
48 | wvPreview.loadData(showHtml,"text/html","UTF-8"); // 加载多媒体链接
49 |
50 | }
51 |
52 | private void initViewComponent() {
53 | wvPreview = findViewById(R.id.id_wv_preview);
54 | ivBack = findViewById(R.id.iv_back);
55 | }
56 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/OfficePreviewActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AlertDialog;
4 | import androidx.appcompat.app.AppCompatActivity;
5 |
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.webkit.WebView;
11 | import android.webkit.WebViewClient;
12 | import android.widget.Button;
13 | import android.widget.ImageView;
14 |
15 | import java.io.UnsupportedEncodingException;
16 | import java.net.URLEncoder;
17 |
18 | public class OfficePreviewActivity extends AppCompatActivity {
19 |
20 | private WebView wvPreview;
21 |
22 | private Button btnHasErrorNotice;
23 | private ImageView ivBack;
24 |
25 | // https://view.officeapps.live.com/op/view.aspx?src=地址
26 |
27 | @Override
28 | protected void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 | setContentView(R.layout.activity_office_preview);
31 |
32 | if (getSupportActionBar() != null){
33 | getSupportActionBar().hide();
34 | }
35 |
36 | initViewComponent();
37 | initViewData();
38 | initViewEvent();
39 |
40 | }
41 |
42 | private void initViewEvent() {
43 | btnHasErrorNotice.setOnClickListener(new View.OnClickListener() {
44 | @Override
45 | public void onClick(View view) {
46 | View dialog = LayoutInflater.from(OfficePreviewActivity.this)
47 | .inflate(R.layout.dialog_office_preview_error_notice,null);
48 | new AlertDialog.Builder(OfficePreviewActivity.this)
49 | .setView(dialog)
50 | .setTitle("如果您发生了下面的错误:")
51 | .setCancelable(false)
52 | .setPositiveButton("我知道了",null)
53 | .show();
54 | }
55 | });
56 | ivBack.setOnClickListener(new View.OnClickListener() {
57 | @Override
58 | public void onClick(View view) {
59 | finish();
60 | }
61 | });
62 | }
63 |
64 | private void initViewData() {
65 | Intent intent = getIntent();
66 | String srcUrl = "";
67 | try {
68 | srcUrl = URLEncoder.encode(intent.getStringExtra("src"),"UTF-8");
69 | } catch (UnsupportedEncodingException e) {
70 | e.printStackTrace();
71 | }
72 | String webUrl = "https://view.officeapps.live.com/op/view.aspx?src="+srcUrl;
73 | wvPreview.getSettings().setJavaScriptEnabled(true); // 开启JS
74 | wvPreview.setWebViewClient(new WebViewClient());
75 | wvPreview.loadUrl(webUrl);
76 |
77 |
78 | }
79 |
80 | private void initViewComponent() {
81 | wvPreview = findViewById(R.id.id_wv_preview);
82 | ivBack = findViewById(R.id.iv_back);
83 | btnHasErrorNotice = findViewById(R.id.btn_has_error_notice);
84 | }
85 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/TBSViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 |
7 | public class TBSViewActivity extends AppCompatActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_tbsview);
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/WelcomeActivity.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.Button;
9 |
10 | import com.daimajia.androidanimations.library.YoYo;
11 |
12 | public class WelcomeActivity extends AppCompatActivity {
13 |
14 |
15 | private Button btnStartBuild;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_welcome);
21 |
22 | initViewComponent();
23 | initViewEvent();
24 |
25 | }
26 |
27 |
28 | public void initViewComponent(){
29 | btnStartBuild = findViewById(R.id.btn_start_build);
30 | }
31 |
32 | public void initViewEvent(){
33 | btnStartBuild.setOnClickListener(new View.OnClickListener() {
34 | @Override
35 | public void onClick(View view) {
36 | Intent intent = new Intent(WelcomeActivity.this,BuildActivity.class);
37 | startActivity(intent);
38 | finish();
39 | }
40 | });
41 |
42 | }
43 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/config/GlobalRunningConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.config;
2 |
3 | import android.content.Context;
4 |
5 | import com.ecsoft.cloudreve.database.DbSettingsService;
6 |
7 | import java.lang.reflect.Field;
8 |
9 | /**
10 | * 启动是加载的全局设置变量
11 | */
12 | public class GlobalRunningConfiguration {
13 |
14 |
15 | public static String network_address = "http://192.168.0.105";
16 | public static String network_port = "5212";
17 | public static String authentication_email = "";
18 | public static String authentication_cookie_token = "";
19 |
20 |
21 | // 初始化类
22 | public static void init(Context c){
23 | // 把数据库存储的加载到Static RAM
24 | DbSettingsService service = new DbSettingsService(c);
25 | network_address = service.getSettings("network_address");
26 | network_port = service.getSettings("network_port");
27 | authentication_email = service.getSettings("authentication_email");
28 | authentication_cookie_token = service.getSettings("authentication_cookie_token");
29 | }
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/database/CopyDBUtils.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.database;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.File;
6 | import java.io.FileOutputStream;
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 |
10 | public class CopyDBUtils {
11 |
12 | private static InputStream is;
13 | private static FileOutputStream fos;
14 |
15 | public static void copyDbFile(Context context, String dbName) {
16 |
17 | //databases文件夹目录
18 | String path = "/data/data/" + context.getPackageName();
19 |
20 | //后面通过SQLiteDatabase.openDatabas获取数据库
21 | File file = new File(path + "/" + dbName);
22 | try {
23 | //创建文件夹(如果之前没有创建过数据库,data/data/包名/下的databases目录是不存在的)
24 | File dir = new File(path);
25 | if (!dir.exists())
26 | dir.mkdirs();
27 | /*
28 | * mkdir() 与 mkdirs() 的区别
29 | * mkdirs()可以创建多级目录文件
30 | * 比如要在 C:\a\b\ 目录下创建一个文件test.txt (此时不存在文件夹a和b)
31 | * mkdirs()就会先创建文件夹a,文件夹b。最后创建test.txt问价
32 | * 但是mkdir()则创建失败,返回创建结果false
33 | * */
34 | if (file.exists())//删除已经存在的
35 | file.deleteOnExit();
36 | //创建新的文件
37 | if (!file.exists())
38 | file.createNewFile();
39 | // 从assets目录下复制
40 | is = context.getAssets().open(dbName);
41 | fos = new FileOutputStream(file);
42 | int len = 0;
43 | byte[] b = new byte[1024];
44 | while ((len = is.read(b)) != -1) {
45 | fos.write(b, 0, len);
46 | }
47 | fos.flush();
48 | } catch (Exception e) {
49 | e.printStackTrace();
50 | } finally {
51 | try {
52 | if (is != null) is.close();
53 | if (fos != null) fos.close();
54 | } catch (IOException e) {
55 | e.printStackTrace();
56 | }
57 | }
58 |
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/database/DbSettingsService.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.database;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.ContentValues;
5 | import android.content.Context;
6 | import android.database.Cursor;
7 | import android.database.sqlite.SQLiteDatabase;
8 |
9 | /**
10 | * 全局设置持久化数据库服务
11 | */
12 | public class DbSettingsService {
13 | private Context ctx;
14 | private SQLiteDatabase database;
15 |
16 | private SQLiteDatabase getDatabase(Context context){
17 | String path = "/data/data/" + context.getPackageName() + "/data.db";
18 | return SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.OPEN_READWRITE);
19 | }
20 |
21 |
22 | public DbSettingsService(Context ctx) {
23 | this.ctx = ctx;
24 | database = getDatabase(ctx);
25 |
26 | }
27 |
28 | /**
29 | * 获取设置值
30 | * @param key 设置键
31 | * @return 返回设置值
32 | */
33 | @SuppressLint("Recycle")
34 | public String getSettings(String key){
35 | Cursor cursor = database.rawQuery( "select * from settings where `key`=?", new String[]{key});
36 | cursor.moveToFirst();
37 | return cursor.getString(1);
38 | }
39 |
40 | /**
41 | * 设置值
42 | * @param key 键
43 | * @param value 值
44 | */
45 | @SuppressLint("Recycle")
46 | public void setSettings(String key,String value){
47 | ContentValues contentValues = new ContentValues();
48 | contentValues.put("value",value);
49 | database.update("settings",contentValues,"key=?",new String[]{key});
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/download/entity/DownloadTaskPO.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.download.entity;
2 |
3 | import java.io.Serializable;
4 |
5 | public class DownloadTaskPO implements Serializable {
6 | private String fileId;
7 | private long totalSize = 0L;
8 | private long downloadedSize = 0L;
9 | // 为了计算速度添加一个上一次下载
10 | private long lastDownloadedSize = 0L;
11 | private String downloadUrl;
12 | private String fileName;
13 | /**
14 | * 0:停止下载 1:正在下载
15 | */
16 | public int nowStatus = 0;
17 | public String downloadMessage = "未开启";
18 |
19 |
20 |
21 | public DownloadTaskPO(String fileId, long totalSize, long downloadedSize) {
22 | this.fileId = fileId;
23 | this.totalSize = totalSize;
24 | this.downloadedSize = downloadedSize;
25 |
26 | }
27 |
28 | public DownloadTaskPO() {
29 | }
30 |
31 | public long getLastDownloadedSize() {
32 | return lastDownloadedSize;
33 | }
34 |
35 | public void setLastDownloadedSize(long lastDownloadedSize) {
36 | this.lastDownloadedSize = lastDownloadedSize;
37 | }
38 |
39 | public String getDownloadUrl() {
40 | return downloadUrl;
41 | }
42 |
43 | public String getFileName() {
44 | return fileName;
45 | }
46 |
47 | public void setFileName(String fileName) {
48 | this.fileName = fileName;
49 | }
50 |
51 | public void setDownloadUrl(String downloadUrl) {
52 | this.downloadUrl = downloadUrl;
53 | }
54 |
55 | public String getFileId() {
56 | return fileId;
57 | }
58 |
59 | public void setFileId(String fileId) {
60 | this.fileId = fileId;
61 | }
62 |
63 | public long getTotalSize() {
64 | return totalSize;
65 | }
66 |
67 | public void setTotalSize(long totalSize) {
68 | this.totalSize = totalSize;
69 | }
70 |
71 | public long getDownloadedSize() {
72 | return downloadedSize;
73 | }
74 |
75 | public void setDownloadedSize(long downloadedSize) {
76 | this.downloadedSize = downloadedSize;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/download/entity/DownloadTasks.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.download.entity;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class DownloadTasks {
7 | // 定义完成和未完成的下载任务
8 | public static List unfinishedTaskList = new ArrayList<>();
9 | public static List finishedTaskList = new ArrayList<>();
10 |
11 | /**
12 | * 在未完成的任务列表中查询
13 | * @param fileId 文件ID
14 | * @return 返回查询到的实体
15 | */
16 | public static DownloadTaskPO queryUnfinishedList(String fileId){
17 | for (int i=0;i<=unfinishedTaskList.size()-1;i++){
18 | DownloadTaskPO downloadTaskPO = unfinishedTaskList.get(i);
19 | if (downloadTaskPO.getFileId().equals(fileId)) return downloadTaskPO;
20 | }
21 | // 没有搜寻到返回空对象
22 | return null;
23 | }
24 | /**
25 | * 在完成的任务列表中查询
26 | * @param fileId 文件ID
27 | * @return 返回查询到的实体
28 | */
29 | public static DownloadTaskPO queryFinishedList(String fileId){
30 | for (int i=0;i<=finishedTaskList.size()-1;i++){
31 | DownloadTaskPO downloadTaskPO = finishedTaskList.get(i);
32 | if (downloadTaskPO.getFileId().equals(fileId)) return downloadTaskPO;
33 | }
34 | // 没有搜寻到返回空对象
35 | return null;
36 | }
37 | /**
38 | * 在传入的集合中判断是否有相同的元素
39 | * @param taskList 传入的集合
40 | * @param fileId 文件ID
41 | * @return 返回是否有相同的元素
42 | */
43 | public static boolean hasSameTask(List taskList,String fileId){
44 | for (int i=0;i<=taskList.size()-1;i++){
45 | DownloadTaskPO downloadTaskPO = taskList.get(i);
46 | if (downloadTaskPO.getFileId().equals(fileId)) return true;
47 | }
48 | // 没有搜寻到返回空对象
49 | return false;
50 | }
51 | /**
52 | * 添加任务
53 | * @param downloadTaskPO 任务实体对象
54 | */
55 | public static void addTask(DownloadTaskPO downloadTaskPO){
56 | unfinishedTaskList.add(downloadTaskPO);
57 | }
58 |
59 | /**
60 | * 完成任务
61 | * @param fileId 文件ID
62 | */
63 | public static void finishTask(String fileId){
64 | // 遍历循环所有集合
65 | for (int i=0;i<=unfinishedTaskList.size()-1;i++){
66 | DownloadTaskPO downloadTaskPO = unfinishedTaskList.get(i);
67 | if (downloadTaskPO.getFileId().equals(fileId)){
68 | unfinishedTaskList.remove(i); // 从未完成的集合中移除对象
69 | finishedTaskList.add(downloadTaskPO); // 将移除的对象添加到已经完成的集合中
70 | return; // 结束循环的运行
71 | }
72 | }
73 | }
74 |
75 | public static void modifyStatus(String fileId,String statusMsg){
76 | for (int i=0;i<=unfinishedTaskList.size()-1;i++){
77 | DownloadTaskPO downloadTaskPO = unfinishedTaskList.get(i);
78 | if (downloadTaskPO.getFileId().equals(fileId)){
79 | downloadTaskPO.downloadMessage = statusMsg;
80 | unfinishedTaskList.set(i,downloadTaskPO);
81 | return; // 结束循环的运行
82 | }
83 | }
84 | }
85 |
86 | public static void modifyProgress(String fileId,long downloadedSize){
87 | for (int i=0;i<=unfinishedTaskList.size()-1;i++){
88 | DownloadTaskPO downloadTaskPO = unfinishedTaskList.get(i);
89 | if (downloadTaskPO.getFileId().equals(fileId)){
90 | downloadTaskPO.setLastDownloadedSize(downloadTaskPO.getDownloadedSize());
91 | downloadTaskPO.setDownloadedSize(downloadedSize);
92 | unfinishedTaskList.set(i,downloadTaskPO); // 应用修改
93 | }
94 | }
95 | }
96 |
97 | /**
98 | * 移除未完成的列表中的项目
99 | * @param fileId 文件ID
100 | */
101 | public static void removeUnfinishedTask(String fileId){
102 | for (int i=0;i<=unfinishedTaskList.size()-1;i++) {
103 | DownloadTaskPO downloadTaskPO = unfinishedTaskList.get(i);
104 | if (downloadTaskPO.getFileId().equals(fileId)){
105 | unfinishedTaskList.remove(i);
106 | return;
107 | }
108 | }
109 | }
110 | /**
111 | * 清空所有已完成列表
112 | */
113 | public static void clearFinishedTask(){
114 | // 设置为空集
115 | finishedTaskList.clear();
116 | }
117 |
118 | }
119 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/network/CheckNetworkConnection.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.network;
2 |
3 | import com.ecsoft.cloudreve.network.config.NetworkTrafficRouter;
4 | import com.ecsoft.cloudreve.network.config.NetworkTrafficUrlBuilder;
5 | import com.ecsoft.cloudreve.network.util.OKHTTPUtil;
6 |
7 | import java.util.HashMap;
8 | import java.util.Objects;
9 |
10 | /**
11 | * 检测服务器网络连通性
12 | */
13 | public class CheckNetworkConnection {
14 | /**
15 | * 检测网络连通性
16 | * @return 返回连通性
17 | */
18 | public static boolean check(){
19 | // http://192.168.0.107:5212/login 测试地址
20 | try{
21 | String s = OKHTTPUtil.sendGet(NetworkTrafficUrlBuilder.build(NetworkTrafficRouter.network_server_test), new HashMap<>());
22 | if (Objects.equals(s, "")){
23 | // 如果返回空也带表服务器寄
24 | return false;
25 | }
26 | return true;
27 | } catch (Exception e){
28 | // 发生异常服务器寄
29 | return false;
30 | }
31 |
32 | }
33 | public static boolean check(String url){
34 | try{
35 | String s = OKHTTPUtil.sendGet(url, new HashMap<>());
36 | if (Objects.equals(s, "")){
37 | // 如果返回空也带表服务器寄
38 | return false;
39 | }
40 | return true;
41 | } catch (Exception e){
42 | // 发生异常服务器寄
43 | return false;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/network/config/NetworkTrafficRouter.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.network.config;
2 |
3 | /**
4 | * 定义网络地址
5 | */
6 | public class NetworkTrafficRouter {
7 | public static final String network_server_test = "/static/img/favicon.ico";
8 | public static final String network_get_auth_config = "/api/v3/site/config";
9 | public static final String network_get_capture = "/api/v3/site/captcha";
10 | public static final String network_authentication = "/api/v3/user/session";
11 | public static final String network_get_file_tree = "/api/v3/directory";
12 | public static final String network_get_file_download = "/api/v3/file/download"; // PUT METHOD
13 | public static final String network_get_file_delete = "/api/v3/object"; // DELETE METHOD
14 | public static final String network_get_user_config = "/api/v3/site/config";
15 | public static final String network_get_user_storage = "/api/v3/user/storage";
16 | public static final String network_file_tree_filter_video = "/api/v3/file/search/video%2Finternal";
17 | public static final String network_file_tree_filter_image = "/api/v3/file/search/image%2Finternal";
18 | public static final String network_file_tree_filter_audio = "/api/v3/file/search/audio%2Finternal";
19 | public static final String network_file_tree_filter_doc = "/api/v3/file/search/doc%2Finternal";
20 | public static final String network_file_create_dir = "/api/v3/directory"; // PUT METHOD;
21 | public static final String network_share_file = "/api/v3/share";
22 | public static final String network_reg_user = "/api/v3/user";
23 | public static final String network_forget_password = "/api/v3/user/reset";
24 | public static final String network_tell_upload_file = "/api/v3/file/upload"; // PUT METHOD;
25 | public static final String network_upload_file = "/api/v3/file/upload/#{sessionId}/#{chunkIndex}"; // POST METHOD;
26 | public static final String network_rename_file = "/api/v3/object/rename";
27 |
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/network/config/NetworkTrafficUrlBuilder.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.network.config;
2 |
3 | import java.util.Map;
4 | import java.util.Set;
5 |
6 | public class NetworkTrafficUrlBuilder {
7 |
8 | public static String networkUrl = "";
9 |
10 | /**
11 | * 初始化网络信息
12 | * @param baseUrl 网址
13 | * @param basePort 端口
14 | */
15 | public static void init(String baseUrl,String basePort){
16 | // networkUrl = !requireSSL ? "http://" : "https://";
17 | networkUrl += baseUrl + ":" + basePort;
18 | }
19 |
20 | /**
21 | * 构造交通字符串
22 | * @param traffic 路由交通,需要使用 NetworkTrafficRouter 类型获取
23 | * @return 返回构建的字符串
24 | */
25 | public static String build(String traffic){
26 | return networkUrl + traffic;
27 | }
28 |
29 | /**
30 | * 构造带有结构的交通字符串
31 | * @param traffic 路由交通,需要使用 NetworkTrafficRouter 类型获取
32 | * @param params 交通中的占位符列表
33 | * @return 返回构建的字符串
34 | */
35 | public static String build(String traffic, Map params){
36 | Set keySet = params.keySet();
37 | for (String itemKey:keySet){
38 | String paramsPlaceHolder = "#{"+itemKey+"}";
39 | traffic = traffic.replaceAll(paramsPlaceHolder,params.get(itemKey));
40 | }
41 | return networkUrl + traffic;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/network/util/HttpDownListener.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.network.util;
2 |
3 | public interface HttpDownListener {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/preview/MultiMediaPreviewWebHtmlUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.preview;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.IOException;
6 | import java.io.InputStream;
7 | import java.util.Arrays;
8 |
9 | public class MultiMediaPreviewWebHtmlUtil {
10 |
11 |
12 | private static String parseBytesToString(byte[] buf) {
13 | byte[] vsnFileByte = new byte[buf.length];
14 | System.arraycopy(buf, 0, vsnFileByte, 0, buf.length);
15 | return new String(vsnFileByte);
16 | }
17 | //
18 | public static String readAssetsText(Context context, String assetsName){
19 | try {
20 | InputStream is = context.getAssets().open(assetsName);
21 | int allBytesSize = is.available();
22 | byte[] readiedBytes = new byte[allBytesSize];
23 | is.read(readiedBytes);
24 | return parseBytesToString(readiedBytes) ;
25 |
26 | } catch (IOException e) {
27 | e.printStackTrace();
28 | return "";
29 | }
30 | }
31 | public static String readImageHtml(Context context){
32 | return readAssetsText(context,"image.html");
33 | }
34 | public static String readAudioHtml(Context context){
35 | return readAssetsText(context,"audio.html");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/storage/FileNameUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.storage;
2 |
3 | public class FileNameUtil {
4 | /**
5 | * 获取合理文件名称,避免文件名过长
6 | * @param fileName
7 | * @return
8 | */
9 | public static String getReasonableFileName(String fileName){
10 | if (fileName.length() >=16){
11 | // 如果文件名称大于16的话
12 | String fileSuffix = getFileSuffix(fileName);
13 | fileName = fileName.replace(fileSuffix,"");
14 | String substring = fileName.substring(0, 5);
15 | return substring+"..."+fileSuffix;
16 | }
17 | return fileName;
18 | }
19 |
20 | /**
21 | *
22 | * 提取文件的后缀名称
23 | * @param fileName 文件名称可以为全文件路径
24 | * @return
25 | */
26 | private static String getFileSuffix(String fileName){
27 | if(fileName.lastIndexOf(".")==-1){
28 | return "";//文件没有后缀名的情况
29 | }
30 | return fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/storage/FileStorageUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.storage;
2 |
3 | import com.ecsoft.cloudreve.storage.entity.FileSizePO;
4 |
5 | /**
6 | * 文件储蓄工具包
7 | */
8 | public class FileStorageUtil {
9 |
10 | // 定义字节进制
11 | private static String[] storageUtil = {"B","KB","MB","GB","PB"};
12 | /**
13 | * 获取合理的文件大小,以一万为单位交换阀值
14 | * @param byteSize 以字节为单位的文件
15 | * @param startStorageUnit 从什么存储单位开始
16 | * @return 返回文件大小实体类
17 | */
18 | public static FileSizePO getReasonableFileSize(long byteSize, int startStorageUnit){
19 | long formattedFileSize = byteSize; // 赋值操作
20 | // 递归循环结束判定
21 | if (formattedFileSize >= 1024L){ // 文件是否大于一万
22 | // 如果大于执行进位,并递归(套娃)操作
23 | formattedFileSize = formattedFileSize / 1024L; // 进位
24 | return getReasonableFileSize(formattedFileSize,startStorageUnit + 1); // 触发递归循环
25 | } else {
26 | // 文件符合一万大小标准,返回,并且返回上一个内存栈帧(POP StackFrame)
27 | return new FileSizePO(byteSize,storageUtil[startStorageUnit]);
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/storage/entity/FileSizePO.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.storage.entity;
2 |
3 | public class FileSizePO {
4 | private long size;
5 | private String unit;
6 |
7 | public FileSizePO(long size, String unit) {
8 | this.size = size;
9 | this.unit = unit;
10 | }
11 |
12 | public FileSizePO() {
13 | }
14 |
15 | public long getSize() {
16 | return size;
17 | }
18 |
19 | public void setSize(long size) {
20 | this.size = size;
21 | }
22 |
23 | public String getUnit() {
24 | return unit;
25 | }
26 |
27 | public void setUnit(String unit) {
28 | this.unit = unit;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/system/ClipboardUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.system;
2 |
3 | import android.content.ClipboardManager;
4 | import android.content.Context;
5 |
6 | import com.ecsoft.cloudreve.FileInfoActivity;
7 |
8 | public class ClipboardUtil {
9 | public static void copyToSystemClipboard(Context context,String text){
10 | ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
11 | cmb.setText(text);
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/time/GreetWordUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.time;
2 |
3 | import java.util.Date;
4 |
5 | /**
6 | * 问候词工具类
7 | */
8 | public class GreetWordUtil {
9 | public static String getGreetWord(){
10 | Date now = new Date();
11 | int hours = now.getHours();
12 | if (hours >= 9 && hours <= 11){
13 | return "上午好";
14 | } else if (hours >= 12 && hours <= 13){
15 | return "中午好";
16 | } else if (hours >= 13 && hours <= 19){
17 | return "下午好";
18 | } else {
19 | return "晚上好";
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/time/TimeFormatUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.time;
2 |
3 | import java.text.ParseException;
4 | import java.text.SimpleDateFormat;
5 | import java.util.Date;
6 |
7 | /**
8 | * 时间加工格式类
9 | */
10 | public class TimeFormatUtil {
11 | /**
12 | * 将字符串加工为时间对象
13 | * @param time 字符串时间
14 | * @return 返回Date对象
15 | */
16 | public static Date formatTimeByString(String time) throws ParseException {
17 | // Date对象
18 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
19 | Date parse = dateFormat.parse(time);
20 | return parse;
21 | }
22 | /**
23 | * 将字符串加工为时间对象
24 | * @param time 字符串时间
25 | * @return 返回Date对象
26 | */
27 | public static Date formatTimeByStringHasMS(String time) throws ParseException {
28 | // Date对象
29 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ");
30 | Date parse = dateFormat.parse(time);
31 | return parse;
32 | }
33 |
34 | /**
35 | * Date对象到字符串
36 | * @param time Date对象
37 | * @param format 格式化限定字段
38 | * @return 返回格式化字符串
39 | */
40 | public static String dateToString(Date time,String format){
41 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
42 | return simpleDateFormat.format(time);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/time/TimeUtils.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.time;
2 |
3 | public class TimeUtils {
4 |
5 | /**
6 | * Constant that contains the amount of milliseconds in a second
7 | */
8 | static final long ONE_SECOND = 1000L;
9 |
10 | /**
11 | * Converts milliseconds to seconds
12 | * @param timeInMillis
13 | * @return The equivalent time in seconds
14 | */
15 | public static int toSecs(long timeInMillis) {
16 | // Rounding the result to the ceiling, otherwise a
17 | // System.currentTimeInMillis that happens right before a new Element
18 | // instantiation will be seen as 'later' than the actual creation time
19 | return (int)Math.ceil((double)timeInMillis / ONE_SECOND);
20 | }
21 |
22 | /**
23 | * Converts seconds to milliseconds, with a precision of 1 second
24 | * @param timeInSecs the time in seconds
25 | * @return The equivalent time in milliseconds
26 | */
27 | public static long toMillis(int timeInSecs) {
28 | return timeInSecs * ONE_SECOND;
29 | }
30 |
31 | /**
32 | * Converts a long seconds value to an int seconds value and takes into account overflow
33 | * from the downcast by switching to Integer.MAX_VALUE.
34 | * @param seconds Long value
35 | * @return Same int value unless long > Integer.MAX_VALUE in which case MAX_VALUE is returned
36 | */
37 | public static int convertTimeToInt(long seconds) {
38 | if (seconds > Integer.MAX_VALUE) {
39 | return Integer.MAX_VALUE;
40 | } else {
41 | return (int) seconds;
42 | }
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/fileType/FileTypeJudgeUtil.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.fileType;
2 |
3 | import com.ecsoft.cloudreve.R;
4 |
5 | /**
6 | * 根据文件名称后缀判断文件的显示图片
7 | */
8 | public class FileTypeJudgeUtil {
9 |
10 | /**
11 | *
12 | * 提取文件的后缀名称
13 | * @param fileName 文件名称可以为全文件路径
14 | * @return
15 | */
16 | public static String getFileSuffix(String fileName){
17 | if(fileName.lastIndexOf(".")==-1){
18 | return "";//文件没有后缀名的情况
19 | }
20 | return fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
21 | }
22 |
23 | public static int getImageResourceByFileName(String fileName){
24 | String fileSuffix = getFileSuffix(fileName);
25 | fileSuffix = fileSuffix.toLowerCase(); // 全部到小写
26 | switch (fileSuffix){
27 | case ".gif":{
28 | return R.drawable.ic_net_gif;
29 | }
30 | case ".jpg":{
31 | return R.drawable.ic_net_jpg;
32 | }
33 | case ".mov":{
34 | return R.drawable.ic_net_mov;
35 | }
36 | case ".mp4":{
37 | return R.drawable.ic_net_mp4;
38 | }
39 | case ".pdf":{
40 | return R.drawable.ic_net_pdf;
41 | }
42 | case ".png":{
43 | return R.drawable.ic_net_png;
44 | }
45 | case ".ppt":
46 | case ".pptx": {
47 | return R.drawable.ic_net_ppt;
48 | }
49 | case ".psd":{
50 | return R.drawable.ic_net_psd;
51 | }
52 | case ".rar":{
53 | return R.drawable.ic_net_rar;
54 | }
55 | case ".svg":{
56 | return R.drawable.ic_net_svg;
57 | }
58 | case ".txt":{
59 | return R.drawable.ic_net_txt;
60 | }
61 | case ".avi":
62 | case ".flv":
63 | case ".mpeg":
64 | case ".wmv":
65 | case ".asf": {
66 | return R.drawable.ic_net_video;
67 | }
68 | case ".doc":
69 | case ".docx": {
70 | return R.drawable.ic_net_word;
71 | }
72 | case ".xlsx": {
73 | return R.drawable.ic_net_xlsx;
74 | }
75 | case ".zip": {
76 | return R.drawable.ic_net_zip;
77 | }
78 | default:{
79 | // 都没有匹配
80 | return R.drawable.ic_net_unkonow;
81 | }
82 |
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/recyclerView/adapter/DownloadTaskAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.recyclerView.adapter;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Context;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.BaseAdapter;
9 | import android.widget.ImageView;
10 | import android.widget.ProgressBar;
11 | import android.widget.TextView;
12 |
13 | import androidx.annotation.NonNull;
14 | import androidx.recyclerview.widget.RecyclerView;
15 |
16 | import com.ecsoft.cloudreve.R;
17 | import com.ecsoft.cloudreve.download.entity.DownloadTaskPO;
18 | import com.ecsoft.cloudreve.download.entity.DownloadTasks;
19 | import com.ecsoft.cloudreve.storage.FileNameUtil;
20 | import com.ecsoft.cloudreve.storage.FileStorageUtil;
21 | import com.ecsoft.cloudreve.storage.entity.FileSizePO;
22 | import com.ecsoft.cloudreve.ui.fileType.FileTypeJudgeUtil;
23 |
24 | public class DownloadTaskAdapter extends RecyclerView.Adapter {
25 |
26 | private Context context;
27 |
28 | public DownloadTaskAdapter(Context context) {
29 | this.context = context;
30 | }
31 |
32 | @NonNull
33 | @Override
34 | public DownloadTaskViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
35 | // 加载视图
36 | View inflate = LayoutInflater.from(context)
37 | .inflate(R.layout.item_download_task,null);
38 | return new DownloadTaskViewHolder(inflate);
39 | }
40 |
41 | @SuppressLint("SetTextI18n")
42 | @Override
43 | public void onBindViewHolder(@NonNull DownloadTaskViewHolder holder, int position) {
44 | // 执行绑定
45 | DownloadTaskPO task = DownloadTasks.unfinishedTaskList.get(position);
46 | holder.tvDownloadFileName.setText(FileNameUtil.getReasonableFileName(task.getFileName()));
47 | holder.pbDownloadProgress.setMax(100);
48 | holder.pbDownloadProgress.setMin(0);
49 | int downloadProgress = (int) (task.getDownloadedSize()*100/task.getTotalSize());
50 | holder.pbDownloadProgress.setProgress(downloadProgress);
51 | holder.tvDownloadProgress.setText("已完成:"+downloadProgress+"%");
52 | // 计算下载熟读 现在的 - 上一次的 *2
53 | long downloadSpeed = (task.getDownloadedSize() - task.getLastDownloadedSize()) * 2;
54 | FileSizePO reasonableFileSize = FileStorageUtil.getReasonableFileSize(downloadSpeed, 0);
55 | holder.tvDownloadSpeed.setText(reasonableFileSize.getSize()+" "+reasonableFileSize.getUnit()+"/S");
56 | holder.tvDownloadType.setText(task.downloadMessage);
57 | holder.ivFileIcon.setImageResource(FileTypeJudgeUtil.getImageResourceByFileName(task.getFileName()));
58 | }
59 |
60 | @Override
61 | public int getItemCount() {
62 | int a = DownloadTasks.unfinishedTaskList.size();
63 | return DownloadTasks.unfinishedTaskList.size();
64 | }
65 |
66 | class DownloadTaskViewHolder extends RecyclerView.ViewHolder{
67 |
68 | TextView tvDownloadFileName;
69 | TextView tvDownloadType;
70 | ProgressBar pbDownloadProgress;
71 | ImageView ivFileIcon;
72 | TextView tvDownloadProgress;
73 | TextView tvDownloadSpeed;
74 |
75 | public DownloadTaskViewHolder(@NonNull View itemView) {
76 | super(itemView);
77 | // 加载视图组件
78 | tvDownloadFileName = itemView.findViewById(R.id.tv_download_file_name);
79 | tvDownloadType = itemView.findViewById(R.id.tv_download_type);
80 | pbDownloadProgress = itemView.findViewById(R.id.pb_download_progress);
81 | tvDownloadProgress = itemView.findViewById(R.id.tv_download_progress);
82 | ivFileIcon = itemView.findViewById(R.id.iv_file_icon);
83 | tvDownloadSpeed = itemView.findViewById(R.id.tv_download_speed);
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/recyclerView/adapter/FileTreeAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.recyclerView.adapter;
2 |
3 | import android.content.Context;
4 | import android.media.Image;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.BaseAdapter;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import androidx.annotation.NonNull;
13 | import androidx.constraintlayout.widget.ConstraintLayout;
14 | import androidx.recyclerview.widget.RecyclerView;
15 |
16 | import com.ecsoft.cloudreve.R;
17 | import com.ecsoft.cloudreve.ui.fileType.FileTypeJudgeUtil;
18 | import com.ecsoft.cloudreve.ui.recyclerView.entity.FileTreePO;
19 |
20 | import java.util.List;
21 |
22 | public class FileTreeAdapter extends RecyclerView.Adapter {
23 |
24 | private List fileTreePOData; // 数据源
25 | private Context context; // 上下文对象
26 | private OnFileClickListener onFileClickListener;
27 |
28 | public void setOnFileClickListener(OnFileClickListener onFileClickListener) {
29 | this.onFileClickListener = onFileClickListener;
30 | }
31 |
32 | public FileTreeAdapter(List fileTreePOData, Context context) {
33 | this.fileTreePOData = fileTreePOData;
34 | this.context = context;
35 | }
36 |
37 | @NonNull
38 | @Override
39 | public FileTreeViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
40 | // 获取视图解析器
41 | LayoutInflater inflater = LayoutInflater.from(context);
42 | View inflatedView = inflater.inflate(R.layout.item_file_tree_file, null); // 获取到解析的视图
43 | return new FileTreeViewHolder(inflatedView);
44 | }
45 |
46 | @Override
47 | public void onBindViewHolder(@NonNull FileTreeViewHolder holder, int position) {
48 | // 在其中一个单项目被绑定的时候触发
49 | // 获取当前需要绑定到RV的数据源
50 | FileTreePO fileTreePO = fileTreePOData.get(position);
51 | // 判断当前FileTree的类型是文件夹还是文件
52 | if (!fileTreePO.getType().equals("file")){
53 | holder.ivTreeType.setImageResource(R.drawable.ic_net_dir);
54 | } else {
55 | holder.ivTreeType.setImageResource(FileTypeJudgeUtil.getImageResourceByFileName(fileTreePO.getName()));
56 | }
57 | // holder.ivTreeType.setImageResource(fileTreePO.getType().equals("file") ? R.drawable.ic_net_unkonow : R.drawable.ic_net_dir);
58 | // 修改名称
59 | holder.tvTreeName.setText(fileTreePO.getName());
60 | // 为根视图绑定单击事件
61 | holder.clFileTreeItem.setOnClickListener(new View.OnClickListener() {
62 | @Override
63 | public void onClick(View view) {
64 | // 判断本适配器是否绑定了项目单击事件
65 | if (onFileClickListener != null){
66 | // 如果不为空,代表已经绑定了单击事件
67 | onFileClickListener.onClick(holder.getAdapterPosition(), fileTreePOData.get(holder.getAdapterPosition()));
68 | }
69 | }
70 | });
71 | }
72 |
73 | @Override
74 | public int getItemCount() {
75 | return fileTreePOData.size(); // 返回源数据的大小
76 | }
77 |
78 | // 设置监听接口
79 | public interface OnFileClickListener{
80 | void onClick(Integer position,FileTreePO nowFileFree);
81 | }
82 | class FileTreeViewHolder extends RecyclerView.ViewHolder{
83 |
84 | // 声明需要用到的组件对象
85 | private TextView tvTreeName;
86 | private ImageView ivTreeType;
87 | private ConstraintLayout clFileTreeItem;
88 | public FileTreeViewHolder(@NonNull View itemView) {
89 | super(itemView);
90 | clFileTreeItem = itemView.findViewById(R.id.cl_file_tree_item);
91 | tvTreeName = itemView.findViewById(R.id.tv_tree_name);
92 | ivTreeType = itemView.findViewById(R.id.iv_tree_type);
93 | }
94 |
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/recyclerView/adapter/SystemSettingsAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.recyclerView.adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.constraintlayout.widget.ConstraintLayout;
12 | import androidx.recyclerview.widget.RecyclerView;
13 |
14 | import com.ecsoft.cloudreve.R;
15 | import com.ecsoft.cloudreve.ui.recyclerView.entity.SystemSettingPO;
16 |
17 | import java.util.List;
18 |
19 | public class SystemSettingsAdapter extends RecyclerView.Adapter {
20 |
21 | private Context context; // 上下文对象
22 | private List systemSettingPOS; // 实体类集合
23 | private OnSystemItemClickedListener onSystemItemClickedListener; // 监听器接口
24 |
25 | public SystemSettingsAdapter(Context context, List systemSettingPOS) {
26 | this.context = context;
27 | this.systemSettingPOS = systemSettingPOS;
28 | }
29 |
30 | @NonNull
31 | @Override
32 | public SystemSettingsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
33 | // 创建一个ViewHolder对象
34 | View inflate = LayoutInflater.from(context).inflate(R.layout.item_settings, null);
35 | return new SystemSettingsViewHolder(inflate);
36 |
37 | }
38 |
39 | @Override
40 | public void onBindViewHolder(@NonNull SystemSettingsViewHolder holder, int position) {
41 | // 当某个项目即将显示
42 | // 获取这个项目的实体对象
43 | SystemSettingPO currentEntity = systemSettingPOS.get(holder.getAdapterPosition());
44 | // 是否可以跳转
45 | if (currentEntity.isCanGoto()){
46 | // 能跳转,显示跳转>图标
47 | holder.ivGotoIcon.setVisibility(View.VISIBLE);
48 | } else {
49 | // 不能跳转,隐藏跳转>图标
50 | holder.ivGotoIcon.setVisibility(View.GONE);
51 | }
52 | // 显示设置图标
53 | holder.ivIcon.setImageResource(currentEntity.getIconDrawable());
54 | // 显示设置标题
55 | holder.tvTitle.setText(currentEntity.getSettingTitle());
56 | // 设置右标签
57 | holder.tvRightLabel.setText(currentEntity.getRightLabel());
58 | // 绑定事件
59 | holder.clSettingsItem.setOnClickListener(new View.OnClickListener() {
60 | @Override
61 | public void onClick(View view) {
62 | // 当root视图被单击是触发事件
63 | // 判断自定义事件是否被绑定成功
64 | if (onSystemItemClickedListener != null){
65 | // 自定义事件绑定成功
66 | onSystemItemClickedListener.onItemClickedListener(currentEntity,holder.getAdapterPosition()); // 触发事件
67 | }
68 | }
69 | });
70 | }
71 |
72 | // 绑定监听器
73 | public void setOnSystemItemClickedListener(OnSystemItemClickedListener onSystemItemClickedListener) {
74 | this.onSystemItemClickedListener = onSystemItemClickedListener;
75 | }
76 |
77 | @Override
78 | public int getItemCount() {
79 | return systemSettingPOS.size();
80 | }
81 |
82 |
83 |
84 | // 监听接口
85 | public interface OnSystemItemClickedListener {
86 | void onItemClickedListener(SystemSettingPO clickedEntity,int position);
87 | }
88 |
89 | // 视图承载对象
90 | class SystemSettingsViewHolder extends RecyclerView.ViewHolder{
91 |
92 | public ConstraintLayout clSettingsItem;
93 | public ImageView ivIcon;
94 | public TextView tvTitle;
95 | public TextView tvRightLabel;
96 | public ImageView ivGotoIcon;
97 |
98 | public SystemSettingsViewHolder(@NonNull View itemView) {
99 | super(itemView);
100 | // 加载组件
101 | clSettingsItem = itemView.findViewById(R.id.cl_settings_item);
102 | ivIcon = itemView.findViewById(R.id.iv_icon);
103 | tvTitle = itemView.findViewById(R.id.tv_title);
104 | tvRightLabel = itemView.findViewById(R.id.tv_right_label);
105 | ivGotoIcon = itemView.findViewById(R.id.iv_goto_icon);
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/recyclerView/entity/FileTreePO.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.recyclerView.entity;
2 |
3 | import java.io.Serializable;
4 |
5 | public class FileTreePO implements Serializable {
6 | private String id;
7 | private String name;
8 | private String path;
9 | private String pic;
10 | private Integer size;
11 | private String type;
12 | private String date;
13 | private String createDate;
14 | private Boolean sourceEnabled;
15 |
16 |
17 | // GET和SET
18 |
19 |
20 | public String getId() {
21 | return id;
22 | }
23 |
24 | public void setId(String id) {
25 | this.id = id;
26 | }
27 |
28 | public String getName() {
29 | return name;
30 | }
31 |
32 | public void setName(String name) {
33 | this.name = name;
34 | }
35 |
36 | public String getPath() {
37 | return path;
38 | }
39 |
40 | public void setPath(String path) {
41 | this.path = path;
42 | }
43 |
44 | public String getPic() {
45 | return pic;
46 | }
47 |
48 | public void setPic(String pic) {
49 | this.pic = pic;
50 | }
51 |
52 | public Integer getSize() {
53 | return size;
54 | }
55 |
56 | public void setSize(Integer size) {
57 | this.size = size;
58 | }
59 |
60 | public String getType() {
61 | return type;
62 | }
63 |
64 | public void setType(String type) {
65 | this.type = type;
66 | }
67 |
68 | public String getDate() {
69 | return date;
70 | }
71 |
72 | public void setDate(String date) {
73 | this.date = date;
74 | }
75 |
76 | public String getCreateDate() {
77 | return createDate;
78 | }
79 |
80 | public void setCreateDate(String createDate) {
81 | this.createDate = createDate;
82 | }
83 |
84 | public Boolean getSourceEnabled() {
85 | return sourceEnabled;
86 | }
87 |
88 | public void setSourceEnabled(Boolean sourceEnabled) {
89 | this.sourceEnabled = sourceEnabled;
90 | }
91 |
92 | public FileTreePO() {
93 | }
94 |
95 | public FileTreePO(String id, String name, String path, String pic, Integer size, String type,
96 | String date, String createDate, Boolean sourceEnabled) {
97 | this.id = id;
98 | this.name = name;
99 | this.path = path;
100 | this.pic = pic;
101 | this.size = size;
102 | this.type = type;
103 | this.date = date;
104 | this.createDate = createDate;
105 | this.sourceEnabled = sourceEnabled;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ecsoft/cloudreve/ui/recyclerView/entity/SystemSettingPO.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve.ui.recyclerView.entity;
2 |
3 | import com.ecsoft.cloudreve.R;
4 |
5 | public class SystemSettingPO {
6 | private int iconDrawable = R.drawable.ic_icon_settings; // 设置项目图标
7 | private String settingTitle = "系统设置"; // 设置项目名称
8 | private boolean canGoto = true; // 是否为能跳转界面的设置
9 | private Class gotoPage ; // 设置跳转界面
10 | private String rightLabel = "V1.0.0"; // 设置右边的提示语,空表示不设置
11 |
12 | public SystemSettingPO(int iconDrawable, String settingTitle, boolean canGoto, Class gotoPage, String rightLabel) {
13 | this.iconDrawable = iconDrawable;
14 | this.settingTitle = settingTitle;
15 | this.canGoto = canGoto;
16 | this.gotoPage = gotoPage;
17 | this.rightLabel = rightLabel;
18 | }
19 |
20 | public SystemSettingPO() {
21 | }
22 |
23 | public int getIconDrawable() {
24 | return iconDrawable;
25 | }
26 |
27 | public void setIconDrawable(int iconDrawable) {
28 | this.iconDrawable = iconDrawable;
29 | }
30 |
31 | public String getSettingTitle() {
32 | return settingTitle;
33 | }
34 |
35 | public void setSettingTitle(String settingTitle) {
36 | this.settingTitle = settingTitle;
37 | }
38 |
39 | public boolean isCanGoto() {
40 | return canGoto;
41 | }
42 |
43 | public void setCanGoto(boolean canGoto) {
44 | this.canGoto = canGoto;
45 | }
46 |
47 | public Class getGotoPage() {
48 | return gotoPage;
49 | }
50 |
51 | public void setGotoPage(Class gotoPage) {
52 | this.gotoPage = gotoPage;
53 | }
54 |
55 | public String getRightLabel() {
56 | return rightLabel;
57 | }
58 |
59 | public void setRightLabel(String rightLabel) {
60 | this.rightLabel = rightLabel;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/user_info_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/user_info_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/bk.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bk_circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/bk_circle.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/captcha.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/captcha.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_bk_user_info_topper.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
30 |
33 |
36 |
39 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dialog_icon_action_create_dir.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dialog_icon_rename.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_donation_qr_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/ic_donation_qr_code.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_ic_icon_folder.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_about.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_action_create_dir.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_action_upload.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_back_last_dir.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_coffee.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_delete.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_dialog_construction.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_dialog_warning.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_download.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_email.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_audio.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_doc.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_tree_file.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_tree_folder.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_upload.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_file_video.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_key.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_office_preview_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/ic_icon_office_preview_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_preview.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_rename.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_right.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings_create_time.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings_group.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings_network.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings_nickname.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_settings_uid.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icon_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_dir.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_error.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_gif.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_jpg.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_mov.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_mp4.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_pdf.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_png.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_ppt.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_psd.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_rar.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_success.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_svg.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_txt.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_unkonow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_video.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_warnning.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_word.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_xlsx.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_net_zip.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_png_icon_cloudreve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/drawable/ic_png_icon_cloudreve.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/layer_list_progressbar_memory_space.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_donation.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_download_count.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_general_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_main_card_all.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_main_card_audio.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_main_card_doc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_main_card_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_main_card_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_show_dir_all.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_show_dir_audio.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_show_dir_doc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_show_dir_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bk_show_dir_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_btn_general.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_btn_skip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_btn_welcome_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_dialog_close_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_icon_green_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_icon_pp_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_icon_red_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_icon_theme_color_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_small_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_small_btn_outline.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_underline_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about_me.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
23 |
24 |
34 |
35 |
44 |
45 |
53 |
54 |
62 |
63 |
64 |
65 |
72 |
73 |
82 |
83 |
87 |
88 |
93 |
94 |
95 |
104 |
105 |
114 |
115 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_build.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
27 |
28 |
33 |
34 |
35 |
36 |
47 |
48 |
59 |
60 |
69 |
70 |
75 |
76 |
77 |
85 |
86 |
101 |
102 |
110 |
111 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_download_task_manage.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
29 |
30 |
38 |
39 |
43 |
50 |
55 |
56 |
63 |
64 |
69 |
74 |
75 |
76 |
77 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_multi_media_preview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
19 |
30 |
31 |
39 |
40 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_office_preview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
19 |
30 |
31 |
39 |
40 |
46 |
47 |
52 |
53 |
54 |
63 |
64 |
65 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_open_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
32 |
33 |
44 |
45 |
59 |
60 |
61 |
70 |
71 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
22 |
33 |
34 |
43 |
44 |
55 |
56 |
66 |
67 |
68 |
72 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_tbsview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_create_dir.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
26 |
27 |
36 |
37 |
38 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_office_preview_error_notice.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
25 |
26 |
34 |
35 |
44 |
45 |
46 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_reg_email_auth.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
24 |
25 |
26 |
27 |
37 |
38 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_rename_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
24 |
25 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_download_task.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
22 |
23 |
28 |
29 |
34 |
35 |
39 |
40 |
47 |
48 |
55 |
56 |
57 |
65 |
66 |
70 |
71 |
77 |
78 |
85 |
86 |
87 |
88 |
89 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_file_tree_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
31 |
32 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
23 |
24 |
33 |
34 |
42 |
43 |
52 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - 1
5 | - 2
6 | - 3
7 | - 4
8 | - 20
9 | - 30
10 | - 40
11 | - 100
12 |
13 |
14 | - 1
15 | - 2
16 | - 3
17 | - 4
18 | - 5
19 | - 10
20 | - 30
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | #3f51b5
12 | #5B6FDC
13 | #C6C6C6
14 |
15 |
16 | #E8EEFD
17 | #E8EEFB
18 | #EEE8FD
19 | #EEE8FB
20 | #E8FDFD
21 | #E8FDFB
22 | #FCFDED
23 | #FCFDEB
24 | #EDFBFD
25 | #EDFBFB
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Cloudreve
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
21 |
22 |
39 |
40 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/test/java/com/ecsoft/cloudreve/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.ecsoft.cloudreve;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | plugins {
3 | id 'com.android.application' version '7.3.1' apply false
4 | id 'com.android.library' version '7.3.1' apply false
5 |
6 |
7 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Enables namespacing of each library's R class so that its R class includes only the
19 | # resources declared in the library itself and none from the library's dependencies,
20 | # thereby reducing the size of the R class for that library
21 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ErrorCodesForLzx/CloudreveZX/87eb30373208e5e973da8f03f327ec2e52f7722b/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Nov 06 14:50:58 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file should *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/zxl/Library/Android/sdk
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "Cloudreve"
16 | include ':app'
17 |
--------------------------------------------------------------------------------