Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe898ee9 authored by Ray Essick's avatar Ray Essick Committed by android-build-merger
Browse files

Suppress 'radio' processes to media.metrics

am: 79a89ef4

Change-Id: I884225339ff2c47a20ada040e0439d996fbe78d2
parents da9e0c9a 79a89ef4
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <binder/IServiceManager.h>
#include <media/IMediaAnalyticsService.h>
#include <media/MediaAnalyticsItem.h>
#include <private/android_filesystem_config.h>

namespace android {

@@ -776,6 +777,24 @@ sp<IMediaAnalyticsService> MediaAnalyticsItem::getInstance() {
        return NULL;
    }

    // completely skip logging from certain UIDs. We do this here
    // to avoid the multi-second timeouts while we learn that
    // sepolicy will not let us find the service.
    // We do this only for a select set of UIDs
    // The sepolicy protection is still in place, we just want a faster
    // response from this specific, small set of uids.
    {
        uid_t uid = getuid();
        switch (uid) {
            case AID_RADIO:     // telephony subsystem, RIL
                return NULL;
                break;
            default:
                // let sepolicy deny access if appropriate
                break;
        }
    }

    {
        Mutex::Autolock _l(sInitMutex);
        const char *badness = "";