Only persist category hint when actually mutated.

Otherwise we're churning disk.

Test: builds, boots
Bug: 34328134
Change-Id: Iabc485b9ce3644e914240b5de5bcea98d939b2cb
This commit is contained in:
Jeff Sharkey
2017-01-16 19:19:27 -07:00
parent c70e581564
commit eda5d5183e

View File

@@ -13018,8 +13018,10 @@ public class PackageManagerService extends IPackageManager.Stub {
+ " is not installer for " + packageName);
}
ps.categoryHint = categoryHint;
scheduleWriteSettingsLocked();
if (ps.categoryHint != categoryHint) {
ps.categoryHint = categoryHint;
scheduleWriteSettingsLocked();
}
}
}