зеркало из https://github.com/mozilla/gecko-dev.git
Bug 852246 - Allow installing over an app with >= version in Android 4.2 via the agent;r=jmaher
This commit is contained in:
Родитель
525e02647c
Коммит
6572a66348
|
@ -3317,7 +3317,16 @@ private void CancelNotification()
|
|||
|
||||
try
|
||||
{
|
||||
pProc = Runtime.getRuntime().exec(this.getSuArgs("pm install -r " + sApp + " Cleanup;exit"));
|
||||
// on android 4.2 and above, we want to pass the "-d" argument to pm so that version
|
||||
// downgrades are allowed... (option unsupported in earlier versions)
|
||||
String sPmCmd;
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= 17) { // JELLY_BEAN_MR1
|
||||
sPmCmd = "pm install -r -d " + sApp + " Cleanup;exit";
|
||||
} else {
|
||||
sPmCmd = "pm install -r " + sApp + " Cleanup;exit";
|
||||
}
|
||||
pProc = Runtime.getRuntime().exec(this.getSuArgs(sPmCmd));
|
||||
RedirOutputThread outThrd3 = new RedirOutputThread(pProc, out);
|
||||
outThrd3.start();
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче