BridgeWindowSession.java revision 6136273888c42faad74dce19ec49904a55affc15
1/* 2 * Copyright (C) 2010 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 com.android.layoutlib.bridge.android; 18 19import android.content.ClipData; 20import android.content.res.Configuration; 21import android.graphics.Rect; 22import android.graphics.Region; 23import android.os.Bundle; 24import android.os.IBinder; 25import android.os.RemoteException; 26import android.view.IWindow; 27import android.view.IWindowId; 28import android.view.IWindowSession; 29import android.view.InputChannel; 30import android.view.Surface; 31import android.view.SurfaceView; 32import android.view.WindowManager.LayoutParams; 33 34/** 35 * Implementation of {@link IWindowSession} so that mSession is not null in 36 * the {@link SurfaceView}. 37 */ 38public final class BridgeWindowSession implements IWindowSession { 39 40 @Override 41 public int add(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3, Rect arg4, 42 InputChannel outInputchannel) 43 throws RemoteException { 44 // pass for now. 45 return 0; 46 } 47 48 @Override 49 public int addToDisplay(IWindow arg0, int seq, LayoutParams arg1, int arg2, int displayId, 50 Rect arg3, Rect arg4, Rect arg5, InputChannel outInputchannel) 51 throws RemoteException { 52 // pass for now. 53 return 0; 54 } 55 56 @Override 57 public int addWithoutInputChannel(IWindow arg0, int seq, LayoutParams arg1, int arg2, 58 Rect arg3, Rect arg4) 59 throws RemoteException { 60 // pass for now. 61 return 0; 62 } 63 64 @Override 65 public int addToDisplayWithoutInputChannel(IWindow arg0, int seq, LayoutParams arg1, int arg2, 66 int displayId, Rect arg3, Rect arg4) 67 throws RemoteException { 68 // pass for now. 69 return 0; 70 } 71 72 @Override 73 public void finishDrawing(IWindow arg0) throws RemoteException { 74 // pass for now. 75 } 76 77 @Override 78 public boolean getInTouchMode() throws RemoteException { 79 // pass for now. 80 return false; 81 } 82 83 @Override 84 public boolean performHapticFeedback(IWindow window, int effectId, boolean always) { 85 // pass for now. 86 return false; 87 } 88 89 @Override 90 public int relayout(IWindow iWindow, int i, LayoutParams layoutParams, int i2, 91 int i3, int i4, int i5, Rect rect, Rect rect2, Rect rect3, Rect rect4, Rect rect5, 92 Rect rect6, Rect rect7, Configuration configuration, Surface surface) 93 throws RemoteException { 94 // pass for now. 95 return 0; 96 } 97 98 @Override 99 public void repositionChild(IWindow window, int left, int top, int right, int bottom, 100 int requestedWidth, int requestedHeight, 101 long deferTransactionUntilFrame, Rect outFrame) { 102 // pass for now. 103 return; 104 } 105 106 @Override 107 public void performDeferredDestroy(IWindow window) { 108 // pass for now. 109 } 110 111 @Override 112 public boolean outOfMemory(IWindow window) throws RemoteException { 113 return false; 114 } 115 116 @Override 117 public void getDisplayFrame(IWindow window, Rect outDisplayFrame) { 118 // pass for now. 119 } 120 121 @Override 122 public void remove(IWindow arg0) throws RemoteException { 123 // pass for now. 124 } 125 126 @Override 127 public void setInTouchMode(boolean arg0) throws RemoteException { 128 // pass for now. 129 } 130 131 @Override 132 public void setTransparentRegion(IWindow arg0, Region arg1) throws RemoteException { 133 // pass for now. 134 } 135 136 @Override 137 public void setInsets(IWindow window, int touchable, Rect contentInsets, 138 Rect visibleInsets, Region touchableRegion) { 139 // pass for now. 140 } 141 142 @Override 143 public IBinder prepareDrag(IWindow window, int flags, 144 int thumbnailWidth, int thumbnailHeight, Surface outSurface) 145 throws RemoteException { 146 // pass for now 147 return null; 148 } 149 150 @Override 151 public boolean performDrag(IWindow window, IBinder dragToken, 152 int touchSource, float touchX, float touchY, float thumbCenterX, float thumbCenterY, 153 ClipData data) 154 throws RemoteException { 155 // pass for now 156 return false; 157 } 158 159 @Override 160 public boolean startMovingTask(IWindow window, float startX, float startY) 161 throws RemoteException { 162 // pass for now 163 return false; 164 } 165 166 @Override 167 public void reportDropResult(IWindow window, boolean consumed) throws RemoteException { 168 // pass for now 169 } 170 171 @Override 172 public void cancelDragAndDrop(IBinder dragToken) throws RemoteException { 173 // pass for now 174 } 175 176 @Override 177 public void dragRecipientEntered(IWindow window) throws RemoteException { 178 // pass for now 179 } 180 181 @Override 182 public void dragRecipientExited(IWindow window) throws RemoteException { 183 // pass for now 184 } 185 186 @Override 187 public void setWallpaperPosition(IBinder window, float x, float y, 188 float xStep, float yStep) { 189 // pass for now. 190 } 191 192 @Override 193 public void wallpaperOffsetsComplete(IBinder window) { 194 // pass for now. 195 } 196 197 @Override 198 public void setWallpaperDisplayOffset(IBinder windowToken, int x, int y) { 199 // pass for now. 200 } 201 202 @Override 203 public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, 204 int z, Bundle extras, boolean sync) { 205 // pass for now. 206 return null; 207 } 208 209 @Override 210 public void wallpaperCommandComplete(IBinder window, Bundle result) { 211 // pass for now. 212 } 213 214 @Override 215 public IBinder asBinder() { 216 // pass for now. 217 return null; 218 } 219 220 @Override 221 public void onRectangleOnScreenRequested(IBinder window, Rect rectangle) { 222 // pass for now. 223 } 224 225 @Override 226 public IWindowId getWindowId(IBinder window) throws RemoteException { 227 // pass for now. 228 return null; 229 } 230 231 @Override 232 public void pokeDrawLock(IBinder window) { 233 // pass for now. 234 } 235 236 @Override 237 public void prepareToReplaceChildren(IBinder appToken) { 238 // pass for now. 239 } 240 241 @Override 242 public void updatePointerIcon(IWindow window) { 243 // pass for now. 244 } 245} 246