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

Commit 335f8726 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am 8ab3f090: am 8c680128: Merge "Check for null fd when constructing...

am 8ab3f090: am 8c680128: Merge "Check for null fd when constructing AssetFileDescriptor." into jb-dev

* commit '8ab3f090':
  Check for null fd when constructing AssetFileDescriptor.
parents dc8967ed 8ab3f090
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");