Loading core/java/android/provider/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -6207,7 +6207,7 @@ public final class Settings { public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; /** * Whether to vibrate for wireless charging events. * Whether to vibrate for charging events. * @hide */ public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; Loading services/core/java/com/android/server/power/Notifier.java +6 −6 Original line number Diff line number Diff line Loading @@ -755,9 +755,10 @@ public class Notifier { }; /** * Plays the wireless charging sound for both wireless and non-wireless charging * If enabled, plays a sound and/or vibration when wireless or non-wireless charging has started */ private void playChargingStartedSound(@UserIdInt int userId) { private void playChargingStartedFeedback(@UserIdInt int userId) { playChargingStartedVibration(userId); final String soundPath = Settings.Global.getString(mContext.getContentResolver(), Settings.Global.CHARGING_STARTED_SOUND); if (isChargingFeedbackEnabled(userId) && soundPath != null) { Loading @@ -773,8 +774,7 @@ public class Notifier { } private void showWirelessChargingStarted(int batteryLevel, @UserIdInt int userId) { playWirelessChargingVibration(userId); playChargingStartedSound(userId); playChargingStartedFeedback(userId); if (mStatusBarManagerInternal != null) { mStatusBarManagerInternal.showChargingAnimation(batteryLevel); } Loading @@ -782,7 +782,7 @@ public class Notifier { } private void showWiredChargingStarted(@UserIdInt int userId) { playChargingStartedSound(userId); playChargingStartedFeedback(userId); mSuspendBlocker.release(); } Loading @@ -790,7 +790,7 @@ public class Notifier { mTrustManager.setDeviceLockedForUser(userId, true /*locked*/); } private void playWirelessChargingVibration(@UserIdInt int userId) { private void playChargingStartedVibration(@UserIdInt int userId) { final boolean vibrateEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.CHARGING_VIBRATION_ENABLED, 1, userId) != 0; if (vibrateEnabled && isChargingFeedbackEnabled(userId)) { Loading Loading
core/java/android/provider/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -6207,7 +6207,7 @@ public final class Settings { public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; /** * Whether to vibrate for wireless charging events. * Whether to vibrate for charging events. * @hide */ public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; Loading
services/core/java/com/android/server/power/Notifier.java +6 −6 Original line number Diff line number Diff line Loading @@ -755,9 +755,10 @@ public class Notifier { }; /** * Plays the wireless charging sound for both wireless and non-wireless charging * If enabled, plays a sound and/or vibration when wireless or non-wireless charging has started */ private void playChargingStartedSound(@UserIdInt int userId) { private void playChargingStartedFeedback(@UserIdInt int userId) { playChargingStartedVibration(userId); final String soundPath = Settings.Global.getString(mContext.getContentResolver(), Settings.Global.CHARGING_STARTED_SOUND); if (isChargingFeedbackEnabled(userId) && soundPath != null) { Loading @@ -773,8 +774,7 @@ public class Notifier { } private void showWirelessChargingStarted(int batteryLevel, @UserIdInt int userId) { playWirelessChargingVibration(userId); playChargingStartedSound(userId); playChargingStartedFeedback(userId); if (mStatusBarManagerInternal != null) { mStatusBarManagerInternal.showChargingAnimation(batteryLevel); } Loading @@ -782,7 +782,7 @@ public class Notifier { } private void showWiredChargingStarted(@UserIdInt int userId) { playChargingStartedSound(userId); playChargingStartedFeedback(userId); mSuspendBlocker.release(); } Loading @@ -790,7 +790,7 @@ public class Notifier { mTrustManager.setDeviceLockedForUser(userId, true /*locked*/); } private void playWirelessChargingVibration(@UserIdInt int userId) { private void playChargingStartedVibration(@UserIdInt int userId) { final boolean vibrateEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.CHARGING_VIBRATION_ENABLED, 1, userId) != 0; if (vibrateEnabled && isChargingFeedbackEnabled(userId)) { Loading