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

Commit 77be4c4f authored by Mark Punzalan's avatar Mark Punzalan Committed by Automerger Merge Worker
Browse files

Handle multi-user when disabling MediaMetrics service. am: b71998ff

parents 4ab9fa9e b71998ff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <set>

#include <binder/Parcel.h>
#include <cutils/multiuser.h>
#include <cutils/properties.h>
#include <utils/Errors.h>
#include <utils/Log.h>
@@ -315,7 +316,8 @@ bool BaseItem::isEnabled() {
        // 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) {
        uid_t appid = multiuser_get_app_id(uid);
        if (appid >= AID_ISOLATED_START && appid <= AID_ISOLATED_END) {
            return false;
        }
        break;