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

Commit d87d22d6 authored by Sergey Volnov's avatar Sergey Volnov Committed by Automerger Merge Worker
Browse files

Merge "Disable MediaMetrics for the HotwordDetectionService." into sc-dev am: 57493fce

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

Change-Id: I7ab0697135542854e29d225f680a60746a64c8b9
parents fe7aefe7 57493fce
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -308,6 +308,17 @@ bool BaseItem::isEnabled() {
    switch (uid) {
    case AID_RADIO:     // telephony subsystem, RIL
        return false;
    default:
        // Some isolated processes can access the audio system; see
        // AudioSystem::setAudioFlingerBinder (currently only the HotwordDetectionService). Instead
        // of also allowing access to the MediaMetrics service, it's simpler to just disable it for
        // now.
        // TODO(b/190151205): Either allow the HotwordDetectionService to access MediaMetrics or
        // make this disabling specific to that process.
        if (uid >= AID_ISOLATED_START && uid <= AID_ISOLATED_END) {
            return false;
        }
        break;
    }

    int enabled = property_get_int32(Item::EnabledProperty, -1);