Android 13 will let you adjust the brightness of your phone’s flashlight

Android 13 will let you adjust the brightness of your phone’s flashlight

Google rolled out the first developer preview build of Android 13 last month, giving us a look at some of the new features coming in the next big Android release. Along with major changes like new privacy features, themed icons, improved language controls, etc., Android 13 also includes a couple of minor improvements, like the ability to turn on the flashlight using Quick Tap gestures on Pixel devices. In addition, recent reports suggest that Android 13 will also include another flashlight-related feature that has been available on iPhones for a while.

According to Esper’s Mishaal Rahman, Android 13 introduces two new APIs to the CameraManager class — getTorchStrengthLevel and turnOnTorchWithStrengthLevel. The first returns the current brightness level of the flashlight, while the second sets the brightness level from a minimum of 1 to a maximum determined by the hardware. In essence, these new APIs will let users adjust the brightness of their phone’s flashlight, which could come in handy in various scenarios.

XDA VIDEO OF THE DAY
Flashlight brightness slider in Samsung's One UI 4

Flashlight brightness slider in Samsung’s One UI 4

For the unaware, Android currently only offers a toggle to turn the flashlight on or off. While the custom Android skins from some OEMs, like Samsung, include a brightness control slider for the flashlight, such a feature is not available on devices from most other OEMs. Google plans to address that with Android 13 by offering a native brightness control feature for the flashlight. However, despite the change, some devices running Android 13 might not get the feature.

As Mishaal notes, “The reason support for this feature will be limited is that it will require an update to the camera hardware abstraction layer (HAL)…[Since] Google has frozen its new HAL requirements to ensure that vendor implementations built against version N will be certifiable for up to version N+3…device makers can upgrade their devices to Android 13 while reusing a vendor implementation designed for an older Android release that doesn’t include the new camera device HAL and its support for LED brightness control.”

To offer the feature, OEMs will have to implement version 3.8 of the camera device HAL in their Android 13 release. And whether OEMs implement version 3.8 or not will depend on the requirements laid out in the vendor software requirements (VSR) for Android 13, which Google is yet to finalize.


Source: Esper

About author

Pranob Mehrotra
Pranob Mehrotra

A Literature and Linguistics graduate with a keen interest in everything Android. When not writing about tech, Pranob spends most of his time either playing League of Legends or lurking on Reddit.

We are reader supported. External links may earn us a commission.