├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── bug_report.yml ├── FUNDING.yml └── workflows │ ├── crowdin.yml │ ├── pull_request.yml │ └── main.yml ├── xposed ├── src │ └── main │ │ ├── assets │ │ └── xposed_init │ │ └── java │ │ └── icu │ │ └── nullptr │ │ └── hidemyapplist │ │ └── xposed │ │ ├── hook │ │ ├── IFrameworkHook.kt │ │ ├── PmsPackageEventsHook.kt │ │ ├── ActivityHook.kt │ │ ├── PlatformCompatHook.kt │ │ ├── AccessibilityHook.kt │ │ └── ContentProviderHook.kt │ │ ├── Utils4Xposed.kt │ │ ├── Logcat.kt │ │ ├── XposedEntry.kt │ │ └── UserService.kt ├── proguard-rules.pro └── build.gradle.kts ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── app ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── cont_k.webp │ │ │ ├── cont_fk.webp │ │ │ ├── cont_author.webp │ │ │ ├── cont_aviraxp.webp │ │ │ ├── cont_cpp_master.webp │ │ │ ├── cont_icon_designer.webp │ │ │ ├── divider.xml │ │ │ ├── ic_home_checkable.xml │ │ │ ├── ic_logs_checkable.xml │ │ │ ├── ic_settings_checkable.xml │ │ │ ├── baseline_add_24.xml │ │ │ ├── baseline_home_24.xml │ │ │ ├── outline_home_24.xml │ │ │ ├── baseline_arrow_back_24.xml │ │ │ ├── outline_delete_24.xml │ │ │ ├── outline_storage_24.xml │ │ │ ├── ic_outline_layers_24.xml │ │ │ ├── baseline_apps_24.xml │ │ │ ├── baseline_call_split_24.xml │ │ │ ├── outline_sd_storage_24.xml │ │ │ ├── outline_info_24.xml │ │ │ ├── outline_shield_24.xml │ │ │ ├── outline_shop_24.xml │ │ │ ├── outline_stop_circle_24.xml │ │ │ ├── outline_save_24.xml │ │ │ ├── outline_invert_colors_24.xml │ │ │ ├── baseline_refresh_24.xml │ │ │ ├── outline_edit_24.xml │ │ │ ├── outline_settings_backup_restore_24.xml │ │ │ ├── outline_hide_image_24.xml │ │ │ ├── baseline_assignment_24.xml │ │ │ ├── outline_format_color_fill_24.xml │ │ │ ├── outline_cleaning_services_24.xml │ │ │ ├── outline_translate_24.xml │ │ │ ├── baseline_my_location_24.xml │ │ │ ├── outline_speed_24.xml │ │ │ ├── outline_dark_mode_24.xml │ │ │ ├── outline_backup_24.xml │ │ │ ├── outline_update_disabled_24.xml │ │ │ ├── outline_android_24.xml │ │ │ ├── outline_assignment_24.xml │ │ │ ├── outline_discount_24.xml │ │ │ ├── sentiment_very_dissatisfied_24px.xml │ │ │ ├── outline_bug_report_24.xml │ │ │ ├── baseline_settings_24.xml │ │ │ ├── outline_language_24.xml │ │ │ ├── outline_palette_24.xml │ │ │ ├── sentiment_calm_24px.xml │ │ │ └── outline_settings_24.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ ├── layout │ │ │ ├── line.xml │ │ │ ├── switch_compat.xml │ │ │ ├── fragment_settings.xml │ │ │ ├── view_home_item.xml │ │ │ ├── view_app_item.xml │ │ │ ├── activity_main.xml │ │ │ ├── list_item_view.xml │ │ │ ├── fragment_logs.xml │ │ │ ├── fragment_app_select.xml │ │ │ ├── log_item_view.xml │ │ │ ├── app_item_view.xml │ │ │ ├── view_status_card.xml │ │ │ ├── fragment_template_settings.xml │ │ │ └── fragment_template_manage.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher_round.xml │ │ │ └── ic_launcher.xml │ │ ├── values │ │ │ ├── attrs.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── themes_overlay.xml │ │ │ ├── arrays.xml │ │ │ ├── styles.xml │ │ │ └── themes.xml │ │ ├── menu │ │ │ ├── menu_delete.xml │ │ │ ├── menu_about.xml │ │ │ ├── menu_app_list.xml │ │ │ └── menu_logs.xml │ │ ├── values-night │ │ │ └── styles.xml │ │ ├── xml │ │ │ ├── settings_data_isolation.xml │ │ │ ├── app_settings.xml │ │ │ └── settings.xml │ │ └── navigation │ │ │ └── home_nav_graph.xml │ │ ├── ic_launcher-playstore.png │ │ ├── java │ │ ├── icu │ │ │ └── nullptr │ │ │ │ └── hidemyapplist │ │ │ │ ├── util │ │ │ │ ├── SuUtils.kt │ │ │ │ └── ConfigUtils.kt │ │ │ │ ├── ui │ │ │ │ ├── util │ │ │ │ │ ├── Toast.kt │ │ │ │ │ ├── Fragment.kt │ │ │ │ │ └── ThemeUtils.kt │ │ │ │ ├── viewmodel │ │ │ │ │ ├── AppSettingsViewModel.kt │ │ │ │ │ └── TemplateSettingsViewModel.kt │ │ │ │ ├── fragment │ │ │ │ │ ├── AppManageFragment.kt │ │ │ │ │ └── ScopeFragment.kt │ │ │ │ ├── adapter │ │ │ │ │ ├── AppScopeAdapter.kt │ │ │ │ │ ├── AppManageAdapter.kt │ │ │ │ │ ├── AppSelectAdapter.kt │ │ │ │ │ └── TemplateAdapter.kt │ │ │ │ ├── view │ │ │ │ │ ├── AppItemView.kt │ │ │ │ │ └── ListItemView.kt │ │ │ │ └── activity │ │ │ │ │ └── AboutActivity.kt │ │ │ │ ├── service │ │ │ │ ├── ServiceProvider.kt │ │ │ │ └── ServiceClient.kt │ │ │ │ ├── receiver │ │ │ │ └── AppChangeReceiver.kt │ │ │ │ ├── data │ │ │ │ └── UpdateInfo.kt │ │ │ │ ├── MyApp.kt │ │ │ │ └── adapter │ │ │ │ └── LogAdapter.kt │ │ └── org │ │ │ └── frknkrc44 │ │ │ └── hma_oss │ │ │ └── ui │ │ │ └── activity │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle.kts ├── crowdin.yml ├── gradle.properties ├── common ├── src │ └── main │ │ ├── java │ │ └── icu │ │ │ └── nullptr │ │ │ └── hidemyapplist │ │ │ └── common │ │ │ ├── settings_presets │ │ │ ├── BasePreset.kt │ │ │ ├── ReplacementItem.kt │ │ │ ├── AccessibilityPreset.kt │ │ │ └── DeveloperOptionsPreset.kt │ │ │ ├── CommonUtils.kt │ │ │ ├── app_presets │ │ │ ├── XposedModulesPreset.kt │ │ │ ├── BasePreset.kt │ │ │ └── CustomROMPreset.kt │ │ │ ├── SettingsPresets.kt │ │ │ ├── Constants.java │ │ │ ├── JsonConfig.kt │ │ │ ├── Utils.kt │ │ │ └── AppPresets.kt │ │ └── aidl │ │ └── icu │ │ └── nullptr │ │ └── hidemyapplist │ │ └── common │ │ └── IHMAService.aidl ├── build.gradle.kts └── proguard-rules.pro ├── .gitattributes ├── settings.gradle.kts ├── README_zh_CN.md ├── .gitignore ├── README.md └── gradlew.bat /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /xposed/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | icu.nullptr.hidemyapplist.xposed.XposedEntry 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [frknkrc44] 2 | custom: ['https://github.com/sponsors/frknkrc44'] 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_k.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_k.webp -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_fk.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_fk.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_author.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_author.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_aviraxp.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_aviraxp.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_cpp_master.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_cpp_master.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cont_icon_designer.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/drawable/cont_icon_designer.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frknkrc44/HMA-fork-archived/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/hook/IFrameworkHook.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.xposed.hook 2 | 3 | interface IFrameworkHook { 4 | 5 | fun load() 6 | fun unload() 7 | fun onConfigChanged() {} 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/line.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | project_id_env: CROWDIN_PROJECT_ID 2 | api_token_env: CROWDIN_API_TOKEN 3 | preserve_hierarchy: 1 4 | files: 5 | - source: /app/src/main/res/values/strings.xml 6 | translation: /app/src/main/res/values-%android_code%/%original_file_name% 7 | type: android 8 | dest: /app/strings.xml 9 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | android.experimental.enableNewResourceShrinker.preciseShrinking=true 2 | android.enableAppCompileTimeRClass=true 3 | android.useAndroidX=true 4 | android.disableMinifyLocalDependenciesForLibraries=false 5 | android.enableJetifier=true 6 | org.gradle.jvmargs=-Xmx2048m "-XX:MaxMetaspaceSize=1024m" 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home_checkable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/util/SuUtils.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.util 2 | 3 | import com.topjohnwu.superuser.Shell 4 | 5 | object SuUtils { 6 | 7 | fun execPrivileged(cmd: String): Boolean { 8 | return Shell.cmd(cmd).exec().isSuccess && Shell.isAppGrantedRoot() == true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_logs_checkable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings_checkable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_delete.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/settings_presets/BasePreset.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common.settings_presets 2 | 3 | abstract class BasePreset(val name: String) { 4 | protected abstract val settingsKVPairs: List 5 | 6 | fun getSpoofedValue(key: String) = settingsKVPairs.firstOrNull { it.name == key } 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #607D8B 4 | #8F6B32 5 | #000000 6 | #154A74 7 | #375634 8 | #8F3232 9 | 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto eol=lf 3 | 4 | # Declare files that will always have CRLF line endings on checkout. 5 | *.cmd text eol=crlf 6 | *.bat text eol=crlf 7 | 8 | # Denote all files that are truly binary and should not be modified. 9 | *.so binary 10 | *.dex binary 11 | *.jar binary 12 | *.png binary 13 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/settings_presets/ReplacementItem.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common.settings_presets 2 | 3 | data class ReplacementItem( 4 | val name: String, 5 | val value: String? 6 | ) { 7 | override fun toString() = "ReplacementItem {" + 8 | " 'name': '$name'," + 9 | "'value': '$value'" + 10 | " }" 11 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_add_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_home_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/ui/util/Toast.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.ui.util 2 | 3 | import android.widget.Toast 4 | import androidx.annotation.StringRes 5 | import icu.nullptr.hidemyapplist.hmaApp 6 | 7 | fun makeToast(@StringRes resId: Int) { 8 | Toast.makeText(hmaApp, resId, Toast.LENGTH_SHORT).show() 9 | } 10 | 11 | fun makeToast(text: CharSequence) { 12 | Toast.makeText(hmaApp, text, Toast.LENGTH_SHORT).show() 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_home_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/util/ConfigUtils.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.util 2 | 3 | import icu.nullptr.hidemyapplist.service.PrefManager 4 | import java.util.Locale 5 | 6 | class ConfigUtils private constructor() { 7 | companion object { 8 | fun getLocale(): Locale { 9 | val tag = PrefManager.locale 10 | return if (tag == "SYSTEM") Locale.getDefault() 11 | else Locale.forLanguageTag(tag) 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /common/src/main/aidl/icu/nullptr/hidemyapplist/common/IHMAService.aidl: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common; 2 | 3 | interface IHMAService { 4 | 5 | void stopService(boolean cleanEnv) = 0; 6 | 7 | void syncConfig(String json) = 1; 8 | 9 | int getServiceVersion() = 2; 10 | 11 | int getFilterCount() = 3; 12 | 13 | String getLogs() = 4; 14 | 15 | void clearLogs() = 5; 16 | 17 | void handlePackageEvent(String eventType, String packageName) = 6; 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_arrow_back_24.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_delete_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_storage_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/CommonUtils.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common 2 | 3 | import android.os.SystemProperties 4 | 5 | object CommonUtils { 6 | 7 | val isAppDataIsolationEnabled: Boolean 8 | get() = SystemProperties.getBoolean(Constants.ANDROID_APP_DATA_ISOLATION_ENABLED_PROPERTY, true) 9 | 10 | val isVoldAppDataIsolationEnabled: Boolean 11 | get() = SystemProperties.getBoolean(Constants.ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY, false) 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_layers_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2dp 4 | 12dp 5 | 20dp 6 | 16dp 7 | 28dp 8 | 42dp 9 | 10 | 6dp 11 | 1dp 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_apps_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_call_split_24.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_sd_storage_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_info_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_shield_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_shop_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_stop_circle_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_save_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_invert_colors_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Xposed 2 | -keepclassmembers class icu.nullptr.hidemyapplist.MyApp { 3 | boolean isHooked; 4 | } 5 | 6 | # Enum class 7 | -keepclassmembers,allowoptimization enum * { 8 | public static **[] values(); 9 | public static ** valueOf(java.lang.String); 10 | } 11 | 12 | -keep class icu.nullptr.hidemyapplist.data.UpdateData { *; } 13 | -keep class icu.nullptr.hidemyapplist.data.UpdateData$* { *; } 14 | 15 | -keep,allowoptimization class * extends androidx.preference.PreferenceFragmentCompat 16 | -keepclassmembers class org.frknkrc44.hma_oss.databinding.** { 17 | public ; 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_refresh_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") 2 | 3 | pluginManagement { 4 | repositories { 5 | gradlePluginPortal() 6 | google() 7 | mavenCentral() 8 | } 9 | } 10 | 11 | dependencyResolutionManagement { 12 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 13 | repositories { 14 | google() 15 | mavenCentral() 16 | maven("https://jitpack.io") 17 | maven("https://api.xposed.info/") 18 | } 19 | } 20 | 21 | rootProject.name = "HMA-OSS" 22 | 23 | include( 24 | ":app", 25 | ":common", 26 | ":xposed" 27 | ) 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_edit_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_settings_backup_restore_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/settings_presets/AccessibilityPreset.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common.settings_presets 2 | 3 | import android.provider.Settings 4 | 5 | class AccessibilityPreset : BasePreset(NAME) { 6 | companion object { 7 | const val NAME = "accessibility" 8 | } 9 | 10 | override val settingsKVPairs = listOf( 11 | ReplacementItem( 12 | name = Settings.Secure.ACCESSIBILITY_ENABLED, 13 | value = "0", 14 | ), 15 | ReplacementItem( 16 | name = Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, 17 | value = "", 18 | ), 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/switch_compat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_hide_image_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_assignment_24.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/settings_presets/DeveloperOptionsPreset.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common.settings_presets 2 | 3 | import android.provider.Settings 4 | 5 | class DeveloperOptionsPreset : BasePreset("dev_options") { 6 | override val settingsKVPairs = listOf( 7 | ReplacementItem( 8 | name = Settings.Global.ADB_ENABLED, 9 | value = "0", 10 | ), 11 | ReplacementItem( 12 | name = "adb_wifi_enabled", 13 | value = "0", 14 | ), 15 | ReplacementItem( 16 | name = Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 17 | value = "0", 18 | ), 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_format_color_fill_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_cleaning_services_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_translate_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_my_location_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_speed_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_dark_mode_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_backup_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/crowdin.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Action 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ master ] 7 | paths: 8 | - app/src/main/res/values/strings.xml 9 | 10 | jobs: 11 | synchronize-with-crowdin: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v4 16 | 17 | - name: crowdin action 18 | uses: crowdin/github-action@master 19 | with: 20 | upload_translations: false 21 | download_translations: false 22 | upload_sources: true 23 | config: 'crowdin.yml' 24 | crowdin_branch_name: master 25 | env: 26 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 27 | CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_update_disabled_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_android_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/ui/viewmodel/AppSettingsViewModel.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.ui.viewmodel 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.ViewModelProvider 5 | import icu.nullptr.hidemyapplist.common.JsonConfig 6 | 7 | class AppSettingsViewModel(val pack: Pack) : ViewModel() { 8 | 9 | class Factory(private val pack: Pack) : ViewModelProvider.Factory { 10 | override fun create(modelClass: Class): T { 11 | if (modelClass.isAssignableFrom(AppSettingsViewModel::class.java)) { 12 | @Suppress("UNCHECKED_CAST") 13 | return AppSettingsViewModel(pack) as T 14 | } else throw IllegalArgumentException("Unknown ViewModel class") 15 | } 16 | } 17 | 18 | class Pack( 19 | val app: String, 20 | var enabled: Boolean, 21 | val config: JsonConfig.AppConfig 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_assignment_24.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /common/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.agp.lib) 3 | alias(libs.plugins.refine) 4 | alias(libs.plugins.kotlin) 5 | alias(libs.plugins.kotlin.serialization) 6 | } 7 | 8 | val configVerCode: Int by rootProject.extra 9 | val serviceVerCode: Int by rootProject.extra 10 | val minBackupVerCode: Int by rootProject.extra 11 | 12 | android { 13 | namespace = "org.frknkrc44.hma_oss.common" 14 | 15 | buildFeatures { 16 | aidl = true 17 | buildConfig = true 18 | } 19 | 20 | defaultConfig { 21 | buildConfigField("int", "CONFIG_VERSION", configVerCode.toString()) 22 | buildConfigField("int", "SERVICE_VERSION", serviceVerCode.toString()) 23 | buildConfigField("int", "MIN_BACKUP_VERSION", minBackupVerCode.toString()) 24 | } 25 | } 26 | 27 | kotlin { 28 | jvmToolchain(21) 29 | } 30 | 31 | dependencies { 32 | api(libs.kotlinx.serialization.json) 33 | compileOnly(libs.dev.rikka.hidden.stub) 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_bug_report_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/xml/settings_data_isolation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/SettingsPresets.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common 2 | 3 | import icu.nullptr.hidemyapplist.common.settings_presets.AccessibilityPreset 4 | import icu.nullptr.hidemyapplist.common.settings_presets.BasePreset 5 | import icu.nullptr.hidemyapplist.common.settings_presets.DeveloperOptionsPreset 6 | 7 | class SettingsPresets private constructor() { 8 | private val presetList = mutableListOf() 9 | 10 | companion object { 11 | private var hiddenInstance: SettingsPresets? = null 12 | 13 | val instance: SettingsPresets 14 | get() { 15 | if (hiddenInstance == null) { 16 | hiddenInstance = SettingsPresets() 17 | } 18 | 19 | return hiddenInstance!! 20 | } 21 | } 22 | 23 | fun getAllPresetNames() = presetList.map { it.name }.toTypedArray() 24 | // fun filterPresetsByName(names: Array) = presetList.filter { names.contains(it.name) } 25 | fun getPresetByName(name: String) = presetList.firstOrNull { it.name == name } 26 | 27 | init { 28 | presetList.add(DeveloperOptionsPreset()) 29 | presetList.add(AccessibilityPreset()) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_home_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_language_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_app_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 21 | 22 | 26 | 27 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /README_zh_CN.md: -------------------------------------------------------------------------------- 1 | # HMA-OSS 2 | 3 | [![Stars](https://img.shields.io/github/stars/frknkrc44/HMA-OSS?label=Stars)](https://github.com/frknkrc44) 4 | [![Build](https://img.shields.io/github/actions/workflow/status/frknkrc44/HMA-OSS/main.yml?branch=master&logo=github)](https://github.com/frknkrc44/HMA-OSS/actions) 5 | [![Release](https://img.shields.io/github/v/release/frknkrc44/HMA-OSS?label=Release)](https://github.com/frknkrc44/HMA-OSS/releases/latest) 6 | [![Download](https://img.shields.io/github/downloads/frknkrc44/HMA-OSS/total)](https://github.com/frknkrc44/HMA-OSS/releases/latest) 7 | [![Channel](https://img.shields.io/badge/Telegram-Channel-blue.svg?logo=telegram)](https://t.me/aerathfuns) 8 | [![License](https://img.shields.io/github/license/frknkrc44/HMA-OSS?label=License)](https://choosealicense.com/licenses/gpl-3.0/) 9 | 10 | - [English](README.md) 11 | - 中文(简体) 12 | 13 | ## 关于该模块 14 | 虽然“检测安装的应用”是不正确的做法,但是并不是所有的与 root 相关联的插件类应用都提供了随机包名支持。这就意味着检测到安装了此类应用(如 Fake Location 、存储空间隔离)与检测到了 root 本身区别不大。(会使用检测手段的 app 可不会认为你是在“我就蹭蹭不进去”) 15 | 与此同时,部分“不安分”的应用会使用各种漏洞绕过系统权限来获取你的应用列表,从而对你建立用户画像。(如陈叔叔将安装了 V2Ray 的用户分为一类),或是类似于某某校园某某乐跑的软件会要求你卸载作弊软件。 16 | 该模块提供了一些检测方式用于测试您是否成功地隐藏了某些特定的包名,如 Magisk/Edxposed Manager;同时可作为 Xposed 模块用于隐藏应用列表或特定应用,保护隐私。 17 | 18 | ## 更新日志 19 | [参考发布页面](https://github.com/frknkrc44/HMA-OSS/releases) 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /xposed/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.github.kyuubiran.ezxhelper.utils.** { *; } 2 | -keep class icu.nullptr.hidemyapplist.xposed.XposedEntry { *; } 3 | -dontwarn java.lang.invoke.StringConcatFactory 4 | -dontwarn android.content.res.XModuleResources 5 | -dontwarn android.content.res.XResources 6 | -dontwarn de.robv.android.xposed.IXposedHookLoadPackage 7 | -dontwarn de.robv.android.xposed.IXposedHookZygoteInit$StartupParam 8 | -dontwarn de.robv.android.xposed.IXposedHookZygoteInit 9 | -dontwarn de.robv.android.xposed.XC_MethodHook$MethodHookParam 10 | -dontwarn de.robv.android.xposed.XC_MethodHook$Unhook 11 | -dontwarn de.robv.android.xposed.XC_MethodHook 12 | -dontwarn de.robv.android.xposed.XC_MethodReplacement 13 | -dontwarn de.robv.android.xposed.XposedBridge 14 | -dontwarn de.robv.android.xposed.XposedHelpers 15 | -dontwarn de.robv.android.xposed.callbacks.XC_LoadPackage$LoadPackageParam 16 | -dontwarn org.bouncycastle.jsse.BCSSLParameters 17 | -dontwarn org.bouncycastle.jsse.BCSSLSocket 18 | -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider 19 | -dontwarn org.conscrypt.Conscrypt$Version 20 | -dontwarn org.conscrypt.Conscrypt 21 | -dontwarn org.conscrypt.ConscryptHostnameVerifier 22 | -dontwarn org.openjsse.javax.net.ssl.SSLParameters 23 | -dontwarn org.openjsse.javax.net.ssl.SSLSocket 24 | -dontwarn org.openjsse.net.ssl.OpenJSSE 25 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/receiver/AppChangeReceiver.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.receiver 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.content.IntentFilter 7 | import android.util.Log 8 | import icu.nullptr.hidemyapplist.util.PackageHelper 9 | 10 | class AppChangeReceiver : BroadcastReceiver() { 11 | 12 | companion object { 13 | private const val TAG = "AppChangeReceiver" 14 | 15 | private val actions = setOf( 16 | Intent.ACTION_PACKAGE_ADDED, 17 | Intent.ACTION_PACKAGE_REMOVED, 18 | Intent.ACTION_PACKAGE_REPLACED 19 | ) 20 | 21 | fun register(context: Context) { 22 | val filter = IntentFilter().apply { 23 | actions.forEach(::addAction) 24 | addDataScheme("package") 25 | } 26 | context.registerReceiver(AppChangeReceiver(), filter) 27 | } 28 | } 29 | 30 | override fun onReceive(context: Context, intent: Intent) { 31 | if (intent.action in actions) { 32 | Log.i(TAG, "Received intent: $intent") 33 | PackageHelper.invalidateCache() 34 | // ServiceClient.handlePackageEvent(intent.action, intent.data?.encodedSchemeSpecificPart) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | build: 7 | name: Build on ${{ matrix.os }} 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | os: [ ubuntu-latest ] 13 | if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }} 14 | 15 | steps: 16 | - name: Check out 17 | uses: actions/checkout@v4 18 | with: 19 | submodules: 'recursive' 20 | fetch-depth: 0 21 | 22 | - name: Gradle wrapper validation 23 | uses: gradle/wrapper-validation-action@v3 24 | 25 | - name: Set up JDK 21 26 | uses: actions/setup-java@v4 27 | with: 28 | java-version: '21' 29 | distribution: 'temurin' 30 | 31 | - name: Write properties 32 | run: | 33 | echo buildWithGitSuffix=true >> local.properties 34 | 35 | - name: Gradle prebuild 36 | run: | 37 | echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties 38 | ./gradlew prebuild 39 | 40 | - name: Build debug 41 | id: buildDebug 42 | run: | 43 | ./gradlew :app:assembleDebug 44 | echo "debugName=$(ls app/build/apk/debug/HMA*-debug.apk | awk -F '(/|.apk)' '{print $6}')" >> $GITHUB_OUTPUT 45 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_palette_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 16 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /common/src/main/java/icu/nullptr/hidemyapplist/common/app_presets/BasePreset.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.common.app_presets 2 | 3 | import android.content.pm.ApplicationInfo 4 | 5 | abstract class BasePreset(val name: String) { 6 | protected abstract val exactPackageNames: Set 7 | protected val packageNames = mutableSetOf() 8 | 9 | protected abstract fun canBeAddedIntoPreset(appInfo: ApplicationInfo): Boolean 10 | 11 | fun isDynamicListEmpty() = packageNames.isEmpty() 12 | 13 | fun containsPackage(packageName: String) = exactPackageNames.contains(packageName) || packageNames.contains(packageName) 14 | 15 | fun addPackageInfoPreset(appInfo: ApplicationInfo): Boolean { 16 | val packageName = appInfo.packageName 17 | if (!exactPackageNames.contains(packageName) && canBeAddedIntoPreset(appInfo)) { 18 | packageNames.add(packageName) 19 | return true 20 | } 21 | 22 | return false 23 | } 24 | 25 | fun removePackageFromPreset(packageName: String): Boolean { 26 | if (exactPackageNames.contains(packageName)) return false 27 | return packageNames.remove(packageName) 28 | } 29 | 30 | override fun toString() = "${javaClass.simpleName} {" + 31 | " \"exactPackageNames\": $exactPackageNames," + 32 | " \"packageNames\": $packageNames" + 33 | " }" 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sentiment_calm_24px.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/data/UpdateInfo.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | class UpdateInfo( 6 | val versionName: String, 7 | val versionCode: Int, 8 | val content: String, 9 | val downloadUrl: String 10 | ) 11 | 12 | @Serializable 13 | private data class UpdateData( 14 | val release: Item?, 15 | val beta: Item? 16 | ) { 17 | @Serializable 18 | data class Item( 19 | val versionName: String, 20 | val versionCode: Int, 21 | val downloadUrl: String 22 | ) 23 | } 24 | 25 | suspend fun fetchLatestUpdate(): UpdateInfo? { 26 | /* 27 | val updateData = RxHttp.get(Constants.UPDATE_URL_BASE + "updates.json") 28 | .toAwait() 29 | .tryAwait() ?: return null 30 | val isBeta = PrefManager.receiveBetaUpdate && updateData.beta != null 31 | val item = (if (isBeta) updateData.beta else updateData.release) ?: return null 32 | val variantPrefix = if (isBeta) "beta" else "release" 33 | val languagePrefix = if (Locale.getDefault().language.contains("zh")) "zh" else "en" 34 | val content = RxHttp.get(Constants.UPDATE_URL_BASE + variantPrefix + "-" + languagePrefix + ".html") 35 | .toAwaitString() 36 | .tryAwait() ?: return null 37 | return UpdateInfo(item.versionName, item.versionCode, content, item.downloadUrl) 38 | */ 39 | return null 40 | } 41 | -------------------------------------------------------------------------------- /.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 | app/debug 20 | 21 | # Gradle files 22 | .gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # IntelliJ 41 | *.iml 42 | .idea/ 43 | 44 | # Keystore files 45 | # Uncomment the following lines if you do not want to check your keystore files in. 46 | #*.jks 47 | #*.keystore 48 | 49 | # External native build folder generated in Android Studio 2.2 and later 50 | .externalNativeBuild 51 | .cxx/ 52 | 53 | # Google Services (e.g. APIs or Firebase) 54 | google-services.json 55 | 56 | # Freeline 57 | freeline.py 58 | freeline/ 59 | freeline_project_description.json 60 | 61 | # fastlane 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | fastlane/readme.md 67 | 68 | # Version control 69 | vcs.xml 70 | 71 | # lint 72 | lint/intermediates/ 73 | lint/generated/ 74 | lint/outputs/ 75 | lint/tmp/ 76 | # lint/reports/ 77 | 78 | # Android Profiling 79 | *.hprof 80 | 81 | updates/ -------------------------------------------------------------------------------- /app/src/main/java/icu/nullptr/hidemyapplist/ui/viewmodel/TemplateSettingsViewModel.kt: -------------------------------------------------------------------------------- 1 | package icu.nullptr.hidemyapplist.ui.viewmodel 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.ViewModelProvider 5 | import icu.nullptr.hidemyapplist.service.ConfigManager 6 | import icu.nullptr.hidemyapplist.ui.fragment.TemplateSettingsFragmentArgs 7 | import kotlinx.coroutines.flow.MutableStateFlow 8 | 9 | class TemplateSettingsViewModel( 10 | val originalName: String?, 11 | val isWhiteList: Boolean, 12 | var name: String? 13 | ) : ViewModel() { 14 | 15 | class Factory(private val args: TemplateSettingsFragmentArgs) : ViewModelProvider.Factory { 16 | override fun create(modelClass: Class): T { 17 | if (modelClass.isAssignableFrom(TemplateSettingsViewModel::class.java)) { 18 | val viewModel = TemplateSettingsViewModel(args.name, args.isWhiteList, args.name) 19 | args.name?.let { 20 | viewModel.appliedAppList.value = ConfigManager.getTemplateAppliedAppList(it) 21 | viewModel.targetAppList.value = ConfigManager.getTemplateTargetAppList(it) 22 | } 23 | @Suppress("UNCHECKED_CAST") 24 | return viewModel as T 25 | } else throw IllegalArgumentException("Unknown ViewModel class") 26 | } 27 | } 28 | 29 | val appliedAppList = MutableStateFlow>(ArrayList()) 30 | val targetAppList = MutableStateFlow>(ArrayList()) 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 26 | 27 |