Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 277c4a44 authored by Girish's avatar Girish
Browse files

resourcemanager: initialize aidl parcels with defaults

Addresses a TODO to set the default enum values for aidl structures.
Since, the usage of these parcelable structures are limited internally,
there is no functionality change associated with this change.

Bug: 289097671
Test: atest android.media.misc.cts.ResourceManagerTest
      atest android.media.misc.cts.ResourceManagerMultiTest
      /data/nativetest64/ResourceManagerService_test/ResourceManagerService_test
      /data/nativetest64/ResourceObserverService_test/ResourceObserverService_test
Change-Id: I0eda837cc0c2c7dd5efebce957959a1dab8ebf7e
parent a5a2d67d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -33,23 +33,23 @@ parcelable ClientConfigParcel {
    /**
     * Type of codec (Audio/Video/Image).
     */
    MediaResourceSubType codecType;
    MediaResourceSubType codecType = MediaResourceSubType.kUnspecifiedSubType;

    /**
     * true if this is an encoder, false if this is a decoder.
     */
    boolean isEncoder;
    boolean isEncoder = false;

    /*
     * Video Resolution of the codec when it was configured, as width and height (in pixels).
     */
    int width;
    int height;
    int width = 0;
    int height = 0;

    /*
     * Timestamp (in microseconds) when this configuration is created.
     */
    long timeStamp;
    long timeStamp = 0;

    /*
     * ID associated with the Codec.
@@ -57,5 +57,5 @@ parcelable ClientConfigParcel {
     * - Associate MediaCodecStarted with MediaCodecStopped Atom.
     * - Correlate MediaCodecReported Atom for codec configuration parameters.
     */
    long id;
    long id = 0;
}
+2 −5
Original line number Diff line number Diff line
@@ -25,18 +25,15 @@ import android.media.MediaResourceSubType;
 * {@hide}
 */
parcelable MediaResourceParcel {
    // TODO: default enum value is not supported yet.
    // Set default enum value when b/142739329 is fixed.

    /**
     * Type of the media resource.
     */
    MediaResourceType type;// = MediaResourceTypeEnum::kUnspecified;
    MediaResourceType type = MediaResourceType.kUnspecified;

    /**
     * Sub-type of the media resource.
     */
    MediaResourceSubType subType;// = MediaResourceSubTypeEnum::kUnspecifiedSubType;
    MediaResourceSubType subType = MediaResourceSubType.kUnspecifiedSubType;

    /**
     * Identifier of the media resource (eg. Drm session id).