Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.display; |
| 18 | |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 19 | import android.hardware.display.IDisplayManagerCallback; |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 20 | import android.hardware.display.IVirtualDisplayCallback; |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 21 | import android.hardware.display.WifiDisplay; |
| 22 | import android.hardware.display.WifiDisplayStatus; |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 23 | import android.media.projection.IMediaProjection; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 24 | import android.view.DisplayInfo; |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 25 | import android.view.Surface; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 26 | |
| 27 | /** @hide */ |
| 28 | interface IDisplayManager { |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 29 | DisplayInfo getDisplayInfo(int displayId); |
| 30 | int[] getDisplayIds(); |
| 31 | |
| 32 | void registerCallback(in IDisplayManagerCallback callback); |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 33 | |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 34 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
| 35 | // The process must have previously registered a callback. |
| 36 | void startWifiDisplayScan(); |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 37 | |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 38 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
| 39 | void stopWifiDisplayScan(); |
| 40 | |
| 41 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 42 | void connectWifiDisplay(String address); |
| 43 | |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 44 | // No permissions required. |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 45 | void disconnectWifiDisplay(); |
| 46 | |
| 47 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 48 | void renameWifiDisplay(String address, String alias); |
| 49 | |
| 50 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
| 51 | void forgetWifiDisplay(String address); |
| 52 | |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 53 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
| 54 | void pauseWifiDisplay(); |
| 55 | |
| 56 | // Requires CONFIGURE_WIFI_DISPLAY permission. |
| 57 | void resumeWifiDisplay(); |
| 58 | |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 59 | // No permissions required. |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 60 | WifiDisplayStatus getWifiDisplayStatus(); |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 61 | |
Michael Wright | 58e829f | 2015-09-15 00:13:26 +0100 | [diff] [blame^] | 62 | // Requires CONFIGURE_DISPLAY_COLOR_TRANSFORM |
| 63 | void requestColorTransform(int displayId, int colorTransformId); |
| 64 | |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 65 | // Requires CAPTURE_VIDEO_OUTPUT, CAPTURE_SECURE_VIDEO_OUTPUT, or an appropriate |
| 66 | // MediaProjection token for certain combinations of flags. |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 67 | int createVirtualDisplay(in IVirtualDisplayCallback callback, |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 68 | in IMediaProjection projectionToken, String packageName, String name, |
| 69 | int width, int height, int densityDpi, in Surface surface, int flags); |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 70 | |
Michael Wright | 01e840f | 2014-06-26 16:03:25 -0700 | [diff] [blame] | 71 | // No permissions required, but must be same Uid as the creator. |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 72 | void resizeVirtualDisplay(in IVirtualDisplayCallback token, |
Michael Wright | 01e840f | 2014-06-26 16:03:25 -0700 | [diff] [blame] | 73 | int width, int height, int densityDpi); |
| 74 | |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 75 | // No permissions required but must be same Uid as the creator. |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 76 | void setVirtualDisplaySurface(in IVirtualDisplayCallback token, in Surface surface); |
Jeff Brown | 92207df | 2014-04-16 13:16:07 -0700 | [diff] [blame] | 77 | |
| 78 | // No permissions required but must be same Uid as the creator. |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 79 | void releaseVirtualDisplay(in IVirtualDisplayCallback token); |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 80 | } |