Merge "Merge "Only call finish on operations that have started." into nyc-dev am: 6df8a9a89f am: e24e9a0333" into nyc-mr1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
2ec07c96ef
@@ -306,7 +306,6 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
synchronized (mVibrations) {
|
synchronized (mVibrations) {
|
||||||
removeVibrationLocked(token);
|
removeVibrationLocked(token);
|
||||||
doCancelVibrateLocked();
|
doCancelVibrateLocked();
|
||||||
mCurrentVibration = vib;
|
|
||||||
addToPreviousVibrationsLocked(vib);
|
addToPreviousVibrationsLocked(vib);
|
||||||
startVibrationLocked(vib);
|
startVibrationLocked(vib);
|
||||||
}
|
}
|
||||||
@@ -368,7 +367,6 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
} else {
|
} else {
|
||||||
// A negative repeat means that this pattern is not meant
|
// A negative repeat means that this pattern is not meant
|
||||||
// to repeat. Treat it like a simple vibration.
|
// to repeat. Treat it like a simple vibration.
|
||||||
mCurrentVibration = vib;
|
|
||||||
startVibrationLocked(vib);
|
startVibrationLocked(vib);
|
||||||
}
|
}
|
||||||
addToPreviousVibrationsLocked(vib);
|
addToPreviousVibrationsLocked(vib);
|
||||||
@@ -443,8 +441,7 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
mCurrentVibration = null;
|
mCurrentVibration = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mCurrentVibration = mVibrations.getFirst();
|
startVibrationLocked(mVibrations.getFirst());
|
||||||
startVibrationLocked(mCurrentVibration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock held on mVibrations
|
// Lock held on mVibrations
|
||||||
@@ -466,7 +463,9 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
mode = mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
|
mode = mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
|
||||||
AppOpsManager.OP_VIBRATE, vib.mUid, vib.mOpPkg);
|
AppOpsManager.OP_VIBRATE, vib.mUid, vib.mOpPkg);
|
||||||
}
|
}
|
||||||
if (mode != AppOpsManager.MODE_ALLOWED) {
|
if (mode == AppOpsManager.MODE_ALLOWED) {
|
||||||
|
mCurrentVibration = vib;
|
||||||
|
} else {
|
||||||
if (mode == AppOpsManager.MODE_ERRORED) {
|
if (mode == AppOpsManager.MODE_ERRORED) {
|
||||||
Slog.w(TAG, "Would be an error: vibrate from uid " + vib.mUid);
|
Slog.w(TAG, "Would be an error: vibrate from uid " + vib.mUid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user