summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/ServiceUtilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger/ServiceUtilities.cpp')
-rw-r--r--services/audioflinger/ServiceUtilities.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audioflinger/ServiceUtilities.cpp b/services/audioflinger/ServiceUtilities.cpp
index 33bd416..8c449a0 100644
--- a/services/audioflinger/ServiceUtilities.cpp
+++ b/services/audioflinger/ServiceUtilities.cpp
@@ -53,6 +53,10 @@ bool recordingAllowed(const String16& opPackageName) {
}
const uid_t uid = IPCThreadState::self()->getCallingUid();
+
+ // To permit command-line native tests
+ if (uid == AID_ROOT) return true;
+
String16 checkedOpPackageName = opPackageName;
// In some cases the calling code has no access to the package it runs under.