├── app ├── src │ └── main │ │ ├── res │ │ ├── resources.properties │ │ ├── xml │ │ │ ├── prefs_blank.xml │ │ │ ├── prefs_storage.xml │ │ │ ├── prefs_net_wifi.xml │ │ │ ├── prefs_net_misc.xml │ │ │ ├── sounds_paths.xml │ │ │ ├── prefs_search.xml │ │ │ ├── prefs_net_cellular.xml │ │ │ ├── prefs_audio.xml │ │ │ ├── prefs_blacklist.xml │ │ │ ├── prefs_developer.xml │ │ │ └── prefs_apps.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── values-night-v31 │ │ │ ├── styles.xml │ │ │ └── colors.xml │ │ ├── drawable │ │ │ ├── search_bg.xml │ │ │ ├── step_track_drawable.xml │ │ │ ├── header.xml │ │ │ ├── circle_selector.xml │ │ │ ├── popup_background.xml │ │ │ ├── normal_dialog_background.xml │ │ │ ├── circle.xml │ │ │ ├── ic_baseline_space_bar_24.xml │ │ │ ├── circle_disabled.xml │ │ │ ├── ic_baseline_signal_cellular_4_bar_24.xml │ │ │ ├── ic_baseline_add_24.xml │ │ │ ├── ic_baseline_home_24.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── ic_baseline_get_app_24.xml │ │ │ ├── ic_baseline_check_24.xml │ │ │ ├── ic_baseline_vertical_align_top_24.xml │ │ │ ├── ic_baseline_vertical_align_bottom_24.xml │ │ │ ├── ic_baseline_format_size_24.xml │ │ │ ├── window_restore.xml │ │ │ ├── credit_card.xml │ │ │ ├── ic_baseline_view_grid_24.xml │ │ │ ├── ic_playlist_remove_24dp.xml │ │ │ ├── ic_baseline_delete_24.xml │ │ │ ├── baseline_error_24.xml │ │ │ ├── do_not_disturb.xml │ │ │ ├── ic_baseline_remove_circle_24.xml │ │ │ ├── ic_baseline_fullscreen_24.xml │ │ │ ├── splash.xml │ │ │ ├── ic_baseline_playlist_add_24.xml │ │ │ ├── ic_baseline_view_grid_plus_24.xml │ │ │ ├── baseline_computer_24.xml │ │ │ ├── rounded_corner_ripple.xml │ │ │ ├── ic_baseline_signal_wifi_4_bar_24.xml │ │ │ ├── ic_baseline_smartphone_24.xml │ │ │ ├── ic_baseline_videocam_24.xml │ │ │ ├── ic_baseline_tv_24.xml │ │ │ ├── border_left_variant.xml │ │ │ ├── ic_baseline_email_24.xml │ │ │ ├── battery_full.xml │ │ │ ├── ic_baseline_sms_failed_24.xml │ │ │ ├── circle_shadow.xml │ │ │ ├── ic_baseline_priority_high_24.xml │ │ │ ├── ic_baseline_sd_card_24.xml │ │ │ ├── ic_baseline_security_24.xml │ │ │ ├── microphone.xml │ │ │ ├── battery_10.xml │ │ │ ├── battery_20.xml │ │ │ ├── battery_30.xml │ │ │ ├── battery_40.xml │ │ │ ├── battery_50.xml │ │ │ ├── battery_60.xml │ │ │ ├── battery_70.xml │ │ │ ├── battery_80.xml │ │ │ ├── battery_90.xml │ │ │ ├── ic_baseline_airplanemode_active_24.xml │ │ │ ├── ic_baseline_highlight_24.xml │ │ │ ├── ic_baseline_sd_storage_24.xml │ │ │ ├── ic_baseline_toggle_on_24.xml │ │ │ ├── ic_baseline_undo_24.xml │ │ │ ├── ic_baseline_apps_24.xml │ │ │ ├── patreon.xml │ │ │ ├── ic_baseline_edit_24.xml │ │ │ ├── sim_off.xml │ │ │ ├── border_right_variant.xml │ │ │ ├── custom_divider.xml │ │ │ ├── microsoft_windows.xml │ │ │ ├── record.xml │ │ │ ├── battery_charging_100.xml │ │ │ ├── ic_baseline_disc_full_24.xml │ │ │ ├── ic_baseline_save_24.xml │ │ │ ├── ic_percent.xml │ │ │ ├── ic_baseline_location_on_24.xml │ │ │ ├── baseline_flashlight_on_24.xml │ │ │ ├── battery_charging_40.xml │ │ │ ├── battery_charging_50.xml │ │ │ ├── battery_charging_80.xml │ │ │ ├── battery_charging_90.xml │ │ │ ├── animation.xml │ │ │ ├── battery_charging_30.xml │ │ │ ├── battery_charging_60.xml │ │ │ ├── battery_charging_70.xml │ │ │ ├── ic_baseline_battery_alert_24.xml │ │ │ ├── ic_baseline_bluetooth_24.xml │ │ │ ├── ic_baseline_more_vert_24.xml │ │ │ ├── ic_baseline_battery_plus_24.xml │ │ │ ├── ic_baseline_format_list_numbered_24.xml │ │ │ ├── ic_baseline_more_horiz_24.xml │ │ │ ├── transparency.xml │ │ │ ├── ic_baseline_build_24.xml │ │ │ ├── ic_baseline_notifications_24.xml │ │ │ ├── top_rounded_rect.xml │ │ │ ├── ic_baseline_volume_up_24.xml │ │ │ ├── battery_charging_10.xml │ │ │ ├── battery_charging_20.xml │ │ │ ├── baseline_lock_24.xml │ │ │ ├── ic_baseline_cast_24.xml │ │ │ ├── ic_baseline_visibility_24.xml │ │ │ ├── ic_baseline_search_24.xml │ │ │ ├── ic_baseline_sync_24.xml │ │ │ ├── ic_baseline_brightness_7_24.xml │ │ │ ├── ic_baseline_invert_colors_24.xml │ │ │ ├── ic_baseline_phonelink_ring_24.xml │ │ │ ├── telegram.xml │ │ │ ├── ic_baseline_nfc_24.xml │ │ │ ├── ic_baseline_restore_24.xml │ │ │ ├── ic_baseline_notifications_paused_24.xml │ │ │ ├── ic_baseline_developer_mode_24.xml │ │ │ ├── ic_baseline_help_outline_24.xml │ │ │ ├── ic_baseline_emoji_people_24.xml │ │ │ ├── ic_baseline_snooze_24.xml │ │ │ ├── lock_open.xml │ │ │ ├── ic_baseline_android_24.xml │ │ │ ├── message_text_lock.xml │ │ │ ├── ic_baseline_data_usage_24.xml │ │ │ ├── earth.xml │ │ │ ├── ic_baseline_translate_24.xml │ │ │ ├── icon_unpadded.xml │ │ │ ├── tools.xml │ │ │ ├── foreground_unscaled.xml │ │ │ ├── no_ads.xml │ │ │ ├── ic_baseline_adb_24.xml │ │ │ ├── tap_hold.xml │ │ │ ├── heart_outline.xml │ │ │ ├── ic_baseline_attach_money_24.xml │ │ │ ├── ic_network.xml │ │ │ ├── ic_baseline_volume_off_24.xml │ │ │ ├── baseline_bug_report_24.xml │ │ │ ├── ic_baseline_notifications_off_24.xml │ │ │ ├── ic_baseline_screen_rotation_24.xml │ │ │ ├── ic_baseline_notifications_active_24.xml │ │ │ ├── ic_baseline_camera_24.xml │ │ │ ├── ic_baseline_wifi_tethering_24.xml │ │ │ ├── sad_face.xml │ │ │ ├── ic_baseline_touch_app_24.xml │ │ │ ├── ic_baseline_nights_stay_24.xml │ │ │ ├── ic_launcher_foreground.xml │ │ │ ├── progress_clock.xml │ │ │ ├── ic_baseline_color_lens_24.xml │ │ │ ├── penguin.xml │ │ │ ├── ic_baseline_screen_lock_rotation_24.xml │ │ │ ├── ic_baseline_visibility_off_24.xml │ │ │ ├── baseline_keyboard_command_key_24.xml │ │ │ ├── twitter.xml │ │ │ ├── light_dark.xml │ │ │ ├── link.xml │ │ │ └── mastodon.xml │ │ ├── anim │ │ │ ├── list_initial_anim.xml │ │ │ ├── scale_in.xml │ │ │ └── scale_out.xml │ │ ├── values │ │ │ └── dimens.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher_round.xml │ │ │ └── ic_launcher.xml │ │ ├── layout │ │ │ ├── search.xml │ │ │ ├── seekbar_dialog.xml │ │ │ ├── secure_switch.xml │ │ │ ├── lockscreen_shortcuts.xml │ │ │ ├── checkbox.xml │ │ │ ├── steps_list_item.xml │ │ │ ├── base_message_pref_dialog_layout.xml │ │ │ ├── dialog_add_qs_tile.xml │ │ │ ├── list_dialog.xml │ │ │ ├── pref_card.xml │ │ │ ├── dialog_add_intent_qs.xml │ │ │ ├── supporters_dialog.xml │ │ │ ├── activity_qs_editor.xml │ │ │ ├── dialog_add_custom_qs.xml │ │ │ ├── steps_list_command.xml │ │ │ ├── activity_demo_mode.xml │ │ │ └── touchwiz_navigation_bar_color_dialog.xml │ │ ├── values-v31 │ │ │ ├── styles.xml │ │ │ └── colors.xml │ │ ├── drawable-v31 │ │ │ └── ic_launcher_background.xml │ │ └── menu │ │ │ ├── menu_qs_editor.xml │ │ │ ├── menu_help.xml │ │ │ └── menu_search.xml │ │ ├── ic_launcher-playstore.png │ │ ├── aidl │ │ └── com │ │ │ └── zacharee1 │ │ │ └── systemuituner │ │ │ ├── IManager.aidl │ │ │ ├── data │ │ │ └── SavedOption.aidl │ │ │ ├── IOSSelectionCallback.aidl │ │ │ ├── IUISoundSelectionCallback.aidl │ │ │ ├── ILockscreenShortcutSelectedCallback.aidl │ │ │ ├── IImmersiveSelectionCallback.aidl │ │ │ └── IShizukuOperationsService.aidl │ │ └── java │ │ └── com │ │ └── zacharee1 │ │ └── systemuituner │ │ ├── interfaces │ │ ├── INoPersistPreference.kt │ │ ├── IOptionDialogCallback.kt │ │ ├── IDialogPreference.kt │ │ ├── ISpecificPreference.kt │ │ ├── IDangerousPreference.kt │ │ ├── IListPreference.kt │ │ └── ISecurePreference.kt │ │ ├── data │ │ ├── TutorialStepInfo.kt │ │ ├── AirplaneModeRadiosData.kt │ │ ├── SettingsType.kt │ │ ├── BlacklistBackupInfo.kt │ │ ├── AnimationScalesData.kt │ │ ├── CameraGesturesData.kt │ │ ├── tasker │ │ │ ├── TaskerIconBlacklistData.kt │ │ │ └── TaskerWriteSettingData.kt │ │ ├── LoadedAppInfo.kt │ │ ├── PreferenceHolder.kt │ │ ├── BlacklistItemInfo.kt │ │ └── SavedOption.kt │ │ ├── activities │ │ ├── tasker │ │ │ ├── AddToIconBlacklistConfigureActivity.kt │ │ │ └── RemoveFromIconBlacklistConfigureActivity.kt │ │ └── CoroutineActivity.kt │ │ ├── util │ │ ├── RootUtils.kt │ │ ├── SimpleSeekBarListener.kt │ │ ├── PersistenceHandlerRegistry.kt │ │ ├── ShizukuUtils.kt │ │ ├── BugsnagUtils.kt │ │ ├── PlatformUtils.kt │ │ ├── persistence │ │ │ └── BasePersistenceHandler.kt │ │ ├── PermissionUtils.kt │ │ ├── PreferenceUtils.kt │ │ ├── verifiers │ │ │ └── ListPreferenceVerifiers.kt │ │ └── tasker │ │ │ └── helpers │ │ │ ├── WriteSettingHelper.kt │ │ │ └── IconBlacklistHelper.kt │ │ ├── prefs │ │ ├── BlacklistRotationLockPreference.kt │ │ ├── BlacklistBrokenBatteryAndroid10Preference.kt │ │ ├── nav │ │ │ ├── IndentedNavigationPreference.kt │ │ │ └── LinkPreference.kt │ │ ├── demo │ │ │ └── base │ │ │ │ └── BaseDemoPreference.kt │ │ ├── WriteSettingPreference.kt │ │ ├── ReadSettingPreference.kt │ │ ├── NavHeaderPreference.kt │ │ ├── CustomBlacklistAddPreference.kt │ │ ├── secure │ │ │ ├── base │ │ │ │ └── BaseSecurePreference.kt │ │ │ ├── SecureSwitchPreference.kt │ │ │ ├── SecureEditTextPreference.kt │ │ │ └── specific │ │ │ │ ├── ImmersiveModePreference.kt │ │ │ │ ├── SMSLimitsPreference.kt │ │ │ │ └── StorageThresholdPreference.kt │ │ ├── OneUIClockPositionPreference.kt │ │ └── base │ │ │ └── BaseDialogPreference.kt │ │ ├── services │ │ ├── tiles │ │ │ ├── NavImmersiveTile.kt │ │ │ ├── FullImmersiveTile.kt │ │ │ ├── StatusImmersiveTile.kt │ │ │ ├── CoroutineTileService.kt │ │ │ └── DemoTile.kt │ │ └── StartManagerWorker.kt │ │ ├── fragments │ │ ├── EmptyFragment.kt │ │ ├── ManageQSFragment.kt │ │ ├── CoroutinePreferenceFragment.kt │ │ ├── CoroutinePreferenceDialogFragment.kt │ │ ├── UIFragment.kt │ │ ├── AppsFragment.kt │ │ ├── AudioFragment.kt │ │ ├── AdvancedFragment.kt │ │ ├── LockFragment.kt │ │ ├── DisplayFragment.kt │ │ ├── DeveloperFragment.kt │ │ ├── network │ │ │ ├── NetWiFiFragment.kt │ │ │ ├── NetCellFragment.kt │ │ │ └── NetMiscellaneousFragment.kt │ │ ├── system │ │ │ └── StorageFragment.kt │ │ └── interaction │ │ │ ├── QSFragment.kt │ │ │ ├── StatusBarFragment.kt │ │ │ └── NotificationsFragment.kt │ │ ├── dialogs │ │ ├── OptionDialog.kt │ │ ├── PatreonDialog.kt │ │ ├── SupportersDialog.kt │ │ ├── ResetDialog.kt │ │ └── ScrolledRoundedBottomSheetDialog.kt │ │ ├── views │ │ ├── ListenerLinearLayout.kt │ │ ├── ReadSettingsView.kt │ │ ├── RoundedFrameCardView.kt │ │ ├── ZeroHeightTextView.kt │ │ ├── DisableableImageView.kt │ │ └── WriteSettingsView.kt │ │ ├── receivers │ │ └── BootReceiver.kt │ │ └── anim │ │ └── PrefAnimator.kt └── proguard-rules.pro ├── .idea ├── icon.png ├── vcs.xml ├── compiler.xml ├── kotlinc.xml ├── migrations.xml ├── misc.xml └── deploymentTargetDropDown.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── crowdin.yml ├── settings.gradle.kts ├── LICENSE.md └── gradle.properties /app/src/main/res/resources.properties: -------------------------------------------------------------------------------- 1 | unqualifiedResLocale=en 2 | -------------------------------------------------------------------------------- /.idea/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/.idea/icon.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_blank.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/IManager.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | interface IManager { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/data/SavedOption.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data; 2 | 3 | parcelable SavedOption; 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/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/zacharee/Tweaker/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/zacharee/Tweaker/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/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharee/Tweaker/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/INoPersistPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | interface INoPersistPreference -------------------------------------------------------------------------------- /app/src/main/res/values-night-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/IOSSelectionCallback.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | interface IOSSelectionCallback { 4 | void onSelected(int which); 5 | } 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_storage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_net_wifi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/IUISoundSelectionCallback.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | interface IUISoundSelectionCallback { 4 | void onSoundSelected(String uri, String key); 5 | } 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/TutorialStepInfo.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | data class TutorialStepInfo( 4 | val text: CharSequence, 5 | val isCommand: Boolean = false 6 | ) -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_net_misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/AirplaneModeRadiosData.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | data class AirplaneModeRadiosData( 4 | val blacklisted: String?, 5 | val toggleable: String? 6 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/IOptionDialogCallback.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | interface IOptionDialogCallback { 4 | var callback: (suspend (data: Any?) -> Boolean)? 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/SettingsType.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | import com.zacharee1.systemuituner.systemsettingsaddon.library.SettingsType 4 | 5 | typealias SettingsType = SettingsType 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/IDialogPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | interface IDialogPreference { 4 | suspend fun onValueChanged(newValue: Any?, key: String): Boolean 5 | } -------------------------------------------------------------------------------- /app/src/main/res/xml/sounds_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/ILockscreenShortcutSelectedCallback.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | interface ILockscreenShortcutSelectedCallback { 4 | void onSelected(String component, String key); 5 | } 6 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/IImmersiveSelectionCallback.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | import java.util.List; 4 | 5 | interface IImmersiveSelectionCallback { 6 | void onImmersiveResult(out List checked); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/BlacklistBackupInfo.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | data class BlacklistBackupInfo( 4 | val items: HashSet, 5 | val customItems: HashSet 6 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/activities/tasker/AddToIconBlacklistConfigureActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.activities.tasker 2 | 3 | class AddToIconBlacklistConfigureActivity : BaseIconBlacklistConfigureActivity(isRemove = false) -------------------------------------------------------------------------------- /app/src/main/res/anim/list_initial_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 600dp 4 | 300dp 5 | 350dp 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/activities/tasker/RemoveFromIconBlacklistConfigureActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.activities.tasker 2 | 3 | class RemoveFromIconBlacklistConfigureActivity : BaseIconBlacklistConfigureActivity(isRemove = true) -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/AnimationScalesData.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | data class AnimationScalesData( 4 | var animatorScale: Float = 1.0f, 5 | var windowScale: Float = 1.0f, 6 | var transitionScale: Float = 1.0f 7 | ) -------------------------------------------------------------------------------- /app/src/main/res/drawable/step_track_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/CameraGesturesData.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | data class CameraGesturesData( 4 | var doubleTapPowerDisabled: Int = 1, 5 | var cameraGestureDisabled: Int = 1, 6 | var doubleTwistToFlipEnabled: Int = 0 7 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/ISpecificPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | import com.zacharee1.systemuituner.data.SettingsType 4 | 5 | interface ISpecificPreference { 6 | val keys: MutableMap> 7 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Oct 30 19:23:06 EDT 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.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/drawable/popup_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/RootUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import com.topjohnwu.superuser.Shell 4 | 5 | val hasRoot: Boolean 6 | get() = try { 7 | Shell.isAppGrantedRoot() == null && Shell.getShell().isRoot 8 | } catch (e: Throwable) { 9 | false 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/normal_dialog_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_space_bar_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_signal_cellular_4_bar_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/BlacklistRotationLockPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 6 | 7 | class BlacklistRotationLockPreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs) -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_add_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_home_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_get_app_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/BlacklistBrokenBatteryAndroid10Preference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 6 | 7 | class BlacklistBrokenBatteryAndroid10Preference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | /.idea/gradle.xml 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | 17 | # Project exclude paths 18 | /app/build/* 19 | /app/release/* 20 | /.idea/deploymentTargetSelector.xml 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v31/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_check_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-night-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @android:color/system_accent1_600 4 | @android:color/system_neutral1_100 5 | @android:color/system_neutral1_800 6 | @android:color/system_accent2_800 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_vertical_align_top_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/tiles/NavImmersiveTile.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services.tiles 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import com.zacharee1.systemuituner.util.ImmersiveManager 6 | 7 | @TargetApi(Build.VERSION_CODES.N) 8 | class NavImmersiveTile : BaseImmersiveTile() { 9 | override val type = ImmersiveManager.ImmersiveMode.NAV 10 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_vertical_align_bottom_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/tiles/FullImmersiveTile.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services.tiles 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import com.zacharee1.systemuituner.util.ImmersiveManager 6 | 7 | @TargetApi(Build.VERSION_CODES.N) 8 | class FullImmersiveTile : BaseImmersiveTile() { 9 | override val type = ImmersiveManager.ImmersiveMode.FULL 10 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_format_size_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/window_restore.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_qs_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/tiles/StatusImmersiveTile.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services.tiles 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import com.zacharee1.systemuituner.util.ImmersiveManager 6 | 7 | @TargetApi(Build.VERSION_CODES.N) 8 | class StatusImmersiveTile : BaseImmersiveTile() { 9 | override val type = ImmersiveManager.ImmersiveMode.STATUS 10 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/credit_card.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_view_grid_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_playlist_remove_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: /app/src/main/res/values/strings.xml 3 | translation: /app/src/main/res/values-%android_code%/%original_file_name% 4 | - source: /app/src/main/res/values/adb_guide_strings.xml 5 | translation: /app/src/main/res/values-%android_code%/%original_file_name% 6 | - source: /app/src/main/res/values/icon_blacklist_strings.xml 7 | translation: /app/src/main/res/values-%android_code%/%original_file_name% 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_delete_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/seekbar_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/EmptyFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import androidx.fragment.app.Fragment 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class EmptyFragment : Fragment(R.layout.fragment_empty) { 8 | override fun onResume() { 9 | super.onResume() 10 | 11 | updateTitle(R.string.app_name) 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/nav/IndentedNavigationPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.nav 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | 6 | class IndentedNavigationPreference(context: Context, attributeSet: AttributeSet) : NavigationPreference(context, attributeSet) { 7 | override val startMargin: StartMargin = StartMargin.INDENT 8 | override val useDividers: Boolean = false 9 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_error_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/do_not_disturb.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_remove_circle_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_fullscreen_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_playlist_add_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_view_grid_plus_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_computer_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_corner_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/secure_switch.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_signal_wifi_4_bar_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_smartphone_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_videocam_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_tv_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/tasker/TaskerIconBlacklistData.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data.tasker 2 | 3 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInputField 4 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInputRoot 5 | 6 | @TaskerInputRoot 7 | class TaskerIconBlacklistData @JvmOverloads constructor( 8 | @field:TaskerInputField("isRemove") var isRemove: Boolean = false, 9 | @field:TaskerInputField("key") var key: String = "" 10 | ) -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_left_variant.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_email_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_sms_failed_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/ManageQSFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.annotation.SuppressLint 4 | import android.os.Bundle 5 | import com.zacharee1.systemuituner.R 6 | 7 | @SuppressLint("RestrictedApi") 8 | class ManageQSFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_manage_qs, rootKey) 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle_shadow.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_priority_high_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_sd_card_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_security_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/microphone.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/activities/CoroutineActivity.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.activities 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import kotlinx.coroutines.CoroutineScope 5 | import kotlinx.coroutines.MainScope 6 | import kotlinx.coroutines.cancel 7 | 8 | abstract class CoroutineActivity : AppCompatActivity(), CoroutineScope by MainScope() { 9 | override fun onDestroy() { 10 | super.onDestroy() 11 | 12 | cancel() 13 | } 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_20.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_40.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_50.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_60.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_70.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_80.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_90.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_airplanemode_active_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_highlight_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_sd_storage_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_toggle_on_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_undo_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_apps_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/patreon.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_edit_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sim_off.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_right_variant.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/custom_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/microsoft_windows.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/record.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_100.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_disc_full_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_save_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_percent.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/CoroutinePreferenceFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import androidx.preference.PreferenceFragmentCompat 4 | import kotlinx.coroutines.CoroutineScope 5 | import kotlinx.coroutines.MainScope 6 | import kotlinx.coroutines.cancel 7 | 8 | abstract class CoroutinePreferenceFragment : PreferenceFragmentCompat(), CoroutineScope by MainScope() { 9 | override fun onDestroy() { 10 | super.onDestroy() 11 | 12 | cancel() 13 | } 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_location_on_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_flashlight_on_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_40.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_50.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_80.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_90.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/SimpleSeekBarListener.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import tk.zwander.seekbarpreference.SeekBarView 4 | 5 | abstract class SimpleSeekBarListener : SeekBarView.SeekBarListener { 6 | override fun onProgressAdded() { 7 | 8 | } 9 | 10 | override fun onProgressChanged(newValue: Int, newScaledValue: Float) { 11 | 12 | } 13 | 14 | override fun onProgressReset() { 15 | 16 | } 17 | 18 | override fun onProgressSubtracted() { 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_60.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_70.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_battery_alert_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_bluetooth_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_more_vert_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_battery_plus_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_format_list_numbered_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_more_horiz_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/CoroutinePreferenceDialogFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import androidx.preference.PreferenceDialogFragmentCompat 4 | import kotlinx.coroutines.CoroutineScope 5 | import kotlinx.coroutines.MainScope 6 | import kotlinx.coroutines.cancel 7 | 8 | abstract class CoroutinePreferenceDialogFragment : PreferenceDialogFragmentCompat(), CoroutineScope by MainScope() { 9 | override fun onDestroy() { 10 | super.onDestroy() 11 | 12 | cancel() 13 | } 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/transparency.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_build_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_notifications_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/top_rounded_rect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/LoadedAppInfo.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | import android.graphics.drawable.Drawable 4 | 5 | data class LoadedAppInfo( 6 | val label: String, 7 | val packageName: String, 8 | val icon: Drawable, 9 | val colorPrimary: Int, 10 | var isChecked: Boolean 11 | ) { 12 | fun matchesQuery(query: String?): Boolean { 13 | return query.isNullOrBlank() 14 | || label.contains(query, true) 15 | || packageName.contains(query, true) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/lockscreen_shortcuts.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_volume_up_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/PersistenceHandlerRegistry.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import android.content.Context 4 | import com.zacharee1.systemuituner.util.persistence.BasePersistenceHandler 5 | import com.zacharee1.systemuituner.util.persistence.BlacklistPersistenceHandler 6 | 7 | object PersistenceHandlerRegistry { 8 | val handlers = ArrayList>() 9 | 10 | fun register(context: Context) { 11 | handlers.clear() 12 | handlers.add(BlacklistPersistenceHandler(context)) 13 | } 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery_charging_20.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_lock_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_cast_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/UIFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class UIFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_ui, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_ui) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/dialogs/OptionDialog.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.dialogs 2 | 3 | import android.os.Bundle 4 | 5 | class OptionDialog : BaseOptionDialog() { 6 | companion object { 7 | fun newInstance(key: String, layoutRes: Int): OptionDialog { 8 | val instance = OptionDialog() 9 | val args = Bundle() 10 | 11 | args.putInt(ARG_LAYOUT_RES, layoutRes) 12 | args.putString(ARG_KEY, key) 13 | 14 | instance.arguments = args 15 | 16 | return instance 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/AppsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class AppsFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_apps, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_apps) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_visibility_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/AudioFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class AudioFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_audio, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_audio) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/AdvancedFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class AdvancedFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_advanced, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.advanced) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/LockFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class LockFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_lock, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_lock_screen) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_search_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_sync_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/DisplayFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class DisplayFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_display, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_display) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_brightness_7_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_invert_colors_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_phonelink_ring_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/telegram.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/DeveloperFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.updateTitle 6 | 7 | class DeveloperFragment : BasePrefFragment() { 8 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 9 | setPreferencesFromResource(R.xml.prefs_developer, rootKey) 10 | } 11 | 12 | override fun onResume() { 13 | super.onResume() 14 | 15 | updateTitle(R.string.category_developer) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/tiles/CoroutineTileService.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services.tiles 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import android.service.quicksettings.TileService 6 | import kotlinx.coroutines.CoroutineScope 7 | import kotlinx.coroutines.MainScope 8 | import kotlinx.coroutines.cancel 9 | 10 | @TargetApi(Build.VERSION_CODES.N) 11 | abstract class CoroutineTileService : TileService(), CoroutineScope by MainScope() { 12 | override fun onDestroy() { 13 | super.onDestroy() 14 | 15 | cancel() 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_nfc_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_restore_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/checkbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/tasker/TaskerWriteSettingData.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data.tasker 2 | 3 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInputField 4 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInputRoot 5 | import com.zacharee1.systemuituner.data.SettingsType 6 | 7 | @TaskerInputRoot 8 | class TaskerWriteSettingData @JvmOverloads constructor( 9 | @field:TaskerInputField("type") var type: String = SettingsType.UNDEFINED.toString(), 10 | @field:TaskerInputField("key") var key: String = "", 11 | @field:TaskerInputField("value") var value: String? = null 12 | ) -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_notifications_paused_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_developer_mode_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_help_outline_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_emoji_people_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_snooze_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/steps_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/lock_open.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/aidl/com/zacharee1/systemuituner/IShizukuOperationsService.aidl: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner; 2 | 3 | import com.zacharee1.systemuituner.data.SavedOption; 4 | 5 | interface IShizukuOperationsService { 6 | boolean writeGlobal(String key, String value, String pkg) = 1; 7 | boolean writeSecure(String key, String value, String pkg) = 2; 8 | boolean writeSystem(String key, String value, String pkg) = 3; 9 | 10 | String readGlobal(String key) = 4; 11 | String readSecure(String key) = 5; 12 | String readSystem(String key) = 6; 13 | 14 | SavedOption[] listSettings() = 7; 15 | 16 | void destroy() = 16777114; 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/base_message_pref_dialog_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/dialogs/PatreonDialog.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.dialogs 2 | 3 | import android.content.Context 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.launchUrl 6 | 7 | class PatreonDialog(context: Context) : RoundedBottomSheetDialog(context) { 8 | init { 9 | setTitle(R.string.patreon) 10 | setMessage(R.string.patreon_desc) 11 | 12 | setPositiveButton(R.string.check_it_out) { _, _ -> 13 | context.launchUrl("https://patreon.com/zacharywander") 14 | } 15 | 16 | setNegativeButton(android.R.string.cancel, null) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_android_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/message_text_lock.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/ShizukuUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import android.content.ActivityNotFoundException 4 | import android.content.Context 5 | import android.content.Intent 6 | 7 | fun Context.openShizuku() { 8 | try { 9 | startActivity(Intent(Intent.ACTION_MAIN).apply { 10 | addCategory(Intent.CATEGORY_LAUNCHER) 11 | `package` = "moe.shizuku.privileged.api" 12 | }) 13 | } catch (e: ActivityNotFoundException) { 14 | openShizukuWebsite() 15 | } 16 | } 17 | 18 | fun Context.openShizukuWebsite() { 19 | launchUrl("https://shizuku.rikka.app") 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_data_usage_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/ListenerLinearLayout.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.content.Context 4 | import android.content.res.Configuration 5 | import android.util.AttributeSet 6 | import android.widget.LinearLayout 7 | 8 | class ListenerLinearLayout(context: Context, attrs: AttributeSet) : LinearLayout(context, attrs) { 9 | var onConfigurationChangedListener: ((newConfig: Configuration) -> Unit)? = null 10 | 11 | override fun onConfigurationChanged(newConfig: Configuration) { 12 | super.onConfigurationChanged(newConfig) 13 | 14 | onConfigurationChangedListener?.invoke(newConfig) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/earth.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_translate_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/network/NetWiFiFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.network 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class NetWiFiFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_net_wifi, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.sub_wifi) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/system/StorageFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.system 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class StorageFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_storage, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.sub_storage) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/interaction/QSFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.interaction 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class QSFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_qs, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.category_quick_settings) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/network/NetCellFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.network 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class NetCellFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_net_cellular, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.sub_cellular) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/dialogs/SupportersDialog.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.dialogs 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.Context 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import com.zacharee1.systemuituner.R 8 | 9 | class SupportersDialog(context: Context) : ScrolledRoundedBottomSheetDialog(context) { 10 | @SuppressLint("InflateParams") 11 | val view: View = LayoutInflater.from(context).inflate(R.layout.supporters_dialog, null) 12 | init { 13 | setTitle(R.string.supporters) 14 | setLayout(view) 15 | 16 | setPositiveButton(android.R.string.ok, null) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon_unpadded.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tools.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | dependencyResolutionManagement { 15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 16 | repositories { 17 | google() 18 | mavenCentral() 19 | maven(url = "https://jitpack.io") 20 | } 21 | } 22 | 23 | rootProject.name = "Tweaker" 24 | 25 | include(":app") 26 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/foreground_unscaled.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/no_ads.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/interaction/StatusBarFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.interaction 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class StatusBarFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_status_bar, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.category_status_bar) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/network/NetMiscellaneousFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.network 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class NetMiscellaneousFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_net_misc, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.sub_miscellaneous) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_adb_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tap_hold.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/IDangerousPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import com.zacharee1.systemuituner.R 6 | 7 | interface IDangerousPreference { 8 | var dangerous: Boolean 9 | } 10 | 11 | class DangerousPreference(context: Context, attrs: AttributeSet? = null) : IDangerousPreference { 12 | override var dangerous: Boolean = false 13 | 14 | init { 15 | val array = context.theme.obtainStyledAttributes(attrs, R.styleable.DangerousPreference, 0, 0) 16 | 17 | dangerous = array.getBoolean(R.styleable.DangerousPreference_dangerous, dangerous) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/fragments/interaction/NotificationsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.fragments.interaction 2 | 3 | import android.os.Bundle 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.fragments.BasePrefFragment 6 | import com.zacharee1.systemuituner.util.updateTitle 7 | 8 | class NotificationsFragment : BasePrefFragment() { 9 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 10 | setPreferencesFromResource(R.xml.prefs_notifications, rootKey) 11 | } 12 | 13 | override fun onResume() { 14 | super.onResume() 15 | 16 | updateTitle(R.string.category_notifications) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/heart_outline.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/demo/base/BaseDemoPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.demo.base 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.core.content.edit 6 | import androidx.preference.DialogPreference 7 | import com.zacharee1.systemuituner.interfaces.IDialogPreference 8 | 9 | open class BaseDemoPreference(context: Context, attrs: AttributeSet) : DialogPreference(context, attrs), 10 | IDialogPreference { 11 | override suspend fun onValueChanged(newValue: Any?, key: String): Boolean { 12 | sharedPreferences?.edit { 13 | putString(key, newValue?.toString()) 14 | } 15 | 16 | return true 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_attach_money_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_network.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_volume_off_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/PreferenceHolder.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | import androidx.preference.Preference 4 | import com.zacharee1.systemuituner.interfaces.IDangerousPreference 5 | import java.util.* 6 | 7 | data class PreferenceHolder( 8 | val className: String?, 9 | val widgetLayoutResource: Int, 10 | val layoutResource: Int, 11 | val isEnabled: Boolean, 12 | val isDangerous: Boolean 13 | ) { 14 | constructor(preference: Preference) : this( 15 | preference::class.java.canonicalName, 16 | preference.widgetLayoutResource, 17 | preference.layoutResource, 18 | preference.isEnabled, 19 | (preference as? IDangerousPreference)?.dangerous ?: false 20 | ) 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/BlacklistItemInfo.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | 4 | data class CustomBlacklistItemInfo( 5 | var label: String?, 6 | var key: String 7 | ) { 8 | companion object { 9 | fun fromString(input: String): CustomBlacklistItemInfo { 10 | val split = input.split(":") 11 | 12 | return CustomBlacklistItemInfo(split[0], split[1]) 13 | } 14 | } 15 | 16 | override fun toString(): String { 17 | return "$label:$key" 18 | } 19 | 20 | override fun equals(other: Any?): Boolean { 21 | return other is CustomBlacklistItemInfo && other.key == key 22 | } 23 | 24 | override fun hashCode(): Int { 25 | return key.hashCode() 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/BugsnagUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import com.bugsnag.android.BreadcrumbType 4 | import com.bugsnag.android.Bugsnag 5 | 6 | object BugsnagUtils { 7 | fun notify(exception: Throwable) { 8 | if (Bugsnag.isStarted()) { 9 | Bugsnag.notify(exception) 10 | } 11 | } 12 | 13 | fun leaveBreadcrumb(message: String) { 14 | if (Bugsnag.isStarted()) { 15 | Bugsnag.leaveBreadcrumb(message) 16 | } 17 | } 18 | 19 | fun leaveBreadcrumb(message: String, metadata: Map, type: BreadcrumbType) { 20 | if (Bugsnag.isStarted()) { 21 | Bugsnag.leaveBreadcrumb(message, metadata, type) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/IListPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | interface IListPreference : IDialogPreference { 4 | val entries: Array? 5 | val entryValues: Array? 6 | var writeKey: String 7 | var value: String? 8 | 9 | fun findIndexOfValue(value: String?): Int { 10 | value.let { 11 | entryValues?.let { entryValues -> 12 | for (i in entryValues.indices.reversed()) { 13 | if (entryValues[i] == value) { 14 | return i 15 | } 16 | } 17 | } 18 | } 19 | return -1 20 | } 21 | 22 | fun callChangeListener(newValue: Any?): Boolean 23 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_bug_report_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_notifications_off_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_screen_rotation_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_add_qs_tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/WriteSettingPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.PreferenceViewHolder 6 | import com.zacharee1.systemuituner.R 7 | import com.zacharee1.systemuituner.interfaces.INoPersistPreference 8 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 9 | 10 | class WriteSettingPreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), INoPersistPreference { 11 | init { 12 | layoutResource = R.layout.custom_preference 13 | } 14 | 15 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 16 | super.onBindViewHolder(holder) 17 | bindVH(holder) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_notifications_active_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_camera_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_wifi_tethering_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sad_face.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_touch_app_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_net_cellular.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/dialogs/ResetDialog.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.dialogs 2 | 3 | import android.content.Context 4 | import com.zacharee1.systemuituner.R 5 | import com.zacharee1.systemuituner.util.buildNonResettablePreferences 6 | import com.zacharee1.systemuituner.util.resetAll 7 | 8 | class ResetDialog(context: Context) : RoundedBottomSheetDialog(context) { 9 | init { 10 | setTitle(R.string.reset) 11 | setMessage(context.resources.getString(R.string.reset_confirm, 12 | context.buildNonResettablePreferences().joinToString(prefix = "\n- ", separator = "\n- "))) 13 | setPositiveButton(R.string.reset) { _, _ -> 14 | context.resetAll() 15 | dismiss() 16 | } 17 | setNegativeButton(android.R.string.cancel, null) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_nights_stay_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/pref_card.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/PlatformUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import android.content.Context 4 | import android.os.SystemProperties 5 | 6 | val Context.isTouchWiz: Boolean 7 | get() = packageManager.hasSystemFeature("com.samsung.feature.samsung_experience_mobile") 8 | 9 | val isHTC: Boolean 10 | get() = !SystemProperties.get("ro.build.sense.version").isNullOrBlank() 11 | 12 | val isLG: Boolean 13 | get() = !SystemProperties.get("ro.lge.lguiversion").isNullOrBlank() 14 | 15 | val isHuawei: Boolean 16 | get() = !SystemProperties.get("ro.build.hw_emui_api_level").isNullOrBlank() 17 | 18 | val isXiaomi: Boolean 19 | get() = !SystemProperties.get("ro.miui.ui.version.code").isNullOrBlank() 20 | 21 | val Context.isFireOS: Boolean 22 | get() = packageManager.hasSystemFeature("com.amazon.software.fireos") -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_clock.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_add_intent_qs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/supporters_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_qs_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_color_lens_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/penguin.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_add_custom_qs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/dialogs/ScrolledRoundedBottomSheetDialog.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.dialogs 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.view.ViewGroup 6 | import androidx.core.view.isVisible 7 | import com.zacharee1.systemuituner.R 8 | 9 | open class ScrolledRoundedBottomSheetDialog(context: Context) : RoundedBottomSheetDialog(context) { 10 | init { 11 | super.setLayout( 12 | View.inflate(context, R.layout.base_message_pref_dialog_layout, null) 13 | ) 14 | } 15 | 16 | override fun setLayout(layout: View?) { 17 | findViewById(R.id.wrapper)?.apply { 18 | isVisible = layout != null 19 | removeAllViews() 20 | if (layout != null) { 21 | addView(layout) 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_screen_lock_rotation_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_visibility_off_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_keyboard_command_key_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/ReadSettingPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.DialogPreference 6 | import androidx.preference.PreferenceViewHolder 7 | import com.zacharee1.systemuituner.R 8 | import com.zacharee1.systemuituner.interfaces.ColorPreference 9 | import com.zacharee1.systemuituner.interfaces.IColorPreference 10 | import com.zacharee1.systemuituner.interfaces.INoPersistPreference 11 | 12 | class ReadSettingPreference(context: Context, attrs: AttributeSet) : DialogPreference(context, attrs), IColorPreference by ColorPreference( 13 | context, 14 | attrs 15 | ), INoPersistPreference { 16 | init { 17 | layoutResource = R.layout.custom_preference 18 | } 19 | 20 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 21 | super.onBindViewHolder(holder) 22 | bindVH(holder) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/twitter.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/light_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_blacklist.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/NavHeaderPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.View 6 | import androidx.preference.Preference 7 | import androidx.preference.PreferenceViewHolder 8 | import com.zacharee1.systemuituner.R 9 | 10 | class NavHeaderPreference(context: Context, attrs: AttributeSet) : Preference(context, attrs) { 11 | var onSearchClickListener: (() -> Unit)? = null 12 | 13 | init { 14 | layoutResource = R.layout.widget_only_preference 15 | widgetLayoutResource = R.layout.drawer_header 16 | isEnabled = true 17 | } 18 | 19 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 20 | super.onBindViewHolder(holder) 21 | 22 | with(holder.itemView.findViewById(R.id.search_enter)) { 23 | setOnClickListener { 24 | onSearchClickListener?.invoke() 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/ReadSettingsView.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.constraintlayout.widget.ConstraintLayout 6 | import androidx.core.widget.doOnTextChanged 7 | import com.zacharee1.systemuituner.databinding.DialogReadSettingBinding 8 | import com.zacharee1.systemuituner.data.SettingsType 9 | import com.zacharee1.systemuituner.util.getSetting 10 | 11 | class ReadSettingsView(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) { 12 | private val binding by lazy { DialogReadSettingBinding.bind(this) } 13 | 14 | override fun onFinishInflate() { 15 | super.onFinishInflate() 16 | 17 | binding.keyEntry.doOnTextChanged { text, _, _, _ -> 18 | val type = SettingsType.fromValue(binding.settingsType.selectedItemPosition) 19 | binding.result.text = context.getSetting(type, text.toString()).toString() 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/CustomBlacklistAddPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.View 6 | import androidx.core.view.isVisible 7 | import androidx.preference.DialogPreference 8 | import androidx.preference.PreferenceViewHolder 9 | import com.zacharee1.systemuituner.R 10 | 11 | class CustomBlacklistAddPreference(context: Context, attrs: AttributeSet?) : DialogPreference(context, attrs) { 12 | init { 13 | setTitle(R.string.icon_blacklist_add_custom) 14 | setSummary(R.string.icon_blacklist_add_custom_desc) 15 | key = "custom_blacklist_add_preference" 16 | 17 | isPersistent = false 18 | layoutResource = R.layout.custom_preference 19 | } 20 | 21 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 22 | super.onBindViewHolder(holder) 23 | 24 | holder.itemView.findViewById(R.id.icon_frame).isVisible = false 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/StartManagerWorker.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services 2 | 3 | import android.content.Context 4 | import androidx.work.CoroutineWorker 5 | import androidx.work.OneTimeWorkRequest 6 | import androidx.work.WorkManager 7 | import androidx.work.WorkerParameters 8 | import com.zacharee1.systemuituner.App 9 | import com.zacharee1.systemuituner.util.BugsnagUtils 10 | 11 | class StartManagerWorker(context: Context, params: WorkerParameters) : CoroutineWorker(context, params) { 12 | companion object { 13 | fun start(context: Context) { 14 | val request = OneTimeWorkRequest.from(StartManagerWorker::class.java) 15 | WorkManager.getInstance(context).enqueue(request) 16 | } 17 | } 18 | 19 | override suspend fun doWork(): Result { 20 | BugsnagUtils.leaveBreadcrumb("Attempting to start Manager service through StartManagerWorker.") 21 | App.updateServiceState(applicationContext) 22 | return Result.success() 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/link.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/RoundedFrameCardView.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.content.Context 4 | import android.graphics.Color 5 | import android.util.AttributeSet 6 | import com.google.android.material.card.MaterialCardView 7 | import com.zacharee1.systemuituner.util.dpAsPx 8 | 9 | open class RoundedFrameCardView(context: Context, attrs: AttributeSet) : MaterialCardView(context, attrs) { 10 | init { 11 | radius = context.dpAsPx(8).toFloat() 12 | strokeWidth = context.dpAsPx(0.75) 13 | strokeColor = run { 14 | val a = intArrayOf(android.R.attr.textColorSecondary) 15 | val array = context.obtainStyledAttributes(a) 16 | context.getColor(array.getResourceId(0, android.R.color.transparent)).also { array.recycle() } 17 | } 18 | setCardBackgroundColor(Color.TRANSPARENT) 19 | elevation = 0f 20 | 21 | val padding = context.dpAsPx(8) 22 | setContentPadding(padding, padding, padding, padding) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/base/BaseSecurePreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure.base 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.PreferenceManager 6 | import com.zacharee1.systemuituner.interfaces.* 7 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 8 | import com.zacharee1.systemuituner.util.* 9 | 10 | open class BaseSecurePreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), ISecurePreference by SecurePreference( 11 | context, 12 | attrs 13 | ) { 14 | override var writeKey: String = "" 15 | get() = field.ifBlank { key } 16 | 17 | override fun onAttachedToHierarchy(preferenceManager: PreferenceManager) { 18 | super.onAttachedToHierarchy(preferenceManager) 19 | initSecure(this) 20 | } 21 | 22 | override suspend fun onValueChanged(newValue: Any?, key: String): Boolean { 23 | return context.writeSetting(type, writeKey, newValue, dangerous, true) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/persistence/BasePersistenceHandler.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util.persistence 2 | 3 | import android.content.Context 4 | import com.zacharee1.systemuituner.data.SettingsType 5 | import com.zacharee1.systemuituner.util.getSetting 6 | 7 | abstract class BasePersistenceHandler(internal val context: Context) { 8 | abstract val settingsType: SettingsType 9 | abstract val settingsKey: String 10 | 11 | abstract fun areValuesTheSame(preferenceValue: PreferenceValueType?, settingsValue: String?): Boolean 12 | abstract fun getPreferenceValue(): PreferenceValueType? 13 | abstract fun getPreferenceValueAsString(): String? 14 | abstract fun savePreferenceValue(value: String?) 15 | 16 | open suspend fun doInitialSet() {} 17 | 18 | fun getSettingsValue(): String? { 19 | return context.getSetting(settingsType, settingsKey) 20 | } 21 | 22 | fun compareValues(): Boolean { 23 | return areValuesTheSame(getPreferenceValue(), getSettingsValue()) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/ZeroHeightTextView.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.ViewGroup 6 | import androidx.appcompat.widget.AppCompatTextView 7 | import com.zacharee1.systemuituner.util.mainHandler 8 | 9 | class ZeroHeightTextView(context: Context, attrs: AttributeSet) : AppCompatTextView(context, attrs) { 10 | override fun onAttachedToWindow() { 11 | super.onAttachedToWindow() 12 | 13 | mainHandler.post { 14 | updateHeight() 15 | } 16 | } 17 | 18 | override fun setText(text: CharSequence?, type: BufferType?) { 19 | super.setText(text, type) 20 | 21 | mainHandler.post { 22 | updateHeight() 23 | } 24 | } 25 | 26 | private fun updateHeight() { 27 | layoutParams?.apply { 28 | height = if (text.isNullOrBlank()) 0 29 | else ViewGroup.LayoutParams.WRAP_CONTENT 30 | 31 | layoutParams = this 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/SecureSwitchPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import com.zacharee1.systemuituner.R 6 | import com.zacharee1.systemuituner.prefs.secure.base.BaseSecurePreference 7 | 8 | open class SecureSwitchPreference(context: Context, attrs: AttributeSet) : BaseSecurePreference(context, attrs) { 9 | companion object { 10 | const val DEFAULT_ENABLED = "1" 11 | const val DEFAULT_DISABLED = "0" 12 | } 13 | 14 | var enabled = DEFAULT_ENABLED 15 | var disabled = DEFAULT_DISABLED 16 | 17 | init { 18 | isPersistent = false 19 | val array = context.theme.obtainStyledAttributes(attrs, R.styleable.SecureSwitchPreference, 0, 0) 20 | 21 | enabled = array.getString(R.styleable.SecureSwitchPreference_enabled_value) ?: DEFAULT_ENABLED 22 | disabled = array.getString(R.styleable.SecureSwitchPreference_disabled_value) ?: DEFAULT_DISABLED 23 | 24 | array.recycle() 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_developer.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/PermissionUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import android.content.Context 4 | import android.content.pm.PackageManager 5 | import rikka.shizuku.Shizuku 6 | import rikka.shizuku.ShizukuProvider 7 | 8 | val Context.hasWss: Boolean 9 | get() = checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) == PackageManager.PERMISSION_GRANTED 10 | 11 | val Context.hasDump: Boolean 12 | get() = checkCallingOrSelfPermission(android.Manifest.permission.DUMP) == PackageManager.PERMISSION_GRANTED 13 | 14 | val Context.hasPackageUsageStats: Boolean 15 | get() = checkCallingOrSelfPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) == PackageManager.PERMISSION_GRANTED 16 | 17 | val Context.hasShizukuPermission: Boolean 18 | get() = if (Shizuku.isPreV11() || Shizuku.getVersion() < 11) { 19 | checkCallingOrSelfPermission(ShizukuProvider.PERMISSION) == PackageManager.PERMISSION_GRANTED 20 | } else { 21 | Shizuku.checkSelfPermission() == PackageManager.PERMISSION_GRANTED 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/SecureEditTextPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure 2 | 3 | import android.content.Context 4 | import android.text.InputType 5 | import android.util.AttributeSet 6 | import com.zacharee1.systemuituner.R 7 | import com.zacharee1.systemuituner.prefs.secure.base.BaseSecurePreference 8 | import com.zacharee1.systemuituner.util.getSetting 9 | 10 | class SecureEditTextPreference(context: Context, attrs: AttributeSet) : BaseSecurePreference(context, attrs) { 11 | var inputType: Int = InputType.TYPE_CLASS_TEXT 12 | 13 | var text: CharSequence? = null 14 | 15 | init { 16 | val array = context.theme.obtainStyledAttributes(attrs, R.styleable.SecureEditTextPreference, 0, 0) 17 | inputType = array.getInt(R.styleable.SecureEditTextPreference_android_inputType, inputType) 18 | array.recycle() 19 | 20 | dialogLayoutResource = R.layout.better_edittext_dialog 21 | } 22 | 23 | override fun onSetInitialValue(defaultValue: Any?) { 24 | this.text = context.getSetting(type, writeKey) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/steps_list_command.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/PreferenceUtils.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util 2 | 3 | import android.content.Context 4 | import androidx.preference.* 5 | 6 | val Context.prefManager: PrefManager 7 | get() = PrefManager.getInstance(this) 8 | 9 | val Preference.defaultValue: Any? 10 | get() { 11 | return Preference::class.java 12 | .getDeclaredField("mDefaultValue") 13 | .apply { isAccessible = true } 14 | .get(this) 15 | } 16 | 17 | fun PreferenceGroup.hasPreference(key: String): Boolean { 18 | forEach { child -> 19 | if (key == child.key) return@hasPreference true 20 | } 21 | 22 | return false 23 | } 24 | 25 | fun PreferenceGroup.indexOf(preference: Preference): Int { 26 | forEachIndexed { index, child -> 27 | if (child == preference) return index 28 | } 29 | 30 | return -1 31 | } 32 | 33 | fun PreferenceGroupAdapter.updatePreferences() { 34 | PreferenceGroupAdapter::class.java 35 | .getDeclaredMethod("updatePreferences") 36 | .apply { isAccessible = true } 37 | .invoke(this) 38 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Zachary Wander 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_demo_mode.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mastodon.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 13 | 21 | 22 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/receivers/BootReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.receivers 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.provider.Settings 7 | import com.zacharee1.systemuituner.App 8 | import com.zacharee1.systemuituner.services.StartManagerWorker 9 | import com.zacharee1.systemuituner.util.BugsnagUtils 10 | 11 | class BootReceiver : BroadcastReceiver() { 12 | override fun onReceive(context: Context, intent: Intent?) { 13 | if (intent?.action == Intent.ACTION_BOOT_COMPLETED || 14 | intent?.action == Intent.ACTION_LOCKED_BOOT_COMPLETED) { 15 | BugsnagUtils.leaveBreadcrumb("Boot action received.") 16 | if (Settings.canDrawOverlays(context)) { 17 | BugsnagUtils.leaveBreadcrumb("Can draw overlays, use StartManagerWorker.") 18 | StartManagerWorker.start(context) 19 | } else { 20 | BugsnagUtils.leaveBreadcrumb("Can't draw overlays, try starting Manager directly.") 21 | App.updateServiceState(context) 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/DisableableImageView.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.animation.ValueAnimator 4 | import android.content.Context 5 | import android.util.AttributeSet 6 | import androidx.appcompat.widget.AppCompatImageView 7 | 8 | 9 | open class DisableableImageView : AppCompatImageView { 10 | constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) 11 | constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) 12 | 13 | private var alphaAnim: ValueAnimator? = null 14 | 15 | override fun setEnabled(enabled: Boolean) { 16 | if (this.isEnabled != enabled) { 17 | alphaAnim?.cancel() 18 | 19 | alphaAnim = ValueAnimator.ofInt(this.imageAlpha, if (enabled) 0xFF else 0x3F) 20 | .apply { 21 | addUpdateListener { 22 | this@DisableableImageView.imageAlpha = it.animatedValue.toString().toInt() 23 | } 24 | start() 25 | } 26 | } 27 | isClickable = enabled 28 | super.setEnabled(enabled) 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/specific/ImmersiveModePreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure.specific 2 | 3 | import android.content.Context 4 | import android.provider.Settings 5 | import android.util.AttributeSet 6 | import androidx.core.content.ContextCompat 7 | import com.zacharee1.systemuituner.R 8 | import com.zacharee1.systemuituner.interfaces.ISpecificPreference 9 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 10 | import com.zacharee1.systemuituner.data.SettingsType 11 | 12 | class ImmersiveModePreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), 13 | ISpecificPreference { 14 | override val keys = hashMapOf( 15 | SettingsType.GLOBAL to arrayOf(Settings.Global.POLICY_CONTROL) 16 | ) 17 | 18 | init { 19 | key = "immersive_mode_pref" 20 | 21 | setTitle(R.string.feature_immersive_mode) 22 | setSummary(R.string.feature_immersive_mode_desc) 23 | 24 | dialogTitle = title 25 | dialogMessage = summary 26 | setIcon(R.drawable.ic_baseline_fullscreen_24) 27 | iconColor = ContextCompat.getColor(context, R.color.pref_color_4) 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/nav/LinkPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.nav 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.Preference 6 | import androidx.preference.PreferenceViewHolder 7 | import com.zacharee1.systemuituner.R 8 | import com.zacharee1.systemuituner.util.launchUrl 9 | 10 | class LinkPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) { 11 | private val link: String? 12 | 13 | init { 14 | link = if (attrs != null) { 15 | val array = context.theme.obtainStyledAttributes(attrs, R.styleable.LinkPreference, 0, 0) 16 | 17 | array.getString(R.styleable.LinkPreference_link) 18 | } else { 19 | null 20 | } 21 | } 22 | 23 | override fun onClick() { 24 | super.onClick() 25 | 26 | if (link != null) { 27 | context.launchUrl(link) 28 | } 29 | } 30 | 31 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 32 | super.onBindViewHolder(holder) 33 | 34 | holder.isDividerAllowedAbove = true 35 | holder.isDividerAllowedBelow = true 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/views/WriteSettingsView.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.views 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.constraintlayout.widget.ConstraintLayout 6 | import com.zacharee1.systemuituner.data.SettingsType 7 | import com.zacharee1.systemuituner.databinding.DialogWriteSettingBinding 8 | import com.zacharee1.systemuituner.util.launch 9 | import com.zacharee1.systemuituner.util.writeSetting 10 | 11 | class WriteSettingsView(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) { 12 | private val binding by lazy { DialogWriteSettingBinding.bind(this) } 13 | 14 | override fun onFinishInflate() { 15 | super.onFinishInflate() 16 | 17 | binding.apply.setOnClickListener { 18 | val key = binding.keyEntry.text?.toString() 19 | val value = binding.valueEntry.text?.toString() 20 | val type = SettingsType.fromValue(binding.settingsType.selectedItemPosition) 21 | 22 | if (!key.isNullOrBlank()) { 23 | launch { 24 | context.writeSetting(type, key, value, true) 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/res/values-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/m3_sys_color_dynamic_dark_primary 4 | @color/m3_sys_color_dynamic_dark_primary 5 | @color/m3_sys_color_dynamic_dark_primary_container 6 | @color/m3_sys_color_dynamic_dark_secondary 7 | ?android:attr/colorBackground 8 | 9 | @android:color/system_accent1_100 10 | @color/pref_color_1 11 | @color/pref_color_1 12 | @color/pref_color_1 13 | @color/pref_color_1 14 | @color/pref_color_1 15 | @color/pref_color_1 16 | 17 | @android:color/system_accent1_100 18 | @android:color/system_neutral1_800 19 | @android:color/system_neutral1_800 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/verifiers/ListPreferenceVerifiers.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util.verifiers 2 | 3 | import android.content.Context 4 | import com.zacharee1.systemuituner.util.hasSdCard 5 | 6 | abstract class BaseListPreferenceVerifier(internal val context: Context) { 7 | abstract fun verifyEntries( 8 | entries: Array?, 9 | values: Array? 10 | ): Pair?, Array?> 11 | } 12 | 13 | class StorageVerifier(context: Context) : BaseListPreferenceVerifier(context) { 14 | override fun verifyEntries( 15 | entries: Array?, 16 | values: Array? 17 | ): Pair?, Array?> { 18 | if (entries == null || values == null) return Pair?, Array?>(null, null) 19 | 20 | val entryList = ArrayList(entries.toList()) 21 | val valueList = ArrayList(values.toList()) 22 | 23 | if (!context.hasSdCard) { 24 | entryList.removeAt(entryList.lastIndex) 25 | valueList.removeAt(valueList.lastIndex) 26 | } 27 | 28 | return entryList.toTypedArray() to valueList.toTypedArray() 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/specific/SMSLimitsPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure.specific 2 | 3 | import android.content.Context 4 | import android.provider.Settings 5 | import android.util.AttributeSet 6 | import androidx.core.content.ContextCompat 7 | import com.zacharee1.systemuituner.R 8 | import com.zacharee1.systemuituner.interfaces.ISpecificPreference 9 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 10 | import com.zacharee1.systemuituner.data.SettingsType 11 | 12 | class SMSLimitsPreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), ISpecificPreference { 13 | override val keys = hashMapOf( 14 | SettingsType.GLOBAL to arrayOf( 15 | Settings.Global.SMS_OUTGOING_CHECK_INTERVAL_MS, 16 | Settings.Global.SMS_OUTGOING_CHECK_MAX_COUNT 17 | ) 18 | ) 19 | 20 | init { 21 | key = "sms_limits" 22 | 23 | setTitle(R.string.feature_sms_limit) 24 | setSummary(R.string.feature_sms_limit_desc) 25 | 26 | dialogTitle = title 27 | dialogMessage = summary 28 | setIcon(R.drawable.message_text_lock) 29 | iconColor = ContextCompat.getColor(context, R.color.pref_color_6) 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/tasker/helpers/WriteSettingHelper.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util.tasker.helpers 2 | 3 | import com.joaomgcd.taskerpluginlibrary.SimpleResult 4 | import com.joaomgcd.taskerpluginlibrary.SimpleResultError 5 | import com.joaomgcd.taskerpluginlibrary.SimpleResultSuccess 6 | import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfig 7 | import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfigHelperNoOutput 8 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInput 9 | import com.zacharee1.systemuituner.data.tasker.TaskerWriteSettingData 10 | import com.zacharee1.systemuituner.util.tasker.runners.WriteSettingRunner 11 | 12 | class WriteSettingHelper(config: TaskerPluginConfig) : TaskerPluginConfigHelperNoOutput(config) { 13 | override val runnerClass: Class = WriteSettingRunner::class.java 14 | override val inputClass: Class = TaskerWriteSettingData::class.java 15 | 16 | override fun isInputValid(input: TaskerInput): SimpleResult { 17 | return if (input.regular.key.isBlank()) SimpleResultError("Key must not be blank") 18 | else SimpleResultSuccess() 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/util/tasker/helpers/IconBlacklistHelper.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.util.tasker.helpers 2 | 3 | import com.joaomgcd.taskerpluginlibrary.SimpleResult 4 | import com.joaomgcd.taskerpluginlibrary.SimpleResultError 5 | import com.joaomgcd.taskerpluginlibrary.SimpleResultSuccess 6 | import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfig 7 | import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfigHelperNoOutput 8 | import com.joaomgcd.taskerpluginlibrary.input.TaskerInput 9 | import com.zacharee1.systemuituner.data.tasker.TaskerIconBlacklistData 10 | import com.zacharee1.systemuituner.util.tasker.runners.IconBlacklistRunner 11 | 12 | class IconBlacklistHelper(config: TaskerPluginConfig) : TaskerPluginConfigHelperNoOutput(config) { 13 | override val runnerClass: Class = IconBlacklistRunner::class.java 14 | override val inputClass: Class = TaskerIconBlacklistData::class.java 15 | 16 | override fun isInputValid(input: TaskerInput): SimpleResult { 17 | return if (input.regular.key.isBlank()) SimpleResultError("Key must not be blank") 18 | else SimpleResultSuccess() 19 | } 20 | } -------------------------------------------------------------------------------- /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=-Xmx1536m 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 | android.nonTransitiveRClass=false 23 | android.nonFinalResIds=false 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_apps.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 14 | 15 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/data/SavedOption.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.data 2 | 3 | import android.os.Parcelable 4 | import com.google.gson.Gson 5 | import com.google.gson.GsonBuilder 6 | import com.google.gson.reflect.TypeToken 7 | import kotlinx.parcelize.Parcelize 8 | 9 | @Parcelize 10 | data class SavedOption( 11 | val type: SettingsType, 12 | val key: String, 13 | var value: String? 14 | ) : Parcelable { 15 | companion object { 16 | val gson: Gson = GsonBuilder().setLenient().create() 17 | 18 | fun fromString(input: String): SavedOption { 19 | return try { 20 | gson.fromJson( 21 | input, 22 | object : TypeToken() {}.type 23 | ) 24 | } catch (e: Exception) { 25 | //Prevent crashes when options have been saved the old way 26 | val split = input.split(":") 27 | 28 | SavedOption( 29 | SettingsType.fromString( 30 | split[0] 31 | ), 32 | split[1], 33 | split[2] 34 | ) 35 | } 36 | } 37 | } 38 | 39 | override fun toString(): String { 40 | return gson.toJson(this) 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/OneUIClockPositionPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.PreferenceViewHolder 6 | import com.zacharee1.systemuituner.R 7 | import com.zacharee1.systemuituner.data.SettingsType 8 | import com.zacharee1.systemuituner.interfaces.INoPersistPreference 9 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 10 | import com.zacharee1.systemuituner.util.prefManager 11 | import com.zacharee1.systemuituner.util.writeSetting 12 | 13 | class OneUIClockPositionPreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), INoPersistPreference { 14 | init { 15 | layoutResource = R.layout.custom_preference 16 | initVerify(this) 17 | } 18 | 19 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 20 | super.onBindViewHolder(holder) 21 | bindVH(holder) 22 | } 23 | 24 | override suspend fun onValueChanged(newValue: Any?, key: String): Boolean { 25 | val string = newValue?.toString() 26 | 27 | context.prefManager.blacklistedItems = HashSet(string?.split(",") ?: listOf()) 28 | return context.writeSetting(SettingsType.SECURE, "icon_blacklist", string) 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/base/BaseDialogPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.base 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.DialogPreference 6 | import androidx.preference.PreferenceManager 7 | import androidx.preference.PreferenceViewHolder 8 | import com.zacharee1.systemuituner.R 9 | import com.zacharee1.systemuituner.interfaces.* 10 | 11 | open class BaseDialogPreference(context: Context, attrs: AttributeSet) : DialogPreference(context, attrs), IColorPreference by ColorPreference(context, attrs), 12 | IVerifierPreference by VerifierPreference(context, attrs), IDialogPreference { 13 | init { 14 | layoutResource = R.layout.custom_preference 15 | } 16 | 17 | override fun onAttachedToHierarchy(preferenceManager: PreferenceManager) { 18 | super.onAttachedToHierarchy(preferenceManager) 19 | 20 | dialogMessage = summary 21 | dialogTitle = title 22 | dialogIcon = icon 23 | initVerify(this) 24 | } 25 | 26 | override fun onBindViewHolder(holder: PreferenceViewHolder) { 27 | super.onBindViewHolder(holder) 28 | bindVH(holder) 29 | } 30 | 31 | override suspend fun onValueChanged(newValue: Any?, key: String): Boolean { 32 | return true 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/prefs/secure/specific/StorageThresholdPreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.prefs.secure.specific 2 | 3 | import android.content.Context 4 | import android.provider.Settings 5 | import android.util.AttributeSet 6 | import androidx.core.content.ContextCompat 7 | import com.zacharee1.systemuituner.R 8 | import com.zacharee1.systemuituner.interfaces.ISpecificPreference 9 | import com.zacharee1.systemuituner.prefs.base.BaseDialogPreference 10 | import com.zacharee1.systemuituner.data.SettingsType 11 | 12 | class StorageThresholdPreference(context: Context, attrs: AttributeSet) : BaseDialogPreference(context, attrs), 13 | ISpecificPreference { 14 | override val keys = hashMapOf( 15 | SettingsType.GLOBAL to arrayOf( 16 | Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES, 17 | Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE 18 | ) 19 | ) 20 | 21 | init { 22 | key = "storage" 23 | 24 | setTitle(R.string.feature_insufficient_storage_warning) 25 | setSummary(R.string.feature_insufficient_storage_warning_desc) 26 | 27 | dialogTitle = title 28 | dialogMessage = summary 29 | setIcon(R.drawable.ic_baseline_disc_full_24) 30 | iconColor = ContextCompat.getColor(context, R.color.pref_color_4) 31 | } 32 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/anim/PrefAnimator.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.anim 2 | 3 | import androidx.recyclerview.widget.RecyclerView 4 | import jp.wasabeef.recyclerview.animators.BaseItemAnimator 5 | 6 | class PrefAnimator : BaseItemAnimator() { 7 | override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) { 8 | holder.itemView.animate() 9 | .alpha(0f) 10 | .scaleX(0.95f) 11 | .scaleY(0.95f) 12 | .setDuration(removeDuration) 13 | .setInterpolator(interpolator) 14 | .setListener(DefaultRemoveAnimatorListener(holder)) 15 | .setStartDelay(getRemoveDelay(holder)) 16 | .start() 17 | } 18 | 19 | override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) { 20 | holder.itemView.alpha = 0f 21 | holder.itemView.scaleX = 0.95f 22 | holder.itemView.scaleY = 0.95f 23 | } 24 | 25 | override fun animateAddImpl(holder: RecyclerView.ViewHolder) { 26 | holder.itemView.animate() 27 | .alpha(1f) 28 | .scaleX(1f) 29 | .scaleY(1f) 30 | .setDuration(addDuration) 31 | .setInterpolator(interpolator) 32 | .setListener(DefaultAddAnimatorListener(holder)) 33 | .setStartDelay(getAddDelay(holder)) 34 | .start() 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/interfaces/ISecurePreference.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.interfaces 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.preference.Preference 6 | import com.zacharee1.systemuituner.R 7 | import com.zacharee1.systemuituner.data.SettingsType 8 | 9 | interface ISecurePreference : IDangerousPreference { 10 | var type: SettingsType 11 | var writeKey: String 12 | 13 | fun initSecure(pref: Preference) { 14 | if (writeKey.isBlank()) writeKey = pref.key ?: "" 15 | } 16 | } 17 | 18 | class SecurePreference(context: Context, attrs: AttributeSet?) : 19 | ISecurePreference, IDangerousPreference by DangerousPreference(context, attrs) { 20 | override var type: SettingsType = 21 | SettingsType.UNDEFINED 22 | override var writeKey: String = "" 23 | 24 | init { 25 | if (attrs != null) { 26 | val array = context.theme.obtainStyledAttributes(attrs, R.styleable.BaseSecurePreference, 0, 0) 27 | 28 | type = SettingsType.values().find { it.value == array.getInt(R.styleable.BaseSecurePreference_settings_type, SettingsType.UNDEFINED.value)} ?: SettingsType.UNDEFINED 29 | writeKey = array.getString(R.styleable.BaseSecurePreference_differing_key) ?: "" 30 | 31 | array.recycle() 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/touchwiz_navigation_bar_color_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 25 | 26 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/zacharee1/systemuituner/services/tiles/DemoTile.kt: -------------------------------------------------------------------------------- 1 | package com.zacharee1.systemuituner.services.tiles 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import android.service.quicksettings.Tile 6 | import com.zacharee1.systemuituner.util.DemoController 7 | import com.zacharee1.systemuituner.util.safeUpdateTile 8 | import kotlinx.coroutines.launch 9 | 10 | @TargetApi(Build.VERSION_CODES.N) 11 | class DemoTile : CoroutineTileService(), (Boolean) -> Unit { 12 | private val demoHandler by lazy { DemoController.getInstance(this) } 13 | 14 | override fun onStartListening() { 15 | demoHandler.updateListeners.add(this) 16 | 17 | updateState() 18 | } 19 | 20 | override fun onStopListening() { 21 | demoHandler.updateListeners.remove(this) 22 | } 23 | 24 | override fun invoke(enabled: Boolean) { 25 | updateState() 26 | } 27 | 28 | private fun updateState() { 29 | qsTile?.state = if (demoHandler.isCurrentlyEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE 30 | qsTile?.safeUpdateTile() 31 | } 32 | 33 | override fun onClick() { 34 | launch { 35 | if (demoHandler.isCurrentlyEnabled) { 36 | demoHandler.exitDemo() 37 | } else { 38 | demoHandler.enterDemo() 39 | } 40 | } 41 | 42 | super.onClick() 43 | } 44 | } --------------------------------------------------------------------------------