Intern additional strings at boot.

Follow-on from Id0c9448483cec65aa6f2d30a3295b1300e02c830.

Bug: 273758274
Bug: 247127880
Test: atest FrameworksServicesTests:JobStoreTest
Change-Id: I3d761bf333ecb76492f752669b2e5e74364ae154
This commit is contained in:
Kweku Adams
2023-06-12 16:23:35 +00:00
parent f35a4095b5
commit cf83961bf6

View File

@@ -1304,8 +1304,8 @@ public final class JobStore {
}
String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName");
final String namespace = parser.getAttributeValue(null, "namespace");
final String sourceTag = parser.getAttributeValue(null, "sourceTag");
final String namespace = intern(parser.getAttributeValue(null, "namespace"));
final String sourceTag = intern(parser.getAttributeValue(null, "sourceTag"));
int eventType;
// Read out constraints tag.
@@ -1467,7 +1467,7 @@ public final class JobStore {
final int appBucket = JobSchedulerService.standbyBucketForPackage(sourcePackageName,
sourceUserId, nowElapsed);
JobStatus js = new JobStatus(
builtJob, uid, sourcePackageName, sourceUserId,
builtJob, uid, intern(sourcePackageName), sourceUserId,
appBucket, namespace, sourceTag,
elapsedRuntimes.first, elapsedRuntimes.second,
lastSuccessfulRunTime, lastFailedRunTime, cumulativeExecutionTime,