Fix inverted logic in isOperationRestricted
SensorService::isOperationRestricted incorrectly returned 'true'
whenever the Sensor Service was in normal mode and an application was
not whitelisted. This patch corrects the logic and updates the
function's name to be isOperationPermitted to avoid confusion.
Bug: 128028800
Test: CTS Direct Channel tests pass
Change-Id: Ia1684be54c1c7c0db81d8fcb2780fd2583a35537
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 136ee27..fbfe05d 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -272,7 +272,7 @@
// allowed to register for or call flush on sensors. Typically only cts test packages are
// allowed.
bool isWhiteListedPackage(const String8& packageName);
- bool isOperationRestricted(const String16& opPackageName);
+ bool isOperationPermitted(const String16& opPackageName);
// Reset the state of SensorService to NORMAL mode.
status_t resetToNormalMode();