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

Commit eff0d082 authored by Andy Hung's avatar Andy Hung
Browse files

MediaMetrics: Fix crash when logging during SystemServer stop

Test: adb shell stop / start many times
Bug: 144864166
Change-Id: Ieed2d6edcdc2a0ff92ae4a3a373c56788abff4d3
parent 15ccc647
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -489,11 +489,12 @@ void MediaAnalyticsService::UidInfo::setPkgInfo(
            if (!status.isOk()) {
                ALOGE("%s: getNamesForUids failed: %s",
                        __func__, status.exceptionMessage().c_str());
            }
            } else {
                if (!names[0].empty()) {
                    pkg = names[0].c_str();
                }
            }
        }

        // strip any leading "shared:" strings that came back
        if (pkg.compare(0, 7, "shared:") == 0) {