[PackageInstallerService] only update session badge when needed

Bug: 239625516
Fixes: 239625516
Test: n/a
Change-Id: I74cd70341b6fcf1deef34cad700a3807e3b99d00
This commit is contained in:
Songchun Fan
2022-07-25 12:20:56 -07:00
parent 5aaf950bbd
commit 01d4ad9fd8

View File

@@ -912,8 +912,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
if (session == null || !isCallingUidOwner(session)) {
throw new SecurityException("Caller has no access to session " + sessionId);
}
session.params.appLabel = appLabel;
mInternalCallback.onSessionBadgingChanged(session);
if (!appLabel.equals(session.params.appLabel)) {
session.params.appLabel = appLabel;
mInternalCallback.onSessionBadgingChanged(session);
}
}
}