Flashlight Quick Settings tile does not update when activated using power button · Issue #1035 · LineageOS/issues · GitHub

 

Device Codename

xaga

LineageOS Version

lineage-24.0

Build Date

20261028

Kernel Version

5.10.269-g56de8342020a

Baseband Version

MOLY.NR16.R1.MP3.TC8.PR1.SP.V1.P80.T1,MOLY.NR16.R1.MP3.TC8.PR1.SP.V1.P80.T1

System Modifications

Google Apps (GApps) installed

Expected Behavior

When the flashlight is turned on by long-pressing the power button while the screen is off, the Flashlight Quick Settings tile should immediately reflect its actual state and appear enabled.

Tapping the Flashlight tile once should turn the flashlight off, regardless of how it was originally activated.

Current Behavior

When I enable the “Long press for torch” option under Settings > System > Buttons and turn on the flashlight by long-pressing the power button while the screen is off, the flashlight turns on correctly.

However, after waking the device and opening Quick Settings, the Flashlight tile incorrectly shows that the flashlight is off, even though it is physically on.

As a result, I have to tap the Flashlight tile twice to turn it off. The first tap only changes the tile’s state to enabled, and the second tap actually turns off the flashlight.

This appears to be a synchronization issue between the power button flashlight shortcut and the Quick Settings tile.

Possible Solution

Ensure that the flashlight state is properly synchronized between the “Long press for torch” power button shortcut and the Flashlight Quick Settings tile.

When the flashlight is activated through the power button shortcut, the system should immediately update the Quick Settings tile to reflect the actual flashlight state.

The issue may be caused by the power button shortcut not properly notifying the Quick Settings flashlight controller about the state change.

Steps to Reproduce

  1. Open Settings > System > Buttons.
  2. Enable “Long press for torch” under the Power button section.
  3. Turn off the screen using the power button.
  4. Long-press the power button to activate the flashlight.
  5. Wake the device and unlock it.
  6. Swipe down to open Quick Settings.
  7. Observe that the Flashlight tile appears disabled, even though the flashlight is on.
  8. Tap the Flashlight tile once. It changes to enabled, but the flashlight remains on.
  9. Tap the Flashlight tile a second time. The flashlight finally turns off.

Confirmation

 

Read more here: Source link