diff options
Diffstat (limited to 'android/content/pm/FeatureInfo.java')
-rw-r--r-- | android/content/pm/FeatureInfo.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/android/content/pm/FeatureInfo.java b/android/content/pm/FeatureInfo.java index 9ee6fa24..ff9fd8ec 100644 --- a/android/content/pm/FeatureInfo.java +++ b/android/content/pm/FeatureInfo.java @@ -18,6 +18,7 @@ package android.content.pm; import android.os.Parcel; import android.os.Parcelable; +import android.util.proto.ProtoOutputStream; /** * Definition of a single optional hardware or software feature of an Android @@ -113,6 +114,18 @@ public class FeatureInfo implements Parcelable { dest.writeInt(flags); } + /** @hide */ + public void writeToProto(ProtoOutputStream proto, long fieldId) { + long token = proto.start(fieldId); + if (name != null) { + proto.write(FeatureInfoProto.NAME, name); + } + proto.write(FeatureInfoProto.VERSION, version); + proto.write(FeatureInfoProto.GLES_VERSION, getGlEsVersion()); + proto.write(FeatureInfoProto.FLAGS, flags); + proto.end(token); + } + public static final Creator<FeatureInfo> CREATOR = new Creator<FeatureInfo>() { @Override public FeatureInfo createFromParcel(Parcel source) { |