diff options
author | Todd Kennedy <toddke@google.com> | 2016-04-26 15:41:20 -0700 |
---|---|---|
committer | Todd Kennedy <toddke@google.com> | 2016-04-26 16:25:43 -0700 |
commit | b1072718130b998e6d25bc3358eefa62b4fa5a2d (patch) | |
tree | 863749a94ab1ebb6c023bebe932197af2a50a5ca /cmds/pm | |
parent | 34510eb2933b98f0c8c73f9a7be5eae911a14210 (diff) |
Don't override pre-release target sdk
If a package targets a pre-release SDK [eg a letter version] it should not
be allowed to be upgraded by a release SDK [eg a number version]. If one
absolutely must upgrade to a release SDK, use the "--force-sdk" option
during install.
Bug: 28345311
Change-Id: Ic9fb209968e7c5da2c80c5ca4c0f44f5125f610a
Diffstat (limited to 'cmds/pm')
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index a45d43204513..19cb927bd582 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -502,6 +502,9 @@ public final class Pm { sessionParams.volumeUuid = null; } break; + case "--force-sdk": + sessionParams.installFlags |= PackageManager.INSTALL_FORCE_SDK; + break; default: throw new IllegalArgumentException("Unknown option " + opt); } |