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

Commit 8c680128 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Check for null fd when constructing AssetFileDescriptor." into jb-dev

parents 3b5fdf51 af67fc65
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ public class AssetFileDescriptor implements Parcelable {
     */
    public AssetFileDescriptor(ParcelFileDescriptor fd, long startOffset,
            long length) {
        if (fd == null) {
            throw new IllegalArgumentException("fd must not be null");
        }
        if (length < 0 && startOffset != 0) {
            throw new IllegalArgumentException(
                    "startOffset must be 0 when using UNKNOWN_LENGTH");