Loading services/core/java/com/android/server/pm/PackageMetrics.java +19 −12 Original line number Diff line number Diff line Loading @@ -310,6 +310,10 @@ final class PackageMetrics { if (!SecurityLog.isLoggingEnabled()) { return; } // TODO: Remove temp try-catch to avoid IllegalStateException. The reason is because // the scan result is null for installExistingPackageAsUser(). Because it's installing // a package that's already existing, there's no scanning or parsing involved try { final PackageSetting ps = mInstallRequest.getScannedPackageSetting(); if (ps == null) { return; Loading @@ -323,6 +327,9 @@ final class PackageMetrics { SecurityLog.writeEvent(SecurityLog.TAG_PACKAGE_UPDATED, packageName, versionCode, userId); } } catch (IllegalStateException | NullPointerException e) { // no-op } } private static void reportUninstallationToSecurityLog(String packageName, long versionCode, Loading Loading
services/core/java/com/android/server/pm/PackageMetrics.java +19 −12 Original line number Diff line number Diff line Loading @@ -310,6 +310,10 @@ final class PackageMetrics { if (!SecurityLog.isLoggingEnabled()) { return; } // TODO: Remove temp try-catch to avoid IllegalStateException. The reason is because // the scan result is null for installExistingPackageAsUser(). Because it's installing // a package that's already existing, there's no scanning or parsing involved try { final PackageSetting ps = mInstallRequest.getScannedPackageSetting(); if (ps == null) { return; Loading @@ -323,6 +327,9 @@ final class PackageMetrics { SecurityLog.writeEvent(SecurityLog.TAG_PACKAGE_UPDATED, packageName, versionCode, userId); } } catch (IllegalStateException | NullPointerException e) { // no-op } } private static void reportUninstallationToSecurityLog(String packageName, long versionCode, Loading