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 19 import android.hardware.display.IDisplayManagerCallback; 20 import android.hardware.display.WifiDisplay; 21 import android.hardware.display.WifiDisplayStatus; 22 import android.view.DisplayInfo; 23 import android.view.Surface; 24 25 /** @hide */ 26 interface IDisplayManager { 27 DisplayInfo getDisplayInfo(int displayId); 28 int[] getDisplayIds(); 29 30 void registerCallback(in IDisplayManagerCallback callback); 31 32 // Requires CONFIGURE_WIFI_DISPLAY permission. 33 // The process must have previously registered a callback. 34 void startWifiDisplayScan(); 35 36 // Requires CONFIGURE_WIFI_DISPLAY permission. 37 void stopWifiDisplayScan(); 38 39 // Requires CONFIGURE_WIFI_DISPLAY permission. 40 void connectWifiDisplay(String address); 41 42 // No permissions required. 43 void disconnectWifiDisplay(); 44 45 // Requires CONFIGURE_WIFI_DISPLAY permission. 46 void renameWifiDisplay(String address, String alias); 47 48 // Requires CONFIGURE_WIFI_DISPLAY permission. 49 void forgetWifiDisplay(String address); 50 51 // Requires CONFIGURE_WIFI_DISPLAY permission. 52 void pauseWifiDisplay(); 53 54 // Requires CONFIGURE_WIFI_DISPLAY permission. 55 void resumeWifiDisplay(); 56 57 // No permissions required. 58 WifiDisplayStatus getWifiDisplayStatus(); 59 60 // Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT for certain 61 // combinations of flags. 62 int createVirtualDisplay(IBinder token, String packageName, 63 String name, int width, int height, int densityDpi, in Surface surface, int flags); 64 65 // No permissions required but must be same Uid as the creator. 66 void releaseVirtualDisplay(in IBinder token); 67 } 68