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

Commit 6f8b0a12 authored by sandeepbandaru's avatar sandeepbandaru
Browse files

Close PFD when returning via AndroidFuture

Bug: 326618330
Test: CTS already tests this
Change-Id: I3b064101e90996bd5b33bb845b4c08da5b480daa
parent 86f43aba
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -398,6 +398,9 @@ public abstract class OnDeviceIntelligenceService extends Service {
                Slog.e(TAG, "Cannot open file. No ParcelFileDescriptor returned.");
                Slog.e(TAG, "Cannot open file. No ParcelFileDescriptor returned.");
            } finally {
            } finally {
                future.complete(pfd);
                future.complete(pfd);
                if (pfd != null) {
                    pfd.close();
                }
            }
            }
        });
        });
    }
    }