Merge "Implement missing hashCode() method in ApfCapabilities" into main

This commit is contained in:
Maciej Żenczykowski 2024-05-20 10:48:15 +00:00 • committed by Gerrit Code Review
commit c4d1aefecc

View file

@ -22,6 +22,8 @@ import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Objects;
/**
* APF program support capabilities. APF stands for Android Packet Filtering and it is a flexible
* way to drop unwanted network packets to save power.
@ -102,6 +104,11 @@ public final class ApfCapabilities implements Parcelable {
&& apfPacketFormat == other.apfPacketFormat;
}
@Override
public int hashCode() {
return Objects.hash(apfVersionSupported, maximumApfProgramSize, apfPacketFormat);
}
/**
* Determines whether the APF interpreter advertises support for the data buffer access opcodes
* LDDW (LoaD Data Word) and STDW (STore Data Word). Full LDDW (LoaD Data Word) and