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

Commit e965f4a5 authored by Ruchir Rastogi's avatar Ruchir Rastogi
Browse files

Lower error if diskstats cache file not found

/data/system/diskstats_cache.json is populated once a day and may not
exist right after a factory wipe. If the file does not exist, we catch
the exception and print it to logcat. This CL changes the print call
from a Slog.e to a Slog.w to reflect the fact that the situation is
undesirable, but properly handled.

Test: m
Bug: 157947470
Change-Id: Ie04a2768670ec74635fc9e050a466eaad9c6a9e9
parent 9b75996d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2187,7 +2187,7 @@ public class StatsPullAtomService extends SystemService {
                pulledData.add(e);
                pulledData.add(e);
            }
            }
        } catch (IOException | JSONException e) {
        } catch (IOException | JSONException e) {
            Slog.e(TAG, "exception reading diskstats cache file", e);
            Slog.w(TAG, "Unable to read diskstats cache file within pullAppSize");
            return StatsManager.PULL_SKIP;
            return StatsManager.PULL_SKIP;
        }
        }
        return StatsManager.PULL_SUCCESS;
        return StatsManager.PULL_SUCCESS;
@@ -2291,7 +2291,7 @@ public class StatsPullAtomService extends SystemService {
                    .build();
                    .build();
            pulledData.add(e);
            pulledData.add(e);
        } catch (IOException | JSONException e) {
        } catch (IOException | JSONException e) {
            Slog.e(TAG, "exception reading diskstats cache file", e);
            Slog.w(TAG, "Unable to read diskstats cache file within pullCategorySize");
            return StatsManager.PULL_SKIP;
            return StatsManager.PULL_SKIP;
        }
        }
        return StatsManager.PULL_SUCCESS;
        return StatsManager.PULL_SUCCESS;