├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── jakting
│ │ └── shareclean
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ │ └── com
│ │ │ └── jakting
│ │ │ └── shareclean
│ │ │ ├── BaseActivity.kt
│ │ │ ├── activity
│ │ │ ├── CleanManagerActivity.kt
│ │ │ ├── DetailsActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── QuickCleanActivity.kt
│ │ │ └── SettingsActivity.kt
│ │ │ ├── data
│ │ │ ├── App.kt
│ │ │ ├── AppInfo.kt
│ │ │ └── Dto.kt
│ │ │ └── utils
│ │ │ ├── CommonExt.kt
│ │ │ ├── IFWExt.kt
│ │ │ ├── MessageExt.kt
│ │ │ ├── MiscExt.kt
│ │ │ ├── ModuleAvailable.kt
│ │ │ ├── ModuleCheckerExt.kt
│ │ │ ├── SerializationConverter.kt
│ │ │ ├── ShellExt.kt
│ │ │ └── application.kt
│ └── res
│ │ ├── color
│ │ └── bg_chip_state_list.xml
│ │ ├── drawable-v24
│ │ └── ic_launcher_round.png
│ │ ├── drawable
│ │ ├── ic_twotone_account_tree_24.xml
│ │ ├── ic_twotone_arrow_back_24.xml
│ │ ├── ic_twotone_auto_fix_high_24.xml
│ │ ├── ic_twotone_backup_24.xml
│ │ ├── ic_twotone_bug_report_24.xml
│ │ ├── ic_twotone_check_24.xml
│ │ ├── ic_twotone_check_circle_24.xml
│ │ ├── ic_twotone_cleaning_services_24.xml
│ │ ├── ic_twotone_data_object_24.xml
│ │ ├── ic_twotone_deselect_24.xml
│ │ ├── ic_twotone_file_open_24.xml
│ │ ├── ic_twotone_help_24.xml
│ │ ├── ic_twotone_info_24.xml
│ │ ├── ic_twotone_open_in_browser_24.xml
│ │ ├── ic_twotone_output_24.xml
│ │ ├── ic_twotone_public_24.xml
│ │ ├── ic_twotone_ramen_dining_24.xml
│ │ ├── ic_twotone_search_24.xml
│ │ ├── ic_twotone_select_all_24.xml
│ │ ├── ic_twotone_settings_24.xml
│ │ ├── ic_twotone_settings_applications_24.xml
│ │ ├── ic_twotone_share_24.xml
│ │ ├── ic_twotone_text_fields_24.xml
│ │ ├── ic_twotone_warning_24.xml
│ │ ├── ic_twotone_yard_24.xml
│ │ ├── shape_12dp_corners_primary_100.xml
│ │ └── shape_12dp_corners_primary_15.xml
│ │ ├── layout
│ │ ├── activity_clean_manager.xml
│ │ ├── activity_details.xml
│ │ ├── activity_main.xml
│ │ ├── activity_quick_clean.xml
│ │ ├── activity_settings.xml
│ │ ├── card_1_module.xml
│ │ ├── card_2_manage_clean.xml
│ │ ├── card_3_manage_quick.xml
│ │ ├── card_4_list.xml
│ │ ├── content_main.xml
│ │ ├── item_intent.xml
│ │ ├── item_list_quick_clean_rules.xml
│ │ ├── item_manager_clean.xml
│ │ ├── item_quick_clean_rule.xml
│ │ ├── layout_loading.xml
│ │ └── sheet_quick_clean.xml
│ │ ├── menu
│ │ ├── menu_details.xml
│ │ └── menu_manager_clean.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── values-land
│ │ └── dimens.xml
│ │ ├── values-night-v29
│ │ └── themes.xml
│ │ ├── values-night
│ │ └── themes.xml
│ │ ├── values-w1240dp
│ │ └── dimens.xml
│ │ ├── values-w600dp
│ │ └── dimens.xml
│ │ ├── values-zh-rCN
│ │ └── strings.xml
│ │ ├── values-zh-rTW
│ │ └── strings.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── preferences_setting.xml
│ │ └── provider_paths.xml
│ └── test
│ └── java
│ └── com
│ └── jakting
│ └── shareclean
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.aar
4 | *.ap_
5 | *.aab
6 |
7 | # Files for the ART/Dalvik VM
8 | *.dex
9 |
10 | # Java class files
11 | *.class
12 |
13 | # Generated files
14 | bin/
15 | gen/
16 | out/
17 | # Uncomment the following line in case you need and you don't have the release build type files in your app
18 | # release/
19 |
20 | # Gradle files
21 | .gradle/
22 | build/
23 |
24 | # Local configuration file (sdk path, etc)
25 | local.properties
26 |
27 | # Proguard folder generated by Eclipse
28 | proguard/
29 |
30 | # Log Files
31 | *.log
32 |
33 | # Android Studio Navigation editor temp files
34 | .navigation/
35 |
36 | # Android Studio captures folder
37 | captures/
38 |
39 | # IntelliJ
40 | *.iml
41 |
42 | # Keystore files
43 | # Uncomment the following lines if you do not want to check your keystore files in.
44 | #*.jks
45 | #*.keystore
46 |
47 | # External native build folder generated in Android Studio 2.2 and later
48 | .externalNativeBuild
49 | .cxx/
50 |
51 | # Google Services (e.g. APIs or Firebase)
52 | # google-services.json
53 |
54 | # Freeline
55 | freeline.py
56 | freeline/
57 | freeline_project_description.json
58 |
59 | # fastlane
60 | fastlane/report.xml
61 | fastlane/Preview.html
62 | fastlane/screenshots
63 | fastlane/test_output
64 | fastlane/readme.md
65 |
66 | # Version control
67 | vcs.xml
68 |
69 | # lint
70 | lint/intermediates/
71 | lint/generated/
72 | lint/outputs/
73 | lint/tmp/
74 | # lint/reports/
75 | .idea/
76 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TigerInTheWall
2 | 
3 |
4 | A 🐯Tiger hides in the wall, waiting to 💀bite the "Intent" passby.
5 |
6 | 🚫Block annoying superfluous Intent for your Android devices.
7 |
8 | 👺Magisk needed, named as RnIntentClean before.
9 |
10 | [](https://github.com/TigerBeanst/TigerInTheWall)
11 | [](https://github.com/TigerBeanst/TigerInTheWall/releases)
12 | [](https://github.com/TigerBeanst/TigerInTheWall/blob/master/LICENSE)
13 |
14 | TigerInTheWall is an App that allow you to clean up your sheets, just like sharesheet, open mode sheet and more!
15 |
16 | Works with the Magisk modules **IFWEnhance-TIW**, and root permission.
17 | > IFWEnhance-TIW: [https://github.com/TigerBeanst/Riru-IFWEnhance-TIW/releases](https://github.com/TigerBeanst/Riru-IFWEnhance-TIW/releases)
18 | >
19 | > If you use Riru, you need to install Riru - Core before. Recommend use Zygisk version.
20 |
21 | # Download
22 | See [https://ic.into.icu/download/](https://ic.into.icu/download/)
23 |
24 | or
25 |
26 | [Github Release](https://github.com/TigerBeanst/TigerInTheWall/releases/latest)
27 |
28 |
29 |
30 | > CI Builds: *DANGER* [https://install.appcenter.ms/users/tigerbeanst/apps/rnshareclean/distribution_groups/tigerinthewall_test_build](https://install.appcenter.ms/users/tigerbeanst/apps/rnshareclean/distribution_groups/tigerinthewall_test_build)
31 |
32 | # Guide
33 | See [https://ic.into.icu/guide/](https://ic.into.icu/guide/)
34 |
35 | # Tested
36 | 1. Hydrogen/Oxygen OS with Android 10
37 | 2. MIUI 12 with Android 10
38 |
39 | # License
40 |
41 | Copyright (C) 2020 TigerBeanst
42 |
43 | Licensed under the Apache License, Version 2.0 (the "License");
44 | you may not use this file except in compliance with the License.
45 | You may obtain a copy of the License at
46 |
47 | http://www.apache.org/licenses/LICENSE-2.0
48 |
49 | Unless required by applicable law or agreed to in writing, software
50 | distributed under the License is distributed on an "AS IS" BASIS,
51 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52 | See the License for the specific language governing permissions and
53 | limitations under the License.
54 |
55 | *Google Play and the Google Play logo are trademarks of Google LLC.*
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | release/
3 | /debug/
4 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | id 'kotlin-kapt'
5 | id 'kotlinx-serialization'
6 | id 'com.google.gms.google-services'
7 | id 'com.google.firebase.crashlytics'
8 | id 'com.mikepenz.aboutlibraries.plugin'
9 | }
10 |
11 | android {
12 | compileSdk 33
13 | buildFeatures.dataBinding = true
14 | defaultConfig {
15 | applicationId "com.jakting.shareclean"
16 | minSdk 26
17 | targetSdk 33
18 | versionCode 202304301
19 | versionName "2.0.0"
20 |
21 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
22 | }
23 |
24 | buildTypes {
25 | release {
26 | minifyEnabled true
27 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
28 | }
29 | debug {
30 | applicationIdSuffix ".debug"
31 | }
32 | }
33 | compileOptions {
34 | sourceCompatibility JavaVersion.VERSION_11
35 | targetCompatibility JavaVersion.VERSION_11
36 | }
37 | kotlin {
38 | jvmToolchain(11)
39 | }
40 | kotlinOptions {
41 | jvmTarget = '11'
42 | }
43 | namespace 'com.jakting.shareclean'
44 | buildFeatures {
45 | viewBinding true
46 | }
47 | }
48 |
49 | kapt {
50 | generateStubs = true
51 | }
52 |
53 | dependencies {
54 |
55 | implementation 'androidx.core:core-ktx:1.10.0'
56 | implementation 'androidx.appcompat:appcompat:1.6.1'
57 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
58 | implementation 'androidx.preference:preference-ktx:1.2.0'
59 |
60 | implementation platform('com.google.firebase:firebase-bom:31.2.3')
61 | implementation 'com.google.firebase:firebase-crashlytics-ktx'
62 | implementation 'com.google.firebase:firebase-analytics-ktx'
63 |
64 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
65 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
66 | implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0'
67 |
68 | implementation 'com.google.android.material:material:1.9.0-beta01'
69 |
70 | implementation 'com.github.liangjingkanji:BRV:1.3.80'
71 | implementation 'com.squareup.okhttp3:okhttp:4.10.0'
72 | implementation 'com.github.liangjingkanji:Net:3.5.8'
73 |
74 | implementation 'com.tencent:mmkv:1.2.15'
75 |
76 | implementation 'com.github.topjohnwu.libsu:core:5.0.1'
77 |
78 | implementation 'dev.rikka.rikkax.material:material-preference:2.0.0'
79 |
80 | implementation "com.mikepenz:aboutlibraries-core:10.6.2"
81 | implementation "com.mikepenz:aboutlibraries:10.6.2"
82 |
83 | testImplementation 'junit:junit:4.13.2'
84 | androidTestImplementation 'androidx.test.ext:junit:1.1.5'
85 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
86 | }
87 |
88 | configurations.configureEach {
89 | exclude group: 'dev.rikka.rikkax.appcompat', module: 'appcompat'
90 | exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
91 | }
92 |
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "240473123357",
4 | "firebase_url": "https://jakting-intentclean.firebaseio.com",
5 | "project_id": "jakting-intentclean",
6 | "storage_bucket": "jakting-intentclean.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:240473123357:android:490ce874c36e969f8a34f4",
12 | "android_client_info": {
13 | "package_name": "com.jakting.shareclean"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "240473123357-bt7ns29qcthdi0c94mqre0r9smsfv567.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.jakting.shareclean",
22 | "certificate_hash": "19775111b88991e47f1a102916dc0ef81f0aa9d3"
23 | }
24 | },
25 | {
26 | "client_id": "240473123357-fosu6hha2ioc3s4sfq41mselfnekmrd1.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyDrRRu1TVMyz_kKHetieHm-7heXgYiV7VQ"
33 | }
34 | ],
35 | "services": {
36 | "appinvite_service": {
37 | "other_platform_oauth_client": [
38 | {
39 | "client_id": "240473123357-fosu6hha2ioc3s4sfq41mselfnekmrd1.apps.googleusercontent.com",
40 | "client_type": 3
41 | }
42 | ]
43 | }
44 | }
45 | },
46 | {
47 | "client_info": {
48 | "mobilesdk_app_id": "1:240473123357:android:635268d3be0b46cd8a34f4",
49 | "android_client_info": {
50 | "package_name": "com.jakting.shareclean.debug"
51 | }
52 | },
53 | "oauth_client": [
54 | {
55 | "client_id": "240473123357-fosu6hha2ioc3s4sfq41mselfnekmrd1.apps.googleusercontent.com",
56 | "client_type": 3
57 | }
58 | ],
59 | "api_key": [
60 | {
61 | "current_key": "AIzaSyDrRRu1TVMyz_kKHetieHm-7heXgYiV7VQ"
62 | }
63 | ],
64 | "services": {
65 | "appinvite_service": {
66 | "other_platform_oauth_client": [
67 | {
68 | "client_id": "240473123357-fosu6hha2ioc3s4sfq41mselfnekmrd1.apps.googleusercontent.com",
69 | "client_type": 3
70 | }
71 | ]
72 | }
73 | }
74 | }
75 | ],
76 | "configuration_version": "1"
77 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Keep `Companion` object fields of serializable classes.
2 | # This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
3 | -if @kotlinx.serialization.Serializable class **
4 | -keepclassmembers class <1> {
5 | static <1>$Companion Companion;
6 | }
7 |
8 | # Keep `serializer()` on companion objects (both default and named) of serializable classes.
9 | -if @kotlinx.serialization.Serializable class ** {
10 | static **$* *;
11 | }
12 | -keepclassmembers class <2>$<3> {
13 | kotlinx.serialization.KSerializer serializer(...);
14 | }
15 |
16 | # Keep `INSTANCE.serializer()` of serializable objects.
17 | -if @kotlinx.serialization.Serializable class ** {
18 | public static ** INSTANCE;
19 | }
20 | -keepclassmembers class <1> {
21 | public static <1> INSTANCE;
22 | kotlinx.serialization.KSerializer serializer(...);
23 | }
24 |
25 | # @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
26 | -keepattributes RuntimeVisibleAnnotations,AnnotationDefault
27 |
28 | # Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`.
29 | # If you have any, uncomment and replace classes with those containing named companion objects.
30 | #-keepattributes InnerClasses # Needed for `getDeclaredClasses`.
31 | #-if @kotlinx.serialization.Serializable class
32 | #com.example.myapplication.HasNamedCompanion, # <-- List serializable classes with named companions.
33 | #com.example.myapplication.HasNamedCompanion2
34 | #{
35 | # static **$* *;
36 | #}
37 | #-keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
38 | # static <1>$$serializer INSTANCE;
39 | #}
40 | -dontwarn org.bouncycastle.jsse.BCSSLParameters
41 | -dontwarn org.bouncycastle.jsse.BCSSLSocket
42 | -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
43 | -dontwarn org.conscrypt.Conscrypt$Version
44 | -dontwarn org.conscrypt.Conscrypt
45 | -dontwarn org.conscrypt.ConscryptHostnameVerifier
46 | -dontwarn org.openjsse.javax.net.ssl.SSLParameters
47 | -dontwarn org.openjsse.javax.net.ssl.SSLSocket
48 | -dontwarn org.openjsse.net.ssl.OpenJSSE
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/jakting/shareclean/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean
2 |
3 | import androidx.test.ext.junit.runners.AndroidJUnit4
4 | import androidx.test.platform.app.InstrumentationRegistry
5 | import org.junit.Assert.assertEquals
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | /**
10 | * Instrumented test, which will execute on an Android device.
11 | *
12 | * See [testing documentation](http://d.android.com/tools/testing).
13 | */
14 | @RunWith(AndroidJUnit4::class)
15 | class ExampleInstrumentedTest {
16 | @Test
17 | fun useAppContext() {
18 | // Context of the app under test.
19 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
20 | assertEquals("com.jakting.shareclean", appContext.packageName)
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
25 |
26 |
31 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
59 |
63 |
68 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/BaseActivity.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean
2 |
3 | import android.view.MenuItem
4 | import androidx.appcompat.app.AppCompatActivity
5 |
6 |
7 | open class BaseActivity : AppCompatActivity() {
8 |
9 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
10 | return when (item.itemId) {
11 | android.R.id.home -> {
12 | finish()
13 | true
14 | }
15 | else -> super.onOptionsItemSelected(item)
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/activity/SettingsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.activity
2 |
3 | import android.content.Context
4 | import android.os.Build
5 | import android.os.Bundle
6 | import androidx.preference.EditTextPreference
7 | import androidx.preference.Preference
8 | import androidx.preference.PreferenceFragmentCompat
9 | import com.google.android.material.dialog.MaterialAlertDialogBuilder
10 | import com.jakting.shareclean.BaseActivity
11 | import com.jakting.shareclean.R
12 | import com.jakting.shareclean.utils.*
13 | import com.jakting.shareclean.utils.application.Companion.kv
14 | import com.jakting.shareclean.utils.application.Companion.settingSharedPreferences
15 | import rikka.material.preference.MaterialSwitchPreference
16 | import rikka.preference.SimpleMenuPreference
17 |
18 | class SettingsActivity : BaseActivity() {
19 |
20 | override fun onCreate(savedInstanceState: Bundle?) {
21 | super.onCreate(savedInstanceState)
22 | this.theme.applyStyle(
23 | rikka.material.preference.R.style.ThemeOverlay_Rikka_Material3_Preference,
24 | true
25 | )
26 | setContentView(R.layout.activity_settings)
27 | if (savedInstanceState == null) {
28 | supportFragmentManager
29 | .beginTransaction()
30 | .replace(R.id.settings, SettingsFragment())
31 | .commit()
32 | }
33 | setSupportActionBar(findViewById(R.id.toolbar))
34 | }
35 |
36 | class SettingsFragment : PreferenceFragmentCompat() {
37 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
38 | setPreferencesFromResource(R.xml.preferences_setting, rootKey)
39 |
40 | // 直接分享
41 | val directShareSwitch = findPreference("pref_direct_share")
42 | if (directShareSwitch != null) {
43 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
44 | directShareSwitch.isEnabled = false
45 | } else {
46 | directShareSwitch.setOnPreferenceChangeListener { _, newValue ->
47 | if (newValue as Boolean) {
48 | if (runShell("touch $ifw_direct_share_file_path").isSuccess &&
49 | runShell("echo '$ifw_direct_share' > $ifw_direct_share_file_path").isSuccess
50 | ) {
51 | activity.logd("写入 $ifw_direct_share_file_path 成功")
52 | } else {
53 | activity.logd("写入 $ifw_direct_share_file_path 失败")
54 | }
55 | } else {
56 | if (runShell("rm -f $ifw_direct_share_file_path").isSuccess) {
57 | activity.logd("删除 $ifw_direct_share_file_path 成功")
58 | } else {
59 | activity.logd("删除 $ifw_direct_share_file_path 失败")
60 | }
61 | }
62 | true
63 | }
64 |
65 |
66 | }
67 | }
68 |
69 | //设置规则镜像
70 | val mirrorPreference = findPreference("pref_mirrors")
71 | val customPreference = findPreference("pref_mirrors_custom")
72 | customPreference?.isVisible =
73 | settingSharedPreferences.getString("pref_mirrors", "0") == "99"
74 | customPreference?.summary =
75 | settingSharedPreferences.getString("pref_mirrors_custom", "")
76 | customPreference?.setOnPreferenceChangeListener { _, newValue ->
77 | customPreference.summary = newValue as String
78 | true
79 | }
80 | mirrorPreference?.setOnPreferenceChangeListener { preference, newValue ->
81 | val mirrorName = when (newValue) {
82 | "0" -> "Github"
83 | "1" -> "jsDelivr"
84 | "2" -> "FastGit"
85 | "99" -> getString(R.string.setting_rules_mirror_custom)
86 | else -> getString(R.string.setting_rules_mirror_custom)
87 | }
88 | preference.summary =
89 | String.format(getString(R.string.setting_rules_mirror_summary), mirrorName)
90 | customPreference?.isVisible = newValue == "99"
91 | true
92 | }
93 |
94 | //重置 IFW
95 | findPreference("pref_reset_ifw")?.setOnPreferenceClickListener {
96 | MaterialAlertDialogBuilder(activity as Context)
97 | .setTitle(R.string.setting_reset_secondary_confirmation)
98 | .setMessage(R.string.setting_reset_secondary_confirmation_summary)
99 | .setPositiveButton(R.string.ok) { _, _ ->
100 | if (deleteIfwFiles("all")) {
101 | deleteIfwFiles("old")
102 | activity.toast(R.string.setting_reset_success, true)
103 | } else {
104 | activity.toast(R.string.setting_reset_error, true)
105 | }
106 | }
107 | .setNegativeButton(R.string.cancel) { _, _ -> }
108 | .show()
109 | true
110 | }
111 |
112 | //重置配置
113 | findPreference("pref_reset_configuration")?.setOnPreferenceClickListener {
114 | MaterialAlertDialogBuilder(activity as Context)
115 | .setTitle(R.string.setting_reset_secondary_confirmation)
116 | .setMessage(R.string.setting_reset_secondary_confirmation_summary)
117 | .setPositiveButton(R.string.ok) { _, _ ->
118 | kv.clearAll()
119 | activity.toast(R.string.setting_reset_success, true)
120 | }
121 | .setNegativeButton(R.string.cancel) { _, _ -> }
122 | .show()
123 | true
124 | }
125 | }
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/data/App.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.data
2 |
3 | import androidx.databinding.BaseObservable
4 | import java.io.Serializable
5 |
6 | data class AppIntent(
7 | val packageName: String,
8 | val component: String,
9 | val componentName: String,
10 | var checked: Boolean = false,
11 | val type: String
12 | ) : Serializable, BaseObservable()
13 |
14 | data class IntentType(
15 | var share: Boolean,
16 | var view: Boolean,
17 | var text: Boolean,
18 | var browser: Boolean
19 | ) : Serializable
20 |
21 | data class App(
22 | val appName: String = "",
23 | val packageName: String = "",
24 | val intentList: ArrayList = arrayListOf(),
25 | val isSystem: Boolean = false,
26 | val hasType: IntentType = IntentType(share = false, view = false, text = false, browser = false)
27 | ) : Serializable
28 |
29 | data class AppDetail(
30 | var appName: String = "",
31 | var packageName: String = "",
32 | var versionCode: String = "",
33 | var versionName: String = "",
34 | )
35 |
36 | @kotlinx.serialization.Serializable
37 | data class ComponentItem(
38 | val component: String,
39 | val status: Boolean
40 | )
41 |
42 | @kotlinx.serialization.Serializable
43 | data class BackupEntity(
44 | val settings: Map,
45 | val components: MutableList
46 | )
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/data/AppInfo.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.data
2 |
3 | import android.content.Intent
4 | import android.content.pm.ApplicationInfo
5 | import android.content.pm.PackageManager
6 | import android.content.pm.ResolveInfo
7 | import android.net.Uri
8 | import com.jakting.shareclean.utils.application.Companion.appContext
9 | import com.jakting.shareclean.utils.getAppDetail
10 | import kotlinx.coroutines.Dispatchers
11 | import kotlinx.coroutines.withContext
12 | import java.text.Collator
13 | import java.util.Collections
14 | import java.util.Locale
15 |
16 | class AppInfo() {
17 |
18 | suspend fun getAppList(): List = withContext(Dispatchers.IO) {
19 | val resolveInfoListHashMap: HashMap> = HashMap()
20 |
21 |
22 | resolveInfoListHashMap["1_share"] = (
23 | appContext.packageManager!!.queryIntentActivities(
24 | Intent(Intent.ACTION_SEND).setType("*/*"),
25 | PackageManager.MATCH_ALL
26 | ))
27 | resolveInfoListHashMap["2_share_multi"] = (
28 | appContext.packageManager!!.queryIntentActivities(
29 | Intent(Intent.ACTION_SEND_MULTIPLE).setType("*/*"),
30 | PackageManager.MATCH_ALL
31 | ))
32 | resolveInfoListHashMap["3_view"] = (
33 | appContext.packageManager!!.queryIntentActivities(
34 | Intent(Intent.ACTION_VIEW).setDataAndType(
35 | Uri.parse("content://com.jakting.shareclean.fileprovider/selfile/nofile"),
36 | "*/*"
37 | ),
38 | PackageManager.MATCH_ALL
39 | ))
40 | resolveInfoListHashMap["4_text"] = (
41 | appContext.packageManager!!.queryIntentActivities(
42 | Intent(Intent.ACTION_PROCESS_TEXT).setType("*/*"),
43 | PackageManager.MATCH_ALL
44 | )
45 | )
46 | val browserResolveInfoList = mutableListOf()
47 | browserResolveInfoList.addAll(
48 | appContext.packageManager!!.queryIntentActivities(
49 | Intent(Intent.ACTION_VIEW, Uri.parse("https://ic.into.icu")),
50 | PackageManager.MATCH_ALL
51 | )
52 | )
53 | browserResolveInfoList.addAll(
54 | appContext.packageManager!!.queryIntentActivities(
55 | Intent(Intent.ACTION_VIEW, Uri.parse("https://ic.into.icu")),
56 | PackageManager.MATCH_ALL
57 | )
58 | )
59 | resolveInfoListHashMap["5_browser"] = browserResolveInfoList
60 |
61 | val finalList: ArrayList = ArrayList()
62 | resolveInfoListHashMap.forEach { (key, value) ->
63 | // Intent 分类: 分享/打开方式/长按文本/浏览器
64 | value.forEach { resolveInfo ->
65 | // 其中一类 Intent
66 | val appOr = finalList.stream().filter { app ->
67 | app.packageName == resolveInfo.activityInfo.packageName
68 | }.findFirst()
69 | if (appOr.isPresent) {
70 | // 如果列表里已经存在这个应用(根据包名判断),则把这个应用的 Intent 添加到这个应用的 Intent 集合中
71 | appOr.get().intentList.add(
72 | AppIntent(
73 | resolveInfo.activityInfo.packageName,
74 | resolveInfo.activityInfo.name,
75 | (resolveInfo.loadLabel(appContext.packageManager!!) as String).replace(
76 | "\n",
77 | ""
78 | ),
79 | false,
80 | key
81 | )
82 | )
83 | appOr.get().setHasType(key)
84 | } else {
85 | val oneApp = App(
86 | getAppDetail(resolveInfo.activityInfo.packageName).appName,
87 | resolveInfo.activityInfo.packageName,
88 | ArrayList().apply {
89 | add(
90 | AppIntent(
91 | resolveInfo.activityInfo.packageName,
92 | resolveInfo.activityInfo.name,
93 | (resolveInfo.loadLabel(appContext.packageManager!!) as String).replace(
94 | "\n",
95 | ""
96 | ),
97 | false,
98 | key
99 | )
100 | )
101 | },
102 | isSystem = (resolveInfo.activityInfo.applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM != 0)
103 | )
104 | oneApp.setHasType(key)
105 | finalList.add(oneApp)
106 | }
107 | }
108 | }
109 |
110 | class SortName : Comparator {
111 | val localCompare = Collator.getInstance(Locale.getDefault())
112 | override fun compare(o1: App?, o2: App?): Int {
113 | if (localCompare.compare(o1!!.appName, o2!!.appName) > 0) {
114 | return 1
115 | } else if (localCompare.compare(o1.appName, o2.appName) < 0) {
116 | return -1
117 | }
118 | return 0
119 | }
120 | }
121 | Collections.sort(finalList, SortName())
122 | finalList
123 | }
124 |
125 | private fun App.setHasType(key: String) {
126 | when (key) {
127 | "1_share", "2_share_multi" -> {
128 | hasType.share = true
129 | }
130 | "3_view" -> {
131 | hasType.view = true
132 | }
133 | "4_text" -> {
134 | hasType.text = true
135 | }
136 | "5_browser" -> {
137 | hasType.browser = true
138 | }
139 | }
140 | }
141 | }
142 |
143 |
144 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/data/Dto.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.data
2 |
3 | import kotlinx.serialization.SerialName
4 | import kotlinx.serialization.Serializable
5 |
6 | @Serializable
7 | data class QuickCleanRuleEntityListApiResult(
8 | @SerialName("rules")
9 | val rules: List
10 | )
11 |
12 | data class QuickCleanRule(
13 | val type: String
14 | )
15 |
16 | @Serializable
17 | data class QuickCleanListApiResult(
18 | @SerialName("rule_id")
19 | val ruleId: String,
20 | @SerialName("rule_info")
21 | val ruleInfo: QuickCleanRuleInfo,
22 | @SerialName("updateTime")
23 | val updateTime: Long,
24 | @SerialName("uploadTime")
25 | val uploadTime: Long,
26 | @SerialName("author")
27 | val author: String
28 | )
29 |
30 | @Serializable
31 | data class QuickCleanRuleInfo(
32 | @SerialName("default")
33 | val defaultLang: QuickCleanDefault,
34 | @SerialName("i18n")
35 | val i18n: List
36 | )
37 |
38 | @Serializable
39 | data class QuickCleanDefault(
40 | @SerialName("rule_desc")
41 | val ruleDesc: String,
42 | @SerialName("rule_name")
43 | val ruleName: String
44 | )
45 |
46 | @Serializable
47 | data class QuickCleanI18n(
48 | @SerialName("rule_desc")
49 | val ruleDesc: String,
50 | @SerialName("rule_lang")
51 | val ruleLang: String,
52 | @SerialName("rule_name")
53 | val ruleName: String
54 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/CommonExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.content.ComponentName
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.content.pm.ApplicationInfo
7 | import android.content.pm.PackageInfo
8 | import android.content.pm.PackageManager
9 | import android.content.pm.ResolveInfo
10 | import android.graphics.drawable.Drawable
11 | import androidx.core.content.ContextCompat
12 | import com.jakting.shareclean.R
13 | import com.jakting.shareclean.data.AppDetail
14 | import com.jakting.shareclean.utils.application.Companion.appContext
15 | import kotlinx.coroutines.Dispatchers
16 | import kotlinx.coroutines.withContext
17 |
18 | fun getAppDetail(packageName: String): AppDetail {
19 | //根据包名寻找应用名
20 | val appDetail = AppDetail()
21 | val packageInfo: PackageInfo
22 | val packageManager: PackageManager = appContext.packageManager
23 | try {
24 | packageInfo = packageManager.getPackageInfo(packageName, 0)
25 | appDetail.appName = packageInfo.applicationInfo.loadLabel(packageManager).toString()
26 | appDetail.packageName = packageName
27 | appDetail.versionName = packageInfo.versionName
28 | appDetail.versionCode = packageInfo.versionCode.toString()
29 | } catch (e: PackageManager.NameNotFoundException) {
30 | e.printStackTrace()
31 | }
32 | return appDetail
33 | }
34 |
35 | //suspend fun getAppIconByPackageName(context: Context, ApkTempSendActivityName: String): Drawable =
36 | // withContext(
37 | // Dispatchers.IO
38 | // ) {
39 | // val drawable: Drawable? = try {
40 | // context.packageManager?.getApplicationIcon(ApkTempSendActivityName)
41 | // } catch (e: PackageManager.NameNotFoundException) {
42 | // e.printStackTrace()
43 | // context.packageManager?.let { ContextCompat.getDrawable(context, R.mipmap.ic_launcher) }
44 | // }
45 | // drawable!!
46 | // }
47 |
48 | suspend fun Context.getAppIcon(packageName: String, activityName: String = ""): Drawable? {
49 | val pm = packageManager
50 | return if(activityName==""){
51 | withContext(
52 | Dispatchers.IO
53 | ) {
54 | val drawable: Drawable? = try {
55 | pm.getApplicationIcon(packageName)
56 | } catch (e: PackageManager.NameNotFoundException) {
57 | e.printStackTrace()
58 | packageManager?.let { ContextCompat.getDrawable(this@getAppIcon, R.mipmap.ic_launcher) }
59 | }
60 | return@withContext drawable!!
61 | }
62 | }else{
63 | val intent = Intent()
64 | intent.component = ComponentName(packageName, activityName)
65 | val resolveInfo = pm.resolveActivity(intent, 0)
66 | resolveInfo?.loadIcon(pm)
67 | }
68 |
69 | }
70 |
71 | fun isSystemPackage(resolveInfo: ResolveInfo): Boolean {
72 | return resolveInfo.activityInfo.applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM != 0
73 | }
74 |
75 | fun String?.isInstall(): Boolean {
76 | return try {
77 | if (this == null) {
78 | false
79 | } else {
80 | var pkgInfo: PackageInfo = appContext.packageManager.getPackageInfo(
81 | this.trim(),
82 | PackageManager.GET_ACTIVITIES
83 | )
84 | true
85 | }
86 | } catch (e: PackageManager.NameNotFoundException) {
87 | e.printStackTrace()
88 | false
89 | }
90 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/IFWExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import com.jakting.shareclean.utils.application.Companion.kv
6 | import com.jakting.shareclean.utils.application.Companion.settingSharedPreferences
7 |
8 | const val ifw_send_file_path = "/data/system/ifw/TigerInTheWall_Intent_send.xml"
9 | const val ifw_send_multi_file_path = "/data/system/ifw/TigerInTheWall_Intent_send_multi.xml"
10 | const val ifw_view_file_path = "/data/system/ifw/TigerInTheWall_Intent_view.xml"
11 | const val ifw_text_file_path = "/data/system/ifw/TigerInTheWall_Intent_text.xml"
12 | const val ifw_browser_file_path = "/data/system/ifw/TigerInTheWall_Intent_browser.xml"
13 | const val ifw_direct_share_file_path = "/data/system/ifw/TigerInTheWall_Intent_direct_share.xml"
14 |
15 | val intentTypeList = arrayListOf("1_share", "2_share_multi", "3_view", "4_text", "5_browser")
16 | fun getIFWContent(tag: String, intentString: String): String {
17 | return " \n" +
18 | " \n" +
19 | " \n" +
20 | " \n" +
21 | isBrowser(tag) +
22 | " \n" +
23 | " \n" +
24 | " \n" +
25 | " \n" +
26 | " \n" +
27 | " \n" +
28 | " \n" +
29 | " \n" +
30 | " \n"
31 | }
32 |
33 | fun isBrowser(tag: String): String {
34 | return if (tag == "5_browser") {
35 | " \n" +
36 | " \n" +
37 | " \n"
38 | } else
39 | " \n"
40 | }
41 |
42 | const val ifw_direct_share =
43 | "\n" +
44 | " \n" +
45 | " \n" +
46 | " \n" +
47 | " \n" +
48 | " \n" +
49 | "\n"
50 |
51 | fun getIFWPath(tag: String): String {
52 | return when (tag) {
53 | "1_share" -> ifw_send_file_path
54 | "2_share_multi" -> ifw_send_multi_file_path
55 | "3_view" -> ifw_view_file_path
56 | "4_text" -> ifw_text_file_path
57 | "5_browser" -> ifw_browser_file_path
58 | else -> ""
59 | }
60 | }
61 |
62 | fun getIFWAction(tag: String): String {
63 | return when (tag) {
64 | "1_share" -> Intent.ACTION_SEND
65 | "2_share_multi" -> Intent.ACTION_SEND_MULTIPLE
66 | "3_view", "5_browser" -> Intent.ACTION_VIEW
67 | "4_text" -> Intent.ACTION_PROCESS_TEXT
68 | else -> ""
69 | }
70 | }
71 |
72 | fun generateIfwFileContent(intentContentList: MutableList): String {
73 | var ifwContent = "\n"
74 | intentContentList.forEach {
75 | ifwContent += it
76 | }
77 | ifwContent += ""
78 | return ifwContent
79 | }
80 |
81 | fun Context?.writeIfwFiles(): Boolean {
82 | val intentTypeMap = HashMap>()
83 | intentTypeMap["1_share"] = mutableListOf()
84 | intentTypeMap["2_share_multi"] = mutableListOf()
85 | intentTypeMap["3_view"] = mutableListOf()
86 | intentTypeMap["4_text"] = mutableListOf()
87 | intentTypeMap["5_browser"] = mutableListOf()
88 | kv.allKeys()?.forEach { itKey ->
89 | if (kv.decodeBool(itKey) == settingSharedPreferences.getBoolean("pref_blacklist", true)) {
90 | intentTypeList.forEach { itType ->
91 | if (itKey.startsWith(itType)) {
92 | intentTypeMap[itType]?.add(getIFWContent(itType, itKey.replace("$itType/", "")))
93 | }
94 | }
95 | }
96 | }
97 | var result = true
98 | intentTypeList.forEach { itType ->
99 | if (runShell("touch ${getIFWPath(itType)}").isSuccess &&
100 | runShell(
101 | "echo '${generateIfwFileContent(intentTypeMap[itType]!!)}' > ${
102 | getIFWPath(
103 | itType
104 | )
105 | }"
106 | ).isSuccess
107 | ) {
108 | logd("写入${getIFWPath(itType)}成功")
109 | } else {
110 | result = false
111 | }
112 | }
113 | return result
114 | }
115 |
116 |
117 | fun deleteIfwFiles(type: String): Boolean {
118 | return when(type){
119 | "all" -> runShell("find /data/system/ifw/ -name \"TigerInTheWall_Intent*.xml\" -exec rm -rf {} \\; ").isSuccess
120 | "old" -> runShell("find /data/system/ifw/ -name \"RnIntentClean*.xml\" -exec rm -rf {} \\; ").isSuccess
121 | else -> runShell("rm -f ${getIFWPath(type)}").isSuccess
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/MessageExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.content.Context
4 | import android.util.Log
5 | import android.view.View
6 | import android.widget.Toast
7 | import com.google.android.material.snackbar.Snackbar
8 |
9 |
10 | fun Context?.logd(message: String) =
11 | if (isDebug()) {
12 | Log.d("TigerBeanst", message)
13 | } else {
14 | }
15 |
16 | fun Context?.toast(message: Any, isStringResId: Boolean = false) =
17 | if (isStringResId) {
18 | Toast.makeText(this, this!!.getString(message as Int), Toast.LENGTH_SHORT).show()
19 | } else {
20 | Toast.makeText(this, message.toString(), Toast.LENGTH_SHORT).show()
21 | }
22 |
23 |
24 | fun Context?.longtoast(message: CharSequence) =
25 | Toast.makeText(this, message, Toast.LENGTH_LONG).show()
26 |
27 | fun View.sbar(message: CharSequence) =
28 | Snackbar.make(this, message, Snackbar.LENGTH_SHORT)
29 |
30 | fun View.sbarlong(message: CharSequence) =
31 | Snackbar.make(this, message, Snackbar.LENGTH_LONG)
32 |
33 | fun View.sbarin(message: CharSequence) =
34 | Snackbar.make(this, message, Snackbar.LENGTH_INDEFINITE)
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/MiscExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.content.pm.ApplicationInfo
6 | import android.content.res.ColorStateList
7 | import android.content.res.Configuration
8 | import android.content.res.Resources
9 | import android.graphics.Rect
10 | import android.net.Uri
11 | import android.util.TypedValue
12 | import android.view.View
13 | import androidx.annotation.AttrRes
14 | import androidx.annotation.ColorInt
15 | import androidx.annotation.ColorRes
16 | import androidx.core.content.ContextCompat
17 | import com.jakting.shareclean.data.BackupEntity
18 | import com.jakting.shareclean.data.ComponentItem
19 | import com.jakting.shareclean.utils.application.Companion.kv
20 | import com.jakting.shareclean.utils.application.Companion.settingSharedPreferences
21 | import com.jakting.shareclean.utils.application.Companion.settingSharedPreferencesEditor
22 | import kotlinx.serialization.encodeToString
23 | import kotlinx.serialization.json.Json
24 | import kotlinx.serialization.json.JsonPrimitive
25 | import kotlinx.serialization.json.contentOrNull
26 | import kotlinx.serialization.json.jsonArray
27 | import kotlinx.serialization.json.jsonObject
28 | import java.io.BufferedReader
29 | import java.io.FileOutputStream
30 | import java.io.InputStreamReader
31 | import java.lang.reflect.Field
32 |
33 |
34 | fun Context.openLink(url: String) {
35 | val uri = Uri.parse(url)
36 | val intent = Intent(Intent.ACTION_VIEW, uri)
37 | startActivity(intent)
38 | }
39 |
40 | fun Context.backgroundColor(@ColorRes colorRes: Int): ColorStateList =
41 | ColorStateList.valueOf(ContextCompat.getColor(this, colorRes))
42 |
43 |
44 | @ColorInt
45 | fun Context.getColorFromAttr(
46 | @AttrRes attrColor: Int,
47 | typedValue: TypedValue = TypedValue(),
48 | resolveRefs: Boolean = true
49 | ): Int {
50 | theme.resolveAttribute(attrColor, typedValue, resolveRefs)
51 | return typedValue.data
52 | }
53 |
54 | fun getResId(resName: String, c: Class<*>): Int {
55 | return try {
56 | val idField: Field = c.getDeclaredField(resName)
57 | idField.getInt(idField)
58 | } catch (e: Exception) {
59 | e.printStackTrace()
60 | -1
61 | }
62 | }
63 |
64 | fun Context.isDarkMode(): Boolean {
65 | val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
66 | return currentNightMode == Configuration.UI_MODE_NIGHT_YES
67 | }
68 |
69 |
70 | fun Context.getPxFromDp(dp: Int): Int {
71 | val scale: Float = resources.displayMetrics.density
72 | return (dp * scale + 0.5f).toInt()
73 | }
74 |
75 | fun Context.getDpFromPx(px: Int): Int {
76 | val scale: Float = resources.displayMetrics.density
77 | return (px / scale + 0.5f).toInt()
78 | }
79 |
80 | fun View.isTotallyVisible(): Boolean {
81 | if (!isShown) {
82 | return false
83 | }
84 | val actualPosition = Rect()
85 | val isGlobalVisible = getGlobalVisibleRect(actualPosition)
86 | val screenWidth = Resources.getSystem().displayMetrics.widthPixels
87 | val screenHeight = Resources.getSystem().displayMetrics.heightPixels
88 | val screen = Rect(0, 0, screenWidth, screenHeight)
89 | return isGlobalVisible && Rect.intersects(actualPosition, screen)
90 | }
91 |
92 | fun Context?.isDebug(): Boolean {
93 | return try {
94 | val info = this!!.applicationInfo
95 | info.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0
96 | } catch (e: java.lang.Exception) {
97 | false
98 | }
99 | }
100 |
101 | fun Context.backupTIW(uri: Uri): Boolean {
102 | val settingsAll = settingSharedPreferences.all
103 | val mapForBackup = mutableMapOf()
104 | settingsAll.forEach { (k, v) ->
105 | mapForBackup[k] = v.toString()
106 | }
107 | val mmkvList = mutableListOf()
108 | kv.allKeys()?.forEach { key ->
109 | mmkvList.add(ComponentItem(key, kv.getBoolean(key, false)))
110 | }
111 | try {
112 | this.contentResolver.openFileDescriptor(uri, "w")?.use { fileDescriptor ->
113 | FileOutputStream(fileDescriptor.fileDescriptor).use {
114 | val backup = BackupEntity(mapForBackup, mmkvList)
115 | it.write(Json.encodeToString(backup).toByteArray())
116 | }
117 | }
118 | return true
119 | } catch (e: Exception) {
120 | e.printStackTrace()
121 | }
122 | return false
123 | }
124 |
125 | fun Context.restoreTIW(uri: Uri): Boolean {
126 | val stringBuilder = StringBuilder()
127 | try {
128 | this.contentResolver.openInputStream(uri)?.use { inputStream ->
129 | BufferedReader(InputStreamReader(inputStream)).use { reader ->
130 | var line: String? = reader.readLine()
131 | while (line != null) {
132 | stringBuilder.append(line)
133 | line = reader.readLine()
134 | }
135 | }
136 | }
137 | } catch (e: Exception) {
138 | e.printStackTrace()
139 | return false
140 | }
141 | val jsonElement = Json.parseToJsonElement(stringBuilder.toString())
142 | if (jsonElement.jsonObject.containsKey("settings")) { //v2.x
143 | jsonElement.jsonObject["settings"]!!.jsonObject.entries.forEach {
144 | if (it.value.toString() == "true" || it.value.toString() == "false") {
145 | settingSharedPreferencesEditor.putBoolean(it.key, it.value.toString().toBoolean())
146 | } else {
147 | settingSharedPreferencesEditor.putString(it.key, it.value.toString())
148 | }
149 | }
150 | jsonElement.jsonObject["components"]!!.jsonArray.forEach {
151 | kv.encode(
152 | (it.jsonObject["component"] as JsonPrimitive).contentOrNull,
153 | it.jsonObject["status"].toString().toBoolean()
154 | )
155 | }
156 | } else { //v1.x
157 | jsonElement.jsonObject.entries.forEach {
158 | val component = it.key.substringBeforeLast("/")
159 | val newType = when (it.key.substringAfterLast("/")) {
160 | "send" -> "1_share"
161 | "send_multi" -> "2_share_multi"
162 | "view" -> "3_view"
163 | "text" -> "4_text"
164 | "browser" -> "5_browser"
165 | else -> "5_browser"
166 | }
167 | kv.encode("$newType/$component", it.value.toString().toBoolean())
168 | }
169 | }
170 | return true
171 | }
172 |
173 | fun getBaseApi(): String {
174 | return when (settingSharedPreferences.getString("pref_mirrors", "0")) {
175 | "0" -> "https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall-files/master/quick-clean-rules"
176 | "1" -> "https://cdn.jsdelivr.net/gh/TigerBeanst/TigerInTheWall-files@master/quick-clean-rules"
177 | "2" -> "https://raw.fastgit.org/TigerBeanst/TigerInTheWall-files/master/quick-clean-rules"
178 | "99" -> settingSharedPreferences.getString("pref_mirrors_custom", "")!!
179 | else -> "https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall-files/master/quick-clean-rules"
180 | }
181 | }
182 |
183 |
184 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/ModuleAvailable.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 |
6 |
7 | class ModuleAvailable : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 |
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/ModuleCheckerExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.content.pm.PackageManager
6 | import com.jakting.shareclean.utils.application.Companion.appContext
7 | import com.topjohnwu.superuser.Shell
8 |
9 | fun moduleApplyAvailable(): Boolean {
10 | val resolveInfoList = appContext.packageManager!!.queryIntentActivities(
11 | Intent(Intent.ACTION_PROCESS_TEXT).setType("text/tigerinthewall"),
12 | PackageManager.MATCH_ALL
13 | )
14 | for (resolveInfo in resolveInfoList) {
15 | if (resolveInfo.activityInfo.packageName == appContext.packageName) {
16 | return false
17 | }
18 | }
19 | return true
20 | }
21 |
22 | fun Context?.moduleInfo(): Array {
23 | // 检查 Riru 版
24 | val riruShell = runShell("cat /data/adb/modules/riru_ifw_enhance_tiw/module.prop")
25 | if(riruShell.isSuccess){
26 | return arrayOf("Riru", moduleVersion(riruShell)[0]!!, moduleVersion(riruShell)[1]!!)
27 | }
28 | val zygiskShell = runShell("cat /data/adb/modules/zygisk_ifw_enhance_tiw/module.prop")
29 | if(zygiskShell.isSuccess){
30 | return arrayOf("Zygisk", moduleVersion(zygiskShell)[0]!!, moduleVersion(zygiskShell)[1]!!)
31 | }
32 | return arrayOf("", "", "")
33 | }
34 |
35 | fun Context?.moduleVersion(sr: Shell.Result): Array {
36 | val shellResult = sr.getPureCat()
37 | logd(shellResult)
38 | if (shellResult.isEmpty()) return arrayOf("", "")
39 | val version = Regex(".*?version=(.*?),.*?versionCode=(.*?),").find(shellResult)?.groupValues
40 | return arrayOf(version?.get(1), version?.get(2))
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/SerializationConverter.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("UNCHECKED_CAST", "MemberVisibilityCanBePrivate")
2 |
3 | package com.jakting.shareclean.utils
4 |
5 | import com.drake.net.NetConfig
6 | import com.drake.net.convert.NetConverter
7 | import com.drake.net.exception.ConvertException
8 | import com.drake.net.exception.RequestParamsException
9 | import com.drake.net.exception.ResponseException
10 | import com.drake.net.exception.ServerResponseException
11 | import com.drake.net.request.kType
12 | import kotlinx.serialization.json.Json
13 | import kotlinx.serialization.serializer
14 | import okhttp3.Response
15 | import org.json.JSONException
16 | import org.json.JSONObject
17 | import java.lang.reflect.Type
18 | import kotlin.reflect.KType
19 |
20 | class SerializationConverter(
21 | val success: String = "0",
22 | val code: String = "errorCode",
23 | val message: String = "errorMsg",
24 | ) : NetConverter {
25 |
26 | companion object {
27 | val jsonDecoder = Json {
28 | ignoreUnknownKeys = true // JSON和数据模型字段可以不匹配
29 | coerceInputValues = true // 如果JSON字段是Null则使用默认值
30 | }
31 | }
32 |
33 | override fun onConvert(succeed: Type, response: Response): R? {
34 | try {
35 | return NetConverter.onConvert(succeed, response)
36 | } catch (e: ConvertException) {
37 | val code = response.code
38 | when {
39 | code in 200..299 -> { // 请求成功
40 | val bodyString = response.body?.string() ?: return null
41 | val kType = response.request.kType
42 | ?: throw ConvertException(response, "Request does not contain KType")
43 | return try {
44 | val json = JSONObject(bodyString) // 获取JSON中后端定义的错误码和错误信息
45 | val srvCode = json.getString(this.code)
46 | if (srvCode == success) { // 对比后端自定义错误码
47 | json.getString("data").parseBody(kType)
48 | } else { // 错误码匹配失败, 开始写入错误异常
49 | val errorMessage = json.optString(
50 | message,
51 | NetConfig.app.getString(com.drake.net.R.string.no_error_message)
52 | )
53 | throw ResponseException(
54 | response,
55 | errorMessage,
56 | tag = srvCode
57 | ) // 将业务错误码作为tag传递
58 | }
59 | } catch (e: JSONException) { // 固定格式JSON分析失败直接解析JSON
60 | bodyString.parseBody(kType)
61 | }
62 | }
63 | code in 400..499 -> throw RequestParamsException(
64 | response,
65 | code.toString()
66 | ) // 请求参数错误
67 | code >= 500 -> throw ServerResponseException(response, code.toString()) // 服务器异常错误
68 | else -> throw ConvertException(response)
69 | }
70 | }
71 | }
72 |
73 | fun String.parseBody(succeed: KType): R? {
74 | return jsonDecoder.decodeFromString(Json.serializersModule.serializer(succeed), this) as R
75 | }
76 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/ShellExt.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import com.topjohnwu.superuser.Shell
4 |
5 |
6 | fun runShell(cmd: String): Shell.Result {
7 | return Shell.cmd(cmd).exec()
8 | }
9 |
10 | fun Shell.Result.getPureCat(): String {
11 | return this.out.toString().replace("[", "").replace("]", "")
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/jakting/shareclean/utils/application.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean.utils
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Application
5 | import android.content.Context
6 | import android.content.SharedPreferences
7 | import com.google.firebase.analytics.FirebaseAnalytics
8 | import com.google.firebase.analytics.ktx.analytics
9 | import com.google.firebase.ktx.Firebase
10 | import com.jakting.shareclean.BuildConfig
11 | import com.tencent.mmkv.MMKV
12 | import com.topjohnwu.superuser.Shell
13 |
14 |
15 | class application : Application() {
16 |
17 | init {
18 | Shell.enableVerboseLogging = BuildConfig.DEBUG
19 | Shell.setDefaultBuilder(Shell.Builder.create()
20 | .setFlags(Shell.FLAG_REDIRECT_STDERR)
21 | .setTimeout(10)
22 | )
23 | }
24 |
25 | @SuppressLint("CommitPrefEdits")
26 | override fun onCreate() {
27 | super.onCreate()
28 | MMKV.initialize(this)
29 | firebaseAnalytics = Firebase.analytics
30 | kv = MMKV.defaultMMKV()!!
31 | shell = Shell.getShell()
32 | appContext = applicationContext
33 | settingSharedPreferences = getSharedPreferences(appContext.packageName+"_preferences", MODE_PRIVATE)
34 | settingSharedPreferencesEditor = getSharedPreferences(appContext.packageName+"_preferences", MODE_PRIVATE).edit()
35 | }
36 |
37 | companion object {
38 | lateinit var appContext: Context
39 | lateinit var settingSharedPreferences: SharedPreferences
40 | lateinit var settingSharedPreferencesEditor: SharedPreferences.Editor
41 | lateinit var kv: MMKV
42 | lateinit var shell: Shell
43 | private lateinit var firebaseAnalytics: FirebaseAnalytics
44 | var chipShare = true
45 | var chipView = true
46 | var chipText = true
47 | var chipBrowser = true
48 | }
49 | }
--------------------------------------------------------------------------------
/app/src/main/res/color/bg_chip_state_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/drawable-v24/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_account_tree_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
15 |
20 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_arrow_back_24.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_auto_fix_high_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
18 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_backup_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_bug_report_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_check_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_check_circle_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_cleaning_services_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_data_object_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_deselect_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_file_open_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_help_24.xml:
--------------------------------------------------------------------------------
1 |
8 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_info_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_open_in_browser_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_output_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_public_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_ramen_dining_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_search_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_select_all_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_settings_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_settings_applications_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_share_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_text_fields_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_warning_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_twotone_yard_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
15 |
18 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_12dp_corners_primary_100.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_12dp_corners_primary_15.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_clean_manager.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
29 |
30 |
39 |
40 |
41 |
42 |
48 |
49 |
53 |
54 |
63 |
64 |
71 |
72 |
82 |
83 |
93 |
94 |
104 |
105 |
115 |
116 |
117 |
118 |
123 |
124 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
23 |
24 |
32 |
33 |
37 |
38 |
39 |
40 |
41 |
42 |
47 |
48 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_quick_clean.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
30 |
31 |
40 |
41 |
42 |
43 |
49 |
50 |
54 |
55 |
60 |
61 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
19 |
20 |
27 |
28 |
36 |
37 |
38 |
39 |
45 |
46 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_1_module.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
23 |
24 |
25 |
37 |
38 |
45 |
46 |
55 |
56 |
64 |
65 |
66 |
76 |
77 |
78 |
79 |
80 |
90 |
91 |
103 |
104 |
114 |
115 |
128 |
129 |
142 |
143 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_2_manage_clean.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
19 |
20 |
21 |
31 |
32 |
33 |
40 |
41 |
50 |
51 |
52 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_3_manage_quick.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
20 |
21 |
22 |
33 |
34 |
35 |
42 |
43 |
52 |
53 |
54 |
55 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_4_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
22 |
23 |
32 |
33 |
34 |
43 |
44 |
48 |
49 |
56 |
57 |
63 |
64 |
76 |
77 |
87 |
88 |
89 |
90 |
91 |
98 |
99 |
105 |
106 |
107 |
119 |
120 |
130 |
131 |
132 |
133 |
140 |
141 |
146 |
147 |
148 |
160 |
161 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
21 |
22 |
25 |
26 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_intent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
19 |
20 |
34 |
35 |
36 |
48 |
49 |
50 |
64 |
65 |
74 |
75 |
81 |
82 |
90 |
91 |
95 |
96 |
114 |
115 |
128 |
129 |
130 |
131 |
132 |
141 |
142 |
143 |
144 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_list_quick_clean_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
21 |
22 |
26 |
27 |
44 |
45 |
46 |
47 |
59 |
60 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_manager_clean.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
20 |
21 |
29 |
30 |
34 |
35 |
52 |
53 |
61 |
62 |
69 |
70 |
77 |
78 |
85 |
86 |
93 |
94 |
101 |
102 |
109 |
110 |
117 |
118 |
125 |
126 |
133 |
134 |
135 |
136 |
137 |
147 |
148 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_quick_clean_rule.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
30 |
31 |
32 |
33 |
45 |
46 |
55 |
56 |
62 |
63 |
71 |
72 |
76 |
77 |
95 |
96 |
109 |
110 |
111 |
112 |
113 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/sheet_quick_clean.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
16 |
17 |
28 |
29 |
34 |
35 |
39 |
40 |
49 |
50 |
61 |
62 |
72 |
73 |
83 |
84 |
95 |
96 |
105 |
106 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
138 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_manager_clean.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/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.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 48dp
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night-v29/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w1240dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 200dp
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 48dp
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 墙中虎
4 | 错误
5 | 确定
6 | 取消
7 | 请稍后…
8 | 即将来到…?
9 | 啥都没有。芜湖!💩
10 | 状态未知🤔
11 | 模块未安装💩
12 | 点此获取细节
13 | 已激活🥳
14 | 已安装模块版本:%s(%s)
15 | 注入接口:
16 | 状态未知
17 | 由于缺少权限,无法获取「IFW Enhance TIW」模块状态。\n\n「墙中虎」需要较高的系统权限以检查模块状态与清理意图。\n\n请确保您拥有 MagiskSU 之类的完整 Root 权限。诸如 MIUI 之类的系统自带的 Root 可能不完整。
18 | 更多
19 | https://ic.into.icu/zh-CN/download/
20 | 清理管理
21 | 鲨了他们
22 | 快速清理
23 | 云端规则
24 | 作者:%s
25 | 规则请求失败,请检查自定义规则地址是否正确
26 | 更新于 %s
27 | 上传于 %s
28 | 分享到
29 | 分享多份到
30 | 打开方式
31 | 长按文本
32 | 浏览器
33 | 应用详情
34 | 版本 v%s(%s)
35 | 导出规则
36 | 警告
37 | 这是一个系统应用。清理它很有可能会引起严重后果,请慎重考虑。
38 | 其它
39 | 备份 & 还原
40 | 设置
41 | 关于
42 | 杂项
43 | 清理完成
44 | 搜索
45 | 功能
46 | 显示系统应用
47 | 选择全部
48 | 取消全选
49 | 清理
50 | 高级
51 | 模块未安装
52 | 墙中虎无法找到模块「IFW Enhance TIW」。\n\n这通常意味着您所做的所有操作都不会生效,请确保您已正确安装模块。\n\n自新版本开始,墙中虎需要使用经过修改后的「IFW Enhance TIW」(而不是「IFW Enhance」)
53 | 黑名单模式
54 | 当前为黑名单模式,被选中的活动将会被清除,且永不出现在意图列表里。
55 | 当前为白名单模式,仅有选中的活动会保留在意图列表里。
56 | 显示系统应用,禁用系统应用意图可能会带来未知错误。
57 | 不显示系统应用,但您此前对系统应用进行的清理不会消失。
58 | 禁用「直接分享」
59 | 禁用未遭修改的分享面板中的「直接分享」。无法禁用 Android 10+ 设备上的直接分享。
60 | 启用未遭修改的分享面板中的「直接分享」。无法禁用 Android 10+ 设备上的直接分享。
61 | 网络
62 | 规则镜像
63 | 如果您连接 Github 的速率不佳,您可以尝试切换规则镜像。当前使用:%s
64 | 自定义
65 | 自定义规则仓库
66 | 备份
67 | 还原
68 | 为「墙中虎」创建一个备份配置文件,包括意图清理条目与设置。\n还原功能兼容「氡·意图清理」配置文件。
69 | 备份完成
70 | 备份时出现错误
71 | 还原完成
72 | 故障排除
73 | 重置成功
74 | 重置失败
75 | 重置 IFW 文件
76 | 这将删除所有由墙中虎所创建的 IFW 文件(其它 IFW 文件不受影响),此操作不会清除您的配置。
77 | 重置配置
78 | 这将清除墙中虎的配置,请确保您做好了备份。
79 | 二次确认
80 | 此操作不可撤销,请仅在墙中虎出现问题时操作。
81 | 墙中虎\nv%s(%s)
82 | 依赖库
83 |
84 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TigerInTheWall
3 | 錯誤
4 | 確定
5 | 取消
6 | 請稍後…
7 | 即將來到…?
8 |
9 | 啥都沒有。哇呼!💩
10 | 狀態未知🤔
11 | 模組未安裝💩
12 | 點此獲取細節
13 | 已啟用🥳
14 | 已安裝模組版本:%s(%s)
15 | 注入方式:
16 | 狀態未知
17 | 由於缺少許可權,無法獲得「IFW Enhance TIW」模組狀態。\n\n「TigerInTheWall」需要較高的系統許可權以檢查模組狀態與清理意圖。\n\n請確保您擁有 MagiskSU 之類的完整 Root 許可權。諸如 MIUI 之類的系統自帶的 Root 可能不完整。
18 | 模組未安裝
19 | TigerInTheWall 無法找到模組「IFW Enhance TIW」。\n\n這通常意味著您所做的所有操作都不會生效,請確保您已正確安裝模組。\n\n自新版本開始, TigerInTheWall 需要使用經過修改後的「IFW Enhance TIW」(而不是「IFW Enhance」)
20 | 更多
21 | https://ic.into.icu/zh-CN/download/
22 |
23 | 清理管理
24 | 鯊了他們
25 | 快速清理
26 | 雲端規則
27 | 作者:%s
28 | 更新於 %s
29 | 上傳於 %s
30 | 規則獲取失敗,請檢查自定義規則地址是否正確
31 |
32 | 分享到
33 | 分享多份到
34 | 開啟方式
35 | 長按文字
36 | 瀏覽器
37 | 搜尋
38 |
39 | 詳細資訊
40 | 版本 v%s(%s)
41 | 匯出規則
42 | 警告
43 | 這是一個系統應用程式。清理它很有可能會引起嚴重後果,請慎重考慮。
44 |
45 | 清理
46 | 選擇全部
47 | 取消全選
48 | 進階
49 | 清理完成
50 |
51 |
52 | 其它
53 | 備份 & 還原
54 | 設定
55 | 關於
56 | 雜項
57 |
58 | 備份
59 | 還原
60 | 為「TigerInTheWall」建立一個備份檔,包括意圖清理條目與設定。\n還原功能相容「氡·意圖清理」的備份。
61 | 備份完成
62 | 備份時出現錯誤
63 | 還原完成
64 |
65 |
66 | 活動
67 | 黑名單模式
68 | 目前為黑名單模式,被選中的活動將會被清除,且永不出現在意圖列表裡。
69 | 目前為白名單模式,僅有選中的活動會保留在意圖列表裡。
70 | 顯示系統應用程式
71 | 顯示系統應用程式,禁用系統應用程式意圖可能會帶來未知錯誤。
72 | 不顯示系統應用程式,但您此前對系統應用程式進行的清理不會消失。
73 | 禁用「直接分享」
74 | 禁用未遭修改的分享面板中的「直接分享」。無法禁用 Android 10+ 裝置上的直接分享。
75 | 啟用未遭修改的分享面板中的「直接分享」。無法禁用 Android 10+ 裝置上的直接分享。
76 |
77 | 網路
78 | 規則映象
79 | 如果您連線 Github 的速率不佳,您可以嘗試切換規則映象。當前使用:%s
80 | 自定
81 | 自定規則倉庫
82 |
83 | 故障排除
84 | 重置成功
85 | 重置失敗
86 | 重置 IFW 檔案
87 | 這將刪除所有由 TigerInTheWall 所建立的 IFW 檔案(其它 IFW 檔案不受影響),此操作不會清除您的配置。
88 | 重置設定
89 | 這將清除 TigerInTheWall 的設定,請確保您做好了備份。
90 | 再次確認
91 | 此動作不可取消,請僅在 TigerInTheWall 出現問題時操作。
92 |
93 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Github
4 | - jsDelivr
5 | - FastGit
6 | - @string/setting_rules_mirror_custom
7 |
8 |
9 | - 0
10 | - 1
11 | - 2
12 | - 99
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #72BEB9A9
4 |
5 | #672A00
6 | #FFFFFF
7 | #FFDBC9
8 | #351000
9 | #F6E1D4
10 | #C74C10
11 | #FFDBC9
12 | #351000
13 | #885200
14 | #FFFFFF
15 | #33FFA67E
16 | #601F00
17 | #B3261E
18 | #F9DEDC
19 | #FFFFFF
20 | #410E0B
21 | #FAF4F2
22 | #331202
23 | #FFFBFE
24 | #1C1B1F
25 | #E7E0EC
26 | #49454F
27 | #79747E
28 | #F4EFF4
29 | #313033
30 | #FFB690
31 | #000000
32 | #FFB690
33 |
34 | #FFB690
35 | #561F00
36 | #7A3000
37 | #FFDBC9
38 | #9E4314
39 | #FFB690
40 | #793100
41 | #FFDBC9
42 | #FFB860
43 | #482900
44 | #33FFA67E
45 | #FFDDB8
46 | #F2B8B5
47 | #8C1D18
48 | #601410
49 | #F9DEDC
50 | #1C1B1F
51 | #E6E1E5
52 | #1C1B1F
53 | #E6E1E5
54 | #49454F
55 | #CAC4D0
56 | #938F99
57 | #1C1B1F
58 | #E6E1E5
59 | #A14100
60 | #000000
61 | #A14100
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 | 16dp
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TigerInTheWall
3 | Error
4 | OK
5 | Cancel
6 | Placeholder
7 | Please wait…
8 | Coming Soon…?
9 |
10 | There is nothing. Surprise!💩
11 | Unknown status🤔
12 | Module not installed💩
13 | Click here for details
14 | Activated🥳
15 | Installed Module Version: %s(%s)
16 | Injection Interface:
17 | 🤐
18 | Unknown status
19 | Unable to check module \"IFW Enhance TIW\" status, due to lack of permission.\n\nTigerInTheWall needs higher system permission to check module and do cleaning.\n\nMake sure you have full root permission, such as MagiskSU. Systems such as MIUI may have an incomplete built-in Root.
20 | Module not installed
21 | TigerInTheWall cannot find module \"IFW Enhance TIW\".\n\nUsually, nothing you do will work. Make sure you have install module correctly.\n\nFrom the new version, TigerInTheWall needs to use the modified module \"IFW Enhance TIW\" (not \"IFW Enhance\")
22 | More
23 | https://ic.into.icu/download/
24 |
25 | App Cleaner
26 | Clean sh*t
27 | Quick Clean
28 | Cloud Clean Rules
29 | Author: %s
30 | Update At %s
31 | Upload At %s
32 | Failed to request rule list. If you use a custom repository, check whether the url is correct
33 |
34 | Share
35 | Share Multi
36 | Open With
37 | Press Text
38 | Browser
39 | HTTP/HTTPS
40 | Search
41 |
42 | App Detail
43 | Version v%s(%s)
44 | Output Rules
45 | WARNING
46 | This is a system application. Cleaning it MAY cause serious consequences, please think carefully.
47 |
48 | Clean
49 | Select All
50 | Deselect all
51 | Advanced
52 | Clean Finished
53 |
54 |
55 | Other
56 | Backup & Restore
57 | Settings
58 | About
59 | Miscellaneous
60 |
61 | Backup
62 | Restore
63 | Create a backup profile for the TigerInTheWall, including intent cleanup entries and settings. \n The restore function is compatible with the "RnIntentClean" files.
64 | Backup completed
65 | An error occurred when backup
66 | Restore completed
67 |
68 |
69 | Function
70 | Blacklist Mode
71 | Now in Blacklist mode. Selected activity will be cleaned and never show up in the intent list.
72 | Now in Whitelist mode. Only selected activity will be kept and show up in the intent list.
73 | Show System Apps
74 | Show System Apps. Disable system apps intent may cause unknown errors.
75 | Don\'t show System Apps. But the clean you applied before won\'t go away.
76 | Disable "Direct Share"
77 | Disable "Direct Share" of unmodified Sharesheet. Cannot disable "Direct Share" on Android 10+ devices.
78 | Enable "Direct Share" of unmodified Sharesheet. Cannot disable "Direct Share" on Android 10+ devices.
79 |
80 | Network
81 | Rules Mirrors
82 | If your connection to Github is not good, you can try switching mirrors. Current use: %s
83 | Custom
84 | Custom Rule Repository
85 |
86 | Troubleshooting
87 | Reset success
88 | Reset failed
89 | Reset IFW files
90 | This will delete all TigerInTheWall created IFW files(others won\'t be affected). It won\'t clear your configuration.
91 | Reset configuration
92 | This will clear TigerInTheWall\'s configuration, make sure you have a good backup.
93 | Secondary confirmation
94 | This action is irrevocable. Only do this if there is a problem with TigerInTheWall
95 |
96 | TigerInTheWall\nv%s(%s)
97 | Libraries
98 |
99 |
100 |
101 |
102 | - 0
103 | - 1
104 | - 2
105 | - 3
106 | - 4
107 | - 5
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
45 |
46 |
47 |
53 |
54 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
18 |
19 |
25 |
26 |
27 |
28 |
29 |
30 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
52 |
53 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/test/java/com/jakting/shareclean/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.jakting.shareclean
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | mavenCentral()
6 | maven {
7 | url "https://plugins.gradle.org/m2/"
8 | }
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:8.0.0'
12 | classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10'
13 | classpath 'org.jetbrains.kotlin:kotlin-serialization:1.8.10'
14 | classpath 'com.google.gms:google-services:4.3.15'
15 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
16 | }
17 | }
18 | plugins {
19 | id 'com.mikepenz.aboutlibraries.plugin' version "10.6.2" apply false
20 | }
21 |
22 | tasks.register('clean', Delete) {
23 | delete rootProject.buildDir
24 | }
--------------------------------------------------------------------------------
/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 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 | org.gradle.unsafe.configuration-cache=false
23 | android.defaults.buildfeatures.buildconfig=true
24 | android.nonTransitiveRClass=false
25 | android.nonFinalResIds=false
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TigerBeanst/TigerInTheWall/7825c8d6b8563cd57317fc9180bfe28a3a3d375a/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Oct 28 20:53:51 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | dependencyResolutionManagement {
2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3 | repositories {
4 | google()
5 | mavenCentral()
6 | maven { url "https://jitpack.io" }
7 | jcenter() // Warning: this repository is going to shut down soon
8 | }
9 | }
10 | rootProject.name = "TigerInTheWall"
11 | include ':app'
12 |
--------------------------------------------------------------------------------