Framework: Avoid string allocations

Avoid common string allocations for ":complete".

Test: m
Test: Device boots
Change-Id: I8c7a53346a4e1aa1beefd17429e13e20ab510f20
This commit is contained in:
Andreas Gampe
2017-03-06 17:27:09 -08:00
parent 9f2888d9cc
commit e9a5262f2a

View File

@@ -32,11 +32,10 @@ public final class SELinuxUtil {
/** @hide */
public static String assignSeinfoUser(PackageUserState userState) {
String seInfo = "";
if (userState.instantApp)
seInfo += INSTANT_APP_STR;
seInfo += COMPLETE_STR;
return seInfo;
if (userState.instantApp) {
return INSTANT_APP_STR + COMPLETE_STR;
}
return COMPLETE_STR;
}
}