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

Commit 6e2b511b authored by Songchun Fan's avatar Songchun Fan Committed by Android (Google) Code Review
Browse files

Merge "[PackageUsage] fix NPE" into tm-dev

parents e629b8ac 714d59fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -66,7 +66,8 @@ class PackageUsage extends AbstractStatsBase<Map<String, PackageSetting>> {
            out.write(sb.toString().getBytes(StandardCharsets.US_ASCII));
            out.write(sb.toString().getBytes(StandardCharsets.US_ASCII));


            for (PackageSetting pkgSetting : pkgSettings.values()) {
            for (PackageSetting pkgSetting : pkgSettings.values()) {
                if (pkgSetting.getPkgState().getLatestPackageUseTimeInMills() == 0L) {
                if (pkgSetting == null || pkgSetting.getPkgState() == null
                        || pkgSetting.getPkgState().getLatestPackageUseTimeInMills() == 0L) {
                    continue;
                    continue;
                }
                }
                sb.setLength(0);
                sb.setLength(0);