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

Commit 3d1e3138 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "make statsd run in its own uid"

parents ce35097e 0f217104
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,5 +14,5 @@

service statsd /system/bin/statsd
    class main
    user system
    group system
    user statsd
    group statsd log
+2 −0
Original line number Diff line number Diff line
@@ -168,6 +168,8 @@
    <assign-permission name="android.permission.ACCESS_LOWPAN_STATE" uid="lowpan" />
    <assign-permission name="android.permission.MANAGE_LOWPAN_INTERFACES" uid="lowpan" />

    <assign-permission name="android.permission.STATSCOMPANION" uid="statsd" />

    <!-- This is a list of all the libraries available for application
         code to link against. -->

+7 −3
Original line number Diff line number Diff line
@@ -743,9 +743,13 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
                filter.addAction(Intent.ACTION_SHUTDOWN);
                mContext.registerReceiverAsUser(
                        mShutdownEventReceiver, UserHandle.ALL, filter, null, null);

                final long token = Binder.clearCallingIdentity();
                try {
                    // Pull the latest state of UID->app name, version mapping when statsd starts.
                    informAllUidsLocked(mContext);
                } finally {
                    restoreCallingIdentity(token);
                }
            } catch (RemoteException e) {
                Slog.e(TAG, "Failed to inform statsd that statscompanion is ready", e);
                forgetEverything();