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

Commit 05376628 authored by Garfield Tan's avatar Garfield Tan
Browse files

Don't put loading results to system cache if exceptions happened.

Test: Manual smoke tests. Automatic tests pass.

Bug: 34405495
Change-Id: If8ce36ce38eef840655be84438856ca12187c393
(cherry picked from commit 51b8ca37)
parent 2a8719c8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -260,7 +260,11 @@ public class RootsCache implements RootsAccess {
                roots.add(root);
            }
        } catch (Exception e) {
            Log.w(TAG, "Failed to load some roots from " + authority + ": " + e);
            Log.w(TAG, "Failed to load some roots from " + authority, e);
            // We didn't load every root from the provider. Don't put it to
            // system cache so that we'll try loading them again next time even
            // if forceRefresh is false.
            return roots;
        } finally {
            IoUtils.closeQuietly(cursor);
            ContentProviderClient.releaseQuietly(client);