Only allow one movePackage operation in-flight

When a movePackage operation is requested, don't allow multiple requests
to pile up for one package. Once a move is completed, an observer will
receive the message and be allowed to call movePackage again.

Change-Id: Ie3842b6d96446febc0037bf9b8f1ca250735edc2
This commit is contained in:
Kenny Root
2010-08-02 11:36:21 -07:00
parent 866362fcb4
commit deb112674e
3 changed files with 35 additions and 1 deletions

View File

@@ -609,6 +609,16 @@ public abstract class PackageManager {
*/
public static final int MOVE_FAILED_INTERNAL_ERROR = -6;
/**
* Error code that is passed to the {@link IPackageMoveObserver} by
* {@link #movePackage(android.net.Uri, IPackageMoveObserver)} if the
* specified package already has an operation pending in the
* {@link PackageHandler} queue.
*
* @hide
*/
public static final int MOVE_FAILED_OPERATION_PENDING = -7;
/**
* Flag parameter for {@link #movePackage} to indicate that
* the package should be moved to internal storage if its

View File

@@ -2791,7 +2791,10 @@ public class PackageParser {
// Additional data supplied by callers.
public Object mExtras;
// Whether an operation is currently pending on this package
public boolean mOperationPending;
/*
* Applications hardware preferences
*/