-
- All Implemented Interfaces:
-
com.polygamma.ogm.util.ProtobufMessage
public final class DeviceDescriptor implements ProtobufMessage
Device descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classDeviceDescriptor.BuilderDevice descriptor builder.
-
Field Summary
Fields Modifier and Type Field Description public final static intCAPABILITY_BLUETOOTHpublic final static intCAPABILITY_WIFIpublic final static intCAPABILITY_ACCESSIBILITYpublic final static intCAPABILITY_AUTO_TIME_ZONEpublic final static intCAPABILITY_LIMIT_TRACKINGpublic final static intCAPABILITY_FOLDABLEpublic final static intCAPABILITY_ADB
-
Method Summary
Modifier and Type Method Description static DeviceDescriptor.BuilderofBuilder()Construct new empty builder. booleanhasCapability(int cap)Test whether capability is present. DeviceDescriptormergeFrom(ProtobufReader reader)Read and merge from Protobuf wire-codec reader. voidwriteTo(ProtobufWriter writer)Write {@code this}to a Protobuf wire-codec writer.DeviceDescriptor.BuildertoBuilder()Construct new builder initialized with {@code this}.longtimestampSeconds()UNIX epoch timestamp, in seconds, of when descriptor was last updated. inttype()Device type. Stringname()Device name. BuildDescriptorbuild()Build descriptor. BootDescriptorboot()Boot descriptor. SparseBooleanArraycapabilities()Mask of capabilities. List<Pair<String, String>>ids()Pairs of device id type and id value. StringuserAgent()Embedded browser user-agent string. Stringlocale()BCP-47 locale code of device. List<String>inputLocales()BCP-47 locale codes supported for input. PointscreenSizeDips()Screen size, measured in device-independent pixels (DIPS). floatscreenPixelRatio()Ratio of physical pixels to DIPS of screen. intutcOffsetSeconds()Offset, from UTC, of device time-zone. inthashCode()booleanequals(@Nullable() Object other)StringtoString()-
-
Method Detail
-
ofBuilder
static DeviceDescriptor.Builder ofBuilder()
Construct new empty builder.
-
hasCapability
boolean hasCapability(int cap)
Test whether capability is present.
- Parameters:
cap- capability to test for
-
mergeFrom
DeviceDescriptor mergeFrom(ProtobufReader reader)
Read and merge from Protobuf wire-codec reader.
- Parameters:
reader- reader to merge from
-
writeTo
void writeTo(ProtobufWriter writer)
Write
{@code this}to a Protobuf wire-codec writer.- Parameters:
writer- writer to write to
-
toBuilder
DeviceDescriptor.Builder toBuilder()
Construct new builder initialized with
{@code this}.
-
timestampSeconds
long timestampSeconds()
UNIX epoch timestamp, in seconds, of when descriptor was last updated.
-
build
BuildDescriptor build()
Build descriptor.
-
boot
BootDescriptor boot()
Boot descriptor.
-
capabilities
SparseBooleanArray capabilities()
Mask of capabilities.
-
inputLocales
List<String> inputLocales()
BCP-47 locale codes supported for input.
-
screenSizeDips
Point screenSizeDips()
Screen size, measured in device-independent pixels (DIPS).
-
screenPixelRatio
float screenPixelRatio()
Ratio of physical pixels to DIPS of screen.
-
utcOffsetSeconds
int utcOffsetSeconds()
Offset, from UTC, of device time-zone.
-
hashCode
int hashCode()
-
-
-
-