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