blob: 7640e75ba15399fc9eeeba9585689ff14ba5f525 [file] [log] [blame]
Svetoslav Ganov80943d82013-01-02 10:25:37 -08001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.app;
18
19import android.accessibilityservice.IAccessibilityServiceClient;
20import android.graphics.Bitmap;
21import android.view.InputEvent;
Svetoslav1376d602014-03-13 11:17:26 -070022import android.view.WindowContentFrameStats;
23import android.view.WindowAnimationFrameStats;
Svetoslav Ganov80943d82013-01-02 10:25:37 -080024import android.os.ParcelFileDescriptor;
25
26/**
27 * This interface contains privileged operations a shell program can perform
28 * on behalf of an instrumentation that it runs. These operations require
29 * special permissions which the shell user has but the instrumentation does
30 * not. Running privileged operations by the shell user on behalf of an
Svetoslav1376d602014-03-13 11:17:26 -070031 * instrumentation is needed for running UiTestCases.
Svetoslav Ganov80943d82013-01-02 10:25:37 -080032 *
33 * {@hide}
34 */
35interface IUiAutomationConnection {
Phil Weaver1dd87222016-01-26 17:15:15 -080036 void connect(IAccessibilityServiceClient client, int flags);
Svetoslav Ganov80943d82013-01-02 10:25:37 -080037 void disconnect();
38 boolean injectInputEvent(in InputEvent event, boolean sync);
39 boolean setRotation(int rotation);
40 Bitmap takeScreenshot(int width, int height);
Svetoslav1376d602014-03-13 11:17:26 -070041 boolean clearWindowContentFrameStats(int windowId);
42 WindowContentFrameStats getWindowContentFrameStats(int windowId);
43 void clearWindowAnimationFrameStats();
44 WindowAnimationFrameStats getWindowAnimationFrameStats();
Svetoslav121e0c02014-05-08 18:51:25 -070045 void executeShellCommand(String command, in ParcelFileDescriptor fd);
Svet Ganov52153f42015-08-11 08:59:12 -070046 void grantRuntimePermission(String packageName, String permission, int userId);
47 void revokeRuntimePermission(String packageName, String permission, int userId);
Svet Ganov7bb48722015-07-22 18:58:32 -070048
49 // Called from the system process.
50 oneway void shutdown();
Svetoslav Ganov80943d82013-01-02 10:25:37 -080051}