Language

ProtoOutputStream.FieldIdShift Field

Definition

Number of bits to shift the field number to form a tag.

[Android.Runtime.Register("FIELD_ID_SHIFT", ApiSince=30)]
public const int FieldIdShift = 3;
[<Android.Runtime.Register("FIELD_ID_SHIFT", ApiSince=30)>]
val mutable FieldIdShift : int

Field Value

Value = 3
Attributes

Remarks

Number of bits to shift the field number to form a tag.

// Reading a field number from a tag.
int fieldNumber = tag >>> FIELD_ID_SHIFT;

// Building a tag from a field number and a wire type.
int tag = (fieldNumber << FIELD_ID_SHIFT) | wireType;

Android reference for android.util.proto.ProtoOutputStream.FIELD_ID_SHIFT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to