sm6150-common: parts: Add support for zero brightness doze mode

Change-Id: I027f7d1b3787b5b7140315ca6dced19a1f93361c
This commit is contained in:
Arian 2021-07-03 19:53:20 +02:00
parent 727405d31d
commit 8720bb5de8
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
4 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"/>
</vector>

View File

@ -18,11 +18,13 @@
<string-array name="doze_brightness_level">
<item>Low brightness</item>
<item>High brightness</item>
<item>Zero brightness </item>
<item>Adaptive brightness</item>
</string-array>
<string-array name="doze_brightness_level_mode">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
</resources>

View File

@ -173,6 +173,9 @@ public class DozeSettingsFragment extends PreferenceFragment
case DozeUtils.DOZE_BRIGHTNESS_HBM:
mDozeBrightnessPreference.setIcon(R.drawable.ic_doze_brightness_high);
break;
case DozeUtils.DOZE_BRIGHTNESS_DARK:
mDozeBrightnessPreference.setIcon(R.drawable.ic_doze_brightness_dark);
break;
case DozeUtils.DOZE_BRIGHTNESS_AUTO:
mDozeBrightnessPreference.setIcon(R.drawable.ic_doze_brightness_auto);
break;

View File

@ -58,7 +58,8 @@ public final class DozeUtils {
protected static final String DOZE_BRIGHTNESS_LBM = "0";
protected static final String DOZE_BRIGHTNESS_HBM = "1";
protected static final String DOZE_BRIGHTNESS_AUTO = "2";
protected static final String DOZE_BRIGHTNESS_DARK = "2";
protected static final String DOZE_BRIGHTNESS_AUTO = "3";
public static void onBootCompleted(Context context) {
checkDozeService(context);