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

Commit ea98e436 authored by Michal Karpinski's avatar Michal Karpinski Committed by Android (Google) Code Review
Browse files

Merge "Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent"

parents fc3d4896 da9d3ad3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ public final class ConnectEvent extends NetworkEvent implements Parcelable {
    /** The destination port number. */
    private final int port;

    /** @hide */
    public ConnectEvent(String ipAddress, int port, String packageName, long timestamp) {
        super(packageName, timestamp);
        this.ipAddress = ipAddress;
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ public final class DnsEvent extends NetworkEvent implements Parcelable {
     */
    private final int ipAddressesCount;

    /** @hide */
    public DnsEvent(String hostname, String[] ipAddresses, int ipAddressesCount,
            String packageName, long timestamp) {
        super(packageName, timestamp);
+13 −4
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.app.admin;

import android.content.pm.PackageManager;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelFormatException;
@@ -35,21 +36,29 @@ public abstract class NetworkEvent implements Parcelable {
    /** The timestamp of the event being reported in milliseconds. */
    long timestamp;

    protected NetworkEvent() {
    /** @hide */
    NetworkEvent() {
        //empty constructor
    }

    protected NetworkEvent(String packageName, long timestamp) {
    /** @hide */
    NetworkEvent(String packageName, long timestamp) {
        this.packageName = packageName;
        this.timestamp = timestamp;
    }

    /** Returns the package name of the UID that performed the query. */
    /**
     * Returns the package name of the UID that performed the query, as returned by
     * {@link PackageManager#getNameForUid}.
     */
    public String getPackageName() {
        return packageName;
    }

    /** Returns the timestamp of the event being reported in milliseconds. */
    /**
     * Returns the timestamp of the event being reported in milliseconds, the difference between
     * the time the event was reported and midnight, January 1, 1970 UTC.
     */
    public long getTimestamp() {
        return timestamp;
    }