BridgeWindowSession.java revision 310a4d815b693e358d151b9aa2823c5022993f9b
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, 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, 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, LayoutParams arg1, int arg2, int arg3, int arg4,
82            boolean 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 getDisplayFrame(IWindow window, Rect outDisplayFrame) {
89        // pass for now.
90    }
91
92    public void remove(IWindow arg0) throws RemoteException {
93        // pass for now.
94    }
95
96    public void setInTouchMode(boolean arg0) throws RemoteException {
97        // pass for now.
98    }
99
100    public void setTransparentRegion(IWindow arg0, Region arg1) throws RemoteException {
101        // pass for now.
102    }
103
104    public void setInsets(IWindow window, int touchable, Rect contentInsets,
105            Rect visibleInsets) {
106        // pass for now.
107    }
108
109    public IBinder prepareDrag(IWindow window, int flags,
110            int thumbnailWidth, int thumbnailHeight, Surface outSurface)
111            throws RemoteException {
112        // pass for now
113        return null;
114    }
115
116    public boolean performDrag(IWindow window, IBinder dragToken,
117            float touchX, float touchY, float thumbCenterX, float thumbCenterY,
118            ClipData data)
119            throws RemoteException {
120        // pass for now
121        return false;
122    }
123
124    public void reportDropResult(IWindow window, boolean consumed) throws RemoteException {
125        // pass for now
126    }
127
128    public void dragRecipientEntered(IWindow window) throws RemoteException {
129        // pass for now
130    }
131
132    public void dragRecipientExited(IWindow window) throws RemoteException {
133        // pass for now
134    }
135
136    public void setWallpaperPosition(IBinder window, float x, float y,
137        float xStep, float yStep) {
138        // pass for now.
139    }
140
141    public void wallpaperOffsetsComplete(IBinder window) {
142        // pass for now.
143    }
144
145    public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
146            int z, Bundle extras, boolean sync) {
147        // pass for now.
148        return null;
149    }
150
151    public void wallpaperCommandComplete(IBinder window, Bundle result) {
152        // pass for now.
153    }
154
155    public void closeSystemDialogs(String reason) {
156        // pass for now.
157    }
158
159    public IBinder asBinder() {
160        // pass for now.
161        return null;
162    }
163
164    public IBinder prepareDrag(IWindow arg0, boolean arg1, int arg2, int arg3, Surface arg4)
165            throws RemoteException {
166        // TODO Auto-generated method stub
167        return null;
168    }
169}
170