Add system property to allow testing OTA with the same build image

The property can be used to test post boot stage without needing
to change the build signature.

Test: make
Change-Id: Ic132da7fda346f0cced4fd9417a34f59501ae7ee
This commit is contained in:
Shubham Ajmera
2017-10-06 14:07:37 -07:00
parent 65e91ce6c3
commit a27be6072e

View File

@@ -3381,7 +3381,9 @@ public class PackageManagerService extends IPackageManager.Stub
@Override
public boolean isUpgrade() {
// allow instant applications
return mIsUpgrade;
// The system property allows testing ota flow when upgraded to the same image.
return mIsUpgrade || SystemProperties.getBoolean(
"persist.pm.mock-upgrade", false /* default */);
}
private @Nullable String getRequiredButNotReallyRequiredVerifierLPr() {