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

Commit e8edb9d1 authored by Mateus Azis's avatar Mateus Azis
Browse files

Mark Message.peekData as returning a nullable value.

This API is not currently annotated. This will highlight this
possibility to any callers and hopefully enable better static analysis.

Bug: 274764512
Test: m framework -j
Change-Id: I4b46c828625dd5ccff9d45cb56e5cfaf4c184917
parent 704eb7e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33188,7 +33188,7 @@ package android.os {
    method public static android.os.Message obtain(android.os.Handler, int, Object);
    method public static android.os.Message obtain(android.os.Handler, int, int, int);
    method public static android.os.Message obtain(android.os.Handler, int, int, int, Object);
    method public android.os.Bundle peekData();
    method @Nullable public android.os.Bundle peekData();
    method public void recycle();
    method public void sendToTarget();
    method public void setAsynchronous(boolean);
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.os;

import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
@@ -436,6 +437,7 @@ public final class Message implements Parcelable {
     * @see #getData()
     * @see #setData(Bundle)
     */
    @Nullable
    public Bundle peekData() {
        return data;
    }