1875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu/*
2875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * Copyright (C) 2013 The Android Open Source Project
3875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *
4875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * Licensed under the Apache License, Version 2.0 (the "License");
5875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * you may not use this file except in compliance with the License.
6875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * You may obtain a copy of the License at
7875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *
8875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *      http://www.apache.org/licenses/LICENSE-2.0
9875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *
10875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * Unless required by applicable law or agreed to in writing, software
11875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * distributed under the License is distributed on an "AS IS" BASIS,
12875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * See the License for the specific language governing permissions and
14875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * limitations under the License.
15875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu */
16875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhupackage com.android.uiautomator.testrunner;
17875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu
18875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhuimport android.app.Instrumentation;
19875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhuimport android.os.Bundle;
20875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu
21875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu/**
22875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * A wrapper around {@link Instrumentation} to provide sendStatus function
23875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *
24875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * Provided for backwards compatibility purpose. New code should use
25875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu * {@link Instrumentation#sendStatus(int, Bundle)} instead.
26875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu *
27875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu */
28875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhuclass InstrumentationAutomationSupport implements IAutomationSupport {
29875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu
30875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    private Instrumentation mInstrumentation;
31875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu
32875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    InstrumentationAutomationSupport(Instrumentation instrumentation) {
33875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu        mInstrumentation = instrumentation;
34875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    }
35875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu
36875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    @Override
37875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    public void sendStatus(int resultCode, Bundle status) {
38875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu        mInstrumentation.sendStatus(resultCode, status);
39875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu    }
40875f4cd02f1398dfcc732f5049bb322039756dafGuang Zhu}
41