Loading core/java/android/app/NotificationChannel.java +6 −6 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.proto.ProtoOutputStream; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import org.json.JSONException; import org.json.JSONObject; import org.xmlpull.v1.XmlPullParser; Loading Loading @@ -936,7 +934,9 @@ public final class NotificationChannel implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(NotificationChannelProto.ID, mId); proto.write(NotificationChannelProto.NAME, mName); proto.write(NotificationChannelProto.DESCRIPTION, mDesc); Loading @@ -959,10 +959,10 @@ public final class NotificationChannel implements Parcelable { proto.write(NotificationChannelProto.IS_DELETED, mDeleted); proto.write(NotificationChannelProto.GROUP, mGroup); if (mAudioAttributes != null) { long aToken = proto.start(NotificationChannelProto.AUDIO_ATTRIBUTES); mAudioAttributes.toProto(proto); proto.end(aToken); mAudioAttributes.writeToProto(proto, NotificationChannelProto.AUDIO_ATTRIBUTES); } proto.write(NotificationChannelProto.IS_BLOCKABLE_SYSTEM, mBlockableSystem); proto.end(token); } } core/java/android/app/NotificationChannelGroup.java +6 −2 Original line number Diff line number Diff line Loading @@ -298,13 +298,17 @@ public final class NotificationChannelGroup implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(NotificationChannelGroupProto.ID, mId); proto.write(NotificationChannelGroupProto.NAME, mName.toString()); proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription); proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked); for (NotificationChannel channel : mChannels) { channel.toProto(proto); channel.writeToProto(proto, NotificationChannelGroupProto.CHANNELS); } proto.end(token); } } core/java/android/app/NotificationManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1133,7 +1133,7 @@ public class NotificationManager { } /** @hide */ public void toProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long pToken = proto.start(fieldId); bitwiseToProtoEnum(proto, PolicyProto.PRIORITY_CATEGORIES, priorityCategories); Loading core/proto/android/service/notification.proto +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import "frameworks/base/core/proto/android/app/notification_channel.proto"; import "frameworks/base/core/proto/android/app/notification_channel_group.proto"; import "frameworks/base/core/proto/android/app/notificationmanager.proto"; import "frameworks/base/core/proto/android/content/component_name.proto"; import "frameworks/base/core/proto/android/media/audioattributes.proto"; message NotificationServiceDumpProto { repeated NotificationRecordProto records = 1; Loading Loading @@ -55,7 +56,7 @@ message NotificationRecordProto { optional int32 flags = 3; optional string channelId = 4; optional string sound = 5; optional int32 sound_usage = 6; optional .android.media.AudioAttributesProto audio_attributes = 6; optional bool can_vibrate = 7; optional bool can_show_light = 8; optional string group_key = 9; Loading media/java/android/media/AudioAttributes.java +5 −1 Original line number Diff line number Diff line Loading @@ -880,7 +880,9 @@ public final class AudioAttributes implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(AudioAttributesProto.USAGE, mUsage); proto.write(AudioAttributesProto.CONTENT_TYPE, mContentType); proto.write(AudioAttributesProto.FLAGS, mFlags); Loading @@ -892,6 +894,8 @@ public final class AudioAttributes implements Parcelable { } } // TODO: is the data in mBundle useful for debugging? proto.end(token); } /** @hide */ Loading Loading
core/java/android/app/NotificationChannel.java +6 −6 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.proto.ProtoOutputStream; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import org.json.JSONException; import org.json.JSONObject; import org.xmlpull.v1.XmlPullParser; Loading Loading @@ -936,7 +934,9 @@ public final class NotificationChannel implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(NotificationChannelProto.ID, mId); proto.write(NotificationChannelProto.NAME, mName); proto.write(NotificationChannelProto.DESCRIPTION, mDesc); Loading @@ -959,10 +959,10 @@ public final class NotificationChannel implements Parcelable { proto.write(NotificationChannelProto.IS_DELETED, mDeleted); proto.write(NotificationChannelProto.GROUP, mGroup); if (mAudioAttributes != null) { long aToken = proto.start(NotificationChannelProto.AUDIO_ATTRIBUTES); mAudioAttributes.toProto(proto); proto.end(aToken); mAudioAttributes.writeToProto(proto, NotificationChannelProto.AUDIO_ATTRIBUTES); } proto.write(NotificationChannelProto.IS_BLOCKABLE_SYSTEM, mBlockableSystem); proto.end(token); } }
core/java/android/app/NotificationChannelGroup.java +6 −2 Original line number Diff line number Diff line Loading @@ -298,13 +298,17 @@ public final class NotificationChannelGroup implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(NotificationChannelGroupProto.ID, mId); proto.write(NotificationChannelGroupProto.NAME, mName.toString()); proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription); proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked); for (NotificationChannel channel : mChannels) { channel.toProto(proto); channel.writeToProto(proto, NotificationChannelGroupProto.CHANNELS); } proto.end(token); } }
core/java/android/app/NotificationManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1133,7 +1133,7 @@ public class NotificationManager { } /** @hide */ public void toProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long pToken = proto.start(fieldId); bitwiseToProtoEnum(proto, PolicyProto.PRIORITY_CATEGORIES, priorityCategories); Loading
core/proto/android/service/notification.proto +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import "frameworks/base/core/proto/android/app/notification_channel.proto"; import "frameworks/base/core/proto/android/app/notification_channel_group.proto"; import "frameworks/base/core/proto/android/app/notificationmanager.proto"; import "frameworks/base/core/proto/android/content/component_name.proto"; import "frameworks/base/core/proto/android/media/audioattributes.proto"; message NotificationServiceDumpProto { repeated NotificationRecordProto records = 1; Loading Loading @@ -55,7 +56,7 @@ message NotificationRecordProto { optional int32 flags = 3; optional string channelId = 4; optional string sound = 5; optional int32 sound_usage = 6; optional .android.media.AudioAttributesProto audio_attributes = 6; optional bool can_vibrate = 7; optional bool can_show_light = 8; optional string group_key = 9; Loading
media/java/android/media/AudioAttributes.java +5 −1 Original line number Diff line number Diff line Loading @@ -880,7 +880,9 @@ public final class AudioAttributes implements Parcelable { } /** @hide */ public void toProto(ProtoOutputStream proto) { public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(AudioAttributesProto.USAGE, mUsage); proto.write(AudioAttributesProto.CONTENT_TYPE, mContentType); proto.write(AudioAttributesProto.FLAGS, mFlags); Loading @@ -892,6 +894,8 @@ public final class AudioAttributes implements Parcelable { } } // TODO: is the data in mBundle useful for debugging? proto.end(token); } /** @hide */ Loading