BridgeWindowSession.java revision 6d05fd3c795088ac60f86382df5a66d631e8a0cb
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.IWindowSession;
28import android.view.InputChannel;
29import android.view.MotionEvent;
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    public int add(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3,
41            InputChannel outInputchannel)
42            throws RemoteException {
43        // pass for now.
44        return 0;
45    }
46
47    public int addWithoutInputChannel(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3)
48            throws RemoteException {
49        // pass for now.
50        return 0;
51    }
52
53    public void finishDrawing(IWindow arg0) throws RemoteException {
54        // pass for now.
55    }
56
57    public void finishKey(IWindow arg0) throws RemoteException {
58        // pass for now.
59    }
60
61    public boolean getInTouchMode() throws RemoteException {
62        // pass for now.
63        return false;
64    }
65
66    public boolean performHapticFeedback(IWindow window, int effectId, boolean always) {
67        // pass for now.
68        return false;
69    }
70
71    public MotionEvent getPendingPointerMove(IWindow arg0) throws RemoteException {
72        // pass for now.
73        return null;
74    }
75
76    public MotionEvent getPendingTrackballMove(IWindow arg0) throws RemoteException {
77        // pass for now.
78        return null;
79    }
80
81    public int relayout(IWindow arg0, int seq, LayoutParams arg1, int arg2, int arg3, int arg4,
82            int arg4_5, Rect arg5, Rect arg6, Rect arg7, Configuration arg7b, Surface arg8)
83            throws RemoteException {
84        // pass for now.
85        return 0;
86    }
87
88    public void performDeferredDestroy(IWindow window) {
89        // pass for now.
90    }
91
92    public boolean outOfMemory(IWindow window) throws RemoteException {
93        return false;
94    }
95
96    public void getDisplayFrame(IWindow window, Rect outDisplayFrame) {
97        // pass for now.
98    }
99
100    public void remove(IWindow arg0) throws RemoteException {
101        // pass for now.
102    }
103
104    public void setInTouchMode(boolean arg0) throws RemoteException {
105        // pass for now.
106    }
107
108    public void setTransparentRegion(IWindow arg0, Region arg1) throws RemoteException {
109        // pass for now.
110    }
111
112    public void setInsets(IWindow window, int touchable, Rect contentInsets,
113            Rect visibleInsets, Region touchableRegion) {
114        // pass for now.
115    }
116
117    public IBinder prepareDrag(IWindow window, int flags,
118            int thumbnailWidth, int thumbnailHeight, Surface outSurface)
119            throws RemoteException {
120        // pass for now
121        return null;
122    }
123
124    public boolean performDrag(IWindow window, IBinder dragToken,
125            float touchX, float touchY, float thumbCenterX, float thumbCenterY,
126            ClipData data)
127            throws RemoteException {
128        // pass for now
129        return false;
130    }
131
132    public void reportDropResult(IWindow window, boolean consumed) throws RemoteException {
133        // pass for now
134    }
135
136    public void dragRecipientEntered(IWindow window) throws RemoteException {
137        // pass for now
138    }
139
140    public void dragRecipientExited(IWindow window) throws RemoteException {
141        // pass for now
142    }
143
144    public void setWallpaperPosition(IBinder window, float x, float y,
145        float xStep, float yStep) {
146        // pass for now.
147    }
148
149    public void wallpaperOffsetsComplete(IBinder window) {
150        // pass for now.
151    }
152
153    public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
154            int z, Bundle extras, boolean sync) {
155        // pass for now.
156        return null;
157    }
158
159    public void wallpaperCommandComplete(IBinder window, Bundle result) {
160        // pass for now.
161    }
162
163    public void closeSystemDialogs(String reason) {
164        // pass for now.
165    }
166
167    public IBinder asBinder() {
168        // pass for now.
169        return null;
170    }
171
172    public IBinder prepareDrag(IWindow arg0, boolean arg1, int arg2, int arg3, Surface arg4)
173            throws RemoteException {
174        // TODO Auto-generated method stub
175        return null;
176    }
177}
178