Revert "sm6150-common: parts: Enable doze_status on screen off"

* Manually setting the doze status before entering the low-power mode
  makes the doze mode not to be set correctly on sweet.

* The doze status is automatically set when entering the low-power mode

This reverts commit 10f101e143.

Change-Id: I4dfee2ffb351b9bc426268e437a26f9eaefec319
This commit is contained in:
danielml 2023-06-03 22:16:39 +02:00 committed by Arian
parent f4e2098486
commit 84cbd43575
4 changed files with 0 additions and 18 deletions

View File

@ -72,9 +72,6 @@ public class DozeService extends Service {
private void onDisplayOn() { private void onDisplayOn() {
if (DEBUG) if (DEBUG)
Log.d(TAG, "Display on"); Log.d(TAG, "Display on");
if (DozeUtils.isAlwaysOnEnabled(this)) {
DozeUtils.setDozeStatus(DozeUtils.DOZE_STATUS_DISABLED);
}
if (DozeUtils.isPickUpEnabled(this)) { if (DozeUtils.isPickUpEnabled(this)) {
mPickupSensor.disable(); mPickupSensor.disable();
} }
@ -89,9 +86,6 @@ public class DozeService extends Service {
private void onDisplayOff() { private void onDisplayOff() {
if (DEBUG) if (DEBUG)
Log.d(TAG, "Display off"); Log.d(TAG, "Display off");
if (DozeUtils.isAlwaysOnEnabled(this)) {
DozeUtils.setDozeStatus(DozeUtils.DOZE_STATUS_ENABLED);
}
if (DozeUtils.isPickUpEnabled(this)) { if (DozeUtils.isPickUpEnabled(this)) {
mPickupSensor.enable(); mPickupSensor.enable();
} }

View File

@ -60,11 +60,6 @@ public final class DozeUtils {
protected static final String DOZE_MODE_HBM = "1"; protected static final String DOZE_MODE_HBM = "1";
protected static final String DOZE_MODE_LBM = "0"; protected static final String DOZE_MODE_LBM = "0";
private static final String DOZE_STATUS_PATH =
"/sys/devices/platform/soc/soc:qcom,dsi-display/doze_status";
protected static final String DOZE_STATUS_ENABLED = "1";
protected static final String DOZE_STATUS_DISABLED = "0";
protected static final String DOZE_BRIGHTNESS_LBM = "0"; protected static final String DOZE_BRIGHTNESS_LBM = "0";
protected static final String DOZE_BRIGHTNESS_HBM = "1"; protected static final String DOZE_BRIGHTNESS_HBM = "1";
protected static final String DOZE_BRIGHTNESS_AUTO = "2"; protected static final String DOZE_BRIGHTNESS_AUTO = "2";
@ -157,10 +152,6 @@ public final class DozeUtils {
return FileUtils.writeLine(DOZE_MODE_PATH, value); return FileUtils.writeLine(DOZE_MODE_PATH, value);
} }
protected static boolean setDozeStatus(String value) {
return FileUtils.writeLine(DOZE_STATUS_PATH, value);
}
protected static boolean isDozeAutoBrightnessEnabled(Context context) { protected static boolean isDozeAutoBrightnessEnabled(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context) return PreferenceManager.getDefaultSharedPreferences(context)
.getString(DOZE_BRIGHTNESS_KEY, DOZE_BRIGHTNESS_LBM) .getString(DOZE_BRIGHTNESS_KEY, DOZE_BRIGHTNESS_LBM)

View File

@ -96,9 +96,7 @@ on boot
# Set doze mode permissions # Set doze mode permissions
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode chown system system /sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display/doze_status
chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode
chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display/doze_status
# Set xiaomi touch permissions # Set xiaomi touch permissions
chown system system /dev/xiaomi-touch chown system system /dev/xiaomi-touch

View File

@ -14,7 +14,6 @@
/sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui u:object_r:vendor_sysfs_fod:s0 /sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui u:object_r:vendor_sysfs_fod:s0
/sys/devices/platform/soc/soc:qcom,dsi-display/hbm u:object_r:sysfs_hbm:s0 /sys/devices/platform/soc/soc:qcom,dsi-display/hbm u:object_r:sysfs_hbm:s0
/sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode u:object_r:sysfs_doze:s0 /sys/devices/platform/soc/soc:qcom,dsi-display/doze_mode u:object_r:sysfs_doze:s0
/sys/devices/platform/soc/soc:qcom,dsi-display/doze_status u:object_r:sysfs_doze:s0
# Fingerprint # Fingerprint
/dev/goodix_fp u:object_r:fingerprint_device:s0 /dev/goodix_fp u:object_r:fingerprint_device:s0