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

Commit 15b7548d authored by Bernardo Rufino's avatar Bernardo Rufino Committed by Gerrit Code Review
Browse files

Merge "Adjust Class<T> parameter bounds in new Bundle APIs"

parents 8c309923 a9cb2102
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29570,7 +29570,7 @@ package android.os {
    method @Deprecated @Nullable public android.os.Parcelable[] getParcelableArray(@Nullable String);
    method @Nullable public <T> T[] getParcelableArray(@Nullable String, @NonNull Class<T>);
    method @Deprecated @Nullable public <T extends android.os.Parcelable> java.util.ArrayList<T> getParcelableArrayList(@Nullable String);
    method @Nullable public <T> java.util.ArrayList<T> getParcelableArrayList(@Nullable String, @NonNull Class<T>);
    method @Nullable public <T> java.util.ArrayList<T> getParcelableArrayList(@Nullable String, @NonNull Class<? extends T>);
    method @Deprecated @Nullable public java.io.Serializable getSerializable(@Nullable String);
    method @Nullable public <T extends java.io.Serializable> T getSerializable(@Nullable String, @NonNull Class<T>);
    method public short getShort(String);
@@ -29579,7 +29579,7 @@ package android.os {
    method @Nullable public android.util.Size getSize(@Nullable String);
    method @Nullable public android.util.SizeF getSizeF(@Nullable String);
    method @Deprecated @Nullable public <T extends android.os.Parcelable> android.util.SparseArray<T> getSparseParcelableArray(@Nullable String);
    method @Nullable public <T> android.util.SparseArray<T> getSparseParcelableArray(@Nullable String, @NonNull Class<T>);
    method @Nullable public <T> android.util.SparseArray<T> getSparseParcelableArray(@Nullable String, @NonNull Class<? extends T>);
    method @Nullable public java.util.ArrayList<java.lang.String> getStringArrayList(@Nullable String);
    method public boolean hasFileDescriptors();
    method public void putAll(android.os.Bundle);
+1 −1
Original line number Diff line number Diff line
@@ -1453,7 +1453,7 @@ public class BaseBundle {

    @SuppressWarnings("unchecked")
    @Nullable
    <T> ArrayList<T> getArrayList(@Nullable String key, @NonNull Class<T> clazz) {
    <T> ArrayList<T> getArrayList(@Nullable String key, @NonNull Class<? extends T> clazz) {
        unparcel();
        try {
            return getValue(key, ArrayList.class, requireNonNull(clazz));
+3 −2
Original line number Diff line number Diff line
@@ -1059,7 +1059,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
    @SuppressLint("NullableCollection")
    @SuppressWarnings("unchecked")
    @Nullable
    public <T> ArrayList<T> getParcelableArrayList(@Nullable String key, @NonNull Class<T> clazz) {
    public <T> ArrayList<T> getParcelableArrayList(@Nullable String key,
            @NonNull Class<? extends T> clazz) {
        // The reason for not using <T extends Parcelable> is because the caller could provide a
        // super class to restrict the children that doesn't implement Parcelable itself while the
        // children do, more details at b/210800751 (same reasoning applies here).
@@ -1107,7 +1108,7 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
    @SuppressWarnings("unchecked")
    @Nullable
    public <T> SparseArray<T> getSparseParcelableArray(@Nullable String key,
            @NonNull Class<T> clazz) {
            @NonNull Class<? extends T> clazz) {
        // The reason for not using <T extends Parcelable> is because the caller could provide a
        // super class to restrict the children that doesn't implement Parcelable itself while the
        // children do, more details at b/210800751 (same reasoning applies here).