├── .editorconfig ├── .github ├── FUNDING.yml ├── device-catalog-manager.py ├── perf-impr-calc.py ├── performance-data.csv ├── popular_devices_20240914.csv ├── popular_devices_20241025.csv ├── popular_devices_20241117.csv ├── popular_devices_20250503.csv └── workflows │ ├── continuous_build.yml │ ├── release-builder.yml │ └── update-device-catalog.yml ├── .gitignore ├── .idea ├── copyright │ ├── Apache.xml │ └── profiles_settings.xml └── scopes │ └── FlashDim.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── benchmark-rules.pro ├── build.gradle.kts ├── proguard-rules-libre.pro ├── proguard-rules.pro └── src │ ├── debug │ └── res │ │ └── xml │ │ └── shortcuts.xml │ ├── libre │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── strings.xml │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-playstore.png │ ├── kotlin │ │ └── com │ │ │ └── cyb3rko │ │ │ └── flashdim │ │ │ ├── App.kt │ │ │ ├── AppReviewManager.kt │ │ │ ├── Camera.kt │ │ │ ├── FlashlightExceptionHandling.kt │ │ │ ├── IntervalHandler.kt │ │ │ ├── MorseHandler.kt │ │ │ ├── activities │ │ │ ├── MainActivity.kt │ │ │ └── SettingsActivity.kt │ │ │ ├── modals │ │ │ ├── AboutDialog.kt │ │ │ ├── AccessibilityInfoDialog.kt │ │ │ ├── DeviceSupportDialog.kt │ │ │ ├── IntervalDialog.kt │ │ │ ├── LinksDialog.kt │ │ │ └── MorseDialog.kt │ │ │ ├── quicksettings │ │ │ └── SettingsTile.kt │ │ │ ├── seekbar │ │ │ ├── LightLevelSeekBar.kt │ │ │ └── SeekBarChangeListener.kt │ │ │ ├── service │ │ │ └── VolumeButtonService.kt │ │ │ └── utils │ │ │ ├── DeviceSupportManager.kt │ │ │ ├── Safe.kt │ │ │ ├── Utils.kt │ │ │ └── Vibrator.kt │ └── res │ │ ├── drawable │ │ ├── _ic_information.xml │ │ ├── _ic_information_scaled.xml │ │ ├── _ic_rocket.xml │ │ ├── _ic_vibration.xml │ │ ├── avatar.jpg │ │ ├── ic_button_service.xml │ │ ├── ic_chat.xml │ │ ├── ic_close.xml │ │ ├── ic_coins.xml │ │ ├── ic_git.xml │ │ ├── ic_launcher_foreground.xml │ │ ├── ic_level.xml │ │ ├── ic_level_scaled.xml │ │ ├── ic_link.xml │ │ ├── ic_link_scaled.xml │ │ ├── ic_matrix.xml │ │ ├── ic_restart.xml │ │ ├── ic_settings.xml │ │ ├── ic_shortcut_half.xml │ │ ├── ic_shortcut_max.xml │ │ ├── ic_shortcut_min.xml │ │ └── logo.png │ │ ├── layout-sw600dp │ │ └── activity_main.xml │ │ ├── layout-sw900dp │ │ └── activity_main.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_settings.xml │ │ ├── dialog_interval.xml │ │ ├── dialog_links.xml │ │ ├── dialog_morse_input.xml │ │ └── preference_switch.xml │ │ ├── menu │ │ └── menu.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.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 │ │ ├── raw │ │ └── excluded_devices.csv │ │ ├── values │ │ ├── attrs.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── accessibility_service_config.xml │ │ ├── preferences.xml │ │ └── shortcuts.xml │ └── release │ └── generated │ └── baselineProfiles │ ├── baseline-prof.txt │ └── startup-prof.txt ├── baseline ├── .gitignore ├── build.gradle.kts └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cyb3rko │ └── flashdim │ └── baseline │ ├── BaselineProfileGenerator.kt │ └── StartupBenchmarks.kt ├── build.gradle.kts ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── included_devices.csv ├── legal └── privacy_policy.html ├── logo.png ├── metadata └── en-US │ ├── full_description.txt │ ├── images │ ├── icon.png │ └── phoneScreenshots │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ └── 6.png │ ├── short_description.txt │ └── title.txt └── settings.gradle.kts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | ij_any_keep_indents_on_empty_lines = false 7 | ij_smart_tabs = true 8 | indent_style = space 9 | indent_size = 2 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.xml] 14 | indent_size = 4 15 | 16 | [*.{kt,kts}] 17 | indent_size = 4 18 | ij_visual_guides = 100 19 | ktlint_code_style = android_studio 20 | 21 | # Spaces 22 | ## Before parentheses 23 | ij_kotlin_space_before_if_parentheses = true 24 | ij_kotlin_space_before_for_parentheses = true 25 | ij_kotlin_space_before_while_parentheses = true 26 | ij_kotlin_space_before_catch_parentheses = true 27 | ij_kotlin_space_before_when_parentheses = true 28 | 29 | ## Around operators 30 | ij_kotlin_spaces_around_assignment_operators = true 31 | ij_kotlin_spaces_around_logical_operators = true 32 | ij_kotlin_spaces_around_equality_operators = true 33 | ij_kotlin_spaces_around_relational_operators = true 34 | ij_kotlin_spaces_around_additive_operators = true 35 | ij_kotlin_spaces_around_multiplicative_operators = true 36 | ij_kotlin_spaces_around_unary_operator = false 37 | ij_kotlin_spaces_around_range = false 38 | 39 | ## Other 40 | ij_kotlin_space_before_comma = false 41 | ij_kotlin_space_after_comma = true 42 | ij_kotlin_space_before_type_colon = false 43 | ij_kotlin_space_after_type_colon = true 44 | ij_kotlin_space_before_extend_colon = true 45 | ij_kotlin_space_after_extend_colon = true 46 | ij_kotlin_insert_whitespaces_in_simple_one_line_method = true 47 | ij_kotlin_spaces_around_function_type_arrow = true 48 | ij_kotlin_spaces_around_when_arrow = true 49 | ij_kotlin_space_before_lambda_arrow = true 50 | 51 | # Load/Save 52 | ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL 53 | 54 | # 'when' statements 55 | ij_kotlin_line_break_after_multiline_when_entry = false 56 | 57 | [*.md] 58 | trim_trailing_whitespace = false 59 | max_line_length = unset -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: cyb3rko 2 | buy_me_a_coffee: cyb3rko 3 | custom: https://paypal.me/cyb3rko 4 | -------------------------------------------------------------------------------- /.github/device-catalog-manager.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import os 3 | 4 | 5 | def get_file_line_count(): 6 | if os.name == "posix": 7 | return int(os.popen("wc -l < excluded_devices.csv").read()[:-1]) 8 | elif os.name == "nt": 9 | return int(os.popen("type excluded_devices.csv | find /v /c \"\"").read()[:-1]) - 1 10 | else: 11 | raise Exception("Who are you?") 12 | 13 | 14 | def get_manufacturer_link(manu_letters: list[str], manu: str) -> (list[str], str): 15 | manu = manu.capitalize() 16 | if manu[0] in manu_letters: 17 | return manu_letters, "" 18 | else: 19 | manu_letters.append(manu[0]) 20 | return manu_letters, f" name=\"{manu[0]}\"" 21 | 22 | 23 | def get_quicklinks(manu_letters: list[str]) -> str: 24 | quicklinks = "" 25 | for letter in manu_letters: 26 | quicklinks += f"[{letter}](#{letter.lower()}) " 27 | quicklinks += " \n*Links may only work in common browsers*\n\n" 28 | return quicklinks 29 | 30 | 31 | manufacturers = [] 32 | manufacturers_letters = [] 33 | output = "" 34 | print(f"Reading CSV file in {os.getcwd()}") 35 | with open("excluded_devices.csv", "r", encoding="utf-8") as file: 36 | reader = csv.reader(file, delimiter=',') 37 | row_count = get_file_line_count() 38 | print(f"Found {row_count} entries") 39 | if row_count < 1: 40 | raise Exception("Empty CSV file") 41 | next(reader) 42 | device_count = 0 43 | manufacturer = None 44 | manufacturer_count = 0 45 | prev_name = None 46 | models = [] 47 | for row in reader: 48 | print("Entry:", row) 49 | if row[0].startswith("XMobile"): 50 | output += "
  • " + prev_name + " [" + ", ".join(models) + "]
  • \n" 51 | device_count += 1 52 | output = output.replace("<>", str(manufacturer_count + 1)) 53 | (manufacturers_letters, manufacturer_link) = get_manufacturer_link(manufacturers_letters, "XMobile") 54 | output += f" \n\n\n XMobile (<>)\n