Merge "Remove call to set wakeLock WorkSource from VibrationThread constructor" into sc-v2-dev am: 0b6477d82f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16181836

Change-Id: Ic9b75fbf6639249842fe23051d71ab563a0e1a3e
This commit is contained in:
TreeHugger Robot
2021-11-03 16:26:08 +00:00
committed by Automerger Merge Worker

View File

@@ -98,7 +98,7 @@ final class VibrationThread extends Thread implements IBinder.DeathRecipient {
}
private final Object mLock = new Object();
private final WorkSource mWorkSource = new WorkSource();
private final WorkSource mWorkSource;
private final PowerManager.WakeLock mWakeLock;
private final IBatteryStats mBatteryStatsService;
private final VibrationSettings mVibrationSettings;
@@ -119,9 +119,8 @@ final class VibrationThread extends Thread implements IBinder.DeathRecipient {
mVibrationSettings = vibrationSettings;
mDeviceEffectAdapter = effectAdapter;
mCallbacks = callbacks;
mWorkSource = new WorkSource(mVibration.uid);
mWakeLock = wakeLock;
mWorkSource.set(vib.uid);
mWakeLock.setWorkSource(mWorkSource);
mBatteryStatsService = batteryStatsService;
CombinedVibration effect = vib.getEffect();
@@ -152,6 +151,7 @@ final class VibrationThread extends Thread implements IBinder.DeathRecipient {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_DISPLAY);
mWakeLock.setWorkSource(mWorkSource);
mWakeLock.acquire();
try {
mVibration.token.linkToDeath(this, 0);