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

Commit f50f0573 authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Added number of receivers to ReceiverListProto."

parents 22e048ba ff66f329
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ message ReceiverListProto {
    repeated BroadcastFilterProto filters = 7;
    // Used to find this ReceiverList object in IntentResolver
    optional string hex_hash = 8;
    optional int32 number_receivers = 9;
}

message ProcessRecordProto {
+7 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.am;

import android.annotation.Nullable;
import android.content.IIntentReceiver;
import android.content.IntentFilter;
import android.os.Binder;
@@ -37,7 +38,7 @@ final class ReceiverList extends ArrayList<BroadcastFilter>
        implements IBinder.DeathRecipient {
    final ActivityManagerService owner;
    public final IIntentReceiver receiver;
    public final ProcessRecord app;
    public final @Nullable ProcessRecord app;
    public final int pid;
    public final int uid;
    public final int userId;
@@ -46,7 +47,7 @@ final class ReceiverList extends ArrayList<BroadcastFilter>

    String stringName;

    ReceiverList(ActivityManagerService _owner, ProcessRecord _app,
    ReceiverList(ActivityManagerService _owner, @Nullable ProcessRecord _app,
            int _pid, int _uid, int _userId, IIntentReceiver _receiver) {
        owner = _owner;
        receiver = _receiver;
@@ -82,7 +83,10 @@ final class ReceiverList extends ArrayList<BroadcastFilter>

    void dumpDebug(ProtoOutputStream proto, long fieldId) {
        long token = proto.start(fieldId);
        if (app != null) {
            app.dumpDebug(proto, ReceiverListProto.APP);
            proto.write(ReceiverListProto.NUMBER_RECEIVERS, app.mReceivers.numberOfReceivers());
        }
        proto.write(ReceiverListProto.PID, pid);
        proto.write(ReceiverListProto.UID, uid);
        proto.write(ReceiverListProto.USER, userId);