I am trying to get the brightness value from Android (12) and converting it to percentage using
android.provider.Settings.System.getInt(context.getContentResolver().SCREEN_BRIGHTNESS)
Now, when brightness is at 0% brightness value is at 1.0 and at 100% brightness value is at 255.0. However, when the brightness is at 50%, the value returned is 22.0. This makes me think the brightness value is logarithmic.
Is there a method to convert this or get this value as percentage?