blob: 8a1abf18602ada2de4e21fadd5afdc1cf66d3962 [file] [log] [blame]
Jeff Brownfa25bf52012-07-23 19:26:30 -07001/*
2 * Copyright (C) 2012 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.hardware.display;
18
Jeff Brownbd6e1502012-08-28 03:27:37 -070019import android.hardware.display.IDisplayManagerCallback;
Michael Wright75ee9fc2014-09-01 19:55:22 -070020import android.hardware.display.IVirtualDisplayCallback;
Jeff Browne08ae382012-09-07 20:36:36 -070021import android.hardware.display.WifiDisplay;
22import android.hardware.display.WifiDisplayStatus;
Michael Wrightc39d47a2014-07-08 18:07:36 -070023import android.media.projection.IMediaProjection;
Jeff Brownfa25bf52012-07-23 19:26:30 -070024import android.view.DisplayInfo;
Jeff Browna506a6e2013-06-04 00:02:38 -070025import android.view.Surface;
Jeff Brownfa25bf52012-07-23 19:26:30 -070026
27/** @hide */
28interface IDisplayManager {
Jeff Brownbd6e1502012-08-28 03:27:37 -070029 DisplayInfo getDisplayInfo(int displayId);
30 int[] getDisplayIds();
31
32 void registerCallback(in IDisplayManagerCallback callback);
Jeff Browne08ae382012-09-07 20:36:36 -070033
Jeff Brownce468a32013-11-21 16:42:03 -080034 // Requires CONFIGURE_WIFI_DISPLAY permission.
35 // The process must have previously registered a callback.
36 void startWifiDisplayScan();
Jeff Browne08ae382012-09-07 20:36:36 -070037
Jeff Brownce468a32013-11-21 16:42:03 -080038 // Requires CONFIGURE_WIFI_DISPLAY permission.
39 void stopWifiDisplayScan();
40
41 // Requires CONFIGURE_WIFI_DISPLAY permission.
Jeff Browne08ae382012-09-07 20:36:36 -070042 void connectWifiDisplay(String address);
43
Jeff Brownbc335452012-09-26 18:34:47 -070044 // No permissions required.
Jeff Browne08ae382012-09-07 20:36:36 -070045 void disconnectWifiDisplay();
46
47 // Requires CONFIGURE_WIFI_DISPLAY permission.
Jeff Brown89d55462012-09-19 11:33:42 -070048 void renameWifiDisplay(String address, String alias);
49
50 // Requires CONFIGURE_WIFI_DISPLAY permission.
51 void forgetWifiDisplay(String address);
52
Jeff Brownce468a32013-11-21 16:42:03 -080053 // Requires CONFIGURE_WIFI_DISPLAY permission.
54 void pauseWifiDisplay();
55
56 // Requires CONFIGURE_WIFI_DISPLAY permission.
57 void resumeWifiDisplay();
58
Jeff Brownbc335452012-09-26 18:34:47 -070059 // No permissions required.
Jeff Browne08ae382012-09-07 20:36:36 -070060 WifiDisplayStatus getWifiDisplayStatus();
Jeff Browna506a6e2013-06-04 00:02:38 -070061
Michael Wright58e829f2015-09-15 00:13:26 +010062 // Requires CONFIGURE_DISPLAY_COLOR_TRANSFORM
63 void requestColorTransform(int displayId, int colorTransformId);
64
Michael Wrightc39d47a2014-07-08 18:07:36 -070065 // Requires CAPTURE_VIDEO_OUTPUT, CAPTURE_SECURE_VIDEO_OUTPUT, or an appropriate
66 // MediaProjection token for certain combinations of flags.
Michael Wright75ee9fc2014-09-01 19:55:22 -070067 int createVirtualDisplay(in IVirtualDisplayCallback callback,
Michael Wrightc39d47a2014-07-08 18:07:36 -070068 in IMediaProjection projectionToken, String packageName, String name,
69 int width, int height, int densityDpi, in Surface surface, int flags);
Jeff Browna506a6e2013-06-04 00:02:38 -070070
Michael Wright01e840f2014-06-26 16:03:25 -070071 // No permissions required, but must be same Uid as the creator.
Michael Wright75ee9fc2014-09-01 19:55:22 -070072 void resizeVirtualDisplay(in IVirtualDisplayCallback token,
Michael Wright01e840f2014-06-26 16:03:25 -070073 int width, int height, int densityDpi);
74
Jeff Browna506a6e2013-06-04 00:02:38 -070075 // No permissions required but must be same Uid as the creator.
Michael Wright75ee9fc2014-09-01 19:55:22 -070076 void setVirtualDisplaySurface(in IVirtualDisplayCallback token, in Surface surface);
Jeff Brown92207df2014-04-16 13:16:07 -070077
78 // No permissions required but must be same Uid as the creator.
Michael Wright75ee9fc2014-09-01 19:55:22 -070079 void releaseVirtualDisplay(in IVirtualDisplayCallback token);
Jeff Brownfa25bf52012-07-23 19:26:30 -070080}