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

Commit 60dba736 authored by Adam Lesinski's avatar Adam Lesinski Committed by android-build-merger
Browse files

Register isolated UIDs before reporting process state am: e2b78ac6 am: c526e02c

am: b3d36b76

Change-Id: I5ae741b85f7b85cc512e0f36f1204b52d1998737
parents d31cb178 b3d36b76
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -3750,9 +3750,6 @@ public final class ActivityManagerService extends ActivityManagerNative
            checkTime(startTime, "startProcess: returned from zygote!");
            Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
            if (app.isolated) {
                mBatteryStatsService.addIsolatedUid(app.uid, app.info.uid);
            }
            mBatteryStatsService.noteProcessStart(app.processName, app.info.uid);
            checkTime(startTime, "startProcess: done updating battery stats");
@@ -11418,6 +11415,14 @@ public final class ActivityManagerService extends ActivityManagerNative
                // the uid of the isolated process is specified by the caller.
                uid = isolatedUid;
            }
            // Register the isolated UID with this application so BatteryStats knows to
            // attribute resource usage to the application.
            //
            // NOTE: This is done here before addProcessNameLocked, which will tell BatteryStats
            // about the process state of the isolated UID *before* it is registered with the
            // owning application.
            mBatteryStatsService.addIsolatedUid(uid, info.uid);
        }
        final ProcessRecord r = new ProcessRecord(stats, info, proc, uid);
        if (!mBooted && !mBooting