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

Commit 81a9d06f authored by Chen Xu's avatar Chen Xu
Browse files

move @hide API from IoUtils

IOUtils.closeQuitely is a trivial utility, simply make a copy
inside telephony.
TODO: consider make a util API file if such function is referenced
multiple places.

Bug: 137202333
Test: Build + Unit test
Merged-In: I9988abb46d8ae114aab8a3846efaf44641379689
Change-Id: I9988abb46d8ae114aab8a3846efaf44641379689
(cherry picked from commit 5cba1ed9)
parent f9f3936c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -370,7 +370,15 @@ public class EmergencyNumberTracker extends Handler {
        } catch (IOException ex) {
            loge("Cache emergency database failure: " + ex);
        } finally {
            IoUtils.closeQuietly(inputStream);
            // close quietly by catching non-runtime exceptions.
            if (inputStream != null) {
                try {
                    inputStream.close();
                } catch (RuntimeException rethrown) {
                    throw rethrown;
                } catch (Exception ignored) {
                }
            }
        }
    }