45 Commits

Author SHA1 Message Date
koko-07870
d7741838e9 FlashControl: Re-format with ktfmt
Using google-style

Signed-off-by: koko-07870 <ko282ko82@gmail.com>
2025-04-27 13:05:28 +09:00
koko-07870
aedb448e1b FlashControl: Add launcher icon
Signed-off-by: koko-07870 <ko282ko82@gmail.com>
2025-04-27 13:05:28 +09:00
koko-07870
9400ffe1c8 FlashControl: Fix leftover intensity spelling
Signed-off-by: koko-07870 <ko282ko82@gmail.com>
2025-04-27 13:05:28 +09:00
koko-07870
bb7785b221 FlashControl: correct intensity spelling and modify footer message
Signed-off-by: koko-07870 <ko282ko82@gmail.com>
2025-04-27 13:05:06 +09:00
roynatech2544
420366b66b app: Update for QPR2
app: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Signed-off-by: RisenID <risen@pixelexperience.org>
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e

app: Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427 | AOSP
Test: manual - check Settings pages
Test: m RunSettingsLibRoboTests
Signed-off-by: RisenID <risen@pixelexperience.org>
Change-Id: I85a70d4c504d8584030ea4a058f30d74206ab835

app: Migrate to SelectorWithWidgetPreference
Change-Id: Ie4aaa1fff836a407c1d8f5b919b7b0051748f5d3

Co-Authored-by: Peter Kalauskas <peskal@google.com>
Co-Authored-by: Chaohui Wang <chaohuiw@google.com>
Co-Authored-by: LuK1337 <priv.luk@gmail.com>
2025-04-27 13:05:06 +09:00
roynatech2544
47004e4621 app: FlashControl: Log the message from ex 2025-04-27 13:02:02 +09:00
roynatech2544
db768fb8ec app: FlashControl: Fix possible crash on create 2025-04-27 13:02:02 +09:00
roynatech2544
49b3c9119a FlashControl: Change tabs to spaces 2023-06-10 16:31:28 +09:00
roynatech2544
385f4d7187 FlashControl: res: Add more help text 2023-06-10 11:28:42 +09:00
roynatech2544
a45a6a6e5f FlashControl: res: Categorize settings 2023-06-10 11:10:26 +09:00
roynatech2544
9bef416114 FlashControl: Purge duplicate codes 2023-05-25 16:56:10 +09:00
roynatech2544
c1e76f95c8 FlashControl: Call unregisterObserver
- Also turn flash off if APP is controlling it
  On onPause, onStop (Move it from onDestroy)
2023-05-25 14:13:10 +09:00
roynatech2544
0f10637626 FlashControl: Reduce delay to 1/4 2023-05-25 11:00:47 +09:00
roynatech2544
5a3ba76d86 FlashControl: Disable flash on exit when QS flash is off 2023-05-25 08:25:23 +09:00
roynatech2544
3039d22a6a FlashControl: Fetch latest setting each time 2023-05-24 20:45:44 +09:00
roynatech2544
04ba8a64a9 FlashControl: Fix warnings 2023-05-24 20:45:44 +09:00
roynatech2544
cc2107021a FlashControl: Restore brightness after enableFlash() 2023-05-24 20:45:44 +09:00
roynatech2544
8752f42790 FlashControl: Shorten delay of apply 2023-05-24 20:45:39 +09:00
roynatech2544
ff7020661a FlashControl: Override onResume() instead 2023-05-24 19:55:31 +09:00
roynatech2544
b7162b2989 FlashControl: Mind that that fails many times 2023-05-24 17:47:34 +09:00
roynatech2544
9b5d22245f FlashControl: Add persistent service for brightness restore 2023-05-24 17:40:05 +09:00
roynatech2544
f9a07b0558 FlashControl: QS Panel off is priotized
- So QS flash off controls flash off when it is on
2023-05-24 15:27:08 +09:00
roynatech2544
fff244c350 FlashControl: Use setChecked(bool) 2023-05-24 15:27:08 +09:00
roynatech2544
8ca9bd12ef FlashControl: Do not tamper with settings
Logic here is since APP can tell if QS panel flash is on, and APP cannot control QS to modify state, just disable turning off flash if QS has turned it on

- Revert 2776ddb454
2023-05-24 15:26:58 +09:00
roynatech2544
a2e354f899 fixup! FlashControl: Show current intesity if flash is on from launch
- Brightness 0 is off
2023-05-24 15:24:16 +09:00
roynatech2544
bca6f01dc1 FlashControl: Post switch with main handler 2023-05-24 15:24:16 +09:00
roynatech2544
de2c668528 FlashControl: Don't try requireActivity() unless context valid 2023-05-24 11:51:12 +09:00
roynatech2544
7ed79f0d2c FlashControl: Show current intesity if flash is on from launch 2023-05-24 11:49:54 +09:00
roynatech2544
d1ffabc0f6 FlashControl: Fix never-true condition 2023-05-24 10:41:03 +09:00
roynatech2544
cf0b9b0744 FlashControl: res: Correct title
- It is not enabling flash control just flash
2023-05-24 10:41:03 +09:00
roynatech2544
f3cb3bb887 FlashControl: Sort out common radioButton changes 2023-05-24 10:41:01 +09:00
roynatech2544
68907534f3 FlashControl: Do not hardcode initial false 2023-05-24 10:39:51 +09:00
roynatech2544
5c5297943d FlashControl: Listen to flashlight setting, notify to setting
- Revert 7691208
2023-05-24 10:39:45 +09:00
roynatech2544
867aed23d3 FlashControl: Revert user action when operation failed any case 2023-05-24 08:24:39 +09:00
roynatech2544
9e8c660ebb FlashControl: res: Make on/off screen not caps 2023-05-24 07:23:42 +09:00
roynatech2544
7691208108 FlashControl: Show toast when QS and app data not in sync 2023-05-24 07:23:36 +09:00
roynatech2544
d23aed6283 FlashControl: Move description to footer 2023-05-24 06:46:06 +09:00
roynatech2544
2776ddb454 FlashControl: Just write to settings value 2023-05-24 06:29:44 +09:00
roynatech2544
2815fa59a4 FlashControl: Switch to title
- Summary is too small
2023-05-24 00:43:25 +09:00
roynatech2544
0ae15b6e1b FlashControl: Fix the sync again 2023-05-24 00:43:25 +09:00
roynatech2544
446a3a4ccd FlashControl: Try to keep sync with QS flash 2023-05-24 00:43:12 +09:00
roynatech2544
5c9a01d6bb FlashControl: Disable settings while test flash is off 2023-05-24 00:03:01 +09:00
roynatech2544
e6632ecfff FlashControl: I should catch IllegalStateException 2023-05-23 23:57:48 +09:00
roynatech2544
e4507f076a FlashControl: Move executor to global variable so it won't get gc 2023-05-23 23:49:58 +09:00
roynatech2544
37d18f5b9b FlashControl: Initial impl
- Base was from LineageOS' SamsungDap

Co-authored-by: LuK1337 <priv.luk@gmail.com>
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
2023-05-23 22:42:11 +09:00