1/** 2 * Copyright (c) 2008, 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.graphics.Rect; 20import android.os.Bundle; 21import android.os.ParcelFileDescriptor; 22import android.app.IWallpaperManagerCallback; 23import android.app.WallpaperInfo; 24import android.content.ComponentName; 25 26/** @hide */ 27interface IWallpaperManager { 28 29 /** 30 * Set the wallpaper. 31 */ 32 ParcelFileDescriptor setWallpaper(String name, in String callingPackage); 33 34 /** 35 * Set the live wallpaper. 36 */ 37 void setWallpaperComponentChecked(in ComponentName name, in String callingPackage); 38 39 /** 40 * Set the live wallpaper. 41 */ 42 void setWallpaperComponent(in ComponentName name); 43 44 /** 45 * Get the wallpaper. 46 */ 47 ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb, 48 out Bundle outParams); 49 50 /** 51 * Get information about a live wallpaper. 52 */ 53 WallpaperInfo getWallpaperInfo(); 54 55 /** 56 * Clear the wallpaper. 57 */ 58 void clearWallpaper(in String callingPackage); 59 60 /** 61 * Return whether there is a wallpaper set with the given name. 62 */ 63 boolean hasNamedWallpaper(String name); 64 65 /** 66 * Sets the dimension hint for the wallpaper. These hints indicate the desired 67 * minimum width and height for the wallpaper. 68 */ 69 void setDimensionHints(in int width, in int height, in String callingPackage); 70 71 /** 72 * Returns the desired minimum width for the wallpaper. 73 */ 74 int getWidthHint(); 75 76 /** 77 * Returns the desired minimum height for the wallpaper. 78 */ 79 int getHeightHint(); 80 81 /** 82 * Sets extra padding that we would like the wallpaper to have outside of the display. 83 */ 84 void setDisplayPadding(in Rect padding, in String callingPackage); 85 86 /** 87 * Returns the name of the wallpaper. Private API. 88 */ 89 String getName(); 90 91 /** 92 * Informs the service that wallpaper settings have been restored. Private API. 93 */ 94 void settingsRestored(); 95 96 /** 97 * Check whether wallpapers are supported for the calling user. 98 */ 99 boolean isWallpaperSupported(in String callingPackage); 100} 101