diff options
Diffstat (limited to 'src/com/android/tradefed/sandbox/TradefedSandbox.java')
-rw-r--r-- | src/com/android/tradefed/sandbox/TradefedSandbox.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/tradefed/sandbox/TradefedSandbox.java b/src/com/android/tradefed/sandbox/TradefedSandbox.java index 7fa1f6293..7f1f8c442 100644 --- a/src/com/android/tradefed/sandbox/TradefedSandbox.java +++ b/src/com/android/tradefed/sandbox/TradefedSandbox.java @@ -136,7 +136,7 @@ public class TradefedSandbox implements ISandbox { // Prepare the context try { - mSerializedContext = SerializationUtil.serialize(context); + mSerializedContext = prepareContext(context); } catch (IOException e) { return e; } @@ -194,4 +194,15 @@ public class TradefedSandbox implements ISandbox { IRunUtil createRunUtil() { return new RunUtil(); } + + /** + * Prepare and serialize the {@link IInvocationContext}. + * + * @param context the {@link IInvocationContext} to be prepared. + * @return the serialized {@link IInvocationContext}. + * @throws IOException + */ + protected File prepareContext(IInvocationContext context) throws IOException { + return SerializationUtil.serialize(context); + } } |